/branches/v4.0/wikini/maj_wikini/tools/templates/themes/default/javascripts/tiny_mce/plugins/advhr/rule.htm |
---|
New file |
0,0 → 1,61 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
<head> |
<title>{$lang_insert_advhr_desc}</title> |
<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script> |
<script language="javascript" type="text/javascript" src="jscripts/rule.js"></script> |
<script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script> |
<link href="css/advhr.css" rel="stylesheet" type="text/css" /> |
<base target="_self" /> |
</head> |
<body onload="tinyMCEPopup.executeOnLoad('init();');"> |
<form onsubmit="insertHR();return false;" action="#"> |
<div class="tabs"> |
<ul> |
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_insert_advhr_desc}</a></span></li> |
</ul> |
</div> |
<div class="panel_wrapper"> |
<div id="general_panel" class="panel current"> |
<table border="0" cellpadding="4" cellspacing="0"> |
<tr> |
<td><label for="width">{$lang_insert_advhr_width}</label></td> |
<td nowrap="nowrap"> |
<input id="width" name="width" type="text" value="" /> |
<select name="width2" id="width2"> |
<option value="">px</option> |
<option value="%">%</option> |
</select> |
</td> |
</tr> |
<tr> |
<td><label for="size">{$lang_insert_advhr_size}</label></td> |
<td><select id="size" name="size"> |
<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> |
<tr> |
<td><label for="noshade">{$lang_insert_advhr_noshade}</label></td> |
<td><input type="checkbox" name="noshade" id="noshade" class="radio" /></td> |
</tr> |
</table> |
</div> |
</div> |
<div class="mceActionPanel"> |
<div style="float: left"> |
<input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertHR();" /> |
</div> |
<div style="float: right"> |
<input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" /> |
</div> |
</div> |
</form> |
</body> |
</html> |
/branches/v4.0/wikini/maj_wikini/tools/templates/themes/default/javascripts/tiny_mce/plugins/advhr/editor_plugin.js |
---|
New file |
0,0 → 1,0 |
tinyMCE.importPluginLanguagePack('advhr');var TinyMCE_AdvancedHRPlugin={getInfo:function(){return{longname:'Advanced HR',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},getControlHTML:function(cn){switch(cn){case"advhr":return tinyMCE.getButtonHTML(cn,'lang_insert_advhr_desc','{$pluginurl}/images/advhr.gif','mceAdvancedHr')}return""},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceAdvancedHr":var template=new Array();template['file']='../../plugins/advhr/rule.htm';template['width']=250;template['height']=160;template['width']+=tinyMCE.getLang('lang_advhr_delta_width',0);template['height']+=tinyMCE.getLang('lang_advhr_delta_height',0);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,inline:"yes",size:size,width:width,noshade:noshade,mceDo:'insert'})}}return true}return false},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node==null)return;do{if(node.nodeName=="HR"){tinyMCE.switchClass(editor_id+'_advhr','mceButtonSelected');return true}}while((node=node.parentNode));tinyMCE.switchClass(editor_id+'_advhr','mceButtonNormal');return true}};tinyMCE.addPlugin("advhr",TinyMCE_AdvancedHRPlugin); |
/branches/v4.0/wikini/maj_wikini/tools/templates/themes/default/javascripts/tiny_mce/plugins/advhr/jscripts/rule.js |
---|
New file |
0,0 → 1,43 |
function init() { |
tinyMCEPopup.resizeToInnerSize(); |
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'),'Insert',true); |
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); |
} |
} |
function insertHR() { |
var formObj = document.forms[0]; |
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="noshade"'; |
} |
html += ' />'; |
tinyMCEPopup.execCommand("mceInsertContent", true, html); |
tinyMCEPopup.close(); |
} |
function cancelAction() { |
tinyMCEPopup.close(); |
} |
/branches/v4.0/wikini/maj_wikini/tools/templates/themes/default/javascripts/tiny_mce/plugins/advhr/langs/fr.js |
---|
New file |
0,0 → 1,9 |
// FR lang variables |
// Modified by Motte, last updated 2006-03-23 |
tinyMCE.addToLang('',{ |
insert_advhr_desc : 'Insérer une règle horizontale stylée', |
insert_advhr_width : 'Largeur', |
insert_advhr_size : 'Hauteur', |
insert_advhr_noshade : 'Sans ombre' |
}); |
/branches/v4.0/wikini/maj_wikini/tools/templates/themes/default/javascripts/tiny_mce/plugins/advhr/langs/en.js |
---|
New file |
0,0 → 1,8 |
// UK lang variables |
tinyMCE.addToLang('',{ |
insert_advhr_desc : 'Horizontale rule', |
insert_advhr_width : 'Width', |
insert_advhr_size : 'Height', |
insert_advhr_noshade : 'No shadow' |
}); |
/branches/v4.0/wikini/maj_wikini/tools/templates/themes/default/javascripts/tiny_mce/plugins/advhr/images/advhr.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/branches/v4.0/wikini/maj_wikini/tools/templates/themes/default/javascripts/tiny_mce/plugins/advhr/images/advhr.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/branches/v4.0/wikini/maj_wikini/tools/templates/themes/default/javascripts/tiny_mce/plugins/advhr/editor_plugin_src.js |
---|
New file |
0,0 → 1,90 |
/** |
* $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $ |
* |
* @author Moxiecode |
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved. |
*/ |
/* Import plugin specific language pack */ |
tinyMCE.importPluginLanguagePack('advhr'); |
var TinyMCE_AdvancedHRPlugin = { |
getInfo : function() { |
return { |
longname : 'Advanced HR', |
author : 'Moxiecode Systems AB', |
authorurl : 'http://tinymce.moxiecode.com', |
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr', |
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion |
} |
}, |
getControlHTML : function(cn) { |
switch (cn) { |
case "advhr": |
return tinyMCE.getButtonHTML(cn, 'lang_insert_advhr_desc', '{$pluginurl}/images/advhr.gif', 'mceAdvancedHr'); |
} |
return ""; |
}, |
/** |
* Executes the mceAdvanceHr command. |
*/ |
execCommand : function(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'] = 250; |
template['height'] = 160; |
template['width'] += tinyMCE.getLang('lang_advhr_delta_width', 0); |
template['height'] += tinyMCE.getLang('lang_advhr_delta_height', 0); |
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, inline : "yes", size : size, width : width, noshade : noshade, mceDo : 'insert'}); |
} |
} |
return true; |
} |
// Pass to next handler in chain |
return false; |
}, |
handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) { |
if (node == null) |
return; |
do { |
if (node.nodeName == "HR") { |
tinyMCE.switchClass(editor_id + '_advhr', 'mceButtonSelected'); |
return true; |
} |
} while ((node = node.parentNode)); |
tinyMCE.switchClass(editor_id + '_advhr', 'mceButtonNormal'); |
return true; |
} |
}; |
tinyMCE.addPlugin("advhr", TinyMCE_AdvancedHRPlugin); |
/branches/v4.0/wikini/maj_wikini/tools/templates/themes/default/javascripts/tiny_mce/plugins/advhr/css/advhr.css |
---|
New file |
0,0 → 1,23 |
input.radio { |
border: 1px none #000000; |
background-color: transparent; |
vertical-align: middle; |
} |
.panel_wrapper div.current { |
height: 80px; |
} |
#width { |
width: 50px; |
vertical-align: middle; |
} |
#width2 { |
width: 50px; |
vertical-align: middle; |
} |
#size { |
width: 100px; |
} |
/branches/v4.0/wikini/maj_wikini/tools/templates/themes/default/javascripts/tiny_mce/plugins/advhr/readme.txt |
---|
New file |
0,0 → 1,0 |
Check the TinyMCE documentation for details on this plugin. |