From 758528ba9a6ee6314ca87deb236281bc4d4a4f1b Mon Sep 17 00:00:00 2001 From: Gustavo Cruz Date: Thu, 6 Dec 2012 12:16:39 -0400 Subject: [PATCH] Definitive styles to the Grid Wizard feature for TinyMCE --- .../tiny_mce/plugins/pmGrids/pmGrids.html | 30 +++++++++---------- .../tiny_mce/plugins/pmGrids/pmGrids.js | 10 +++---- gulliver/system/class.wysiwygEditor.php | 8 ++--- 3 files changed, 23 insertions(+), 25 deletions(-) diff --git a/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/pmGrids.html b/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/pmGrids.html index 12a5e968e..83b3e76f2 100644 --- a/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/pmGrids.html +++ b/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/pmGrids.html @@ -17,7 +17,7 @@ and open the template in the editor. body { position: absolute; top: 0px; - left: 45%; + left: 35%; margin-left: -70px; } .container { @@ -41,35 +41,33 @@ and open the template in the editor. Chose a grid    
-
- -
+

-
+
Prefix              
-
-
- -
+
+

+
                    
Border
+
                    
Headers
@@ -82,10 +80,10 @@ and open the template in the editor.
- -
diff --git a/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/pmGrids.js b/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/pmGrids.js index b13348b5a..d7c889343 100644 --- a/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/pmGrids.js +++ b/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/pmGrids.js @@ -63,7 +63,7 @@ $(document).ready(function () { } var insertFormatedGrid = function(){ - var gridName = $("#gridList").val(); + var gridName = $("#gridList option:selected").text(); var tableCode = "" var gridCode = ""; var headerCode = ""; @@ -81,19 +81,19 @@ $(document).ready(function () { headerCode = ''; } gridCode += headerCode+fieldCode+""; - tableCode += gridCode+"
" - updateEditorContent (tableCode); + tableCode += gridCode+""; + updateEditorContent(tableCode); } $('#gridList').change(function(){ getGridFieldList($(this).val()); }); - $('#addButton').click(function(){ + $('#insert').click(function(){ insertFormatedGrid(); }); - $('#cancelButton').click(function(){ + $('#cancel').click(function(){ closePluginPopup(); }); diff --git a/gulliver/system/class.wysiwygEditor.php b/gulliver/system/class.wysiwygEditor.php index 16a8db4bf..0c2193fe6 100644 --- a/gulliver/system/class.wysiwygEditor.php +++ b/gulliver/system/class.wysiwygEditor.php @@ -192,10 +192,10 @@ class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field theme_advanced_buttons3_add : "fullpage", popup_css : "/js/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/dialog.css", handle_event_callback : function(e) { - if(this.isDirty()) { - this.save(); - } - return true; + if(this.isDirty()) { + this.save(); + } + return true; } }); ';