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 2020/11/23 14:28:52 UTC

[sling-org-apache-sling-app-cms] branch master updated (8f0c29e -> 78cc999)

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

dklco pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git.


    from 8f0c29e  Fixing live / ready checks to not time out too soon
     new f6e0051  Improving branding support to be able to override all major aspects
     new 18732cd  Updating released versions
     new a2eb1f7  Updating the column control to allow setting the row class
     new 9517bfb  Updating the style wrapper to allow for combining multiple styles
     new 78cc999  Updating to use the branding logo for the error page signin

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 docker/cms/Dockerfile                              |  2 +-
 feature/src/main/features/oak/oak_base.json        |  2 +-
 .../general/columncontrol/columncontrol.jsp        | 10 ++--
 .../components/general/columncontrol/config.json   |  7 +++
 .../components/general/stylewrapper/edit.json      |  9 +++-
 .../components/general/stylewrapper/options.jsp    |  4 +-
 .../general/stylewrapper/stylewrapper.jsp          |  8 +++-
 ui/src/main/resources/jcr_root/conf/global.json    |  1 +
 .../components/cms/contentgrid/contentgrid.jsp     |  8 ++--
 .../sling-cms/components/cms/tilecard/tilecard.jsp |  2 +-
 .../editor/fields/{taxonomy.json => combobox.json} |  2 +-
 .../components/editor/fields/combobox/options.jsp  | 54 ++++++++++++++++++++++
 .../fields/{taxonomy => combobox}/values.jsp       |  4 +-
 .../libs/sling-cms/components/pages/base/nav.jsp   |  4 +-
 .../libs/sling-cms/components/pages/error/body.jsp |  2 +-
 .../jcr_root/libs/sling-cms/content/branding.json  |  3 ++
 .../libs/sling-cms/content/publication/home.json   |  8 ++--
 17 files changed, 102 insertions(+), 28 deletions(-)
 copy ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/{taxonomy.json => combobox.json} (77%)
 create mode 100644 ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/combobox/options.jsp
 copy ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/{taxonomy => combobox}/values.jsp (88%)


[sling-org-apache-sling-app-cms] 05/05: Updating to use the branding logo for the error page signin

Posted by dk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 78cc9991a5d6733a5316188f4f18b91d781a981e
Author: Dan Klco <dk...@apache.org>
AuthorDate: Mon Nov 23 09:28:39 2020 -0500

    Updating to use the branding logo for the error page signin
---
 .../resources/jcr_root/libs/sling-cms/components/pages/error/body.jsp   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/error/body.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/error/body.jsp
index 192f29f..08b5087 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/error/body.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/error/body.jsp
@@ -25,7 +25,7 @@
                 <div class="columns is-centered is-vcentered" style="min-height: calc(100vh - 85px)">
                     <div class="column is-two-thirds-tablet is-half-desktop is-one-third-widescreen">
                         <div class="box mt-6">
-                            <img src="/static/clientlibs/sling-cms/img/sling-logo.svg" width="100" alt="Apache Sling CMS" class="pb-3">
+                            <img src="${branding.logo}" width="100" alt="${branding.appName}" class="pb-3">
                             <sling:call script="content.jsp" />
                         </div>
                     </div>


[sling-org-apache-sling-app-cms] 02/05: Updating released versions

Posted by dk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 18732cd522e75c362303ea77af3f4bc8ad32712f
Author: Dan Klco <dk...@apache.org>
AuthorDate: Mon Nov 9 16:20:44 2020 -0500

    Updating released versions
---
 docker/cms/Dockerfile                       | 2 +-
 feature/src/main/features/oak/oak_base.json | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/docker/cms/Dockerfile b/docker/cms/Dockerfile
index b0e8135..efaf5e9 100644
--- a/docker/cms/Dockerfile
+++ b/docker/cms/Dockerfile
@@ -18,7 +18,7 @@ ARG ADDITIONAL_FEATURE_COORDINATE=
 ARG CMS_GROUP_ID=org.apache.sling
 ARG CMS_ARTIFACT_ID=org.apache.sling.cms.feature
 ARG CMS_VERSION=0.16.3-SNAPSHOT
-ARG LAUNCHER_VERSION=1.1.6
+ARG LAUNCHER_VERSION=1.1.10
 ARG FM_SEED_CLASSIFIER=slingcms-composite-seed
 ARG RUNMODE=standalone
 ARG FM_RUNTIME_CLASSIFIER=slingcms-composite-runtime
diff --git a/feature/src/main/features/oak/oak_base.json b/feature/src/main/features/oak/oak_base.json
index 3965789..6ae0901 100644
--- a/feature/src/main/features/oak/oak_base.json
+++ b/feature/src/main/features/oak/oak_base.json
@@ -138,7 +138,7 @@
             "start-order":"20"
         },
         {
-            "id":"org.apache.sling:org.apache.sling.jcr.contentloader:2.4.0-SNAPSHOT",
+            "id":"org.apache.sling:org.apache.sling.jcr.contentloader:2.4.0",
             "start-order":"20"
         },
         {


[sling-org-apache-sling-app-cms] 04/05: Updating the style wrapper to allow for combining multiple styles

Posted by dk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 9517bfbd1d125e4958f0332073120b555dfdcd49
Author: Dan Klco <dk...@apache.org>
AuthorDate: Mon Nov 23 09:27:04 2020 -0500

    Updating the style wrapper to allow for combining multiple styles
---
 .../components/general/stylewrapper/edit.json      |  9 +++-
 .../components/general/stylewrapper/options.jsp    |  4 +-
 .../general/stylewrapper/stylewrapper.jsp          |  8 +++-
 .../components/editor/fields/combobox.json         |  6 +++
 .../components/editor/fields/combobox/options.jsp  | 54 ++++++++++++++++++++++
 .../components/editor/fields/combobox/values.jsp   | 14 ++++--
 6 files changed, 85 insertions(+), 10 deletions(-)

diff --git a/reference/src/main/resources/jcr_root/apps/reference/components/general/stylewrapper/edit.json b/reference/src/main/resources/jcr_root/apps/reference/components/general/stylewrapper/edit.json
index e577436..8217309 100644
--- a/reference/src/main/resources/jcr_root/apps/reference/components/general/stylewrapper/edit.json
+++ b/reference/src/main/resources/jcr_root/apps/reference/components/general/stylewrapper/edit.json
@@ -7,11 +7,16 @@
         "sling:resourceType": "sling-cms/components/general/container",
         "style": {
             "jcr:primaryType": "nt:unstructured",
-            "sling:resourceType": "sling-cms/components/editor/fields/select",
+            "sling:resourceType": "sling-cms/components/editor/fields/combobox",
             "label": "Style Option",
             "name": "style",
-            "required": true,
             "optionsScript": "/apps/reference/components/general/stylewrapper/options.jsp"
+        },
+        "styleTypeHint": {
+            "jcr:primaryType": "nt:unstructured",
+            "sling:resourceType": "sling-cms/components/editor/fields/hidden",
+            "name": "style@TypeHint",
+            "value": "String[]"
         }
     }
 }
\ No newline at end of file
diff --git a/reference/src/main/resources/jcr_root/apps/reference/components/general/stylewrapper/options.jsp b/reference/src/main/resources/jcr_root/apps/reference/components/general/stylewrapper/options.jsp
index 1a87293..642c788 100644
--- a/reference/src/main/resources/jcr_root/apps/reference/components/general/stylewrapper/options.jsp
+++ b/reference/src/main/resources/jcr_root/apps/reference/components/general/stylewrapper/options.jsp
@@ -18,7 +18,5 @@
  */ --%>
  <%@include file="/libs/sling-cms/global.jsp"%>
 <c:forEach var="style" items="${sling:adaptTo(slingRequest.requestPathInfo.suffixResource,'org.apache.sling.cms.ComponentConfiguration').properties.styles}">
-    <option ${slingRequest.requestPathInfo.suffixResource.valueMap.style == fn:split(style,'=')[1] ? 'selected' : ''} value="${sling:encode(fn:split(style,'=')[1],'HTML_ATTR')}">
-        ${sling:encode(fn:split(style,'=')[0],'HTML')}
-    </option>
+    <option ${slingRequest.requestPathInfo.suffixResource.valueMap.style == fn:split(style,'=')[1] ? 'selected' : ''} value="${sling:encode(fn:split(style,'=')[1],'HTML_ATTR')}">${sling:encode(fn:split(style,'=')[0],'HTML')}</option>
 </c:forEach>
\ No newline at end of file
diff --git a/reference/src/main/resources/jcr_root/apps/reference/components/general/stylewrapper/stylewrapper.jsp b/reference/src/main/resources/jcr_root/apps/reference/components/general/stylewrapper/stylewrapper.jsp
index 8aecba7..28f87b7 100644
--- a/reference/src/main/resources/jcr_root/apps/reference/components/general/stylewrapper/stylewrapper.jsp
+++ b/reference/src/main/resources/jcr_root/apps/reference/components/general/stylewrapper/stylewrapper.jsp
@@ -17,6 +17,12 @@
  * under the License.
  */ --%>
  <%@include file="/libs/sling-cms/global.jsp"%>
-<div class="${properties.style}">
+<c:catch var="ex">
+    <c:set var="style" value="${fn:join(properties.style, ' ')}" />
+</c:catch>
+<c:if test="${ex != null}">
+    <c:set var="style" value="${properties.style}" />
+</c:if>
+<div class="${style}">
     <sling:include path="container" resourceType="sling-cms/components/general/container" />
 </div>
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/combobox.json b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/combobox.json
new file mode 100644
index 0000000..36d5192
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/combobox.json
@@ -0,0 +1,6 @@
+{
+	"jcr:primaryType": "sling:Component",
+	"sling:resourceSuperType" : "sling-cms/components/editor/fields/labelfield",
+    "componentType": "SlingCMS-FieldConfig",
+    "jcr:title": "Sling CMS - Combobox"
+}
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/combobox/options.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/combobox/options.jsp
new file mode 100644
index 0000000..e60ef02
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/combobox/options.jsp
@@ -0,0 +1,54 @@
+<%-- /*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */ --%>
+<%@include file="/libs/sling-cms/global.jsp"%>
+<datalist id="labelfield-${fn:replace(resource.name,':','-')}">
+    <c:choose>
+        <c:when test="${not empty properties.options}">
+            <c:forEach var="option" items="${properties.options}">
+                <c:set var="label" value="${fn:split(option,'=')[0]}" />
+                <c:set var="value" value="${fn:split(option,'=')[1]}" />
+                <c:choose>
+                    <c:when test="${val eq value}">
+                        <c:set var="selected" value="selected=\"selected\"" />
+                    </c:when>
+                    <c:otherwise>
+                        <c:set var="selected" value="" />
+                    </c:otherwise>
+                </c:choose>
+                <option ${selected} value="${sling:encode(value,'HTML_ATTR')}"><sling:encode value="${label}" mode="HTML" /></option>
+            </c:forEach>
+        </c:when>
+        <c:when test="${sling:getRelativeResource(resource,'options') != null}">
+            <c:forEach var="option" items="${sling:listChildren(sling:getRelativeResource(resource,'options'))}">
+                <c:choose>
+                    <c:when test="${option.valueMap.value eq editProperties[properties.name]}">
+                        <c:set var="selected" value="selected=\"selected\"" />
+                    </c:when>
+                    <c:otherwise>
+                        <c:set var="selected" value="" />
+                    </c:otherwise>
+                </c:choose>
+                <option ${selected} value="${sling:encode(option.valueMap.value,'HTML_ATTR')}"><sling:encode value="${option.valueMap.label}" mode="HTML" /></option>
+            </c:forEach>
+        </c:when>
+        <c:when test="${not empty properties.optionsScript}">
+            <sling:call script="${properties.optionsScript}" />
+        </c:when>
+    </c:choose>
+</datalist>
\ No newline at end of file
diff --git a/reference/src/main/resources/jcr_root/apps/reference/components/general/stylewrapper/stylewrapper.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/combobox/values.jsp
similarity index 68%
copy from reference/src/main/resources/jcr_root/apps/reference/components/general/stylewrapper/stylewrapper.jsp
copy to ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/combobox/values.jsp
index 8aecba7..f365e87 100644
--- a/reference/src/main/resources/jcr_root/apps/reference/components/general/stylewrapper/stylewrapper.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/combobox/values.jsp
@@ -16,7 +16,13 @@
  * specific language governing permissions and limitations
  * under the License.
  */ --%>
- <%@include file="/libs/sling-cms/global.jsp"%>
-<div class="${properties.style}">
-    <sling:include path="container" resourceType="sling-cms/components/general/container" />
-</div>
+<%@include file="/libs/sling-cms/global.jsp"%>
+<c:forEach var="item" items="${value}">
+    <a class="tag labelfield__item" title="${item}">
+        <input type="hidden" name="${properties.name}" value="${item}" />
+        <span class="labelfield__title">
+            ${sling:encode(item,'HTML')}
+        </span>
+        <button class="delete is-small"></button>
+    </a>
+</c:forEach>


[sling-org-apache-sling-app-cms] 01/05: Improving branding support to be able to override all major aspects

Posted by dk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f6e0051fcdbf9ae233f69cb93418c0f2517bdc46
Author: Dan Klco <dk...@apache.org>
AuthorDate: Thu Nov 5 22:25:29 2020 -0500

    Improving branding support to be able to override all major aspects
---
 .../libs/sling-cms/components/cms/contentgrid/contentgrid.jsp     | 8 ++++----
 .../jcr_root/libs/sling-cms/components/cms/tilecard/tilecard.jsp  | 2 +-
 .../jcr_root/libs/sling-cms/components/pages/base/nav.jsp         | 4 ++--
 .../main/resources/jcr_root/libs/sling-cms/content/branding.json  | 3 +++
 .../jcr_root/libs/sling-cms/content/publication/home.json         | 8 ++++----
 5 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentgrid/contentgrid.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentgrid/contentgrid.jsp
index e834133..64f2c3a 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentgrid/contentgrid.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentgrid/contentgrid.jsp
@@ -48,10 +48,10 @@
                                         <img src="${child.path}.transform/sling-cms-thumbnail.png" loading="lazy" alt="${child.name}">
                                     </c:when>
                                     <c:when test="${child.resourceType == 'sling:Site'}">
-                                        <img src="/static/sling-cms/thumbnails/site.png" loading="lazy" alt="${sling:encode(child.name, 'HTML_ATTR')}">
+                                        <img src="${branding.gridIconsBase}/site.png" loading="lazy" alt="${sling:encode(child.name, 'HTML_ATTR')}">
                                     </c:when>
                                     <c:when test="${child.resourceType == 'sling:OrderedFolder' || child.resourceType == 'sling:Folder' || child.resourceType == 'nt:folder'}">
-                                        <img src="/static/sling-cms/thumbnails/folder.png" loading="lazy" alt="${sling:encode(child.name, 'HTML_ATTR')}">
+                                        <img src="${branding.gridIconsBase}/folder.png" loading="lazy" alt="${sling:encode(child.name, 'HTML_ATTR')}">
                                     </c:when>
                                     <c:when test="${child.resourceType == 'sling:Page'}">
                                         <c:set var="templateThumbnail" value="${child.valueMap['jcr:content/sling:template']}/thumbnail"/>
@@ -60,12 +60,12 @@
                                                 <img src="${templateThumbnail}.transform/sling-cms-thumbnail.png" loading="lazy" alt="${sling:encode(child.name, 'HTML_ATTR')}">
                                             </c:when>
                                             <c:otherwise>
-                                                <img src="/static/sling-cms/thumbnails/page.png" loading="lazy" alt="${child.name}">
+                                                <img src="${branding.gridIconsBase}/page.png" loading="lazy" alt="${child.name}">
                                             </c:otherwise>
                                         </c:choose>
                                     </c:when>
                                     <c:otherwise>
-                                        <img src="/static/sling-cms/thumbnails/file.png" loading="lazy" alt="${child.name}">
+                                        <img src="${branding.gridIconsBase}/file.png" loading="lazy" alt="${child.name}">
                                     </c:otherwise>
                                 </c:choose>
                             </figure>
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/tilecard/tilecard.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/tilecard/tilecard.jsp
index fb3a9e2..10d95d5 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/tilecard/tilecard.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/tilecard/tilecard.jsp
@@ -22,7 +22,7 @@
         <div class="card is-linked" title="${sling:encode(properties.title,'HTML_ATTR')}" data-value="${resource.path}">
             <div class="card-image">
                 <figure class="image is-5by4">
-                    <img src="${sling:encode(properties.image,'HTML_ATTR')}" loading="lazy" alt="${sling:encode(properties.title,'HTML_ATTR')}">
+                    <img src="${branding.gridIconsBase}${sling:encode(properties.icon,'HTML_ATTR')}" loading="lazy" alt="${sling:encode(properties.title,'HTML_ATTR')}">
                 </figure>
             </div>
             <footer class="card-footer">
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/nav.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/nav.jsp
index e0773a3..5823c7b 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/nav.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/nav.jsp
@@ -19,7 +19,7 @@
 <%@include file="/libs/sling-cms/global.jsp"%>
 <nav class="navbar has-background-light" role="navigation" aria-label="main mavigation">
     <div class="navbar-brand">
-        <a class="navbar-item" href="http://sling.apache.org">
+        <a class="navbar-item" href="${branding.logoLink}">
             <img src="${branding.logo}" width="100" alt="${branding.appName}"/>
         </a>
         <a href="/cms/start.html" class="navbar-item" title="CMS Home">
@@ -53,7 +53,7 @@
                         </em>&nbsp;
                         Profile
                     </a>
-                    <a class="navbar-item" href="https://github.com/apache/sling-org-apache-sling-app-cms" target="_blank" rel="noopener noreferrer">
+                    <a class="navbar-item" href="${branding.helpLink}" target="_blank" rel="noopener noreferrer">
                         <em class="jam jam-help">
                             <span class="is-vhidden">Help</span>
                         </em>&nbsp;
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/branding.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/branding.json
index 450cd91..6661951 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/branding.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/branding.json
@@ -6,7 +6,10 @@
     "favicon32": "/static/clientlibs/sling-cms/img/favicon-32x32.png",
     "favicon16": "/static/clientlibs/sling-cms/img/favicon-16x16.png",
     "favicon": "/static/clientlibs/sling-cms/img/favicon.ico",
+    "gridIconsBase": "/static/sling-cms/thumbnails",
+    "helpLink": "https://github.com/apache/sling-org-apache-sling-app-cms",
     "logo": "/static/clientlibs/sling-cms/img/sling-logo.svg",
+    "logoLink": "https://sling.apache.org",
     "tileColor": "#662f8f",
     "browserConfig": "/static/clientlibs/sling-cms/img/browserconfig.xml",
     "webManifest": "/static/clientlibs/sling-cms/img/site.webmanifest",
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/publication/home.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/publication/home.json
index 8d93902..ee00036 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/publication/home.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/publication/home.json
@@ -22,28 +22,28 @@
                 "agents": {
                     "jcr:primaryType": "nt:unstructured",
                     "sling:resourceType": "sling-cms/components/cms/tilecard",
-                    "image": "/static/sling-cms/thumbnails/publish-agent.png",
+                    "icon": "/publish-agent.png",
                     "link": "/cms/publication/agents.html/libs/sling/distribution/settings/agents",
                     "title": "Agents"
                 },
                 "bulk-publication": {
                     "jcr:primaryType": "nt:unstructured",
                     "sling:resourceType": "sling-cms/components/cms/tilecard",
-                    "image": "/static/sling-cms/thumbnails/bulk-publication.png",
+                    "icon": "/bulk-publication.png",
                     "link": "/cms/jobs/list.html",
                     "title": "Bulk Publication"
                 },
                 "exporters": {
                     "jcr:primaryType": "nt:unstructured",
                     "sling:resourceType": "sling-cms/components/cms/tilecard",
-                    "image": "/static/sling-cms/thumbnails/exporter.png",
+                    "icon": "/exporter.png",
                     "link": "/cms/publication/exporters.html/libs/sling/distribution/settings/exporters",
                     "title": "Exporters"
                 },
                 "importers": {
                     "jcr:primaryType": "nt:unstructured",
                     "sling:resourceType": "sling-cms/components/cms/tilecard",
-                    "image": "/static/sling-cms/thumbnails/importer.png",
+                    "icon": "/importer.png",
                     "link": "/cms/publication/importers.html/libs/sling/distribution/settings/importers",
                     "title": "Importers"
                 }


[sling-org-apache-sling-app-cms] 03/05: Updating the column control to allow setting the row class

Posted by dk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit a2eb1f7593dcf7546dc28754403d8432c3d40474
Author: Dan Klco <dk...@apache.org>
AuthorDate: Mon Nov 23 09:25:57 2020 -0500

    Updating the column control to allow setting the row class
---
 .../components/general/columncontrol/columncontrol.jsp         | 10 +++++-----
 .../reference/components/general/columncontrol/config.json     |  7 +++++++
 ui/src/main/resources/jcr_root/conf/global.json                |  1 +
 3 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/reference/src/main/resources/jcr_root/apps/reference/components/general/columncontrol/columncontrol.jsp b/reference/src/main/resources/jcr_root/apps/reference/components/general/columncontrol/columncontrol.jsp
index a673a3e..9595576 100644
--- a/reference/src/main/resources/jcr_root/apps/reference/components/general/columncontrol/columncontrol.jsp
+++ b/reference/src/main/resources/jcr_root/apps/reference/components/general/columncontrol/columncontrol.jsp
@@ -16,13 +16,13 @@
  * specific language governing permissions and limitations
  * under the License.
  */ --%>
- <%@include file="/libs/sling-cms/global.jsp"%>
+<%@include file="/libs/sling-cms/global.jsp"%>
+<sling:adaptTo adaptable="${resource}" adaptTo="org.apache.sling.cms.ComponentPolicyManager" var="componentPolicyMgr" />
+<c:set var="configRsrc" value="${componentPolicyMgr.componentPolicy.componentConfigs['reference/components/general/columncontrol']}" />
 <c:choose>
     <c:when test="${properties.container == true}">
-        <sling:adaptTo adaptable="${resource}" adaptTo="org.apache.sling.cms.ComponentPolicyManager" var="componentPolicyMgr" />
-        <c:set var="configRsrc" value="${componentPolicyMgr.componentPolicy.componentConfigs['reference/components/general/columncontrol']}" />
         <div class="${configRsrc.valueMap.containerclass}">
-            <div class="row">
+            <div class="${configRsrc.valueMap.rowClass}">
                 <c:forEach var="col" items="${fn:split(properties.layout,',')}" varStatus="status">
                     <div class="${sling:encode(col,'HTML_ATTR')}">
                         <sling:include path="col-${status.index}" resourceType="sling-cms/components/general/container" />
@@ -32,7 +32,7 @@
          </div>
      </c:when>
      <c:otherwise>
-         <div class="row">
+         <div class="${configRsrc.valueMap.rowClass}">
             <c:forEach var="col" items="${fn:split(properties.layout,',')}" varStatus="status">
                 <div class="${sling:encode(col,'HTML_ATTR')}">
                     <sling:include path="col-${status.index}" resourceType="sling-cms/components/general/container" />
diff --git a/reference/src/main/resources/jcr_root/apps/reference/components/general/columncontrol/config.json b/reference/src/main/resources/jcr_root/apps/reference/components/general/columncontrol/config.json
index 0fc0f9c..7424d36 100644
--- a/reference/src/main/resources/jcr_root/apps/reference/components/general/columncontrol/config.json
+++ b/reference/src/main/resources/jcr_root/apps/reference/components/general/columncontrol/config.json
@@ -21,5 +21,12 @@
         "label": "Container Class",
         "name": "containerclass",
         "required": true
+    },
+    "rowclass": {
+        "jcr:primaryType": "nt:unstructured",
+        "sling:resourceType": "sling-cms/components/editor/fields/text",
+        "label": "Row Class",
+        "name": "rowClass",
+        "required": true
     }
 }
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/conf/global.json b/ui/src/main/resources/jcr_root/conf/global.json
index 1089ded..7ec5881 100644
--- a/ui/src/main/resources/jcr_root/conf/global.json
+++ b/ui/src/main/resources/jcr_root/conf/global.json
@@ -198,6 +198,7 @@
                             "50% 50%=col-6,col-6",
                             "33% 33% 33%=col-4,col-4,col-4"
                         ],
+                        "rowClass": "row",
                         "sling:resourceType": "sling-cms/components/caconfig/component"
                     },
                     "component_1644835788": {