This is an automated email from the ASF dual-hosted git repository.
jeb pushed a commit to branch SLING-7858
in repository
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git
The following commit(s) were added to refs/heads/SLING-7858 by this push:
new b303ffc dataTable added, adjustments to layout, validating
functionality
b303ffc is described below
commit b303ffccd744672b636fcea753d157734d640ed1
Author: JE Bailey <[email protected]>
AuthorDate: Wed Aug 29 11:45:40 2018 -0400
dataTable added, adjustments to layout, validating functionality
---
ui/src/main/frontend/gulpfile.js | 2 ++
ui/src/main/frontend/package.json | 6 ++++--
ui/src/main/frontend/src/js/scripts.js | 6 +++---
ui/src/main/frontend/src/scss/bulma.scss | 1 +
.../cms/contentbreadcrumb/contentbreadcrumb.jsp | 6 ------
.../components/cms/contentnav/contentnav.jsp | 2 +-
.../sling-cms/components/cms/staticnav/staticnav.jsp | 2 +-
.../components/editor/fields/button/button.jsp | 4 ++--
.../sling-cms/components/editor/fields/path/path.jsp | 4 ++--
.../components/editor/fields/select/field.jsp | 6 ++++--
.../libs/sling-cms/components/pages/base/body.jsp | 19 +++++++++----------
.../libs/sling-cms/components/pages/base/scripts.jsp | 8 +++++++-
12 files changed, 36 insertions(+), 30 deletions(-)
diff --git a/ui/src/main/frontend/gulpfile.js b/ui/src/main/frontend/gulpfile.js
index a530800..2391fbb 100755
--- a/ui/src/main/frontend/gulpfile.js
+++ b/ui/src/main/frontend/gulpfile.js
@@ -70,6 +70,8 @@ gulp.task('styles', function() {
gulp.task('js', function() {
return gulp.src([
'./node_modules/jquery/dist/jquery.js',
+
'./node_modules/datatables/media/js/jquery.dataTables.js',
+
'./node_modules/datatables-bulma/js/dataTables.bulma.js',
'./node_modules/handlebars/dist/handlebars.js',
'./node_modules/summernote/dist/summernote-lite.js',
'./node_modules/js-autocomplete/auto-complete.js',
diff --git a/ui/src/main/frontend/package.json
b/ui/src/main/frontend/package.json
index db2f09d..27190df 100644
--- a/ui/src/main/frontend/package.json
+++ b/ui/src/main/frontend/package.json
@@ -11,7 +11,8 @@
"handlebars": "^4.0.11",
"summernote": "^0.8.9",
"jam-icons": "^2.0.0",
- "js-autocomplete": "^1.0.4"
+ "js-autocomplete": "^1.0.4",
+ "datatables": "^1.10.18"
},
"devDependencies": {
"gulp": "^3.9.1",
@@ -24,7 +25,8 @@
"gulp-sourcemaps": "^2.6.4",
"streamqueue": "^1.1.2",
"uglify-save-license": "^0.4.1",
- "bulma": "^0.7.1",
+ "bulma": "^0.7.1",
+ "datatables-bulma": "^1.0.1",
"node-sass": "^4.9.2"
},
"license": "Apache-2.0"
diff --git a/ui/src/main/frontend/src/js/scripts.js
b/ui/src/main/frontend/src/js/scripts.js
index ee25cd0..2c381b9 100644
--- a/ui/src/main/frontend/src/js/scripts.js
+++ b/ui/src/main/frontend/src/js/scripts.js
@@ -57,10 +57,10 @@ Sling.CMS = {
return $modal;
},
fetchModal: function(title, link, path, complete){
- var $modal = $('<div class="modal"><div
class="modal-background"></div><div class="modal-card Draggable"><div
class="modal-card-head">'+title+'<button type="button"
class="modal-close">x</button></div><div
class="modal-card-body""></div></div>');
+ var $modal = $('<div class="modal"><div
class="modal-background"></div><div class="modal-card Draggable"><div
class="modal-card-head">'+title+'<button type="button"
class="modal-close"></button></div><div class="modal-card-body""></div><div
class="modal-card-foot"></div></div>');
$('body').append($modal);
- $modal.addClass('is-active');
$modal.find('.modal-card-body').load(link + " "
+path,function(){
+ $modal.addClass('is-active');
$modal.find('.modal-close').click(function(){
$modal.css('display','none').remove();
return false;
@@ -472,7 +472,7 @@ Sling.CMS = {
Sling.CMS.ext['table'] = {
decorate: function($ctx) {
- $ctx.find('table tr').click(function(el){
+ $ctx.find('table tbody tr').click(function(el){
$('#Actions-Target >
*').appendTo('tr.is-selected .Cell-Actions')
$('tr').removeClass('is-selected');
$(this).addClass('is-selected');
diff --git a/ui/src/main/frontend/src/scss/bulma.scss
b/ui/src/main/frontend/src/scss/bulma.scss
index 33790c6..945acb8 100644
--- a/ui/src/main/frontend/src/scss/bulma.scss
+++ b/ui/src/main/frontend/src/scss/bulma.scss
@@ -19,3 +19,4 @@ $navbar-height: 5rem;
$navbar-item-img-max-height: 4rem;
@import "../../node_modules/bulma/bulma.sass";
+@import "../../node_modules/datatables-bulma/css/dataTables.bulma.css";
\ No newline at end of file
diff --git
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/contentbreadcrumb.jsp
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/contentbreadcrumb.jsp
index 1c31382..18212b7 100644
---
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/contentbreadcrumb.jsp
+++
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/contentbreadcrumb.jsp
@@ -42,10 +42,4 @@
</li>
</c:if>
</ul>
-<a href="#">
-<form method="get" class="content-filter">
- <label for="filter" class="Hide">Filter</label>
- <input type="text" placeholder="Filter..." />
-</form>
-</a>
</nav>
diff --git
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentnav/contentnav.jsp
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentnav/contentnav.jsp
index f950ca1..dfb8a8b 100644
---
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentnav/contentnav.jsp
+++
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentnav/contentnav.jsp
@@ -18,7 +18,7 @@
*/ --%>
<%@include file="/libs/sling-cms/global.jsp"%>
<sling:findResources var="content" query="${properties.query}"
language="JCR-SQL2" />
-<aside class="container is-fluid menu">
+<aside class="menu">
<a class="menu-label Toggle-Hidden"
data-target="#Nav-${fn:replace(properties.title,'
','-')}">${properties.title}</a>
<ul class="menu-list ${fn:startsWith(slingRequest.requestURI,
properties.prefix) ? '' : 'Hide'}" id="Nav-${fn:replace(properties.title,'
','-')}">
<c:forEach var="item" items="${content}">
diff --git
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/staticnav/staticnav.jsp
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/staticnav/staticnav.jsp
index 14fc237..082ec53 100644
---
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/staticnav/staticnav.jsp
+++
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/staticnav/staticnav.jsp
@@ -17,7 +17,7 @@
* under the License.
*/ --%>
<%@include file="/libs/sling-cms/global.jsp"%>
-<div class="container is-fluid menu">
+<div class="menu">
<a class="menu-label Toggle-Hidden"
data-target="#${fn:replace(properties.title,'
','-')}-Nav">${properties.title}</a>
<c:set var="hidden" value="Hide" />
<c:forEach var="item"
items="${sling:listChildren(sling:getRelativeResource(resource,'links'))}">
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 1c9974d..5fc3172 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="Field-Group">
- <button
onclick="${properties.onclick}">${sling:encode(properties.label,'HTML')}</button>
+<div class="control">
+ <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/path/path.jsp
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/path/path.jsp
index 9209777..133abe9 100644
---
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/path/path.jsp
+++
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/path/path.jsp
@@ -47,7 +47,7 @@
<c:choose>
<c:when test="${properties.hidesearch != true}">
<div class="control">
- <input class="Field-Path input" type="text"
name="${properties.name}" value="${editProperties[properties.name]}"
${required} ${disabled} data-type="${properties.type}"
data-base="${properties.basePath}" autocomplete="off" />
+ <input class="input" type="text" name="${properties.name}"
value="${editProperties[properties.name]}" ${required} ${disabled}
data-type="${properties.type}" data-base="${properties.basePath}"
autocomplete="off" />
</div>
<div class="control">
<a href="/cms/shared/search.html" class="Button Fetch-Modal
Search-Button" data-title="Search" data-path=".Main-Content > .Grid > .Cell >
*">
@@ -57,7 +57,7 @@
</c:when>
<c:otherwise>
<div class="control">
- <input class="Field-Path" type="text" name="${properties.name}"
value="${editProperties[properties.name]}" ${required} ${disabled}
data-type="${properties.type}" data-base="${properties.basePath}"
autocomplete="off" />
+ <input class="input" type="text" name="${properties.name}"
value="${editProperties[properties.name]}" ${required} ${disabled}
data-type="${properties.type}" data-base="${properties.basePath}"
autocomplete="off" />
</div>
</c:otherwise>
</c:choose>
diff --git
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/select/field.jsp
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/select/field.jsp
index fda824a..e70b686 100644
---
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/select/field.jsp
+++
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/select/field.jsp
@@ -20,7 +20,8 @@
<c:if test="${properties.multiple == true}">
<c:set var="multiple" value="multiple = \"multiple\"" />
</c:if>
-<select class="form-control" class="select" name="${properties.name}"
${required} ${disabled} ${multiple}>
+<div class="select">
+<select name="${properties.name}" ${required} ${disabled} ${multiple}>
<c:choose>
<c:when test="${not empty properties.options}">
<c:forEach var="option" items="${properties.options}">
@@ -54,4 +55,5 @@
<sling:call script="${properties.optionsScript}" />
</c:when>
</c:choose>
-</select>
\ No newline at end of file
+</select>
+</div>
\ No newline at end of file
diff --git
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/body.jsp
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/body.jsp
index 4ab02b6..ed1a6b0 100644
---
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/body.jsp
+++
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/body.jsp
@@ -22,18 +22,17 @@
<sling:call script="nav.jsp" />
</section>
<section class="container is-fluid">
- </section>
- <section>
<div class="columns">
- <div class="column is-one-quarter">
- <sling:include path="/mnt/overlay/sling-cms/content/start/jcr:content/nav"
resourceType="sling-cms/components/general/container" />
+ <div class="column is-one-fifth">
+ <sling:include
path="/mnt/overlay/sling-cms/content/start/jcr:content/nav"
resourceType="sling-cms/components/general/container" />
+ </div>
+ <div class="column">
+ <main class="Main-Content">
+ <sling:call script="content.jsp" />
+ </main>
+ </div>
+ <div class="column is-one-fifth">
</div>
- <div class="column">
- <main class="Main-Content">
- <sling:call script="content.jsp" />
- </main>
- </div>
- </div>
</div>
</section>
<sling:call script="scripts.jsp" />
diff --git
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/scripts.jsp
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/scripts.jsp
index fe2c77c..db55b29 100644
---
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/scripts.jsp
+++
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/scripts.jsp
@@ -17,4 +17,10 @@
* under the License.
*/ --%>
<%@include file="/libs/sling-cms/global.jsp"%>
-<script src="/static/clientlibs/sling-cms/js/scripts-all.min.js"></script>
\ No newline at end of file
+<script src="/static/clientlibs/sling-cms/js/scripts-all.min.js"></script>
+<script>
+
+$(document).ready( function () {
+ $('.table').DataTable();
+} );
+</script>
\ No newline at end of file