summaryrefslogtreecommitdiff
path: root/roundcubemail/program/js/tiny_mce/plugins/searchreplace/jscripts/replace.js
diff options
context:
space:
mode:
authorestadtherr <estadtherr@208e9e7b-5314-0410-a742-e7e81cd9613c>2006-09-14 03:49:28 +0000
committerestadtherr <estadtherr@208e9e7b-5314-0410-a742-e7e81cd9613c>2006-09-14 03:49:28 +0000
commita4332663cfcdb53b352c8646f78855ae3436cfec (patch)
treeceaf2d8afbf791e9d007cfe7a676fc1e0790b7a6 /roundcubemail/program/js/tiny_mce/plugins/searchreplace/jscripts/replace.js
parent8b3252550799d1b69ba8ff0c0fb3f916608c2e1d (diff)
Initial TinyMCE editor support (still need to work on spellcheck and skins)
git-svn-id: https://svn.roundcube.net/trunk@344 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js/tiny_mce/plugins/searchreplace/jscripts/replace.js')
-rw-r--r--roundcubemail/program/js/tiny_mce/plugins/searchreplace/jscripts/replace.js40
1 files changed, 40 insertions, 0 deletions
diff --git a/roundcubemail/program/js/tiny_mce/plugins/searchreplace/jscripts/replace.js b/roundcubemail/program/js/tiny_mce/plugins/searchreplace/jscripts/replace.js
new file mode 100644
index 000000000..3cb417813
--- /dev/null
+++ b/roundcubemail/program/js/tiny_mce/plugins/searchreplace/jscripts/replace.js
@@ -0,0 +1,40 @@
+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();
+}