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 6b05b7c  Added icon support instead of the hacky character solution. 
Made improvements to the modal
6b05b7c is described below

commit 6b05b7c719a574bc8b5a593c45808cd7d3bd03b2
Author: Dan Klco <[email protected]>
AuthorDate: Tue Aug 21 09:40:41 2018 -0400

    Added icon support instead of the hacky character solution. Made
    improvements to the modal
---
 ui/src/main/frontend/gulpfile.js                   |  9 ++--
 ui/src/main/frontend/package.json                  |  6 +--
 ui/src/main/frontend/src/js/scripts.js             |  4 +-
 ui/src/main/frontend/src/scss/styles.scss          | 10 +++-
 .../content/sling-cms/errorhandling/401.json       |  1 +
 .../content/sling-cms/errorhandling/403.json       |  1 +
 .../content/sling-cms/errorhandling/404.json       |  1 +
 .../content/sling-cms/errorhandling/default.json   |  1 +
 .../components/cms/columns/actions/actions.jsp     |  6 ++-
 .../components/cms/pageeditbar/actions/actions.jsp |  4 +-
 .../libs/sling-cms/content/config/list.json        | 12 ++---
 .../libs/sling-cms/content/i18n/dictionaries.json  |  4 +-
 .../libs/sling-cms/content/mappings/list.json      | 16 +++----
 .../jcr_root/libs/sling-cms/content/page/edit.json |  8 ++--
 .../content/page/siteeditproperties.json}          | 10 ++--
 .../libs/sling-cms/content/site/content.json       | 55 ++++++++++++----------
 .../libs/sling-cms/content/site/sites.json         | 12 ++---
 .../libs/sling-cms/content/siteconfig/editor.json  |  6 +--
 .../libs/sling-cms/content/static/content.json     | 32 ++++++-------
 .../libs/sling-cms/content/taxonomy/list.json      |  8 ++--
 .../sling-cms/content/usergenerated/content.json   | 14 +++---
 .../static/clientlibs/sling-cms-editor/editor.css  | 29 ++++++++----
 .../static/clientlibs/sling-cms-editor/editor.js   | 52 ++++++++++++++++++--
 23 files changed, 191 insertions(+), 110 deletions(-)

