Fixed bug #17676: htmlArea RTE: Some combo stores are loaded twice
authorstan <stan@709f56b5-9817-0410-a4d7-c38de5d9e867>
Sun, 20 Feb 2011 02:56:33 +0000 (02:56 +0000)
committerstan <stan@709f56b5-9817-0410-a4d7-c38de5d9e867>
Sun, 20 Feb 2011 02:56:33 +0000 (02:56 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-5@10500 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/htmlarea/plugins/Language/language.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/SelectFont/select-font.js

index ca351d8..e68c931 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-02-19  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Fixed bug #17676: htmlArea RTE: Some combo stores are loaded twice
+
 2011-02-19  Christian Kuhn  <lolli@schwarzbu.ch>
 
        * Fixed bug #17656: Unit test fails because of invalid clear.gif (Thanks to Alexander Stehlik)
index c5c5181..ec85bee 100644 (file)
@@ -1,3 +1,7 @@
+2011-02-19  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Fixed bug #17676: htmlArea RTE: Some combo stores are loaded twice
+
 2011-02-17  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #17616: htmlArea RTE: Link dialogue doesn't open when anchor class is set with double quotes
index b9dc442..ed0c90a 100644 (file)
@@ -153,11 +153,8 @@ HTMLArea.Language = HTMLArea.Plugin.extend({
                                }
                                return true;
                        }, this);
-                               // Load the language dropdown
-                       select.getStore().load({
-                               callback: function () { this.getButton('Language').setValue('none'); },
-                               scope: this
-                       });
+                               // Monitor the combo's store being loaded
+                       select.mon(select.getStore(), 'load', function () { this.updateValue(select); }, this);
                }
        },
        /*
index 85585c0..1df4021 100644 (file)
@@ -127,13 +127,11 @@ HTMLArea.SelectFont = HTMLArea.Plugin.extend({
         * This funcion is invoked by the editor when it is being generated
         */
        onGenerate: function () {
-                       // Load the dropdowns
+                       // Monitor the dropdowns stores being loaded
                Ext.each(this.dropDownList, function (dropDown) {
-                       if (this.getButton(dropDown[0])) {
-                               this.getButton(dropDown[0]).getStore().load({
-                                       callback: function () { this.getButton(dropDown[0]).setValue('none'); },
-                                       scope: this
-                               })
+                       var select = this.getButton(dropDown[0]);
+                       if (select) {
+                               select.mon(select.getStore(), 'load', function () { select.setValue('none'); });
                        }
                }, this);
        },