Index: typo3/sysext/rtehtmlarea/htmlarea/htmlarea-gecko.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/htmlarea-gecko.js (révision 7298) +++ typo3/sysext/rtehtmlarea/htmlarea/htmlarea-gecko.js (copie de travail) @@ -86,7 +86,7 @@ * Create a range for the current selection */ HTMLArea.Editor.prototype._createRange = function(sel) { - if (HTMLArea.is_safari) { + if (Ext.isWebKit) { var range = this._doc.createRange(); if (typeof(sel) == "undefined") { return range; @@ -467,7 +467,7 @@ * @return void */ HTMLArea.Editor.prototype.cleanAppleStyleSpans = function(node) { - if (HTMLArea.is_safari) { + if (Ext.isWebKit) { if (node.getElementsByClassName) { var spans = node.getElementsByClassName("Apple-style-span"); for (var i = spans.length; --i >= 0;) { @@ -589,7 +589,7 @@ var first = block.firstChild; if (first) block.removeChild(first); right = doc.createElement("p"); - if (HTMLArea.is_safari || HTMLArea.is_opera) { + if (Ext.isWebKit || Ext.isOpera) { right.innerHTML = "
"; } right = block.appendChild(right); @@ -599,7 +599,7 @@ range.setEndAfter(block); var df = range.extractContents(), left_empty = false; if (!/\S/.test(block.innerHTML)) { - if (!HTMLArea.is_opera) { + if (!Ext.isOpera) { block.innerHTML = "
"; } left_empty = true; @@ -613,7 +613,7 @@ if (/^(dt|dd)$/i.test(p.nodeName)) { p = this.convertNode(p, (p.nodeName.toLowerCase() === "dt") ? "dd" : "dt"); } - if (!HTMLArea.is_opera) { + if (!Ext.isOpera) { p.innerHTML = "
"; } if(/^li$/i.test(p.nodeName) && left_empty && !block.nextSibling) { @@ -629,13 +629,13 @@ if (p.previousSibling) { var a = p.previousSibling.lastChild; if (a && /^a$/i.test(a.nodeName) && !/\S/.test(a.innerHTML)) { - if (HTMLArea.is_opera) { + if (Ext.isOpera) { this.removeMarkup(a); } else { HTMLArea.removeFromParent(a); } } - if (!/\S/.test(p.previousSibling.textContent) && !HTMLArea.is_opera) { + if (!/\S/.test(p.previousSibling.textContent) && !Ext.isOpera) { p.previousSibling.innerHTML = "
"; } } @@ -649,7 +649,7 @@ } else { p = doc.createElement("p"); } - if (!HTMLArea.is_opera) { + if (!Ext.isOpera) { p.innerHTML = "
"; } if (block.nextSibling) { Index: typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (révision 7300) +++ typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (copie de travail) @@ -41,6 +41,9 @@ * CONSTANTS ***************************************************/ Ext.apply(HTMLArea, { + /************************************************************************* + * THESE BROWSER IDENTIFICATION CONSTANTS ARE DEPRECATED AS OF TYPO3 4.4 * + *************************************************************************/ // Browser identification is_gecko : Ext.isGecko || Ext.isOpera || Ext.isWebKit, is_ff2 : Ext.isGecko2, @@ -48,8 +51,6 @@ is_safari : Ext.isWebKit, is_chrome : Ext.isChrome, is_opera : Ext.isOpera, - // Some operations require bug fixes provided by Opera 10 (Presto 2.2) - is_opera9 : Ext.isOpera && navigator.userAgent.toLowerCase().indexOf('presto/2.1') != -1, // Compile some regular expressions RE_tagName : /(<\/|<)\s*([^ \t\n>]+)/ig, RE_head : /((.|\n)*?)<\/head>/i, Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockElements/block-elements.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockElements/block-elements.js (révision 7300) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockElements/block-elements.js (copie de travail) @@ -70,7 +70,7 @@ } } this.allowedAttributes = new Array("id", "title", "lang", "xml:lang", "dir", "class"); - if (HTMLArea.is_ie) { + if (Ext.isIE) { this.addAllowedAttribute("className"); } this.indentedList = null; @@ -263,11 +263,11 @@ break; default : var element = tagName; - if (HTMLArea.is_ie) { + if (Ext.isIE) { element = "<" + element + ">"; } this.editor.focus(); - if (HTMLArea.is_safari && !this.editor._doc.body.hasChildNodes()) { + if (Ext.isWebKit && !this.editor._doc.body.hasChildNodes()) { this.editor._doc.body.appendChild((this.editor._doc.createElement("br"))); } try { @@ -315,11 +315,11 @@ } } } - var fullNodeTextSelected = (HTMLArea.is_gecko && parentElement.textContent === range.toString()) || (HTMLArea.is_ie && parentElement.innerText === range.text); + var fullNodeTextSelected = (!Ext.isIE && parentElement.textContent === range.toString()) || (Ext.isIE && parentElement.innerText === range.text); switch (buttonId) { case "Indent" : if (/^(ol|ul)$/i.test(parentElement.nodeName) && !(fullNodeTextSelected && !/^(li)$/i.test(parentElement.parentNode.nodeName))) { - if (HTMLArea.is_opera) { + if (Ext.isOpera) { try { this.editor._doc.execCommand(buttonId, false, null); } catch(e) { @@ -385,7 +385,7 @@ case "Outdent" : if (/^(ol|ul)$/i.test(parentElement.nodeName) && !HTMLArea._hasClass(parentElement, this.useClass.Indent)) { if (/^(li)$/i.test(parentElement.parentNode.nodeName)) { - if (HTMLArea.is_opera) { + if (Ext.isOpera) { try { this.editor._doc.execCommand(buttonId, false, null); } catch(e) { @@ -634,7 +634,7 @@ blockElement = contextElement.appendChild(blockElement); } // Things go wrong in some browsers when the node is empty - if (HTMLArea.is_safari && !blockElement.hasChildNodes()) { + if (Ext.isWebKit && !blockElement.hasChildNodes()) { blockElement = blockElement.appendChild(this.editor._doc.createElement("br")); } return blockElement; @@ -751,7 +751,7 @@ } catch(e) { this.appendToLog("onButtonPress", e + "\n\nby execCommand(" + buttonId + ");"); } - if (HTMLArea.is_safari) { + if (Ext.isWebKit) { this.editor.cleanAppleStyleSpans(parentNode); } } @@ -913,7 +913,7 @@ if (endElement) { var parent = endElement.parentNode; var paragraph = this.editor._doc.createElement("p"); - if (HTMLArea.is_ie) { + if (Ext.isIE) { paragraph.innerHTML = " "; } else { paragraph.appendChild(this.editor._doc.createElement("br")); Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockStyle/block-style.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockStyle/block-style.js (révision 7300) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockStyle/block-style.js (copie de travail) @@ -202,7 +202,7 @@ getSelectedBlocks : function() { var block, range, i = 0, blocks = []; var statusBarSelection = this.editor.statusBar ? this.editor.statusBar.getSelection() : null; - if (HTMLArea.is_gecko && !HTMLArea.is_safari && !HTMLArea.is_opera) { + if (Ext.isGecko) { var selection = this.editor._getSelection(); try { while ((range = selection.getRangeAt(i++))) { @@ -223,7 +223,7 @@ onGenerate: function() { // Monitor editor changing mode this.editor.iframe.mon(this.editor, 'modeChange', this.onModeChange, this); - if (HTMLArea.is_gecko) { + if (!Ext.isIE) { this.generate(this.editor, 'BlockStyle'); } }, @@ -472,7 +472,7 @@ var newCssArray = new Object(); this.cssLoaded = true; for (var i = 0; i < iframe.styleSheets.length; i++) { - if (HTMLArea.is_gecko) { + if (!Ext.isIE) { try { newCssArray = this.parseCssRule(iframe.styleSheets[i].cssRules, newCssArray); } catch(e) { Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/DefinitionList/definition-list.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/DefinitionList/definition-list.js (révision 7300) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/DefinitionList/definition-list.js (copie de travail) @@ -168,7 +168,7 @@ if (attributeValue) newNode.setAttribute(attributeName, attributeValue); } // In IE, the above fails to update the classname and style attributes. - if (HTMLArea.is_ie) { + if (Ext.isIE) { if (node.style.cssText) { newNode.style.cssText = node.style.cssText; } @@ -240,8 +240,8 @@ if (this.editor._selectionEmpty(selection) && /^dd$/i.test(parentElement.nodeName)) { var list = parentElement.appendChild(this.editor._doc.createElement("dl")); var term = list.appendChild(this.editor._doc.createElement("dt")); - if (HTMLArea.is_gecko) { - if (HTMLArea.is_safari) { + if (!Ext.isIE) { + if (Ext.isWebKit) { term.innerHTML = "
"; } else { term.appendChild(this.editor._doc.createTextNode("")); Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/InlineElements/inline-elements.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/InlineElements/inline-elements.js (révision 7300) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/InlineElements/inline-elements.js (copie de travail) @@ -50,7 +50,7 @@ this.allowedAttributes = this.editor.plugins.TextStyle.instance.allowedAttributes; } else { this.allowedAttributes = new Array("id", "title", "lang", "xml:lang", "dir", "class"); - if (HTMLArea.is_ie) { + if (Ext.isIE) { this.addAllowedAttribute("className"); } } @@ -230,7 +230,7 @@ var ancestors = editor.getAllAncestors(); var elementIsAncestor = false; var fullNodeSelected = false; - if (HTMLArea.is_ie) { + if (Ext.isIE) { var bookmark = editor.getBookmark(range); } // Check if the chosen element is among the ancestors @@ -254,7 +254,7 @@ if (element === "bdo") { newElement.setAttribute("dir", "rtl"); } - if (HTMLArea.is_gecko) { + if (!Ext.isIE) { if (fullNodeSelected && statusBarSelection) { if (Ext.isWebKit) { newElement = parent.parentNode.insertBefore(newElement, statusBarSelection); @@ -334,7 +334,7 @@ } } // In IE, the above fails to update the class and style attributes. - if (HTMLArea.is_ie) { + if (Ext.isIE) { if (element.style.cssText) { newElement.style.cssText = element.style.cssText; } Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/Language/language.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/Language/language.js (révision 7300) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/Language/language.js (copie de travail) @@ -63,7 +63,7 @@ } if (!this.allowedAttributes) { this.allowedAttributes = new Array("id", "title", "lang", "xml:lang", "dir", "class"); - if (HTMLArea.is_ie) { + if (Ext.isIE) { this.allowedAttributes.push("className"); } } @@ -143,7 +143,7 @@ var selector = 'body.htmlarea-show-language-marks *[' + 'lang="' + option.get('value') + '"]:before'; var style = 'content: "' + option.get('value') + ': ";'; var rule = selector + ' { ' + style + ' }'; - if (HTMLArea.is_gecko) { + if (!Ext.isIE) { try { styleSheet.insertRule(rule, styleSheet.cssRules.length); } catch (e) { @@ -247,14 +247,14 @@ var ancestors = this.editor.getAllAncestors(); for (var i = 0; i < ancestors.length; ++i) { fullNodeSelected = (statusBarSelection === ancestors[i]) - && ((HTMLArea.is_gecko && ancestors[i].textContent === range.toString()) || (HTMLArea.is_ie && ((selection.type !== "Control" && ancestors[i].innerText === range.text) || (selection.type === "Control" && ancestors[i].innerText === range.item(0).text)))); + && ((!Ext.isIE && ancestors[i].textContent === range.toString()) || (Ext.isIE && ((selection.type !== "Control" && ancestors[i].innerText === range.text) || (selection.type === "Control" && ancestors[i].innerText === range.item(0).text)))); if (fullNodeSelected) { parent = ancestors[i]; break; } } // Working around bug in Safari selectNodeContents - if (!fullNodeSelected && HTMLArea.is_safari && statusBarSelection && statusBarSelection.textContent === range.toString()) { + if (!fullNodeSelected && Ext.isWebKit && statusBarSelection && statusBarSelection.textContent === range.toString()) { fullNodeSelected = true; parent = statusBarSelection; } @@ -273,7 +273,7 @@ var newElement = this.editor._doc.createElement("span"); this.setLanguageAttributes(newElement, language); this.editor.wrapWithInlineElement(newElement, selection, range); - if (HTMLArea.is_gecko) { + if (!Ext.isIE) { range.detach(); } } @@ -416,14 +416,14 @@ if (endPointsInSameBlock) { for (var i = 0; i < ancestors.length; ++i) { fullNodeSelected = (statusBarSelection === ancestors[i]) - && ((HTMLArea.is_gecko && ancestors[i].textContent === range.toString()) || (HTMLArea.is_ie && ((selection.type !== "Control" && ancestors[i].innerText === range.text) || (selection.type === "Control" && ancestors[i].innerText === range.item(0).text)))); + && ((!Ext.isIE && ancestors[i].textContent === range.toString()) || (Ext.isIE && ((selection.type !== "Control" && ancestors[i].innerText === range.text) || (selection.type === "Control" && ancestors[i].innerText === range.item(0).text)))); if (fullNodeSelected) { parent = ancestors[i]; break; } } // Working around bug in Safari selectNodeContents - if (!fullNodeSelected && HTMLArea.is_safari && statusBarSelection && statusBarSelection.textContent === range.toString()) { + if (!fullNodeSelected && Ext.isWebKit && statusBarSelection && statusBarSelection.textContent === range.toString()) { fullNodeSelected = true; parent = statusBarSelection; } Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/SelectFont/select-font.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/SelectFont/select-font.js (révision 7300) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/SelectFont/select-font.js (copie de travail) @@ -55,7 +55,7 @@ } if (!this.allowedAttributes) { this.allowedAttributes = new Array("id", "title", "lang", "xml:lang", "dir", "class", "style"); - if (HTMLArea.is_ie) { + if (Ext.isIE) { this.allowedAttributes.push("className"); } } @@ -176,7 +176,7 @@ this.setStyle(element, combo.itemId, param); // Wrap the selection with span tag with the style attribute editor.wrapWithInlineElement(element, selection, range); - if (HTMLArea.is_gecko) { + if (!Ext.isIE) { range.detach(); } } @@ -194,10 +194,10 @@ setStyle: function (element, buttonId, value) { element.style[this.styleProperty[buttonId]] = (value && value !== 'none') ? value : ''; // In IE, we need to remove the empty attribute in order to unset it - if (HTMLArea.is_ie && (!value || value == 'none')) { + if (Ext.isIE && (!value || value == 'none')) { element.style.removeAttribute(this.styleProperty[buttonId], false); } - if (HTMLArea.is_opera) { + if (Ext.isOpera) { // Opera 9.60 replaces single quotes with double quotes element.style.cssText = element.style.cssText.replace(/\"/g, "\'"); // Opera 9.60 removes from the list of fonts any fonts that are not installed on the client system @@ -218,7 +218,7 @@ var parentElement = statusBarSelection ? statusBarSelection : editor.getParentElement(); var value = parentElement.style[this.styleProperty[select.itemId]]; if (!value) { - if (HTMLArea.is_gecko) { + if (!Ext.isIE) { if (editor.document.defaultView.getComputedStyle(parentElement, null)) { value = editor.document.defaultView.getComputedStyle(parentElement, null).getPropertyValue(this.cssProperty[select.itemId]); } Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/TableOperations/table-operations.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/TableOperations/table-operations.js (révision 7300) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/TableOperations/table-operations.js (copie de travail) @@ -453,7 +453,7 @@ tbody.appendChild(tr); for (var j = params.f_cols; --j >= 0;) { var td = doc.createElement('td'); - if (HTMLArea.is_gecko) td.innerHTML = '
'; + if (!Ext.isIE) td.innerHTML = '
'; tr.appendChild(td); } } @@ -691,7 +691,7 @@ var buttonId = this.translateHotKey(id); buttonId = buttonId ? buttonId : id; - var mozbr = HTMLArea.is_gecko ? "
" : ""; + var mozbr = !Ext.isIE ? "
" : ""; var tableParts = ["tfoot", "thead", "tbody"]; var tablePartsIndex = { tfoot : 0, thead : 1, tbody : 2 }; @@ -872,7 +872,7 @@ if (!cell) var cell = this.getClosest("th"); if (!cell) break; var sel = editor._getSelection(); - if (HTMLArea.is_gecko && !sel.isCollapsed && !HTMLArea.is_safari && !HTMLArea.is_opera) { + if (Ext.isGecko && !sel.isCollapsed) { var cells = getSelectedCells(sel); for (i = 0; i < cells.length; ++i) splitRow(cells[i]); } else { @@ -914,7 +914,7 @@ if (!cell) var cell = this.getClosest("th"); if (!cell) break; var sel = editor._getSelection(); - if (HTMLArea.is_gecko && !sel.isCollapsed && !HTMLArea.is_safari && !HTMLArea.is_opera) { + if (Ext.isGecko && !sel.isCollapsed) { var cells = getSelectedCells(sel); for (i = 0; i < cells.length; ++i) splitCol(cells[i]); } else { @@ -968,7 +968,7 @@ if (!cell) var cell = this.getClosest("th"); if (!cell) break; var sel = editor._getSelection(); - if (HTMLArea.is_gecko && !sel.isCollapsed && !HTMLArea.is_safari && !HTMLArea.is_opera) { + if (Ext.isGecko && !sel.isCollapsed) { var cells = getSelectedCells(sel); for (i = 0; i < cells.length; ++i) splitCell(cells[i]); } else { @@ -1577,7 +1577,7 @@ } } // In IE, the above fails to update the classname and style attributes. - if (HTMLArea.is_ie) { + if (Ext.isIE) { if (element.style.cssText) { newCell.style.cssText = element.style.cssText; } @@ -1637,7 +1637,7 @@ */ processStyle: function (element, params) { var style = element.style; - if (HTMLArea.is_ie) { + if (Ext.isIE) { style.styleFloat = ""; } else { style.cssFloat = ""; Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/TextIndicator/text-indicator.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/TextIndicator/text-indicator.js (révision 7300) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/TextIndicator/text-indicator.js (copie de travail) @@ -76,7 +76,7 @@ var doc = editor._doc; try { var style = { - backgroundColor: HTMLArea._makeColor(doc.queryCommandValue((HTMLArea.is_ie || HTMLArea.is_safari) ? 'BackColor' : 'HiliteColor')), + backgroundColor: HTMLArea._makeColor(doc.queryCommandValue((Ext.isIE || Ext.isWebKit) ? 'BackColor' : 'HiliteColor')), color: HTMLArea._makeColor(doc.queryCommandValue('ForeColor')), fontFamily: doc.queryCommandValue('FontName'), fontWeight: 'normal', Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/TextStyle/text-style.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/TextStyle/text-style.js (révision 7300) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/TextStyle/text-style.js (copie de travail) @@ -91,7 +91,7 @@ // Allowed attributes on inline elements this.allowedAttributes = new Array("id", "title", "lang", "xml:lang", "dir", "class"); - if (HTMLArea.is_ie) { + if (Ext.isIE) { this.addAllowedAttribute("className"); } @@ -169,15 +169,15 @@ var parent = this.editor.getParentElement(); var selectionEmpty = this.editor._selectionEmpty(selection); var ancestors = this.editor.getAllAncestors(); - if (HTMLArea.is_ie) { + if (Ext.isIE) { var bookmark = range.getBookmark(); } if (!selectionEmpty) { // The selection is not empty for (var i = 0; i < ancestors.length; ++i) { - fullNodeSelected = (HTMLArea.is_ie && ((statusBarSelection === ancestors[i] && ancestors[i].innerText === range.text) || (!statusBarSelection && ancestors[i].innerText === range.text))) - || (HTMLArea.is_gecko && ((statusBarSelection === ancestors[i] && ancestors[i].textContent === range.toString()) || (!statusBarSelection && ancestors[i].textContent === range.toString()))); + fullNodeSelected = (Ext.isIE && ((statusBarSelection === ancestors[i] && ancestors[i].innerText === range.text) || (!statusBarSelection && ancestors[i].innerText === range.text))) + || (!Ext.isIE && ((statusBarSelection === ancestors[i] && ancestors[i].textContent === range.toString()) || (!statusBarSelection && ancestors[i].textContent === range.toString()))); if (fullNodeSelected) { if (this.isInlineElement(ancestors[i])) { parent = ancestors[i]; @@ -186,7 +186,7 @@ } } // Working around bug in Safari selectNodeContents - if (!fullNodeSelected && HTMLArea.is_safari && statusBarSelection && this.isInlineElement(statusBarSelection) && statusBarSelection.textContent === range.toString()) { + if (!fullNodeSelected && Ext.isWebKit && statusBarSelection && this.isInlineElement(statusBarSelection) && statusBarSelection.textContent === range.toString()) { fullNodeSelected = true; parent = statusBarSelection; } @@ -198,7 +198,7 @@ var newElement = editor._doc.createElement("span"); HTMLArea._addClass(newElement, className); editor.wrapWithInlineElement(newElement, selection, range); - if (HTMLArea.is_gecko) { + if (!Ext.isIE) { range.detach(); } } @@ -280,7 +280,7 @@ var newCssArray = new Object(); this.cssLoaded = true; for (var i = 0; i < iframe.styleSheets.length; i++) { - if (HTMLArea.is_gecko) { + if (!Ext.isIE) { try { newCssArray = this.parseCssRule(iframe.styleSheets[i].cssRules, newCssArray); } catch(e) { @@ -442,7 +442,7 @@ if (!selectionEmpty) { for (var i = 0; i < ancestors.length; ++i) { fullNodeSelected = (statusBarSelection === ancestors[i]) - && ((HTMLArea.is_gecko && ancestors[i].textContent === range.toString()) || (HTMLArea.is_ie && ancestors[i].innerText === range.text)); + && ((!Ext.isIE && ancestors[i].textContent === range.toString()) || (Ext.isIE && ancestors[i].innerText === range.text)); if (fullNodeSelected) { if (!HTMLArea.isBlockElement(ancestors[i])) { tagName = ancestors[i].nodeName.toLowerCase(); @@ -454,7 +454,7 @@ } } // Working around bug in Safari selectNodeContents - if (!fullNodeSelected && HTMLArea.is_safari && statusBarSelection && this.isInlineElement(statusBarSelection) && statusBarSelection.textContent === range.toString()) { + if (!fullNodeSelected && Ext.isWebKit && statusBarSelection && this.isInlineElement(statusBarSelection) && statusBarSelection.textContent === range.toString()) { fullNodeSelected = true; tagName = statusBarSelection.nodeName.toLowerCase(); if (statusBarSelection.className && /\S/.test(statusBarSelection.className)) { Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Color/typo3color.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Color/typo3color.js (révision 7300) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Color/typo3color.js (copie de travail) @@ -56,7 +56,7 @@ } if (!this.allowedAttributes) { this.allowedAttributes = new Array('id', 'title', 'lang', 'xml:lang', 'dir', 'class', 'style'); - if (HTMLArea.is_ie) { + if (Ext.isIE) { this.allowedAttributes.push('className'); } } @@ -376,7 +376,7 @@ // Set the color in the style attribute element.style[this.styleProperty[buttonId]] = color; this.editor.wrapWithInlineElement(element, selection, range); - if (HTMLArea.is_gecko) { + if (!Ext.isIE) { range.detach(); } } Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Link/typo3link.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Link/typo3link.js (révision 7300) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Link/typo3link.js (copie de travail) @@ -206,7 +206,7 @@ } // In FF, if the url is the same except for upper/lower case of a file name, the link is not updated. // Therefore, we remove the link before creating a new one. - if (HTMLArea.is_gecko && node != null && /^a$/i.test(node.nodeName)) { + if (!Ext.isIE && node != null && /^a$/i.test(node.nodeName)) { // If the class attribute is not removed, UnLink folowed by CreateLink will create a span element inside the new link node.removeAttribute("class"); // Moreover, the selection is sometimes lost after the unlink operation @@ -216,7 +216,7 @@ this.editor._doc.execCommand("UnLink", false, null); this.editor.selectRange(this.editor.moveToBookmark(bookmark)); } - if (HTMLArea.is_gecko && !HTMLArea.is_safari && !HTMLArea.is_opera) { + if (Ext.isGecko) { this.editor._doc.execCommand("CreateLink", false, encodeURI(theLink)); } else { this.editor._doc.execCommand("CreateLink", false, theLink); @@ -260,7 +260,7 @@ if (HTMLArea.classesAnchorSetup) { var selection = this.editor._getSelection(); var range = this.editor._createRange(selection); - if (HTMLArea.is_gecko) { + if (!Ext.isIE) { this.cleanAllLinks(node, range, false); } else { this.cleanAllLinks(node, range, true); @@ -291,7 +291,7 @@ setLinkAttributes : function(node, range, cur_target, cur_class, cur_title, imageNode, addIconAfterLink, additionalValues) { if (/^a$/i.test(node.nodeName)) { var nodeInRange = false; - if (HTMLArea.is_gecko) { + if (!Ext.isIE) { nodeInRange = this.editor.rangeIntersectsNode(range, node); } else { if (this.editor._getSelection().type.toLowerCase() == "control") { @@ -311,7 +311,7 @@ node.insertBefore(imageNode.cloneNode(false), node.firstChild); } } - if (HTMLArea.is_gecko && !HTMLArea.is_safari && !HTMLArea.is_opera) { + if (Ext.isGecko) { node.href = decodeURI(node.href); } if (cur_target.trim()) node.target = cur_target.trim(); @@ -319,7 +319,7 @@ if (cur_class.trim()) { node.className = cur_class.trim(); } else { - if (HTMLArea.is_gecko) { + if (!Ext.isIE) { node.removeAttribute('class'); } else { node.removeAttribute('className'); @@ -382,7 +382,7 @@ cleanAllLinks : function(node, range, keepLinks) { if (/^a$/i.test(node.nodeName)) { var intersection = false; - if (HTMLArea.is_gecko) { + if (!Ext.isIE) { intersection = this.editor.rangeIntersectsNode(range, node); } else { if (this.editor._getSelection().type.toLowerCase() == "control") { Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/UndoRedo/undo-redo.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/UndoRedo/undo-redo.js (révision 7300) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/UndoRedo/undo-redo.js (copie de travail) @@ -168,14 +168,10 @@ // Insert a bookmark if (this.editor.getMode() == 'wysiwyg' && this.editor.isEditable()) { var selection = this.editor._getSelection(); - if ((HTMLArea.is_gecko && !HTMLArea.is_opera9) || (HTMLArea.is_ie && selection.type.toLowerCase() != 'control')) { + if ((!Ext.isIE && !(Ext.isOpera && navigator.userAgent.toLowerCase().indexOf('presto/2.1') != -1)) || (Ext.isIE && selection.type.toLowerCase() != 'control')) { // Catch error in FF when the selection contains no usable range try { - // Work around IE8 bug: can't create a range correctly if the selection is empty and the focus is not on the editor window - // But we cannot grab focus from an opened window just for the sake of taking this bookmark - if (!HTMLArea.is_ie || !this.editor.hasOpenedWindow() || selection.type.toLowerCase() != 'none') { - bookmark = this.editor.getBookmark(this.editor._createRange(selection)); - } + bookmark = this.editor.getBookmark(this.editor._createRange(selection)); } catch (e) { bookmark = null; } @@ -185,7 +181,7 @@ bookmarkedText = this.editor.getInnerHTML(); var range = this.editor.moveToBookmark(bookmark); // Restore Firefox selection - if (HTMLArea.is_gecko && !HTMLArea.is_opera && !HTMLArea.is_safari) { + if (Ext.isGecko) { this.editor.emptySelection(selection); this.editor.addRangeToSelection(selection, range); }