Added feature #9370: htmlArea RTE: enhanced toggleborders feature
authorStanislas Rolland <typo3@sjbr.ca>
Wed, 17 Sep 2008 16:09:58 +0000 (16:09 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Wed, 17 Sep 2008 16:09:58 +0000 (16:09 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@4141 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/doc/manual.sxw
typo3/sysext/rtehtmlarea/htmlarea/plugins/TableOperations/table-operations.js

index 14c6b04..8210b41 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-09-17  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Added feature #9370: htmlArea RTE: enhanced toggleborders feature
+
 2008-09-16  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Added feature #9362: htmlArea RTE: highlight active items in context menu as in toolbar
index b16373f..0274cf5 100644 (file)
@@ -1,3 +1,7 @@
+2008-09-17  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Added feature #9370: htmlArea RTE: enhanced toggleborders feature
+
 2008-09-16  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Added feature #9362: htmlArea RTE: highlight active items in context menu as in toolbar
index 6d03efd..c38ba02 100644 (file)
Binary files a/typo3/sysext/rtehtmlarea/doc/manual.sxw and b/typo3/sysext/rtehtmlarea/doc/manual.sxw differ
index 2a01b7e..97f3287 100644 (file)
@@ -487,6 +487,25 @@ TableOperations = HTMLArea.Plugin.extend({
        },
        
        /*
+        * This function gets called when the plugin is generated
+        * Set table borders if requested by configuration
+        */
+       onGenerate : function() {
+               if (this.buttonsConfiguration.toggleborders && this.buttonsConfiguration.toggleborders.setOnRTEOpen) {
+                       this.toggleBorders(true);
+               }
+       },
+       
+       /*
+        * This function gets called when the toolbar is being updated
+        */
+       onUpdateToolbar : function() {
+               if (this.editor.getMode() === "wysiwyg" && this.editor.isEditable() && this.isButtonInToolbar("TO-toggle-borders")) {
+                       this.editor._toolbarObjects["TO-toggle-borders"].state("active", HTMLArea._hasClass(this.editor._doc.body, 'htmlarea-showtableborders'));
+               }
+       },
+       
+       /*
         * This function gets called when a Table Operations button was pressed.
         *
         * @param       object          editor: the editor instance