Added feature #15879: htmlArea RTE: Use TYPO3 ExtJS API for RTE notification dialogues
authorStanislas Rolland <typo3@sjbr.ca>
Sun, 3 Oct 2010 00:15:51 +0000 (00:15 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Sun, 3 Oct 2010 00:15:51 +0000 (00:15 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8942 709f56b5-9817-0410-a4d7-c38de5d9e867

17 files changed:
ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js
typo3/sysext/rtehtmlarea/htmlarea/locallang_msg.xml
typo3/sysext/rtehtmlarea/htmlarea/plugins/CopyPaste/copy-paste.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/CopyPaste/locallang.xml
typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultImage/default-image.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultImage/locallang.xml
typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultLink/default-link.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultLink/locallang.xml
typo3/sysext/rtehtmlarea/htmlarea/plugins/FindReplace/find-replace.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/QuickTag/quick-tag.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/RemoveFormat/remove-format.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/SpellChecker/spell-checker.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/TableOperations/table-operations.js
typo3/sysext/rtehtmlarea/pi2/class.tx_rtehtmlarea_pi2.php

index 803aa89..3d8b863 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-10-02  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Added feature #15879: htmlArea RTE: Use TYPO3 ExtJS API for RTE notification dialogues
+
 2010-09-30  Francois Suter  <francois@typo3.org>
 
        * Fixed bug #15639: Scheduler: Add missing classes and interface to autoload registry (Thanks to Marcus Krause)
index 516dd06..b09a75b 100644 (file)
@@ -1,3 +1,7 @@
+2010-10-02  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Added feature #15879: htmlArea RTE: Use TYPO3 ExtJS API for RTE notification dialogues
+
 2010-09-29  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #15858: htlmArea RTE: Stylesheet access error in Google Chrome 7
index 317e5bf..42da09b 100644 (file)
@@ -364,6 +364,7 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                        if (!$GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['enableCompressedScripts']) {
                                $pageRenderer->enableExtJsDebug();
                        }
+                       $pageRenderer->addJsFile('../t3lib/js/extjs/notifications.js');
                        /* =======================================
                         * DRAW THE EDITOR
                         * =======================================
index 4f5416f..3f24400 100644 (file)
@@ -2572,7 +2572,10 @@ HTMLArea.Editor = Ext.extend(Ext.util.Observable, {
                                        this.document.body.innerHTML = this.getHTML();
                                } catch(e) {
                                        HTMLArea._appendToLog('[HTMLArea.Editor::setMode]: The HTML document is not well-formed.');
-                                       alert(HTMLArea.I18N.msg['HTML-document-not-well-formed']);
+                                       TYPO3.Dialog.ErrorDialog({
+                                               title: 'htmlArea RTE',
+                                               msg: HTMLArea.I18N.msg['HTML-document-not-well-formed']
+                                       });
                                        break;
                                }
                                this.textAreaContainer.hide();
@@ -3226,7 +3229,7 @@ HTMLArea.Editor.prototype.execCommand = function(cmdID, UI, param) {
                        try {
                                this.document.execCommand(cmdID, UI, param);
                        } catch(e) {
-                               if (this.config.debug) alert(e + "\n\nby execCommand(" + cmdID + ");");
+                               HTMLArea._appendToLog('[HTMLArea.Editor::execCommand]: ' + e + 'by execCommand(' + cmdID + ')');
                        }
        }
        this.toolbar.update();
@@ -3358,10 +3361,16 @@ HTMLArea.getHTML = function(root, outputRoot, editor){
        try {
                return HTMLArea.getHTMLWrapper(root,outputRoot,editor);
        } catch(e) {
-               HTMLArea._appendToLog("The HTML document is not well-formed.");
-               if (!HTMLArea.enableDebugMode) alert(HTMLArea.I18N.msg["HTML-document-not-well-formed"]);
-                       else return HTMLArea.getHTMLWrapper(root,outputRoot,editor);
-               return editor.document.body.innerHTML;
+               HTMLArea._appendToLog('[HTMLArea::getHTML]: The HTML document is not well-formed.');
+               if (!HTMLArea.enableDebugMode) {
+                       TYPO3.Dialog.ErrorDialog({
+                               title: 'htmlArea RTE',
+                               msg: HTMLArea.I18N.msg['HTML-document-not-well-formed']
+                       });
+                       return editor.document.body.innerHTML;
+               } else {
+                       return HTMLArea.getHTMLWrapper(root,outputRoot,editor);
+               }
        }
 };
 
index 2abf81c..3f91dcc 100644 (file)
                        <label index="TEXT_MODE">You are in TEXT MODE.  Use the [&lt;&gt;] button to switch back to WYSIWYG.</label>
                        <label index="ActiveX-required">Loading the editor in Internet Explorer requires the execution of ActiveX controls to be enabled.</label>
                        <label index="HTML-document-not-well-formed">The HTML document is not well-formed.</label>
-                       <label index="Moz-Clipboard">Unprivileged scripts cannot access Cut/Copy/Paste programatically for security reasons. Click OK to see a technical note at mozilla.org which shows you how to allow a script to access the clipboard.</label>
-                       <label index="Moz-Extension">For security reasons, unprivileged applications cannot access the clipboard. Click OK to install a component that will enable applications from this site to access the clipboard and perform copy, cut and paste operations.</label>
+                       <label index="Moz-Clipboard">Unprivileged scripts cannot access Cut/Copy/Paste programatically for security reasons. Click YES to see a technical note at mozilla.org which shows you how to allow a script to access the clipboard.</label>
+                       <label index="Moz-Extension">For security reasons, unprivileged applications cannot access the clipboard. Click YES to install a component that will enable applications from this site to access the clipboard and perform copy, cut and paste operations.</label>
                        <label index="Moz-Extension-Success">The installation was successful. You need to exit and restart your browser for the change to take effect.</label>
-                       <label index="Moz-Extension-Failure">Sorry, the installation failed.</label>
+                       <label index="Moz-Extension-Failure">Sorry, Firefox Add-on AllowClipboard Helper could not be installed.</label>
                        <label index="Moz-Extension-Install-Not-Enabled">The installation cannot be performed. Please change your browser preferences in order to allow installation of sofware from this site.</label>
                        <label index="Allow-Clipboard-Helper-Extension">For security reasons, unprivileged applications cannot access the clipboard. Click YES to install a component that will enable you to specify the sites or pages that will be allowed to access the clipboard and perform copy, cut and paste operations.</label>
-                       <label index="Mozilla-Org-Install-Not-Enabled">The installation cannot be performed. Please change your browser preferences in order to allow installation of sofware from http://addons.mozilla.org.</label>
+                       <label index="Mozilla-Org-Install-Not-Enabled">The installation cannot be performed. Please change your browser preferences in order to allow installation of sofware from https://addons.mozilla.org.</label>
                        <label index="Allow-Clipboard-Helper-Extension-Success">The installation was successful. You need to exit and restart your browser for the change to take effect. Afterwards, use the AllowClipboard Helper from the tools menu to allow specific sites to use the clipboard.</label>
                </languageKey>
        </data>
index 99fe9ff..6109472 100644 (file)
@@ -45,7 +45,7 @@ HTMLArea.CopyPaste = HTMLArea.Plugin.extend({
                 * Registering plugin "About" information
                 */
                var pluginInformation = {
-                       version         : '2.0',
+                       version         : '2.1',
                        developer       : 'Stanislas Rolland',
                        developerUrl    : 'http://www.sjbr.ca/',
                        copyrightOwner  : 'Stanislas Rolland',
@@ -445,37 +445,63 @@ HTMLArea.CopyPaste = HTMLArea.Plugin.extend({
         */
        mozillaClipboardAccessException: function () {
                if (InstallTrigger && this.buttonsConfiguration.paste && this.buttonsConfiguration.paste.mozillaAllowClipboardURL) {
-                       Ext.MessageBox.confirm('', this.localize('Allow-Clipboard-Helper-Extension'), function (button) {
-                               if (button == 'yes') {
-                                       if (InstallTrigger.enabled()) {
-                                               var self = this;
-                                               function mozillaInstallCallback(url, returnCode) {
-                                                       if (returnCode == 0) {
-                                                               Ext.MessageBox.alert('', self.localize('Allow-Clipboard-Helper-Extension-Success'));
-                                                       } else {
-                                                               Ext.MessageBox.alert('', self.localize('Moz-Extension-Failure'));
-                                                               self.appendToLog('mozillaInstallCallback', 'Mozilla install return code was: ' + returnCode + '.');
-                                                       }
-                                                       return;
-                                               }
-                                               var mozillaXpi = new Object();
-                                               mozillaXpi['AllowClipboard Helper'] = this.buttonsConfiguration.paste.mozillaAllowClipboardURL;
-                                               InstallTrigger.install(mozillaXpi, mozillaInstallCallback);
-                                       } else {
-                                               Ext.MessageBox.alert('', this.localize('Mozilla-Org-Install-Not-Enabled'));
-                                               this.appendToLog('mozillaClipboardAccessException', 'Mozilla install was not enabled.');
-                                       }
-                               }
-                       }, this);
+                       TYPO3.Dialog.QuestionDialog({
+                               title: this.localize('Allow-Clipboard-Helper-Add-On-Title'),
+                               msg: this.localize('Allow-Clipboard-Helper-Extension'),
+                               fn: this.installAllowClipboardHelperExtension,
+                               scope: this
+                       });
                } else {
-                       Ext.MessageBox.confirm('', this.localize('Moz-Clipboard'), function (button) {
-                               if (button == 'yes') {
-                                       window.open('http://mozilla.org/editor/midasdemo/securityprefs.html');
+                       TYPO3.Dialog.QuestionDialog({
+                               title: this.localize('Firefox-Security-Prefs-Question-Title'),
+                               msg: this.localize('Moz-Clipboard'),
+                               fn: function (button) {
+                                       if (button == 'yes') {
+                                               window.open('http://mozilla.org/editor/midasdemo/securityprefs.html');
+                                       }
                                }
-                       }, this);
+                       });
                        if (!InstallTrigger) {
                                this.appendToLog('mozillaClipboardAccessException', 'Firefox InstallTrigger was not defined.');
                        }
                }
+       },
+       /*
+        * Install AllowClipboardHelperExtension
+        *
+        * @param       string          button: yes or no button was clicked in the dialogue
+        *
+        * @return      void
+        */
+       installAllowClipboardHelperExtension: function (button) {
+               if (button == 'yes') {
+                       if (InstallTrigger.enabled()) {
+                               var self = this;
+                               function mozillaInstallCallback(url, returnCode) {
+                                       if (returnCode == 0) {
+                                               TYPO3.Dialog.InformationDialog({
+                                                       title: self.localize('Allow-Clipboard-Helper-Add-On-Title'),
+                                                       msg: self.localize('Allow-Clipboard-Helper-Extension-Success')
+                                               });
+                                       } else {
+                                               TYPO3.Dialog.ErrorDialog({
+                                                       title: self.localize('Allow-Clipboard-Helper-Add-On-Title'),
+                                                       msg: self.localize('Moz-Extension-Failure')
+                                               });
+                                               self.appendToLog('installAllowClipboardHelperExtension', 'Mozilla install return code was: ' + returnCode + '.');
+                                       }
+                                       return false;
+                               }
+                               var mozillaXpi = new Object();
+                               mozillaXpi['AllowClipboard Helper'] = this.buttonsConfiguration.paste.mozillaAllowClipboardURL;
+                               InstallTrigger.install(mozillaXpi, mozillaInstallCallback);
+                       } else {
+                               TYPO3.Dialog.ErrorDialog({
+                                       title: this.localize('Allow-Clipboard-Helper-Add-On-Title'),
+                                       msg: this.localize('Mozilla-Org-Install-Not-Enabled')
+                               });
+                               this.appendToLog('installAllowClipboardHelperExtension', 'Mozilla install was not enabled.');
+                       }
+               }
        }
 });
index 6459b7f..c4f60e8 100644 (file)
@@ -7,10 +7,8 @@
        </meta>
        <data type="array">
                <languageKey index="default" type="array">
-                       <label index="How many columns would you like to copy?">How many columns would you like to copy?</label>
-                       <label index="How many rows would you like to copy?">How many rows would you like to copy?</label>
-                       <label index="How many columns would you like to cut?">How many columns would you like to cut?</label>
-                       <label index="How many rows would you like to cut?">How many rows would you like to cut?</label>
+                       <label index="Allow-Clipboard-Helper-Add-On-Title">Firefox Add-on AllowClipboard Helper</label>
+                       <label index="Firefox-Security-Prefs-Question-Title">Firefox Clipboard Access Security Settings</label>
                        <label index="Technische Universitat Ilmenau">Technische Universit├Ąt Ilmenau</label>
                </languageKey>
        </data>
index a664d03..0db98f1 100644 (file)
@@ -405,10 +405,18 @@ HTMLArea.DefaultImage = HTMLArea.Plugin.extend({
                        try {
                                window.ipreview.location.replace(url);
                        } catch (e) {
-                               Ext.MessageBox.alert('', this.localize('image_url_invalid'), function () { tabPanel.setActiveTab(0); urlField.focus(); });
+                               TYPO3.Dialog.InformationDialog({
+                                       title: this.localize('Image Preview'),
+                                       msg: this.localize('image_url_invalid'),
+                                       fn: function () { tabPanel.setActiveTab(0); urlField.focus(); }
+                               });
                        }
                } else {
-                       Ext.MessageBox.alert('', this.localize('image_url_first'), function () { tabPanel.setActiveTab(0); urlField.focus(); });
+                       TYPO3.Dialog.InformationDialog({
+                               title: this.localize('Image Preview'),
+                               msg: this.localize('image_url_first'),
+                               fn: function () { tabPanel.setActiveTab(0); urlField.focus(); }
+                       });
                }
                return false;
        },
@@ -430,7 +438,11 @@ HTMLArea.DefaultImage = HTMLArea.Plugin.extend({
                        this.close();
                } else {
                        var tabPanel = this.dialog.find('itemId', 'tabpanel')[0];
-                       Ext.MessageBox.alert('', this.localize('image_url_required'), function () { tabPanel.setActiveTab(0); urlField.focus(); });
+                       TYPO3.Dialog.InformationDialog({
+                               title: this.localize('image_url'),
+                               msg: this.localize('image_url_required'),
+                               fn: function () { tabPanel.setActiveTab(0); urlField.focus(); }
+                       });
                }
                return false;
        },
index bc187fa..b591235 100644 (file)
@@ -14,6 +14,7 @@
                        <label index="Top:">Top:</label>
                        <label index="Right:">Right:</label>
                        <label index="Bottom:">Bottom:</label>
+                       <label index="image_url">Image URL</label>
                        <label index="image_url_invalid">The url could not be accessed or is not a valid image.</label>
                </languageKey>
        </data>
index 33847b0..9706eb0 100644 (file)
@@ -131,7 +131,10 @@ HTMLArea.DefaultLink = HTMLArea.Plugin.extend({
                                if (!this.link) {
                                        var selection = this.editor._getSelection();
                                        if (this.editor._selectionEmpty(selection)) {
-                                               Ext.MessageBox.alert('', this.localize('Select some text'));
+                                               TYPO3.Dialog.InformationDialog({
+                                                       title: this.getButton(buttonId).tooltip.title,
+                                                       msg: this.localize('Select some text')
+                                               });
                                                break;
                                        }
                                        this.parameters = {
@@ -293,7 +296,7 @@ HTMLArea.DefaultLink = HTMLArea.Plugin.extend({
        onOK: function () {
                var hrefField = this.dialog.find('itemId', 'href')[0];
                var href = hrefField.getValue().trim();
-               if (href) {
+               if (href && href != 'http://') {
                        var title = this.dialog.find('itemId', 'title')[0].getValue();
                        var target = this.dialog.find('itemId', 'target')[0].getValue();
                        if (target == '_other') {
@@ -302,7 +305,11 @@ HTMLArea.DefaultLink = HTMLArea.Plugin.extend({
                        this.createLink(href, title, target);
                        this.close();
                } else {
-                       Ext.MessageBox.alert('', this.localize('link_url_required'), function () { hrefField.focus(); });
+                       TYPO3.Dialog.InformationDialog({
+                               title: this.localize('URL'),
+                               msg: this.localize('link_url_required'),
+                               fn: function () { hrefField.focus(); }
+                       });
                }
                return false;
        },
index 31a27da..261606f 100644 (file)
@@ -7,6 +7,7 @@
        </meta>
        <data type="array">
                <languageKey index="default" type="array">
+                       <label index="URL">URL</label>
                        <label index="Select some text">You need to select some text before creating a link</label>
                        <label index="frame">Frame name:</label>
                        <label index="frame_help">Enter the name of the frame to be used as target</label>
index 7015d4c..00a9c06 100644 (file)
@@ -272,7 +272,12 @@ HTMLArea.FindReplace = HTMLArea.Plugin.extend({
         */
        requestReplacement: function () {
                if (!this.dialog.find('itemId', 'replacement')[0].getValue() && this.dialog.find('itemId', 'replaceAll')[0].getValue()) {
-                       Ext.MessageBox.alert('', this.localize('Inform a replacement word'));
+                       TYPO3.Dialog.InformationDialog({
+                               title: this.getButton('FindReplace').tooltip.title,
+                               msg: this.localize('Inform a replacement word'),
+                               fn: function () { this.dialog.find('itemId', 'replacement')[0].focus(); },
+                               scope: this
+                       });
                }
                this.clearDoc();
        },
@@ -281,8 +286,12 @@ HTMLArea.FindReplace = HTMLArea.Plugin.extend({
         */
        onNext: function () {
                if (!this.dialog.find('itemId', 'pattern')[0].getValue()) {
-                       Ext.MessageBox.alert('', this.localize('Enter the text you want to find'));
-                       this.dialog.find('itemId', 'pattern')[0].focus();
+                       TYPO3.Dialog.InformationDialog({
+                               title: this.getButton('FindReplace').tooltip.title,
+                               msg: this.localize('Enter the text you want to find'),
+                               fn: function () { this.dialog.find('itemId', 'pattern')[0].focus(); },
+                               scope: this
+                       });
                        return false;
                }
                var fields = [
@@ -361,7 +370,12 @@ HTMLArea.FindReplace = HTMLArea.Plugin.extend({
                                                replace('yes');
                                                return true;
                                        } else {
-                                               Ext.MessageBox.confirm('', this.localize('Substitute this occurrence?'), replace, this);
+                                               TYPO3.Dialog.QuestionDialog({
+                                                       title: this.getButton('FindReplace').tooltip.title,
+                                                       msg: this.localize('Substitute this occurrence?'),
+                                                       fn: replace,
+                                                       scope: this
+                                               });
                                                return false;
                                        }
                                }
@@ -399,8 +413,11 @@ HTMLArea.FindReplace = HTMLArea.Plugin.extend({
                                message += '"' + pattern + '" ' + this.localize('not found');
                                this.disableActions('hiliteall,clear', true);
                        }
-                       Ext.MessageBox.minWidth = 300;
-                       Ext.MessageBox.alert('', message + '.');
+                       TYPO3.Dialog.InformationDialog({
+                               title: this.getButton('FindReplace').tooltip.title,
+                               msg: message + '.',
+                               minWidth: 300
+                       });
                }
        },
        /*
index a949e3e..489b073 100644 (file)
@@ -399,16 +399,23 @@ HTMLArea.QuickTag = HTMLArea.Plugin.extend({
                var insertedTag = this.insertedTag.getValue();
                var currentTag = this.tagCombo.getValue();
                if (!insertedTag) {
-                       Ext.MessageBox.alert('', this.localize("Enter the TAG you want to insert"));
-                       this.insertedTag.focus();
+                       TYPO3.Dialog.InformationDialog({
+                               title: this.getButton('InsertTag').tooltip.title,
+                               msg: this.localize('Enter the TAG you want to insert'),
+                               fn: function () { this.insertedTag.focus(); },
+                               scope: this
+                       });
                        event.stopEvent();
                        return false;
                }
                if (this.quotes.test(insertedTag)) {
                        if (this.quotes.test(insertedTag + '"')) {
-                               Ext.MessageBox.alert('', this.localize("There are some unclosed quote"));
-                               this.insertedTag.focus();
-                               this.insertedTag.select();
+                               TYPO3.Dialog.InformationDialog({
+                                       title: this.getButton('InsertTag').tooltip.title,
+                                       msg: this.localize('There are some unclosed quote'),
+                                       fn: function () { this.insertedTag.focus(); this.insertedTag.select(); },
+                                       scope: this
+                               });
                                event.stopEvent();
                                return false;
                        } else {
index d787f00..5bbfe6b 100644 (file)
@@ -190,7 +190,10 @@ HTMLArea.RemoveFormat = HTMLArea.Plugin.extend({
                        this.applyRequest(params);
                        this.close();
                } else {
-                       Ext.MessageBox.alert('', this.localize('Select the type of formatting you wish to remove.'));
+                       TYPO3.Dialog.InformationDialog({
+                               title: this.getButton('RemoveFormat').tooltip.title,
+                               msg: this.localize('Select the type of formatting you wish to remove.')
+                       });
                }
                return false;
        },
index 015309d..9f70284 100644 (file)
@@ -441,11 +441,16 @@ HTMLArea.SpellChecker = HTMLArea.Plugin.extend({
         */
        onCancel: function () {
                if (this.modified) {
-                       Ext.MessageBox.confirm('', this.localize('QUIT_CONFIRMATION'), function (button) {
-                               if (button == 'yes') {
-                                       this.close();
-                               }
-                       }, this);
+                       TYPO3.Dialog.QuestionDialog({
+                               title: this.getButton('SpellCheck').tooltip.title,
+                               msg: this.localize('QUIT_CONFIRMATION'),
+                               fn: function (button) { 
+                                       if (button == 'yes') {
+                                               this.close();
+                                       }
+                               },
+                               scope: this
+                       });
                        return false;
                } else {
                        return this.base();
@@ -552,10 +557,17 @@ HTMLArea.SpellChecker = HTMLArea.Plugin.extend({
                        }
                } else {
                        if (!this.modified) {
-                               Ext.MessageBox.alert('', this.localize('NO_ERRORS_CLOSING'));
-                               this.onOK();
+                               TYPO3.Dialog.InformationDialog({
+                                       title: this.getButton('SpellCheck').tooltip.title,
+                                       msg: this.localize('NO_ERRORS_CLOSING'),
+                                       fn: this.onOK,
+                                       scope: this
+                               });
                        } else {
-                               Ext.MessageBox.alert('', this.localize('NO_ERRORS'));
+                               TYPO3.Dialog.InformationDialog({
+                                       title: this.getButton('SpellCheck').tooltip.title,
+                                       msg: this.localize('NO_ERRORS')
+                               });
                        }
                        return false;
                }
@@ -723,7 +735,10 @@ HTMLArea.SpellChecker = HTMLArea.Plugin.extend({
                } while (index != start && this.misspelledWords[index].htmlareaFixed);
                if (index == start) {
                        index = 0;
-                       Ext.MessageBox.alert('', this.localize('Finished list of mispelled words'));
+                       TYPO3.Dialog.InformationDialog({
+                               title: this.getButton('SpellCheck').tooltip.title,
+                               msg: this.localize('Finished list of mispelled words')
+                       });
                }
                this.setCurrentWord(this.misspelledWords[index], true);
                return false;
@@ -786,14 +801,20 @@ HTMLArea.SpellChecker = HTMLArea.Plugin.extend({
        onInfoClick: function () {
                var info = this.dialog.getComponent('spell-check-iframe').getEl().dom.contentWindow.spellcheckInfo;
                if (!info) {
-                       Ext.MessageBox.alert('', this.localize('No information available'));
+                       TYPO3.Dialog.InformationDialog({
+                               title: this.getButton('SpellCheck').tooltip.title,
+                               msg: this.localize('No information available')
+                       });
                } else {
-                       var txt = this.localize('Document information') + '<br />';
+                       var txt = '';
                        Ext.iterate(info, function (key, value) {
-                               txt += '<br />' + this.localize(key) + ': ' + value;
+                               txt += (txt ? '<br />' : '') + this.localize(key) + ': ' + value;
                        }, this);
                        txt += ' ' + this.localize('seconds');
-                       Ext.MessageBox.alert('', txt);
+                       TYPO3.Dialog.InformationDialog({
+                               title: this.localize('Document information'),
+                               msg: txt
+                       });
                }
                return false;
        }
index b0a8992..1130a83 100644 (file)
@@ -129,7 +129,7 @@ HTMLArea.TableOperations = HTMLArea.Plugin.extend({
                ['cell-insert-before',  'td,th',                        'cellinsertbefore', false, 'cell-insert-before'],
                ['cell-insert-after',   'td,th',                        'cellinsertafter', false, 'cell-insert-after'],
                ['cell-delete',         'td,th',                        'celldelete', false, 'cell-delete'],
-               ['cell-merge',          'tr',                           'cellmerge', false, 'cell-merge'],
+               ['cell-merge',          Ext.isGecko? 'tr' : 'td,th',    'cellmerge', false, 'cell-merge'],
                ['cell-split',          'td,th[colSpan!=1,rowSpan!=1]', 'cellsplit', false, 'cell-split']
        ],
        /*
@@ -398,7 +398,10 @@ HTMLArea.TableOperations = HTMLArea.Plugin.extend({
                if (this.properties.required) {
                        if (this.properties.required.indexOf('captionOrSummary') != -1) {
                                if (!/\S/.test(params.f_caption) && !/\S/.test(params.f_summary)) {
-                                       Ext.MessageBox.alert(this.localize('Error'), this.localize('captionOrSummary' + '-required'));
+                                       TYPO3.Dialog.ErrorDialog({
+                                               title: this.getButton(this.dialog.arguments.buttonId).tooltip.title,
+                                               msg: this.localize('captionOrSummary' + '-required')
+                                       });
                                        var field = this.dialog.find('itemId', 'f_caption')[0];
                                        var tab = field.findParentByType('container');
                                        tab.ownerCt.activate(tab);
@@ -412,7 +415,10 @@ HTMLArea.TableOperations = HTMLArea.Plugin.extend({
                                };
                                Ext.iterate(required, function (item) {
                                        if (!params[item] && this.properties.required.indexOf(required[item]) != -1) {
-                                               Ext.MessageBox.alert(this.localize('Error'), this.localize(required[item] + '-required'));
+                                               TYPO3.Dialog.ErrorDialog({
+                                                       title: this.getButton(this.dialog.arguments.buttonId).tooltip.title,
+                                                       msg: this.localize(required[item] + '-required')
+                                               });
                                                var field = this.dialog.find('itemId', item)[0];
                                                var tab = field.findParentByType('container');
                                                tab.ownerCt.activate(tab);
@@ -434,7 +440,10 @@ HTMLArea.TableOperations = HTMLArea.Plugin.extend({
                        };
                        Ext.iterate(required, function (item) {
                                if (!params[item]) {
-                                       Ext.MessageBox.alert(this.localize('Error'), this.localize(required[item]));
+                                       TYPO3.Dialog.ErrorDialog({
+                                               title: this.getButton(this.dialog.arguments.buttonId).tooltip.title,
+                                               msg: this.localize(required[item])
+                                       });
                                        var field = this.dialog.find('itemId', item)[0];
                                        var tab = field.findParentByType('container');
                                        tab.ownerCt.activate(tab);
@@ -1038,7 +1047,10 @@ HTMLArea.TableOperations = HTMLArea.Plugin.extend({
                                var cell = this.getClosest("td");
                                if (!cell) var cell = this.getClosest("th");
                                if (!cell) {
-                                       Ext.MessageBox.alert('', this.localize("Please click into some cell"));
+                                       TYPO3.Dialog.InformationDialog({
+                                               title: this.getButton('TO-cell-merge').tooltip.title,
+                                               msg: this.localize('Please click into some cell')
+                                       });
                                        break;
                                }
                                var tr = cell.parentElement;
@@ -1134,7 +1146,7 @@ HTMLArea.TableOperations = HTMLArea.Plugin.extend({
                        this.toggleBorders();
                        break;
                    default:
-                       alert("Button [" + buttonId + "] not yet implemented");
+                       break;
                }
        },
        /*
index db54588..f489f9d 100644 (file)
@@ -220,6 +220,7 @@ class tx_rtehtmlarea_pi2 extends tx_rtehtmlarea_base {
                }
                $pageRenderer->addCssFile($this->siteURL . 't3lib/js/extjs/ux/resize.css');
                $pageRenderer->addJsFile($this->siteURL . 't3lib/js/extjs/ux/ext.resizable.js');
+               $pageRenderer->addJsFile($this->siteURL . '/t3lib/js/extjs/notifications.js');
                if ($this->TCEform->RTEcounter == 1) {
                        $this->TCEform->additionalJS_pre['rtehtmlarea-loadJScode'] = $this->loadJScode($this->TCEform->RTEcounter);
                }