* Bugfix: htmlArea RTE: Correction to InlineDefault plugin causing frame reload.
authorStanislas Rolland <typo3@sjbr.ca>
Wed, 14 Nov 2007 21:18:20 +0000 (21:18 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Wed, 14 Nov 2007 21:18:20 +0000 (21:18 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2708 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultInline/default-inline.js

index 9d5178a..ba10905 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 
        * Feature #6712: htmlArea RTE: make hotkeys configurable in PageTSConfig
        * Feature #6712 continued: htmlArea RTE: adding hotkeys to default configuration settings
+       * Bugfix: htmlArea RTE: Correction to InlineDefault plugin causing frame reload.
 
 2007-11-14  Ingmar Schlecht  <ingmar@typo3.org>
 
index c0afc4b..4083104 100644 (file)
@@ -2,6 +2,7 @@
 
        * Feature #6712: htmlArea RTE: make hotkeys configurable in PageTSConfig
        * Feature #6712 continued: htmlArea RTE: adding hotkeys to default configuration settings
+       * Bugfix: htmlArea RTE: Correction to InlineDefault plugin causing frame reload.
 
 2007-11-13  Stanislas Rolland  <stanislas.rolland@fructifor.ca>
 
index 43b9f65..8a1296f 100644 (file)
@@ -1802,7 +1802,7 @@ HTMLArea.prototype.updateToolbar = function(noStatus) {
        if (this._customUndo) {
                this._undoTakeSnapshot();
        }
-       for (pluginId in this.plugins) {
+       for (var pluginId in this.plugins) {
                if (this.plugins.hasOwnProperty(pluginId)) {
                        var pluginInstance = this.plugins[pluginId].instance;
                        if (typeof(pluginInstance.onUpdateToolbar) === "function") {
index bf795bf..7186320 100644 (file)
@@ -99,19 +99,20 @@ DefaultInline = HTMLArea.plugin.extend({
        onUpdateToolbar : function () {
                var editor = this.editor;
                var buttonList = DefaultInline.buttonList;
-               var buttonId, button, n = buttonList.length, commandState;
+               var buttonId, n = buttonList.length, commandState;
                for (var i = 0; i < n; ++i) {
                        buttonId = buttonList[i][0];
-                       button = editor._toolbarObjects[buttonId];
-                       commandState = false;
-                       if ((editor._editMode != "textmode")) {
-                               try {
-                                       commandState = editor._doc.queryCommandState(buttonId);
-                               } catch(e) {
-                                       commandState = false;
+                       if (typeof(editor._toolbarObjects[buttonId]) !== "undefined") {
+                               commandState = false;
+                               if ((editor._editMode != "textmode")) {
+                                       try {
+                                               commandState = editor._doc.queryCommandState(buttonId);
+                                       } catch(e) {
+                                               commandState = false;
+                                       }
                                }
+                               editor._toolbarObjects[buttonId].state("active", commandState);
                        }
-                       button.state("active", commandState);
                }
        }
 });