Project

General

Profile

Bug #20048 » rtehtmlarea_bugfix_10482_trunk_v2.patch

Administrator Admin, 2009-02-19 19:29

View differences:

typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (copie de travail)
var parentWindow = ev.srcElement.parentNode.parentNode.parentWindow;
}
if (parentWindow && parentWindow.dialog) {
parentWindow.dialog.close();
// If the dialogue window as an onEscape function, invoke it
if (typeof(parentWindow.onEscape) == "function") {
parentWindow.onEscape(ev);
}
if (parentWindow.dialog) {
parentWindow.dialog.close();
}
return false;
}
}
typo3/sysext/rtehtmlarea/htmlarea/plugins/FindReplace/find-replace.js (copie de travail)
* Copyright notice
*
* (c) 2004 Cau guanabara <caugb@ibest.com.br>
* (c) 2005-2008 Stanislas Rolland <typo3(arobas)sjbr.ca>
* (c) 2005-2009 Stanislas Rolland <typo3(arobas)sjbr.ca>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
......
if (/\w/.test(sel)) {
param = { fr_pattern: sel };
}
if (HTMLArea.is_opera) {
this.cleanUpFunctionReference = this.makeFunctionReference("cleanUp");
this.cleanUpRegularExpression = /(<span\s+[^>]*id=.?frmark[^>]*>)([^<>]*)(<\/span>)/gi;
this.editor._iframe.contentWindow.setTimeout(this.cleanUpFunctionReference, 200);
}
this.dialog = this.openDialog("FindReplace", this.makeUrlFromPopupName("find_replace"), null, param, {width:this.popupWidth, height:this.popupHeight});
return false;
},
/*
* This function cleans up any span tag left by Opera if the window was closed with the close handle in which case the unload event is not fired by Opera
*
* @return void
*/
cleanUp : function () {
if (this.dialog && (!this.dialog.dialogWindow || (this.dialog.dialogWindow && this.dialog.dialogWindow.closed))) {
this.getPluginInstance("EditorMode").setHTML(this.getPluginInstance("EditorMode").getInnerHTML().replace(this.cleanUpRegularExpression,"$2"));
this.dialog.close();
} else {
this.editor._iframe.contentWindow.setTimeout(this.cleanUpFunctionReference, 200);
}
}
});
typo3/sysext/rtehtmlarea/htmlarea/plugins/FindReplace/popups/find_replace.html (copie de travail)
} else {
document.getElementById('fr_pattern').focus();
}
document.body.onkeypress = onKeyPress;
window.opener.HTMLArea._addEvent(document, "keypress", onKeyPress);
if (window.opener.HTMLArea.is_gecko) {
window.opener.HTMLArea._addEvent(window, "unload", onCancel);
}
dialog.initialize();
if (HTMLArea.is_ie) {
HTMLArea._addEvent(window, "unload", onCancel);
}
};
function requestReplacement() {
if (!document.getElementById("fr_replacement").value && document.getElementById("fr_replaceall").checked) {
......
clearDoc();
}
function onCancel() {
clearDoc();
dialog.close();
if (dialog) {
clearDoc();
HTMLArea._removeEvent(document, "keypress", onKeyPress);
HTMLArea._removeEvent(window, "unload", onCancel);
dialog.close();
}
return false;
};
function onOK() {
......
return false;
};
function onEscape(ev) {
ev || (ev = window.event);
if (!ev) var ev = window.event;
if (ev.keyCode == 27) {
return onCancel();
}
return true;
};
function onKeyPress (ev) {
ev || (ev = window.event);
if (!ev) var ev = window.event;
switch(ev.keyCode) {
case 13:
document.getElementById('fr_go').click();
(2-2/2)