diff --git a/ui/src/main/frontend/gulpfile.js b/ui/src/main/frontend/gulpfile.js
index d91f431..89871e7 100755
--- a/ui/src/main/frontend/gulpfile.js
+++ b/ui/src/main/frontend/gulpfile.js
@@ -55,7 +55,8 @@ gulp.task('styles', function() {
                            .pipe(cleanCSS())
                            .pipe(header(apache2License)),
                         
gulp.src('./node_modules/summernote/dist/summernote-lite.css')
-                           .pipe(cleanCSS())
+                           .pipe(cleanCSS()),
+                        gulp.src('node_modules/jam-icons/css/jam.min.css')
                )
        .pipe(concat('styles.min.css'))
         .pipe(gulp.dest('./dist/jcr_root/static/clientlibs/sling-cms/css'))
@@ -69,6 +70,7 @@ gulp.task('js', function() {
                        './node_modules/handlebars/dist/handlebars.js',
                        './node_modules/summernote/dist/summernote-lite.js',
                        './src/js/scripts.js'
+                       
                ])
                .pipe(uglify({
             output: {
@@ -85,10 +87,11 @@ gulp.task('assets', function() {
                .pipe(gulp.dest('./dist/jcr_root/static/clientlibs/sling-cms'))
                .pipe(gulp.dest('./dist/jcr_root/content/starter'));
        gulp.src('./src/img/sling-logo.svg')
-       .pipe(gulp.dest('./dist/jcr_root/content/starter'))
-       .pipe(gulp.dest('./dist/jcr_root/content/starter'));
+               .pipe(gulp.dest('./dist/jcr_root/content/starter'));
        gulp.src('./node_modules/summernote/dist/font/*')
                
.pipe(gulp.dest('./dist/jcr_root/static/clientlibs/sling-cms/css/font'));
+       gulp.src('./node_modules/jam-icons/fonts/*')
+               
.pipe(gulp.dest('./dist/jcr_root/static/clientlibs/sling-cms/fonts'));
 });
 
 
diff --git a/ui/src/main/frontend/package.json 
b/ui/src/main/frontend/package.json
index 10a85f8..ddcf92e 100644
--- a/ui/src/main/frontend/package.json
+++ b/ui/src/main/frontend/package.json
@@ -9,7 +9,8 @@
   "dependencies": {
        "jquery": "^3.3.1",
        "handlebars": "^4.0.11",
-       "summernote": "^0.8.9"
+       "summernote": "^0.8.9",
+       "jam-icons": "^2.0.0" 
   },
   "devDependencies": {
     "gulp": "^3.9.1",
@@ -23,8 +24,5 @@
     "streamqueue": "^1.1.2",
     "uglify-save-license": "^0.4.1"
   },
-  "scripts": {
-    "test": "echo \"Error: no test specified\" && exit 1"
-  },
   "license": "Apache-2.0"
 }
\ No newline at end of file
diff --git a/ui/src/main/frontend/src/js/scripts.js 
b/ui/src/main/frontend/src/js/scripts.js
index df8ba02..3c75a9a 100644
--- a/ui/src/main/frontend/src/js/scripts.js
+++ b/ui/src/main/frontend/src/js/scripts.js
@@ -337,10 +337,10 @@ Sling.CMS = {
        Sling.CMS.ext['table'] = {
                decorate: function($ctx) {
                        $ctx.find('table tr').click(function(el){
-                               $('#Actions-Target *').appendTo('tr.active 
.Cell-Actions')
+                               $('#Actions-Target > *').appendTo('tr.active 
.Cell-Actions')
                                $('tr').removeClass('active');
                                $(this).addClass('active');
-                               $(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 516cf16..7c0be76 100644
--- a/ui/src/main/frontend/src/scss/styles.scss
+++ b/ui/src/main/frontend/src/scss/styles.scss
@@ -26,6 +26,9 @@
     border: 0;
     margin: .1em;
     text-decoration: none;
+    height: 38px;
+       min-width: 38px;
+       text-align: center;
 }
 
 ul.Breadcrumb  {
@@ -75,6 +78,10 @@ ul.Breadcrumb  {
        display:none;
 }
 
+.jam:before {
+       font-size:18px;
+}
+
 .Modal {
     display: none; 
     position: fixed; 
@@ -94,10 +101,11 @@ ul.Breadcrumb  {
 
 .Modal-Content {
     background-color: white;
-    margin: 20% auto; 
+    margin: 5em auto; 
     padding: 2em;
     border: 1px solid #999;
     width: 75%; 
+    max-width: 700px;
 }
 
 .Modal-Header {
diff --git 
a/ui/src/main/resources/jcr_root/content/sling-cms/errorhandling/401.json 
b/ui/src/main/resources/jcr_root/content/sling-cms/errorhandling/401.json
index 804e702..ce41d15 100644
--- a/ui/src/main/resources/jcr_root/content/sling-cms/errorhandling/401.json
+++ b/ui/src/main/resources/jcr_root/content/sling-cms/errorhandling/401.json
@@ -4,6 +4,7 @@
                "sling:resourceType": "sling-cms/components/pages/error",
                "jcr:title": "Unauthorized",
                "jcr:primaryType": "nt:unstructured",
+               "center": true,
                "container": {
                        "jcr:primaryType": "nt:unstructured",
                        "sling:resourceType": 
"sling-cms/components/general/container",
diff --git 
a/ui/src/main/resources/jcr_root/content/sling-cms/errorhandling/403.json 
b/ui/src/main/resources/jcr_root/content/sling-cms/errorhandling/403.json
index fd97e16..e7685a3 100644
--- a/ui/src/main/resources/jcr_root/content/sling-cms/errorhandling/403.json
+++ b/ui/src/main/resources/jcr_root/content/sling-cms/errorhandling/403.json
@@ -4,6 +4,7 @@
                "sling:resourceType": "sling-cms/components/pages/error",
                "jcr:title": "Forbidden",
                "jcr:primaryType": "nt:unstructured",
+               "center": true,
                "container": {
                        "jcr:primaryType": "nt:unstructured",
                        "sling:resourceType": 
"sling-cms/components/general/container",
diff --git 
a/ui/src/main/resources/jcr_root/content/sling-cms/errorhandling/404.json 
b/ui/src/main/resources/jcr_root/content/sling-cms/errorhandling/404.json
index 0518c56..5faf31a 100644
--- a/ui/src/main/resources/jcr_root/content/sling-cms/errorhandling/404.json
+++ b/ui/src/main/resources/jcr_root/content/sling-cms/errorhandling/404.json
@@ -4,6 +4,7 @@
                "sling:resourceType": "sling-cms/components/pages/error",
                "jcr:title": "Not Found",
                "jcr:primaryType": "nt:unstructured",
+               "center": true,
                "container": {
                        "jcr:primaryType": "nt:unstructured",
                        "sling:resourceType": 
"sling-cms/components/general/container",
diff --git 
a/ui/src/main/resources/jcr_root/content/sling-cms/errorhandling/default.json 
b/ui/src/main/resources/jcr_root/content/sling-cms/errorhandling/default.json
index d7054e8..da21f25 100644
--- 
a/ui/src/main/resources/jcr_root/content/sling-cms/errorhandling/default.json
+++ 
b/ui/src/main/resources/jcr_root/content/sling-cms/errorhandling/default.json
@@ -4,6 +4,7 @@
                "sling:resourceType": "sling-cms/components/pages/error",
                "jcr:title": "Exception",
                "jcr:primaryType": "nt:unstructured",
+               "center": true,
                "container": {
                        "jcr:primaryType": "nt:unstructured",
                        "sling:resourceType": 
"sling-cms/components/general/container",
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 4504a31..6c6c9cf 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
@@ -22,12 +22,14 @@
                <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')}">
-                                       ${actionConfig.valueMap.text}
+                                       <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')}">
-                                       ${actionConfig.valueMap.text}
+                                       <span class="jam 
jam-${actionConfig.valueMap.icon}">
+                                       </span>
                                </a>
                        </c:otherwise>
                </c:choose>
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 c53514e..edda636 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
@@ -22,12 +22,12 @@
                <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}${slingRequest.requestPathInfo.suffix}" 
title="${sling:encode(actionConfig.valueMap.title,'HTML_ATTR')}">
-                                       ${actionConfig.valueMap.text}
+                                       <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}${slingRequest.requestPathInfo.suffix}" 
title="${sling:encode(actionConfig.valueMap.title,'HTML_ATTR')}">
-                                       ${actionConfig.valueMap.text}
+                                       <span class="jam 
jam-${actionConfig.valueMap.icon}"></span>
                                </a>
                        </c:otherwise>
                </c:choose>
diff --git 
a/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/list.json 
b/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/list.json
index 5fcd74c..71e2a81 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/list.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/list.json
@@ -85,21 +85,21 @@
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Edit Site Config",
-                                                                       "text": 
"&#x270f;",
+                                                                       "icon": 
"pencil-f",
                                                                        
"prefix": "/cms/config/metadata.html"
                                                                },
                                                                "movecopy": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Move / Copy Config",
-                                                                       "text": 
"&#x21c6;",
+                                                                       "icon": 
"move-alt",
                                                                        
"prefix": "/cms/shared/movecopy.html"
                                                                },
                                                                "delete": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Delete Site Config",
-                                                                       "text": 
"&times;",
+                                                                       "icon": 
"trash",
                                                                        
"prefix": "/cms/shared/delete.html"
                                                                }
                                                        }
@@ -132,21 +132,21 @@
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Edit Folder",
-                                                                       "text": 
"&#x270f;",
+                                                                       "icon": 
"pencil-f",
                                                                        
"prefix": "/cms/folder/edit.html"
                                                                },
                                                                "movecopy": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Move / Copy Folder",
-                                                                       "text": 
"&#x21c6;",
+                                                                       "icon": 
"move-alt",
                                                                        
"prefix": "/cms/shared/movecopy.html"
                                                                },
                                                                "delete": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Delete Folder",
-                                                                       "text": 
"&times;",
+                                                                       "icon": 
"trash",
                                                                        
"prefix": "/cms/shared/delete.html"
                                                                }
                                                        }
diff --git 
a/ui/src/main/resources/jcr_root/libs/sling-cms/content/i18n/dictionaries.json 
b/ui/src/main/resources/jcr_root/libs/sling-cms/content/i18n/dictionaries.json
index ac27a37..8641d7f 100644
--- 
a/ui/src/main/resources/jcr_root/libs/sling-cms/content/i18n/dictionaries.json
+++ 
b/ui/src/main/resources/jcr_root/libs/sling-cms/content/i18n/dictionaries.json
@@ -76,14 +76,14 @@
                                                                        
"modal": true,
                                                                        "new": 
false,
                                                                        
"title": "Edit Dictionary",
-                                                                       "text": 
"&#x270f;",
+                                                                       "icon": 
"pencil-f",
                                                                        
"prefix": "/cms/folder/edit.html"
                                                                },
                                                                "delete": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Delete i18n Dictionary",
-                                                                       "text": 
"&times;",
+                                                                       "icon": 
"trash",
                                                                        
"prefix": "/cms/shared/delete.html"
                                                                }
                                                        }
diff --git 
a/ui/src/main/resources/jcr_root/libs/sling-cms/content/mappings/list.json 
b/ui/src/main/resources/jcr_root/libs/sling-cms/content/mappings/list.json
index 19a46cf..01804ee 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/mappings/list.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/mappings/list.json
@@ -79,21 +79,21 @@
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Edit Mapping",
-                                                                       "text": 
"&#x270f;",
+                                                                       "icon": 
"pencil-f",
                                                                        
"prefix": "/cms/mappings/edit.html"
                                                                },
                                                                "movecopy": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Move / Copy Mapping",
-                                                                       "text": 
"&#x21c6;",
+                                                                       "icon": 
"move-alt",
                                                                        
"prefix": "/cms/shared/movecopy.html"
                                                                },
                                                                "delete": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Delete Mapping",
-                                                                       "text": 
"&times;",
+                                                                       "icon": 
"trash",
                                                                        
"prefix": "/cms/shared/delete.html"
                                                                }
                                                        }
@@ -126,22 +126,22 @@
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Edit Folder",
-                                                                       "text": 
"&#x270f;",
+                                                                       "icon": 
"pencil-f",
                                                                        
"prefix": "/cms/folder/edit.html"
                                                                },
                                                                "movecopy": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Move / Copy Folder",
-                                                                       "text": 
"&#x21c6;",
+                                                                       "icon": 
"move-alt",
                                                                        
"prefix": "/cms/shared/movecopy.html"
                                                                },
                                                                "delete": {
                                                                        
"jcr:primaryType": "nt:unstructured",
+                                                                       
"modal": true,
                                                                        
"title": "Delete Folder",
-                                                                       "text": 
"&times;",
-                                                                       
"prefix": "/cms/shared/delete.html",
-                                                                       
"modal": true
+                                                                       "icon": 
"trash",
+                                                                       
"prefix": "/cms/shared/delete.html"
                                                                }
                                                        }
                                                }
diff --git 
a/ui/src/main/resources/jcr_root/libs/sling-cms/content/page/edit.json 
b/ui/src/main/resources/jcr_root/libs/sling-cms/content/page/edit.json
index 762c96c..82bc782 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/page/edit.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/page/edit.json
@@ -19,28 +19,28 @@
                                                "modal": true,
                                                "prefix": 
"/cms/page/editproperties.html",
                                                "title": "Edit Page",
-                                               "text": "&#x270f;"
+                                               "icon": "pencil-f"
                                        },
                                        "version": {
                                                "jcr:primaryType": 
"nt:unstructured",
                                                "ajaxPath": ".versionmanager",
                                                "modal": true,
                                                "title": "Manage Versions",
-                                               "text": "&#10710;",
+                                               "icon": "history",
                                                "prefix": 
"/cms/shared/versions.html"
                                        },
                                        "movecopy": {
                                                "jcr:primaryType": 
"nt:unstructured",
                                                "modal": true,
                                                "title": "Move / Copy Page",
-                                               "text": "&#x21c6;",
+                                               "icon": "move-alt",
                                                "prefix": 
"/cms/shared/movecopy.html"
                                        },
                                        "delete": {
                                                "jcr:primaryType": 
"nt:unstructured",
                                                "modal": true,
                                                "title": "Delete Page",
-                                               "text": "&times;",
+                                               "icon": "trash",
                                                "prefix": 
"/cms/shared/delete.html"
                                        }
                                }
diff --git 
a/ui/src/main/resources/jcr_root/content/sling-cms/errorhandling/401.json 
b/ui/src/main/resources/jcr_root/libs/sling-cms/content/page/siteeditproperties.json
similarity index 56%
copy from 
ui/src/main/resources/jcr_root/content/sling-cms/errorhandling/401.json
copy to 
ui/src/main/resources/jcr_root/libs/sling-cms/content/page/siteeditproperties.json
index 804e702..522d698 100644
--- a/ui/src/main/resources/jcr_root/content/sling-cms/errorhandling/401.json
+++ 
b/ui/src/main/resources/jcr_root/libs/sling-cms/content/page/siteeditproperties.json
@@ -1,8 +1,8 @@
 {
        "jcr:primaryType": "sling:Page",
        "jcr:content": {
-               "sling:resourceType": "sling-cms/components/pages/error",
-               "jcr:title": "Unauthorized",
+               "sling:resourceType": "sling-cms/components/pages/base",
+               "jcr:title": "Edit Page",
                "jcr:primaryType": "nt:unstructured",
                "container": {
                        "jcr:primaryType": "nt:unstructured",
@@ -10,7 +10,11 @@
                        "richtext": {
                                "jcr:primaryType": "nt:unstructured",
                                "sling:resourceType": 
"sling-cms/components/general/richtext",
-                               "text": "<h3>Unauthorized</h3><p>You cannot 
access the requested resource.</p><p><a 
href=\"/system/sling/form/login\">Login?</a>"
+                               "text": "<h3>Edit Page</h3>"
+                       },
+                       "pageeditor": {
+                               "jcr:primaryType": "nt:unstructured",
+                               "sling:resourceType": 
"sling-cms/components/cms/pageeditbar/propertieseditor"
                        }
                }
        }
diff --git 
a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/content.json 
b/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/content.json
index 312a9e3..7b1cc8e 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/content.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/content.json
@@ -67,7 +67,7 @@
                                },
                                "types": {
                                        "jcr:primaryType": "nt:unstructured",
-                                       "sling:Page":{
+                                       "sling:Page": {
                                                "jcr:primaryType": 
"nt:unstructured",
                                                "columns": {
                                                        "jcr:primaryType": 
"nt:unstructured",
@@ -104,14 +104,21 @@
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": false,
                                                                        
"title": "Edit Page",
-                                                                       "text": 
"&#x270f;",
+                                                                       "icon": 
"pencil-f",
                                                                        
"prefix": "/cms/page/edit.html"
                                                                },
+                                                               "properties": {
+                                                                       
"jcr:primaryType": "nt:unstructured",
+                                                                       
"modal": true,
+                                                                       
"title": "Edit Page Properties",
+                                                                       "icon": 
"cog",
+                                                                       
"prefix": "/cms/page/siteeditproperties.html"
+                                                               },
                                                                "movecopy": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Move / Copy Page",
-                                                                       "text": 
"&#x21c6;",
+                                                                       "icon": 
"move-alt",
                                                                        
"prefix": "/cms/shared/movecopy.html"
                                                                },
                                                                "version": {
@@ -119,20 +126,20 @@
                                                                        
"ajaxPath": ".versionmanager",
                                                                        
"modal": true,
                                                                        
"title": "Manage Versions",
-                                                                       "text": 
"&#10710;",
+                                                                       "icon": 
"history",
                                                                        
"prefix": "/cms/shared/versions.html"
                                                                },
                                                                "delete": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Delete the specified page",
-                                                                       "text": 
"&times;",
+                                                                       "icon": 
"trash",
                                                                        
"prefix": "/cms/shared/delete.html"
                                                                }
                                                        }
                                                }
                                        },
-                                       "sling:File":{
+                                       "sling:File": {
                                                "jcr:primaryType": 
"nt:unstructured",
                                                "columns": {
                                                        "jcr:primaryType": 
"nt:unstructured",
@@ -168,27 +175,27 @@
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Edit File",
-                                                                       "text": 
"&#x270f;",
+                                                                       "icon": 
"pencil-f",
                                                                        
"prefix": "/cms/file/edit.html"
                                                                },
                                                                "optimize": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": false,
                                                                        
"title": "Optimize File",
-                                                                       "text": 
"+",
+                                                                       "icon": 
"archive",
                                                                        
"prefix": "/cms/file/optimize.html"
                                                                },
                                                                "download": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": false,
                                                                        
"title": "Download file",
-                                                                       "text": 
"&#x21e9;"
+                                                                       "icon": 
"download"
                                                                },
                                                                "movecopy": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Move / Copy File",
-                                                                       "text": 
"&#x21c6;",
+                                                                       "icon": 
"move-alt",
                                                                        
"prefix": "/cms/shared/movecopy.html"
                                                                },
                                                                "version": {
@@ -196,20 +203,20 @@
                                                                        
"ajaxPath": ".versionmanager",
                                                                        
"modal": true,
                                                                        
"title": "Manage Versions",
-                                                                       "text": 
"&#10710;",
+                                                                       "icon": 
"history",
                                                                        
"prefix": "/cms/shared/versions.html"
                                                                },
                                                                "delete": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Delete File",
-                                                                       "text": 
"&times;",
+                                                                       "icon": 
"trash",
                                                                        
"prefix": "/cms/shared/delete.html"
                                                                }
                                                        }
                                                }
                                        },
-                                       "sling:OrderedFolder":{
+                                       "sling:OrderedFolder": {
                                                "jcr:primaryType": 
"nt:unstructured",
                                                "columns": {
                                                        "jcr:primaryType": 
"nt:unstructured",
@@ -246,27 +253,27 @@
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Edit Folder",
-                                                                       "text": 
"&#x270f;",
+                                                                       "icon": 
"pencil-f",
                                                                        
"prefix": "/cms/folder/edit.html"
                                                                },
                                                                "movecopy": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Move / Copy Folder",
-                                                                       "text": 
"&#x21c6;",
+                                                                       "icon": 
"move-alt",
                                                                        
"prefix": "/cms/shared/movecopy.html"
                                                                },
                                                                "delete": {
                                                                        
"jcr:primaryType": "nt:unstructured",
+                                                                       
"modal": true,
                                                                        
"title": "Delete Folder",
-                                                                       "text": 
"&times;",
-                                                                       
"prefix": "/cms/shared/delete.html",
-                                                                       
"modal": true
+                                                                       "icon": 
"trash",
+                                                                       
"prefix": "/cms/shared/delete.html"
                                                                }
                                                        }
                                                }
                                        },
-                                       "sling:Folder":{
+                                       "sling:Folder": {
                                                "jcr:primaryType": 
"nt:unstructured",
                                                "columns": {
                                                        "jcr:primaryType": 
"nt:unstructured",
@@ -303,22 +310,22 @@
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Edit Folder",
-                                                                       "text": 
"&#x270f;",
+                                                                       "icon": 
"pencil-f",
                                                                        
"prefix": "/cms/folder/edit.html"
                                                                },
                                                                "movecopy": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Move / Copy Folder",
-                                                                       "text": 
"&#x21c6;",
+                                                                       "icon": 
"move-alt",
                                                                        
"prefix": "/cms/shared/movecopy.html"
                                                                },
                                                                "delete": {
                                                                        
"jcr:primaryType": "nt:unstructured",
+                                                                       
"modal": true,
                                                                        
"title": "Delete Folder",
-                                                                       "text": 
"&times;",
-                                                                       
"prefix": "/cms/shared/delete.html",
-                                                                       
"modal": true
+                                                                       "icon": 
"trash",
+                                                                       
"prefix": "/cms/shared/delete.html"
                                                                }
                                                        }
                                                }
