[BUGFIX] RTE: JS exception regarding property disableStyleOnOptionLabel 15/33915/2
authorStanislas Rolland <typo3@sjbr.ca>
Sun, 9 Nov 2014 04:36:37 +0000 (23:36 -0500)
committerStanislas Rolland <typo3@sjbr.ca>
Sun, 9 Nov 2014 04:40:41 +0000 (05:40 +0100)
Problem: BlockStyle plugin checks for property
this.pageTSconfiguration.disableStyleOnOptionLabel without checking
first that this.pageTSconfiguration exists at all.

Releases: master. 6.2
Resolves: #59574
Change-Id: Ic2554e44e6212475826d649416377f6c307df8db
Reviewed-on: http://review.typo3.org/33915
Reviewed-by: Stanislas Rolland <typo3@sjbr.ca>
Tested-by: Stanislas Rolland <typo3@sjbr.ca>
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/block-style.js

index 9ed4734..3a958fa 100644 (file)
@@ -241,7 +241,7 @@ HTMLArea.BlockStyle = Ext.extend(HTMLArea.Plugin, {
                        for (var cssClass in allowedClasses) {
                                if (typeof HTMLArea.classesSelectable[cssClass] === 'undefined' || HTMLArea.classesSelectable[cssClass]) {
                                        var style = null;
-                                       if (!this.pageTSconfiguration.disableStyleOnOptionLabel) {
+                                       if (!this.pageTSconfiguration || !this.pageTSconfiguration.disableStyleOnOptionLabel) {
                                                if (HTMLArea.classesValues[cssClass] && !HTMLArea.classesNoShow[cssClass]) {
                                                        style = HTMLArea.classesValues[cssClass];
                                                } else if (/-[0-9]+$/.test(cssClass) && HTMLArea.classesValues[RegExp.leftContext + '-'])  {