egroupware/phpgwapi/js/tiny_mce/plugins/searchreplace/jscripts/replace.js

41 lines
1.3 KiB
JavaScript
Raw Normal View History

2006-08-21 21:26:21 +02:00
function init() {
tinyMCEPopup.resizeToInnerSize();
var formObj = document.forms[0];
formObj.searchstring.value = tinyMCE.getWindowArg("searchstring");
formObj.replacestring.value = tinyMCE.getWindowArg("replacestring");
formObj.casesensitivebox.checked = tinyMCE.getWindowArg("casesensitive");
// formObj.backwards[0].checked = tinyMCE.getWindowArg("backwards");
// formObj.backwards[1].checked = !tinyMCE.getWindowArg("backwards");
// formObj.wrapatend.checked = tinyMCE.getWindowArg("wrap");
// formObj.wholeword.checked = tinyMCE.getWindowArg("wholeword");
tinyMCEPopup.execCommand("mceResetSearch", false, {dummy : ""}, false);
}
function searchNext(replacemode) {
var formObj = document.forms[0];
// Whats the point?
if (formObj.searchstring.value == "" || formObj.searchstring.value == formObj.replacestring.value)
return;
// Do search
tinyMCEPopup.execCommand('mceSearch', false, {
string : formObj.searchstring.value,
replacestring : formObj.replacestring.value,
replacemode : replacemode,
casesensitive : formObj.casesensitivebox.checked,
backwards : false
// wrap : formObj.wrapatend.checked,
// wholeword : formObj.wholeword.checked
}, false);
window.focus();
}
function cancelAction() {
tinyMCEPopup.close();
}