mirror of
https://github.com/friendica/friendica
synced 2025-04-25 04:30:11 +00:00
bug #96 move libraries to library - better alignment of like rotator
This commit is contained in:
parent
60caa03494
commit
0b221e8945
397 changed files with 30 additions and 30 deletions
6
library/tinymce/jscripts/tiny_mce/plugins/searchreplace/css/searchreplace.css
vendored
Normal file
6
library/tinymce/jscripts/tiny_mce/plugins/searchreplace/css/searchreplace.css
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
.panel_wrapper {height:85px;}
|
||||
.panel_wrapper div.current {height:85px;}
|
||||
|
||||
/* IE */
|
||||
* html .panel_wrapper {height:100px;}
|
||||
* html .panel_wrapper div.current {height:100px;}
|
1
library/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin.js
vendored
Normal file
1
library/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin.js
vendored
Normal file
|
@ -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:170+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)})();
|
57
library/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js
vendored
Normal file
57
library/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
/**
|
||||
* editor_plugin_src.js
|
||||
*
|
||||
* Copyright 2009, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://tinymce.moxiecode.com/license
|
||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||
*/
|
||||
|
||||
(function() {
|
||||
tinymce.create('tinymce.plugins.SearchReplacePlugin', {
|
||||
init : function(ed, url) {
|
||||
function open(m) {
|
||||
ed.windowManager.open({
|
||||
file : url + '/searchreplace.htm',
|
||||
width : 420 + parseInt(ed.getLang('searchreplace.delta_width', 0)),
|
||||
height : 170 + parseInt(ed.getLang('searchreplace.delta_height', 0)),
|
||||
inline : 1,
|
||||
auto_focus : 0
|
||||
}, {
|
||||
mode : m,
|
||||
search_string : ed.selection.getContent({format : 'text'}),
|
||||
plugin_url : url
|
||||
});
|
||||
};
|
||||
|
||||
// Register commands
|
||||
ed.addCommand('mceSearch', function() {
|
||||
open('search');
|
||||
});
|
||||
|
||||
ed.addCommand('mceReplace', function() {
|
||||
open('replace');
|
||||
});
|
||||
|
||||
// Register buttons
|
||||
ed.addButton('search', {title : 'searchreplace.search_desc', cmd : 'mceSearch'});
|
||||
ed.addButton('replace', {title : 'searchreplace.replace_desc', cmd : 'mceReplace'});
|
||||
|
||||
ed.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
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// Register plugin
|
||||
tinymce.PluginManager.add('searchreplace', tinymce.plugins.SearchReplacePlugin);
|
||||
})();
|
130
library/tinymce/jscripts/tiny_mce/plugins/searchreplace/js/searchreplace.js
vendored
Normal file
130
library/tinymce/jscripts/tiny_mce/plugins/searchreplace/js/searchreplace.js
vendored
Normal file
|
@ -0,0 +1,130 @@
|
|||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var SearchReplaceDialog = {
|
||||
init : function(ed) {
|
||||
var f = document.forms[0], m = tinyMCEPopup.getWindowArg("mode");
|
||||
|
||||
this.switchMode(m);
|
||||
|
||||
f[m + '_panel_searchstring'].value = tinyMCEPopup.getWindowArg("search_string");
|
||||
|
||||
// Focus input field
|
||||
f[m + '_panel_searchstring'].focus();
|
||||
},
|
||||
|
||||
switchMode : function(m) {
|
||||
var f, lm = this.lastMode;
|
||||
|
||||
if (lm != m) {
|
||||
f = document.forms[0];
|
||||
|
||||
if (lm) {
|
||||
f[m + '_panel_searchstring'].value = f[lm + '_panel_searchstring'].value;
|
||||
f[m + '_panel_backwardsu'].checked = f[lm + '_panel_backwardsu'].checked;
|
||||
f[m + '_panel_backwardsd'].checked = f[lm + '_panel_backwardsd'].checked;
|
||||
f[m + '_panel_casesensitivebox'].checked = f[lm + '_panel_casesensitivebox'].checked;
|
||||
}
|
||||
|
||||
mcTabs.displayTab(m + '_tab', m + '_panel');
|
||||
document.getElementById("replaceBtn").style.display = (m == "replace") ? "inline" : "none";
|
||||
document.getElementById("replaceAllBtn").style.display = (m == "replace") ? "inline" : "none";
|
||||
this.lastMode = m;
|
||||
}
|
||||
},
|
||||
|
||||
searchNext : function(a) {
|
||||
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;
|
||||
|
||||
// Get input
|
||||
f = document.forms[0];
|
||||
s = f[m + '_panel_searchstring'].value;
|
||||
b = f[m + '_panel_backwardsu'].checked;
|
||||
ca = f[m + '_panel_casesensitivebox'].checked;
|
||||
rs = f['replace_panel_replacestring'].value;
|
||||
|
||||
if (s == '')
|
||||
return;
|
||||
|
||||
function fix() {
|
||||
// Correct Firefox graphics glitches
|
||||
r = se.getRng().cloneRange();
|
||||
ed.getDoc().execCommand('SelectAll', false, null);
|
||||
se.setRng(r);
|
||||
};
|
||||
|
||||
function replace() {
|
||||
if (tinymce.isIE)
|
||||
ed.selection.getRng().duplicate().pasteHTML(rs); // Needs to be duplicated due to selection bug in IE
|
||||
else
|
||||
ed.getDoc().execCommand('InsertHTML', false, rs);
|
||||
};
|
||||
|
||||
// IE flags
|
||||
if (ca)
|
||||
fl = fl | 4;
|
||||
|
||||
switch (a) {
|
||||
case 'all':
|
||||
// Move caret to beginning of text
|
||||
ed.execCommand('SelectAll');
|
||||
ed.selection.collapse(true);
|
||||
|
||||
if (tinymce.isIE) {
|
||||
while (r.findText(s, b ? -1 : 1, fl)) {
|
||||
r.scrollIntoView();
|
||||
r.select();
|
||||
replace();
|
||||
fo = 1;
|
||||
|
||||
if (b) {
|
||||
r.moveEnd("character", -(rs.length)); // Otherwise will loop forever
|
||||
}
|
||||
}
|
||||
|
||||
tinyMCEPopup.storeSelection();
|
||||
} else {
|
||||
while (w.find(s, ca, b, false, false, false, false)) {
|
||||
replace();
|
||||
fo = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (fo)
|
||||
tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.allreplaced'));
|
||||
else
|
||||
tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
|
||||
|
||||
return;
|
||||
|
||||
case 'current':
|
||||
if (!ed.selection.isCollapsed())
|
||||
replace();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
se.collapse(b);
|
||||
r = se.getRng();
|
||||
|
||||
// Whats the point
|
||||
if (!s)
|
||||
return;
|
||||
|
||||
if (tinymce.isIE) {
|
||||
if (r.findText(s, b ? -1 : 1, fl)) {
|
||||
r.scrollIntoView();
|
||||
r.select();
|
||||
} else
|
||||
tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
|
||||
|
||||
tinyMCEPopup.storeSelection();
|
||||
} else {
|
||||
if (!w.find(s, ca, b, false, false, false, false))
|
||||
tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
|
||||
else
|
||||
fix();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
tinyMCEPopup.onInit.add(SearchReplaceDialog.init, SearchReplaceDialog);
|
16
library/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js
vendored
Normal file
16
library/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
tinyMCE.addI18n('en.searchreplace_dlg',{
|
||||
searchnext_desc:"Find again",
|
||||
notfound:"The search has been completed. The search string could not be found.",
|
||||
search_title:"Find",
|
||||
replace_title:"Find/Replace",
|
||||
allreplaced:"All occurrences of the search string were replaced.",
|
||||
findwhat:"Find what",
|
||||
replacewith:"Replace with",
|
||||
direction:"Direction",
|
||||
up:"Up",
|
||||
down:"Down",
|
||||
mcase:"Match case",
|
||||
findnext:"Find next",
|
||||
replace:"Replace",
|
||||
replaceall:"Replace all"
|
||||
});
|
99
library/tinymce/jscripts/tiny_mce/plugins/searchreplace/searchreplace.htm
vendored
Normal file
99
library/tinymce/jscripts/tiny_mce/plugins/searchreplace/searchreplace.htm
vendored
Normal file
|
@ -0,0 +1,99 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#searchreplace_dlg.replace_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
||||
<script type="text/javascript" src="js/searchreplace.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="css/searchreplace.css" />
|
||||
</head>
|
||||
<body style="display:none;">
|
||||
<form onsubmit="SearchReplaceDialog.searchNext('none');return false;" action="#">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="search_tab"><span><a href="javascript:SearchReplaceDialog.switchMode('search');" onmousedown="return false;">{#searchreplace.search_desc}</a></span></li>
|
||||
<li id="replace_tab"><span><a href="javascript:SearchReplaceDialog.switchMode('replace');" onmousedown="return false;">{#searchreplace_dlg.replace}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div id="search_panel" class="panel">
|
||||
<table border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td><label for="search_panel_searchstring">{#searchreplace_dlg.findwhat}</label></td>
|
||||
<td><input type="text" id="search_panel_searchstring" name="search_panel_searchstring" style="width: 200px" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellspacing="0" cellpadding="0" class="direction">
|
||||
<tr>
|
||||
<td><label>{#searchreplace_dlg.direction}</label></td>
|
||||
<td><input id="search_panel_backwardsu" name="search_panel_backwards" class="radio" type="radio" /></td>
|
||||
<td><label for="search_panel_backwardsu">{#searchreplace_dlg.up}</label></td>
|
||||
<td><input id="search_panel_backwardsd" name="search_panel_backwards" class="radio" type="radio" checked="checked" /></td>
|
||||
<td><label for="search_panel_backwardsd">{#searchreplace_dlg.down}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input id="search_panel_casesensitivebox" name="search_panel_casesensitivebox" class="checkbox" type="checkbox" /></td>
|
||||
<td><label for="search_panel_casesensitivebox">{#searchreplace_dlg.mcase}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="replace_panel" class="panel">
|
||||
<table border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td><label for="replace_panel_searchstring">{#searchreplace_dlg.findwhat}</label></td>
|
||||
<td><input type="text" id="replace_panel_searchstring" name="replace_panel_searchstring" style="width: 200px" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="replace_panel_replacestring">{#searchreplace_dlg.replacewith}</label></td>
|
||||
<td><input type="text" id="replace_panel_replacestring" name="replace_panel_replacestring" style="width: 200px" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellspacing="0" cellpadding="0" class="direction">
|
||||
<tr>
|
||||
<td><label>{#searchreplace_dlg.direction}</label></td>
|
||||
<td><input id="replace_panel_backwardsu" name="replace_panel_backwards" class="radio" type="radio" /></td>
|
||||
<td><label for="replace_panel_backwardsu">{#searchreplace_dlg.up}</label></td>
|
||||
<td><input id="replace_panel_backwardsd" name="replace_panel_backwards" class="radio" type="radio" checked="checked" /></td>
|
||||
<td><label for="replace_panel_backwardsd">{#searchreplace_dlg.down}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input id="replace_panel_casesensitivebox" name="replace_panel_casesensitivebox" class="checkbox" type="checkbox" /></td>
|
||||
<td><label for="replace_panel_casesensitivebox">{#searchreplace_dlg.mcase}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<input type="submit" id="insert" name="insert" value="{#searchreplace_dlg.findnext}" />
|
||||
<input type="button" class="button" id="replaceBtn" name="replaceBtn" value="{#searchreplace_dlg.replace}" onclick="SearchReplaceDialog.searchNext('current');" />
|
||||
<input type="button" class="button" id="replaceAllBtn" name="replaceAllBtn" value="{#searchreplace_dlg.replaceall}" onclick="SearchReplaceDialog.searchNext('all');" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue