Added feature #13116: htmlArea RTE: Allow to hide counting classes
authorStanislas Rolland <typo3@sjbr.ca>
Mon, 12 Apr 2010 18:04:01 +0000 (18:04 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Mon, 12 Apr 2010 18:04:01 +0000 (18:04 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7310 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/doc/manual.sxw
typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockStyle/block-style.js

index e8f54ce..280ade4 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-12  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Added feature #13116: htmlArea RTE: Allow to hide counting classes
+
 2010-04-12  Susanne Moog  <typo3@susanne-moog.de>
 
        * Fixed bug #9851: LICENSE.txt refers to wrong webpage on typo3.com
index 329357b..429be3b 100644 (file)
@@ -1,3 +1,7 @@
+2010-04-12  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Added feature #13116: htmlArea RTE: Allow to hide counting classes
+
 2010-04-11  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #14062: Text Content element crashes (thanks to Jigal van Hemert
index 3a3fada..98fb85a 100644 (file)
Binary files a/typo3/sysext/rtehtmlarea/doc/manual.sxw and b/typo3/sysext/rtehtmlarea/doc/manual.sxw differ
index 7c241ed..9e5b953 100644 (file)
@@ -403,10 +403,18 @@ HTMLArea.BlockStyle = HTMLArea.Plugin.extend({
                                if (cssClass == 'none') {
                                        store.getAt(0).set('text', cssArray[cssClass]);
                                } else {
+                                       var style = null;
+                                       if (!this.editor.config.disablePCexamples) {
+                                               if (HTMLArea.classesValues[cssClass] && !HTMLArea.classesNoShow[cssClass]) {
+                                                       style = HTMLArea.classesValues[cssClass];
+                                               } else if (/-[0-9]+$/.test(cssClass) && HTMLArea.classesValues[RegExp.leftContext + '-'])  {
+                                                       style = HTMLArea.classesValues[RegExp.leftContext + '-'];
+                                               }
+                                       }
                                        store.add(new store.recordType({
                                                text: cssArray[cssClass],
                                                value: cssClass,
-                                               style: (!this.editor.config.disablePCexamples && HTMLArea.classesValues && HTMLArea.classesValues[cssClass] && !HTMLArea.classesNoShow[cssClass]) ? HTMLArea.classesValues[cssClass] : null
+                                               style: style
                                        }));
                                }
                        }