diff --git 
a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/sites.json 
b/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/sites.json
index ff14f70..aa2f56d 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/sites.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/sites.json
@@ -81,21 +81,21 @@
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Edit Site",
-                                                                       "text": 
"&#x270f;",
+                                                                       "icon": 
"pencil-f",
                                                                        
"prefix": "/cms/site/edit.html"
                                                                },
                                                                "movecopy": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Move / Copy Site",
-                                                                       "text": 
"&#x21c6;",
+                                                                       "icon": 
"move-alt",
                                                                        
"prefix": "/cms/shared/movecopy.html"
                                                                },
                                                                "delete": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Delete the specified site",
-                                                                       "text": 
"&times;",
+                                                                       "icon": 
"trash",
                                                                        
"prefix": "/cms/shared/delete.html"
                                                                }
                                                        }
@@ -129,20 +129,20 @@
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Edit Site Group",
-                                                                       "text": 
"&#x270f;",
+                                                                       "icon": 
"pencil-f",
                                                                        
"prefix": "/cms/folder/editgroup.html"
                                                                },
                                                                "movecopy": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Move / Copy Site Group",
-                                                                       "text": 
"&#x21c6;",
+                                                                       "icon": 
"move-alt",
                                                                        
"prefix": "/cms/shared/movecopy.html"
                                                                },
                                                                "delete": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"title": "Delete Site Group",
-                                                                       "text": 
"&times;",
+                                                                       "icon": 
"trash",
                                                                        
"prefix": "/cms/shared/delete.html",
                                                                        
"modal": true
                                                                }
diff --git 
a/ui/src/main/resources/jcr_root/libs/sling-cms/content/siteconfig/editor.json 
b/ui/src/main/resources/jcr_root/libs/sling-cms/content/siteconfig/editor.json
index f712dc3..49ce2d8 100644
--- 
a/ui/src/main/resources/jcr_root/libs/sling-cms/content/siteconfig/editor.json
+++ 
b/ui/src/main/resources/jcr_root/libs/sling-cms/content/siteconfig/editor.json
@@ -69,21 +69,21 @@
                                                        "modal": false,
                                                        "new": false,
                                                        "title": "Edit 
Template",
-                                                       "text": "&#x270f;",
+                                                       "icon": "pencil-f",
                                                        "prefix": 
"/cms/template/edit.html"
                                                },
                                                "movecopy": {
                                                        "jcr:primaryType": 
"nt:unstructured",
                                                        "modal": true,
                                                        "title": "Move / Copy 
Template",
-                                                       "text": "&#x21c6;",
+                                                       "icon": "move-alt",
                                                        "prefix": 
"/cms/shared/movecopy.html"
                                                },
                                                "delete": {
                                                        "jcr:primaryType": 
"nt:unstructured",
                                                        "modal": true,
                                                        "title": "Delete 
Template",
-                                                       "text": "&times;",
+                                                       "icon": "trash",
                                                        "prefix": 
"/cms/shared/delete.html"
                                                }
                                        }
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 4ab97fb..d7ede68 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
@@ -98,27 +98,27 @@
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Edit File",
-                                                                       "text": 
"&#x270f;",
+                                                                       "icon": 
"pencil-f",
                                                                        
"prefix": "/cms/file/edit.html"
                                                                },
                                                                "optimize": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": false,
                                                                        
"title": "Optimize File",
-                                                                       "text": 
"+",
+                                                                       "icon": 
"archive",
                                                                        
"prefix": "/cms/file/optimize.html"
                                                                },
                                                                "download": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": false,
                                                                        
"title": "Download file",
-                                                                       "text": 
"&#x21e9;"
+                                                                       "icon": 
"download"
                                                                },
                                                                "movecopy": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Move / Copy File",
-                                                                       "text": 
"&#x21c6;",
+                                                                       "icon": 
"move-alt",
                                                                        
"prefix": "/cms/shared/movecopy.html"
                                                                },
                                                                "version": {
@@ -126,14 +126,14 @@
                                                                        
"ajaxPath": ".versionmanager",
                                                                        
"modal": true,
                                                                        
"title": "Manage Versions",
-                                                                       "text": 
"&#10710;",
+                                                                       "icon": 
"history",
                                                                        
"prefix": "/cms/shared/versions.html"
                                                                },
                                                                "delete": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Delete File",
-                                                                       "text": 
"&times;",
+                                                                       "icon": 
"trash",
                                                                        
"prefix": "/cms/shared/delete.html"
                                                                }
                                                        }
@@ -176,22 +176,22 @@
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Edit Folder",
-                                                                       "text": 
"&#x270f;",
+                                                                       "icon": 
"pencil-f",
                                                                        
"prefix": "/cms/folder/edit.html"
                                                                },
                                                                "movecopy": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Move / Copy Folder",
-                                                                       "text": 
"&#x21c6;",
+                                                                       "icon": 
"move-alt",
                                                                        
