From 9378c37c467595e667452f1cf74345f7a34d56b1 Mon Sep 17 00:00:00 2001 From: gWestenberger Date: Tue, 4 Apr 2023 10:41:15 +0200 Subject: [PATCH] Improved layout and i18n of sitemap attribute dialog some more. --- .../ade/sitemap/clientmessages_de.properties | 2 +- .../workplace/explorer/messages_de.properties | 4 +-- .../attributes/CmsAttributesDialog.java | 23 +++++++++++++ .../gwt/client/ui/css/attributeEditor.gss | 33 +++++++++++++++++++ .../sitemap/CmsSitemapAttributeUpdater.java | 2 +- .../ade/sitemap/clientmessages.properties | 2 +- .../ui/apps/CmsDefaultMenuItemProvider.java | 7 ++-- .../workplace/explorer/messages.properties | 4 +-- 8 files changed, 67 insertions(+), 10 deletions(-) diff --git a/modules/org.opencms.locale.de/resources/system/workplace/locales/de/messages/org/opencms/ade/sitemap/clientmessages_de.properties b/modules/org.opencms.locale.de/resources/system/workplace/locales/de/messages/org/opencms/ade/sitemap/clientmessages_de.properties index a9b1b56de86..a859712aa9c 100644 --- a/modules/org.opencms.locale.de/resources/system/workplace/locales/de/messages/org/opencms/ade/sitemap/clientmessages_de.properties +++ b/modules/org.opencms.locale.de/resources/system/workplace/locales/de/messages/org/opencms/ade/sitemap/clientmessages_de.properties @@ -191,4 +191,4 @@ GUI_TOOLBAR_UNDO_0=R GUI_URLNAME_ALREADY_EXISTS_0=Diese URL existiert bereits auf dieser Ebene der Sitemap. GUI_USE_FOR_SUBPAGES_0=Auf Unterseiten benutzen GUI_VFS_PATH_0=@@import\:org.opencms.ade.sitemap.Messages\#GUI_VFS_PATH_0 -GUI_EDIT_ATTRIBUTES_0=Sitemap-Attribute bearbeiten +GUI_EDIT_ATTRIBUTES_0=Sitemap-Attribute diff --git a/modules/org.opencms.locale.de/resources/system/workplace/locales/de/messages/org/opencms/workplace/explorer/messages_de.properties b/modules/org.opencms.locale.de/resources/system/workplace/locales/de/messages/org/opencms/workplace/explorer/messages_de.properties index 5a4d39c9849..5461bb9ce35 100644 --- a/modules/org.opencms.locale.de/resources/system/workplace/locales/de/messages/org/opencms/workplace/explorer/messages_de.properties +++ b/modules/org.opencms.locale.de/resources/system/workplace/locales/de/messages/org/opencms/workplace/explorer/messages_de.properties @@ -105,7 +105,7 @@ GUI_EXPLORER_CONTEXT_CATEGORIES_0 =Kategorien zuordnen GUI_EXPLORER_CONTEXT_ADVANCED_0 =Erweitert GUI_EXPLORER_CONTEXT_REINDEX_0 =Neu indizieren GUI_EXPLORER_CONTEXT_RELATIONS_0 =Verknüpfungen -GUI_EXPLORER_CONTEXT_ALIAS_DIALOG_0 =Aliase bearbeiten +GUI_EXPLORER_CONTEXT_ALIAS_DIALOG_0 =Aliase GUI_EXPLORER_CONTEXT_REFRESH_0 =Aktualisieren GUI_EXPLORER_CONTEXT_GO_TO_PARENT_0 =Zeige übergeordnete Sitemap GUI_EXPLORER_CONTEXT_SHOW_WORKPLACE_0 =Zeige Workplace @@ -260,7 +260,7 @@ GUI_PUBLISH_TOOLTIP_0 =Ressource wartet ver GUI_EXPLORER_CONTEXT_PUBLISH_SCHEDULED_0 = Später veröffentlichen GUI_EXPLORER_CONTEXT_MULTIFILE_PROPERTY_0 =Metadaten bearbeiten -GUI_EXPLORER_CONTEXT_EDIT_SITEMAP_ATTRIBUTES_0=Sitemap-Attribute bearbeiten +GUI_EXPLORER_CONTEXT_EDIT_SITEMAP_ATTRIBUTES_0=Sitemap-Attribute GUI_NO_EDIT_REASON_LOCK_1 =Die Datei ist derzeit von "{0}" gesperrt GUI_NO_EDIT_REASON_HISTORY_0 =Sie betrachten eine historische Version der Datei diff --git a/src-gwt/org/opencms/ade/sitemap/client/attributes/CmsAttributesDialog.java b/src-gwt/org/opencms/ade/sitemap/client/attributes/CmsAttributesDialog.java index 98d25214dd9..f1838bc6a0b 100644 --- a/src-gwt/org/opencms/ade/sitemap/client/attributes/CmsAttributesDialog.java +++ b/src-gwt/org/opencms/ade/sitemap/client/attributes/CmsAttributesDialog.java @@ -194,6 +194,29 @@ Collections. emptyMap(), @JsMethod(namespace = "navigator") private static native void sendBeacon(String target, String data); + /** + * @see com.google.gwt.user.client.ui.PopupPanel#setPopupPosition(int, int) + */ + @Override + public void setPopupPosition(int left, int top) { + + // handled by CSS + } + + /** + * @see org.opencms.gwt.client.ui.input.form.CmsFormDialog#show() + */ + @Override + public void show() { + + super.show(); + // positioning handled by CSS + getElement().getStyle().clearPosition(); + getElement().getStyle().clearLeft(); + getElement().getStyle().clearTop(); + + } + /** * @see org.opencms.gwt.client.ui.input.form.CmsFormDialog#onClickCancel() */ diff --git a/src-gwt/org/opencms/gwt/client/ui/css/attributeEditor.gss b/src-gwt/org/opencms/gwt/client/ui/css/attributeEditor.gss index 2e09371a8db..b9e45d8bb83 100644 --- a/src-gwt/org/opencms/gwt/client/ui/css/attributeEditor.gss +++ b/src-gwt/org/opencms/gwt/client/ui/css/attributeEditor.gss @@ -1,2 +1,35 @@ .dialog-popup.attributeEditor > .dialog-popupContent .input-formWidgetContainer { } + +.dialog-popup.attributeEditor { + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} + +.dialog-popup.attributeEditor .dialog-popupHead , .dialog-popup.attributeEditor .dialog-caption { + cursor: default; +} + +.dialog-popup.attributeEditor > .dialog-popupContent { + min-width: 720px; + width: 80vw; + max-width: 900px; +} + +.dialog-popup.attributeEditor .dialog-contentPadding { + overflow: auto; + max-height: 80vh; +} + +.dialog-popup.attributeEditor > .dialog-popupContent .input-formLabel { +} + +.dialog-popup.attributeEditor > .dialog-popupContent .input-formWidgetContainer { + +} + +.dialog-popup.attributeEditor > .dialog-popupContent .input-formWidgetContainer > .input-checkBox .input-checkBoxImage { + /* margin-top: -5px;*/ +} diff --git a/src/org/opencms/ade/sitemap/CmsSitemapAttributeUpdater.java b/src/org/opencms/ade/sitemap/CmsSitemapAttributeUpdater.java index e33b6943885..540cceed0c9 100644 --- a/src/org/opencms/ade/sitemap/CmsSitemapAttributeUpdater.java +++ b/src/org/opencms/ade/sitemap/CmsSitemapAttributeUpdater.java @@ -187,7 +187,7 @@ public boolean saveAttributesFromEditorDialog(Map attributes) { public boolean updateAttributes(Map attributeUpdates) { Map oldValues = getAttributesFromContent(); - Map newValues = new HashMap<>(oldValues); + Map newValues = new LinkedHashMap<>(oldValues); for (Map.Entry entry : attributeUpdates.entrySet()) { String key = entry.getKey(); String value = entry.getValue(); diff --git a/src/org/opencms/ade/sitemap/clientmessages.properties b/src/org/opencms/ade/sitemap/clientmessages.properties index a170dd37eec..1e7fddd8981 100644 --- a/src/org/opencms/ade/sitemap/clientmessages.properties +++ b/src/org/opencms/ade/sitemap/clientmessages.properties @@ -231,4 +231,4 @@ GUI_COPYPAGE_MENU_ENTRY_0=Copy page GUI_LOCALECOMPARE_MODE_0=Compare locales -GUI_EDIT_ATTRIBUTES_0=Edit sitemap attributes \ No newline at end of file +GUI_EDIT_ATTRIBUTES_0=Sitemap attributes \ No newline at end of file diff --git a/src/org/opencms/ui/apps/CmsDefaultMenuItemProvider.java b/src/org/opencms/ui/apps/CmsDefaultMenuItemProvider.java index d5146ca978d..dac5b974ae5 100644 --- a/src/org/opencms/ui/apps/CmsDefaultMenuItemProvider.java +++ b/src/org/opencms/ui/apps/CmsDefaultMenuItemProvider.java @@ -172,9 +172,10 @@ public class CmsDefaultMenuItemProvider implements I_CmsContextMenuItemProvider new CmsContextMenuActionItem(new CmsUnlinkLocaleVariantAction(), advanced.getId(), 1150, 0), new CmsContextMenuActionItem(new CmsSeoAction(), advanced.getId(), 1200, 0), new CmsContextMenuActionItem(new CmsWorkplaceAction(), advanced.getId(), 1300, 0), - new CmsContextMenuActionItem(new CmsSitemapAliasAction(), advanced.getId(), 1500, 0), - new CmsContextMenuActionItem(new CmsSitemapAttributeEditorAction(), advanced.getId(), 1520, 0), - new CmsContextMenuActionItem(new CmsSitemapEditConfigAction(), advanced.getId(), 1600, 0), + + new CmsContextMenuActionItem(new CmsSitemapAttributeEditorAction(), advanced.getId(), 1500, 0), + new CmsContextMenuActionItem(new CmsSitemapEditConfigAction(), advanced.getId(), 1520, 0), + new CmsContextMenuActionItem(new CmsSitemapAliasAction(), advanced.getId(), 1600, 0), new CmsContextMenuActionItem(new CmsTemplateMapperAction(), advanced.getId(), 1700, 0), new CmsContextMenuActionItem(new CmsHistoryDialogAction(), null, 2450, 0), diff --git a/src/org/opencms/workplace/explorer/messages.properties b/src/org/opencms/workplace/explorer/messages.properties index 84f2464a534..dee3bccc694 100644 --- a/src/org/opencms/workplace/explorer/messages.properties +++ b/src/org/opencms/workplace/explorer/messages.properties @@ -105,7 +105,7 @@ GUI_EXPLORER_CONTEXT_CATEGORIES_0 =Assign categories GUI_EXPLORER_CONTEXT_ADVANCED_0 =Advanced GUI_EXPLORER_CONTEXT_REINDEX_0 =Reindex GUI_EXPLORER_CONTEXT_RELATIONS_0 =Relations -GUI_EXPLORER_CONTEXT_ALIAS_DIALOG_0 =Edit aliases +GUI_EXPLORER_CONTEXT_ALIAS_DIALOG_0 =Aliases GUI_EXPLORER_CONTEXT_REFRESH_0 =Refresh GUI_EXPLORER_CONTEXT_GO_TO_PARENT_0 =Show parent sitemap GUI_EXPLORER_CONTEXT_RENAME_0 =Rename @@ -285,7 +285,7 @@ GUI_PUBLISH_TOOLTIP_0 =Resource is waiting to be published GUI_EXPLORER_CONTEXT_PUBLISH_SCHEDULED_0 = Publish scheduled GUI_EXPLORER_CONTEXT_MULTIFILE_PROPERTY_0 =Edit metadata -GUI_EXPLORER_CONTEXT_EDIT_SITEMAP_ATTRIBUTES_0=Edit sitemap attributes +GUI_EXPLORER_CONTEXT_EDIT_SITEMAP_ATTRIBUTES_0=Sitemap attributes GUI_NO_EDIT_REASON_LOCK_1 =This resource is currently locked by "{0}" GUI_NO_EDIT_REASON_HISTORY_0 =You are currently viewing an historical version of this resource