This is an automated email from the ASF dual-hosted git repository.
jeb 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 e2dceeb SLING-7986 changes from merge
new 0b35cd5 Merge branch 'master' of
https://github.com/apache/sling-org-apache-sling-app-cms.git
e2dceeb is described below
commit e2dceebb5bf5245814ed5f81b273ec36c79b5193
Author: JE Bailey <[email protected]>
AuthorDate: Thu Oct 11 11:29:16 2018 -0400
SLING-7986 changes from merge
---
ui/src/main/frontend/gulpfile.js | 7 -------
ui/src/main/frontend/src/js/cms.form.js | 4 ++--
ui/src/main/frontend/src/js/cms.js | 28 +++++++++++++++-------------
3 files changed, 17 insertions(+), 22 deletions(-)
diff --git a/ui/src/main/frontend/gulpfile.js b/ui/src/main/frontend/gulpfile.js
index 3720bee..fd5c4f6 100755
--- a/ui/src/main/frontend/gulpfile.js
+++ b/ui/src/main/frontend/gulpfile.js
@@ -91,13 +91,6 @@ gulp.task('cms-js', function() {
'./src/js/cms.js',
'./src/js/cms.*.js'
])
- .pipe(uglify({
- output: {
- comments: saveLicense
- }
- }).on('error', function (err) {
- log('[Error] ' + err.toString());
- }))
.pipe(concat('scripts-all.min.js'))
.pipe(gulp.dest('./dist/jcr_root/static/clientlibs/sling-cms/js'));
});
diff --git a/ui/src/main/frontend/src/js/cms.form.js
b/ui/src/main/frontend/src/js/cms.form.js
index ba54088..a855560 100644
--- a/ui/src/main/frontend/src/js/cms.form.js
+++ b/ui/src/main/frontend/src/js/cms.form.js
@@ -96,7 +96,7 @@ nomnom.decorate('.Get-Form', {
nomnom.decorate(".repeating", {
events : {
".repeating__add" : {
- click : function(){
+ click : function(event){
event.preventDefault();
var $rep = $(this);
var $div =
$("<div/>").html($rep.find(".repeating__template").html());
@@ -104,7 +104,7 @@ nomnom.decorate(".repeating", {
}
},
".repeating__remove" : {
- click : function() {
+ click : function(event) {
event.preventDefault();
var $rem = $(event.target);
$rem.parents(".repeating__item").remove();
diff --git a/ui/src/main/frontend/src/js/cms.js
b/ui/src/main/frontend/src/js/cms.js
index e22c344..8d05921 100644
--- a/ui/src/main/frontend/src/js/cms.js
+++ b/ui/src/main/frontend/src/js/cms.js
@@ -100,18 +100,20 @@ Sling.CMS = {
-nomnom.decorate('.suffix-form', class{
- "submit::"(event) {
- event.preventDefault();
- var suffix = $(this).find('input[name=suffix]').val();
- var path = $(this).attr('action');
- window.location = path + suffix;
- return false;
+nomnom.decorate('.suffix-form', {
+ events :{
+ submit : function(event){
+ event.preventDefault();
+ var suffix = $(this).find('input[name=suffix]').val();
+ var path = $(this).attr('action');
+ window.location = path + suffix;
+ return false;
+ }
}
});
-nomnom.decorate('.richtext', class{
- initCallback(){
+nomnom.decorate('.richtext', {
+ initCallback: function(){
$(this).summernote({
toolbar: [
['style', ['bold', 'italic', 'clear','strikethrough',
'superscript', 'subscript']],
@@ -135,8 +137,8 @@ nomnom.decorate('.richtext', class{
}
});
-nomnom.decorate('.page-properties-container', class{
- initCallback(){
+nomnom.decorate('.page-properties-container', {
+ initCallback: function(){
var $ctr = $(this);
var $wrapper = $ctr.closest('.form-wrapper');
$($ctr.data('source')).change(function(){
@@ -157,8 +159,8 @@ nomnom.decorate('.page-properties-container', class{
}
});
-nomnom.decorate(".namehint",class {
- initCallback(){
+nomnom.decorate(".namehint", {
+ initCallback: function(){
var $nh = $(this);
$nh.parents('.Form-Ajax').find('select[name="sling:resourceType"]').change(function(){
var resourceType = $(this).val().split("\/");