upgrade tinymce to 1.40
This commit is contained in:
parent
7ceff84e8a
commit
7d9c0268ac
107 changed files with 3717 additions and 492 deletions
55
www/extras/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin.js
vendored
Normal file
55
www/extras/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin.js
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
/* Import theme specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('advhr', 'uk,de,se');
|
||||
|
||||
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');
|
||||
|
||||
do {
|
||||
if (node.nodeName.toLowerCase() == "hr")
|
||||
tinyMCE.switchClassSticky(editor_id + '_advhr', 'mceButtonSelected');
|
||||
} while ((node = node.parentNode));
|
||||
|
||||
return true;
|
||||
}
|
||||
BIN
www/extras/tinymce/jscripts/tiny_mce/plugins/advhr/images/advhr.gif
vendored
Normal file
BIN
www/extras/tinymce/jscripts/tiny_mce/plugins/advhr/images/advhr.gif
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 209 B |
6
www/extras/tinymce/jscripts/tiny_mce/plugins/advhr/langs/de.js
vendored
Normal file
6
www/extras/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
www/extras/tinymce/jscripts/tiny_mce/plugins/advhr/langs/se.js
vendored
Normal file
6
www/extras/tinymce/jscripts/tiny_mce/plugins/advhr/langs/se.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
www/extras/tinymce/jscripts/tiny_mce/plugins/advhr/langs/uk.js
vendored
Normal file
6
www/extras/tinymce/jscripts/tiny_mce/plugins/advhr/langs/uk.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';
|
||||
20
www/extras/tinymce/jscripts/tiny_mce/plugins/advhr/readme.txt
vendored
Normal file
20
www/extras/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
www/extras/tinymce/jscripts/tiny_mce/plugins/advhr/rule.htm
vendored
Normal file
108
www/extras/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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue