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/08/27 21:04:09 UTC

[sling-org-apache-sling-app-cms] 01/05: Fixing an issue where the page editor buttons weren't opening in a modal

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

dklco pushed a commit to branch SLING-8913-multiple-instance-types
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git

commit 282855073490a2e3c27c29615589489daf4ea635
Author: Dan Klco <dk...@apache.org>
AuthorDate: Thu Aug 27 08:45:16 2020 -0400

    Fixing an issue where the page editor buttons weren't opening in a modal
---
 .../components/cms/pageeditbar/actions/actions.jsp | 30 ++++------------------
 1 file changed, 5 insertions(+), 25 deletions(-)

diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/pageeditbar/actions/actions.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/pageeditbar/actions/actions.jsp
index 91042ca..907c96b 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/pageeditbar/actions/actions.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/pageeditbar/actions/actions.jsp
@@ -17,29 +17,9 @@
  * under the License.
  */ --%>
 <%@include file="/libs/sling-cms/global.jsp"%>
-<c:forEach var="actionConfig" items="${sling:listChildren(resource)}">
-    <c:choose>
-        <c:when test="${actionConfig.valueMap.modal}">
-            <div class="control">
-                <a class="button Fetch-Modal" data-title="${sling:encode(actionConfig.valueMap.title,'HTML_ATTR')}" data-path="${actionConfig.valueMap.ajaxPath != null ? actionConfig.valueMap.ajaxPath : '.Main-Content form'}" href="${sling:encode(actionConfig.valueMap.prefix,'HTML_ATTR')}${sling:encode(slingRequest.requestPathInfo.suffix,'HTML_ATTR')}" title="${sling:encode(actionConfig.valueMap.title,'HTML_ATTR')}">
-                    <span class="jam jam-${actionConfig.valueMap.icon}">
-                        <span class="is-vhidden">
-                            ${sling:encode(actionConfig.valueMap.title,'HTML')}
-                        </span>
-                    </span>
-                </a>
-            </div>
-        </c:when>
-        <c:otherwise>
-            <div class="control">
-                <a class="button" ${actionConfig.valueMap.new != false ? 'target="_blank"' : ''} href="${sling:encode(actionConfig.valueMap.prefix,'HTML_ATTR')}${sling:encode(slingRequest.requestPathInfo.suffix,'HTML_ATTR')}" title="${sling:encode(actionConfig.valueMap.title,'HTML_ATTR')}">
-                    <span class="jam jam-${actionConfig.valueMap.icon}">
-                        <span class="is-vhidden">
-                            ${sling:encode(actionConfig.valueMap.title,'HTML')}
-                        </span>
-                    </span>
-                </a>
-            </div>
-        </c:otherwise>
-    </c:choose>
+<c:forEach var="actionCfg" items="${sling:listChildren(resource)}">
+    <c:set var="actionConfig" value="${actionCfg}" scope="request" />
+    <div class="control">
+        <sling:include path="${request.requestPathInfo.suffix}" resourceType="${actionConfig.resourceType}" />
+    </div>
 </c:forEach>
\ No newline at end of file