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 2018/12/05 03:01:33 UTC
[sling-org-apache-sling-app-cms] branch master updated (4cd12f1 ->
7638c6a)
This is an automated email from the ASF dual-hosted git repository.
dklco pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git.
from 4cd12f1 Update Vagrantfile
new 98b6a75 Fixed issue with duplicate title and edit site group not saving
new be715d6 Making the optimizer a modal for the static console
new dfab4a0 Removing duplicate label
new 7638c6a Updating most of the interactions to use ajax to reload rather than refreshing the page
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
ui/src/main/frontend/src/js/cms.draggable.js | 6 +-
ui/src/main/frontend/src/js/cms.fields.js | 8 +--
ui/src/main/frontend/src/js/cms.form.js | 2 +
ui/src/main/frontend/src/js/cms.js | 48 ++++++++++++++-
ui/src/main/frontend/src/js/cms.modal.js | 27 ++++----
ui/src/main/frontend/src/js/cms.table.js | 58 +++++++++--------
ui/src/main/frontend/src/js/cms.toggle.js | 2 +-
ui/src/main/frontend/src/js/editor.js | 67 +++++++++++++-------
.../components/cms/contenttable/contenttable.jsp | 72 +++++++++++-----------
.../components/cms/pageeditor/pageeditor.jsp | 2 +-
.../components/cms/pagewrapper/pagewrapper.jsp | 9 ++-
.../libs/sling-cms/content/site/editgroup.json | 2 -
.../libs/sling-cms/content/static/content.json | 2 +-
.../libs/sling-cms/content/template/create.json | 1 -
14 files changed, 191 insertions(+), 115 deletions(-)
[sling-org-apache-sling-app-cms] 03/04: Removing duplicate label
Posted by dk...@apache.org.
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
commit dfab4a01adf3913c0051e5cb02f57840a26458e8
Author: Dan Klco <dk...@apache.org>
AuthorDate: Tue Dec 4 22:00:46 2018 -0500
Removing duplicate label
---
.../main/resources/jcr_root/libs/sling-cms/content/template/create.json | 1 -
1 file changed, 1 deletion(-)
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/template/create.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/template/create.json
index ee25355..97e8902 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/template/create.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/template/create.json
@@ -13,7 +13,6 @@
"sling:resourceType": "sling-cms/components/editor/slingform",
"actionSuffix": "/templates/",
"successPrepend": "/libs/sling-cms/content/site/content.html",
- "title": "Add Template",
"button": "Create Taxonomy",
"fields": {
"jcr:primaryType": "nt:unstructured",
[sling-org-apache-sling-app-cms] 04/04: Updating most of the
interactions to use ajax to reload rather than refreshing the page
Posted by dk...@apache.org.
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
commit 7638c6ab7b0b79d9845bf64c47a831bffbee7fe5
Author: Dan Klco <dk...@apache.org>
AuthorDate: Tue Dec 4 22:01:22 2018 -0500
Updating most of the interactions to use ajax to reload rather than refreshing the page
---
ui/src/main/frontend/src/js/cms.draggable.js | 6 +-
ui/src/main/frontend/src/js/cms.fields.js | 8 +--
ui/src/main/frontend/src/js/cms.form.js | 2 +
ui/src/main/frontend/src/js/cms.js | 48 ++++++++++++++-
ui/src/main/frontend/src/js/cms.modal.js | 27 ++++----
ui/src/main/frontend/src/js/cms.table.js | 58 +++++++++--------
ui/src/main/frontend/src/js/cms.toggle.js | 2 +-
ui/src/main/frontend/src/js/editor.js | 67 +++++++++++++-------
.../components/cms/contenttable/contenttable.jsp | 72 +++++++++++-----------
.../components/cms/pageeditor/pageeditor.jsp | 2 +-
.../components/cms/pagewrapper/pagewrapper.jsp | 9 ++-
11 files changed, 190 insertions(+), 111 deletions(-)
diff --git a/ui/src/main/frontend/src/js/cms.draggable.js b/ui/src/main/frontend/src/js/cms.draggable.js
index 9699cb8..df148fb 100644
--- a/ui/src/main/frontend/src/js/cms.draggable.js
+++ b/ui/src/main/frontend/src/js/cms.draggable.js
@@ -31,12 +31,12 @@
callbacks: {
created : function () {
var draggable = this;
- document.addEventListener('mouseup',function (event) {
+ document.addEventListener('mouseup', function () {
if (data.mouseDown === true) {
draggable.moveComplete();
}
});
- document.addEventListener('mousemove',function (event) {
+ document.addEventListener('mousemove', function (event) {
if (data.mouseDown === false) {
return false;
}
@@ -45,7 +45,7 @@
draggable.style.left = data.elementX + deltaX + 'px';
draggable.style.top = data.elementY + deltaY + 'px';
return false;
- })
+ });
}
},
methods : {
diff --git a/ui/src/main/frontend/src/js/cms.fields.js b/ui/src/main/frontend/src/js/cms.fields.js
index 4d3a6f8..e392c93 100644
--- a/ui/src/main/frontend/src/js/cms.fields.js
+++ b/ui/src/main/frontend/src/js/cms.fields.js
@@ -21,7 +21,7 @@
* Utility scripts for decorating form fields
*/
/* eslint-env browser, es6 */
-(function (rava, wysihtml) {
+(function (rava, wysihtml, wysihtmlParserRules) {
'use strict';
/* Update the name on file selection */
@@ -56,7 +56,7 @@
callbacks: {
created : function () {
var ctr = this;
- this.querySelectorAll(".repeating__add").forEach(function(el){
+ this.querySelectorAll(".repeating__add").forEach(function (el) {
el.addEventListener('click', function (event) {
event.stopPropagation();
event.preventDefault();
@@ -79,7 +79,7 @@
rava.decorate('.rte', {
callbacks : {
- created : function(){
+ created : function () {
new wysihtml.Editor(this.querySelector('.rte-editor'), {
toolbar: this.querySelector('.rte-toolbar'),
parserRules: wysihtmlParserRules
@@ -87,4 +87,4 @@
}
}
});
-}(window.rava = window.rava || {}, window.wysihtml = window.wysihtml || {}));
\ No newline at end of file
+}(window.rava = window.rava || {}, window.wysihtml = window.wysihtml || {}, window.wysihtmlParserRules = window.wysihtmlParserRules || {}));
\ No newline at end of file
diff --git a/ui/src/main/frontend/src/js/cms.form.js b/ui/src/main/frontend/src/js/cms.form.js
index 73814de..bf4673b 100644
--- a/ui/src/main/frontend/src/js/cms.form.js
+++ b/ui/src/main/frontend/src/js/cms.form.js
@@ -67,6 +67,8 @@ rava.decorate(".Form-Ajax", {
success: function(res,msg){
if (callback && Sling.CMS.handlers[callback]){
Sling.CMS.handlers[callback](res, msg);
+ } else if (window.parent.window.CMSEditor) {
+ Sling.CMS.ui.confirmReloadComponent(res, msg, $form.attr('action'));
} else {
Sling.CMS.ui.confirmReload(res, msg);
}
diff --git a/ui/src/main/frontend/src/js/cms.js b/ui/src/main/frontend/src/js/cms.js
index 37c74d8..6f2e1f7 100644
--- a/ui/src/main/frontend/src/js/cms.js
+++ b/ui/src/main/frontend/src/js/cms.js
@@ -63,10 +63,56 @@ Sling.CMS = {
});
} else {
Sling.CMS.ui.confirmMessage(msg, res.title,function(){
- location.reload();
+ Sling.CMS.ui.reloadContext();
});
}
},
+ confirmReloadComponent: function(res, msg, path) {
+ window.top.Sling.CMS.ui.confirmMessage(msg, res.title,function(){
+ var modal = window.top.Sling.CMS.ui.loaderModal('Refreshing...');
+ window.parent.window.CMSEditor.ui.reloadComponent(path, function(){
+ modal.remove();
+ });
+ });
+ },
+ loaderModal: function(message){
+ message = message || 'Loading...';
+ var modal = document.createElement('div');
+ modal.classList.add('modal');
+ modal.innerHTML = '<div class="modal-background"></div><div class="modal-content"><div class="box"><h3>'+message+'</h3><div class="loader is-loading"></div></div></div>';
+ document.querySelector('body').appendChild(modal);
+ modal.classList.add('is-active');
+ return modal;
+ },
+ reloadContext: function(){
+ //close all existing modals
+ document.querySelectorAll('.modal').forEach(function(modal){
+ modal.remove();
+ });
+ var containers = document.querySelectorAll('.reload-container');
+ var modal = Sling.CMS.ui.loaderModal('Refreshing...');
+ var count = containers.length;
+ if(count !== 0){
+ containers.forEach(function(container){
+ var request = new XMLHttpRequest();
+ var link = container.dataset.path;
+ request.open('GET', link, true);
+ request.onload = function () {
+ var tmp = document.createElement('div');
+ tmp.innerHTML = request.responseText;
+ container.replaceWith(tmp.querySelector('.reload-container'));
+ tmp.remove();
+ count--;
+ if(count === 0){
+ modal.remove();
+ }
+ };
+ request.send();
+ });
+ } else {
+ location.reload();
+ }
+ },
suggest: function(selector, type, base){
var xhr;
new autoComplete({
diff --git a/ui/src/main/frontend/src/js/cms.modal.js b/ui/src/main/frontend/src/js/cms.modal.js
index 862ecc5..5954574 100644
--- a/ui/src/main/frontend/src/js/cms.modal.js
+++ b/ui/src/main/frontend/src/js/cms.modal.js
@@ -18,7 +18,7 @@
*/
/* eslint-env browser, es6 */
-(function (rava) {
+(function (rava, Sling) {
'use strict';
rava.decorate("a.Fetch-Modal", {
events: {
@@ -30,12 +30,8 @@
},
methods: {
getModal: function (title, link, button) {
- var modal = document.createElement('div');
- modal.classList.add('modal');
- modal.innerHTML = '<div class="modal-background"></div><div class="modal-content"><div class="box"><h3>Loading...</h3><div class="loader is-loading"></div></div></div>';
- document.querySelector('body').appendChild(modal);
-
- var request = new XMLHttpRequest();
+ var modal = Sling.CMS.ui.loaderModal(),
+ request = new XMLHttpRequest();
request.open('GET', link, true);
request.onload = function () {
button.removeAttribute("disabled");
@@ -45,24 +41,23 @@
modal.innerHTML = request.responseText;
}
};
- modal.querySelector('.modal-background').addEventListener('click', function(){
- request.abort();
- button.removeAttribute('disabled');
+ modal.querySelector('.modal-background').addEventListener('click', function () {
+ request.abort();
+ button.removeAttribute('disabled');
});
- modal.classList.add('is-active');
request.send();
}
}
});
- rava.decorate(".modal",{
- events:{
- ".close,.modal-close,.close-modal,.modal-background" :{
- click: function (event) {
+ rava.decorate(".modal", {
+ events: {
+ ".close,.modal-close,.close-modal,.modal-background": {
+ click: function () {
this.remove();
}
}
}
});
-}(window.rava = window.rava || {}));
\ No newline at end of file
+}(window.rava = window.rava || {}, window.Sling = window.Sling || {}));
\ No newline at end of file
diff --git a/ui/src/main/frontend/src/js/cms.table.js b/ui/src/main/frontend/src/js/cms.table.js
index 2d06034..1bb3768 100644
--- a/ui/src/main/frontend/src/js/cms.table.js
+++ b/ui/src/main/frontend/src/js/cms.table.js
@@ -15,33 +15,39 @@
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- */
+ */
-
-rava.decorate(".table", {
- callbacks : {
- created :function(){
- var $table = $(this);
- var sort = $table.data('sort') !== 'false';
- var paginate = $table.data('paginate') !== 'false';
- $table.DataTable({
- sort: sort,
- paginate: paginate
- }).on( 'page.dt', function () {
- $table.find('tr').removeClass('is-selected');
- $('.actions-target').html('');
- });
+/* eslint-env browser, es6 */
+(function (rava, $) {
+ 'use strict';
+ rava.decorate(".table", {
+ callbacks : {
+ created: function () {
+ var table = this,
+ sort = this.dataset.sort !== 'false',
+ paginate = this.dataset.paginate !== 'false';
+ $(this).DataTable({
+ sort: sort,
+ paginate: paginate
+ }).on('page.dt', function () {
+ table.querySelectorAll('tr.is-selected').forEach(function (tr) {
+ tr.classList.remove('is-selected');
+ });
+ document.querySelector('.actions-target').innerHTML = '';
+ });
+ }
}
- }
-});
+ });
-rava.decorate(".table tbody tr",{
- events :{
- click: function(event){
- var $current = $(this);
- $current.parent().find('tr').removeClass('is-selected');
- $current.addClass('is-selected');
- $('.actions-target').html($current.find('.cell-actions').html());
+ rava.decorate(".table tbody tr", {
+ events: {
+ click: function () {
+ this.closest('.table').querySelectorAll('tr.is-selected').forEach(function (tr) {
+ tr.classList.remove('is-selected');
+ });
+ this.classList.add('is-selected');
+ document.querySelector('.actions-target').innerHTML = this.querySelector('.cell-actions').innerHTML;
+ }
}
- }
-});
\ No newline at end of file
+ });
+}(window.rava = window.rava || {}, window.jQuery = window.jQuery || {}));
\ No newline at end of file
diff --git a/ui/src/main/frontend/src/js/cms.toggle.js b/ui/src/main/frontend/src/js/cms.toggle.js
index 0a3f3c8..3f5e7c0 100644
--- a/ui/src/main/frontend/src/js/cms.toggle.js
+++ b/ui/src/main/frontend/src/js/cms.toggle.js
@@ -39,7 +39,7 @@
selector = 'input[name="' + source + '"], select[name="' + source + '"]',
toggle = this,
sourceEl = document.querySelector(selector);
- if(sourceEl){
+ if (sourceEl) {
sourceEl.addEventListener('change', function () {
if (this.value !== toggle.dataset.toggleValue) {
toggle.classList.add('is-hidden');
diff --git a/ui/src/main/frontend/src/js/editor.js b/ui/src/main/frontend/src/js/editor.js
index f1dfe31..8467b40 100644
--- a/ui/src/main/frontend/src/js/editor.js
+++ b/ui/src/main/frontend/src/js/editor.js
@@ -24,24 +24,9 @@
var CMSEditor = {
draggable: null,
init: function () {
- CMSEditor.util.attachClick('.sling-cms-editor .button[data-sling-cms-action=add]', function () {
- CMSEditor.ui.showModal('/cms/editor/add.html' + this.dataset.slingCmsPath + '?availableTypes=' + this.dataset.slingCmsAvailableTypes, this.title);
- });
- CMSEditor.util.attachClick('.sling-cms-editor .button[data-sling-cms-action=delete]', function () {
- CMSEditor.ui.showModal('/cms/editor/delete.html' + this.dataset.slingCmsPath, this.title);
- });
- CMSEditor.util.attachClick('.sling-cms-editor .button[data-sling-cms-action=edit]', function () {
- CMSEditor.ui.showModal(
- '/cms/editor/edit.html' + this.dataset.slingCmsPath + '?editor=' + this.dataset.slingCmsEdit,
- CMSEditor.util.findParent(this, '.sling-cms-component').dataset.slingCmsTitle || this.title
- );
- });
- CMSEditor.util.attachClick('.sling-cms-editor .button[data-sling-cms-action=reorder]', function () {
- CMSEditor.ui.showModal('/cms/editor/reorder.html' + this.dataset.slingCmsPath, this.title);
- });
-
+ CMSEditor.util.attachClicks(document);
// closing the modal
- CMSEditor.util.attachClick('.sling-cms-editor .modal-close, .sling-cms-editor .modal-background', function () {
+ CMSEditor.util.attachClick(document,'.sling-cms-editor .modal-close, .sling-cms-editor .modal-background', function () {
CMSEditor.ui.hideModal();
});
window.addEventListener('keypress', function (e) {
@@ -51,7 +36,7 @@
});
},
ui: {
- draggable: function(element) {
+ draggable: function (element) {
CMSEditor.draggable = element;
var mouseDown = false, elementX = 0, elementY = 0;
@@ -85,22 +70,41 @@
modalDisplayed: false,
hideModal: function () {
if (CMSEditor.ui.modalDisplayed) {
- if(document.querySelector('.sling-cms-editor .modal')){
+ if (document.querySelector('.sling-cms-editor .modal')) {
document.querySelector('.sling-cms-editor .modal').remove();
}
CMSEditor.ui.modalDisplayed = false;
}
},
+ reloadComponent: function (path, cb) {
+ var component = document.querySelector('.sling-cms-component[data-sling-cms-resource-path="' + path + '"]');
+ var request = new XMLHttpRequest();
+ request.open('GET', '/cms/page/pagewrapper.html' + path + '?forceResourceType=' + component.dataset.slingCmsResourceType, true);
+ request.onload = function () {
+ if(request.status == 200){
+ var tmp = document.createElement('div');
+ tmp.innerHTML = request.responseText;
+ CMSEditor.util.attachClicks(tmp);
+ component.replaceWith(tmp.querySelector('.sling-cms-component'));
+ tmp.remove();
+ CMSEditor.ui.hideModal();
+ cb();
+ } else {
+ window.top.location.reload();
+ }
+ };
+ request.send();
+ },
showModal: function (url, title) {
title = title || '';
if (CMSEditor.ui.modalDisplayed) {
CMSEditor.ui.hideModal();
}
- document.querySelector('.sling-cms-editor-final').innerHTML = '<div class="modal"><div class="modal-background"></div><div class="modal-content"><div class="box"><h3 class="modal-title"></h3><section class="modal-body"></section></div></div><button class="modal-close is-large" aria-label="close"></button>'
+ document.querySelector('.sling-cms-editor-final').innerHTML = '<div class="modal"><div class="modal-background"></div><div class="modal-content"><div class="box"><h3 class="modal-title"></h3><section class="modal-body"></section></div></div><button class="modal-close is-large" aria-label="close"></button>';
document.querySelector('.sling-cms-editor .modal-title').innerText = title;
document.querySelector('.sling-cms-editor .modal-body').innerHTML = '<iframe class="modal-frame" src="' + url + '"></iframe>';
document.querySelector('.sling-cms-editor .modal').classList.add('is-active');
- CMSEditor.util.attachClick('.sling-cms-editor .modal-background, .sling-cms-editor .modal-close', function(){
+ CMSEditor.util.attachClick(document,'.sling-cms-editor .modal-background, .sling-cms-editor .modal-close', function () {
CMSEditor.ui.hideModal();
});
CMSEditor.ui.draggable(document.querySelector('.sling-cms-editor .modal-content'));
@@ -108,11 +112,28 @@
}
},
util: {
- attachClick: function (exp, cb) {
- document.querySelectorAll(exp).forEach(function (el) {
+ attachClick: function (ctx, exp, cb) {
+ ctx.querySelectorAll(exp).forEach(function (el) {
el.addEventListener('click', cb, false);
});
},
+ attachClicks: function (ctx) {
+ CMSEditor.util.attachClick(ctx, '.sling-cms-editor .button[data-sling-cms-action=add]', function () {
+ CMSEditor.ui.showModal('/cms/editor/add.html' + this.dataset.slingCmsPath + '?availableTypes=' + this.dataset.slingCmsAvailableTypes, this.title);
+ });
+ CMSEditor.util.attachClick(ctx, '.sling-cms-editor .button[data-sling-cms-action=delete]', function () {
+ CMSEditor.ui.showModal('/cms/editor/delete.html' + this.dataset.slingCmsPath, this.title);
+ });
+ CMSEditor.util.attachClick(ctx, '.sling-cms-editor .button[data-sling-cms-action=edit]', function () {
+ CMSEditor.ui.showModal(
+ '/cms/editor/edit.html' + this.dataset.slingCmsPath + '?editor=' + this.dataset.slingCmsEdit,
+ CMSEditor.util.findParent(this, '.sling-cms-component').dataset.slingCmsTitle || this.title
+ );
+ });
+ CMSEditor.util.attachClick(ctx, '.sling-cms-editor .button[data-sling-cms-action=reorder]', function () {
+ CMSEditor.ui.showModal('/cms/editor/reorder.html' + this.dataset.slingCmsPath, this.title);
+ });
+ },
findParent: function (el, exp) {
if (el === null || el.parentElement === null) {
return null;
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 f5bad46..6b65a0e 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,39 +17,41 @@
* under the License.
*/ --%>
<%@include file="/libs/sling-cms/global.jsp"%>
-<table class="table is-fullwidth is-striped">
- <thead>
- <tr>
- <th>
- #
- </th>
- <c:forEach var="column" items="${sling:listChildren(sling:getRelativeResource(resource,'columns'))}">
- <th class="${column.name == 'actions' ? 'is-hidden' : '' }" data-attribute="${column.name}">
- <sling:encode value="${column.valueMap.title}" mode="HTML" />
+ <div class="reload-container" data-path="${resource.path}.html${slingRequest.requestPathInfo.suffix}">
+ <table class="table is-fullwidth is-striped">
+ <thead>
+ <tr>
+ <th>
+ #
</th>
- </c:forEach>
- </tr>
- </thead>
- <tbody>
- <c:set var="parentPath" value="${slingRequest.requestPathInfo.suffix}${not empty properties.appendSuffix ? properties.appendSuffix : ''}" />
- <c:set var="count" value="1" />
- <c:forEach var="child" items="${sling:listChildren(sling:getResource(resourceResolver, parentPath))}">
- <sling:getResource var="typeConfig" base="${resource}" path="types/${child.valueMap['jcr:primaryType']}" />
- <c:if test="${typeConfig != null && !fn:contains(child.name,':')}">
- <tr class="sortable__row" data-resource="${child.path}" data-type="${typeConfig.path}">
- <td class="Cell-Static" title="# ${status.index + 1}}" data-sort-value="<fmt:formatNumber pattern="0000" value="${count}" />">
- ${count}
- </td>
- <c:forEach var="column" items="${sling:listChildren(sling:getRelativeResource(typeConfig,'columns'))}">
- <c:set var="configPath" value="columns/${column.name}"/>
- <c:set var="colConfig" value="${sling:getRelativeResource(typeConfig,configPath)}" scope="request" />
- <c:if test="${colConfig != null}">
- <sling:include path="${child.path}" resourceType="${colConfig.valueMap['sling:resourceType']}" />
- </c:if>
- </c:forEach>
- </tr>
- <c:set var="count" value="${count + 1}" />
- </c:if>
- </c:forEach>
- </tbody>
-</table>
\ No newline at end of file
+ <c:forEach var="column" items="${sling:listChildren(sling:getRelativeResource(resource,'columns'))}">
+ <th class="${column.name == 'actions' ? 'is-hidden' : '' }" data-attribute="${column.name}">
+ <sling:encode value="${column.valueMap.title}" mode="HTML" />
+ </th>
+ </c:forEach>
+ </tr>
+ </thead>
+ <tbody>
+ <c:set var="parentPath" value="${slingRequest.requestPathInfo.suffix}${not empty properties.appendSuffix ? properties.appendSuffix : ''}" />
+ <c:set var="count" value="1" />
+ <c:forEach var="child" items="${sling:listChildren(sling:getResource(resourceResolver, parentPath))}">
+ <sling:getResource var="typeConfig" base="${resource}" path="types/${child.valueMap['jcr:primaryType']}" />
+ <c:if test="${typeConfig != null && !fn:contains(child.name,':')}">
+ <tr class="sortable__row" data-resource="${child.path}" data-type="${typeConfig.path}">
+ <td class="Cell-Static" title="# ${status.index + 1}}" data-sort-value="<fmt:formatNumber pattern="0000" value="${count}" />">
+ ${count}
+ </td>
+ <c:forEach var="column" items="${sling:listChildren(sling:getRelativeResource(typeConfig,'columns'))}">
+ <c:set var="configPath" value="columns/${column.name}"/>
+ <c:set var="colConfig" value="${sling:getRelativeResource(typeConfig,configPath)}" scope="request" />
+ <c:if test="${colConfig != null}">
+ <sling:include path="${child.path}" resourceType="${colConfig.valueMap['sling:resourceType']}" />
+ </c:if>
+ </c:forEach>
+ </tr>
+ <c:set var="count" value="${count + 1}" />
+ </c:if>
+ </c:forEach>
+ </tbody>
+ </table>
+</div>
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/pageeditor/pageeditor.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/pageeditor/pageeditor.jsp
index 40e7d20..6886310 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/pageeditor/pageeditor.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/pageeditor/pageeditor.jsp
@@ -17,6 +17,6 @@
* under the License.
*/ --%>
<%@include file="/libs/sling-cms/global.jsp"%>
-<div class="sling-cms-editor">
+<div class="sling-cms-editor reload-container" data-path="${resource.path}.html${slingRequest.requestPathInfo.suffix}">
<iframe class="page-wrapper-frame" src="/cms/page/pagewrapper.html${slingRequest.requestPathInfo.suffix}"></iframe>
</div>
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/pagewrapper/pagewrapper.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/pagewrapper/pagewrapper.jsp
index 313036c..d2a34ac 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/pagewrapper/pagewrapper.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/pagewrapper/pagewrapper.jsp
@@ -18,5 +18,12 @@
*/ --%>
<%@include file="/libs/sling-cms/global.jsp"%>
<c:set var="cmsEditEnabled" value="true" scope="request" />
-<sling:include resource="${sling:getResource(resourceResolver,slingRequest.requestPathInfo.suffix)}" />
+<c:choose>
+ <c:when test="${not empty param.forceResourceType}">
+ <sling:include resource="${sling:getResource(resourceResolver,slingRequest.requestPathInfo.suffix)}" resourceType="${param.forceResourceType}" />
+ </c:when>
+ <c:otherwise>
+ <sling:include resource="${sling:getResource(resourceResolver,slingRequest.requestPathInfo.suffix)}" />
+ </c:otherwise>
+</c:choose>
<c:set var="cmsEditEnabled" value="false" scope="request" />
\ No newline at end of file
[sling-org-apache-sling-app-cms] 02/04: Making the optimizer a
modal for the static console
Posted by dk...@apache.org.
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
commit be715d6420fd1c9f58eb3e5ce82d68dd31730677
Author: Dan Klco <dk...@apache.org>
AuthorDate: Tue Dec 4 22:00:25 2018 -0500
Making the optimizer a modal for the static console
---
.../main/resources/jcr_root/libs/sling-cms/content/static/content.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/static/content.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/static/content.json
index db53a4b..a38146c 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/static/content.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/static/content.json
@@ -103,7 +103,7 @@
},
"optimize": {
"jcr:primaryType": "nt:unstructured",
- "modal": false,
+ "modal": true,
"title": "Optimize File",
"icon": "archive",
"prefix": "/cms/file/optimize.html"
[sling-org-apache-sling-app-cms] 01/04: Fixed issue with duplicate
title and edit site group not saving
Posted by dk...@apache.org.
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
commit 98b6a757b0b7a05975d9c339d1dbd84ba6ab0347
Author: Dan Klco <dk...@apache.org>
AuthorDate: Fri Nov 30 22:13:11 2018 -0500
Fixed issue with duplicate title and edit site group not saving
---
.../main/resources/jcr_root/libs/sling-cms/content/site/editgroup.json | 2 --
1 file changed, 2 deletions(-)
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/editgroup.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/editgroup.json
index c0510ad..e76236b 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/editgroup.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/editgroup.json
@@ -10,8 +10,6 @@
"slingform": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/editor/slingform",
- "actionSuffix": "/*",
- "title": "Edit Site Group",
"button": "Update Site Group",
"successPrepend": "/libs/sling-cms/content/site/content.html",
"fields": {