You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2019/01/10 23:49:13 UTC

[sling-org-apache-sling-app-cms] branch feature/file-metadata-loaded updated: Tweaks to the appearance of the metadata section

This is an automated email from the ASF dual-hosted git repository.

dklco pushed a commit to branch feature/file-metadata-loaded
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git


The following commit(s) were added to refs/heads/feature/file-metadata-loaded by this push:
     new deb374e  Tweaks to the appearance of the metadata section
deb374e is described below

commit deb374e846947cb3dd8646178f279234d2088240
Author: Dan Klco <dk...@apache.org>
AuthorDate: Thu Jan 10 18:49:06 2019 -0500

    Tweaks to the appearance of the metadata section
---
 .../main/java/org/apache/sling/cms/core/internal/models/FileImpl.java  | 3 ++-
 .../sling-cms/components/editor/fields/filemetadata/filemetadata.jsp   | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/core/src/main/java/org/apache/sling/cms/core/internal/models/FileImpl.java b/core/src/main/java/org/apache/sling/cms/core/internal/models/FileImpl.java
index 7811534..9a5bc42 100644
--- a/core/src/main/java/org/apache/sling/cms/core/internal/models/FileImpl.java
+++ b/core/src/main/java/org/apache/sling/cms/core/internal/models/FileImpl.java
@@ -19,6 +19,7 @@ package org.apache.sling.cms.core.internal.models;
 import java.util.Calendar;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.TreeMap;
 
 import javax.inject.Inject;
 import javax.inject.Named;
@@ -119,7 +120,7 @@ public class FileImpl implements File {
     @Override
     public ValueMap getMetadata() {
         Resource metadata = this.getContentResource().getChild(FileMetadataExtractor.NN_METADATA);
-        Map<String, Object> data = new HashMap<>();
+        Map<String, Object> data = new TreeMap<>();
         if (metadata != null) {
             metadata.getValueMap().entrySet()
                     .forEach(e -> data.put(Text.unescapeIllegalJcrChars(e.getKey()), e.getValue()));
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/filemetadata/filemetadata.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/filemetadata/filemetadata.jsp
index 203f723..9c3c9b3 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/filemetadata/filemetadata.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/filemetadata/filemetadata.jsp
@@ -25,7 +25,7 @@
         </label>
     </c:if>
     <div class="control">
-        <dl class="reference-list">
+        <dl class="reference-list box">
         <c:forEach var="element" items="${file.metadata}">
             <dt><sling:encode value="${element.key}" mode="HTML" /></dt>
             <dd><sling:encode value="${element.value}" mode="HTML" /></dd>