mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-18 14:03:19 +01:00
8b6404cbc2
see tinymce.moxiecode.com/ for more info
89 lines
3.4 KiB
HTML
89 lines
3.4 KiB
HTML
<html>
|
|
<head>
|
|
<title>{$lang_searchreplace_replace_title}</title>
|
|
<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
|
<script language="javascript" type="text/javascript">
|
|
<!--
|
|
function init() {
|
|
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");
|
|
|
|
tinyMCE.execInstanceCommand(tinyMCE.getWindowArg("editor_id"), "mceResetSearch", false, {dummy : ""}, false);
|
|
window.focus();
|
|
}
|
|
|
|
function searchNext(replacemode) {
|
|
var formObj = document.forms[0];
|
|
|
|
// Whats the point?
|
|
if (formObj.searchstring.value == "" || formObj.searchstring.value == formObj.replacestring.value)
|
|
return;
|
|
|
|
// Do search
|
|
tinyMCE.execInstanceCommand(tinyMCE.getWindowArg("editor_id"), 'mceSearch', false, {
|
|
string : formObj.searchstring.value,
|
|
replacestring : formObj.replacestring.value,
|
|
replacemode : replacemode,
|
|
casesensitive : formObj.casesensitivebox.checked,
|
|
backwards : formObj.backwards[0].checked
|
|
// wrap : formObj.wrapatend.checked,
|
|
// wholeword : formObj.wholeword.checked
|
|
}, false);
|
|
}
|
|
|
|
function cancelAction() {
|
|
top.close();
|
|
}
|
|
//-->
|
|
</script>
|
|
</head>
|
|
<body onload="init();" style="margin: 4px;">
|
|
<form onsubmit="searchNext('none');return false;">
|
|
<table border="0" cellspacing="0" cellpadding="2">
|
|
<tr>
|
|
<td>{$lang_searchreplace_findwhat}: </td>
|
|
<td><input type="text" name="searchstring" style="width: 200px" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td>{$lang_searchreplace_replacewith}: </td>
|
|
<td><input type="text" name="replacestring" style="width: 200px" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2"><table border="0" cellspacing="0" cellpadding="0">
|
|
<tr>
|
|
<td>{$lang_searchreplace_direction}: </td>
|
|
<td><input name="backwards" class="radio" type="radio" value="true" /></td>
|
|
<td>{$lang_searchreplace_up}</td>
|
|
<td><input name="backwards" class="radio" type="radio" value="false" /></td>
|
|
<td>{$lang_searchreplace_down}</td>
|
|
</tr>
|
|
</table></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2"><table border="0" cellspacing="0" cellpadding="0">
|
|
<tr>
|
|
<td><input class="checkbox" type="checkbox" name="casesensitivebox" value="true" /></td>
|
|
<td>{$lang_searchreplace_case}</td>
|
|
</tr>
|
|
</table></td>
|
|
</tr>
|
|
</table>
|
|
<table border="0" width="100%" cellspacing="0" cellpadding="4">
|
|
<tr>
|
|
<td><input name="findBtn" type="button" id="findBtn" value="{$lang_searchreplace_findnext}" onclick="searchNext('none');" /></td>
|
|
<td><input name="replaceBtn" type="button" id="replaceBtn" value="{$lang_searchreplace_replace}" onclick="searchNext('current');" /></td>
|
|
<td><input name="replaceBtn" type="button" id="replaceAllBtn" value="{$lang_searchreplace_replaceall}" onclick="searchNext('all');" /></td>
|
|
<td align="right"><input name="cancelBtn" type="button" id="cancelBtn" value="{$lang_searchreplace_cancel}" onclick="cancelAction();" /></td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
</body>
|
|
</html>
|