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/12/23 21:07:00 UTC
[sling-org-apache-sling-app-cms] branch master updated: Fixes
SLING-8952: Using tags instead of buttons for the labelfield
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
The following commit(s) were added to refs/heads/master by this push:
new d69d589 Fixes SLING-8952: Using tags instead of buttons for the labelfield
d69d589 is described below
commit d69d5896e52e4caf800beb4c45f966aa16e9a29b
Author: Dan Klco <dk...@apache.org>
AuthorDate: Mon Dec 23 16:06:47 2019 -0500
Fixes SLING-8952: Using tags instead of buttons for the labelfield
---
ui/src/main/frontend/js/cms.labelfield.js | 1 +
.../sling-cms/components/editor/fields/auth/members/values.jsp | 6 +++---
.../sling-cms/components/editor/fields/auth/membership/values.jsp | 6 +++---
.../libs/sling-cms/components/editor/fields/labelfield/field.jsp | 8 ++++----
.../libs/sling-cms/components/editor/fields/taxonomy/values.jsp | 6 +++---
5 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/ui/src/main/frontend/js/cms.labelfield.js b/ui/src/main/frontend/js/cms.labelfield.js
index 4a28cd6..367ef10 100644
--- a/ui/src/main/frontend/js/cms.labelfield.js
+++ b/ui/src/main/frontend/js/cms.labelfield.js
@@ -38,6 +38,7 @@ rava.bind('.labelfield', {
return;
}
span.querySelector('input').value = val;
+ span.querySelector('.labelfield__item').title = val;
if (title !== '') {
span.querySelector('.labelfield__title').innerText = title;
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/auth/members/values.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/auth/members/values.jsp
index ddce705..d1e0d91 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/auth/members/values.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/auth/members/values.jsp
@@ -19,11 +19,11 @@
<%@include file="/libs/sling-cms/global.jsp"%>
<sling:adaptTo var="auth" adaptable="${slingRequest.requestPathInfo.suffixResource}" adaptTo="org.apache.sling.cms.AuthorizableWrapper" />
<c:forEach var="member" items="${auth.declaredMembers}">
- <a class="button labelfield__item">
+ <a class="tag labelfield__item" title="${member.path}">
<input type="hidden" name="${properties.name}" value="${member.path}" />
<span class="labelfield__title">
${sling:encode(member,'HTML')}
</span>
- <span class="jam jam-close"></span>
+ <button class="delete is-small"></button>
</a>
-</c:forEach>
\ No newline at end of file
+</c:forEach>
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/auth/membership/values.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/auth/membership/values.jsp
index 7ccba05..f14bfb4 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/auth/membership/values.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/auth/membership/values.jsp
@@ -19,11 +19,11 @@
<%@include file="/libs/sling-cms/global.jsp"%>
<sling:adaptTo var="auth" adaptable="${slingRequest.requestPathInfo.suffixResource}" adaptTo="org.apache.sling.cms.AuthorizableWrapper" />
<c:forEach var="group" items="${auth.declaredMembership}">
- <a class="button labelfield__item">
+ <a class="tag labelfield__item" title="${group.path}">
<input type="hidden" name="${properties.name}" value="${group.path}" />
<span class="labelfield__title">
${sling:encode(group,'HTML')}
</span>
- <span class="jam jam-close"></span>
+ <button class="delete is-small"></button>
</a>
-</c:forEach>
\ No newline at end of file
+</c:forEach>
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/labelfield/field.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/labelfield/field.jsp
index 13a3e6a..70a1c23 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/labelfield/field.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/labelfield/field.jsp
@@ -19,11 +19,11 @@
<%@include file="/libs/sling-cms/global.jsp"%>
<div class="labelfield">
<fieldset disabled="disabled" class="labelfield__template is-hidden">
- <a class="button labelfield__item">
+ <a class="tag labelfield__item" title="">
<input type="hidden" name="${properties.name}" value="" />
<span class="labelfield__title">
</span>
- <span class="jam jam-close"></span>
+ <button class="delete is-small"></button>
</a>
</fieldset>
<div class="labelfield__field field has-addons">
@@ -40,10 +40,10 @@
</button>
</div>
</div>
- <div class="labelfield__container">
+ <div class="labelfield__container tags are-large">
<sling:call script="values.jsp" />
</div>
<sling:call script="options" />
<input type="hidden" name="${properties.name}@TypeHint" value="String[]"/>
<input type="hidden" name="${properties.name}@Delete" value="delete" />
-</div>
\ No newline at end of file
+</div>
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/taxonomy/values.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/taxonomy/values.jsp
index 80326fa..14afc7d 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/taxonomy/values.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/taxonomy/values.jsp
@@ -18,11 +18,11 @@
*/ --%>
<%@include file="/libs/sling-cms/global.jsp"%>
<c:forEach var="item" items="${value}">
- <a class="button labelfield__item">
+ <a class="tag labelfield__item" title="${item}">
<input type="hidden" name="${properties.name}" value="${item}" />
<span class="labelfield__title">
${sling:encode(sling:getResource(resourceResolver,item).valueMap['jcr:title'],'HTML')}
</span>
- <span class="jam jam-close"></span>
+ <button class="delete is-small"></button>
</a>
-</c:forEach>
\ No newline at end of file
+</c:forEach>