"prefix": "/cms/shared/movecopy.html"
                                                                },
                                                                "delete": {
                                                                        
"jcr:primaryType": "nt:unstructured",
+                                                                       
"modal": true,
                                                                        
"title": "Delete Folder",
-                                                                       "text": 
"&times;",
-                                                                       
"prefix": "/cms/shared/delete.html",
-                                                                       
"modal": true
+                                                                       "icon": 
"trash",
+                                                                       
"prefix": "/cms/shared/delete.html"
                                                                }
                                                        }
                                                }
@@ -233,22 +233,22 @@
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Edit Folder",
-                                                                       "text": 
"&#x270f;",
+                                                                       "icon": 
"pencil-f",
                                                                        
"prefix": "/cms/folder/edit.html"
                                                                },
                                                                "movecopy": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Move / Copy Folder",
-                                                                       "text": 
"&#x21c6;",
+                                                                       "icon": 
"move-alt",
                                                                        
"prefix": "/cms/shared/movecopy.html"
                                                                },
                                                                "delete": {
                                                                        
"jcr:primaryType": "nt:unstructured",
+                                                                       
"modal": true,
                                                                        
"title": "Delete Folder",
-                                                                       "text": 
"&times;",
-                                                                       
"prefix": "/cms/shared/delete.html",
-                                                                       
"modal": true
+                                                                       "icon": 
"trash",
+                                                                       
"prefix": "/cms/shared/delete.html"
                                                                }
                                                        }
                                                }
diff --git 
a/ui/src/main/resources/jcr_root/libs/sling-cms/content/taxonomy/list.json 
b/ui/src/main/resources/jcr_root/libs/sling-cms/content/taxonomy/list.json
index cd8861e..5d4d4c5 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/taxonomy/list.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/taxonomy/list.json
@@ -75,21 +75,21 @@
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Edit Taxonomy Item",
-                                                                       "text": 
"&#x270f;",
+                                                                       "icon": 
"pencil-f",
                                                                        
"prefix": "/cms/taxonomy/edit.html"
                                                                },
                                                                "movecopy": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Move / Copy Taxonomy Item",
-                                                                       "text": 
"&#x21c6;",
+                                                                       "icon": 
"move-alt",
                                                                        
"prefix": "/cms/shared/movecopy.html"
                                                                },
                                                                "delete": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
-                                                                       
"title": "Delete the specified taxonomy item",
-                                                                       "text": 
"&times;",
+                                                                       
"title": "Delete Taxonomy Item",
+                                                                       "icon": 
"trash",
                                                                        
"prefix": "/cms/shared/delete.html"
                                                                }
                                                        }
diff --git 
a/ui/src/main/resources/jcr_root/libs/sling-cms/content/usergenerated/content.json
 
b/ui/src/main/resources/jcr_root/libs/sling-cms/content/usergenerated/content.json
index 77a21ea..3cc6aae 100644
--- 
a/ui/src/main/resources/jcr_root/libs/sling-cms/content/usergenerated/content.json
+++ 
b/ui/src/main/resources/jcr_root/libs/sling-cms/content/usergenerated/content.json
@@ -91,14 +91,14 @@
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": false,
                                                                        
"title": "Review User Generated Content",
-                                                                       "text": 
"&#x270f;",
+                                                                       "icon": 
"eye",
                                                                        
"prefix": "/cms/usergenerated/review.html"
                                                                },
                                                                "delete": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Delete User Generated Content",
-                                                                       "text": 
"&times;",
+                                                                       "icon": 
"trash",
                                                                        
"prefix": "/cms/shared/delete.html"
                                                                }
                                                        }
@@ -141,22 +141,22 @@
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Edit Folder",
-                                                                       "text": 
"&#x270f;",
+                                                                       "icon": 
"pencil-f",
                                                                        
"prefix": "/cms/folder/edit.html"
                                                                },
                                                                "movecopy": {
                                                                        
"jcr:primaryType": "nt:unstructured",
                                                                        
"modal": true,
                                                                        
"title": "Move / Copy Folder",
-                                                                       "text": 
"&#x21c6;",
+                                                                       "icon": 
"move-alt",
                                                                        
"prefix": "/cms/shared/movecopy.html"
                                                                },
                                                                "delete": {
                                                                        
"jcr:primaryType": "nt:unstructured",
+                                                                       
"modal": true,
                                                                        
"title": "Delete Folder",
-                                                                       "text": 
"&times;",
-                                                                       
"prefix": "/cms/shared/delete.html",
-                                                                       
"modal": true
+                                                                       "icon": 
"trash",
+                                                                       
"prefix": "/cms/shared/delete.html"
                                                                }
                                                        }
                                                }
