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

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

commit 6a1a18fc52c923f4995eca8966ee8dd33af271b9
Author: Dan Klco <[email protected]>
AuthorDate: Wed Aug 29 19:50:56 2018 -0400

    Updating to show indicators on the tables and removing the unneeded table 
sorting code
---
 ui/src/main/frontend/src/js/scripts.js             | 24 ++++------
 ui/src/main/frontend/src/scss/styles.scss          | 53 +++++++++-------------
 .../components/cms/columns/actions/actions.jsp     |  6 +--
 .../cms/columns/lastmodified/lastmodified.jsp      |  2 +-
 .../cms/columns/localetitle/localetitle.jsp        |  2 +-
 .../sling-cms/components/cms/columns/name/name.jsp |  2 +-
 .../components/cms/columns/publish/publish.jsp     |  2 +-
 .../components/cms/columns/static/static.jsp       |  2 +-
 .../sling-cms/components/cms/columns/text/text.jsp |  2 +-
 .../components/cms/contenttable/contenttable.jsp   |  8 ++--
 .../components/cms/pageeditbar/actions/actions.jsp |  2 +-
 .../editor/fields/references/references.jsp        |  4 +-
 12 files changed, 45 insertions(+), 64 deletions(-)

diff --git a/ui/src/main/frontend/src/js/scripts.js 
b/ui/src/main/frontend/src/js/scripts.js
index 61752e1..1fc36be 100644
--- a/ui/src/main/frontend/src/js/scripts.js
+++ b/ui/src/main/frontend/src/js/scripts.js
@@ -38,21 +38,14 @@ Sling.CMS = {
                        Sling.CMS.decorate($(document));
                },
                ui: {
-                       alert: function(level, message){
-                               $alert = $('<div class="Alert 
Alert-'+level+'">'+message+'</div>');
-                               $('.main').prepend($alert);
-                               setTimeout(function(){
-                                       $alert.remove();
-                               }, 10000);
-                               window.scrollTo(0, 0);
-                       },
-                       confirmMessage: function(title, message, cb){
+                       confirmMessage: function(title, message, complete){
                                var $modal = $('<div class="modal"><div 
class="modal-background"></div><div class="modal-card"><div 
class="modal-card-head Draggable">'+title+'</div><div 
class="modal-card-body">'+message+'</div><div class="modal-card-foot"><button 
type="button" class="close-modal button is-primary">OK</button></div></div>');
                                $('body').append($modal);
                                $modal.addClass('is-active');
                                $modal.find('.close-modal').click(function(){
                                        $modal.css('display','none').remove();
-                                       cb();
+                                       Sling.CMS.decorate($modal);
+                                       complete();
                                });
                                return $modal;
                        },
@@ -65,6 +58,7 @@ Sling.CMS = {
                                                
$modal.css('display','none').remove();
                                                return false;
                                        });
+                                       Sling.CMS.decorate($modal);
                                        complete();
                                });
                                return $modal;
@@ -211,7 +205,7 @@ Sling.CMS = {
 
                                  // mouse button down over the element
                                element.addEventListener('mousedown', 
function(evt){
-                                       
if(document.querySelector('.Modal-Body').contains(evt.target)){
+                                       
if(document.querySelector('.modal-card-body').contains(evt.target)){
                                                return;
                                        }
                                        mouseX = evt.clientX;
@@ -241,10 +235,10 @@ Sling.CMS = {
                                });
                                
                        };
-                       if($ctx.is('.Draggable')){
+                       if($ctx.is('.is-draggable')){
                                $ctx.each(draggable)
                        }
-                       $ctx.find('.Draggable').each(draggable);
+                       $ctx.find('.is-draggable').each(draggable);
                }
        };
        
@@ -473,10 +467,10 @@ Sling.CMS = {
        Sling.CMS.ext['table'] = {
                decorate: function($ctx) {
                        $ctx.find('table tbody tr').click(function(el){
-                               $('#Actions-Target > 
*').appendTo('tr.is-selected .Cell-Actions')
+                               $('#Actions-Target > 
*').appendTo('tr.is-selected .cell-actions')
                                $('tr').removeClass('is-selected');
                                $(this).addClass('is-selected');
-                               $(this).find('.Cell-Actions > 
*').appendTo('#Actions-Target')
+                               $(this).find('.cell-actions > 
*').appendTo('#Actions-Target')
                        });
                }
        };
diff --git a/ui/src/main/frontend/src/scss/styles.scss 
b/ui/src/main/frontend/src/scss/styles.scss
index c56b4a1..da1ba85 100644
--- a/ui/src/main/frontend/src/scss/styles.scss
+++ b/ui/src/main/frontend/src/scss/styles.scss
@@ -15,48 +15,37 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- */ 
- 
- 
+ */
 
-.autocomplete-suggestion b {
-       color: #00678c;
-}
-.Hide {
-       display:none;
-}
-
-.note-group-select-from-files {
-  display: none;
-}
-
-.note-toolbar-wrapper {
-    height: auto !important;
+table.dataTable thead .sorting:after,
+table.dataTable thead .sorting_asc:after,
+table.dataTable thead .sorting_desc:after,
+table.dataTable thead .sorting_asc_disabled:after,
+table.dataTable thead .sorting_desc_disabled:after {
+       font-family: 'jam-icons';
 }
 
-.Preview {
-       max-width: 100%;
-       padding:.5em;
+table.dataTable thead .sorting:after {
+       content: "\e943"
 }
 
-.Pull-Right {
-       float:right;
+table.dataTable thead .sorting_asc:after {
+       content: "\e93f"
 }
 
-.Search-Result {
-    padding: .1em;
+table.dataTable thead .sorting_desc:after {
+       content: "\e92a"
 }
 
-.Search-Result h4 {
-       margin-bottom: 0;
+.note-group-select-from-files {
+       display: none;
 }
 
-.Search-Result small {
-       font-size: x-small;
+.note-toolbar-wrapper {
+       height: auto !important;
 }
 
-.Search-Result__Container {
-    border: 1px solid #ccc;
-    background-color: #f9f9f9;
-    padding: .5em;
-}
+.Preview {
+       max-width: 100%;
+       padding: .5em;
+}
\ No newline at end of file
diff --git 
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/actions/actions.jsp
 
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/actions/actions.jsp
index 6c6c9cf..b1e51fb 100644
--- 
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/actions/actions.jsp
+++ 
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/actions/actions.jsp
@@ -17,17 +17,17 @@
  * under the License.
  */ --%>
 <%@include file="/libs/sling-cms/global.jsp"%>
-<td class="Cell-Actions Hide">
+<td class="is-hidden cell-actions">
        <c:forEach var="actionConfig" items="${sling:listChildren(colConfig)}">
                <c:choose>
                        <c:when test="${actionConfig.valueMap.modal}">
-                               <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="${actionConfig.valueMap.prefix}${resource.path}" 
title="${sling:encode(actionConfig.valueMap.title,'HTML_ATTR')}">
+                               <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="${actionConfig.valueMap.prefix}${resource.path}" 
title="${sling:encode(actionConfig.valueMap.title,'HTML_ATTR')}">
                                        <span class="jam 
jam-${actionConfig.valueMap.icon}">
                                        </span>
                                </a>
                        </c:when>
                        <c:otherwise>
-                               <a class="Button" ${actionConfig.valueMap.new 
!= false ? 'target="_blank"' : ''} 
href="${actionConfig.valueMap.prefix}${resource.path}" 
title="${sling:encode(actionConfig.valueMap.title,'HTML_ATTR')}">
+                               <a class="button" ${actionConfig.valueMap.new 
!= false ? 'target="_blank"' : ''} 
href="${actionConfig.valueMap.prefix}${resource.path}" 
title="${sling:encode(actionConfig.valueMap.title,'HTML_ATTR')}">
                                        <span class="jam 
jam-${actionConfig.valueMap.icon}">
                                        </span>
                                </a>
diff --git 
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/lastmodified/lastmodified.jsp
 
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/lastmodified/lastmodified.jsp
index 7237015..2811532 100644
--- 
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/lastmodified/lastmodified.jsp
+++ 
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/lastmodified/lastmodified.jsp
@@ -21,7 +21,7 @@
 <c:set var="modifiedByProperty" 
value="${colConfig.valueMap.subPath}jcr:lastModifiedBy" />
 <fmt:formatDate var="lastModified" type = "both"  dateStyle = "medium" 
timeStyle = "medium" value="${resource.valueMap[modifiedProperty].time}" />
 <c:set var="colValue" value="${lastModified} - 
${resource.valueMap[modifiedByProperty]}" />
-<td class="Cell-Static" title="${sling:encode(colValue,'HTML_ATTR')}">
+<td title="${sling:encode(colValue,'HTML_ATTR')}">
        <sling:encode value="${lastModified}" mode="HTML" /><br/>
        <sling:encode value="${resource.valueMap[modifiedByProperty]}" 
mode="HTML" />
 </td>
\ No newline at end of file
diff --git 
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/localetitle/localetitle.jsp
 
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/localetitle/localetitle.jsp
index 513b2c8..0379752 100644
--- 
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/localetitle/localetitle.jsp
+++ 
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/localetitle/localetitle.jsp
@@ -18,6 +18,6 @@
  */ --%>
 <%@include file="/libs/sling-cms/global.jsp"%>
 <sling:adaptTo adaptable="${resource}" 
adaptTo="org.apache.sling.cms.core.models.LocaleResource" var="localeResource" 
/>
-<td class="Cell-Static" 
title="${sling:encode(localeResource.locale.displayLanguage,'HTML_ATTR')} 
${sling:encode(localeResource.locale.displayCountry,'HTML_ATTR')}" 
data-value="${localeResource.locale}">
+<td title="${sling:encode(localeResource.locale.displayLanguage,'HTML_ATTR')} 
${sling:encode(localeResource.locale.displayCountry,'HTML_ATTR')}" 
data-value="${localeResource.locale}">
        ${localeResource.locale.displayLanguage} 
${localeResource.locale.displayCountry}
 </td>
\ No newline at end of file
diff --git 
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/name/name.jsp
 
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/name/name.jsp
index 0016ef0..67dfbd9 100644
--- 
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/name/name.jsp
+++ 
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/name/name.jsp
@@ -17,7 +17,7 @@
  * under the License.
  */ --%>
 <%@include file="/libs/sling-cms/global.jsp"%>
-<td class="Cell-Name">
+<td>
        <c:set var="colValue" value="${resource.name}" />
        <c:choose>
                <c:when test="${colConfig.valueMap.link}">
diff --git 
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/publish/publish.jsp
 
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/publish/publish.jsp
index c771788..5cd65d7 100644
--- 
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/publish/publish.jsp
+++ 
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/publish/publish.jsp
@@ -20,7 +20,7 @@
 <td 
data-value="${sling:getRelativeResource(resource,'jcr:content').valueMap.published
 ? 0 : 1}">
        <c:choose>
                <c:when 
test="${sling:getRelativeResource(resource,'jcr:content').valueMap.published}">
-                       <a class="button is-success is-outlined  Fetch-Modal"  
href="/cms/shared/unpublish.html${resource.path}" title="Content Published" 
data-title="Unpublish" data-path=".Main-Content form">
+                       <a class="button is-success is-outlined Fetch-Modal"  
href="/cms/shared/unpublish.html${resource.path}" title="Content Published" 
data-title="Unpublish" data-path=".Main-Content form">
                                <i class="jam jam-check"></i>
                        </a>
                </c:when>
diff --git 
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/static/static.jsp
 
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/static/static.jsp
index 484c5b7..c1e8d35 100644
--- 
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/static/static.jsp
+++ 
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/static/static.jsp
@@ -18,6 +18,6 @@
  */ --%>
 <%@include file="/libs/sling-cms/global.jsp"%>
 <c:set var="colValue" value="${colConfig.valueMap.value}" />
-<td class="Cell-Static" title="${sling:encode(colValue,'HTML_ATTR')}">
+<td title="${sling:encode(colValue,'HTML_ATTR')}">
        <sling:encode value="${colValue}" mode="HTML" />
 </td>
\ No newline at end of file
diff --git 
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/text/text.jsp
 
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/text/text.jsp
index 80b0222..4d95777 100644
--- 
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/text/text.jsp
+++ 
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/text/text.jsp
@@ -18,7 +18,7 @@
  */ --%>
 <%@include file="/libs/sling-cms/global.jsp"%>
 <c:set var="colValue" 
value="${resource.valueMap[colConfig.valueMap.property]}" />
-<td class="Cell-Text" title="${sling:encode(colValue,'HTML_ATTR')}">
+<td title="${sling:encode(colValue,'HTML_ATTR')}">
        <c:choose>
                <c:when test="${colConfig.valueMap.link}">
                        <a href="${colConfig.valueMap.prefix}${resource.path}">
diff --git 
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contenttable/contenttable.jsp
 
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contenttable/contenttable.jsp
index ef4c5ba..f5bad46 100644
--- 
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contenttable/contenttable.jsp
+++ 
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contenttable/contenttable.jsp
@@ -17,17 +17,15 @@
  * under the License.
  */ --%>
  <%@include file="/libs/sling-cms/global.jsp"%>
-<table class="sortable table is-fullwidth is-striped">
+<table class="table is-fullwidth is-striped">
     <thead>
         <tr>
-            <th class="sortable__header Col-id" data-attribute="id">
+            <th>
                 #
-                <span class="sortable__indicator"></span>
             </th>
             <c:forEach var="column" 
items="${sling:listChildren(sling:getRelativeResource(resource,'columns'))}">
-                <th class="${column.name == 'actions' ? 'Hide' : '' } 
sortable__header Col-${column.name}" data-attribute="${column.name}">
+                <th class="${column.name == 'actions' ? 'is-hidden' : '' }" 
data-attribute="${column.name}">
                     <sling:encode value="${column.valueMap.title}" mode="HTML" 
/>
-                    <span class="sortable__indicator"></span>
                 </th>
             </c:forEach>
         </tr>
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 edda636..c8ad8e3 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,7 +17,7 @@
  * under the License.
  */ --%>
 <%@include file="/libs/sling-cms/global.jsp"%>
-<div class="Pull-Right">
+<div class="is-pulled-right">
        <c:forEach var="actionConfig" items="${sling:listChildren(resource)}">
                <c:choose>
                        <c:when test="${actionConfig.valueMap.modal}">
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 290e267..ffc53f3 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
@@ -37,13 +37,13 @@
                                        Replacement Path
                                </label>
                                <div class="Field-Input">
-                                       <input type="text" name=":dest" 
class="Field-Path" />
+                                       <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" />
-               <ul style="max-height: 200px; overflow:auto">
+               <ul class="box">
                        <c:forEach var="ref" items="${references.references}">
                                <li>${ref}</li>
                        </c:forEach>

Reply via email to