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 50f72ca Updating the look and feel of the delete, move and template
editor dialogs
50f72ca is described below
commit 50f72ca48d114310623d7bf47ba2f61c5bc21ed6
Author: Dan Klco <[email protected]>
AuthorDate: Thu Sep 6 08:49:19 2018 -0400
Updating the look and feel of the delete, move and template editor
dialogs
---
ui/src/main/frontend/src/js/cms.js | 2 +-
ui/src/main/frontend/src/scss/cms.scss | 9 ++---
.../availablecomponenttypes.jsp | 4 +--
.../components/cms/includeconfig/includeconfig.jsp | 2 +-
.../components/editor/fields/button/button.jsp | 2 +-
.../editor/fields/references/references.jsp | 39 ++++++++++++----------
.../editor/fields/suffixlabel/suffixlabel.jsp | 2 +-
.../libs/sling-cms/content/shared/delete.json | 2 +-
8 files changed, 33 insertions(+), 29 deletions(-)
diff --git a/ui/src/main/frontend/src/js/cms.js
b/ui/src/main/frontend/src/js/cms.js
index 0688808..97a9533 100644
--- a/ui/src/main/frontend/src/js/cms.js
+++ b/ui/src/main/frontend/src/js/cms.js
@@ -234,7 +234,7 @@ Sling.CMS = {
Sling.CMS.ext['includeconfig'] = {
decorate: function($ctx){
- $ctx.find('.Sling-CMS__include-config').each(function(){
+ $ctx.find('.sling-cms-include-config').each(function(){
var $ctr = $(this);
var load = function(){
var config =
$($ctr.data('source')).find('option:selected').data('config');
diff --git a/ui/src/main/frontend/src/scss/cms.scss
b/ui/src/main/frontend/src/scss/cms.scss
index 6e34ac1..3c57f91 100644
--- a/ui/src/main/frontend/src/scss/cms.scss
+++ b/ui/src/main/frontend/src/scss/cms.scss
@@ -55,10 +55,6 @@ h5 {
position: relative;
}
-.is-padded {
- padding: 1em 0;
-}
-
.menu-label {
text-transform: none;
font-size: 1.25em;
@@ -73,6 +69,11 @@ h5 {
height: auto !important;
}
+.reference-list {
+ max-height: 200px;
+ overflow: auto;
+}
+
.Preview {
max-width: 100%;
padding: .5em;
diff --git
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/availablecomponenttypes/availablecomponenttypes.jsp
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/availablecomponenttypes/availablecomponenttypes.jsp
index 44cfd1c..d4b8b96 100644
---
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/availablecomponenttypes/availablecomponenttypes.jsp
+++
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/availablecomponenttypes/availablecomponenttypes.jsp
@@ -17,11 +17,11 @@
* under the License.
*/ --%>
<%@include file="/libs/sling-cms/global.jsp"%>
-<div class="field-container">
+<div class="field">
<label for="availableComponentTypes">
Available Component Types
</label>
- <div class="field">
+ <div class="control">
<c:set var="currentTypes"
value="|${fn:join(slingRequest.requestPathInfo.suffixResource.valueMap.availableComponentTypes,
'|')}|"/>
<sling:adaptTo var="componentManager"
adaptable="${resourceResolver}"
adaptTo="org.apache.sling.cms.core.models.ComponentManager" />
<c:forEach var="type"
items="${componentManager.componentTypes}">
diff --git
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/includeconfig/includeconfig.jsp
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/includeconfig/includeconfig.jsp
index 05264d4..f62ab8e 100644
---
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/includeconfig/includeconfig.jsp
+++
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/includeconfig/includeconfig.jsp
@@ -17,5 +17,5 @@
* under the License.
*/ --%>
<%@include file="/libs/sling-cms/global.jsp"%>
-<div class="Sling-CMS__include-config" data-path="${resource.path}.html"
data-source="select[name=type]">
+<div class="sling-cms-include-config field" data-path="${resource.path}.html"
data-source="select[name=type]">
</div>
\ No newline at end of file
diff --git
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/button/button.jsp
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/button/button.jsp
index 5fc3172..69d32c2 100644
---
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/button/button.jsp
+++
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/button/button.jsp
@@ -17,6 +17,6 @@
* under the License.
*/ --%>
<%@include file="/libs/sling-cms/global.jsp"%>
-<div class="control">
+<div class="field">
<button class="button"
onclick="${properties.onclick}">${sling:encode(properties.label,'HTML')}</button>
</div>
\ No newline at end of file
diff --git
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/references/references.jsp
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/references/references.jsp
index 25f7e02..560e672 100644
---
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/references/references.jsp
+++
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/references/references.jsp
@@ -21,30 +21,33 @@
<sling:getResource path="${slingRequest.requestPathInfo.suffix}"
var="editedResource" />
<c:set var="editProperties"
value="${sling:adaptTo(editedResource,'org.apache.sling.api.resource.ValueMap')}"
scope="request"/>
</c:if>
-<div class="Field-Group ${properties.toggle ? 'is-hidden toggle-value' : ''}"
data-toggle-source=":operation" data-toggle-value="move">
- <div class="Field-Input">
- <label class="checkbox">
- <sling:encode value="${properties.label}" mode="HTML" />
- <input type="checkbox" name="${properties.name}"
value="true" />
- </label>
+
+<sling:adaptTo var="references"
adaptable="${slingRequest.requestPathInfo.suffixResource}"
adaptTo="org.apache.sling.cms.core.models.References" />
+<c:if test="${fn:length(references.references) gt 0}">
+ <div class="box field ${properties.toggle ? 'is-hidden toggle-value' :
''}" data-toggle-source=":operation" data-toggle-value="move">
+ <div class="field">
+ <label class="checkbox">
+ <input type="checkbox"
name="${properties.name}" value="true" />
+ <sling:encode value="${properties.label}"
mode="HTML" />
+ </label>
+ </div>
+ <div class="reference-list field">
+ <ul>
+ <c:forEach var="ref"
items="${references.references}">
+ <li>${ref}</li>
+ </c:forEach>
+ </ul>
+ </div>
+
<c:if test="${properties.includeDestination}">
- <div class="Field-Group">
+ <div class="field">
<label for=":dest">
Replacement Path
</label>
- <div class="Field-Input">
+ <div class="control">
<input type="text" name=":dest"
class="pathfield input" />
</div>
</div>
</c:if>
-
- <sling:adaptTo var="references"
adaptable="${slingRequest.requestPathInfo.suffixResource}"
adaptTo="org.apache.sling.cms.core.models.References" />
- <div class="is-padded">
- <ul>
- <c:forEach var="ref"
items="${references.references}">
- <li>${ref}</li>
- </c:forEach>
- </ul>
- </div>
</div>
-</div>
\ No newline at end of file
+</c:if>
\ No newline at end of file
diff --git
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/suffixlabel/suffixlabel.jsp
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/suffixlabel/suffixlabel.jsp
index f52e321..0bbef4a 100644
---
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/suffixlabel/suffixlabel.jsp
+++
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/suffixlabel/suffixlabel.jsp
@@ -17,7 +17,7 @@
* under the License.
*/ --%>
<%@include file="/libs/sling-cms/global.jsp"%>
-<div class="Field-Group">
+<div class="field">
<sling:encode value="${properties.label}" mode="HTML" /><br/>
<sling:encode value="${slingRequest.requestPathInfo.suffix}"
mode="HTML" /><br/>
</div>
\ No newline at end of file
diff --git
a/ui/src/main/resources/jcr_root/libs/sling-cms/content/shared/delete.json
b/ui/src/main/resources/jcr_root/libs/sling-cms/content/shared/delete.json
index 27c13a9..6b9b365 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/shared/delete.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/shared/delete.json
@@ -35,7 +35,7 @@
"jcr:primaryType":
"nt:unstructured",
"sling:resourceType":
"sling-cms/components/editor/fields/references",
"includeDestination": true,
- "label": "The following content
references this path, update references?",
+ "label": "Update references?",
"name": ":updateReferences"
}
}