diff --git 
a/ui/src/main/resources/jcr_root/static/clientlibs/sling-cms-editor/editor.css 
b/ui/src/main/resources/jcr_root/static/clientlibs/sling-cms-editor/editor.css
index 5a84ba8..69f5c0d 100644
--- 
a/ui/src/main/resources/jcr_root/static/clientlibs/sling-cms-editor/editor.css
+++ 
b/ui/src/main/resources/jcr_root/static/clientlibs/sling-cms-editor/editor.css
@@ -30,13 +30,18 @@
 
 .Sling-CMS__edit-bar {
        width: 100%;
-       height: 38px;
+       height: 48px;
        padding: .2em;
        background-color: silver;
        line-height: 12px;
        font-family: "Open Sans", arial, sans-serif;
 }
 
+.Sling-CMS__edit-bar .Button {
+       height: 34px;
+       width: 38px;
+}
+
 .Sling-CMS__edit-button {
        display: inline-block;
        padding: 8px 12px;
@@ -48,7 +53,7 @@
 }
 
 .Sling-CMS__logo {
-       height: 30px;
+       height: 36px;
 }
 
 .Sling-CMS__modal-background {
@@ -66,12 +71,12 @@
 
 .Sling-CMS__modal-box {
        background-color: white;
-       margin: 3em auto;
-       padding: 2em;
-       border: 1px solid gray;
-       width: 85%;
+       margin: 5em auto;
+       border: 1px solid #999;
+       width: 75%;
        z-index: 1001;
-       max-width: 900px;
+       max-width: 700px;
+       position: relative;
 }
 
 .Sling-CMS__modal-frame-container {
@@ -81,6 +86,12 @@
        padding-bottom: 56.25%;
 }
 
+.Sling-CMS__modal-frame-header {
+       cursor: move;
+       padding: 1em;
+       height: 60px;
+}
+
 .Sling-CMS__modal-frame {
        position: absolute;
        top: 0;
@@ -92,11 +103,13 @@
 
 .Sling-CMS__modal-close {
        float: right;
+       padding: 4px 12px;
+       margin: -5px;
 }
 
 .Sling-CMS__page-wrapper-frame {
        position: fixed;
-       top: 30px;
+       top: 40px;
        left: 0px;
        bottom: 0px;
        right: 0px;
diff --git 
a/ui/src/main/resources/jcr_root/static/clientlibs/sling-cms-editor/editor.js 
b/ui/src/main/resources/jcr_root/static/clientlibs/sling-cms-editor/editor.js
index 9610e48..599eb18 100644
--- 
a/ui/src/main/resources/jcr_root/static/clientlibs/sling-cms-editor/editor.js
+++ 
b/ui/src/main/resources/jcr_root/static/clientlibs/sling-cms-editor/editor.js
@@ -38,14 +38,53 @@ if(!window.CMSEditor){
                        $(".Sling-CMS__modal-close").click(function(){
                                CMSEditor.ui.hideModal();
                        });
-                       $(".Sling-CMS__modal-background").click(function(){
-                               CMSEditor.ui.hideModal();
-                       });
-                       $(window).on('keypress',function(e){
+                       window.addEventListener('keypress',function(e){
                                if(e.keyCode==27 && CMSEditor.ui.modalDisplayed 
=== true){
                                        CMSEditor.ui.hideModal();
                                }
-                       });  
+                       });
+
+                       var mouseX;
+                       var mouseY;
+                       
+                       function draggable(element) {
+                               var mouseDown = false;
+                               
+                               var elementX = 0;
+                               var elementY = 0;
+
+                                 // mouse button down over the element
+                               element.addEventListener('mousedown', 
function(evt){
+                                       console.log('mousedown');
+                                       mouseX = evt.clientX;
+                                       mouseY = evt.clientY;
+                                       mouseDown = true;
+                               });
+                               
+                               var moveComplete = function(evt){
+                                       console.log('mouseup');
+                                       mouseDown = false;
+                                       elementX = parseInt(element.style.left) 
|| 0;
+                                       elementY = parseInt(element.style.top) 
|| 0;
+                                       return false;
+                               }
+                               
+                               element.addEventListener('mouseup', 
moveComplete);
+                               document.addEventListener('mouseout', 
moveComplete);
+                               
+                               document.addEventListener('mousemove', 
function(event) {
+                                       if (!mouseDown) {
+                                               return;
+                                       }
+                                       console.log('mousemove');
+                                   var deltaX = event.clientX - mouseX;
+                                   var deltaY = event.clientY - mouseY;
+                                   element.style.left = elementX + deltaX + 
'px';
+                                   element.style.top = elementY + deltaY + 
'px';
+                                   return false;
+                               });
+                       }
+                       draggable($(".Sling-CMS__modal-box")[0]);
                },
                ui: {
                        modalDisplayed: false,
@@ -62,6 +101,9 @@ if(!window.CMSEditor){
                                        CMSEditor.ui.hideModal();
                                }
                                
+                               mouseX = 0;
+                               mouseY = 0;
+                               
                                $(".Sling-CMS__modal-frame-title").text(title);
                                $(".Sling-CMS__modal-box 
iframe").attr('src',url);
                                $(".Sling-CMS__modal-background").show();

Reply via email to