Index: typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php =================================================================== --- typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php (révision 10480) +++ typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php (copie de travail) @@ -421,8 +421,7 @@
' . $LANG->getLL('Please wait') . '
' . ($TYPO3_CONF_VARS['EXTCONF'][$this->ID]['enableDebugMode'] ? '
' : '') . ' - '; + ' . LF; } // Return form item: @@ -761,7 +760,6 @@ RTEarea[0].editorSkin = "' . dirname($this->editorCSS) . '/"; RTEarea[0].editedContentCSS = "' . t3lib_div::createVersionNumberedFilename($this->editedContentCSS) . '"; RTEarea[0].hostUrl = "' . $this->hostURL . '"; - RTEarea[0].enableDebugMode = ' . ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['enableDebugMode'] ? 'true' : 'false') . '; RTEarea.init = function() { if (typeof(HTMLArea) == "undefined" || !Ext.isReady) { window.setTimeout("RTEarea.init();", 40); Index: typo3/sysext/rtehtmlarea/ext_conf_template.txt =================================================================== --- typo3/sysext/rtehtmlarea/ext_conf_template.txt (révision 10480) +++ typo3/sysext/rtehtmlarea/ext_conf_template.txt (copie de travail) @@ -28,8 +28,5 @@ # cat=basic/enable/170; type=boolean; label=Force Aspell command mode: If set, the spellchecker will use the Aspell command interface. Presumably. PHP is compiled with pspell, but with an old version of Aspell. If set, PHP safe mode should NOT be enabled. forceCommandMode = 0 - # cat=basic/enable/190; type=boolean; label=Enable troubleshooting mode: If set, a troubleshooting log will be displayed below the editing area. -enableDebugMode = 0 - # cat=basic/enable/180; type=boolean; label=Enable compressed scripts: If set, the compressed version of the editor scripts will be used. enableCompressedScripts = 1 \ No newline at end of file Index: typo3/sysext/rtehtmlarea/ext_localconf.php =================================================================== --- typo3/sysext/rtehtmlarea/ext_localconf.php (révision 10480) +++ typo3/sysext/rtehtmlarea/ext_localconf.php (copie de travail) @@ -67,13 +67,8 @@ // Add Status Report about Conflicting Extensions require_once(t3lib_extMgm::extPath('rtehtmlarea') . 'hooks/statusreport/ext_localconf.php'); - // Troubleshooting and script compression -$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableDebugMode'] = isset($_EXTCONF['enableDebugMode']) ? $_EXTCONF['enableDebugMode'] : 0; + // Script compression $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableCompressedScripts'] = (isset($_EXTCONF['enableCompressedScripts']) && !$_EXTCONF['enableCompressedScripts']) ? 0 : 1; - // Disable script compression when in troubleshooting mode -if ($TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableDebugMode']) { - $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableCompressedScripts'] = 0; -} // Configure Lorem Ipsum hook to insert nonsense in wysiwyg mode if (t3lib_extMgm::isLoaded('lorem_ipsum') && (TYPO3_MODE == 'BE')) { Index: typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (révision 10480) +++ typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (copie de travail) @@ -54,21 +54,6 @@ RE_noClosingTag : /^(img|br|hr|col|input|area|base|link|meta|param)$/i, RE_numberOrPunctuation : /[0-9.(),;:!¡?¿%#$'"_+=\\\/-]*/g, /*************************************************** - * TROUBLESHOOTING * - ***************************************************/ - _appendToLog: function(str){ - if (HTMLArea.enableDebugMode) { - var log = document.getElementById('HTMLAreaLog'); - if(log) { - log.appendChild(document.createTextNode(str)); - log.appendChild(document.createElement('br')); - } - } - }, - appendToLog: function (editorId, objectName, functionName, text) { - HTMLArea._appendToLog(editorId + '[' + objectName + '::' + functionName + ']: ' + text); - }, - /*************************************************** * LOCALIZATION * ***************************************************/ localize: function (label) { @@ -88,9 +73,36 @@ HTMLArea.editedContentCSS = HTMLArea.editorSkin + 'htmlarea-edited-content.css'; } HTMLArea.isReady = true; - HTMLArea._appendToLog("[HTMLArea::init]: Editor url set to: " + HTMLArea.editorUrl); - HTMLArea._appendToLog("[HTMLArea::init]: Editor skin CSS set to: " + HTMLArea.editorCSS); - HTMLArea._appendToLog("[HTMLArea::init]: Editor content skin CSS set to: " + HTMLArea.editedContentCSS); + HTMLArea.appendToLog('', 'HTMLArea', 'init', 'Editor url set to: ' + HTMLArea.editorUrl, 'info'); + HTMLArea.appendToLog('', 'HTMLArea', 'init', 'Editor skin CSS set to: ' + HTMLArea.editorCSS, 'info'); + HTMLArea.appendToLog('', 'HTMLArea', 'init', 'Editor content skin CSS set to: ' + HTMLArea.editedContentCSS, 'info'); + }, + /* + * Write message to JavaScript console + * + * @param string editorId: the id of the editor issuing the message + * @param string objectName: the name of the object issuing the message + * @param string functionName: the name of the function issuing the message + * @param string text: the text of the message + * @param string type: the type of message: 'log', 'info', 'warn' or 'error' + * + * @return void + */ + appendToLog: function (editorId, objectName, functionName, text, type) { + var str = 'RTE[' + editorId + '][' + objectName + '::' + functionName + ']: ' + text; + if (typeof(type) === 'undefined') { + var type = 'info'; + } + if (typeof(console) !== 'undefined' && typeof(console) === 'object') { + // If console is TYPO3.Backend.DebugConsole, write only error messages + if (Ext.isFunction(console.addTab)) { + if (type === 'error') { + console[type](str); + } + } else { + console[type](str); + } + } } }); /*************************************************** @@ -110,6 +122,8 @@ this.editedContentStyle = HTMLArea.editedContentCSS; // content style this.pageStyle = ""; + // Maximum attempts at accessing the stylesheets + this.styleSheetsMaximumAttempts = 20; // Remove tags (must be a regular expression) this.htmlRemoveTags = /none/i; // Remove tags and their contents (must be a regular expression) @@ -192,7 +206,7 @@ registerButton: function (config) { config.itemId = config.id; if (Ext.type(this.buttonsConfig[config.id])) { - HTMLArea._appendToLog('[HTMLArea.Config::registerButton]: A toolbar item with the same Id: ' + config.id + ' already exists and will be overidden.'); + HTMLArea.appendToLog('', 'HTMLArea.Config', 'registerButton', 'A toolbar item with the same Id: ' + config.id + ' already exists and will be overidden.', 'warn'); } // Apply defaults config = Ext.applyIf(config, this.configDefaults['all']); @@ -236,14 +250,13 @@ */ registerHotKey: function (hotKeyConfiguration) { if (Ext.isDefined(this.hotKeyList[hotKeyConfiguration.id])) { - HTMLArea._appendToLog('[HTMLArea.Config::registerHotKey]: A hotkey with the same key ' + hotKeyConfiguration.id + ' already exists and will be overidden.'); + HTMLArea.appendToLog('', 'HTMLArea.Config', 'registerHotKey', 'A hotkey with the same key ' + hotKeyConfiguration.id + ' already exists and will be overidden.', 'warn'); } if (Ext.isDefined(hotKeyConfiguration.cmd) && !Ext.isEmpty(hotKeyConfiguration.cmd) && Ext.isDefined(this.buttonsConfig[hotKeyConfiguration.cmd])) { this.hotKeyList[hotKeyConfiguration.id] = hotKeyConfiguration; - HTMLArea._appendToLog('[HTMLArea.Config::registerHotKey]: A hotkey with key ' + hotKeyConfiguration.id + ' was registered for toolbar item ' + hotKeyConfiguration.cmd + '.'); return true; } else { - HTMLArea._appendToLog('[HTMLArea.Config::registerHotKey]: A hotkey with key ' + hotKeyConfiguration.id + ' could not be registered because toolbar item with id ' + hotKeyConfiguration.cmd + ' was not registered.'); + HTMLArea.appendToLog('', 'HTMLArea.Config', 'registerHotKey', 'A hotkey with key ' + hotKeyConfiguration.id + ' could not be registered because toolbar item with id ' + hotKeyConfiguration.cmd + ' was not registered.', 'warn'); return false; } }, @@ -933,7 +946,7 @@ base.href = this.config.baseURL; head.appendChild(base); } - HTMLArea._appendToLog('[HTMLArea.Iframe::createHead]: Iframe baseURL set to: ' + base.href); + this.getEditor().appendToLog('HTMLArea.Iframe', 'createHead', 'Iframe baseURL set to: ' + base.href, 'info'); } var link0 = this.document.getElementsByTagName('link')[0]; if (!link0) { @@ -943,7 +956,7 @@ // Therefore, for versions before 3.6.8, we prepend the url with the base, if the url is not absolute link0.href = ((Ext.isGecko && navigator.productSub < 2010072200 && !/^http(s?):\/{2}/.test(this.config.editedContentStyle)) ? this.config.baseURL : '') + this.config.editedContentStyle; head.appendChild(link0); - HTMLArea._appendToLog('[HTMLArea.Iframe::createHead]: Skin CSS set to: ' + link0.href); + this.getEditor().appendToLog('HTMLArea.Iframe', 'createHead', 'Skin CSS set to: ' + link0.href, 'info'); } if (this.config.defaultPageStyle) { var link = this.document.getElementsByTagName('link')[1]; @@ -953,7 +966,7 @@ link.href = ((Ext.isGecko && navigator.productSub < 2010072200 && !/^https?:\/{2}/.test(this.config.defaultPageStyle)) ? this.config.baseURL : '') + this.config.defaultPageStyle; head.appendChild(link); } - HTMLArea._appendToLog('[HTMLArea.Iframe::createHead]: Override CSS set to: ' + link.href); + this.getEditor().appendToLog('HTMLArea.Iframe', 'createHead', 'Override CSS set to: ' + link.href, 'info'); } if (this.config.pageStyle) { var link = this.document.getElementsByTagName('link')[2]; @@ -963,14 +976,20 @@ link.href = ((Ext.isGecko && navigator.productSub < 2010072200 && !/^https?:\/{2}/.test(this.config.pageStyle)) ? this.config.baseURL : '') + this.config.pageStyle; head.appendChild(link); } - HTMLArea._appendToLog('[HTMLArea.Iframe::createHead]: Content CSS set to: ' + link.href); + this.getEditor().appendToLog('HTMLArea.Iframe', 'createHead', 'Content CSS set to: ' + link.href, 'info'); } - HTMLArea._appendToLog('[HTMLArea.Iframe::createHead]: Editor iframe document head successfully built.'); }, /* * Fire event 'HTMLAreaEventIframeReady' when the iframe style sheets become accessible + * + * @param int count: number of attempts at accessing the stylesheets + * + * @return void */ - getStyleSheets: function () { + getStyleSheets: function (count) { + if (typeof(count) === 'undefined') { + var count = 0; + } var stylesAreLoaded = true; var errorText = ''; var rules; @@ -1014,13 +1033,14 @@ } } if (!stylesAreLoaded) { - this.getStyleSheets.defer(100, this); - HTMLArea._appendToLog('[HTMLArea.Iframe::getStyleSheets]: Stylesheets not yet loaded (' + errorText + '). Retrying...'); if (/Security/i.test(errorText)) { - HTMLArea._appendToLog('ERROR [HTMLArea.Iframe::getStyleSheets]: A security error occurred. Make sure all stylesheets are accessed from the same domain/subdomain and using the same protocol as the current script.'); + this.getEditor().appendToLog('HTMLArea.Iframe', 'getStyleSheets', 'A security error occurred. Make sure all stylesheets are accessed from the same domain/subdomain and using the same protocol as the current script.', 'error'); + } else if (count > this.config.styleSheetsMaximumAttempts) { + this.getEditor().appendToLog('HTMLArea.Iframe', 'getStyleSheets', 'Stylesheets not loaded after ' + count + ' attempts. (' + errorText + ').', 'error'); + } else { + this.getStyleSheets.defer(100, this, [count++]); } } else { - HTMLArea._appendToLog('[HTMLArea.Iframe::getStyleSheets]: Stylesheets successfully accessed.'); // Style the document body Ext.get(this.document.body).addClass('htmlarea-content-body'); // Start listening to things happening in the iframe @@ -2194,7 +2214,7 @@ }, this); this.ready = true; this.fireEvent('HTMLAreaEventEditorReady'); - HTMLArea._appendToLog('[HTMLArea.Editor::onFrameworkReady]: Editor ready.'); + this.appendToLog('HTMLArea.Editor', 'onFrameworkReady', 'Editor ready.', 'info'); }, /* * Set editor mode @@ -2216,7 +2236,7 @@ try { this.document.body.innerHTML = this.getHTML(); } catch(e) { - HTMLArea._appendToLog('[HTMLArea.Editor::setMode]: The HTML document is not well-formed.'); + this.appendToLog('HTMLArea.Editor', 'setMode', 'The HTML document is not well-formed.', 'warn'); TYPO3.Dialog.ErrorDialog({ title: 'htmlArea RTE', msg: HTMLArea.I18N.msg['HTML-document-not-well-formed'] @@ -2299,7 +2319,7 @@ registerPlugin: function (pluginName) { var plugin = HTMLArea[pluginName], isRegistered = false; - if (Ext.isFunction(plugin)) { + if (typeof(plugin) !== 'undefined' && Ext.isFunction(plugin)) { var pluginInstance = new plugin(this, pluginName); if (pluginInstance) { var pluginInformation = pluginInstance.getPluginInformation(); @@ -2308,10 +2328,8 @@ isRegistered = true; } } - if (isRegistered) { - HTMLArea._appendToLog('[HTMLArea.Editor::registerPlugin]: Plugin ' + pluginName + ' was successfully registered.'); - } else { - HTMLArea._appendToLog('ERROR [HTMLArea.Editor::registerPlugin]: Could not register plugin ' + pluginName + '.'); + if (!isRegistered) { + this.appendToLog('HTMLArea.Editor', 'registerPlugin', 'Could not register plugin ' + pluginName + '.', 'warn'); } return isRegistered; }, @@ -2324,7 +2342,6 @@ var plugin = this.getPlugin(pluginId); plugin.onGenerate(); }, this); - HTMLArea._appendToLog('[HTMLArea.Editor::generatePlugins]: All plugins successfully generated.'); }, /* * Get the instance of the specified plugin, if it exists @@ -2381,11 +2398,12 @@ * * @param string functionName: the name of the editor function writing to the log * @param string text: the text of the message + * @param string type: the type of message * * @return void */ - appendToLog: function (objectName, functionName, text) { - HTMLArea.appendToLog(this.editorId, objectName, functionName, text); + appendToLog: function (objectName, functionName, text, type) { + HTMLArea.appendToLog(this.editorId, objectName, functionName, text, type); }, /* * Iframe unload handler: Update the textarea for submission and cleanup @@ -2431,7 +2449,6 @@ getJavascriptFile: function (url, callback, scope) { var success = false; var self = this; - this.editor.appendToLog('HTMLArea.Ajax', 'getJavascriptFile', 'Requesting script ' + url); Ext.Ajax.request({ method: 'GET', url: url, @@ -2441,7 +2458,7 @@ }, failure: function (response) { self.editor.inhibitKeyboardInput = false; - self.editor.appendToLog('HTMLArea.Ajax', 'getJavascriptFile', 'Unable to get ' + url + ' . Server reported ' + response.status); + self.editor.appendToLog('HTMLArea.Ajax', 'getJavascriptFile', 'Unable to get ' + url + ' . Server reported ' + response.status, 'error'); }, scope: scope }); @@ -2466,7 +2483,6 @@ params += (params.length ? '&' : '') + parameter + '=' + encodeURIComponent(value); }); params += this.editor.config.RTEtsConfigParams; - this.editor.appendToLog('HTMLArea.Ajax', 'postData', 'Posting to ' + url + '. Data: ' + params); Ext.Ajax.request({ method: 'POST', headers: { @@ -2475,17 +2491,15 @@ url: url, params: params, callback: Ext.isFunction(callback) ? callback: function (options, success, response) { - if (success) { - self.editor.appendToLog('HTMLArea.Ajax', 'postData', 'Post request to ' + url + ' successful. Server response: ' + response.responseText); - } else { - self.editor.appendToLog('HTMLArea.Ajax', 'postData', 'Post request to ' + url + ' failed. Server reported ' + response.status); + if (!success) { + self.editor.appendToLog('HTMLArea.Ajax', 'postData', 'Post request to ' + url + ' failed. Server reported ' + response.status, 'error'); } }, success: function (response) { success = true; }, failure: function (response) { - self.editor.appendToLog('HTMLArea.Ajax', 'postData', 'Unable to post ' + url + ' . Server reported ' + response.status); + self.editor.appendToLog('HTMLArea.Ajax', 'postData', 'Unable to post ' + url + ' . Server reported ' + response.status, 'error'); }, scope: scope }); @@ -2872,7 +2886,7 @@ try { this.document.execCommand(cmdID, UI, param); } catch(e) { - HTMLArea._appendToLog('[HTMLArea.Editor::execCommand]: ' + e + 'by execCommand(' + cmdID + ')'); + this.appendToLog('HTMLArea.Editor', 'execCommand', e + ' by execCommand(' + cmdID + ')', 'error'); } } this.toolbar.update(); @@ -2974,16 +2988,12 @@ try { return editor.iframe.htmlRenderer.render(root, outputRoot); } catch(e) { - 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 editor.iframe.htmlRenderer.render(root, outputRoot); - } + editor.appendToLog('HTMLArea', 'getHTML', 'The HTML document is not well-formed.', 'warn'); + TYPO3.Dialog.ErrorDialog({ + title: 'htmlArea RTE', + msg: HTMLArea.I18N.msg['HTML-document-not-well-formed'] + }); + return editor.document.body.innerHTML; } }; HTMLArea.getPrevNode = function(node) { @@ -3415,10 +3425,9 @@ try { if (typeof(HTMLArea.classesLabels) === 'undefined') { eval(response.responseText); - this.editor.appendToLog('HTMLArea.CSS.Parser', 'initiateParsing', 'Javascript file successfully evaluated: ' + this.editor.config.classesUrl); } } catch(e) { - this.editor.appendToLog('HTMLArea.CSS.Parser', 'initiateParsing', 'Error evaluating contents of Javascript file: ' + this.editor.config.classesUrl); + this.editor.appendToLog('HTMLArea.CSS.Parser', 'initiateParsing', 'Error evaluating contents of Javascript file: ' + this.editor.config.classesUrl, 'error'); } } this.parse(); @@ -3440,7 +3449,7 @@ this.attemptTimeout = this.parse.defer(200, this); this.parseAttemptsCounter++; } else { - this.editor.appendToLog('HTMLArea.CSS.Parser', 'parse', 'The stylesheets could not be parsed. Reported error: ' + this.error); + this.editor.appendToLog('HTMLArea.CSS.Parser', 'parse', 'The stylesheets could not be parsed. Reported error: ' + this.error, 'error'); this.fireEvent('HTMLAreaEventCssParsingComplete'); } } else { @@ -4004,7 +4013,6 @@ HTMLArea.initEditor.defer(150, null, [editorNumber]); } else { // Create an editor for the textarea - HTMLArea._appendToLog("[HTMLArea::initEditor]: Initializing editor with editor Id: " + editorNumber + "."); var editor = new HTMLArea.Editor(Ext.apply(new HTMLArea.Config(editorNumber), RTEarea[editorNumber])); editor.generate(); return false; @@ -4094,7 +4102,7 @@ * Note: this.base will exclusively refer to the HTMLArea.Plugin class constructor */ base: function (editor, pluginName) { - HTMLArea.appendToLog(editor.editorId, 'HTMLArea.' + pluginName, 'base', 'Deprecated use of base function. Use Ext superclass reference instead.'); + HTMLArea.appendToLog(editor.editorId, 'HTMLArea.' + pluginName, 'base', 'Deprecated use of base function. Use Ext superclass reference instead.', 'warn'); HTMLArea.Plugin.prototype.constructor.call(this, editor, pluginName); }, /** @@ -4112,8 +4120,8 @@ * @return boolean true if the information was registered */ registerPluginInformation: function(pluginInformation) { - if (typeof(pluginInformation) !== "object") { - this.appendToLog("registerPluginInformation", "Plugin information was not provided"); + if (typeof(pluginInformation) !== 'object') { + this.appendToLog('registerPluginInformation', 'Plugin information was not provided', 'warn'); return false; } else { this.pluginInformation = pluginInformation; @@ -4237,7 +4245,7 @@ return true; } } else { - this.appendToLog("registerButton", "Function " + buttonConfiguration.action + " was not defined when registering button " + buttonConfiguration.id); + this.appendToLog('registerButton', 'Function ' + buttonConfiguration.action + ' was not defined when registering button ' + buttonConfiguration.id, 'error'); } } return false; @@ -4266,7 +4274,7 @@ } return this.editorConfiguration.registerButton(dropDownConfiguration); } else { - this.appendToLog('registerDropDown', 'Function ' + dropDownConfiguration.action + ' was not defined when registering drop-down ' + dropDownConfiguration.id); + this.appendToLog('registerDropDown', 'Function ' + dropDownConfiguration.action + ' was not defined when registering drop-down ' + dropDownConfiguration.id, 'error'); } } return false; @@ -4424,7 +4432,6 @@ * @return boolean true on success of the request submission */ getJavascriptFile: function (url, callback) { - this.appendToLog('getJavascriptFile', 'Requesting script ' + url); return this.editor.ajax.getJavascriptFile(url, callback, this); }, /** @@ -4437,7 +4444,6 @@ * @return boolean true on success */ postData: function (url, data, callback) { - this.appendToLog('postData', 'Posting to ' + url + '.'); return this.editor.ajax.postData(url, data, callback, this); }, /* @@ -4545,11 +4551,12 @@ * * @param string functionName: the name of the plugin function writing to the log * @param string text: the text of the message + * @param string type: the typeof of message: 'log', 'info', 'warn' or 'error' * * @return void */ - appendToLog: function (functionName, text) { - this.editor.appendToLog(this.name, functionName, text); + appendToLog: function (functionName, text, type) { + this.editor.appendToLog(this.name, functionName, text, type); }, /* * Add a config element to config array if not empty Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockElements/block-elements.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockElements/block-elements.js (révision 10480) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockElements/block-elements.js (copie de travail) @@ -271,7 +271,7 @@ try { this.editor._doc.execCommand(buttonId, false, element); } catch(e) { - this.appendToLog("applyBlockElement", e + "\n\nby execCommand(" + buttonId + ");"); + this.appendToLog('applyBlockElement', e + '\n\nby execCommand(' + buttonId + ');', 'error'); } this.addClassOnBlockElements(tagName, className); } @@ -321,7 +321,7 @@ try { this.editor._doc.execCommand(buttonId, false, null); } catch(e) { - this.appendToLog("onButtonPress", e + "\n\nby execCommand(" + buttonId + ");"); + this.appendToLog('onButtonPress', e + '\n\nby execCommand(' + buttonId + ');', 'error'); } this.indentedList = parentElement; this.makeNestedList(parentElement); @@ -364,7 +364,7 @@ try { this.editor._doc.execCommand(buttonId, false, null); } catch(e) { - this.appendToLog("onButtonPress", e + "\n\nby execCommand(" + buttonId + ");"); + this.appendToLog('onButtonPress', e + '\n\nby execCommand(' + buttonId + ');', 'error'); } } else if (this.isAllowedBlockElement("div")) { if (/^div$/i.test(parentElement.nodeName) && !HTMLArea.DOM.hasClass(parentElement, this.useClass[buttonId])) { @@ -387,7 +387,7 @@ try { this.editor._doc.execCommand(buttonId, false, null); } catch(e) { - this.appendToLog("onButtonPress", e + "\n\nby execCommand(" + buttonId + ");"); + this.appendToLog('onButtonPress', e + '\n\nby execCommand(' + buttonId + ');', 'error'); } } else { this.outdentSelectedListElements(parentElement, range); @@ -423,7 +423,7 @@ try { this.editor._doc.execCommand(buttonId, false, null); } catch(e) { - this.appendToLog("onButtonPress", e + "\n\nby execCommand(" + buttonId + ");"); + this.appendToLog('onButtonPress', e + '\n\nby execCommand(' + buttonId + ');', 'error'); } } else if (this.isAllowedBlockElement("div")) { for (var i = blockAncestors.length; --i >= 0;) { @@ -527,7 +527,7 @@ try { this.editor._doc.execCommand(buttonId, false, null); } catch(e) { - this.appendToLog("onButtonPress", e + "\n\nby execCommand(" + buttonId + ");"); + this.appendToLog('onButtonPress', e + '\n\nby execCommand(' + buttonId + ');', 'error'); } } else { this.addClassOnBlockElements(buttonId); @@ -749,7 +749,7 @@ try { this.editor._doc.execCommand(buttonId, false, null); } catch(e) { - this.appendToLog("onButtonPress", e + "\n\nby execCommand(" + buttonId + ");"); + this.appendToLog('onButtonPress', e + '\n\nby execCommand(' + buttonId + ');', 'error'); } if (Ext.isWebKit) { this.editor.cleanAppleStyleSpans(parentNode); Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/CopyPaste/copy-paste.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/CopyPaste/copy-paste.js (révision 10480) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/CopyPaste/copy-paste.js (copie de travail) @@ -464,7 +464,7 @@ } }); if (!InstallTrigger) { - this.appendToLog('mozillaClipboardAccessException', 'Firefox InstallTrigger was not defined.'); + this.appendToLog('mozillaClipboardAccessException', 'Firefox InstallTrigger was not defined.', 'warn'); } } }, @@ -490,7 +490,7 @@ title: self.localize('Allow-Clipboard-Helper-Add-On-Title'), msg: self.localize('Moz-Extension-Failure') }); - self.appendToLog('installAllowClipboardHelperExtension', 'Mozilla install return code was: ' + returnCode + '.'); + self.appendToLog('installAllowClipboardHelperExtension', 'Mozilla install return code was: ' + returnCode + '.', 'warn'); } return false; } @@ -502,7 +502,7 @@ 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.'); + this.appendToLog('installAllowClipboardHelperExtension', 'Mozilla install was not enabled.', 'warn'); } } } Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultInline/default-inline.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultInline/default-inline.js (révision 10480) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultInline/default-inline.js (copie de travail) @@ -89,7 +89,7 @@ editor._doc.execCommand(buttonId, false, null); } catch(e) { - this.appendToLog("onButtonPress", e + "\n\nby execCommand(" + buttonId + ");"); + this.appendToLog('onButtonPress', e + '\n\nby execCommand(' + buttonId + ');', 'error'); } return false; }, Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/InlineElements/inline-elements.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/InlineElements/inline-elements.js (révision 10480) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/InlineElements/inline-elements.js (copie de travail) @@ -200,7 +200,7 @@ this.applyInlineElement(editor, element); return false; } else { - this.appendToLog("onButtonPress", "No element corresponding to button: " + buttonId); + this.appendToLog('onButtonPress', 'No element corresponding to button: ' + buttonId, 'warn'); } }, Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/Language/language.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/Language/language.js (révision 10480) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/Language/language.js (copie de travail) @@ -140,7 +140,7 @@ try { styleSheet.insertRule(rule, styleSheet.cssRules.length); } catch (e) { - this.appendToLog("onGenerate", "Error inserting css rule: " + rule + " Error text: " + e); + this.appendToLog('onGenerate', 'Error inserting css rule: ' + rule + ' Error text: ' + e, 'warn'); } } else { styleSheet.addRule(selector, style); Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/TableOperations/table-operations.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/TableOperations/table-operations.js (révision 10480) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/TableOperations/table-operations.js (copie de travail) @@ -1204,11 +1204,10 @@ try { if (typeof(HTMLArea.classesAlternating) === 'undefined' || typeof(HTMLArea.classesCounting) === 'undefined') { eval(response.responseText); - this.appendToLog('reStyleTable', 'Javascript file successfully evaluated: ' + this.classesUrl); } this.reStyleTable(table); } catch(e) { - this.appendToLog('reStyleTable', 'Error evaluating contents of Javascript file: ' + this.classesUrl); + this.appendToLog('reStyleTable', 'Error evaluating contents of Javascript file: ' + this.classesUrl, 'error'); } } }); @@ -1257,11 +1256,10 @@ try { if (typeof(HTMLArea.classesAlternating) === 'undefined') { eval(response.responseText); - this.appendToLog('removeAlternatingClasses', 'Javascript file successfully evaluated: ' + this.classesUrl); } this.removeAlternatingClasses(table, removeClass); } catch(e) { - this.appendToLog('removeAlternatingClasses', 'Error evaluating contents of Javascript file: ' + this.classesUrl); + this.appendToLog('removeAlternatingClasses', 'Error evaluating contents of Javascript file: ' + this.classesUrl, 'error'); } } }); @@ -1378,11 +1376,10 @@ try { if (typeof(HTMLArea.classesCounting) === 'undefined') { eval(response.responseText); - this.appendToLog('removeCountingClasses', 'Javascript file successfully evaluated: ' + this.classesUrl); } this.removeCountingClasses(table, removeClass); } catch(e) { - this.appendToLog('removeCountingClasses', 'Error evaluating contents of Javascript file: ' + this.classesUrl); + this.appendToLog('removeCountingClasses', 'Error evaluating contents of Javascript file: ' + this.classesUrl, 'error'); } } }); Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3HtmlParser/typo3html-parser.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3HtmlParser/typo3html-parser.js (révision 10480) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3HtmlParser/typo3html-parser.js (copie de travail) @@ -101,9 +101,8 @@ if (success) { editor.setHTML(response.responseText); editor.selectRange(editor.moveToBookmark(bookmark)); - this.appendToLog('clean', 'Post request to ' + url + ' successful. Server response: ' + response.responseText); } else { - this.appendToLog('clean', 'Post request to ' + url + ' failed. Server reported ' + response.status); + this.appendToLog('clean', 'Post request to ' + url + ' failed. Server reported ' + response.status, 'error'); } this.editor.inhibitKeyboardInput = false; } Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Link/typo3link.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Link/typo3link.js (révision 10480) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Link/typo3link.js (copie de travail) @@ -89,10 +89,9 @@ try { if (typeof(HTMLArea.classesAnchorSetup) === 'undefined') { eval(response.responseText); - this.appendToLog('ongenerate', 'Javascript file successfully evaluated: ' + this.classesAnchorUrl); } } catch(e) { - this.appendToLog('ongenerate', 'Error evaluating contents of Javascript file: ' + this.classesAnchorUrl); + this.appendToLog('ongenerate', 'Error evaluating contents of Javascript file: ' + this.classesAnchorUrl, 'error'); } } }); @@ -118,11 +117,10 @@ try { if (typeof(HTMLArea.classesAnchorSetup) === 'undefined') { eval(response.responseText); - this.appendToLog('onButtonPress', 'Javascript file successfully evaluated: ' + this.classesAnchorUrl); } this.onButtonPress(editor, id, target); } catch(e) { - this.appendToLog('onButtonPress', 'Error evaluating contents of Javascript file: ' + this.classesAnchorUrl); + this.appendToLog('onButtonPress', 'Error evaluating contents of Javascript file: ' + this.classesAnchorUrl, 'error'); } } }); Index: typo3/sysext/rtehtmlarea/pi2/class.tx_rtehtmlarea_pi2.php =================================================================== --- typo3/sysext/rtehtmlarea/pi2/class.tx_rtehtmlarea_pi2.php (révision 10480) +++ typo3/sysext/rtehtmlarea/pi2/class.tx_rtehtmlarea_pi2.php (copie de travail) @@ -257,8 +257,7 @@
' . $TSFE->csConvObj->conv($TSFE->getLLL('Please wait',$this->LOCAL_LANG), $this->charset, $TSFE->renderCharset) . '
' . ($TYPO3_CONF_VARS['EXTCONF'][$this->ID]['enableDebugMode'] ? '
' : '') . ' - '; + ' . LF; return $item; } /**