Initial Commit of AgileBill Open Source
This commit is contained in:
2
includes/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin.js
vendored
Normal file
2
includes/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('advhr','en,de,sv,zh_cn,cs,fa,fr_ca,fr');function TinyMCE_advhr_getControlHTML(control_name){switch(control_name){case "advhr":return '<img id="{$editor_id}_advhr" src="{$pluginurl}/images/advhr.gif" title="{$lang_insert_advhr_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceAdvancedHr\');" />';}return "";}function TinyMCE_advhr_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceAdvancedHr":var template=new Array();template['file']='../../plugins/advhr/rule.htm';template['width']=270;template['height']=180;var size="",width="",noshade="";if(tinyMCE.selectedElement!=null&&tinyMCE.selectedElement.nodeName.toLowerCase()=="hr"){tinyMCE.hrElement=tinyMCE.selectedElement;if(tinyMCE.hrElement){size=tinyMCE.hrElement.getAttribute('size')?tinyMCE.hrElement.getAttribute('size'):"";width=tinyMCE.hrElement.getAttribute('width')?tinyMCE.hrElement.getAttribute('width'):"";noshade=tinyMCE.hrElement.getAttribute('noshade')?tinyMCE.hrElement.getAttribute('noshade'):"";}tinyMCE.openWindow(template,{editor_id:editor_id,size:size,width:width,noshade:noshade,mceDo:'update'});}else{if(tinyMCE.isMSIE){tinyMCE.execInstanceCommand(editor_id,'mceInsertContent',false,'<hr />');}else{tinyMCE.openWindow(template,{editor_id:editor_id,size:size,width:width,noshade:noshade,mceDo:'insert'});}}return true;}return false;}function TinyMCE_advhr_handleNodeChange(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){tinyMCE.switchClassSticky(editor_id+'_advhr','mceButtonNormal');if(node==null)return;do{if(node.nodeName.toLowerCase()=="hr")tinyMCE.switchClassSticky(editor_id+'_advhr','mceButtonSelected');}while((node=node.parentNode));return true;}
|
58
includes/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin_src.js
vendored
Normal file
58
includes/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin_src.js
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('advhr', 'en,de,sv,zh_cn,cs,fa,fr_ca,fr');
|
||||
|
||||
function TinyMCE_advhr_getControlHTML(control_name) {
|
||||
switch (control_name) {
|
||||
case "advhr":
|
||||
return '<img id="{$editor_id}_advhr" src="{$pluginurl}/images/advhr.gif" title="{$lang_insert_advhr_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceAdvancedHr\');" />';
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the mceAdvanceHr command.
|
||||
*/
|
||||
function TinyMCE_advhr_execCommand(editor_id, element, command, user_interface, value) {
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
case "mceAdvancedHr":
|
||||
var template = new Array();
|
||||
template['file'] = '../../plugins/advhr/rule.htm'; // Relative to theme
|
||||
template['width'] = 270;
|
||||
template['height'] = 180;
|
||||
var size = "", width = "", noshade = "";
|
||||
if (tinyMCE.selectedElement != null && tinyMCE.selectedElement.nodeName.toLowerCase() == "hr"){
|
||||
tinyMCE.hrElement = tinyMCE.selectedElement;
|
||||
if (tinyMCE.hrElement) {
|
||||
size = tinyMCE.hrElement.getAttribute('size') ? tinyMCE.hrElement.getAttribute('size') : "";
|
||||
width = tinyMCE.hrElement.getAttribute('width') ? tinyMCE.hrElement.getAttribute('width') : "";
|
||||
noshade = tinyMCE.hrElement.getAttribute('noshade') ? tinyMCE.hrElement.getAttribute('noshade') : "";
|
||||
}
|
||||
tinyMCE.openWindow(template, {editor_id : editor_id, size : size, width : width, noshade : noshade, mceDo : 'update'});
|
||||
} else {
|
||||
if (tinyMCE.isMSIE) {
|
||||
tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false,'<hr />');
|
||||
} else {
|
||||
tinyMCE.openWindow(template, {editor_id : editor_id, size : size, width : width, noshade : noshade, mceDo : 'insert'});
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
}
|
||||
|
||||
function TinyMCE_advhr_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
|
||||
tinyMCE.switchClassSticky(editor_id + '_advhr', 'mceButtonNormal');
|
||||
|
||||
if (node == null)
|
||||
return;
|
||||
|
||||
do {
|
||||
if (node.nodeName.toLowerCase() == "hr")
|
||||
tinyMCE.switchClassSticky(editor_id + '_advhr', 'mceButtonSelected');
|
||||
} while ((node = node.parentNode));
|
||||
|
||||
return true;
|
||||
}
|
BIN
includes/tinymce/jscripts/tiny_mce/plugins/advhr/images/advhr.gif
vendored
Normal file
BIN
includes/tinymce/jscripts/tiny_mce/plugins/advhr/images/advhr.gif
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 209 B |
6
includes/tinymce/jscripts/tiny_mce/plugins/advhr/langs/cs.js
vendored
Normal file
6
includes/tinymce/jscripts/tiny_mce/plugins/advhr/langs/cs.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
// UK lang variables
|
||||
|
||||
tinyMCELang['lang_insert_advhr_desc'] = 'Vlo<6C>it/editovat vodorovn<76> odd<64>lova<76>'
|
||||
tinyMCELang['lang_insert_advhr_width'] = '<27><><EFBFBD>ka';
|
||||
tinyMCELang['lang_insert_advhr_size'] = 'V<><56>ka';
|
||||
tinyMCELang['lang_insert_advhr_noshade'] = 'Nest<73>novat';
|
6
includes/tinymce/jscripts/tiny_mce/plugins/advhr/langs/de.js
vendored
Normal file
6
includes/tinymce/jscripts/tiny_mce/plugins/advhr/langs/de.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
// DE lang variables
|
||||
|
||||
tinyMCELang['lang_insert_advhr_desc'] = 'Horizontale Linie einfügen / bearbeiten'
|
||||
tinyMCELang['lang_insert_advhr_width'] = 'Breite';
|
||||
tinyMCELang['lang_insert_advhr_size'] = 'Höhe';
|
||||
tinyMCELang['lang_insert_advhr_noshade'] = 'Keinen Schatten';
|
6
includes/tinymce/jscripts/tiny_mce/plugins/advhr/langs/en.js
vendored
Normal file
6
includes/tinymce/jscripts/tiny_mce/plugins/advhr/langs/en.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
// UK lang variables
|
||||
|
||||
tinyMCELang['lang_insert_advhr_desc'] = 'Insert / edit Horizontale Rule'
|
||||
tinyMCELang['lang_insert_advhr_width'] = 'Width';
|
||||
tinyMCELang['lang_insert_advhr_size'] = 'Height';
|
||||
tinyMCELang['lang_insert_advhr_noshade'] = 'No shadow';
|
11
includes/tinymce/jscripts/tiny_mce/plugins/advhr/langs/fa.js
vendored
Normal file
11
includes/tinymce/jscripts/tiny_mce/plugins/advhr/langs/fa.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
// IR lang variables
|
||||
// Persian (Farsi) language pack (for IRAN)
|
||||
// By: Morteza Zafari
|
||||
// Lost@LostLord.com
|
||||
// http://www.LostLord.com
|
||||
|
||||
tinyMCELang['lang_dir'] = 'rtl';
|
||||
tinyMCELang['lang_insert_advhr_desc'] = 'درج و ویرایش خط افقی'
|
||||
tinyMCELang['lang_insert_advhr_width'] = 'عرض';
|
||||
tinyMCELang['lang_insert_advhr_size'] = 'ارتفاع';
|
||||
tinyMCELang['lang_insert_advhr_noshade'] = 'بدون سایه';
|
6
includes/tinymce/jscripts/tiny_mce/plugins/advhr/langs/fr.js
vendored
Normal file
6
includes/tinymce/jscripts/tiny_mce/plugins/advhr/langs/fr.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
// French lang variables by Laurent Dran
|
||||
|
||||
tinyMCELang['lang_insert_advhr_desc'] = 'Insérer / éditer une Rčgle Horizontale'
|
||||
tinyMCELang['lang_insert_advhr_width'] = 'Largeur';
|
||||
tinyMCELang['lang_insert_advhr_size'] = 'Hauteur';
|
||||
tinyMCELang['lang_insert_advhr_noshade'] = 'Sans ombre';
|
6
includes/tinymce/jscripts/tiny_mce/plugins/advhr/langs/fr_ca.js
vendored
Normal file
6
includes/tinymce/jscripts/tiny_mce/plugins/advhr/langs/fr_ca.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
// CA_FR lang variables
|
||||
|
||||
tinyMCELang['lang_insert_advhr_desc'] = 'Ins<6E>rer / Modifier S<>parateur Horizontal';
|
||||
tinyMCELang['lang_insert_advhr_width'] = 'Largeur';
|
||||
tinyMCELang['lang_insert_advhr_size'] = 'Hauteur';
|
||||
tinyMCELang['lang_insert_advhr_noshade'] = 'Sans ombrage';
|
6
includes/tinymce/jscripts/tiny_mce/plugins/advhr/langs/sv.js
vendored
Normal file
6
includes/tinymce/jscripts/tiny_mce/plugins/advhr/langs/sv.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
// SE lang variables
|
||||
|
||||
tinyMCELang['lang_insert_advhr_desc'] = 'Skapa / uppdatera Horizontell linie'
|
||||
tinyMCELang['lang_insert_advhr_width'] = 'Bredd';
|
||||
tinyMCELang['lang_insert_advhr_size'] = 'H<>jd';
|
||||
tinyMCELang['lang_insert_advhr_noshade'] = 'Ingen skugga';
|
6
includes/tinymce/jscripts/tiny_mce/plugins/advhr/langs/zh_cn.js
vendored
Normal file
6
includes/tinymce/jscripts/tiny_mce/plugins/advhr/langs/zh_cn.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
// Simplified Chinese lang variables contributed by cube316 (cube316@etang.com)
|
||||
|
||||
tinyMCELang['lang_insert_advhr_desc'] = '<27><><EFBFBD><EFBFBD>/<2F>༭ ˮƽ<CBAE><C6BD><EFBFBD><EFBFBD>'
|
||||
tinyMCELang['lang_insert_advhr_width'] = '<27><><EFBFBD><EFBFBD>';
|
||||
tinyMCELang['lang_insert_advhr_size'] = '<27>߶<EFBFBD>';
|
||||
tinyMCELang['lang_insert_advhr_noshade'] = '<27><><EFBFBD><EFBFBD>Ӱ';
|
20
includes/tinymce/jscripts/tiny_mce/plugins/advhr/readme.txt
vendored
Normal file
20
includes/tinymce/jscripts/tiny_mce/plugins/advhr/readme.txt
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
Advhr plugin for TinyMCE
|
||||
-----------------------------
|
||||
|
||||
About:
|
||||
This is a more advanced hr dialog contributed by Michael Keck.
|
||||
This one supports noshade, width and size.
|
||||
|
||||
Installation instructions:
|
||||
* Copy the advhr directory to the plugins directory of TinyMCE (/jscripts/tiny_mce/plugins).
|
||||
* Add plugin to TinyMCE plugin option list example: plugins : "advhr".
|
||||
* Add this "hr[class|width|size|noshade]" to extended_valid_elements option.
|
||||
|
||||
Initialization example:
|
||||
tinyMCE.init({
|
||||
theme : "advanced",
|
||||
mode : "textareas",
|
||||
plugins : "advhr",
|
||||
theme_advanced_buttons1_add : "advhr",
|
||||
extended_valid_elements : "hr[class|width|size|noshade]"
|
||||
});
|
108
includes/tinymce/jscripts/tiny_mce/plugins/advhr/rule.htm
vendored
Normal file
108
includes/tinymce/jscripts/tiny_mce/plugins/advhr/rule.htm
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{$lang_insert_link_title}</title>
|
||||
<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
function init() {
|
||||
// modified 2004-11-10 by Michael Keck (me@michaelkeck.de)
|
||||
// supporting onclick event to open pop windows
|
||||
var formObj = document.forms[0];
|
||||
formObj.width.value = tinyMCE.getWindowArg('width');
|
||||
formObj.size.value = tinyMCE.getWindowArg('size');
|
||||
formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('mceDo'));
|
||||
if (tinyMCE.getWindowArg('noshade')) {
|
||||
formObj.noshade.checked = true;
|
||||
}
|
||||
if (tinyMCE.getWindowArg('width').lastIndexOf('%')!=-1) {
|
||||
formObj.width2.value = "%";
|
||||
formObj.width.value = formObj.width.value.substring(0,formObj.width.value.length-1);
|
||||
}
|
||||
window.focus();
|
||||
}
|
||||
|
||||
function insertHR() {
|
||||
var formObj = document.forms[0];
|
||||
if (window.opener) {
|
||||
var width = formObj.width.value;
|
||||
var size = formObj.size.value;
|
||||
var html = '<hr';
|
||||
if (size!='' && size!=0) {
|
||||
html += ' size="' + size + '"';
|
||||
}
|
||||
if (width!='' && width!=0) {
|
||||
html += ' width="' + width;
|
||||
if (formObj.width2.value=='%') {
|
||||
html += '%';
|
||||
}
|
||||
html += '"';
|
||||
}
|
||||
if (formObj.noshade.checked==true) {
|
||||
html += ' noshade';
|
||||
}
|
||||
html += ' />';
|
||||
tinyMCE.execCommand("mceInsertContent",true,html);
|
||||
top.close();
|
||||
}
|
||||
}
|
||||
|
||||
function cancelAction() {
|
||||
top.close();
|
||||
}
|
||||
|
||||
//-->
|
||||
</script>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
input.radio {
|
||||
border: 1px none #000000;
|
||||
background-color: transparent;
|
||||
vertical-align: middle;
|
||||
}
|
||||
-->
|
||||
</style>
|
||||
</head>
|
||||
<body onload="init();">
|
||||
<form onsubmit="insertHR();return false;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="center" valign="middle"><table border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td colspan="2" class="title">{$lang_insert_advhr_desc}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">{$lang_insert_advhr_width}:</td>
|
||||
<td nowrap="nowrap">
|
||||
<input name="width" type="text" id="width" value="" style="width: 50px; vertical-align: middle;" />
|
||||
<select name="width2" id="width2" style="width: 50px; vertical-align: middle;">
|
||||
<option value="">px</option>
|
||||
<option value="%">%</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" valign="top">{$lang_insert_advhr_size}:</td>
|
||||
<td><select name="size" type="text" id="size" value="" style="width: 100px;">
|
||||
<option value="">Normal</option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
</select></td>
|
||||
<tr>
|
||||
<td align="right" valign="top"><input type="checkbox" name="noshade" id="noshade" class="radio" /></td>
|
||||
<td><label for="noshade">{$lang_insert_advhr_noshade}</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="button" name="insert" value="{$lang_insert}" onclick="insertHR();" id="insert" /></td>
|
||||
<td align="right"><input type="button" name="cancel" value="{$lang_cancel}" onclick="cancelAction();" id="cancel" /></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user