diff --git a/modules/app/src/main/resources/assets/styles/browse/content-appbar.less b/modules/app/src/main/resources/assets/styles/browse/content-appbar.less index 92a9417d54..1aaff35f44 100644 --- a/modules/app/src/main/resources/assets/styles/browse/content-appbar.less +++ b/modules/app/src/main/resources/assets/styles/browse/content-appbar.less @@ -103,7 +103,7 @@ &::before { position: absolute; right: -36px; - top: 12px; + top: 5px; font-size: 24px; } } diff --git a/modules/lib/src/main/resources/assets/js/app/settings/wizard/panel/ProjectWizardPanel.ts b/modules/lib/src/main/resources/assets/js/app/settings/wizard/panel/ProjectWizardPanel.ts index 6e6ee9e4a0..a950d1147c 100644 --- a/modules/lib/src/main/resources/assets/js/app/settings/wizard/panel/ProjectWizardPanel.ts +++ b/modules/lib/src/main/resources/assets/js/app/settings/wizard/panel/ProjectWizardPanel.ts @@ -45,7 +45,7 @@ export class ProjectWizardPanel private hasChildrenLayers: boolean = false; protected getIconClass(): string { - return !!this.getPersistedItem() ? this.getPersistedItem().getIconClass() : this.getType().getIconClass(); + return !!this.getPersistedItem() ? this.getPersistedItem().getIconClass() : this.getParams().type.getIconClass(); } protected createWizardHeader(): WizardHeaderWithDisplayNameAndName { diff --git a/modules/lib/src/main/resources/assets/js/app/settings/wizard/panel/SettingsDataItemWizardPanel.ts b/modules/lib/src/main/resources/assets/js/app/settings/wizard/panel/SettingsDataItemWizardPanel.ts index 1c976b57b2..ac72a95b3d 100644 --- a/modules/lib/src/main/resources/assets/js/app/settings/wizard/panel/SettingsDataItemWizardPanel.ts +++ b/modules/lib/src/main/resources/assets/js/app/settings/wizard/panel/SettingsDataItemWizardPanel.ts @@ -4,10 +4,7 @@ import {Action} from 'lib-admin-ui/ui/Action'; import {Toolbar} from 'lib-admin-ui/ui/toolbar/Toolbar'; import {WizardStep} from 'lib-admin-ui/app/wizard/WizardStep'; import {i18n} from 'lib-admin-ui/util/Messages'; -import { - WizardHeaderWithDisplayNameAndName, - WizardHeaderWithDisplayNameAndNameOptions -} from 'lib-admin-ui/app/wizard/WizardHeaderWithDisplayNameAndName'; +import {WizardHeaderWithDisplayNameAndName} from 'lib-admin-ui/app/wizard/WizardHeaderWithDisplayNameAndName'; import {ResponsiveManager} from 'lib-admin-ui/ui/responsive/ResponsiveManager'; import {FormIcon} from 'lib-admin-ui/app/wizard/FormIcon'; import {SettingDataItemWizardStepForm} from './form/SettingDataItemWizardStepForm'; @@ -56,15 +53,9 @@ export abstract class SettingsDataItemWizardPanelthis.formIcon; } @@ -111,7 +102,7 @@ export abstract class SettingsDataItemWizardPanel) => { - steps.push(new WizardStep(stepForm.getName(this.getType()), stepForm)); + steps.push(new WizardStep(stepForm.getName(this.getParams().type), stepForm)); }); return steps; @@ -218,7 +209,8 @@ export abstract class SettingsDataItemWizardPanel { this.handleDataChanged(); @@ -345,10 +339,6 @@ export abstract class SettingsDataItemWizardPanel { showFeedback(this.getSuccessfulDeleteMessage()); @@ -356,7 +346,9 @@ export abstract class SettingsDataItemWizardPanel { if (!this.getPersistedItem()) { return; @@ -395,4 +387,8 @@ export abstract class SettingsDataItemWizardPanel { + return >super.getParams(); + } } diff --git a/modules/lib/src/main/resources/assets/js/app/wizard/ContentWizardHeader.ts b/modules/lib/src/main/resources/assets/js/app/wizard/ContentWizardHeader.ts index 5db2a577f3..f23b9bbf05 100644 --- a/modules/lib/src/main/resources/assets/js/app/wizard/ContentWizardHeader.ts +++ b/modules/lib/src/main/resources/assets/js/app/wizard/ContentWizardHeader.ts @@ -1,7 +1,4 @@ -import { - WizardHeaderWithDisplayNameAndName, - WizardHeaderWithDisplayNameAndNameOptions -} from 'lib-admin-ui/app/wizard/WizardHeaderWithDisplayNameAndName'; +import {WizardHeaderWithDisplayNameAndName} from 'lib-admin-ui/app/wizard/WizardHeaderWithDisplayNameAndName'; import {SpanEl} from 'lib-admin-ui/dom/SpanEl'; import {i18n} from 'lib-admin-ui/util/Messages'; import {PropertyChangedEvent} from 'lib-admin-ui/PropertyChangedEvent'; @@ -33,8 +30,8 @@ export class ContentWizardHeader private lockElem: ButtonEl; - constructor(options?: WizardHeaderWithDisplayNameAndNameOptions) { - super(options); + constructor() { + super(); } protected initElements() { diff --git a/modules/lib/src/main/resources/assets/js/app/wizard/ContentWizardPanel.ts b/modules/lib/src/main/resources/assets/js/app/wizard/ContentWizardPanel.ts index e35586acf6..9c42843d5f 100644 --- a/modules/lib/src/main/resources/assets/js/app/wizard/ContentWizardPanel.ts +++ b/modules/lib/src/main/resources/assets/js/app/wizard/ContentWizardPanel.ts @@ -116,7 +116,6 @@ import {UrlAction} from '../UrlAction'; import {ContentWizardHeader} from './ContentWizardHeader'; import {NotifyManager} from 'lib-admin-ui/notify/NotifyManager'; import {ContentIconUrlResolver} from '../content/ContentIconUrlResolver'; -import {WizardHeaderWithDisplayNameAndNameOptions} from 'lib-admin-ui/app/wizard/WizardHeaderWithDisplayNameAndName'; import {Descriptor} from '../page/Descriptor'; import {GetPageDescriptorsByApplicationsRequest} from './page/contextwindow/inspect/page/GetPageDescriptorsByApplicationsRequest'; import {ContentId} from '../content/ContentId'; @@ -406,7 +405,6 @@ export class ContentWizardPanel } toggleMinimize(navigationIndex: number = -1) { - this.stepsPanel.setListenToScroll(false); let scroll = this.stepsPanel.getScroll(); @@ -518,6 +516,16 @@ export class ContentWizardPanel }); } + this.wizardHeader.setPlaceholder(this.contentType?.getDisplayNameLabel()); + this.wizardHeader.setPersistedPath(this.isItemPersisted() ? this.getPersistedItem() : null); + this.wizardHeader.setPath(this.getWizardHeaderPath()); + + const existing: Content = this.getPersistedItem(); + if (existing) { + this.wizardHeader.setDisplayName(existing.getDisplayName()); + this.wizardHeader.setName(existing.getName().toString()); + } + }).then(() => super.doLoadData()); } @@ -545,22 +553,7 @@ export class ContentWizardPanel } protected createWizardHeader(): WizardHeader { - const headerOptions: WizardHeaderWithDisplayNameAndNameOptions = { - displayNameGenerator: this.displayNameResolver, - displayNameLabel: this.contentType ? this.contentType.getDisplayNameLabel() : null - }; - - const header: ContentWizardHeader = new ContentWizardHeader(headerOptions); - - header.setPersistedPath(this.isItemPersisted() ? this.getPersistedItem() : null); - header.setPath(this.getWizardHeaderPath()); - - const existing: Content = this.getPersistedItem(); - if (existing) { - header.initNames(existing.getDisplayName(), existing.getName().toString(), false); - } - - return header; + return new ContentWizardHeader(); } private getWizardHeaderPath(): string { @@ -2224,11 +2217,9 @@ export class ContentWizardPanel } private enableDisplayNameScriptExecution(formView: FormView) { - if (this.displayNameResolver.hasExpression()) { - formView.onKeyUp((event: KeyboardEvent) => { - this.getWizardHeader().setDisplayName(this.displayNameResolver.execute()); + this.getWizardHeader().setDisplayName(this.displayNameResolver.execute(), true); }); } } @@ -2541,7 +2532,8 @@ export class ContentWizardPanel private updateWizardHeader(content: Content) { this.updateThumbnailWithContent(content); - this.getWizardHeader().initNames(content.getDisplayName(), content.getName().toString(), true, false); + this.getWizardHeader().setDisplayName(content.getDisplayName()); + this.getWizardHeader().setName(content.getName().toString()); // case when content was moved this.getWizardHeader()