Added feature #13954: htmlArea RTE: Extjize TYPO3 link, image and user elements dialo...
authorStanislas Rolland <typo3@sjbr.ca>
Mon, 29 Mar 2010 19:23:15 +0000 (19:23 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Mon, 29 Mar 2010 19:23:15 +0000 (19:23 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7223 709f56b5-9817-0410-a4d7-c38de5d9e867

16 files changed:
ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/extensions/TYPO3Image/class.tx_rtehtmlarea_typo3image.php
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultClean/default-clean.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3HtmlParser/typo3html-parser.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Image/typo3image.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Link/typo3link.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/UserElements/user-elements.js
typo3/sysext/rtehtmlarea/htmlarea/skins/default/htmlarea.css
typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php
typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_dam_browse_links.php
typo3/sysext/rtehtmlarea/mod4/class.tx_rtehtmlarea_dam_browse_media.php
typo3/sysext/rtehtmlarea/mod4/class.tx_rtehtmlarea_select_image.php
typo3/sysext/rtehtmlarea/mod5/class.tx_rtehtmlarea_user.php
typo3/sysext/t3skin/rtehtmlarea/htmlarea.css

index 206f66d..24208ab 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-03-29  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Added feature #13954: htmlArea RTE: Extjize TYPO3 link, image and user elements dialogue windows
+
 2010-03-29  Christian Kuhn  <lolli@schwarzbu.ch>
 
        * Fixed bug #13935: t3lib_fullsearch has a lot of hanging SQL record sets
index 4b30ebf..38b4227 100644 (file)
@@ -1,3 +1,7 @@
+2010-03-29  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Added feature #13954: htmlArea RTE: Extjize TYPO3 link, image and user elements dialogue windows
+
 2010-03-24  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Added feature #13909: htmlArea RTE: Extjize the default non-TYPO3 image dialogue
index 36dc9c8..f68c9f4 100644 (file)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 2008-2009 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  (c) 2008-2010 Stanislas Rolland <typo3(arobas)sjbr.ca>
 *  All rights reserved
 *
 *  This script is part of the Typo3 project. The Typo3 project is
@@ -24,7 +24,7 @@
 /**
  * TYPO3 Image plugin for htmlArea RTE
  *
- * @author Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+ * @author Stanislas Rolland <typo3(arobas)sjbr.ca>
  *
  * TYPO3 SVN ID: $Id$
  *
index b9e7d5b..7b23e45 100644 (file)
@@ -1267,7 +1267,7 @@ HTMLArea.Iframe = Ext.extend(Ext.BoxComponent, {
                this.mon(documentElement, (Ext.isIE || Ext.isWebKit) ? 'keydown' : 'keypress', this.onAnyKey, this);
                this.mon(documentElement, 'mouseup', this.onMouse, this);
                this.mon(documentElement, 'click', this.onMouse, this);
-               this.mon(documentElement, 'drag', this.onMouse, this);
+               this.mon(documentElement, Ext.isWebKit ? 'dragend' : 'drop', this.onDrop, this);
        },
        /*
         * Handler for other key events
@@ -1315,6 +1315,15 @@ HTMLArea.Iframe = Ext.extend(Ext.BoxComponent, {
                return true;
        },
        /*
+        * Handlers for drag and drop operations
+        */
+       onDrop: function (event) {
+               if (Ext.isWebKit) {
+                       this.getEditor().cleanAppleStyleSpans.defer(50, this.getEditor(), [this.getEditor().document.body]);
+               }
+               this.getToolbar().updateLater.delay(100);
+       },
+       /*
         * Handler for UP, DOWN, LEFT and RIGHT keys
         */
        onArrow: function () {
@@ -2364,7 +2373,7 @@ HTMLArea.Editor = Ext.extend(Ext.util.Observable, {
                this.addEvents(
                        /*
                         * @event editorready
-                        * Fires when initializatio of the editor is complete
+                        * Fires when initialization of the editor is complete
                         */
                        'editorready',
                        /*
@@ -4294,6 +4303,9 @@ HTMLArea.Plugin = HTMLArea.Base.extend({
         },
 
        /**
+        ***********************************************
+        * THIS FUNCTION IS DEPRECATED AS OF TYPO3 4.4 *
+        ***********************************************
         * Open a dialog window or bring focus to it if is already opened
         *
         * @param       string          buttonId: buttonId requesting the opening of the dialog
@@ -4331,6 +4343,69 @@ HTMLArea.Plugin = HTMLArea.Base.extend({
                                );
                }
        },
+       /*
+        * Open a window with container iframe
+        *
+        * @param       string          buttonId: the id of the button
+        * @param       string          title: the window title (will be localized here)
+        * @param       object          dimensions: the opening dimensions od the window
+        * @param       string          url: the url to load ino the iframe
+        *
+        * @ return     void
+        */
+       openContainerWindow: function (buttonId, title, dimensions, url) {
+               this.dialog = new Ext.Window({
+                       id: this.editor.editorId + buttonId,
+                       title: this.localize(title),
+                       cls: 'htmlarea-window',
+                       width: dimensions.width,
+                       height: dimensions.height,
+                       border: false,
+                               // As of ExtJS 3.1, JS error with IE when the window is resizable
+                       //resizable: !Ext.isIE,
+                       iconCls: buttonId,
+                       listeners: {
+                               afterrender: {
+                                       fn: this.onContainerResize
+                               },
+                               resize: {
+                                       fn: this.onContainerResize
+                               },
+                               close: {
+                                       fn: this.onClose,
+                                       scope: this
+                               }
+                       },
+                       items: {
+                                       // The content iframe
+                               xtype: 'box',
+                               itemId: 'content-iframe',
+                               autoEl: {
+                                       tag: 'iframe',
+                                       cls: 'content-iframe',
+                                       src: url
+                               }
+                       }
+               });
+               this.show();
+       },
+       /*
+        * Handler invoked when the container window is rendered or resized in order to resize the content iframe to maximum size
+        */
+       onContainerResize: function (panel) {
+               var iframe = panel.getComponent('content-iframe');
+               if (iframe.rendered) {
+                       iframe.getEl().setSize(panel.getInnerWidth(), panel.getInnerHeight());
+               }
+       },
+       /*
+        * Get the opening diment=sions of the window
+        *
+        * @param       object          dimensions: default opening width and height set by the plugin
+        * @param       string          buttonId: the id of the button that is triggering the opening of the window
+        *
+        * @return      object          opening width and height of the window
+        */
        getWindowDimensions: function (dimensions, buttonId) {
                        // Apply default dimensions
                var dialogueWindowDimensions = {
@@ -4358,18 +4433,19 @@ HTMLArea.Plugin = HTMLArea.Base.extend({
                }
                return dialogueWindowDimensions;
        },
-
        /**
+        ***********************************************
+        * THIS FUNCTION IS DEPRECATED AS OF TYPO3 4.4 *
+        ***********************************************
         * Make url from the name of a popup of the plugin
         *
         * @param       string          popupName: name, without extension, of the html file to be loaded into the dialog window
         *
         * @return      string          the url
         */
-       makeUrlFromPopupName : function(popupName) {
+       makeUrlFromPopupName: function(popupName) {
                return (popupName ? this.editor.popupURL("plugin://" + this.name + "/" + popupName) : this.editor.popupURL("blank.html"));
        },
-
        /**
         * Make url from module path
         *
@@ -4378,10 +4454,9 @@ HTMLArea.Plugin = HTMLArea.Base.extend({
         *
         * @return      string          the url
         */
-       makeUrlFromModulePath : function(modulePath, parameters) {
-               return this.editor.popupURL(modulePath + "?" + this.editorConfiguration.RTEtsConfigParams + "&editorNo=" + this.editorNumber + "&sys_language_content=" + this.editorConfiguration.sys_language_content + "&contentTypo3Language=" + this.editorConfiguration.typo3ContentLanguage + "&contentTypo3Charset=" + encodeURIComponent(this.editorConfiguration.typo3ContentCharset) + (parameters?parameters:''));
+       makeUrlFromModulePath: function(modulePath, parameters) {
+               return this.editor.popupURL(modulePath + "?" + this.editorConfiguration.RTEtsConfigParams + "&editorNo=" + this.editor.editorId + "&sys_language_content=" + this.editorConfiguration.sys_language_content + "&contentTypo3Language=" + this.editorConfiguration.typo3ContentLanguage + "&contentTypo3Charset=" + encodeURIComponent(this.editorConfiguration.typo3ContentCharset) + (parameters?parameters:''));
        },
-
        /**
         * Append an entry at the end of the troubleshooting log
         *
@@ -4390,7 +4465,7 @@ HTMLArea.Plugin = HTMLArea.Base.extend({
         *
         * @return      void
         */
-       appendToLog : function (functionName, text) {
+       appendToLog: function (functionName, text) {
                HTMLArea._appendToLog("[" + this.name + "::" + functionName + "]: " + text);
        },
        /*
@@ -4507,9 +4582,9 @@ HTMLArea.Plugin = HTMLArea.Base.extend({
 
 /**
  * HTMLArea.Dialog class
- *
- * Every dialog should be an instance of this class
- *
+ *********************************************
+ * THIS OBJECT IS DEPRECATED AS OF TYPO3 4.4 *
+ *********************************************
  */
 HTMLArea.Dialog = HTMLArea.Base.extend({
 
index e630714..2cdc45b 100644 (file)
  * TYPO3 SVN ID: $Id$
  */
 DefaultClean = HTMLArea.Plugin.extend({
-       
-       constructor : function(editor, pluginName) {
+       constructor: function(editor, pluginName) {
                this.base(editor, pluginName);
        },
-       
        /*
         * This function gets called by the class constructor
         */
-       configurePlugin : function(editor) {
-               
+       configurePlugin: function(editor) {
                this.pageTSConfiguration = this.editorConfiguration.buttons.cleanword;
-               
                /*
                 * Registering plugin "About" information
                 */
                var pluginInformation = {
-                       version         : "1.2",
-                       developer       : "Stanislas Rolland",
-                       developerUrl    : "http://www.sjbr.ca/",
-                       copyrightOwner  : "Stanislas Rolland",
-                       sponsor         : "SJBR",
-                       sponsorUrl      : "http://www.sjbr.ca/",
-                       license         : "GPL"
+                       version         : '2.0',
+                       developer       : 'Stanislas Rolland',
+                       developerUrl    : 'http://www.sjbr.ca/',
+                       copyrightOwner  : 'Stanislas Rolland',
+                       sponsor         : 'SJBR',
+                       sponsorUrl      : 'http://www.sjbr.ca/',
+                       license         : 'GPL'
                };
                this.registerPluginInformation(pluginInformation);
-               
                /*
                 * Registering the (hidden) button
                 */
-               var buttonId = "CleanWord";
+               var buttonId = 'CleanWord';
                var buttonConfiguration = {
                        id              : buttonId,
-                       tooltip         : this.localize(buttonId + "-Tooltip"),
-                       action          : "onButtonPress",
+                       tooltip         : this.localize(buttonId + '-Tooltip'),
+                       action          : 'onButtonPress',
                        hide            : true,
                        hideInContextMenu: true
                };
                this.registerButton(buttonConfiguration);
        },
-       
        /*
         * This function gets called when the button was pressed.
         *
@@ -77,11 +71,10 @@ DefaultClean = HTMLArea.Plugin.extend({
         *
         * @return      boolean         false if action is completed
         */
-       onButtonPress : function (editor, id, target) {
+       onButtonPress: function (editor, id, target) {
                        // Could be a button or its hotkey
                var buttonId = this.translateHotKey(id);
                buttonId = buttonId ? buttonId : id;
-               
                this.clean();
                return false;
        },
@@ -89,22 +82,25 @@ DefaultClean = HTMLArea.Plugin.extend({
         * This function gets called when the editor is generated
         */
        onGenerate: function () {
-               var documentElement = Ext.get(Ext.isIE ? this.editor.document.body : this.editor.document.documentElement);
-               this.editor.iframe.mon(documentElement, 'paste', this.wordCleanHandler, this);
-               this.editor.iframe.mon(documentElement, 'dragdrop', this.wordCleanHandler, this);
-               this.editor.iframe.mon(documentElement, 'drop', this.wordCleanHandler, this);
+               this.editor.iframe.mon(Ext.get(Ext.isIE ? this.editor.document.body : this.editor.document.documentElement), 'paste', this.wordCleanHandler, this);
        },
-
-       clean : function () {
+       /*
+        * This function cleans all nodes in the node tree below the input node
+        *
+        * @param       object  node: the root of the node tree to clean
+        *
+        * @return      void
+        */
+       clean: function () {
                function clearClass(node) {
                        var newc = node.className.replace(/(^|\s)mso.*?(\s|$)/ig,' ');
                        if(newc != node.className) {
                                node.className = newc;
                                if(!/\S/.test(node.className)) {
                                        if (!HTMLArea.is_opera) {
-                                               node.removeAttribute("class");
+                                               node.removeAttribute('class');
                                                if (HTMLArea.is_ie) {
-                                                       node.removeAttribute("className");
+                                                       node.removeAttribute('className');
                                                }
                                        } else {
                                                node.className = '';
@@ -114,13 +110,13 @@ DefaultClean = HTMLArea.Plugin.extend({
                }
                function clearStyle(node) {
                        if (HTMLArea.is_ie) var style = node.style.cssText;
-                               else var style = node.getAttribute("style");
+                               else var style = node.getAttribute('style');
                        if (style) {
                                var declarations = style.split(/\s*;\s*/);
                                for (var i = declarations.length; --i >= 0;) {
                                        if(/^mso|^tab-stops/i.test(declarations[i]) || /^margin\s*:\s*0..\s+0..\s+0../i.test(declarations[i])) declarations.splice(i,1);
                                }
-                               node.setAttribute("style", declarations.join("; "));
+                               node.setAttribute('style', declarations.join('; '));
                        }
                }
                function stripTag(el) {
@@ -175,11 +171,6 @@ DefaultClean = HTMLArea.Plugin.extend({
         * Handler for paste, dragdrop and drop events
         */
        wordCleanHandler: function (event) {
-                       // If we dropped an image dragged from the TYPO3 Image plugin, let's close the dialog window
-               if (typeof(HTMLArea.Dialog) != "undefined" && HTMLArea.Dialog.TYPO3Image) {
-                       HTMLArea.Dialog.TYPO3Image.close();
-               } else {
-                       this.clean.defer(250, this);
-               }
+               this.clean.defer(250, this);
        }
 });
index c5515d2..d7ecde0 100644 (file)
  * TYPO3 SVN ID: $Id$
  */
 TYPO3HtmlParser = HTMLArea.Plugin.extend({
-       
-       constructor : function(editor, pluginName) {
+       constructor: function(editor, pluginName) {
                this.base(editor, pluginName);
        },
-       
        /*
         * This function gets called by the class constructor
         */
-       configurePlugin : function(editor) {
-               
+       configurePlugin: function(editor) {
                this.pageTSConfiguration = this.editorConfiguration.buttons.cleanword;
                this.parseHtmlModulePath = this.pageTSConfiguration.pathParseHtmlModule;
-               
                /*
                 * Registering plugin "About" information
                 */
                var pluginInformation = {
-                       version         : "1.8",
-                       developer       : "Stanislas Rolland",
-                       developerUrl    : "http://www.sjbr.ca/",
-                       copyrightOwner  : "Stanislas Rolland",
-                       sponsor         : "SJBR",
-                       sponsorUrl      : "http://www.sjbr.ca/",
-                       license         : "GPL"
+                       version         : '1.8',
+                       developer       : 'Stanislas Rolland',
+                       developerUrl    : 'http://www.sjbr.ca/',
+                       copyrightOwner  : 'Stanislas Rolland',
+                       sponsor         : 'SJBR',
+                       sponsorUrl      : 'http://www.sjbr.ca/',
+                       license         : 'GPL'
                };
                this.registerPluginInformation(pluginInformation);
-               
                /*
                 * Registering the (hidden) button
                 */
-               var buttonId = "CleanWord";
+               var buttonId = 'CleanWord';
                var buttonConfiguration = {
                        id              : buttonId,
-                       tooltip         : this.localize(buttonId + "-Tooltip"),
-                       action          : "onButtonPress",
+                       tooltip         : this.localize(buttonId + '-Tooltip'),
+                       action          : 'onButtonPress',
                        hide            : true,
                        hideInContextMenu: true
                };
                this.registerButton(buttonConfiguration);
        },
-       
        /*
         * This function gets called when the button was pressed.
         *
@@ -78,7 +72,7 @@ TYPO3HtmlParser = HTMLArea.Plugin.extend({
         *
         * @return      boolean         false if action is completed
         */
-       onButtonPress : function (editor, id, target) {
+       onButtonPress: function (editor, id) {
                        // Could be a button or its hotkey
                var buttonId = this.translateHotKey(id);
                buttonId = buttonId ? buttonId : id;
@@ -89,12 +83,8 @@ TYPO3HtmlParser = HTMLArea.Plugin.extend({
         * This function gets called when the editor is generated
         */
        onGenerate: function () {
-               var documentElement = Ext.get(Ext.isIE ? this.editor.document.body : this.editor.document.documentElement);
-               this.editor.iframe.mon(documentElement, 'paste', this.wordCleanHandler, this);
-               this.editor.iframe.mon(documentElement, 'dragdrop', this.wordCleanHandler, this);
-               this.editor.iframe.mon(documentElement, 'drop', this.wordCleanHandler, this);
+               this.editor.iframe.mon(Ext.get(Ext.isIE ? this.editor.document.body : this.editor.document.documentElement), 'paste', this.wordCleanHandler, this);
        },
-       
        clean: function() {
                var editor = this.editor;
                if (Ext.isWebKit) {
@@ -119,11 +109,6 @@ TYPO3HtmlParser = HTMLArea.Plugin.extend({
         * Handler for paste, dragdrop and drop events
         */
        wordCleanHandler: function (event) {
-                       // If we dropped an image dragged from the TYPO3 Image plugin, let's close the dialog window
-               if (typeof(HTMLArea.Dialog) != "undefined" && HTMLArea.Dialog.TYPO3Image) {
-                       HTMLArea.Dialog.TYPO3Image.close();
-               } else {
-                       this.clean.defer(250, this);
-               }
+               this.clean.defer(250, this);
        }
 });
index effb79f..b0d5041 100644 (file)
@@ -1,7 +1,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 2005-2009 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  (c) 2005-2010 Stanislas Rolland <typo3(arobas)sjbr.ca>
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
  * TYPO3 SVN ID: $Id$
  */
 TYPO3Image = HTMLArea.Plugin.extend({
-
-       constructor : function(editor, pluginName) {
+       constructor: function(editor, pluginName) {
                this.base(editor, pluginName);
        },
-
        /*
         * This function gets called by the class constructor
         */
-       configurePlugin : function(editor) {
-
+       configurePlugin: function(editor) {
                this.pageTSConfiguration = this.editorConfiguration.buttons.image;
                this.imageModulePath = this.pageTSConfiguration.pathImageModule;
-
                /*
                 * Registering plugin "About" information
                 */
                var pluginInformation = {
-                       version         : "1.0",
-                       developer       : "Stanislas Rolland",
-                       developerUrl    : "http://www.fructifor.ca/",
-                       copyrightOwner  : "Stanislas Rolland",
-                       sponsor         : "Fructifor Inc.",
-                       sponsorUrl      : "http://www.fructifor.ca/",
-                       license         : "GPL"
+                       version         : '2.0',
+                       developer       : 'Stanislas Rolland',
+                       developerUrl    : 'http://www.sjbr.ca/',
+                       copyrightOwner  : 'Stanislas Rolland',
+                       sponsor         : 'SJBR',
+                       sponsorUrl      : 'http://www.sjbr.ca/',
+                       license         : 'GPL'
                };
                this.registerPluginInformation(pluginInformation);
-
                /*
                 * Registering the button
                 */
-               var buttonId = "InsertImage";
+               var buttonId = 'InsertImage';
                var buttonConfiguration = {
                        id              : buttonId,
-                       tooltip         : this.localize(buttonId + "-Tooltip"),
-                       action          : "onButtonPress",
+                       tooltip         : this.localize(buttonId + '-Tooltip'),
+                       action          : 'onButtonPress',
                        hotKey          : (this.pageTSConfiguration ? this.pageTSConfiguration.hotKey : null),
                        dialog          : true
                };
                this.registerButton(buttonConfiguration);
-
                return true;
         },
-
        /*
         * This function gets called when the button was pressed
         *
         * @param       object          editor: the editor instance
         * @param       string          id: the button id or the key
-        * @param       object          target: the target element of the contextmenu event, when invoked from the context menu
         *
         * @return      boolean         false if action is completed
         */
-       onButtonPress : function(editor, id, target) {
+       onButtonPress: function(editor, id) {
                        // Could be a button or its hotkey
                var buttonId = this.translateHotKey(id);
                buttonId = buttonId ? buttonId : id;
-
                var additionalParameter;
-               if (typeof(target) !== "undefined") {
-                       this.image = target;
-               } else {
-                       this.image = this.editor.getParentElement();
-               }
+               this.image = this.editor.getParentElement();
                if (this.image && !/^img$/i.test(this.image.nodeName)) {
                        this.image = null;
                }
                if (this.image) {
-                       additionalParameter = "&act=image";
+                       additionalParameter = '&act=image';
                }
-
-               this.dialog = this.openDialog("InsertImage", this.makeUrlFromModulePath(this.imageModulePath, additionalParameter), null, null, {width:550, height:350}, "yes");
+               this.openContainerWindow(
+                       buttonId,
+                       buttonId + '-Tooltip',
+                       this.getWindowDimensions(
+                               {
+                                       width:  610,
+                                       height: 390
+                               },
+                               buttonId
+                       ),
+                       this.makeUrlFromModulePath(this.imageModulePath, additionalParameter)
+               );
+               this.dialog.mon(Ext.get(Ext.isIE ? this.editor.document.body : this.editor.document.documentElement), 'drop', this.onDrop, this, {single: true});
                return false;
        },
-
        /*
         * Insert the image
-        * This function is called from the typo3-image-popup
+        * This function is called from the TYPO3 image script
         */
-       insertImage : function(image) {
-               this.editor.focusEditor();
+       insertImage: function(image) {
+               this.editor.focus();
+               this.restoreSelection();
                this.editor.insertHTML(image);
-               this.dialog.close();
+               this.close();
+       },
+       /*
+        * Handlers for drag and drop operations
+        */
+       onDrop: function (event) {
+               if (Ext.isWebKit) {
+                       this.editor.iframe.onDrop();
+               }
+               this.close();
        }
 });
-
index f2b3061..7a5ae0e 100644 (file)
  * TYPO3 SVN ID: $Id$
  */
 TYPO3Link = HTMLArea.Plugin.extend({
-       
-       constructor : function(editor, pluginName) {
+       constructor: function(editor, pluginName) {
                this.base(editor, pluginName);
        },
-       
        /*
         * This function gets called by the class constructor
         */
-       configurePlugin : function(editor) {
-               
+       configurePlugin: function(editor) {
                this.pageTSConfiguration = this.editorConfiguration.buttons.link;
                this.modulePath = this.pageTSConfiguration.pathLinkModule;
                this.classesAnchorUrl = this.pageTSConfiguration.classesAnchorUrl;
-               
                /*
                 * Registering plugin "About" information
                 */
                var pluginInformation = {
-                       version         : "1.2",
-                       developer       : "Stanislas Rolland",
-                       developerUrl    : "http://www.sjbr.ca/",
-                       copyrightOwner  : "Stanislas Rolland",
-                       sponsor         : "SJBR",
-                       sponsorUrl      : "http://www.sjbr.ca/",
-                       license         : "GPL"
+                       version         : '2.0',
+                       developer       : 'Stanislas Rolland',
+                       developerUrl    : 'http://www.sjbr.ca/',
+                       copyrightOwner  : 'Stanislas Rolland',
+                       sponsor         : 'SJBR',
+                       sponsorUrl      : 'http://www.sjbr.ca/',
+                       license         : 'GPL'
                };
                this.registerPluginInformation(pluginInformation);
-               
                /*
                 * Registering the buttons
                 */
@@ -68,7 +63,7 @@ TYPO3Link = HTMLArea.Plugin.extend({
                        var buttonConfiguration = {
                                id              : buttonId,
                                tooltip         : this.localize(buttonId.toLowerCase()),
-                               action          : "onButtonPress",
+                               action          : 'onButtonPress',
                                hotKey          : (this.pageTSConfiguration ? this.pageTSConfiguration.hotKey : null),
                                context         : button[1],
                                selection       : button[2],
@@ -76,18 +71,15 @@ TYPO3Link = HTMLArea.Plugin.extend({
                        };
                        this.registerButton(buttonConfiguration);
                }
-               
                return true;
-        },
-        
+       },
        /*
         * The list of buttons added by this plugin
         */
-       buttonList : [
-               ["CreateLink", "a,img", false, true],
-               ["UnLink", "a", false, false]
+       buttonList: [
+               ['CreateLink', 'a,img', false, true],
+               ['UnLink', 'a', false, false]
        ],
-        
        /*
         * This function gets called when the button was pressed
         *
@@ -97,7 +89,7 @@ TYPO3Link = HTMLArea.Plugin.extend({
         *
         * @return      boolean         false if action is completed
         */
-       onButtonPress : function(editor, id, target) {
+       onButtonPress: function(editor, id, target) {
                        // Could be a button or its hotkey
                var buttonId = this.translateHotKey(id);
                buttonId = buttonId ? buttonId : id;
@@ -141,10 +133,20 @@ TYPO3Link = HTMLArea.Plugin.extend({
                                }
                        }
                }
-               this.dialog = this.openDialog("CreateLink", this.makeUrlFromModulePath(this.modulePath, additionalParameter), null, null, {width:550, height:350}, "yes");
+               this.openContainerWindow(
+                       buttonId,
+                       buttonId.toLowerCase(),
+                       this.getWindowDimensions(
+                               {
+                                       width:  550,
+                                       height: 350
+                               },
+                               buttonId
+                       ),
+                       this.makeUrlFromModulePath(this.modulePath, additionalParameter)
+               );
                return false;
        },
-       
        /*
         * Add a link to the selection.
         * This function is called from the TYPO3 link popup.
@@ -160,6 +162,7 @@ TYPO3Link = HTMLArea.Plugin.extend({
        createLink : function(theLink,cur_target,cur_class,cur_title,additionalValues) {
                var selection, range, anchorClass, imageNode = null, addIconAfterLink;
                this.editor.focusEditor();
+               this.restoreSelection();
                var node = this.editor.getParentElement();
                var el = HTMLArea.getElementObject(node, "a");
                if (el != null && /^a$/i.test(el.nodeName)) node = el;
@@ -209,7 +212,7 @@ TYPO3Link = HTMLArea.Plugin.extend({
                                // We may have created multiple links in as many blocks
                        this.setLinkAttributes(node, range, cur_target, cur_class, cur_title, imageNode, addIconAfterLink, additionalValues);
                }
-               this.dialog.close();
+               this.close();
        },
        
        /*
@@ -218,6 +221,7 @@ TYPO3Link = HTMLArea.Plugin.extend({
        */
        unLink : function() {
                this.editor.focusEditor();
+               this.restoreSelection();
                var node = this.editor.getParentElement();
                var el = HTMLArea.getElementObject(node, "a");
                if (el != null && /^a$/i.test(el.nodeName)) node = el;
@@ -235,7 +239,7 @@ TYPO3Link = HTMLArea.Plugin.extend({
                        this.editor._doc.execCommand("Unlink", false, "");
                }
                if (this.dialog) {
-                       this.dialog.close();
+                       this.close();
                }
        },
        
@@ -381,4 +385,3 @@ TYPO3Link = HTMLArea.Plugin.extend({
                }
        }
 });
-
index dd781bb..5e42a05 100644 (file)
@@ -1,7 +1,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 2005-2009 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  (c) 2005-2010 Stanislas Rolland <typo3(arobas)sjbr.ca>
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
  * TYPO3 SVN ID: $Id$
  */
 UserElements = HTMLArea.Plugin.extend({
-       
-       constructor : function(editor, pluginName) {
+       constructor: function(editor, pluginName) {
                this.base(editor, pluginName);
        },
-       
        /*
         * This function gets called by the class constructor
         */
-       configurePlugin : function(editor) {
-               
+       configurePlugin: function(editor) {
                this.pageTSConfiguration = this.editorConfiguration.buttons.user;
                this.userModulePath = this.pageTSConfiguration.pathUserModule;
-               
                /*
                 * Registering plugin "About" information
                 */
                var pluginInformation = {
-                       version         : "1.6",
-                       developer       : "Stanislas Rolland",
-                       developerUrl    : "http://www.fructifor.ca/",
-                       copyrightOwner  : "Stanislas Rolland",
-                       sponsor         : "Fructifor Inc.",
-                       sponsorUrl      : "http://www.fructifor.ca/",
-                       license         : "GPL"
+                       version         : '2.0',
+                       developer       : 'Stanislas Rolland',
+                       developerUrl    : 'http://www.sjbr.ca/',
+                       copyrightOwner  : 'Stanislas Rolland',
+                       sponsor         : 'SJBR',
+                       sponsorUrl      : 'http://www.sjbr.ca/',
+                       license         : 'GPL'
                };
                this.registerPluginInformation(pluginInformation);
-               
                /*
                 * Registering the button
                 */
-               var buttonId = "UserElements";
+               var buttonId = 'UserElements';
                var buttonConfiguration = {
                        id              : buttonId,
-                       tooltip         : this.localize("Insert custom element"),
-                       action          : "onButtonPress",
+                       tooltip         : this.localize('Insert custom element'),
+                       action          : 'onButtonPress',
                        hotKey          : (this.pageTSConfiguration ? this.pageTSConfiguration.hotKey : null),
                        dialog          : true
                };
                this.registerButton(buttonConfiguration);
-               
                return true;
        },
-       
        /*
         * This function gets called when the button was pressed
         *
@@ -80,9 +73,22 @@ UserElements = HTMLArea.Plugin.extend({
         *
         * @return      boolean         false if action is completed
         */
-       onButtonPress : function(editor, id) {
-               this.dialog = this.openDialog("UserElements", this.makeUrlFromModulePath(this.userModulePath), null, null, {width:550, height:350}, "yes");
+       onButtonPress: function(editor, id) {
+                       // Could be a button or its hotkey
+               var buttonId = this.translateHotKey(id);
+               buttonId = buttonId ? buttonId : id;
+               this.openContainerWindow(
+                       buttonId,
+                       'Insert custom element',
+                       this.getWindowDimensions(
+                               {
+                                       width:  550,
+                                       height: 350
+                               },
+                               buttonId
+                       ),
+                       this.makeUrlFromModulePath(this.userModulePath)
+               );
                return false;
        }
 });
-
index d6f2228..8d12eab 100644 (file)
        color: #000;
        border: 1px solid #A2AAB8;
 }
+.htmlarea-window iframe.content-iframe {
+       background-color: #E4E0DB;
+}
 .htmlarea-window .show-color {
        margin-top: 10px;
        margin-left: 5px;
index 63ffad0..5db6f00 100644 (file)
@@ -3,7 +3,7 @@
 *  Copyright notice
 *
 *  (c) 1999-2009 Kasper Skaarhoj (kasperYYYY@typo3.com)
-*  (c) 2005-2009 Stanislas Rolland <typo3(arobas)sjbr.ca>
+*  (c) 2005-2010 Stanislas Rolland <typo3(arobas)sjbr.ca>
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -457,7 +457,6 @@ class tx_rtehtmlarea_browse_links extends browse_links {
                                $bodyTagAdditions = $hookObject->addBodyTagAdditions($bodyTagAdditions);
                        }
                }
-               $bodyTagAdditions['onLoad'] = 'initDialog();' . $bodyTagAdditions['onLoad'];
                return t3lib_div::implodeAttributes($bodyTagAdditions, TRUE);
        }
 
@@ -471,16 +470,8 @@ class tx_rtehtmlarea_browse_links extends browse_links {
                        // BEGIN accumulation of header JavaScript:
                $JScode = '';
                $JScode.= '
-                       var dialog = window.opener.HTMLArea.Dialog.TYPO3Link;
-                       var plugin = dialog.plugin;
-                       var HTMLArea = window.opener.HTMLArea;
-
-                       function initDialog() {
-                               window.dialog = window.opener.HTMLArea.Dialog.TYPO3Link;
-                               window.plugin = dialog.plugin;
-                               window.HTMLArea = window.opener.HTMLArea;
-                               dialog.captureEvents("skipUnload");
-                       }
+                       var plugin = window.parent.RTEarea["' . $this->editorNo . '"].editor.getPlugin("TYPO3Link");
+                       var HTMLArea = window.parent.HTMLArea;
                        var add_href="'.($this->curUrlArray['href']?'&curUrl[href]='.rawurlencode($this->curUrlArray['href']):'').'";
                        var add_target="'.($this->setTarget?'&curUrl[target]='.rawurlencode($this->setTarget):'').'";
                        var add_class="'.($this->setClass?'&curUrl[class]='.rawurlencode($this->setClass):'').'";
index 9f949b1..7fe5ade 100644 (file)
@@ -290,7 +290,6 @@ class tx_rtehtmlarea_dam_browse_links extends tx_dam_browse_media {
 
                        // Creating backend template object:
                $this->doc = t3lib_div::makeInstance('template');
-               $this->doc->bodyTagAdditions = 'onLoad="initDialog();"';
                $this->doc->backPath = $BACK_PATH;
        }
 
@@ -315,13 +314,8 @@ class tx_rtehtmlarea_dam_browse_links extends tx_dam_browse_media {
                        // BEGIN accumulation of header JavaScript:
                $JScode = '';
                $JScode.= '
-                       var dialog = window.opener.HTMLArea.Dialog.TYPO3Link;
-                       var plugin = dialog.plugin;
-                       var HTMLArea = window.opener.HTMLArea;
-                       function initDialog() {
-                               dialog.captureEvents("skipUnload");
-                       }
-
+                       var plugin = window.parent.RTEarea["' . $this->editorNo . '"].editor.getPlugin("TYPO3Link");
+                       var HTMLArea = window.parent.HTMLArea;
                                // This JavaScript is primarily for RTE/Link. jumpToUrl is used in the other cases as well...
                        var add_href="'.($this->curUrlArray['href']?'&curUrl[href]='.rawurlencode($this->curUrlArray['href']):'').'";
                        var add_target="'.($this->setTarget?'&curUrl[target]='.rawurlencode($this->setTarget):'').'";
index e1c9337..bfed8dc 100644 (file)
@@ -3,7 +3,7 @@
 *  Copyright notice
 *
 *  (c) 1999-2009 Kasper Skaarhoj (kasper@typo3.com)
-*  (c) 2004-2009 Stanislas Rolland <typo3(arobas)sjbr.ca>
+*  (c) 2004-2010 Stanislas Rolland <typo3(arobas)sjbr.ca>
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -29,7 +29,6 @@
  * Displays image selector for the RTE
  *
  * @author     Kasper Skaarhoj <kasper@typo3.com>
- * @author     Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
  *
  * $Id$  *
  */
@@ -247,7 +246,6 @@ class tx_rtehtmlarea_dam_browse_media extends tx_dam_browse_media {
 
                        // Creating backend template object:
                $this->doc = t3lib_div::makeInstance('template');
-               $this->doc->bodyTagAdditions = 'onLoad="initDialog();"';
                $this->doc->backPath = $BACK_PATH;
        }
 
@@ -332,8 +330,7 @@ class tx_rtehtmlarea_dam_browse_media extends tx_dam_browse_media {
 </head>
 <script type="text/javascript">
 /*<![CDATA[*/
-       var dialog = window.opener.HTMLArea.Dialog["TYPO3Image"];
-       var plugin = dialog.plugin;
+       var plugin = window.parent.RTEarea["' . $this->editorNo . '"].editor.getPlugin("TYPO3Image");
        function insertImage(file,width,height,alt,title)       {
                plugin.insertImage(\'<img src="\'+file+\'"'  . ($this->defaultClass?(' class="'.$this->defaultClass.'"'):'') . ' alt="\'+alt+\'" title="\'+title+\'" width="\'+parseInt(width)+\'" height="\'+parseInt(height)+\'" />\');
        }
@@ -358,12 +355,11 @@ class tx_rtehtmlarea_dam_browse_media extends tx_dam_browse_media {
                global $LANG,$BACK_PATH,$TYPO3_CONF_VARS;
 
                $JScode='
-                       var dialog = window.opener.HTMLArea.Dialog.TYPO3Image;
-                       var plugin = dialog.plugin;
-                       var HTMLArea = window.opener.HTMLArea;
-
-                       function initDialog() {
-                               dialog.captureEvents("skipUnload");
+                       var plugin = window.parent.RTEarea["' . $editorNo . '"].editor.getPlugin("TYPO3Image");
+                       var HTMLArea = window.parent.HTMLArea;
+                       var Ext = window.parent.Ext;
+                       if (Ext.isWebKit) {
+                               plugin.dialog.mon(Ext.get(plugin.dialog.getComponent("content-iframe").getEl().dom.contentWindow.document.documentElement), "dragend", plugin.onDrop, plugin, {single: true});
                        }
                        function insertElement(table, uid, type, filename,fp,filetype,imagefile,action, close)  {
                                return jumpToUrl(\''.$this->thisScript.'?act='.$this->act.'&mode='.$this->mode.'&bparams='.$this->bparams.'&insertImage='.'\'+fp);
@@ -532,7 +528,7 @@ class tx_rtehtmlarea_dam_browse_media extends tx_dam_browse_media {
                                                        selectedImageRef.removeAttribute("clickenlarge");
                                                }
                                        }
-                                       dialog.close();
+                                       plugin.close();
                                }
                                return false;
                        }
index b2f79ff..662a911 100644 (file)
@@ -3,7 +3,7 @@
 *  Copyright notice
 *
 *  (c) 1999-2009 Kasper Skaarhoj (kasper@typo3.com)
-*  (c) 2004-2009 Stanislas Rolland <typo3(arobas)sjbr.ca>
+*  (c) 2004-2010 Stanislas Rolland <typo3(arobas)sjbr.ca>
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -166,7 +166,7 @@ class tx_rtehtmlarea_select_image extends browse_links {
                $this->fileProcessor = t3lib_div::makeInstance('t3lib_basicFileFunctions');
                $this->fileProcessor->init($GLOBALS['FILEMOUNTS'], $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']);
 
-               $this->allowedItems = $this->getAllowedItems('dragdrop,magic,plain,image', $this->buttonConfig);
+               $this->allowedItems = $this->getAllowedItems('magic,plain,image', $this->buttonConfig);
                reset($this->allowedItems);
                if (!in_array($this->act,$this->allowedItems))  {
                        $this->act = current($this->allowedItems);
@@ -259,7 +259,7 @@ class tx_rtehtmlarea_select_image extends browse_links {
         * @return      string          the body tag additions
         */
        public function getBodyTagAdditions() {
-               return 'onLoad="initDialog();"';
+               return '';
        }
 
        /**
@@ -389,17 +389,16 @@ class tx_rtehtmlarea_select_image extends browse_links {
 <html>
 <head>
        <title>Untitled</title>
+       <script type="text/javascript">
+       /*<![CDATA[*/
+               var plugin = window.parent.RTEarea["' . $this->editorNo . '"].editor.getPlugin("TYPO3Image");
+               function insertImage(file,width,height,alt,title,additionalParams)      {
+                       plugin.insertImage(\'<img src="\'+file+\'" width="\'+parseInt(width)+\'" height="\'+parseInt(height)+\'"\''  . ($this->defaultClass?('+\' class="'.$this->defaultClass.'"\''):'') .
+                               '+(alt?\' alt="\'+alt+\'"\':\'\')+(title?\' title="\'+title+\'"\':\'\')+(additionalParams?\' \'+additionalParams:\'\')+\' />\');
+               }
+       /*]]>*/
+       </script>
 </head>
-<script type="text/javascript">
-/*<![CDATA[*/
-       var dialog = window.opener.HTMLArea.Dialog.TYPO3Image;
-       var plugin = dialog.plugin;
-       function insertImage(file,width,height,alt,title,additionalParams)      {
-               plugin.insertImage(\'<img src="\'+file+\'" width="\'+parseInt(width)+\'" height="\'+parseInt(height)+\'"\''  . ($this->defaultClass?('+\' class="'.$this->defaultClass.'"\''):'') .
-                       '+(alt?\' alt="\'+alt+\'"\':\'\')+(title?\' title="\'+title+\'"\':\'\')+(additionalParams?\' \'+additionalParams:\'\')+\' />\');
-       }
-/*]]>*/
-</script>
 <body>
 <script type="text/javascript">
 /*<![CDATA[*/
@@ -446,17 +445,12 @@ class tx_rtehtmlarea_select_image extends browse_links {
                }
 
                $JScode='
-                       var dialog = window.opener.HTMLArea.Dialog.TYPO3Image;
-                       var plugin = dialog.plugin;
-                       var HTMLArea = window.opener.HTMLArea;
-
-                       function initDialog() {
-                               window.dialog = window.opener.HTMLArea.Dialog.TYPO3Image;
-                               window.plugin = dialog.plugin;
-                               window.HTMLArea = window.opener.HTMLArea;
-                               dialog.captureEvents("skipUnload");
+                       var plugin = window.parent.RTEarea["' . $editorNo . '"].editor.getPlugin("TYPO3Image");
+                       var HTMLArea = window.parent.HTMLArea;
+                       var Ext = window.parent.Ext;
+                       if (Ext.isWebKit) {
+                               plugin.dialog.mon(Ext.get(plugin.dialog.getComponent("content-iframe").getEl().dom.contentWindow.document.documentElement), "dragend", plugin.onDrop, plugin, {single: true});
                        }
-
                        function jumpToUrl(URL,anchor)  {
                                var add_act = URL.indexOf("act=")==-1 ? "&act='.$act.'" : "";
                                var add_editorNo = URL.indexOf("editorNo=")==-1 ? "&editorNo='.$editorNo.'" : "";
@@ -491,7 +485,7 @@ class tx_rtehtmlarea_select_image extends browse_links {
                                var classesImage = ' . ($this->thisConfig['classesImage']?'true':'false') . ';
                                if (classesImage) var styleSelector=\'<select id="iClass" name="iClass" style="width:140px;">' . $classesImageJSOptions  . '</select>\';
                                var floatSelector=\'<select id="iFloat" name="iFloat"><option value="">' . $LANG->getLL('notSet') . '</option><option value="none">' . $LANG->getLL('nonFloating') . '</option><option value="left">' . $LANG->getLL('left') . '</option><option value="right">' . $LANG->getLL('right') . '</option></select>\';
-                               if (plugin.isButtonInToolbar("Language")) {
+                               /*if (plugin.isButtonInToolbar("Language")) {
                                        var languageOptions = plugin.getDropDownConfiguration("Language").options;
                                        var languageSelector = \'<select id="iLang" name="iLang">\';
                                        for (var option in languageOptions) {
@@ -500,7 +494,7 @@ class tx_rtehtmlarea_select_image extends browse_links {
                                                }
                                        }
                                        languageSelector += \'</select>\';
-                               }
+                               }*/
                                var bgColor=\' class="bgColor4"\';
                                var sz="";
                                sz+=\'<table border=0 cellpadding=1 cellspacing=1><form action="" name="imageData">\';
@@ -533,9 +527,9 @@ class tx_rtehtmlarea_select_image extends browse_links {
                                .(in_array('alt', $removedProperties)?'':'
                                sz+=\'<tr><td\'+bgColor+\'><label for="iAlt">'.$LANG->getLL('alt').': </label></td><td><input type="text" id="iAlt" name="iAlt"'.$GLOBALS['TBE_TEMPLATE']->formWidth(20).' /></td></tr>\';')
                                .(in_array('lang', $removedProperties)?'':'
-                               if (plugin.isButtonInToolbar("Language")) {
+                               /*if (plugin.isButtonInToolbar("Language")) {
                                        sz+=\'<tr><td\'+bgColor+\'><label for="iLang">\' + plugin.getPluginInstance("Language").localize(\'Language-Tooltip\') + \': </label></td><td>\' + languageSelector + \'</td></tr>\';
-                               }')
+                               }*/')
                                .(in_array('clickenlarge', $removedProperties)?'':'
                                sz+=\'<tr><td\'+bgColor+\'><label for="iClickEnlarge">'.$LANG->sL('LLL:EXT:cms/locallang_ttc.php:image_zoom',1).' </label></td><td><input type="checkbox" name="iClickEnlarge" id="iClickEnlarge" value="0" /></td></tr>\';').'
                                sz+=\'<tr><td><input type="submit" value="'.$LANG->getLL('update').'" onClick="return setImageProperties();"></td></tr>\';
@@ -643,7 +637,7 @@ class tx_rtehtmlarea_select_image extends browse_links {
                                                        selectedImageRef.removeAttribute("clickenlarge");
                                                }
                                        }
-                                       dialog.close();
+                                       plugin.close();
                                }
                                return false;
                        }
index 27b5eaa..28de698 100644 (file)
@@ -3,7 +3,7 @@
 *  Copyright notice
 *
 *  (c) 1999-2009 Kasper Skaarhoj (kasper@typo3.com)
-*  (c) 2005-2009 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  (c) 2005-2010 Stanislas Rolland <typo3(arobas)sjbr.ca>
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -29,7 +29,7 @@
  * User defined content for htmlArea RTE
  *
  * @author     Kasper Skaarhoj <kasper@typo3.com>
- * @author     Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+ * @author     Stanislas Rolland <typo3(arobas)sjbr.ca>
  *
  * $Id$  *
  */
@@ -67,33 +67,36 @@ class tx_rtehtmlarea_user {
                ';
 
                $JScode = '
-                       var HTMLArea = window.opener.HTMLArea;
-                       var dialog = HTMLArea.Dialog.UserElements;
-                       var editor = dialog.plugin.editor;
+                       var plugin = window.parent.RTEarea["' . $this->editorNo . '"].editor.getPlugin("UserElements");
+                       var HTMLArea = window.parent.HTMLArea;
+                       var editor = plugin.editor;
 
                        function Init() {
-                               dialog.captureEvents("skipUnload");
                        };
                        function insertHTML(content,noHide) {
+                               plugin.restoreSelection();
                                editor.insertHTML(content);
-                               if(!noHide) dialog.close();
+                               if(!noHide) plugin.close();
                        };
                        function wrapHTML(wrap1,wrap2,noHide) {
+                               plugin.restoreSelection();
                                if(editor.hasSelectedText()) {
                                        editor.surroundHTML(wrap1,wrap2);
                                } else {
                                        alert('.$LANG->JScharCode($LANG->getLL('noTextSelection')).');
                                }
-                               if(!noHide) dialog.close();
+                               if(!noHide) plugin.close();
                        };
                        function processSelection(script) {
+                               plugin.restoreSelection();
                                document.process.action = script;
                                document.process.processContent.value = editor.getSelectedHTML();
                                document.process.submit();
                        };
                        function jumpToUrl(URL) {
                                var RTEtsConfigParams = "&RTEtsConfigParams='.rawurlencode(t3lib_div::_GP('RTEtsConfigParams')).'";
-                               theLocation = "'.t3lib_div::getIndpEnv('SCRIPT_NAME').'"+URL+RTEtsConfigParams;
+                               var editorNo = "&editorNo=' . rawurlencode($this->editorNo) . '";
+                               theLocation = "'.t3lib_div::getIndpEnv('SCRIPT_NAME').'"+URL+RTEtsConfigParams+editorNo;
                                window.location.href = theLocation;
                        }
                ';
index 6968936..1f6498e 100644 (file)
        color: #000;
        border: 1px solid #A2AAB8;
 }
+.htmlarea-window iframe.content-iframe {
+       background-color: #EFEFF4;
+}
 .htmlarea-window .show-color {
        margin-top: 10px;
        margin-left: 5px;