summaryrefslogtreecommitdiff
path: root/public/javascripts/tiny_mce/plugins/searchreplace
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-06-27 22:52:50 +0200
committererdgeist <erdgeist@erdgeist.org>2026-06-27 22:52:50 +0200
commit9a19a0494ef51cdac9a78e24d517ca48ba44c453 (patch)
tree8eaae12d8047a40e29d3ea7ff3116b5c869e04bd /public/javascripts/tiny_mce/plugins/searchreplace
parent85a01e35274b8d4d4165a7b26bd7986e211246bb (diff)
parent1853082fcd8c067390c246f9daa01a9b47387497 (diff)
Migration from Rails 2.3.5 to Rails 8.1 successful.
Merging dev branch.
Diffstat (limited to 'public/javascripts/tiny_mce/plugins/searchreplace')
-rw-r--r--public/javascripts/tiny_mce/plugins/searchreplace/css/searchreplace.css6
-rw-r--r--public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin.js1
-rw-r--r--public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js54
-rw-r--r--public/javascripts/tiny_mce/plugins/searchreplace/js/searchreplace.js126
-rw-r--r--public/javascripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js16
-rw-r--r--public/javascripts/tiny_mce/plugins/searchreplace/searchreplace.htm104
6 files changed, 0 insertions, 307 deletions
diff --git a/public/javascripts/tiny_mce/plugins/searchreplace/css/searchreplace.css b/public/javascripts/tiny_mce/plugins/searchreplace/css/searchreplace.css
deleted file mode 100644
index ecdf58c..0000000
--- a/public/javascripts/tiny_mce/plugins/searchreplace/css/searchreplace.css
+++ /dev/null
@@ -1,6 +0,0 @@
1.panel_wrapper {height:85px;}
2.panel_wrapper div.current {height:85px;}
3
4/* IE */
5* html .panel_wrapper {height:100px;}
6* html .panel_wrapper div.current {height:100px;}
diff --git a/public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin.js b/public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin.js
deleted file mode 100644
index c3f8358..0000000
--- a/public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin.js
+++ /dev/null
@@ -1 +0,0 @@
1(function(){tinymce.create("tinymce.plugins.SearchReplacePlugin",{init:function(a,c){function b(d){a.windowManager.open({file:c+"/searchreplace.htm",width:420+parseInt(a.getLang("searchreplace.delta_width",0)),height:160+parseInt(a.getLang("searchreplace.delta_height",0)),inline:1,auto_focus:0},{mode:d,search_string:a.selection.getContent({format:"text"}),plugin_url:c})}a.addCommand("mceSearch",function(){b("search")});a.addCommand("mceReplace",function(){b("replace")});a.addButton("search",{title:"searchreplace.search_desc",cmd:"mceSearch"});a.addButton("replace",{title:"searchreplace.replace_desc",cmd:"mceReplace"});a.addShortcut("ctrl+f","searchreplace.search_desc","mceSearch")},getInfo:function(){return{longname:"Search/Replace",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("searchreplace",tinymce.plugins.SearchReplacePlugin)})(); \ No newline at end of file
diff --git a/public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js
deleted file mode 100644
index 59edc3b..0000000
--- a/public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js
+++ /dev/null
@@ -1,54 +0,0 @@
1/**
2 * $Id: editor_plugin_src.js 686 2008-03-09 18:13:49Z spocke $
3 *
4 * @author Moxiecode
5 * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
6 */
7
8(function() {
9 tinymce.create('tinymce.plugins.SearchReplacePlugin', {
10 init : function(ed, url) {
11 function open(m) {
12 ed.windowManager.open({
13 file : url + '/searchreplace.htm',
14 width : 420 + parseInt(ed.getLang('searchreplace.delta_width', 0)),
15 height : 160 + parseInt(ed.getLang('searchreplace.delta_height', 0)),
16 inline : 1,
17 auto_focus : 0
18 }, {
19 mode : m,
20 search_string : ed.selection.getContent({format : 'text'}),
21 plugin_url : url
22 });
23 };
24
25 // Register commands
26 ed.addCommand('mceSearch', function() {
27 open('search');
28 });
29
30 ed.addCommand('mceReplace', function() {
31 open('replace');
32 });
33
34 // Register buttons
35 ed.addButton('search', {title : 'searchreplace.search_desc', cmd : 'mceSearch'});
36 ed.addButton('replace', {title : 'searchreplace.replace_desc', cmd : 'mceReplace'});
37
38 ed.addShortcut('ctrl+f', 'searchreplace.search_desc', 'mceSearch');
39 },
40
41 getInfo : function() {
42 return {
43 longname : 'Search/Replace',
44 author : 'Moxiecode Systems AB',
45 authorurl : 'http://tinymce.moxiecode.com',
46 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace',
47 version : tinymce.majorVersion + "." + tinymce.minorVersion
48 };
49 }
50 });
51
52 // Register plugin
53 tinymce.PluginManager.add('searchreplace', tinymce.plugins.SearchReplacePlugin);
54})(); \ No newline at end of file
diff --git a/public/javascripts/tiny_mce/plugins/searchreplace/js/searchreplace.js b/public/javascripts/tiny_mce/plugins/searchreplace/js/searchreplace.js
deleted file mode 100644
index a8585cc..0000000
--- a/public/javascripts/tiny_mce/plugins/searchreplace/js/searchreplace.js
+++ /dev/null
@@ -1,126 +0,0 @@
1tinyMCEPopup.requireLangPack();
2
3var SearchReplaceDialog = {
4 init : function(ed) {
5 var f = document.forms[0], m = tinyMCEPopup.getWindowArg("mode");
6
7 this.switchMode(m);
8
9 f[m + '_panel_searchstring'].value = tinyMCEPopup.getWindowArg("search_string");
10
11 // Focus input field
12 f[m + '_panel_searchstring'].focus();
13 },
14
15 switchMode : function(m) {
16 var f, lm = this.lastMode;
17
18 if (lm != m) {
19 f = document.forms[0];
20
21 if (lm) {
22 f[m + '_panel_searchstring'].value = f[lm + '_panel_searchstring'].value;
23 f[m + '_panel_backwardsu'].checked = f[lm + '_panel_backwardsu'].checked;
24 f[m + '_panel_backwardsd'].checked = f[lm + '_panel_backwardsd'].checked;
25 f[m + '_panel_casesensitivebox'].checked = f[lm + '_panel_casesensitivebox'].checked;
26 }
27
28 mcTabs.displayTab(m + '_tab', m + '_panel');
29 document.getElementById("replaceBtn").style.display = (m == "replace") ? "inline" : "none";
30 document.getElementById("replaceAllBtn").style.display = (m == "replace") ? "inline" : "none";
31 this.lastMode = m;
32 }
33 },
34
35 searchNext : function(a) {
36 var ed = tinyMCEPopup.editor, se = ed.selection, r = se.getRng(), f, m = this.lastMode, s, b, fl = 0, w = ed.getWin(), wm = ed.windowManager, fo = 0;
37
38 // Get input
39 f = document.forms[0];
40 s = f[m + '_panel_searchstring'].value;
41 b = f[m + '_panel_backwardsu'].checked;
42 ca = f[m + '_panel_casesensitivebox'].checked;
43 rs = f['replace_panel_replacestring'].value;
44
45 if (s == '')
46 return;
47
48 function fix() {
49 // Correct Firefox graphics glitches
50 r = se.getRng().cloneRange();
51 ed.getDoc().execCommand('SelectAll', false, null);
52 se.setRng(r);
53 };
54
55 function replace() {
56 if (tinymce.isIE)
57 ed.selection.getRng().duplicate().pasteHTML(rs); // Needs to be duplicated due to selection bug in IE
58 else
59 ed.getDoc().execCommand('InsertHTML', false, rs);
60 };
61
62 // IE flags
63 if (ca)
64 fl = fl | 4;
65
66 switch (a) {
67 case 'all':
68 // Move caret to beginning of text
69 ed.execCommand('SelectAll');
70 ed.selection.collapse(true);
71
72 if (tinymce.isIE) {
73 while (r.findText(s, b ? -1 : 1, fl)) {
74 r.scrollIntoView();
75 r.select();
76 replace();
77 fo = 1;
78 }
79
80 tinyMCEPopup.storeSelection();
81 } else {
82 while (w.find(s, ca, b, false, false, false, false)) {
83 replace();
84 fo = 1;
85 }
86 }
87
88 if (fo)
89 tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.allreplaced'));
90 else
91 tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
92
93 return;
94
95 case 'current':
96 if (!ed.selection.isCollapsed())
97 replace();
98
99 break;
100 }
101
102 se.collapse(b);
103 r = se.getRng();
104
105 // Whats the point
106 if (!s)
107 return;
108
109 if (tinymce.isIE) {
110 if (r.findText(s, b ? -1 : 1, fl)) {
111 r.scrollIntoView();
112 r.select();
113 } else
114 tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
115
116 tinyMCEPopup.storeSelection();
117 } else {
118 if (!w.find(s, ca, b, false, false, false, false))
119 tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
120 else
121 fix();
122 }
123 }
124};
125
126tinyMCEPopup.onInit.add(SearchReplaceDialog.init, SearchReplaceDialog);
diff --git a/public/javascripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js
deleted file mode 100644
index 370959a..0000000
--- a/public/javascripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js
+++ /dev/null
@@ -1,16 +0,0 @@
1tinyMCE.addI18n('en.searchreplace_dlg',{
2searchnext_desc:"Find again",
3notfound:"The search has been completed. The search string could not be found.",
4search_title:"Find",
5replace_title:"Find/Replace",
6allreplaced:"All occurrences of the search string were replaced.",
7findwhat:"Find what",
8replacewith:"Replace with",
9direction:"Direction",
10up:"Up",
11down:"Down",
12mcase:"Match case",
13findnext:"Find next",
14replace:"Replace",
15replaceall:"Replace all"
16}); \ No newline at end of file
diff --git a/public/javascripts/tiny_mce/plugins/searchreplace/searchreplace.htm b/public/javascripts/tiny_mce/plugins/searchreplace/searchreplace.htm
deleted file mode 100644
index 0b42486..0000000
--- a/public/javascripts/tiny_mce/plugins/searchreplace/searchreplace.htm
+++ /dev/null
@@ -1,104 +0,0 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4 <title>{#searchreplace_dlg.replace_title}</title>
5 <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6 <script type="text/javascript" src="../../utils/mctabs.js"></script>
7 <script type="text/javascript" src="../../utils/form_utils.js"></script>
8 <script type="text/javascript" src="js/searchreplace.js"></script>
9 <link rel="stylesheet" type="text/css" href="css/searchreplace.css" />
10</head>
11<body style="display:none;">
12<form onsubmit="SearchReplaceDialog.searchNext('none');return false;" action="#">
13 <div class="tabs">
14 <ul>
15 <li id="search_tab"><span><a href="javascript:SearchReplaceDialog.switchMode('search');" onmousedown="return false;">{#searchreplace.search_desc}</a></span></li>
16 <li id="replace_tab"><span><a href="javascript:SearchReplaceDialog.switchMode('replace');" onmousedown="return false;">{#searchreplace_dlg.replace}</a></span></li>
17 </ul>
18 </div>
19
20 <div class="panel_wrapper">
21 <div id="search_panel" class="panel">
22 <table border="0" cellspacing="0" cellpadding="2">
23 <tr>
24 <td><label for="search_panel_searchstring">{#searchreplace_dlg.findwhat}</label></td>
25 <td><input type="text" id="search_panel_searchstring" name="search_panel_searchstring" style="width: 200px" /></td>
26 </tr>
27 <tr>
28 <td colspan="2">
29 <table border="0" cellspacing="0" cellpadding="0" class="direction">
30 <tr>
31 <td><label>{#searchreplace_dlg.direction}</label></td>
32 <td><input id="search_panel_backwardsu" name="search_panel_backwards" class="radio" type="radio" /></td>
33 <td><label for="search_panel_backwardsu">{#searchreplace_dlg.up}</label></td>
34 <td><input id="search_panel_backwardsd" name="search_panel_backwards" class="radio" type="radio" checked="checked" /></td>
35 <td><label for="search_panel_backwardsd">{#searchreplace_dlg.down}</label></td>
36 </tr>
37 </table>
38 </td>
39 </tr>
40 <tr>
41 <td colspan="2">
42 <table border="0" cellspacing="0" cellpadding="0">
43 <tr>
44 <td><input id="search_panel_casesensitivebox" name="search_panel_casesensitivebox" class="checkbox" type="checkbox" /></td>
45 <td><label for="search_panel_casesensitivebox">{#searchreplace_dlg.mcase}</label></td>
46 </tr>
47 </table>
48 </td>
49 </tr>
50 </table>
51 </div>
52
53 <div id="replace_panel" class="panel">
54 <table border="0" cellspacing="0" cellpadding="2">
55 <tr>
56 <td><label for="replace_panel_searchstring">{#searchreplace_dlg.findwhat}</label></td>
57 <td><input type="text" id="replace_panel_searchstring" name="replace_panel_searchstring" style="width: 200px" /></td>
58 </tr>
59 <tr>
60 <td><label for="replace_panel_replacestring">{#searchreplace_dlg.replacewith}</label></td>
61 <td><input type="text" id="replace_panel_replacestring" name="replace_panel_replacestring" style="width: 200px" /></td>
62 </tr>
63 <tr>
64 <td colspan="2">
65 <table border="0" cellspacing="0" cellpadding="0" class="direction">
66 <tr>
67 <td><label>{#searchreplace_dlg.direction}</label></td>
68 <td><input id="replace_panel_backwardsu" name="replace_panel_backwards" class="radio" type="radio" /></td>
69 <td><label for="replace_panel_backwardsu">{#searchreplace_dlg.up}</label></td>
70 <td><input id="replace_panel_backwardsd" name="replace_panel_backwards" class="radio" type="radio" checked="checked" /></td>
71 <td><label for="replace_panel_backwardsd">{#searchreplace_dlg.down}</label></td>
72 </tr>
73 </table>
74 </td>
75 </tr>
76 <tr>
77 <td colspan="2">
78 <table border="0" cellspacing="0" cellpadding="0">
79 <tr>
80 <td><input id="replace_panel_casesensitivebox" name="replace_panel_casesensitivebox" class="checkbox" type="checkbox" /></td>
81 <td><label for="replace_panel_casesensitivebox">{#searchreplace_dlg.mcase}</label></td>
82 </tr>
83 </table>
84 </td>
85 </tr>
86 </table>
87 </div>
88
89 </div>
90
91 <div class="mceActionPanel">
92 <div style="float: left">
93 <input type="submit" id="insert" name="insert" value="{#searchreplace_dlg.findnext}" />
94 <input type="button" class="button" id="replaceBtn" name="replaceBtn" value="{#searchreplace_dlg.replace}" onclick="SearchReplaceDialog.searchNext('current');" />
95 <input type="button" class="button" id="replaceAllBtn" name="replaceAllBtn" value="{#searchreplace_dlg.replaceall}" onclick="SearchReplaceDialog.searchNext('all');" />
96 </div>
97
98 <div style="float: right">
99 <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
100 </div>
101 </div>
102</form>
103</body>
104</html>