From 52d438149816779434f6ca28e21100456f840fa1 Mon Sep 17 00:00:00 2001 From: sim2github Date: Sun, 10 Aug 2014 00:19:21 +0300 Subject: [PATCH 1/3] Add gitignore config --- .gitignore | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8311786 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +# FILES IGNORED BY GIT + +# OS generated files +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# PHPStorm files +.idea/ +# Cache files +cms/cache/* From 3e2648b386aec37917a3226e4a4816edeaa54ee2 Mon Sep 17 00:00:00 2001 From: sim2github Date: Sun, 10 Aug 2014 13:03:05 +0300 Subject: [PATCH 2/3] Ace integration --- cms/templates/admin/main.tpl | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/cms/templates/admin/main.tpl b/cms/templates/admin/main.tpl index 7d8085f..b6b5ae8 100644 --- a/cms/templates/admin/main.tpl +++ b/cms/templates/admin/main.tpl @@ -49,7 +49,40 @@ - + + + + + + + + + + From e0f739cfea4a99623e8888c5b47dffdff5f28c01 Mon Sep 17 00:00:00 2001 From: sim2github Date: Mon, 11 Aug 2014 01:31:34 +0300 Subject: [PATCH 3/3] Insert buttons support --- cms/templates/admin/subtemplates/edit.inc.tpl | 6 +++--- static/js/admin_backend.js | 12 +----------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/cms/templates/admin/subtemplates/edit.inc.tpl b/cms/templates/admin/subtemplates/edit.inc.tpl index 9686e83..cf20cbd 100644 --- a/cms/templates/admin/subtemplates/edit.inc.tpl +++ b/cms/templates/admin/subtemplates/edit.inc.tpl @@ -88,15 +88,15 @@
diff --git a/static/js/admin_backend.js b/static/js/admin_backend.js index d46eb1d..33cb656 100644 --- a/static/js/admin_backend.js +++ b/static/js/admin_backend.js @@ -1,16 +1,6 @@ $.fn.extend({ insertAtCaret: function(myValue){ -var obj; -if( typeof this[0].name !='undefined' ) obj = this[0]; -else obj = this; -var startPos = obj.selectionStart; -var endPos = obj.selectionEnd; -var scrollTop = obj.scrollTop; -obj.value = obj.value.substring(0, startPos)+myValue+obj.value.substring(endPos,obj.value.length); -obj.focus(); -obj.selectionStart = startPos + myValue.length; -obj.selectionEnd = startPos + myValue.length; -obj.scrollTop = scrollTop; +editor.insert(myValue); } });