[ Index ] |
|
Code source de PHP NUKE 7.9 |
1 /* Import plugin specific language pack */ 2 tinyMCE.importPluginLanguagePack('advhr', 'albanian,arabic,brazilian,catala,chinese,czech,danish,dutch,english,euskara,finnish,french,galego,german,greek,hungarian,icelandic,indonesian,italian,macedonian,norwegian,polish,portuguese,romanian,russian,slovak,slovenian,spanish,swedish,thai,turkish,ukrainian,vietnamese'); 3 4 function TinyMCE_advhr_getControlHTML(control_name) { 5 switch (control_name) { 6 case "advhr": 7 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\');" />'; 8 } 9 return ""; 10 } 11 12 /** 13 * Executes the mceAdvanceHr command. 14 */ 15 function TinyMCE_advhr_execCommand(editor_id, element, command, user_interface, value) { 16 // Handle commands 17 switch (command) { 18 case "mceAdvancedHr": 19 var template = new Array(); 20 template['file'] = '../../plugins/advhr/rule.htm'; // Relative to theme 21 template['width'] = 270; 22 template['height'] = 180; 23 var size = "", width = "", noshade = ""; 24 if (tinyMCE.selectedElement != null && tinyMCE.selectedElement.nodeName.toLowerCase() == "hr"){ 25 tinyMCE.hrElement = tinyMCE.selectedElement; 26 if (tinyMCE.hrElement) { 27 size = tinyMCE.hrElement.getAttribute('size') ? tinyMCE.hrElement.getAttribute('size') : ""; 28 width = tinyMCE.hrElement.getAttribute('width') ? tinyMCE.hrElement.getAttribute('width') : ""; 29 noshade = tinyMCE.hrElement.getAttribute('noshade') ? tinyMCE.hrElement.getAttribute('noshade') : ""; 30 } 31 tinyMCE.openWindow(template, {editor_id : editor_id, size : size, width : width, noshade : noshade, mceDo : 'update'}); 32 } else { 33 if (tinyMCE.isMSIE) { 34 tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false,'<hr />'); 35 } else { 36 tinyMCE.openWindow(template, {editor_id : editor_id, size : size, width : width, noshade : noshade, mceDo : 'insert'}); 37 } 38 } 39 40 return true; 41 } 42 // Pass to next handler in chain 43 return false; 44 } 45 46 function TinyMCE_advhr_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) { 47 tinyMCE.switchClassSticky(editor_id + '_advhr', 'mceButtonNormal'); 48 49 if (node == null) 50 return; 51 52 do { 53 if (node.nodeName.toLowerCase() == "hr") 54 tinyMCE.switchClassSticky(editor_id + '_advhr', 'mceButtonSelected'); 55 } while ((node = node.parentNode)); 56 57 return true; 58 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Apr 1 11:11:59 2007 | par Balluche grâce à PHPXref 0.7 |