WordPress.org

Make WordPress Core

Changeset 3163


Ignore:
Timestamp:
11/19/2005 07:15:11 PM (13 years ago)
Author:
ryan
Message:

TinyMCE help. fixes #1908

Location:
trunk
Files:
5 added
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-header.php

    r3150 r3163  
    8181<?php if ( isset( $editing ) ) : ?>
    8282<?php if ( 'true' == get_user_option('rich_editing') ) :?>
    83 <script language="javascript" type="text/javascript" src="../wp-includes/js/tinymce/tiny_mce_gzip.php?index=0&theme=advanced&plugins=wordpress,autosave"></script>
     83<script language="javascript" type="text/javascript" src="../wp-includes/js/tinymce/tiny_mce_gzip.php?index=0&theme=advanced&plugins=wordpress,autosave,wphelp"></script>
    8484<script type="text/javascript">
    8585tinyMCE.init({
     
    8888    width : "100%",
    8989    theme : "advanced",
    90     theme_advanced_buttons1 : "bold,italic,strikethrough,separator,bullist,numlist,outdent,indent,separator,justifyleft,justifycenter,justifyright,separator,link,unlink,image,emotions,separator,wordpress,separator,undo,redo,code",
     90    theme_advanced_buttons1 : "bold,italic,strikethrough,separator,bullist,numlist,outdent,indent,separator,justifyleft,justifycenter,justifyright,separator,link,unlink,image,emotions,wordpress,separator,undo,redo,code,wphelp",
    9191    theme_advanced_buttons2 : "",
    9292    theme_advanced_buttons3 : "",
     
    106106    remove_linebreaks : true,
    107107    save_callback : "wp_save_callback",
    108     valid_elements : "-a[id|href|title|rel],-strong/b,-em/i,-strike,-del,-u,p[class|align],-ol,-ul,-li,br,img[class|src|alt|title|width|height|align],-sub,-sup,-blockquote,-table[border=0|cellspacing|cellpadding|width|height|class|align],tr[class|rowspan|width|height|align|valign],td[dir|class|colspan|rowspan|width|height|align|valign],-div[dir|class|align],-span[class|align],-pre[class],address,-h1[class|align],-h2[class|align],-h3[class|align],-h4[class|align],-h5[class|align],-h6[class|align],hr",
    109     plugins : "wordpress,autosave"
     108    valid_elements : "-a[id|href|title|rel],-strong/b,-em/i,-strike,-del,-u,p[class|align],-ol,-ul,-li,br,img[class|src|alt|title|width|height|align],-sub,-sup,-blockquote,-table[border=0|cellspacing|cellpadding|width|height|class|align],tr[class|rowspan|width|height|align|valign],td[dir|class|colspan|rowspan|width|height|align|valign],-div[dir|class|align],-span[class|align],-pre[class],-code[class],-address,-h1[class|align],-h2[class|align],-h3[class|align],-h4[class|align],-h5[class|align],-h6[class|align],hr",
     109    plugins : "wordpress,autosave,wphelp"
    110110    <?php do_action('mce_options'); ?>
    111111});
     
    211211    ids   = myPload( ajaxCat.response );
    212212    names = myPload( newcat.value );
    213 
    214213    for ( i = 0; i < ids.length; i++ ) {
    215214        id = ids[i];
  • trunk/wp-includes/js/tinymce/langs/en.js

    r2812 r3163  
    11// UK lang variables
    22
    3 tinyMCELang['lang_bold_desc'] = 'Bold';
    4 tinyMCELang['lang_italic_desc'] = 'Italic';
     3tinyMCELang['lang_bold_desc'] = 'Bold (Alt+b)';
     4tinyMCELang['lang_italic_desc'] = 'Italic (Alt+i)';
    55tinyMCELang['lang_underline_desc'] = 'Underline';
    6 tinyMCELang['lang_striketrough_desc'] = 'Striketrough';
    7 tinyMCELang['lang_justifyleft_desc'] = 'Align left';
    8 tinyMCELang['lang_justifycenter_desc'] = 'Align center';
    9 tinyMCELang['lang_justifyright_desc'] = 'Align right';
     6tinyMCELang['lang_striketrough_desc'] = 'Striketrough (Alt-d)';
     7tinyMCELang['lang_justifyleft_desc'] = 'Align left (Alt-f)';
     8tinyMCELang['lang_justifycenter_desc'] = 'Align center (Alt-c)';
     9tinyMCELang['lang_justifyright_desc'] = 'Align right (Alt-r)';
    1010tinyMCELang['lang_justifyfull_desc'] = 'Align full';
    11 tinyMCELang['lang_bullist_desc'] = 'Unordered list';
    12 tinyMCELang['lang_numlist_desc'] = 'Ordered list';
    13 tinyMCELang['lang_outdent_desc'] = 'Outdent';
    14 tinyMCELang['lang_indent_desc'] = 'Indent';
    15 tinyMCELang['lang_undo_desc'] = 'Undo';
    16 tinyMCELang['lang_redo_desc'] = 'Redo';
    17 tinyMCELang['lang_link_desc'] = 'Insert/edit link';
    18 tinyMCELang['lang_unlink_desc'] = 'Unlink';
    19 tinyMCELang['lang_image_desc'] = 'Insert/edit image';
     11tinyMCELang['lang_bullist_desc'] = 'Unordered list (Alt-l)';
     12tinyMCELang['lang_numlist_desc'] = 'Ordered list (Alt-o)';
     13tinyMCELang['lang_outdent_desc'] = 'Outdent (Alt-w)';
     14tinyMCELang['lang_indent_desc'] = 'Indent/Blockquote (Alt-q)';
     15tinyMCELang['lang_undo_desc'] = 'Undo (Alt-u)';
     16tinyMCELang['lang_redo_desc'] = 'Redo (Alt-y)';
     17tinyMCELang['lang_link_desc'] = 'Insert/edit link (Alt-a)';
     18tinyMCELang['lang_unlink_desc'] = 'Unlink (Alt-s)';
     19tinyMCELang['lang_image_desc'] = 'Insert/edit image (Alt-m)';
    2020tinyMCELang['lang_cleanup_desc'] = 'Cleanup messy code';
    2121tinyMCELang['lang_focus_alert'] = 'A editor instance must be focused before using this command.';
  • trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js

    r3136 r3163  
    1313            var titlePage = tinyMCE.getLang('lang_wordpress_page_button');
    1414            var titleHelp = tinyMCE.getLang('lang_wordpress_help_button');
    15             var buttons = '<a href="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpressmore\')" target="_self" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpressmore\');return false;"><img id="{$editor_id}_wordpress_more" src="{$pluginurl}/images/more.gif" title="'+titleMore+'" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>'
    16             + '<a href="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpresshelp\')" target="_self" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpresshelp\');return false;"><img id="{$editor_id}_wordpress_help" src="{$pluginurl}/images/help.gif" title="'+titleHelp+'" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
     15            var buttons = '<a href="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpressmore\')" target="_self" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpressmore\');return false;"><img id="{$editor_id}_wordpress_more" src="{$pluginurl}/images/more.gif" title="'+titleMore+'" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
    1716            // Add this to the buttons var to put the Page button into the toolbar.
    1817            // '<a href="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpresspage\')" target="_self" onclick="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpresspage\');return false;"><img id="{$editor_id}_wordpress_page" src="{$pluginurl}/images/page.gif" title="'+titlePage+'" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
    19             var hiddenControls = '<div class="zerosize">'
    20             + '<input type="button" accesskey="b" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Bold\',false);" />'
    21             + '<input type="button" accesskey="i" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Italic\',false);" />'
    22             + '<input type="button" accesskey="d" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Strikethrough\',false);" />'
    23             + '<input type="button" accesskey="l" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'InsertUnorderedList\',false);" />'
    24             + '<input type="button" accesskey="o" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'InsertOrderedList\',false);" />'
    25             + '<input type="button" accesskey="w" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Outdent\',false);" />'
    26             + '<input type="button" accesskey="q" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Indent\',false);" />'
    27             + '<input type="button" accesskey="f" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'JustifyLeft\',false);" />'
    28             + '<input type="button" accesskey="c" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'JustifyCenter\',false);" />'
    29             + '<input type="button" accesskey="r" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'JustifyRight\',false);" />'
    30             + '<input type="button" accesskey="a" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceLink\',true);" />'
    31             + '<input type="button" accesskey="s" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'unlink\',false);" />'
    32             + '<input type="button" accesskey="m" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceImage\',true);" />'
    33             + '<input type="button" accesskey="t" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpressmore\');" />'
    34             + '<input type="button" accesskey="u" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Undo\',false);" />'
    35             + '<input type="button" accesskey="y" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Redo\',false);" />'
    36             + '<input type="button" accesskey="e" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceCodeEditor\',false);" />'
    37             + '<input type="button" accesskey="h" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpresshelp\',false);" />'
    38             + '</div>';
    39             return buttons+hiddenControls;
    40     }
    41 
    42     return "";
     18            return buttons;
     19    }
     20
     21    return '';
    4322}
    4423
     
    145124                tinyMCE.selectedInstance.repaint();
    146125                return true;
    147             case "mcewordpresshelp":
    148                 var helpText = tinyMCE.getLang('lang_wordpress_help_text');
    149                 alert(helpText);
    150                 return true;
    151126    }
    152127
  • trunk/wp-includes/js/tinymce/plugins/wordpress/langs/en.js

    r3136 r3163  
    22
    33tinyMCE.addToLang('',{
    4 wordpress_more_button : 'Split post with More tag',
     4wordpress_more_button : 'Split post with More tag (Alt-t)',
    55wordpress_page_button : 'Split post with Page tag',
    6 wordpress_help_button : 'Help',
    76wordpress_more_alt : 'More...',
    8 wordpress_page_alt : '...page...',
    9 wordpress_help_text : 'This is the Rich Editor. It shows you approximately what your entry will look like as you type. Pasting formatted text from other editors is not recommended. One character, less-than (<), is reserved for HTML and must be represented in code: to represent "<" type "&lt;" without the quotes.\n\nThere are several hotkeys you can use instead of clicking on the toolbar. Windows and Linux use Alt+<letter>. Macintosh computers use Ctrl+<letter>.\nb: Bold\ni: Italic\ns: Strikethrough\nl: Unordered list\no: Ordered list\nq: Quote, indent list\nw: Unquote, outdent list\nf: Left align\nc: Center align\nr: Right align\na: Link\ns: Unlink\ni: Image\nt: "More" tag\nu: Undo\ny: Redo\ne: Edit HTML\nh: Help'
     7wordpress_page_alt : '...page...'
    108});
  • trunk/wp-includes/js/tinymce/themes/advanced/editor_template.js

    r3136 r3163  
    1111        </select>';case "|":case "separator":return '<img src="{$themeurl}/images/spacer.gif" width="1" height="15" class="mceSeparatorLine">';case "spacer":return '<img src="{$themeurl}/images/spacer.gif" width="1" height="15" border="0" class="mceSeparatorLine" style="vertical-align: middle" />';case "rowseparator":return '<br />';}return "";}function TinyMCE_advanced_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceForeColor":var template=new Array();var elm=tinyMCE.selectedInstance.getFocusElement();var inputColor=tinyMCE.getAttrib(elm,"color");if(inputColor=='')inputColor=elm.style.color;if(!inputColor)inputColor="#000000";template['file']='color_picker.htm';template['width']=220;template['height']=190;tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes",command:"forecolor",input_color:inputColor});return true;case "mceBackColor":var template=new Array();var elm=tinyMCE.selectedInstance.getFocusElement();var inputColor=elm.style.backgroundColor;if(!inputColor)inputColor="#000000";template['file']='color_picker.htm';template['width']=220;template['height']=190;template['width']+=tinyMCE.getLang('lang_theme_advanced_backcolor_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_backcolor_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes",command:"HiliteColor",input_color:inputColor});return true;case "mceColorPicker":if(user_interface){var template=new Array();var inputColor=value['document'].getElementById(value['element_id']).value;template['file']='color_picker.htm';template['width']=220;template['height']=190;template['close_previous']="no";template['width']+=tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_height',0);if(typeof(value['store_selection'])=="undefined")value['store_selection']=true;tinyMCE.lastColorPickerValue=value;tinyMCE.openWindow(template,{editor_id:editor_id,mce_store_selection:value['store_selection'],inline:"yes",command:"mceColorPicker",input_color:inputColor});}else{var savedVal=tinyMCE.lastColorPickerValue;var elm=savedVal['document'].getElementById(savedVal['element_id']);elm.value=value;eval('elm.onchange();');}return true;case "mceCodeEditor":var template=new Array();template['file']='source_editor.htm';template['width']=parseInt(tinyMCE.getParam("theme_advanced_source_editor_width",500));template['height']=parseInt(tinyMCE.getParam("theme_advanced_source_editor_height",400));tinyMCE.openWindow(template,{editor_id:editor_id,resizable:"yes",scrollbars:"no",inline:"yes"});return true;case "mceCharMap":var template=new Array();template['file']='charmap.htm';template['width']=550+(tinyMCE.isOpera?40:0);template['height']=250;template['width']+=tinyMCE.getLang('lang_theme_advanced_charmap_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_charmap_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;case "mceInsertAnchor":var template=new Array();template['file']='anchor.htm';template['width']=320;template['height']=90+(tinyMCE.isNS7?30:0);template['width']+=tinyMCE.getLang('lang_theme_advanced_anchor_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_anchor_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;case "mceNewDocument":if(confirm(tinyMCE.getLang('lang_newdocument')))tinyMCE.execInstanceCommand(editor_id,'mceSetContent',false,'');return true;}return false;}function TinyMCE_advanced_getEditorTemplate(settings,editorId){function removeFromArray(in_array,remove_array){var outArray=new Array();for(var i=0;i<in_array.length;i++){skip=false;for(var j=0;j<remove_array.length;j++){if(in_array[i]==remove_array[j]){skip=true;}}if(!skip){outArray[outArray.length]=in_array[i];}}return outArray;}function addToArray(in_array,add_array){for(var i=0;i<add_array.length;i++){in_array[in_array.length]=add_array[i];}return in_array;}var template=new Array();var deltaHeight=0;var resizing=tinyMCE.getParam("theme_advanced_resizing",false);var path=tinyMCE.getParam("theme_advanced_path",true);var statusbarHTML='<div id="{$editor_id}_path" class="mceStatusbarPathText" style="display: '+(path?"block":"none")+'">&nbsp;</div><div id="{$editor_id}_resize" class="mceStatusbarResize" style="display: '+(resizing?"block":"none")+'" onmousedown="TinyMCE_advanced_setResizing(event,\'{$editor_id}\',true);"></div><br style="clear: both" />';var layoutManager=tinyMCE.getParam("theme_advanced_layout_manager","SimpleLayout");var styleSelectHTML='<option value="">{$lang_theme_style_select}</option>';if(settings['theme_advanced_styles']){var stylesAr=settings['theme_advanced_styles'].split(';');for(var i=0;i<stylesAr.length;i++){var key,value;key=stylesAr[i].split('=')[0];value=stylesAr[i].split('=')[1];styleSelectHTML+='<option value="'+value+'">'+key+'</option>';}TinyMCE_advanced_autoImportCSSClasses=false;}switch(layoutManager){case "SimpleLayout":var toolbarHTML="";var toolbarLocation=tinyMCE.getParam("theme_advanced_toolbar_location","bottom");var toolbarAlign=tinyMCE.getParam("theme_advanced_toolbar_align","center");var pathLocation=tinyMCE.getParam("theme_advanced_path_location","none");var statusbarLocation=tinyMCE.getParam("theme_advanced_statusbar_location",pathLocation);var defVals={theme_advanced_buttons1:"bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,separator,sub,sup,separator,charmap"};/*toolbarHTML+='<a href="#" accesskey="q" title="'+tinyMCE.getLang("lang_toolbar_focus")+'"></a>';*/for(var i=1;i<100;i++){var def=defVals["theme_advanced_buttons"+i];var buttons=tinyMCE.getParam("theme_advanced_buttons"+i,def==null?'':def,true,',');if(buttons.length==0)break;buttons=removeFromArray(buttons,tinyMCE.getParam("theme_advanced_disable","",true,','));buttons=addToArray(buttons,tinyMCE.getParam("theme_advanced_buttons"+i+"_add","",true,','));buttons=addToArray(tinyMCE.getParam("theme_advanced_buttons"+i+"_add_before","",true,','),buttons);for(var b=0;b<buttons.length;b++)toolbarHTML+=tinyMCE.getControlHTML(buttons[b]);if(buttons.length>0){toolbarHTML+="<br />";deltaHeight-=23;}}toolbarHTML+='<a href="#" accesskey="z" onfocus="tinyMCE.getInstanceById(\''+editorId+'\').getWin().focus();"></a>';template['html']='<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width}px;height:{$height}px"><tbody>';if(toolbarLocation=="top"){template['html']+='<tr><td class="mceToolbarTop" align="'+toolbarAlign+'" height="1" nowrap="nowrap">'+toolbarHTML+'</td></tr>';}if(statusbarLocation=="top"){template['html']+='<tr><td class="mceStatusbarTop" height="1">'+statusbarHTML+'</td></tr>';deltaHeight-=23;}template['html']+='<tr><td align="center"><span id="{$editor_id}"></span></td></tr>';if(toolbarLocation=="bottom"){template['html']+='<tr><td class="mceToolbarBottom" align="'+toolbarAlign+'" height="1">'+toolbarHTML+'</td></tr>';}if(toolbarLocation=="external"){var bod=document.body;var elm=document.createElement("div");toolbarHTML=tinyMCE.replaceVars(toolbarHTML,tinyMCE.settings);toolbarHTML=tinyMCE.replaceVars(toolbarHTML,tinyMCELang);toolbarHTML=tinyMCE.replaceVar(toolbarHTML,'style_select_options',styleSelectHTML);toolbarHTML=tinyMCE.replaceVar(toolbarHTML,"editor_id",editorId);toolbarHTML=tinyMCE.applyTemplate(toolbarHTML);elm.className="mceToolbarExternal";elm.id=editorId+"_toolbar";elm.innerHTML='<table width="100%" border="0" align="center"><tr><td align="center">'+toolbarHTML+'</td></tr></table>';bod.appendChild(elm);deltaHeight=0;tinyMCE.getInstanceById(editorId).toolbarElement=elm;}else{tinyMCE.getInstanceById(editorId).toolbarElement=null;}if(statusbarLocation=="bottom"){template['html']+='<tr><td class="mceStatusbarBottom" height="1">'+statusbarHTML+'</td></tr>';deltaHeight-=23;}template['html']+='</tbody></table>';break;case "RowLayout":template['html']='<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width}px;height:{$height}px"><tbody>';var containers=tinyMCE.getParam("theme_advanced_containers","",true,",");var defaultContainerCSS=tinyMCE.getParam("theme_advanced_containers_default_class","container");var defaultContainerAlign=tinyMCE.getParam("theme_advanced_containers_default_align","center");for(var i=0;i<containers.length;i++){if(containers[i]=="mceEditor"){template['html']+='<tr><td align="center" class="mceEditor_border">\
    1212                                                <span id="{$editor_id}"></span>\
    13                                                 </td></tr>';}else if(containers[i]=="mceElementpath"||containers[i]=="mceStatusbar"){var pathClass="mceStatusbar";if(i==containers.length-1){pathClass="mceStatusbarBottom";}else if(i==0){pathClass="mceStatusbar";}else{deltaHeight-=2;}template['html']+='<tr><td class="'+pathClass+'" height="1">'+statusbarHTML+'</td></tr>';deltaHeight-=22;}else{var curContainer=tinyMCE.getParam("theme_advanced_container_"+containers[i],"",true,',');var curContainerHTML="";var curAlign=tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_align",defaultContainerAlign);var curCSS=tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_class",defaultContainerCSS);for(var j=0;j<curContainer.length;j++){curContainerHTML+=tinyMCE.getControlHTML(curContainer[j]);}if(curContainer.length>0){curContainerHTML+="<br />";deltaHeight-=23;}template['html']+='<tr><td class="'+curCSS+'" align="'+curAlign+'" height="1">'+curContainerHTML+'</td></tr>';}}template['html']+='</tbody></table>';break;case "BorderLayout":break;case "CustomLayout":var customLayout=tinyMCE.getParam("theme_advanced_custom_layout","");if(customLayout!=""&&eval("typeof("+customLayout+")")!="undefined"){template=eval(customLayout+"(template);");}break;default:alert('UNDEFINED LAYOUT MANAGER! PLEASE CHECK YOUR TINYMCE CONFIG!');break;}template['html']+='<div id="{$editor_id}_resize_box" class="mceResizeBox"></div>';template['html']=tinyMCE.replaceVar(template['html'],'style_select_options',styleSelectHTML);template['delta_width']=0;template['delta_height']=deltaHeight;return template;}function TinyMCE_advanced_setResizing(e,editor_id,state){e=typeof(e)=="undefined"?window.event:e;var resizer=TinyMCE_advanced_resizer;var editorContainer=document.getElementById(editor_id+'_parent');var editorArea=document.getElementById(editor_id+'_parent').firstChild;var resizeBox=document.getElementById(editor_id+'_resize_box');var inst=tinyMCE.getInstanceById(editor_id);if(state){var width=editorArea.clientWidth;var height=editorArea.clientHeight;resizeBox.style.width=width+"px";resizeBox.style.height=height+"px";resizer.iframeWidth=inst.iframeElement.clientWidth;resizer.iframeHeight=inst.iframeElement.clientHeight;editorArea.style.display="none";resizeBox.style.display="block";if(!resizer.eventHandlers){if(tinyMCE.isMSIE)tinyMCE.addEvent(document,"mousemove",TinyMCE_advanced_resizeEventHandler);else tinyMCE.addEvent(window,"mousemove",TinyMCE_advanced_resizeEventHandler);tinyMCE.addEvent(document,"mouseup",TinyMCE_advanced_resizeEventHandler);resizer.eventHandlers=true;}resizer.resizing=true;resizer.downX=e.screenX;resizer.downY=e.screenY;resizer.width=parseInt(resizeBox.style.width);resizer.height=parseInt(resizeBox.style.height);resizer.editorId=editor_id;resizer.resizeBox=resizeBox;resizer.horizontal=tinyMCE.getParam("theme_advanced_resize_horizontal",true);}else{resizer.resizing=false;resizeBox.style.display="none";editorArea.style.display=tinyMCE.isMSIE?"block":"table";tinyMCE.execCommand('mceResetDesignMode');}}function TinyMCE_advanced_initInstance(inst){if(tinyMCE.getParam("theme_advanced_resizing",false)){if(tinyMCE.getParam("theme_advanced_resizing_use_cookie",true)){var w=TinyMCE_advanced_getCookie("TinyMCE_"+inst.editorId+"_width");var h=TinyMCE_advanced_getCookie("TinyMCE_"+inst.editorId+"_height");TinyMCE_advanced_resizeTo(inst,w,h,tinyMCE.getParam("theme_advanced_resize_horizontal",true));}}}function TinyMCE_advanced_setCookie(name,value,expires,path,domain,secure){var curCookie=name+"="+escape(value)+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+escape(path):"")+((domain)?"; domain="+domain:"")+((secure)?"; secure":"");document.cookie=curCookie;}function TinyMCE_advanced_getCookie(name){var dc=document.cookie;var prefix=name+"=";var begin=dc.indexOf("; "+prefix);if(begin==-1){begin=dc.indexOf(prefix);if(begin!=0)return null;}else begin+=2;var end=document.cookie.indexOf(";",begin);if(end==-1)end=dc.length;return unescape(dc.substring(begin+prefix.length,end));}function TinyMCE_advanced_resizeTo(inst,w,h,set_w){var editorContainer=document.getElementById(inst.editorId+'_parent');var tableElm=editorContainer.firstChild;var iframe=inst.iframeElement;if(w==null||w=="null"){set_w=false;w=0;}if(h==null||h=="null")return;w=parseInt(w);h=parseInt(h);if(tinyMCE.isGecko){w+=2;h+=2;}var dx=w-tableElm.clientWidth;var dy=h-tableElm.clientHeight;if(set_w)tableElm.style.width=w+"px";tableElm.style.height=h+"px";iw=iframe.clientWidth+dx;ih=iframe.clientHeight+dy;if(tinyMCE.isGecko){iw-=2;ih-=2;}if(set_w)iframe.style.width=iw+"px";iframe.style.height=ih+"px";if(set_w){var tableBodyElm=tableElm.firstChild;var minIframeWidth=tableBodyElm.scrollWidth;if(inst.iframeElement.clientWidth<minIframeWidth){dx=minIframeWidth-inst.iframeElement.clientWidth;inst.iframeElement.style.width=(iw+dx)+"px";}}}function TinyMCE_advanced_resizeEventHandler(e){var resizer=TinyMCE_advanced_resizer;if(!resizer.resizing)return;e=typeof(e)=="undefined"?window.event:e;var dx=e.screenX-resizer.downX;var dy=e.screenY-resizer.downY;var resizeBox=resizer.resizeBox;var editorId=resizer.editorId;switch(e.type){case "mousemove":if(resizer.horizontal)resizeBox.style.width=(resizer.width+dx)+"px";resizeBox.style.height=(resizer.height+dy)+"px";break;case "mouseup":TinyMCE_advanced_setResizing(e,editorId,false);TinyMCE_advanced_resizeTo(tinyMCE.getInstanceById(editorId),resizer.width+dx,resizer.height+dy,resizer.horizontal);if(tinyMCE.getParam("theme_advanced_resizing_use_cookie",true)){var expires=new Date();expires.setTime(expires.getTime()+3600000*24*30);TinyMCE_advanced_setCookie("TinyMCE_"+editorId+"_width",""+(resizer.horizontal?resizer.width+dx:""),expires);TinyMCE_advanced_setCookie("TinyMCE_"+editorId+"_height",""+(resizer.height+dy),expires);}break;}}function TinyMCE_advanced_getInsertLinkTemplate(){var template=new Array();template['file']='link.htm';template['width']=330;template['height']=170;template['width']+=tinyMCE.getLang('lang_insert_link_delta_width',0);template['height']+=tinyMCE.getLang('lang_insert_link_delta_height',0);return template;};function TinyMCE_advanced_getInsertImageTemplate(){var template=new Array();template['file']='image.htm?src={$src}';template['width']=340;template['height']=245;template['width']+=tinyMCE.getLang('lang_insert_image_delta_width',0);template['height']+=tinyMCE.getLang('lang_insert_image_delta_height',0);return template;};function TinyMCE_advanced_handleNodeChange(editor_id,node,undo_index,undo_levels,visual_aid,any_selection,setup_content){function selectByValue(select_elm,value,first_index){first_index=typeof(first_index)=="undefined"?false:true;if(select_elm){for(var i=0;i<select_elm.options.length;i++){var ov=""+select_elm.options[i].value;if(first_index&&ov.toLowerCase().indexOf(value.toLowerCase())==0){select_elm.selectedIndex=i;return true;}if(ov==value){select_elm.selectedIndex=i;return true;}}}return false;};function getAttrib(elm,name){return elm.getAttribute(name)?elm.getAttribute(name):"";};if(node==null){return;}var pathElm=document.getElementById(editor_id+"_path");var inst=tinyMCE.getInstanceById(editor_id);var doc=inst.getDoc();if(pathElm){var parentNode=node;var path=new Array();while(parentNode!=null){if(parentNode.nodeName.toUpperCase()=="BODY"){break;}if(parentNode.nodeType==1){path[path.length]=parentNode;}parentNode=parentNode.parentNode;}var html="";for(var i=path.length-1;i>=0;i--){var nodeName=path[i].nodeName.toLowerCase();var nodeData="";if(nodeName=="b"){nodeName="strong";}if(nodeName=="i"){nodeName="em";}if(nodeName=="span"){var cn=tinyMCE.getAttrib(path[i],"class");if(cn!=""&&cn.indexOf('mceItem')==-1)nodeData+="class: "+cn+" ";var st=tinyMCE.getAttrib(path[i],"style");if(st!=""){st=tinyMCE.serializeStyle(tinyMCE.parseStyle(st));nodeData+="style: "+st+" ";}}if(nodeName=="font"){if(tinyMCE.getParam("convert_fonts_to_spans"))nodeName="span";var face=tinyMCE.getAttrib(path[i],"face");if(face!="")nodeData+="font: "+face+" ";var size=tinyMCE.getAttrib(path[i],"size");if(size!="")nodeData+="size: "+size+" ";var color=tinyMCE.getAttrib(path[i],"color");if(color!="")nodeData+="color: "+color+" ";}if(getAttrib(path[i],'id')!=""){nodeData+="id: "+path[i].getAttribute('id')+" ";}var className=tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i],"class"),false);if(className!=""&&className.indexOf('mceItem')==-1)nodeData+="class: "+className+" ";if(getAttrib(path[i],'src')!=""){nodeData+="src: "+path[i].getAttribute('src')+" ";}if(getAttrib(path[i],'href')!=""){nodeData+="href: "+path[i].getAttribute('href')+" ";}if(nodeName=="img"&&tinyMCE.getAttrib(path[i],"class").indexOf('mceItemFlash')!=-1){nodeName="flash";nodeData="src: "+path[i].getAttribute('title');}if(nodeName=="a"&&(anchor=tinyMCE.getAttrib(path[i],"name"))!=""){nodeName="a";nodeName+="#"+anchor;nodeData="";}if(getAttrib(path[i],'name').indexOf("mce_")!=0){var className=tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i],"class"),false);if(className!=""&&className.indexOf('mceItem')==-1){nodeName+="."+className;}}var cmd='tinyMCE.execInstanceCommand(\''+editor_id+'\',\'mceSelectNodeDepth\',false,\''+i+'\');';html+='<a title="'+nodeData+'" href="javascript:'+cmd+'" onclick="'+cmd+'return false;" onmousedown="return false;" target="_self" class="mcePathItem">'+nodeName+'</a>';if(i>0){html+=" &raquo; ";}}pathElm.innerHTML='<a href="#" accesskey="x"></a>'+tinyMCE.getLang('lang_theme_path')+": "+html+'&nbsp;';}tinyMCE.switchClassSticky(editor_id+'_justifyleft','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_justifyright','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_justifycenter','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_justifyfull','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_bold','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_italic','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_underline','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_strikethrough','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_bullist','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_numlist','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_sub','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_sup','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_anchor','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_link','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_unlink','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_outdent','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_image','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_hr','mceButtonNormal');if(node.nodeName=="A"&&tinyMCE.getAttrib(node,"class").indexOf('mceItemAnchor')!=-1)tinyMCE.switchClassSticky(editor_id+'_anchor','mceButtonSelected');var anchorLink=tinyMCE.getParentElement(node,"a","href");if(anchorLink||any_selection){tinyMCE.switchClassSticky(editor_id+'_link',anchorLink?'mceButtonSelected':'mceButtonNormal',false);tinyMCE.switchClassSticky(editor_id+'_unlink',anchorLink?'mceButtonSelected':'mceButtonNormal',false);}tinyMCE.switchClassSticky(editor_id+'_visualaid',visual_aid?'mceButtonSelected':'mceButtonNormal',false);if(undo_levels!=-1){tinyMCE.switchClassSticky(editor_id+'_undo','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_redo','mceButtonDisabled',true);}if(tinyMCE.getParentElement(node,"li,blockquote")){tinyMCE.switchClassSticky(editor_id+'_outdent','mceButtonNormal',false);}if(undo_index!=-1&&(undo_index<undo_levels-1&&undo_levels>0)){tinyMCE.switchClassSticky(editor_id+'_redo','mceButtonNormal',false);}if(undo_index!=-1&&(undo_index>0&&undo_levels>0)){tinyMCE.switchClassSticky(editor_id+'_undo','mceButtonNormal',false);}var selectElm=document.getElementById(editor_id+"_styleSelect");if(selectElm){TinyMCE_advanced_setupCSSClasses(editor_id);classNode=node;breakOut=false;var index=0;do{if(classNode&&classNode.className){for(var i=0;i<selectElm.options.length;i++){if(selectElm.options[i].value==classNode.className){index=i;breakOut=true;break;}}}}while(!breakOut&&classNode!=null&&(classNode=classNode.parentNode)!=null);selectElm.selectedIndex=index;}var selectElm=document.getElementById(editor_id+"_formatSelect");if(selectElm){var elm=tinyMCE.getParentElement(node,"p,div,h1,h2,h3,h4,h5,h6,pre,address");if(elm){selectByValue(selectElm,"<"+elm.nodeName.toLowerCase()+">");}else{selectByValue(selectElm,"");}}var selectElm=document.getElementById(editor_id+"_fontNameSelect");if(selectElm){if(!tinyMCE.isSafari&&!(tinyMCE.isMSIE&&!tinyMCE.isOpera)){var face=doc.queryCommandValue('FontName');face=face==null||face==""?"":face;selectByValue(selectElm,face,face!="");}else{var elm=tinyMCE.getParentElement(node,"font","face");if(elm){var family=tinyMCE.getAttrib(elm,"face");if(family=='')family=''+elm.style.fontFamily;if(!selectByValue(selectElm,family,family!=""))selectByValue(selectElm,"");}else selectByValue(selectElm,"");}}var selectElm=document.getElementById(editor_id+"_fontSizeSelect");if(selectElm){if(!tinyMCE.isSafari&&!tinyMCE.isOpera){var size=doc.queryCommandValue('FontSize');selectByValue(selectElm,size==null||size==""?"0":size);}else{var elm=tinyMCE.getParentElement(node,"font","size");if(elm){var size=tinyMCE.getAttrib(elm,"size");if(size==''){var sizes=new Array('','8px','10px','12px','14px','18px','24px','36px');size=''+elm.style.fontSize;for(var i=0;i<sizes.length;i++){if((''+sizes[i])==size){size=i;break;}}}if(!selectByValue(selectElm,size))selectByValue(selectElm,"");}else selectByValue(selectElm,"0");}}alignNode=node;breakOut=false;do{if(!alignNode.getAttribute||!alignNode.getAttribute('align')){continue;}switch(alignNode.getAttribute('align').toLowerCase()){case "left":tinyMCE.switchClassSticky(editor_id+'_justifyleft','mceButtonSelected');breakOut=true;break;case "right":tinyMCE.switchClassSticky(editor_id+'_justifyright','mceButtonSelected');breakOut=true;break;case "middle":case "center":tinyMCE.switchClassSticky(editor_id+'_justifycenter','mceButtonSelected');breakOut=true;break;case "justify":tinyMCE.switchClassSticky(editor_id+'_justifyfull','mceButtonSelected');breakOut=true;break;}}while(!breakOut&&(alignNode=alignNode.parentNode)!=null);var div=tinyMCE.getParentElement(node,"div");if(div&&div.style.textAlign=="center")tinyMCE.switchClassSticky(editor_id+'_justifycenter','mceButtonSelected');if(!setup_content){var ar=new Array("Bold","_bold","Italic","_italic","Strikethrough","_strikethrough","superscript","_sup","subscript","_sub");for(var i=0;i<ar.length;i+=2){if(doc.queryCommandState(ar[i]))tinyMCE.switchClassSticky(editor_id+ar[i+1],'mceButtonSelected');}if(doc.queryCommandState("Underline")&&(node.parentNode==null||node.parentNode.nodeName!="A")){tinyMCE.switchClassSticky(editor_id+'_underline','mceButtonSelected');}}do{switch(node.nodeName){case "UL":tinyMCE.switchClassSticky(editor_id+'_bullist','mceButtonSelected');break;case "OL":tinyMCE.switchClassSticky(editor_id+'_numlist','mceButtonSelected');break;case "HR":tinyMCE.switchClassSticky(editor_id+'_hr','mceButtonSelected');break;case "IMG":if(getAttrib(node,'name').indexOf('mce_')!=0){tinyMCE.switchClassSticky(editor_id+'_image','mceButtonSelected');}break;}}while((node=node.parentNode)!=null);};function TinyMCE_advanced_setupCSSClasses(editor_id){if(!TinyMCE_advanced_autoImportCSSClasses){return;}var selectElm=document.getElementById(editor_id+'_styleSelect');if(selectElm&&selectElm.getAttribute('cssImported')!='true'){var csses=tinyMCE.getCSSClasses(editor_id);if(csses&&selectElm){for(var i=0;i<csses.length;i++){selectElm.options[selectElm.length]=new Option(csses[i],csses[i]);}}if(csses!=null&&csses.length>0){selectElm.setAttribute('cssImported','true');}}};
     13                                                </td></tr>';}else if(containers[i]=="mceElementpath"||containers[i]=="mceStatusbar"){var pathClass="mceStatusbar";if(i==containers.length-1){pathClass="mceStatusbarBottom";}else if(i==0){pathClass="mceStatusbar";}else{deltaHeight-=2;}template['html']+='<tr><td class="'+pathClass+'" height="1">'+statusbarHTML+'</td></tr>';deltaHeight-=22;}else{var curContainer=tinyMCE.getParam("theme_advanced_container_"+containers[i],"",true,',');var curContainerHTML="";var curAlign=tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_align",defaultContainerAlign);var curCSS=tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_class",defaultContainerCSS);for(var j=0;j<curContainer.length;j++){curContainerHTML+=tinyMCE.getControlHTML(curContainer[j]);}if(curContainer.length>0){curContainerHTML+="<br />";deltaHeight-=23;}template['html']+='<tr><td class="'+curCSS+'" align="'+curAlign+'" height="1">'+curContainerHTML+'</td></tr>';}}template['html']+='</tbody></table>';break;case "BorderLayout":break;case "CustomLayout":var customLayout=tinyMCE.getParam("theme_advanced_custom_layout","");if(customLayout!=""&&eval("typeof("+customLayout+")")!="undefined"){template=eval(customLayout+"(template);");}break;default:alert('UNDEFINED LAYOUT MANAGER! PLEASE CHECK YOUR TINYMCE CONFIG!');break;}template['html']+='<div id="{$editor_id}_resize_box" class="mceResizeBox"></div>';template['html']=tinyMCE.replaceVar(template['html'],'style_select_options',styleSelectHTML);template['delta_width']=0;template['delta_height']=deltaHeight;return template;}function TinyMCE_advanced_setResizing(e,editor_id,state){e=typeof(e)=="undefined"?window.event:e;var resizer=TinyMCE_advanced_resizer;var editorContainer=document.getElementById(editor_id+'_parent');var editorArea=document.getElementById(editor_id+'_parent').firstChild;var resizeBox=document.getElementById(editor_id+'_resize_box');var inst=tinyMCE.getInstanceById(editor_id);if(state){var width=editorArea.clientWidth;var height=editorArea.clientHeight;resizeBox.style.width=width+"px";resizeBox.style.height=height+"px";resizer.iframeWidth=inst.iframeElement.clientWidth;resizer.iframeHeight=inst.iframeElement.clientHeight;editorArea.style.display="none";resizeBox.style.display="block";if(!resizer.eventHandlers){if(tinyMCE.isMSIE)tinyMCE.addEvent(document,"mousemove",TinyMCE_advanced_resizeEventHandler);else tinyMCE.addEvent(window,"mousemove",TinyMCE_advanced_resizeEventHandler);tinyMCE.addEvent(document,"mouseup",TinyMCE_advanced_resizeEventHandler);resizer.eventHandlers=true;}resizer.resizing=true;resizer.downX=e.screenX;resizer.downY=e.screenY;resizer.width=parseInt(resizeBox.style.width);resizer.height=parseInt(resizeBox.style.height);resizer.editorId=editor_id;resizer.resizeBox=resizeBox;resizer.horizontal=tinyMCE.getParam("theme_advanced_resize_horizontal",true);}else{resizer.resizing=false;resizeBox.style.display="none";editorArea.style.display=tinyMCE.isMSIE?"block":"table";tinyMCE.execCommand('mceResetDesignMode');}}function TinyMCE_advanced_initInstance(inst){if(tinyMCE.getParam("theme_advanced_resizing",false)){if(tinyMCE.getParam("theme_advanced_resizing_use_cookie",true)){var w=TinyMCE_advanced_getCookie("TinyMCE_"+inst.editorId+"_width");var h=TinyMCE_advanced_getCookie("TinyMCE_"+inst.editorId+"_height");TinyMCE_advanced_resizeTo(inst,w,h,tinyMCE.getParam("theme_advanced_resize_horizontal",true));}}}function TinyMCE_advanced_setCookie(name,value,expires,path,domain,secure){var curCookie=name+"="+escape(value)+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+escape(path):"")+((domain)?"; domain="+domain:"")+((secure)?"; secure":"");document.cookie=curCookie;}function TinyMCE_advanced_getCookie(name){var dc=document.cookie;var prefix=name+"=";var begin=dc.indexOf("; "+prefix);if(begin==-1){begin=dc.indexOf(prefix);if(begin!=0)return null;}else begin+=2;var end=document.cookie.indexOf(";",begin);if(end==-1)end=dc.length;return unescape(dc.substring(begin+prefix.length,end));}function TinyMCE_advanced_resizeTo(inst,w,h,set_w){var editorContainer=document.getElementById(inst.editorId+'_parent');var tableElm=editorContainer.firstChild;var iframe=inst.iframeElement;if(w==null||w=="null"){set_w=false;w=0;}if(h==null||h=="null")return;w=parseInt(w);h=parseInt(h);if(tinyMCE.isGecko){w+=2;h+=2;}var dx=w-tableElm.clientWidth;var dy=h-tableElm.clientHeight;if(set_w)tableElm.style.width=w+"px";tableElm.style.height=h+"px";iw=iframe.clientWidth+dx;ih=iframe.clientHeight+dy;if(tinyMCE.isGecko){iw-=2;ih-=2;}if(set_w)iframe.style.width=iw+"px";iframe.style.height=ih+"px";if(set_w){var tableBodyElm=tableElm.firstChild;var minIframeWidth=tableBodyElm.scrollWidth;if(inst.iframeElement.clientWidth<minIframeWidth){dx=minIframeWidth-inst.iframeElement.clientWidth;inst.iframeElement.style.width=(iw+dx)+"px";}}}function TinyMCE_advanced_resizeEventHandler(e){var resizer=TinyMCE_advanced_resizer;if(!resizer.resizing)return;e=typeof(e)=="undefined"?window.event:e;var dx=e.screenX-resizer.downX;var dy=e.screenY-resizer.downY;var resizeBox=resizer.resizeBox;var editorId=resizer.editorId;switch(e.type){case "mousemove":if(resizer.horizontal)resizeBox.style.width=(resizer.width+dx)+"px";resizeBox.style.height=(resizer.height+dy)+"px";break;case "mouseup":TinyMCE_advanced_setResizing(e,editorId,false);TinyMCE_advanced_resizeTo(tinyMCE.getInstanceById(editorId),resizer.width+dx,resizer.height+dy,resizer.horizontal);if(tinyMCE.getParam("theme_advanced_resizing_use_cookie",true)){var expires=new Date();expires.setTime(expires.getTime()+3600000*24*30);TinyMCE_advanced_setCookie("TinyMCE_"+editorId+"_width",""+(resizer.horizontal?resizer.width+dx:""),expires);TinyMCE_advanced_setCookie("TinyMCE_"+editorId+"_height",""+(resizer.height+dy),expires);}break;}}function TinyMCE_advanced_getInsertLinkTemplate(){var template=new Array();template['file']='link.htm';template['width']=330;template['height']=160;template['width']+=tinyMCE.getLang('lang_insert_link_delta_width',0);template['height']+=tinyMCE.getLang('lang_insert_link_delta_height',0);return template;};function TinyMCE_advanced_getInsertImageTemplate(){var template=new Array();template['file']='image.htm?src={$src}';template['width']=340;template['height']=165;template['width']+=tinyMCE.getLang('lang_insert_image_delta_width',0);template['height']+=tinyMCE.getLang('lang_insert_image_delta_height',0);return template;};function TinyMCE_advanced_handleNodeChange(editor_id,node,undo_index,undo_levels,visual_aid,any_selection,setup_content){function selectByValue(select_elm,value,first_index){first_index=typeof(first_index)=="undefined"?false:true;if(select_elm){for(var i=0;i<select_elm.options.length;i++){var ov=""+select_elm.options[i].value;if(first_index&&ov.toLowerCase().indexOf(value.toLowerCase())==0){select_elm.selectedIndex=i;return true;}if(ov==value){select_elm.selectedIndex=i;return true;}}}return false;};function getAttrib(elm,name){return elm.getAttribute(name)?elm.getAttribute(name):"";};if(node==null){return;}var pathElm=document.getElementById(editor_id+"_path");var inst=tinyMCE.getInstanceById(editor_id);var doc=inst.getDoc();if(pathElm){var parentNode=node;var path=new Array();while(parentNode!=null){if(parentNode.nodeName.toUpperCase()=="BODY"){break;}if(parentNode.nodeType==1){path[path.length]=parentNode;}parentNode=parentNode.parentNode;}var html="";for(var i=path.length-1;i>=0;i--){var nodeName=path[i].nodeName.toLowerCase();var nodeData="";if(nodeName=="b"){nodeName="strong";}if(nodeName=="i"){nodeName="em";}if(nodeName=="span"){var cn=tinyMCE.getAttrib(path[i],"class");if(cn!=""&&cn.indexOf('mceItem')==-1)nodeData+="class: "+cn+" ";var st=tinyMCE.getAttrib(path[i],"style");if(st!=""){st=tinyMCE.serializeStyle(tinyMCE.parseStyle(st));nodeData+="style: "+st+" ";}}if(nodeName=="font"){if(tinyMCE.getParam("convert_fonts_to_spans"))nodeName="span";var face=tinyMCE.getAttrib(path[i],"face");if(face!="")nodeData+="font: "+face+" ";var size=tinyMCE.getAttrib(path[i],"size");if(size!="")nodeData+="size: "+size+" ";var color=tinyMCE.getAttrib(path[i],"color");if(color!="")nodeData+="color: "+color+" ";}if(getAttrib(path[i],'id')!=""){nodeData+="id: "+path[i].getAttribute('id')+" ";}var className=tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i],"class"),false);if(className!=""&&className.indexOf('mceItem')==-1)nodeData+="class: "+className+" ";if(getAttrib(path[i],'src')!=""){nodeData+="src: "+path[i].getAttribute('src')+" ";}if(getAttrib(path[i],'href')!=""){nodeData+="href: "+path[i].getAttribute('href')+" ";}if(nodeName=="img"&&tinyMCE.getAttrib(path[i],"class").indexOf('mceItemFlash')!=-1){nodeName="flash";nodeData="src: "+path[i].getAttribute('title');}if(nodeName=="a"&&(anchor=tinyMCE.getAttrib(path[i],"name"))!=""){nodeName="a";nodeName+="#"+anchor;nodeData="";}if(getAttrib(path[i],'name').indexOf("mce_")!=0){var className=tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i],"class"),false);if(className!=""&&className.indexOf('mceItem')==-1){nodeName+="."+className;}}var cmd='tinyMCE.execInstanceCommand(\''+editor_id+'\',\'mceSelectNodeDepth\',false,\''+i+'\');';html+='<a title="'+nodeData+'" href="javascript:'+cmd+'" onclick="'+cmd+'return false;" onmousedown="return false;" target="_self" class="mcePathItem">'+nodeName+'</a>';if(i>0){html+=" &raquo; ";}}pathElm.innerHTML='<a href="#" accesskey="x"></a>'+tinyMCE.getLang('lang_theme_path')+": "+html+'&nbsp;';}tinyMCE.switchClassSticky(editor_id+'_justifyleft','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_justifyright','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_justifycenter','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_justifyfull','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_bold','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_italic','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_underline','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_strikethrough','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_bullist','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_numlist','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_sub','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_sup','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_anchor','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_link','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_unlink','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_outdent','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_image','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_hr','mceButtonNormal');if(node.nodeName=="A"&&tinyMCE.getAttrib(node,"class").indexOf('mceItemAnchor')!=-1)tinyMCE.switchClassSticky(editor_id+'_anchor','mceButtonSelected');var anchorLink=tinyMCE.getParentElement(node,"a","href");if(anchorLink||any_selection){tinyMCE.switchClassSticky(editor_id+'_link',anchorLink?'mceButtonSelected':'mceButtonNormal',false);tinyMCE.switchClassSticky(editor_id+'_unlink',anchorLink?'mceButtonSelected':'mceButtonNormal',false);}tinyMCE.switchClassSticky(editor_id+'_visualaid',visual_aid?'mceButtonSelected':'mceButtonNormal',false);if(undo_levels!=-1){tinyMCE.switchClassSticky(editor_id+'_undo','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_redo','mceButtonDisabled',true);}if(tinyMCE.getParentElement(node,"li,blockquote")){tinyMCE.switchClassSticky(editor_id+'_outdent','mceButtonNormal',false);}if(undo_index!=-1&&(undo_index<undo_levels-1&&undo_levels>0)){tinyMCE.switchClassSticky(editor_id+'_redo','mceButtonNormal',false);}if(undo_index!=-1&&(undo_index>0&&undo_levels>0)){tinyMCE.switchClassSticky(editor_id+'_undo','mceButtonNormal',false);}var selectElm=document.getElementById(editor_id+"_styleSelect");if(selectElm){TinyMCE_advanced_setupCSSClasses(editor_id);classNode=node;breakOut=false;var index=0;do{if(classNode&&classNode.className){for(var i=0;i<selectElm.options.length;i++){if(selectElm.options[i].value==classNode.className){index=i;breakOut=true;break;}}}}while(!breakOut&&classNode!=null&&(classNode=classNode.parentNode)!=null);selectElm.selectedIndex=index;}var selectElm=document.getElementById(editor_id+"_formatSelect");if(selectElm){var elm=tinyMCE.getParentElement(node,"p,div,h1,h2,h3,h4,h5,h6,pre,address");if(elm){selectByValue(selectElm,"<"+elm.nodeName.toLowerCase()+">");}else{selectByValue(selectElm,"");}}var selectElm=document.getElementById(editor_id+"_fontNameSelect");if(selectElm){if(!tinyMCE.isSafari&&!(tinyMCE.isMSIE&&!tinyMCE.isOpera)){var face=doc.queryCommandValue('FontName');face=face==null||face==""?"":face;selectByValue(selectElm,face,face!="");}else{var elm=tinyMCE.getParentElement(node,"font","face");if(elm){var family=tinyMCE.getAttrib(elm,"face");if(family=='')family=''+elm.style.fontFamily;if(!selectByValue(selectElm,family,family!=""))selectByValue(selectElm,"");}else selectByValue(selectElm,"");}}var selectElm=document.getElementById(editor_id+"_fontSizeSelect");if(selectElm){if(!tinyMCE.isSafari&&!tinyMCE.isOpera){var size=doc.queryCommandValue('FontSize');selectByValue(selectElm,size==null||size==""?"0":size);}else{var elm=tinyMCE.getParentElement(node,"font","size");if(elm){var size=tinyMCE.getAttrib(elm,"size");if(size==''){var sizes=new Array('','8px','10px','12px','14px','18px','24px','36px');size=''+elm.style.fontSize;for(var i=0;i<sizes.length;i++){if((''+sizes[i])==size){size=i;break;}}}if(!selectByValue(selectElm,size))selectByValue(selectElm,"");}else selectByValue(selectElm,"0");}}alignNode=node;breakOut=false;do{if(!alignNode.getAttribute||!alignNode.getAttribute('align')){continue;}switch(alignNode.getAttribute('align').toLowerCase()){case "left":tinyMCE.switchClassSticky(editor_id+'_justifyleft','mceButtonSelected');breakOut=true;break;case "right":tinyMCE.switchClassSticky(editor_id+'_justifyright','mceButtonSelected');breakOut=true;break;case "middle":case "center":tinyMCE.switchClassSticky(editor_id+'_justifycenter','mceButtonSelected');breakOut=true;break;case "justify":tinyMCE.switchClassSticky(editor_id+'_justifyfull','mceButtonSelected');breakOut=true;break;}}while(!breakOut&&(alignNode=alignNode.parentNode)!=null);var div=tinyMCE.getParentElement(node,"div");if(div&&div.style.textAlign=="center")tinyMCE.switchClassSticky(editor_id+'_justifycenter','mceButtonSelected');if(!setup_content){var ar=new Array("Bold","_bold","Italic","_italic","Strikethrough","_strikethrough","superscript","_sup","subscript","_sub");for(var i=0;i<ar.length;i+=2){if(doc.queryCommandState(ar[i]))tinyMCE.switchClassSticky(editor_id+ar[i+1],'mceButtonSelected');}if(doc.queryCommandState("Underline")&&(node.parentNode==null||node.parentNode.nodeName!="A")){tinyMCE.switchClassSticky(editor_id+'_underline','mceButtonSelected');}}do{switch(node.nodeName){case "UL":tinyMCE.switchClassSticky(editor_id+'_bullist','mceButtonSelected');break;case "OL":tinyMCE.switchClassSticky(editor_id+'_numlist','mceButtonSelected');break;case "HR":tinyMCE.switchClassSticky(editor_id+'_hr','mceButtonSelected');break;case "IMG":if(getAttrib(node,'name').indexOf('mce_')!=0){tinyMCE.switchClassSticky(editor_id+'_image','mceButtonSelected');}break;}}while((node=node.parentNode)!=null);};function TinyMCE_advanced_setupCSSClasses(editor_id){if(!TinyMCE_advanced_autoImportCSSClasses){return;}var selectElm=document.getElementById(editor_id+'_styleSelect');if(selectElm&&selectElm.getAttribute('cssImported')!='true'){var csses=tinyMCE.getCSSClasses(editor_id);if(csses&&selectElm){for(var i=0;i<csses.length;i++){selectElm.options[selectElm.length]=new Option(csses[i],csses[i]);}}if(csses!=null&&csses.length>0){selectElm.setAttribute('cssImported','true');}}};
  • trunk/wp-includes/js/tinymce/themes/advanced/editor_template_src.js

    r3136 r3163  
    1 /* Import theme specific language pack */
    2 tinyMCE.importThemeLanguagePack('advanced');
    3 
    4 // Variable declarations
    5 var TinyMCE_advanced_autoImportCSSClasses = true;
    6 var TinyMCE_advanced_resizer = new Object();
    7 var TinyMCE_advanced_buttons = [
    8     // Control id, button img, button title, command, user_interface, value
    9     ['bold', '{$lang_bold_img}', '{$lang_bold_desc}', 'Bold'],
    10     ['italic', '{$lang_italic_img}', '{$lang_italic_desc}', 'Italic'],
    11     ['underline', '{$lang_underline_img}', '{$lang_underline_desc}', 'Underline'],
    12     ['strikethrough', 'strikethrough.gif', '{$lang_striketrough_desc}', 'Strikethrough'],
    13     ['justifyleft', 'left.gif', '{$lang_justifyleft_desc}', 'JustifyLeft'],
    14     ['justifycenter', 'center.gif', '{$lang_justifycenter_desc}', 'JustifyCenter'],
    15     ['justifyright', 'right.gif', '{$lang_justifyright_desc}', 'JustifyRight'],
    16     ['justifyfull', 'full.gif', '{$lang_justifyfull_desc}', 'JustifyFull'],
    17     ['bullist', 'bullist.gif', '{$lang_bullist_desc}', 'InsertUnorderedList'],
    18     ['numlist', 'numlist.gif', '{$lang_numlist_desc}', 'InsertOrderedList'],
    19     ['outdent', 'outdent.gif', '{$lang_outdent_desc}', 'Outdent'],
    20     ['indent', 'indent.gif', '{$lang_indent_desc}', 'Indent'],
    21     ['cut', 'cut.gif', '{$lang_cut_desc}', 'Cut'],
    22     ['copy', 'copy.gif', '{$lang_copy_desc}', 'Copy'],
    23     ['paste', 'paste.gif', '{$lang_paste_desc}', 'Paste'],
    24     ['undo', 'undo.gif', '{$lang_undo_desc}', 'Undo'],
    25     ['redo', 'redo.gif', '{$lang_redo_desc}', 'Redo'],
    26     ['link', 'link.gif', '{$lang_link_desc}', 'mceLink', true],
    27     ['unlink', 'unlink.gif', '{$lang_unlink_desc}', 'unlink'],
    28     ['image', 'image.gif', '{$lang_image_desc}', 'mceImage', true],
    29     ['cleanup', 'cleanup.gif', '{$lang_cleanup_desc}', 'mceCleanup'],
    30     ['help', 'help.gif', '{$lang_help_desc}', 'mceHelp'],
    31     ['code', 'code.gif', '{$lang_theme_code_desc}', 'mceCodeEditor'],
    32     ['hr', 'hr.gif', '{$lang_theme_hr_desc}', 'inserthorizontalrule'],
    33     ['removeformat', 'removeformat.gif', '{$lang_theme_removeformat_desc}', 'removeformat'],
    34     ['sub', 'sub.gif', '{$lang_theme_sub_desc}', 'subscript'],
    35     ['sup', 'sup.gif', '{$lang_theme_sup_desc}', 'superscript'],
    36     ['forecolor', 'forecolor.gif', '{$lang_theme_forecolor_desc}', 'mceForeColor', true],
    37     ['backcolor', 'backcolor.gif', '{$lang_theme_backcolor_desc}', 'mceBackColor', true],
    38     ['charmap', 'charmap.gif', '{$lang_theme_charmap_desc}', 'mceCharMap'],
    39     ['visualaid', 'visualaid.gif', '{$lang_theme_visualaid_desc}', 'mceToggleVisualAid'],
    40     ['anchor', 'anchor.gif', '{$lang_theme_anchor_desc}', 'mceInsertAnchor'],
    41     ['newdocument', 'newdocument.gif', '{$lang_newdocument_desc}', 'mceNewDocument']
    42 ];
    43 
    44 /**
    45  * Returns HTML code for the specificed control.
    46  */
    47 function TinyMCE_advanced_getControlHTML(button_name)
    48 {
    49     var buttonTileMap = new Array('anchor.gif','backcolor.gif','bullist.gif','center.gif',
    50                                             'charmap.gif','cleanup.gif','code.gif','copy.gif','custom_1.gif',
    51                                             'cut.gif','forecolor.gif','full.gif','help.gif','hr.gif',
    52                                             'image.gif','indent.gif','left.gif','link.gif','numlist.gif',
    53                                             'outdent.gif','paste.gif','redo.gif','removeformat.gif',
    54                                             'right.gif','strikethrough.gif','sub.gif','sup.gif','undo.gif',
    55                                             'unlink.gif','visualaid.gif');
    56 
    57     // Lookup button in button list
    58     for (var i=0; i<TinyMCE_advanced_buttons.length; i++)
    59     {
    60         var but = TinyMCE_advanced_buttons[i];
    61 
    62         if (but[0] == button_name)
    63         {
    64             // Check for it in tilemap
    65             if (tinyMCE.settings['button_tile_map'])
    66             {
    67                 for (var x=0; !tinyMCE.isMSIE && x<buttonTileMap.length; x++)
    68                 {
    69                     if (buttonTileMap[x] == but[1])
    70                     {
    71                         var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'' + but[3] + '\',' + (but.length > 4 ? but[4] : false) + (but.length > 5 ? ',\'' + but[5] + '\'' : '') + ')';
    72                         return '<a href="javascript:' + cmd + '" onclick="' + cmd + ';return false;" onmousedown="return false;" target="_self"><img id="{$editor_id}_' + but[0] +'" src="{$themeurl}/images/spacer.gif" style="background-image:url({$themeurl}/images/buttons.gif); background-position: ' + (0-(x*20)) + 'px 0px" title="' + but[2] + '" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
    73                     }
    74                 }
    75             }
    76 
    77             // Old style
    78             var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'' + but[3] + '\',' + (but.length > 4 ? but[4] : false) + (but.length > 5 ? ',\'' + but[5] + '\'' : '') + ')';
    79             return '<a href="javascript:' + cmd + '" onclick="' + cmd + ';return false;" onmousedown="return false;" target="_self"><img id="{$editor_id}_' + but[0] + '" src="{$themeurl}/images/' + but[1] + '" title="' + but[2] + '" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
    80         }
    81     }
    82 
    83     // Custom controlls other than buttons
    84     switch (button_name)
    85     {
    86         case "formatselect":
    87             var html = '<select id="{$editor_id}_formatSelect" name="{$editor_id}_formatSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FormatBlock\',false,this.options[this.selectedIndex].value);" class="mceSelectList">';
    88             var formats = tinyMCE.getParam("theme_advanced_blockformats", "p,address,pre,h1,h2,h3,h4,h5,h6", true).split(',');
    89             var lookup = [
    90                 ['p', '{$lang_theme_paragraph}'],
    91                 ['address', '{$lang_theme_address}'],
    92                 ['pre', '{$lang_theme_pre}'],
    93                 ['h1', '{$lang_theme_h1}'],
    94                 ['h2', '{$lang_theme_h2}'],
    95                 ['h3', '{$lang_theme_h3}'],
    96                 ['h4', '{$lang_theme_h4}'],
    97                 ['h5', '{$lang_theme_h5}'],
    98                 ['h6', '{$lang_theme_h6}']
    99             ];
    100 
    101             html += '<option value="">{$lang_theme_block}</option>';
    102 
    103             // Build format select
    104             for (var i=0; i<formats.length; i++)
    105             {
    106                 for (var x=0; x<lookup.length; x++)
    107                 {
    108                     if (formats[i] == lookup[x][0])
    109                     {
    110                         html += '<option value="<' + lookup[x][0] + '>">' + lookup[x][1] + '</option>';
    111                     }
    112                 }
    113             }
    114 
    115             html += '</select>';
    116             //formatselect
    117         return html;
    118 
    119         case "styleselect":
    120             //styleselect
    121         return '<select id="{$editor_id}_styleSelect" onmousedown="TinyMCE_advanced_setupCSSClasses(\'{$editor_id}\');" name="{$editor_id}_styleSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSetCSSClass\',false,this.options[this.selectedIndex].value);" class="mceSelectList">{$style_select_options}</select>';
    122 
    123         case "fontselect":
    124             var fontHTML = '<select id="{$editor_id}_fontNameSelect" name="{$editor_id}_fontNameSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FontName\',false,this.options[this.selectedIndex].value);" class="mceSelectList"><option value="">{$lang_theme_fontdefault}</option>';
    125             var iFonts = 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings';
    126             var nFonts = 'Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sand;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats';
    127             var fonts = tinyMCE.getParam("theme_advanced_fonts", nFonts).split(';');
    128             for (var i=0; i<fonts.length; i++) {
    129                 if (fonts[i] != '') {
    130                     var parts = fonts[i].split('=');
    131                     fontHTML += '<option value="' + parts[1] + '">' + parts[0] + '</option>';
    132                 }
    133             }
    134 
    135             fontHTML += '</select>';
    136             return fontHTML;
    137 
    138         case "fontsizeselect":
    139             //fontsizeselect
    140         return '<select id="{$editor_id}_fontSizeSelect" name="{$editor_id}_fontSizeSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FontSize\',false,this.options[this.selectedIndex].value);" class="mceSelectList">\
    141         <option value="0">{$lang_theme_font_size}</option>\
    142         <option value="1">1 (8 pt)</option>\
    143         <option value="2">2 (10 pt)</option>\
    144         <option value="3">3 (12 pt)</option>\
    145         <option value="4">4 (14 pt)</option>\
    146         <option value="5">5 (18 pt)</option>\
    147         <option value="6">6 (24 pt)</option>\
    148         <option value="7">7 (36 pt)</option>\
    149         </select>';
    150 
    151         case "|":
    152         case "separator":
    153         return '<img src="{$themeurl}/images/spacer.gif" width="1" height="15" class="mceSeparatorLine">';
    154 
    155         case "spacer":
    156         return '<img src="{$themeurl}/images/spacer.gif" width="1" height="15" border="0" class="mceSeparatorLine" style="vertical-align: middle" />';
    157 
    158         case "rowseparator":
    159         return '<br />';
    160     }
    161 
    162     return "";
    163 }
    164 
    165 /**
    166  * Theme specific exec command handeling.
    167  */
    168 function TinyMCE_advanced_execCommand(editor_id, element, command, user_interface, value)
    169 {
    170     switch (command)
    171     {
    172         case "mceForeColor":
    173             var template = new Array();
    174             var elm = tinyMCE.selectedInstance.getFocusElement();
    175             var inputColor = tinyMCE.getAttrib(elm, "color");
    176 
    177             if (inputColor == '')
    178                 inputColor = elm.style.color;
    179 
    180             if (!inputColor)
    181                 inputColor = "#000000";
    182 
    183             template['file'] = 'color_picker.htm';
    184             template['width'] = 220;
    185             template['height'] = 190;
    186 
    187             tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes", command : "forecolor", input_color : inputColor});
    188         return true;
    189 
    190         case "mceBackColor":
    191             var template = new Array();
    192             var elm = tinyMCE.selectedInstance.getFocusElement();
    193             var inputColor = elm.style.backgroundColor;
    194 
    195             if (!inputColor)
    196                 inputColor = "#000000";
    197 
    198             template['file'] = 'color_picker.htm';
    199             template['width'] = 220;
    200             template['height'] = 190;
    201 
    202             template['width'] += tinyMCE.getLang('lang_theme_advanced_backcolor_delta_width', 0);
    203             template['height'] += tinyMCE.getLang('lang_theme_advanced_backcolor_delta_height', 0);
    204 
    205             tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes", command : "HiliteColor", input_color : inputColor});
    206             //mceBackColor
    207         return true;
    208 
    209         case "mceColorPicker":
    210             if (user_interface) {
    211                 var template = new Array();
    212                 var inputColor = value['document'].getElementById(value['element_id']).value;
    213 
    214                 template['file'] = 'color_picker.htm';
    215                 template['width'] = 220;
    216                 template['height'] = 190;
    217                 template['close_previous'] = "no";
    218 
    219                 template['width'] += tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_width', 0);
    220                 template['height'] += tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_height', 0);
    221 
    222                 if (typeof(value['store_selection']) == "undefined")
    223                     value['store_selection'] = true;
    224 
    225                 tinyMCE.lastColorPickerValue = value;
    226                 tinyMCE.openWindow(template, {editor_id : editor_id, mce_store_selection : value['store_selection'], inline : "yes", command : "mceColorPicker", input_color : inputColor});
    227             } else {
    228                 var savedVal = tinyMCE.lastColorPickerValue;
    229                 var elm = savedVal['document'].getElementById(savedVal['element_id']);
    230                 elm.value = value;
    231                 eval('elm.onchange();');
    232             }
    233         return true;
    234 
    235         case "mceCodeEditor":
    236             var template = new Array();
    237 
    238             template['file'] = 'source_editor.htm';
    239             template['width'] = parseInt(tinyMCE.getParam("theme_advanced_source_editor_width", 500));
    240             template['height'] = parseInt(tinyMCE.getParam("theme_advanced_source_editor_height", 400));
    241 
    242             tinyMCE.openWindow(template, {editor_id : editor_id, resizable : "yes", scrollbars : "no", inline : "yes"});
    243             //mceCodeEditor
    244         return true;
    245 
    246         case "mceCharMap":
    247             var template = new Array();
    248 
    249             template['file'] = 'charmap.htm';
    250             template['width'] = 550 + (tinyMCE.isOpera ? 40 : 0);
    251             template['height'] = 250;
    252 
    253             template['width'] += tinyMCE.getLang('lang_theme_advanced_charmap_delta_width', 0);
    254             template['height'] += tinyMCE.getLang('lang_theme_advanced_charmap_delta_height', 0);
    255 
    256             tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
    257             //mceCharMap
    258         return true;
    259 
    260         case "mceInsertAnchor":
    261             var template = new Array();
    262 
    263             template['file'] = 'anchor.htm';
    264             template['width'] = 320;
    265             template['height'] = 90 + (tinyMCE.isNS7 ? 30 : 0);
    266 
    267             template['width'] += tinyMCE.getLang('lang_theme_advanced_anchor_delta_width', 0);
    268             template['height'] += tinyMCE.getLang('lang_theme_advanced_anchor_delta_height', 0);
    269 
    270             tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
    271         return true;
    272 
    273         case "mceNewDocument":
    274             if (confirm(tinyMCE.getLang('lang_newdocument')))
    275                 tinyMCE.execInstanceCommand(editor_id, 'mceSetContent', false, '');
    276 
    277             return true;
    278     }
    279 
    280     // Default behavior
    281     return false;
    282 }
    283 
    284 /**
    285  * Editor instance template function.
    286  */
    287 function TinyMCE_advanced_getEditorTemplate(settings, editorId)
    288 {
    289     function removeFromArray(in_array, remove_array)
    290     {
    291         var outArray = new Array();
    292        
    293         for (var i=0; i<in_array.length; i++)
    294         {
    295             skip = false;
    296 
    297             for (var j=0; j<remove_array.length; j++)
    298             {
    299                 if (in_array[i] == remove_array[j])
    300                 {
    301                     skip = true;
    302                 }
    303             }
    304 
    305             if (!skip)
    306             {
    307                 outArray[outArray.length] = in_array[i];
    308             }
    309         }
    310 
    311         return outArray;
    312     }
    313 
    314     function addToArray(in_array, add_array)
    315     {
    316         for (var i=0; i<add_array.length; i++)
    317         {
    318             in_array[in_array.length] = add_array[i];
    319         }
    320 
    321         return in_array;
    322     }
    323 
    324     var template = new Array();
    325     var deltaHeight = 0;
    326 
    327     var resizing = tinyMCE.getParam("theme_advanced_resizing", false);
    328     var path = tinyMCE.getParam("theme_advanced_path", true);
    329     var statusbarHTML = '<div id="{$editor_id}_path" class="mceStatusbarPathText" style="display: ' + (path ? "block" : "none") + '">&nbsp;</div><div id="{$editor_id}_resize" class="mceStatusbarResize" style="display: ' + (resizing ? "block" : "none") + '" onmousedown="TinyMCE_advanced_setResizing(event,\'{$editor_id}\',true);"></div><br style="clear: both" />';
    330     var layoutManager = tinyMCE.getParam("theme_advanced_layout_manager", "SimpleLayout");
    331 
    332     // Setup style select options -- MOVED UP FOR EXTERNAL TOOLBAR COMPATABILITY!
    333     var styleSelectHTML = '<option value="">{$lang_theme_style_select}</option>';
    334     if (settings['theme_advanced_styles']) {
    335         var stylesAr = settings['theme_advanced_styles'].split(';');
    336        
    337         for (var i=0; i<stylesAr.length; i++) {
    338             var key, value;
    339 
    340             key = stylesAr[i].split('=')[0];
    341             value = stylesAr[i].split('=')[1];
    342 
    343             styleSelectHTML += '<option value="' + value + '">' + key + '</option>';
    344         }
    345 
    346         TinyMCE_advanced_autoImportCSSClasses = false;
    347     }
    348 
    349     switch(layoutManager) {
    350         case "SimpleLayout" : //the default TinyMCE Layout (for backwards compatibility)...
    351             var toolbarHTML = "";
    352             var toolbarLocation = tinyMCE.getParam("theme_advanced_toolbar_location", "bottom");
    353             var toolbarAlign = tinyMCE.getParam("theme_advanced_toolbar_align", "center");
    354             var pathLocation = tinyMCE.getParam("theme_advanced_path_location", "none"); // Compatiblity
    355             var statusbarLocation = tinyMCE.getParam("theme_advanced_statusbar_location", pathLocation);
    356             var defVals = {
    357                 theme_advanced_buttons1 : "bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect",
    358                 theme_advanced_buttons2 : "bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,image,cleanup,help,code",
    359                 theme_advanced_buttons3 : "hr,removeformat,visualaid,separator,sub,sup,separator,charmap"
    360             };
    361 
    362             // Add accessibility control
    363             //toolbarHTML += '<a href="#" accesskey="q" title="' + tinyMCE.getLang("lang_toolbar_focus") + '"></a>';
    364 
    365             // Render rows
    366             for (var i=1; i<100; i++) {
    367                 var def = defVals["theme_advanced_buttons" + i];
    368 
    369                 var buttons = tinyMCE.getParam("theme_advanced_buttons" + i, def == null ? '' : def, true, ',');
    370                 if (buttons.length == 0)
    371                     break;
    372 
    373                 buttons = removeFromArray(buttons, tinyMCE.getParam("theme_advanced_disable", "", true, ','));
    374                 buttons = addToArray(buttons, tinyMCE.getParam("theme_advanced_buttons" + i + "_add", "", true, ','));
    375                 buttons = addToArray(tinyMCE.getParam("theme_advanced_buttons" + i + "_add_before", "", true, ','), buttons);
    376 
    377                 for (var b=0; b<buttons.length; b++)
    378                     toolbarHTML += tinyMCE.getControlHTML(buttons[b]);
    379 
    380                 if (buttons.length > 0) {
    381                     toolbarHTML += "<br />";
    382                     deltaHeight -= 23;
    383                 }
    384             }
    385 
    386             // Add accessibility control
    387             toolbarHTML += '<a href="#" accesskey="z" onfocus="tinyMCE.getInstanceById(\'' + editorId + '\').getWin().focus();"></a>';
    388 
    389             // Setup template html
    390             template['html'] = '<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width}px;height:{$height}px"><tbody>';
    391 
    392             if (toolbarLocation == "top")
    393             {
    394                 template['html'] += '<tr><td class="mceToolbarTop" align="' + toolbarAlign + '" height="1" nowrap="nowrap">' + toolbarHTML + '</td></tr>';
    395             }
    396 
    397             if (statusbarLocation == "top")
    398             {
    399                 template['html'] += '<tr><td class="mceStatusbarTop" height="1">' + statusbarHTML + '</td></tr>';
    400                 deltaHeight -= 23;
    401             }
    402 
    403             template['html'] += '<tr><td align="center"><span id="{$editor_id}"></span></td></tr>';
    404 
    405             if (toolbarLocation == "bottom")
    406             {
    407                 template['html'] += '<tr><td class="mceToolbarBottom" align="' + toolbarAlign + '" height="1">' + toolbarHTML + '</td></tr>';
    408             }
    409 
    410             // External toolbar changes
    411             if (toolbarLocation == "external")
    412             {
    413                 var bod = document.body;
    414                 var elm = document.createElement ("div");
    415                
    416                 toolbarHTML = tinyMCE.replaceVars(toolbarHTML, tinyMCE.settings);
    417                 toolbarHTML = tinyMCE.replaceVars(toolbarHTML, tinyMCELang);
    418                 toolbarHTML = tinyMCE.replaceVar(toolbarHTML, 'style_select_options', styleSelectHTML);
    419                 toolbarHTML = tinyMCE.replaceVar(toolbarHTML, "editor_id", editorId);
    420                 toolbarHTML = tinyMCE.applyTemplate(toolbarHTML);
    421 
    422                 elm.className = "mceToolbarExternal";
    423                 elm.id = editorId+"_toolbar";
    424                 elm.innerHTML = '<table width="100%" border="0" align="center"><tr><td align="center">'+toolbarHTML+'</td></tr></table>';
    425                 bod.appendChild (elm);
    426                 // bod.style.marginTop = elm.offsetHeight + "px";
    427 
    428                 deltaHeight = 0;
    429                 tinyMCE.getInstanceById(editorId).toolbarElement = elm;
    430 
    431                 //template['html'] = '<div id="mceExternalToolbar" align="center" class="mceToolbarExternal"><table width="100%" border="0" align="center"><tr><td align="center">'+toolbarHTML+'</td></tr></table></div>' + template["html"];
    432             }
    433             else
    434             {
    435                 tinyMCE.getInstanceById(editorId).toolbarElement = null;
    436             }
    437 
    438             if (statusbarLocation == "bottom")
    439             {
    440                 template['html'] += '<tr><td class="mceStatusbarBottom" height="1">' + statusbarHTML + '</td></tr>';
    441                 deltaHeight -= 23;
    442             }
    443 
    444             template['html'] += '</tbody></table>';
    445             //"SimpleLayout"
    446         break;
    447 
    448         case "RowLayout" : //Container Layout - containers defined in "theme_advanced_containers" are rendered from top to bottom.
    449             template['html'] = '<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width}px;height:{$height}px"><tbody>';
    450 
    451             var containers = tinyMCE.getParam("theme_advanced_containers", "", true, ",");
    452             var defaultContainerCSS = tinyMCE.getParam("theme_advanced_containers_default_class", "container");
    453             var defaultContainerAlign = tinyMCE.getParam("theme_advanced_containers_default_align", "center");
    454 
    455             //Render Containers:
    456             for (var i = 0; i < containers.length; i++)
    457             {
    458                 if (containers[i] == "mceEditor") //Exceptions for mceEditor and ...
    459                 {
    460                     template['html'] += '<tr><td align="center" class="mceEditor_border">\
    461                                                 <span id="{$editor_id}"></span>\
    462                                                 </td></tr>';
    463                 }
    464                 else if (containers[i] == "mceElementpath" || containers[i] == "mceStatusbar") // ... mceElementpath:
    465                 {
    466                     var pathClass = "mceStatusbar";
    467 
    468                     if (i == containers.length-1)
    469                     {
    470                         pathClass = "mceStatusbarBottom";
    471                     }
    472                     else if (i == 0)
    473                     {
    474                         pathClass = "mceStatusbar";
    475                     }
    476                     else
    477                     {
    478                         deltaHeight-=2;
    479                     }
    480 
    481                     template['html'] += '<tr><td class="' + pathClass + '" height="1">' + statusbarHTML + '</td></tr>';
    482                     deltaHeight -= 22;
    483                 }
    484                 else //Render normal Container:
    485                 {
    486                     var curContainer = tinyMCE.getParam("theme_advanced_container_"+containers[i], "", true, ',');
    487                     var curContainerHTML = "";
    488                     var curAlign = tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_align", defaultContainerAlign);
    489                     var curCSS = tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_class", defaultContainerCSS);
    490 
    491                     for (var j=0; j<curContainer.length; j++)
    492                     {
    493                         curContainerHTML += tinyMCE.getControlHTML(curContainer[j]);
    494                     }
    495 
    496                     if (curContainer.length > 0)
    497                     {
    498                         curContainerHTML += "<br />";
    499                         deltaHeight -= 23;
    500                     }
    501 
    502                     template['html'] += '<tr><td class="' + curCSS + '" align="' + curAlign + '" height="1">' + curContainerHTML + '</td></tr>';
    503                 }
    504             }
    505 
    506             template['html'] += '</tbody></table>';
    507             //RowLayout
    508         break;
    509 
    510         case "BorderLayout" : //will be like java.awt.BorderLayout of SUN Java...
    511             // Not implemented yet...
    512         break;
    513 
    514         case "CustomLayout" : //User defined layout callback...
    515             var customLayout = tinyMCE.getParam("theme_advanced_custom_layout","");
    516            
    517             if (customLayout != "" && eval("typeof(" + customLayout + ")") != "undefined")
    518             {
    519                 template = eval(customLayout + "(template);");
    520             }
    521         break;
    522            
    523         default:
    524             alert('UNDEFINED LAYOUT MANAGER! PLEASE CHECK YOUR TINYMCE CONFIG!');
    525             //CustomLayout
    526         break;
    527     }
    528 
    529     template['html'] += '<div id="{$editor_id}_resize_box" class="mceResizeBox"></div>';
    530     template['html'] = tinyMCE.replaceVar(template['html'], 'style_select_options', styleSelectHTML);
    531     template['delta_width'] = 0;
    532     template['delta_height'] = deltaHeight;
    533 
    534     return template;
    535 }
    536 
    537 /**
    538  * Starts/stops the editor resizing.
    539  */
    540 function TinyMCE_advanced_setResizing(e, editor_id, state) {
    541     e = typeof(e) == "undefined" ? window.event : e;
    542 
    543     var resizer = TinyMCE_advanced_resizer;
    544     var editorContainer = document.getElementById(editor_id + '_parent');
    545     var editorArea = document.getElementById(editor_id + '_parent').firstChild;
    546     var resizeBox = document.getElementById(editor_id + '_resize_box');
    547     var inst = tinyMCE.getInstanceById(editor_id);
    548 
    549     if (state) {
    550         // Place box over editor area
    551         var width = editorArea.clientWidth;
    552         var height = editorArea.clientHeight;
    553 
    554         resizeBox.style.width = width + "px";
    555         resizeBox.style.height = height + "px";
    556 
    557         resizer.iframeWidth = inst.iframeElement.clientWidth;
    558         resizer.iframeHeight = inst.iframeElement.clientHeight;
    559 
    560         // Hide editor and show resize box
    561         editorArea.style.display = "none";
    562         resizeBox.style.display = "block";
    563 
    564         // Add event handlers, only once
    565         if (!resizer.eventHandlers) {
    566             if (tinyMCE.isMSIE)
    567                 tinyMCE.addEvent(document, "mousemove", TinyMCE_advanced_resizeEventHandler);
    568             else
    569                 tinyMCE.addEvent(window, "mousemove", TinyMCE_advanced_resizeEventHandler);
    570 
    571             tinyMCE.addEvent(document, "mouseup", TinyMCE_advanced_resizeEventHandler);
    572 
    573             resizer.eventHandlers = true;
    574         }
    575 
    576         resizer.resizing = true;
    577         resizer.downX = e.screenX;
    578         resizer.downY = e.screenY;
    579         resizer.width = parseInt(resizeBox.style.width);
    580         resizer.height = parseInt(resizeBox.style.height);
    581         resizer.editorId = editor_id;
    582         resizer.resizeBox = resizeBox;
    583         resizer.horizontal = tinyMCE.getParam("theme_advanced_resize_horizontal", true);
    584     } else {
    585         resizer.resizing = false;
    586         resizeBox.style.display = "none";
    587         editorArea.style.display = tinyMCE.isMSIE ? "block" : "table";
    588         tinyMCE.execCommand('mceResetDesignMode');
    589     }
    590 }
    591 
    592 function TinyMCE_advanced_initInstance(inst) {
    593     if (tinyMCE.getParam("theme_advanced_resizing", false)) {
    594         if (tinyMCE.getParam("theme_advanced_resizing_use_cookie", true)) {
    595             var w = TinyMCE_advanced_getCookie("TinyMCE_" + inst.editorId + "_width");
    596             var h = TinyMCE_advanced_getCookie("TinyMCE_" + inst.editorId + "_height");
    597 
    598             TinyMCE_advanced_resizeTo(inst, w, h, tinyMCE.getParam("theme_advanced_resize_horizontal", true));
    599         }
    600     }
    601 }
    602 
    603 function TinyMCE_advanced_setCookie(name, value, expires, path, domain, secure) {
    604     var curCookie = name + "=" + escape(value) +
    605         ((expires) ? "; expires=" + expires.toGMTString() : "") +
    606         ((path) ? "; path=" + escape(path) : "") +
    607         ((domain) ? "; domain=" + domain : "") +
    608         ((secure) ? "; secure" : "");
    609 
    610     document.cookie = curCookie;
    611 }
    612 
    613 function TinyMCE_advanced_getCookie(name) {
    614     var dc = document.cookie;
    615     var prefix = name + "=";
    616     var begin = dc.indexOf("; " + prefix);
    617 
    618     if (begin == -1) {
    619         begin = dc.indexOf(prefix);
    620 
    621         if (begin != 0)
    622             return null;
    623     } else
    624         begin += 2;
    625 
    626     var end = document.cookie.indexOf(";", begin);
    627 
    628     if (end == -1)
    629         end = dc.length;
    630 
    631     return unescape(dc.substring(begin + prefix.length, end));
    632 }
    633 
    634 function TinyMCE_advanced_resizeTo(inst, w, h, set_w) {
    635     var editorContainer = document.getElementById(inst.editorId + '_parent');
    636     var tableElm = editorContainer.firstChild;
    637     var iframe = inst.iframeElement;
    638 
    639     if (w == null || w == "null") {
    640         set_w = false;
    641         w = 0;
    642     }
    643 
    644     if (h == null || h == "null")
    645         return;
    646 
    647     w = parseInt(w);
    648     h = parseInt(h);
    649 
    650     if (tinyMCE.isGecko) {
    651         w += 2;
    652         h += 2;
    653     }
    654 
    655     var dx = w - tableElm.clientWidth;
    656     var dy = h - tableElm.clientHeight;
    657 
    658     if (set_w)
    659         tableElm.style.width = w + "px";
    660 
    661     tableElm.style.height = h + "px";
    662 
    663     iw = iframe.clientWidth + dx;
    664     ih = iframe.clientHeight + dy;
    665 
    666     if (tinyMCE.isGecko) {
    667         iw -= 2;
    668         ih -= 2;
    669     }
    670 
    671     if (set_w)
    672         iframe.style.width = iw + "px";
    673 
    674     iframe.style.height = ih + "px";
    675 
    676     // Is it to small, make it bigger again
    677     if (set_w) {
    678         var tableBodyElm = tableElm.firstChild;
    679         var minIframeWidth = tableBodyElm.scrollWidth;
    680         if (inst.iframeElement.clientWidth < minIframeWidth) {
    681             dx = minIframeWidth - inst.iframeElement.clientWidth;
    682 
    683             inst.iframeElement.style.width = (iw + dx) + "px";
    684         }
    685     }
    686 }
    687 
    688 /**
    689  * Handles resizing events.
    690  */
    691 function TinyMCE_advanced_resizeEventHandler(e) {
    692     var resizer = TinyMCE_advanced_resizer;
    693 
    694     // Do nothing
    695     if (!resizer.resizing)
    696         return;
    697 
    698     e = typeof(e) == "undefined" ? window.event : e;
    699 
    700     var dx = e.screenX - resizer.downX;
    701     var dy = e.screenY - resizer.downY;
    702     var resizeBox = resizer.resizeBox;
    703     var editorId = resizer.editorId;
    704 
    705     switch (e.type) {
    706         case "mousemove":
    707             if (resizer.horizontal)
    708                 resizeBox.style.width = (resizer.width + dx) + "px";
    709 
    710             resizeBox.style.height = (resizer.height + dy) + "px";
    711             break;
    712 
    713         case "mouseup":
    714             TinyMCE_advanced_setResizing(e, editorId, false);
    715             TinyMCE_advanced_resizeTo(tinyMCE.getInstanceById(editorId), resizer.width + dx, resizer.height + dy, resizer.horizontal);
    716 
    717             // Expire in a month
    718             if (tinyMCE.getParam("theme_advanced_resizing_use_cookie", true)) {
    719                 var expires = new Date();
    720                 expires.setTime(expires.getTime() + 3600000 * 24 * 30);
    721 
    722                 // Set the cookies
    723                 TinyMCE_advanced_setCookie("TinyMCE_" + editorId + "_width", "" + (resizer.horizontal ? resizer.width + dx : ""), expires);
    724                 TinyMCE_advanced_setCookie("TinyMCE_" + editorId + "_height", "" + (resizer.height + dy), expires);
    725             }
    726             break;
    727     }
    728 }
    729 
    730 /**
    731  * Insert link template function.
    732  */
    733 function TinyMCE_advanced_getInsertLinkTemplate()
    734 {
    735     var template = new Array();
    736 
    737     template['file'] = 'link.htm';
    738     template['width'] = 330;
    739     template['height'] = 170;
    740 
    741     // Language specific width and height addons
    742     template['width'] += tinyMCE.getLang('lang_insert_link_delta_width', 0);
    743     template['height'] += tinyMCE.getLang('lang_insert_link_delta_height', 0);
    744 
    745     return template;
    746 };
    747 
    748 /**
    749  * Insert image template function.
    750  */
    751 function TinyMCE_advanced_getInsertImageTemplate()
    752 {
    753     var template = new Array();
    754 
    755     template['file'] = 'image.htm?src={$src}';
    756     template['width'] = 340;
    757     template['height'] = 245;
    758 
    759     // Language specific width and height addons
    760     template['width'] += tinyMCE.getLang('lang_insert_image_delta_width', 0);
    761     template['height'] += tinyMCE.getLang('lang_insert_image_delta_height', 0);
    762 
    763     return template;
    764 };
    765 
    766 /**
    767  * Node change handler.
    768  */
    769 function TinyMCE_advanced_handleNodeChange (editor_id, node, undo_index, undo_levels, visual_aid, any_selection, setup_content) {
    770     function selectByValue(select_elm, value, first_index) {
    771         first_index = typeof(first_index) == "undefined" ? false : true;
    772 
    773         if (select_elm) {
    774             for (var i=0; i<select_elm.options.length; i++) {
    775                 var ov = "" + select_elm.options[i].value;
    776 
    777                 if (first_index && ov.toLowerCase().indexOf(value.toLowerCase()) == 0) {
    778                     select_elm.selectedIndex = i;
    779                     return true;
    780                 }
    781 
    782                 if (ov == value) {
    783                     select_elm.selectedIndex = i;
    784                     return true;
    785                 }
    786             }
    787         }
    788 
    789         return false;
    790     };
    791 
    792     function getAttrib(elm, name) {
    793         return elm.getAttribute(name) ? elm.getAttribute(name) : "";
    794     };
    795 
    796     // No node provided
    797     if (node == null)
    798     {
    799         return;
    800     }
    801 
    802     // Update path
    803     var pathElm = document.getElementById(editor_id + "_path");
    804     var inst = tinyMCE.getInstanceById(editor_id);
    805     var doc = inst.getDoc();
    806 
    807     if (pathElm) {
    808         // Get node path
    809         var parentNode = node;
    810         var path = new Array();
    811        
    812         while (parentNode != null) {
    813             if (parentNode.nodeName.toUpperCase() == "BODY") {
    814                 break;
    815             }
    816 
    817             // Only append element nodes to path
    818             if (parentNode.nodeType == 1) {
    819                 path[path.length] = parentNode;
    820             }
    821 
    822             parentNode = parentNode.parentNode;
    823         }
    824 
    825         // Setup HTML
    826         var html = "";
    827         for (var i=path.length-1; i>=0; i--) {
    828             var nodeName = path[i].nodeName.toLowerCase();
    829             var nodeData = "";
    830 
    831             if (nodeName == "b") {
    832                 nodeName = "strong";
    833             }
    834 
    835             if (nodeName == "i") {
    836                 nodeName = "em";
    837             }
    838 
    839             if (nodeName == "span") {
    840                 var cn = tinyMCE.getAttrib(path[i], "class");
    841                 if (cn != "" && cn.indexOf('mceItem') == -1)
    842                     nodeData += "class: " + cn + " ";
    843 
    844                 var st = tinyMCE.getAttrib(path[i], "style");
    845                 if (st != "") {
    846                     st = tinyMCE.serializeStyle(tinyMCE.parseStyle(st));
    847                     nodeData += "style: " + st + " ";
    848                 }
    849             }
    850 
    851             if (nodeName == "font") {
    852                 if (tinyMCE.getParam("convert_fonts_to_spans"))
    853                     nodeName = "span";
    854 
    855                 var face = tinyMCE.getAttrib(path[i], "face");
    856                 if (face != "")
    857                     nodeData += "font: " + face + " ";
    858 
    859                 var size = tinyMCE.getAttrib(path[i], "size");
    860                 if (size != "")
    861                     nodeData += "size: " + size + " ";
    862 
    863                 var color = tinyMCE.getAttrib(path[i], "color");
    864                 if (color != "")
    865                     nodeData += "color: " + color + " ";
    866             }
    867 
    868             if (getAttrib(path[i], 'id') != "") {
    869                 nodeData += "id: " + path[i].getAttribute('id') + " ";
    870             }
    871 
    872             var className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i], "class"), false);
    873             if (className != "" && className.indexOf('mceItem') == -1)
    874                 nodeData += "class: " + className + " ";
    875 
    876             if (getAttrib(path[i], 'src') != "") {
    877                 nodeData += "src: " + path[i].getAttribute('src') + " ";
    878             }
    879 
    880             if (getAttrib(path[i], 'href') != "") {
    881                 nodeData += "href: " + path[i].getAttribute('href') + " ";
    882             }
    883 
    884             if (nodeName == "img" && tinyMCE.getAttrib(path[i], "class").indexOf('mceItemFlash') != -1) {
    885                 nodeName = "flash";
    886                 nodeData = "src: " + path[i].getAttribute('title');
    887             }
    888 
    889             if (nodeName == "a" && (anchor = tinyMCE.getAttrib(path[i], "name")) != "") {
    890                 nodeName = "a";
    891                 nodeName += "#" + anchor;
    892                 nodeData = "";
    893             }
    894 
    895             if (getAttrib(path[i], 'name').indexOf("mce_") != 0) {
    896                 var className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i], "class"), false);
    897                 if (className != "" && className.indexOf('mceItem') == -1) {
    898                     nodeName += "." + className;
    899                 }
    900             }
    901 
    902             var cmd = 'tinyMCE.execInstanceCommand(\'' + editor_id + '\',\'mceSelectNodeDepth\',false,\'' + i + '\');';
    903             html += '<a title="' + nodeData + '" href="javascript:' + cmd + '" onclick="' + cmd + 'return false;" onmousedown="return false;" target="_self" class="mcePathItem">' + nodeName + '</a>';
    904 
    905             if (i > 0) {
    906                 html += " &raquo; ";
    907             }
    908         }
    909 
    910         pathElm.innerHTML = '<a href="#" accesskey="x"></a>' + tinyMCE.getLang('lang_theme_path') + ": " + html + '&nbsp;';
    911     }
    912 
    913     // Reset old states
    914     tinyMCE.switchClassSticky(editor_id + '_justifyleft', 'mceButtonNormal');
    915     tinyMCE.switchClassSticky(editor_id + '_justifyright', 'mceButtonNormal');
    916     tinyMCE.switchClassSticky(editor_id + '_justifycenter', 'mceButtonNormal');
    917     tinyMCE.switchClassSticky(editor_id + '_justifyfull', 'mceButtonNormal');
    918     tinyMCE.switchClassSticky(editor_id + '_bold', 'mceButtonNormal');
    919     tinyMCE.switchClassSticky(editor_id + '_italic', 'mceButtonNormal');
    920     tinyMCE.switchClassSticky(editor_id + '_underline', 'mceButtonNormal');
    921     tinyMCE.switchClassSticky(editor_id + '_strikethrough', 'mceButtonNormal');
    922     tinyMCE.switchClassSticky(editor_id + '_bullist', 'mceButtonNormal');
    923     tinyMCE.switchClassSticky(editor_id + '_numlist', 'mceButtonNormal');
    924     tinyMCE.switchClassSticky(editor_id + '_sub', 'mceButtonNormal');
    925     tinyMCE.switchClassSticky(editor_id + '_sup', 'mceButtonNormal');
    926     tinyMCE.switchClassSticky(editor_id + '_anchor', 'mceButtonNormal');
    927     tinyMCE.switchClassSticky(editor_id + '_link', 'mceButtonDisabled', true);
    928     tinyMCE.switchClassSticky(editor_id + '_unlink', 'mceButtonDisabled', true);
    929     tinyMCE.switchClassSticky(editor_id + '_outdent', 'mceButtonDisabled', true);
    930     tinyMCE.switchClassSticky(editor_id + '_image', 'mceButtonNormal');
    931     tinyMCE.switchClassSticky(editor_id + '_hr', 'mceButtonNormal');
    932 
    933     if (node.nodeName == "A" && tinyMCE.getAttrib(node, "class").indexOf('mceItemAnchor') != -1)
    934         tinyMCE.switchClassSticky(editor_id + '_anchor', 'mceButtonSelected');
    935 
    936     // Get link
    937     var anchorLink = tinyMCE.getParentElement(node, "a", "href");
    938 
    939     if (anchorLink || any_selection)
    940     {
    941         tinyMCE.switchClassSticky(editor_id + '_link', anchorLink ? 'mceButtonSelected' : 'mceButtonNormal', false);
    942         tinyMCE.switchClassSticky(editor_id + '_unlink', anchorLink ? 'mceButtonSelected' : 'mceButtonNormal', false);
    943     }
    944 
    945     // Handle visual aid
    946     tinyMCE.switchClassSticky(editor_id + '_visualaid', visual_aid ? 'mceButtonSelected' : 'mceButtonNormal', false);
    947 
    948     if (undo_levels != -1)
    949     {
    950         tinyMCE.switchClassSticky(editor_id + '_undo', 'mceButtonDisabled', true);
    951         tinyMCE.switchClassSticky(editor_id + '_redo', 'mceButtonDisabled', true);
    952     }
    953 
    954     // Within li, blockquote
    955     if (tinyMCE.getParentElement(node, "li,blockquote"))
    956     {
    957         tinyMCE.switchClassSticky(editor_id + '_outdent', 'mceButtonNormal', false);
    958     }
    959 
    960     // Has redo levels
    961     if (undo_index != -1 && (undo_index < undo_levels-1 && undo_levels > 0))
    962     {
    963         tinyMCE.switchClassSticky(editor_id + '_redo', 'mceButtonNormal', false);
    964     }
    965 
    966     // Has undo levels
    967     if (undo_index != -1 && (undo_index > 0 && undo_levels > 0))
    968     {
    969         tinyMCE.switchClassSticky(editor_id + '_undo', 'mceButtonNormal', false);
    970     }
    971 
    972     // Select class in select box
    973     var selectElm = document.getElementById(editor_id + "_styleSelect");
    974    
    975     if (selectElm)
    976     {
    977         TinyMCE_advanced_setupCSSClasses(editor_id);
    978 
    979         classNode = node;
    980         breakOut = false;
    981         var index = 0;
    982 
    983         do
    984         {
    985             if (classNode && classNode.className)
    986             {
    987                 for (var i=0; i<selectElm.options.length; i++)
    988                 {
    989                     if (selectElm.options[i].value == classNode.className)
    990                     {
    991                         index = i;
    992                         breakOut = true;
    993                         break;
    994                     }
    995                 }
    996             }
    997         } while (!breakOut && classNode != null && (classNode = classNode.parentNode) != null);
    998 
    999         selectElm.selectedIndex = index;
    1000     }
    1001 
    1002     // Select formatblock
    1003     var selectElm = document.getElementById(editor_id + "_formatSelect");
    1004    
    1005     if (selectElm)
    1006     {
    1007         var elm = tinyMCE.getParentElement(node, "p,div,h1,h2,h3,h4,h5,h6,pre,address");
    1008        
    1009         if (elm)
    1010         {
    1011             selectByValue(selectElm, "<" + elm.nodeName.toLowerCase() + ">");
    1012         }
    1013         else
    1014         {
    1015             selectByValue(selectElm, "");
    1016         }
    1017     }
    1018 
    1019     // Select fontselect
    1020     var selectElm = document.getElementById(editor_id + "_fontNameSelect");
    1021     if (selectElm) {
    1022         if (!tinyMCE.isSafari && !(tinyMCE.isMSIE && !tinyMCE.isOpera)) {
    1023             var face = doc.queryCommandValue('FontName');
    1024 
    1025             face = face == null || face == "" ? "" : face;
    1026 
    1027             selectByValue(selectElm, face, face != "");
    1028         } else {
    1029             var elm = tinyMCE.getParentElement(node, "font", "face");
    1030 
    1031             if (elm) {
    1032                 var family = tinyMCE.getAttrib(elm, "face");
    1033 
    1034                 if (family == '')
    1035                     family = '' + elm.style.fontFamily;
    1036 
    1037                 if (!selectByValue(selectElm, family, family != ""))
    1038                     selectByValue(selectElm, "");
    1039             } else
    1040                 selectByValue(selectElm, "");
    1041         }
    1042     }
    1043 
    1044     // Select fontsize
    1045     var selectElm = document.getElementById(editor_id + "_fontSizeSelect");
    1046     if (selectElm) {
    1047         if (!tinyMCE.isSafari && !tinyMCE.isOpera) {
    1048             var size = doc.queryCommandValue('FontSize');
    1049             selectByValue(selectElm, size == null || size == "" ? "0" : size);
    1050         } else {
    1051             var elm = tinyMCE.getParentElement(node, "font", "size");
    1052             if (elm) {
    1053                 var size = tinyMCE.getAttrib(elm, "size");
    1054 
    1055                 if (size == '') {
    1056                     var sizes = new Array('', '8px', '10px', '12px', '14px', '18px', '24px', '36px');
    1057 
    1058                     size = '' + elm.style.fontSize;
    1059 
    1060                     for (var i=0; i<sizes.length; i++) {
    1061                         if (('' + sizes[i]) == size) {
    1062                             size = i;
    1063                             break;
    1064                         }
    1065                     }
    1066                 }
    1067 
    1068                 if (!selectByValue(selectElm, size))
    1069                     selectByValue(selectElm, "");
    1070             } else
    1071                 selectByValue(selectElm, "0");
    1072         }
    1073     }
    1074 
    1075     // Handle align attributes
    1076     alignNode = node;
    1077     breakOut = false;
    1078     do {
    1079         if (!alignNode.getAttribute || !alignNode.getAttribute('align')) {
    1080             continue;
    1081         }
    1082 
    1083         switch (alignNode.getAttribute('align').toLowerCase()) {
    1084             case "left":
    1085                 tinyMCE.switchClassSticky(editor_id + '_justifyleft', 'mceButtonSelected');
    1086                 breakOut = true;
    1087             break;
    1088 
    1089             case "right":
    1090                 tinyMCE.switchClassSticky(editor_id + '_justifyright', 'mceButtonSelected');
    1091                 breakOut = true;
    1092             break;
    1093 
    1094             case "middle":
    1095             case "center":
    1096                 tinyMCE.switchClassSticky(editor_id + '_justifycenter', 'mceButtonSelected');
    1097                 breakOut = true;
    1098             break;
    1099 
    1100             case "justify":
    1101                 tinyMCE.switchClassSticky(editor_id + '_justifyfull', 'mceButtonSelected');
    1102                 breakOut = true;
    1103             break;
    1104         }
    1105     } while (!breakOut && (alignNode = alignNode.parentNode) != null);
    1106 
    1107     // Div justification
    1108     var div = tinyMCE.getParentElement(node, "div");
    1109     if (div && div.style.textAlign == "center")
    1110         tinyMCE.switchClassSticky(editor_id + '_justifycenter', 'mceButtonSelected');
    1111 
    1112     // Do special text
    1113     if (!setup_content) {
    1114         // , "JustifyLeft", "_justifyleft", "JustifyCenter", "justifycenter", "JustifyRight", "justifyright", "JustifyFull", "justifyfull", "InsertUnorderedList", "bullist", "InsertOrderedList", "numlist", "InsertUnorderedList", "bullist", "Outdent", "outdent", "Indent", "indent", "subscript", "sub"
    1115         var ar = new Array("Bold", "_bold", "Italic", "_italic", "Strikethrough", "_strikethrough", "superscript", "_sup", "subscript", "_sub");
    1116         for (var i=0; i<ar.length; i+=2) {
    1117             if (doc.queryCommandState(ar[i]))
    1118                 tinyMCE.switchClassSticky(editor_id + ar[i+1], 'mceButtonSelected');
    1119         }
    1120 
    1121         if (doc.queryCommandState("Underline") && (node.parentNode == null || node.parentNode.nodeName != "A")) {
    1122             tinyMCE.switchClassSticky(editor_id + '_underline', 'mceButtonSelected');
    1123         }
    1124     }
    1125 
    1126     // Handle elements
    1127     do {
    1128         switch (node.nodeName) {
    1129 /*          case "B":
    1130             case "STRONG":
    1131                 tinyMCE.switchClassSticky(editor_id + '_bold', 'mceButtonSelected');
    1132             break;
    1133 
    1134             case "I":
    1135             case "EM":
    1136                 tinyMCE.switchClassSticky(editor_id + '_italic', 'mceButtonSelected');
    1137             break;
    1138 
    1139             case "U":
    1140                 tinyMCE.switchClassSticky(editor_id + '_underline', 'mceButtonSelected');
    1141             break;
    1142 
    1143             case "STRIKE":
    1144                 tinyMCE.switchClassSticky(editor_id + '_strikethrough', 'mceButtonSelected');
    1145             break;*/
    1146 
    1147             case "UL":
    1148                 tinyMCE.switchClassSticky(editor_id + '_bullist', 'mceButtonSelected');
    1149             break;
    1150 
    1151             case "OL":
    1152                 tinyMCE.switchClassSticky(editor_id + '_numlist', 'mceButtonSelected');
    1153             break;
    1154 
    1155             case "HR":
    1156                  tinyMCE.switchClassSticky(editor_id + '_hr', 'mceButtonSelected');
    1157             break;
    1158 
    1159             case "IMG":
    1160             if (getAttrib(node, 'name').indexOf('mce_') != 0) {
    1161                 tinyMCE.switchClassSticky(editor_id + '_image', 'mceButtonSelected');
    1162             }
    1163             break;
    1164         }
    1165     } while ((node = node.parentNode) != null);
    1166 };
    1167 
    1168 // This function auto imports CSS classes into the class selection droplist
    1169 function TinyMCE_advanced_setupCSSClasses(editor_id) {
    1170     if (!TinyMCE_advanced_autoImportCSSClasses) {
    1171         return;
    1172     }
    1173 
    1174     var selectElm = document.getElementById(editor_id + '_styleSelect');
    1175 
    1176     if (selectElm && selectElm.getAttribute('cssImported') != 'true') {
    1177         var csses = tinyMCE.getCSSClasses(editor_id);
    1178         if (csses && selectElm) {
    1179             for (var i=0; i<csses.length; i++) {
    1180                 selectElm.options[selectElm.length] = new Option(csses[i], csses[i]);
    1181             }
    1182         }
    1183 
    1184         // Only do this once
    1185         if (csses != null && csses.length > 0) {
    1186             selectElm.setAttribute('cssImported', 'true');
    1187         }
    1188     }
    1189 };
  • trunk/wp-includes/js/tinymce/themes/advanced/image.htm

    r2993 r3163  
    55    <script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
    66    <script language="javascript" type="text/javascript" src="jscripts/image.js"></script>
     7    <style type="text/css">
     8        #insert, #cancel {
     9            font: 13px Verdana, Arial, Helvetica, sans-serif;
     10            height:auto;
     11            width: auto;
     12            background-color: transparent;
     13            background-image: url(../../../../../wp-admin/images/fade-butt.png);
     14            background-repeat: repeat;
     15            border: 3px double;
     16            border-right-color: rgb(153, 153, 153);
     17            border-bottom-color: rgb(153, 153, 153);
     18            border-left-color: rgb(204, 204, 204);
     19            border-top-color: rgb(204, 204, 204);
     20            color: rgb(51, 51, 51);
     21            padding: 0.25em 1em;
     22        }
     23        #insert:active, #cancel:active {
     24            background: #f4f4f4;
     25            border-left-color: #999;
     26            border-top-color: #999;
     27        }
     28    </style>
    729</head>
    830<body onload="tinyMCEPopup.executeOnLoad('init();');document.getElementById('src').focus();" style="display: none">
     
    6183          </tr>
    6284          <tr>
    63             <td nowrap="nowrap">{$lang_insert_image_dimensions}:</td>
     85            <td nowrap="nowrap"><!--{$lang_insert_image_dimensions}:</td>
    6486            <td><input name="width" type="text" id="width" value="" size="3" maxlength="3">
    6587              x
    66               <input name="height" type="text" id="height" value="" size="3" maxlength="3"></td>
     88              <input name="height" type="text" id="height" value="" size="3" maxlength="3">--></td>
    6789          </tr>
    68           <tr>
     90<!--          <tr>
    6991            <td nowrap="nowrap">{$lang_insert_image_border}:</td>
    7092            <td><input name="border" type="text" id="border" value="" size="3" maxlength="3"></td>
     
    78100            <td><input name="hspace" type="text" id="hspace" value="" size="3" maxlength="3"></td>
    79101          </tr>
    80           <tr>
     102-->          <tr>
    81103            <td nowrap="nowrap"><input type="submit" id="insert" name="insert" value="{$lang_insert}" onclick="insertImage();">
    82104            </td>
  • trunk/wp-includes/js/tinymce/themes/advanced/jscripts/image.js

    r3062 r3163  
    1212        var src = document.forms[0].src.value;
    1313        var alt = document.forms[0].alt.value;
    14         var border = document.forms[0].border.value;
    15         var vspace = document.forms[0].vspace.value;
    16         var hspace = document.forms[0].hspace.value;
    17         var width = document.forms[0].width.value;
    18         var height = document.forms[0].height.value;
     14        var border = '';//document.forms[0].border.value;
     15        var vspace = '';//document.forms[0].vspace.value;
     16        var hspace = '';//document.forms[0].hspace.value;
     17        var width = '';//document.forms[0].width.value;
     18        var height = '';//document.forms[0].height.value;
    1919        var align = document.forms[0].align.options[document.forms[0].align.selectedIndex].value;
    2020
     
    3838    formObj.src.value = tinyMCE.getWindowArg('src');
    3939    formObj.alt.value = tinyMCE.getWindowArg('alt');
    40     formObj.border.value = tinyMCE.getWindowArg('border');
    41     formObj.vspace.value = tinyMCE.getWindowArg('vspace');
    42     formObj.hspace.value = tinyMCE.getWindowArg('hspace');
    43     formObj.width.value = tinyMCE.getWindowArg('width');
    44     formObj.height.value = tinyMCE.getWindowArg('height');
     40//  formObj.border.value = tinyMCE.getWindowArg('border');
     41//  formObj.vspace.value = tinyMCE.getWindowArg('vspace');
     42//  formObj.hspace.value = tinyMCE.getWindowArg('hspace');
     43//  formObj.width.value = tinyMCE.getWindowArg('width');
     44//  formObj.height.value = tinyMCE.getWindowArg('height');
    4545    formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true);
    4646
     
    6868    var formObj = document.forms[0];
    6969
    70     if (formObj.width.value == "")
    71         formObj.width.value = preloadImg.width;
     70//  if (formObj.width.value == "")
     71//      formObj.width.value = preloadImg.width;
    7272
    73     if (formObj.height.value == "")
    74         formObj.height.value = preloadImg.height;
     73//  if (formObj.height.value == "")
     74//      formObj.height.value = preloadImg.height;
    7575}
    7676
  • trunk/wp-includes/js/tinymce/themes/advanced/jscripts/link.js

    r3062 r3163  
    1111    tinyMCEPopup.resizeToInnerSize();
    1212
    13     document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','theme_advanced_link');
     13//  document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','theme_advanced_link');
    1414
    1515    var formObj = document.forms[0];
     
    2626    document.forms[0].insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true);
    2727
    28     addClassesToList('styleSelect', 'theme_advanced_link_styles');
    29     selectByValue(formObj, 'styleSelect', tinyMCE.getWindowArg('className'), true);
     28//  addClassesToList('styleSelect', 'theme_advanced_link_styles');
     29//  selectByValue(formObj, 'styleSelect', tinyMCE.getWindowArg('className'), true);
    3030
    3131    // Handle file browser
     
    4949        var target = document.forms[0].target.options[document.forms[0].target.selectedIndex].value;
    5050        var title = document.forms[0].linktitle.value;
    51         var style_class = document.forms[0].styleSelect.value;
     51        var style_class = '';//document.forms[0].styleSelect.value;
    5252        var dummy;
    5353
  • trunk/wp-includes/js/tinymce/themes/advanced/langs/en.js

    r2993 r3163  
    33tinyMCE.addToLang('',{
    44theme_style_select : '-- Styles --',
    5 theme_code_desc : 'Edit HTML Source',
     5theme_code_desc : 'Edit HTML Source (Alt+e)',
    66theme_code_title : 'HTML Source Editor',
    77theme_code_wordwrap : 'Word wrap',
  • trunk/wp-includes/js/tinymce/themes/advanced/link.htm

    r2993 r3163  
    55    <script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
    66    <script language="javascript" type="text/javascript" src="jscripts/link.js"></script>
     7    <style type="text/css">
     8        #insert, #cancel {
     9            font: 13px Verdana, Arial, Helvetica, sans-serif;
     10            height: auto;
     11            width: auto;
     12            background-color: transparent;
     13            background-image: url(../../../../../wp-admin/images/fade-butt.png);
     14            background-repeat: repeat;
     15            border: 3px double;
     16            border-right-color: rgb(153, 153, 153);
     17            border-bottom-color: rgb(153, 153, 153);
     18            border-left-color: rgb(204, 204, 204);
     19            border-top-color: rgb(204, 204, 204);
     20            color: rgb(51, 51, 51);
     21            padding: 0.25em 0.75em;
     22        }
     23        #insert:active, #cancel:active {
     24            background: #f4f4f4;
     25            border-left-color: #999;
     26            border-top-color: #999;
     27        }
     28    </style>
    729</head>
    830<body onload="tinyMCEPopup.executeOnLoad('init();');document.getElementById('href').focus();" style="display: none">
     
    7193          </tr>
    7294          <tr id="styleSelectRow">
    73             <td>{$lang_class_name}:</td>
     95            <td><!--{$lang_class_name}:</td>
    7496            <td>
    7597             <select id="styleSelect" name="styleSelect">
     
    7799             </select></td>
    78100            <td align="right">&nbsp;</td>
    79             <td align="right">&nbsp;</td>
     101            <td align="right">&nbsp;--></td>
    80102          </tr>
    81103          <tr>
  • trunk/wp-includes/js/tinymce/themes/advanced/source_editor.htm

    r2993 r3163  
    55    <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
    66    <script language="javascript" type="text/javascript" src="jscripts/source_editor.js"></script>
     7    <style type="text/css">
     8        #insert, #cancel {
     9            font: 13px Verdana, Arial, Helvetica, sans-serif;
     10            height: auto;
     11            width: auto;
     12            background-color: transparent;
     13            background-image: url(../../../../../wp-admin/images/fade-butt.png);
     14            background-repeat: repeat;
     15            border: 3px double;
     16            border-right-color: rgb(153, 153, 153);
     17            border-bottom-color: rgb(153, 153, 153);
     18            border-left-color: rgb(204, 204, 204);
     19            border-top-color: rgb(204, 204, 204);
     20            color: rgb(51, 51, 51);
     21            padding: 0.25em 0.75em;
     22        }
     23        #insert:active, #cancel:active {
     24            background: #f4f4f4;
     25            border-left-color: #999;
     26            border-top-color: #999;
     27        }
     28    </style>
    729</head>
    830<body onload="tinyMCEPopup.executeOnLoad('onLoadInit();');document.getElementById('htmlSource').focus();" onresize="resizeInputs();" style="display: none">
  • trunk/wp-includes/js/tinymce/utils/form_utils.js

    r2993 r3163  
    111111
    112112function addClassesToList(list_id, specific_option) {
     113return;
    113114    // Setup class droplist
    114115    var styleSelectElm = document.getElementById(list_id);
Note: See TracChangeset for help on using the changeset viewer.