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/11/02 18:54:48 UTC
[sling-org-apache-sling-app-cms] branch master updated: Continued
tweaks and improvements based on the latest modal changes
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 0c689c9 Continued tweaks and improvements based on the latest modal changes
0c689c9 is described below
commit 0c689c9f1d6cbdc01c9559ea9e375a1cfafcf972
Author: Dan Klco <dk...@apache.org>
AuthorDate: Fri Nov 2 14:54:41 2018 -0400
Continued tweaks and improvements based on the latest modal changes
---
ui/src/main/frontend/src/js/cms.fields.js | 35 +++--
ui/src/main/frontend/src/js/cms.form.js | 13 +-
ui/src/main/frontend/src/js/cms.toggle.js | 2 +-
ui/src/main/frontend/src/js/editor.js | 37 +++--
.../components/editor/scripts/finalize.jsp | 15 +-
.../components/editor/slingform/slingform.jsp | 4 +-
.../libs/sling-cms/content/admin/bulkreplace.json | 1 +
.../libs/sling-cms/content/admin/loadcontent.json | 1 +
.../libs/sling-cms/content/config/create.json | 7 +-
.../libs/sling-cms/content/config/metadata.json | 5 -
.../libs/sling-cms/content/folder/create.json | 1 -
.../libs/sling-cms/content/folder/edit.json | 1 -
.../libs/sling-cms/content/i18n/entry/create.json | 5 -
.../libs/sling-cms/content/mappings/create.json | 1 -
.../libs/sling-cms/content/mappings/edit.json | 1 -
.../libs/sling-cms/content/taxonomy/create.json | 1 -
.../libs/sling-cms/content/taxonomy/edit.json | 1 -
.../sling-cms/content/usergenerated/review.json | 168 +++++++++++----------
18 files changed, 140 insertions(+), 159 deletions(-)
diff --git a/ui/src/main/frontend/src/js/cms.fields.js b/ui/src/main/frontend/src/js/cms.fields.js
index 8d992d2..5bf9289 100644
--- a/ui/src/main/frontend/src/js/cms.fields.js
+++ b/ui/src/main/frontend/src/js/cms.fields.js
@@ -53,21 +53,26 @@
/* Support for repeating form fields */
nomnom.decorate(".repeating", {
- events : {
- ".repeating__add, .repeating__add *" : {
- click: function (event) {
- event.stopPropagation();
- event.preventDefault();
- var node = this.querySelector('.repeating__template > .repeating__item').cloneNode(true);
- this.querySelector('.repeating__container').appendChild(node);
- }
- },
- ".repeating__remove, .repeating__remove *" : {
- click: function (event) {
- event.stopPropagation();
- event.preventDefault();
- event.target.closest('.repeating__item').remove();
- }
+ callbacks: {
+ created : function () {
+ var ctr = this;
+ this.querySelectorAll(".repeating__add").forEach(function(el){
+ el.addEventListener('click', function (event) {
+ event.stopPropagation();
+ event.preventDefault();
+ var node = ctr.querySelector('.repeating__template > .repeating__item').cloneNode(true);
+ ctr.querySelector('.repeating__container').appendChild(node);
+ });
+ });
+ }
+ }
+ });
+ nomnom.decorate(".repeating__remove", {
+ events: {
+ click: function (event) {
+ event.stopPropagation();
+ event.preventDefault();
+ event.target.closest('.repeating__item').remove();
}
}
});
diff --git a/ui/src/main/frontend/src/js/cms.form.js b/ui/src/main/frontend/src/js/cms.form.js
index 372bf93..0473bcc 100644
--- a/ui/src/main/frontend/src/js/cms.form.js
+++ b/ui/src/main/frontend/src/js/cms.form.js
@@ -21,11 +21,14 @@ w * Licensed to the Apache Software Foundation (ASF) under one
nomnom.decorate(".Form-Ajax", {
callbacks: {
created : function () {
- this.querySelector('.close').addEventListener('click', function(){
- if(window.parent && window.parent.window && window.parent.window.CMSEditor) {
- window.parent.window.CMSEditor.ui.hideModal();
- }
- });
+ var close = this.querySelector('.close');
+ if(close){
+ close.addEventListener('click', function(){
+ if(window.parent && window.parent.window && window.parent.window.CMSEditor) {
+ window.parent.window.CMSEditor.ui.hideModal();
+ }
+ });
+ }
}
},
events :{
diff --git a/ui/src/main/frontend/src/js/cms.toggle.js b/ui/src/main/frontend/src/js/cms.toggle.js
index 702ff29..68ea017 100644
--- a/ui/src/main/frontend/src/js/cms.toggle.js
+++ b/ui/src/main/frontend/src/js/cms.toggle.js
@@ -40,7 +40,7 @@
toggle = this,
sourceEl = document.querySelector(selector);
if(sourceEl){
- sourceEl.on('change', function () {
+ sourceEl.addEventListener('change', function () {
if (this.value !== toggle.dataset.toggleValue) {
toggle.classList.add('is-hidden');
} else {
diff --git a/ui/src/main/frontend/src/js/editor.js b/ui/src/main/frontend/src/js/editor.js
index 7db17da..4296756 100644
--- a/ui/src/main/frontend/src/js/editor.js
+++ b/ui/src/main/frontend/src/js/editor.js
@@ -20,7 +20,9 @@
(function () {
'use strict';
if (!window.CMSEditor) {
+ var mouseX, mouseY;
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);
@@ -47,14 +49,14 @@
CMSEditor.ui.hideModal();
}
});
-
- var mouseX, mouseY;
-
- function draggable(element) {
+ },
+ ui: {
+ draggable: function(element) {
+ CMSEditor.draggable = element;
var mouseDown = false, elementX = 0, elementY = 0;
// mouse button down over the element
- element.addEventListener('mousedown', function (evt) {
+ CMSEditor.draggable.addEventListener('mousedown', function (evt) {
if (!evt.target.matches('.modal-title, .modal-title *')) {
return;
}
@@ -62,34 +64,30 @@
mouseY = evt.clientY;
mouseDown = true;
});
-
var moveComplete = function () {
mouseDown = false;
- elementX = parseInt(element.style.left, 10) || 0;
- elementY = parseInt(element.style.top, 10) || 0;
+ elementX = parseInt(CMSEditor.draggable.style.left, 10) || 0;
+ elementY = parseInt(CMSEditor.draggable.style.top, 10) || 0;
return false;
};
-
- element.addEventListener('mouseup', moveComplete);
+ CMSEditor.draggable.addEventListener('mouseup', moveComplete);
document.addEventListener('mouseout', moveComplete);
-
document.addEventListener('mousemove', function (event) {
if (!mouseDown) {
return;
}
var deltaX = event.clientX - mouseX, deltaY = event.clientY - mouseY;
- element.style.left = elementX + deltaX + 'px';
- element.style.top = elementY + deltaY + 'px';
+ CMSEditor.draggable.style.left = elementX + deltaX + 'px';
+ CMSEditor.draggable.style.top = elementY + deltaY + 'px';
return false;
});
- }
- draggable(document.querySelector('.sling-cms-editor .modal-content'));
- },
- ui: {
+ },
modalDisplayed: false,
hideModal: function () {
if (CMSEditor.ui.modalDisplayed) {
- document.querySelector('.sling-cms-editor .modal').classList.remove('is-active');
+ if(document.querySelector('.sling-cms-editor .modal')){
+ document.querySelector('.sling-cms-editor .modal').remove();
+ }
CMSEditor.ui.modalDisplayed = false;
}
},
@@ -98,10 +96,11 @@
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 .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.ui.draggable(document.querySelector('.sling-cms-editor .modal-content'));
CMSEditor.ui.modalDisplayed = true;
}
},
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/scripts/finalize.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/scripts/finalize.jsp
index a9934fa..16aa7d7 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/scripts/finalize.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/scripts/finalize.jsp
@@ -19,18 +19,7 @@
<%@include file="/libs/sling-cms/global.jsp"%>
<c:if test="${cmsEditEnabled == 'true'}">
<script src="/static/clientlibs/sling-cms-editor/js/editor.min.js"></script>
- <div class="sling-cms-editor">
- <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>
- </div>
+ <div class="sling-cms-editor sling-cms-editor-final">
+
</div>
</c:if>
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/slingform/slingform.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/slingform/slingform.jsp
index bb5ebea..1da599f 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/slingform/slingform.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/slingform/slingform.jsp
@@ -31,5 +31,7 @@
<button type="submit" class="button is-primary">
<sling:encode value="${properties.button}" default="Save" mode="HTML" />
</button>
- <button type="button" class="button close">Cancel</button>
+ <c:if test="${properties.skipcancel != true}">
+ <button type="button" class="button close">Cancel</button>
+ </c:if>
</form>
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/admin/bulkreplace.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/admin/bulkreplace.json
index 55cf189..451bb16 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/admin/bulkreplace.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/admin/bulkreplace.json
@@ -31,6 +31,7 @@
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/editor/slingform",
"button": "Replace All",
+ "skipcancel": true,
"fields": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/general/container",
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/admin/loadcontent.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/admin/loadcontent.json
index cf5d9e0..d2634d4 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/admin/loadcontent.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/admin/loadcontent.json
@@ -31,6 +31,7 @@
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/editor/slingform",
"button": "Load Content",
+ "skipcancel": true,
"fields": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/general/container",
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/create.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/create.json
index 9a72dd0..887ef4f 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/create.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/create.json
@@ -2,16 +2,11 @@
"jcr:primaryType": "sling:Page",
"jcr:content": {
"sling:resourceType": "sling-cms/components/pages/modal",
- "jcr:title": "Create Site Config",
+ "jcr:title": "Create Config",
"jcr:primaryType": "nt:unstructured",
"container": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/general/container",
- "richtext": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/general/richtext",
- "text": "<h3>Create Site Config</h3>"
- },
"slingform": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/editor/slingform",
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/metadata.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/metadata.json
index 4010013..87c5103 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/metadata.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/metadata.json
@@ -7,11 +7,6 @@
"container": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/general/container",
- "richtext": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/general/richtext",
- "text": "<h3>Edit Config</h3>"
- },
"slingform": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/editor/slingform",
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/folder/create.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/folder/create.json
index 9a04c29..d69d7bc 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/folder/create.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/folder/create.json
@@ -11,7 +11,6 @@
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/editor/slingform",
"actionSuffix": "/*",
- "title": "Add Folder",
"button": "Create Folder",
"successPrepend": "/libs/sling-cms/content/site/content.html",
"fields": {
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/folder/edit.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/folder/edit.json
index 509fbb3..633119e 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/folder/edit.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/folder/edit.json
@@ -10,7 +10,6 @@
"slingform": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/editor/slingform",
- "title":"Edit Folder",
"button": "Update Folder",
"successPrepend": "/libs/sling-cms/content/site/content.html",
"fields": {
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/i18n/entry/create.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/i18n/entry/create.json
index bf6e536..32e6f6e 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/i18n/entry/create.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/i18n/entry/create.json
@@ -7,11 +7,6 @@
"container": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/general/container",
- "richtext": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/general/richtext",
- "text": "<h3>Create Entry</h3>"
- },
"slingform": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/editor/slingform",
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/mappings/create.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/mappings/create.json
index 751aeee..b300caf 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/mappings/create.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/mappings/create.json
@@ -12,7 +12,6 @@
"sling:resourceType": "sling-cms/components/editor/slingform",
"addDate": false,
"actionSuffix": "/*",
- "title": "Add Mapping",
"button": "Create Mapping",
"successPrepend": "/libs/sling-cms/content/site/content.html",
"fields": {
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/mappings/edit.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/mappings/edit.json
index 7a39d90..338f2c5 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/mappings/edit.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/mappings/edit.json
@@ -9,7 +9,6 @@
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/editor/slingform",
"addDate": false,
- "title": "Edit Mapping",
"button": "Update Mapping",
"fields": {
"jcr:primaryType": "nt:unstructured",
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/taxonomy/create.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/taxonomy/create.json
index 5271373..336b1a7 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/taxonomy/create.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/taxonomy/create.json
@@ -11,7 +11,6 @@
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/editor/slingform",
"actionSuffix": "/*",
- "title": "Add Taxonomy",
"button": "Create Taxonomy",
"fields": {
"jcr:primaryType": "nt:unstructured",
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/taxonomy/edit.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/taxonomy/edit.json
index 7f861af..ea5cd2d 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/taxonomy/edit.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/taxonomy/edit.json
@@ -10,7 +10,6 @@
"slingform": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/editor/slingform",
- "title": "Edit Taxonomy",
"button": "Update Taxonomy",
"fields": {
"jcr:primaryType": "nt:unstructured",
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/usergenerated/review.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/usergenerated/review.json
index 334789f..1b55de5 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/usergenerated/review.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/usergenerated/review.json
@@ -1,85 +1,87 @@
{
- "jcr:primaryType": "sling:Page",
- "jcr:content": {
- "sling:resourceType": "sling-cms/components/pages/base",
- "jcr:title": "Review User Generated Content",
- "jcr:primaryType": "nt:unstructured",
- "container": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/general/container",
- "richtext": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/general/richtext",
- "text": "<h3>Review User Generated Content</h3>"
- },
- "preview": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/cms/suffixproperty",
- "label": "Preview",
- "property": "preview"
- },
- "contenttype": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/cms/suffixproperty",
- "label": "Content Type",
- "property": "contenttype"
- },
- "referrer": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/cms/suffixproperty",
- "label": "Referrer",
- "property": "referrer"
- },
- "user": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/cms/suffixproperty",
- "label": "User",
- "property": "user"
- },
- "useragent": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/cms/suffixproperty",
- "label": "User Agent",
- "property": "useragent"
- },
- "userip": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/cms/suffixproperty",
- "label": "User IP",
- "property": "userip"
- },
- "slingform": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/editor/slingform",
- "button": "Approve Content",
- "callback": "handleugc",
- "fields": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/general/container",
- "title": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/editor/fields/hidden",
- "name": ":operation",
- "value": "ugcapprove"
- }
- }
- },
- "deleteform": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/editor/slingform",
- "button": "Delete Content",
- "callback": "handleugc",
- "fields": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/general/container",
- "title": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/editor/fields/hidden",
- "name": ":operation",
- "value": "delete"
- }
- }
- }
- }
- }
+ "jcr:primaryType": "sling:Page",
+ "jcr:content": {
+ "sling:resourceType": "sling-cms/components/pages/base",
+ "jcr:title": "Review User Generated Content",
+ "jcr:primaryType": "nt:unstructured",
+ "container": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/general/container",
+ "richtext": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/general/richtext",
+ "text": "<h3>Review User Generated Content</h3>"
+ },
+ "preview": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/cms/suffixproperty",
+ "label": "Preview",
+ "property": "preview"
+ },
+ "contenttype": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/cms/suffixproperty",
+ "label": "Content Type",
+ "property": "contenttype"
+ },
+ "referrer": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/cms/suffixproperty",
+ "label": "Referrer",
+ "property": "referrer"
+ },
+ "user": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/cms/suffixproperty",
+ "label": "User",
+ "property": "user"
+ },
+ "useragent": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/cms/suffixproperty",
+ "label": "User Agent",
+ "property": "useragent"
+ },
+ "userip": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/cms/suffixproperty",
+ "label": "User IP",
+ "property": "userip"
+ },
+ "slingform": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/editor/slingform",
+ "button": "Approve Content",
+ "callback": "handleugc",
+ "skipcancel": true,
+ "fields": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/general/container",
+ "title": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/editor/fields/hidden",
+ "name": ":operation",
+ "value": "ugcapprove"
+ }
+ }
+ },
+ "deleteform": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/editor/slingform",
+ "button": "Delete Content",
+ "callback": "handleugc",
+ "skipcancel": true,
+ "fields": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/general/container",
+ "title": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/editor/fields/hidden",
+ "name": ":operation",
+ "value": "delete"
+ }
+ }
+ }
+ }
+ }
}
\ No newline at end of file