Commit 610937eb authored by Baptiste Toulemonde's avatar Baptiste Toulemonde
Browse files

fix additionalProperties PUA import et issue #23

parent e33ca2bc
......@@ -72,6 +72,7 @@ public class JsonFromPUA {
idCounter = 0L;
// Adding root element DescriptiveMetadata
ElementProperties root = new ElementProperties();
root.setAdditionalProperties(controlSchema.getBoolean("additionalProperties"));
root.setName("DescriptiveMetadata");
root.setId(idCounter++);
root.setLevel(0);
......
......@@ -54,10 +54,6 @@ export class AppComponent implements OnInit {
}
ngOnInit() {
if (this.isStandalone) {
document.title = 'PASTIS';
}
}
ngOnInit() {}
}
......@@ -25,13 +25,13 @@
<!--Toggle button allow additional properties-->
<div *ngIf="this.profileService.profileMode==='PUA' && this.isStandalone" class="panel-buttons" matTooltip="{{'PROFILE.EDIT_PROFILE.FILE_TREE_METADATA.ADDITIONAL_PROPERTIES_TOOLTIP' |
translate}}">
<allow-additional-properties (stateToggleButton)="changeStatusAditionalProperties($event)">
<allow-additional-properties [checked]="additionalProperties" (stateToggleButton)="changeStatusAditionalProperties($event)">
</allow-additional-properties>
</div>
<!--Button save-->
<div class="panel-buttons" matTooltip="{{'PROFILE.EDIT_PROFILE.FILE_TREE_METADATA.ENREGISTRER_PROFIL_TOOLTIP' |
translate}}" placement="top" show-delay="0">
<pastis-user-action-save-profile [additional]="additionalProperties"></pastis-user-action-save-profile>
<pastis-user-action-save-profile ></pastis-user-action-save-profile>
</div>
<!--Button setting-->
<div class="panel-buttons" matTooltip="{{'PROFILE.EDIT_PROFILE.FILE_TREE_METADATA.TELECHARGER_MANUEL_TOOLTIP' |
......
......@@ -271,6 +271,7 @@ export class FileTreeMetadataComponent {
);
this._fileServiceSubscriptionNodeChange = this.fileService.nodeChange.subscribe(node => {
this.clickedNode = node;
this.additionalProperties = node.additionalProperties;
// BreadCrumb for navigation through metadatas
if (node && node !== undefined) {
const breadCrumbNodeLabel: string = node.name;
......@@ -949,7 +950,7 @@ export class FileTreeMetadataComponent {
}
changeStatusAditionalProperties($event: boolean) {
this.additionalProperties = $event;
this.clickedNode.additionalProperties = $event;
}
......@@ -982,4 +983,6 @@ export class FileTreeMetadataComponent {
}
return false;
}
}
......@@ -161,7 +161,7 @@ export class ListProfileComponent extends SidenavPage<ProfileDescription> implem
this.popupCreationCancelLabel = 'Annuler';
this.popupCreationTitleDialog = 'Choix du type de profil';
this.popupCreationSubTitleDialog = 'Création d\'un profil';
this.popupCreationOkLabel = 'TERMINER';
this.popupCreationOkLabel = 'VALIDER';
}
this.dataGeneriquePopupService.currentDonnee.subscribe(donnees => this.donnees = donnees);
this.breadcrumbDataTop = [{ label: 'PROFILE.EDIT_PROFILE.BREADCRUMB.PORTAIL', url: this.startupService.getPortalUrl(), external: true}, { label: 'PROFILE.EDIT_PROFILE.BREADCRUMB.CREER_ET_GERER_PROFIL', url: '/'}];
......
import {Component, EventEmitter, OnInit, Output} from '@angular/core';
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
@Component({
selector: 'allow-additional-properties',
......@@ -15,8 +15,8 @@ export class AllowAdditionalPropertiesComponent implements OnInit {
}
@Output() stateToggleButton = new EventEmitter<boolean>();
checked = false;
@Input()
checked: boolean;
text : string;
text1: string;
......
......@@ -113,8 +113,6 @@ export class UserActionSaveProfileComponent implements OnInit, OnDestroy {
profileDescription: ProfileDescription;
fileRng: File;
@Input() additional: boolean;
@Output() close = new EventEmitter();
constructor(private profileService: ProfileService, private fileService: FileService,
......@@ -159,7 +157,6 @@ export class UserActionSaveProfileComponent implements OnInit, OnDestroy {
saveProfileToFile() {
// Retrieve the current file tree data as a JSON
this.data = this.fileService.allData.getValue();
this.data[0].additionalProperties = this.additional;
if (this.isStandalone) {
this.downloadProfiles(true);
} else {
......
......@@ -111,7 +111,7 @@
"POPUP_CREATION_CANCEL_LABEL":"CANCEL",
"POPUP_CREATION_TITLE_DIALOG": "Choice of record type",
"POPUP_CREATION_SUBTITLE_DIALOG":"Creating a record",
"POPUP_CREATION_OK_LABEL": "TERMINATE"
"POPUP_CREATION_OK_LABEL": "CONFIRM"
},
"EDIT_PROFILE": {
"NOTICE_TAB": "Notice",
......
......@@ -111,7 +111,7 @@
"POPUP_CREATION_CANCEL_LABEL":"ANNULER",
"POPUP_CREATION_TITLE_DIALOG": "Choix du type de notice",
"POPUP_CREATION_SUBTITLE_DIALOG":"Création d'une notice",
"POPUP_CREATION_OK_LABEL": "TERMINER"
"POPUP_CREATION_OK_LABEL": "VALIDER"
},
"EDIT_PROFILE": {
"NOTICE_TAB": "Notice",
......
......@@ -45,6 +45,7 @@ if (environment.production) {
}
if (environment.standalone) {
document.title = 'PASTIS';
document.getElementById('favicon').setAttribute('href', '../assets/favicon.ico');
}
platformBrowserDynamic().bootstrapModule(AppModule)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment