diff --git a/core/src/main/java/org/fao/geonet/util/XslUtil.java b/core/src/main/java/org/fao/geonet/util/XslUtil.java index d6514ffd045..74a75f436dd 100644 --- a/core/src/main/java/org/fao/geonet/util/XslUtil.java +++ b/core/src/main/java/org/fao/geonet/util/XslUtil.java @@ -1581,7 +1581,11 @@ private static List buildRecordLink(List hits, String type) { public static String escapeForJson(String value) { return StringEscapeUtils.escapeJson(value); } - + + public static String escapeForEcmaScript(String value) { + return StringEscapeUtils.escapeEcmaScript(value); + } + public static String getWebAnalyticsService() { ApplicationContext applicationContext = ApplicationContextHolder.get(); WebAnalyticsConfiguration webAnalyticsConfiguration = applicationContext.getBean(WebAnalyticsConfiguration.class); diff --git a/schemas/config-editor.xsd b/schemas/config-editor.xsd index 31455f489a3..b98b85fd1a6 100644 --- a/schemas/config-editor.xsd +++ b/schemas/config-editor.xsd @@ -1094,6 +1094,7 @@ the mandatory section with no name and then the inner elements. + @@ -2530,4 +2531,66 @@ added in the directive panel eg. `text` for guidelines or add `action` to easily + + + + + + + + + + + + + + + + + + + + + diff --git a/schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/layout/layout.xsl b/schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/layout/layout.xsl index 4f807c0ecde..de8f4a0981f 100644 --- a/schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/layout/layout.xsl +++ b/schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/layout/layout.xsl @@ -34,6 +34,7 @@ + - + @@ -81,7 +81,7 @@ - + diff --git a/web-ui/src/main/resources/catalog/components/metadatamanager/EditorService.js b/web-ui/src/main/resources/catalog/components/metadatamanager/EditorService.js index 8b13819cb51..b651eab7649 100644 --- a/web-ui/src/main/resources/catalog/components/metadatamanager/EditorService.js +++ b/web-ui/src/main/resources/catalog/components/metadatamanager/EditorService.js @@ -321,8 +321,7 @@ // properly without removing them. There is maybe // references to DOM objects in the JS code which // make those objects not reachable by GC. - $(gnCurrentEdit.containerId).find("*").remove(); - + $(gnCurrentEdit.containerId).empty(); $(gnCurrentEdit.containerId).replaceWith(snippet); if (gnCurrentEdit.compileScope) { diff --git a/web-ui/src/main/resources/catalog/js/edit/EditorController.js b/web-ui/src/main/resources/catalog/js/edit/EditorController.js index 6f160e6f3c6..6327b8c86c4 100644 --- a/web-ui/src/main/resources/catalog/js/edit/EditorController.js +++ b/web-ui/src/main/resources/catalog/js/edit/EditorController.js @@ -478,6 +478,26 @@ return gnMetadataActions.startVersioning(gnCurrentEdit.id); }; + $scope.switchToTabWithParam = function (name, value) { + var inputForParameter = $("#" + name)[0]; + if (inputForParameter) { + inputForParameter.value = value; + } else { + inputForParameter = $("") + .attr({ + type: "hidden", + id: name, + name: name, + value: value + }) + .appendTo($(gnCurrentEdit.formId)); + } + $scope.switchToTab( + gnCurrentEdit.tab, + $("#flat")[0].value === "true" ? "flat" : "" + ); + }; + /** * Update the form according to the target tab * properties and save. diff --git a/web/src/main/webapp/xslt/common/base-variables.xsl b/web/src/main/webapp/xslt/common/base-variables.xsl index 0385a3252f7..e66718bab73 100644 --- a/web/src/main/webapp/xslt/common/base-variables.xsl +++ b/web/src/main/webapp/xslt/common/base-variables.xsl @@ -44,6 +44,7 @@ + diff --git a/web/src/main/webapp/xslt/ui-metadata/form-configurator.xsl b/web/src/main/webapp/xslt/ui-metadata/form-configurator.xsl index 2e423b7ea75..d342960844c 100644 --- a/web/src/main/webapp/xslt/ui-metadata/form-configurator.xsl +++ b/web/src/main/webapp/xslt/ui-metadata/form-configurator.xsl @@ -26,6 +26,7 @@ xmlns:gn-fn-metadata="http://geonetwork-opensource.org/xsl/functions/metadata" xmlns:gn="http://www.fao.org/geonetwork" xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:util="java:org.fao.geonet.util.XslUtil" xmlns:saxon="http://saxon.sf.net/" extension-element-prefixes="saxon" exclude-result-prefixes="#all" version="2.0"> @@ -262,6 +263,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
+
+