WordPress.org

Plugin Directory

Changeset 479677


Ignore:
Timestamp:
12/23/11 05:33:24 (2 years ago)
Author:
jakemgold
Message:
  • Connects table buttons row to kitchen sink
  • Optimized / cleaned up for 3.3
Location:
mce-table-buttons/trunk
Files:
1 added
1 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • mce-table-buttons/trunk/mce_table_buttons.php

    r365542 r479677  
    33 Plugin Name: MCE Table Buttons 
    44 Plugin URI: http://www.get10up.com/plugins-modules/wordpress-mce-table-buttons/ 
    5  Description: Add <strong>buttons for table editing</strong> to the WordPress WYSIWYG editor with this very <strong>light weight</strong> plug-in.     
    6  Version: 1.0.4 
    7  Author: Jake Goldman 
    8  Author URI: http://www.get10up.com 
     5 Description: Add <strong>buttons for table editing</strong> to the WordPress WYSIWYG editor with this <strong>light weight</strong> plug-in.     
     6 Version: 1.5 
     7 Author: Jake Goldman (10up LLC) 
     8 Author URI: http://get10up.com 
    99 
    1010    Plugin: Copyright 2011 Jake Goldman (email : jake@get10up.com) 
     
    2323    along with this program; if not, write to the Free Software 
    2424    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA 
     25     
     26    NOTE: Previous versions may have had their copyright incorrectly attributed  
     27    to employers of Mr. Goldman. The copyright belongs solely to Mr. Goldman, 
     28    personally. 
    2529*/ 
    2630 
    27 class mce_table_buttons  
    28 { 
    29     function __construct()  
    30     { 
     31class MCE_Table_Buttons { 
     32    public function __construct() { 
    3133        add_action( 'admin_init', array( $this, 'admin_init' ) ); 
    3234        add_action( 'content_save_pre', array( $this, 'content_save_pre'), 100 ); 
     35        add_action( 'admin_footer', array( $this, 'admin_footer' ), 100 ); 
    3336    } 
    3437     
    35     function admin_init() 
    36     { 
     38    public function admin_init() { 
    3739        add_filter( 'mce_external_plugins', array( $this, 'mce_external_plugins' ) ); 
    3840        add_filter( 'mce_buttons_3', array( $this, 'mce_buttons_3' ) ); 
    3941    } 
    4042     
    41     function mce_external_plugins( $plugin_array ) 
    42     { 
    43         if ( get_option('db_version') < 17056 ) // 17056 is WordPress 3.1 
    44             $plugin_array['table'] = plugin_dir_url( __FILE__ ) . 'table-old/editor_plugin.js'; 
    45         else  
    46             $plugin_array['table'] = plugin_dir_url( __FILE__ ) . 'table/editor_plugin.js'; 
    47          
     43    public function mce_external_plugins( $plugin_array ) { 
     44        $plugin_array['table'] = plugin_dir_url( __FILE__ ) . 'table/editor_plugin.js'; 
    4845        return $plugin_array; 
    4946    } 
    5047     
    51     function mce_buttons_3( $buttons ) 
    52     { 
     48    public function mce_buttons_3( $buttons ) { 
    5349        array_push( $buttons, 'tablecontrols' ); 
    5450        return $buttons; 
    5551    } 
    5652     
    57     function content_save_pre( $content ) 
    58     { 
     53    public function admin_footer() { 
     54        if ( ! wp_script_is( 'editor' ) ) 
     55            return;      
     56    ?> 
     57    <script type="text/javascript"> 
     58    jQuery(window).load(function(){  
     59        jQuery('.mceToolbarRow2').each(function(){ 
     60            if(!jQuery(this).is(':visible')) jQuery(this).siblings('.mceToolbarRow3').hide(); 
     61        }); 
     62        jQuery('.mce_wp_adv').click(function(){  
     63            var toolbar3 = jQuery(this).closest('table').siblings('.mceToolbarRow3'); 
     64            if ( jQuery(this).hasClass('mceButtonActive') ) toolbar3.show(); 
     65            else toolbar3.hide();  
     66        }); 
     67    }); 
     68    </script> 
     69    <?php 
     70    } 
     71     
     72    public function content_save_pre( $content ) { 
    5973        if ( substr( $content, -8 ) == '</table>' ) 
    6074            $content = $content . "\n<br />"; 
     
    6478} 
    6579 
    66 $mce_table_buttons = new mce_table_buttons; 
     80$mce_table_buttons = new MCE_Table_Buttons; 
  • mce-table-buttons/trunk/readme.txt

    r365542 r479677  
    11=== MCE Table Buttons === 
    2 Contributors: jakemgold, thinkoomph 
     2Contributors: jakemgold, 10up, thinkoomph 
    33Donate link: http://www.get10up.com/plugins-modules/wordpress-mce-table-buttons/ 
    44Tags: tables, table, editor, WYSIWYG, buttons, tinymce 
    5 Requires at least: 2.8 
    6 Tested up to: 3.1 
    7 Stable tag: 1.0.4 
     5Requires at least: 3.3 
     6Tested up to: 3.3 
     7Stable tag: 1.5 
    88 
    99Adds table editing buttons to a new, third row in the WordPress WYSIWYG editor. 
     
    1313Adds table editing buttons to a new, third row in the WordPress WYSIWYG editor. 
    1414 
    15 A very light weight plug-in based on a slightly modified version of the table editor plug-in included with the full version of TinyMCE 3.2.7. Only includes English localization; please let us know if you would like additional localizations added. Note that this should not be used with other plug-ins that significantly alter the editor's default behavior. It is intended to be a simple, light weight solution for editors who only want to add table management to WordPress' included editor. 
     15A very light weight plug-in based on a slightly modified version of the table editor plug-in included with the full version of TinyMCE. Only includes English localization; please let us know if you would like additional localizations added. Note that this should not be used with other plug-ins that significantly alter the editor's default behavior. It is intended to be a simple, light weight solution for editors who only want to add table management to WordPress' included editor. 
    1616 
    17 Hoping to add the ability to hide the new table editing toolbar with the "kitchen sink" option in a future  update. 
    18  
     17The third, editor toolbar is hidden or displayed along with the "kitchen sink." 
    1918 
    2019== Installation == 
     
    24231. Activate the plugin through the 'Plugins' menu in WordPress 
    2524 
    26  
    2725== Screenshots == 
    2826 
     
    3028 
    3129== Changelog == 
     30 
     31= 1.5 = 
     32* Table toolbar is hidden or displayed along with the kitchen sink (yay!) 
     33* Minor clean up to code base and files; optimized for WordPress 3.3 
    3234 
    3335= 1.0.4 = 
     
    4648= 1.0.1 = 
    4749* Fixed issue with WebKit browsers (Safari and Chrome) - TinyMCE bug 
     50 
     51== Upgrade Notice == 
     52 
     53= 1.5 = 
     54REQUIRES WordPress 3.3 or higher. Finally links table buttons row to kitchen sink! 
  • mce-table-buttons/trunk/table/cell.htm

    r365542 r479677  
    66    <script type="text/javascript" src="../../../../wp-includes/js/tinymce/utils/mctabs.js"></script> 
    77    <script type="text/javascript" src="../../../../wp-includes/js/tinymce/utils/form_utils.js"></script> 
     8    <script type="text/javascript" src="../../../../wp-includes/js/tinymce/utils/validate.js"></script> 
    89    <script type="text/javascript" src="../../../../wp-includes/js/tinymce/utils/editable_selects.js"></script> 
    910    <script type="text/javascript" src="js/cell.js"></script> 
    1011    <link href="css/cell.css" rel="stylesheet" type="text/css" /> 
    1112</head> 
    12 <body id="tablecell" style="display: none"> 
     13<body id="tablecell" style="display: none" role="application"> 
    1314    <form onsubmit="updateAction();return false;" action="#"> 
    1415        <div class="tabs"> 
    1516            <ul> 
    16                 <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li> 
    17                 <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li> 
     17                <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li> 
     18                <li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li> 
    1819            </ul> 
    1920        </div> 
     
    2425                    <legend>{#table_dlg.general_props}</legend> 
    2526 
    26                     <table border="0" cellpadding="4" cellspacing="0"> 
     27                    <table role="presentation" border="0" cellpadding="4" cellspacing="0"> 
    2728                        <tr> 
    2829                            <td><label for="align">{#table_dlg.align}</label></td> 
     
    7172                        <tr> 
    7273                            <td><label for="width">{#table_dlg.width}</label></td> 
    73                             <td><input id="width" name="width" type="text" value="" size="4" maxlength="4" onchange="changedSize();" /></td> 
     74                            <td><input id="width" name="width" type="text" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td> 
    7475 
    7576                            <td><label for="height">{#table_dlg.height}</label></td> 
    76                             <td><input id="height" name="height" type="text" value="" size="4" maxlength="4" onchange="changedSize();" /></td> 
     77                            <td><input id="height" name="height" type="text" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td> 
    7778                        </tr> 
    7879 
     
    9394                    <legend>{#table_dlg.advanced_props}</legend> 
    9495 
    95                     <table border="0" cellpadding="0" cellspacing="4"> 
     96                    <table role="presentation" border="0" cellpadding="0" cellspacing="4"> 
    9697                        <tr> 
    9798                            <td class="column1"><label for="id">{#table_dlg.id}</label></td>  
     
    125126                            <td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>  
    126127                            <td> 
    127                                 <table border="0" cellpadding="0" cellspacing="0"> 
     128                                <table role="presentation" border="0" cellpadding="0" cellspacing="0"> 
    128129                                    <tr> 
    129130                                        <td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td> 
     
    134135                        </tr> 
    135136 
    136                         <tr> 
    137                             <td class="column1"><label for="bordercolor">{#table_dlg.bordercolor}</label></td>  
     137                        <tr role="group" aria-labelledby="bordercolor_label"> 
     138                            <td class="column1"><label id="bordercolor_label" for="bordercolor">{#table_dlg.bordercolor}</label></td>  
    138139                            <td> 
    139                                 <table border="0" cellpadding="0" cellspacing="0"> 
     140                                <table role="presentation" border="0" cellpadding="0" cellspacing="0"> 
    140141                                    <tr> 
    141142                                        <td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td> 
     
    146147                        </tr> 
    147148 
    148                         <tr> 
    149                             <td class="column1"><label for="bgcolor">{#table_dlg.bgcolor}</label></td>  
     149                        <tr role="group" aria-labelledby="bgcolor_label"> 
     150                            <td class="column1"><label id="bgcolor_label" for="bgcolor">{#table_dlg.bgcolor}</label></td>  
    150151                            <td> 
    151                                 <table border="0" cellpadding="0" cellspacing="0"> 
     152                                <table role="presentation" border="0" cellpadding="0" cellspacing="0"> 
    152153                                    <tr> 
    153154                                        <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td> 
     
    167168                    <option value="cell">{#table_dlg.cell_cell}</option> 
    168169                    <option value="row">{#table_dlg.cell_row}</option> 
     170                    <option value="col">{#table_dlg.cell_col}</option> 
    169171                    <option value="all">{#table_dlg.cell_all}</option> 
    170172                </select> 
  • mce-table-buttons/trunk/table/editor_plugin.js

    r365542 r479677  
    1 (function(c){var d=c.each;function b(f,g){var h=g.ownerDocument,e=h.createRange(),j;e.setStartBefore(g);e.setEnd(f.endContainer,f.endOffset);j=h.createElement("body");j.appendChild(e.cloneContents());return j.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length==0}function a(G,F,J){var f,K,C,o;s();o=F.getParent(J.getStart(),"th,td");if(o){K=E(o);C=H();o=w(K.x,K.y)}function z(M,L){M=M.cloneNode(L);M.removeAttribute("id");return M}function s(){var L=0;f=[];d(["thead","tbody","tfoot"],function(M){var N=F.select("> "+M+" tr",G);d(N,function(O,P){P+=L;d(F.select("> td, > th",O),function(V,Q){var R,S,T,U;if(f[P]){while(f[P][Q]){Q++}}T=h(V,"rowspan");U=h(V,"colspan");for(S=P;S<P+T;S++){if(!f[S]){f[S]=[]}for(R=Q;R<Q+U;R++){f[S][R]={part:M,real:S==P&&R==Q,elm:V,rowspan:T,colspan:U}}}})});L+=N.length})}function w(L,N){var M;M=f[N];if(M){return M[L]}}function h(M,L){return parseInt(M.getAttribute(L)||1)}function j(L){return F.hasClass(L.elm,"mceSelected")||L==o}function k(){var L=[];d(G.rows,function(M){d(M.cells,function(N){if(F.hasClass(N,"mceSelected")||N==o.elm){L.push(M);return false}})});return L}function r(){var L=F.createRng();L.setStartAfter(G);L.setEndAfter(G);J.setRng(L);F.remove(G)}function e(L){var M;c.walk(L,function(O){var N;if(O.nodeType==3){d(F.getParents(O.parentNode,null,L).reverse(),function(P){P=z(P,false);if(!M){M=N=P}else{if(N){N.appendChild(P)}}N=P});if(N){N.innerHTML=c.isIE?"&nbsp;":'<br _mce_bogus="1" />'}return false}},"childNodes");L=z(L,false);L.rowSpan=L.colSpan=1;if(M){L.appendChild(M)}else{if(!c.isIE){L.innerHTML='<br _mce_bogus="1" />'}}return L}function q(){var L=F.createRng();d(F.select("tr",G),function(M){if(M.cells.length==0){F.remove(M)}});if(F.select("tr",G).length==0){L.setStartAfter(G);L.setEndAfter(G);J.setRng(L);F.remove(G);return}d(F.select("thead,tbody,tfoot",G),function(M){if(M.rows.length==0){F.remove(M)}});s();row=f[Math.min(f.length-1,K.y)];if(row){J.select(row[Math.min(row.length-1,K.x)].elm,true);J.collapse(true)}}function t(R,P,T,Q){var O,M,L,N,S;O=f[P][R].elm.parentNode;for(L=1;L<=T;L++){O=F.getNext(O,"tr");if(O){for(M=R;M>=0;M--){S=f[P+L][M].elm;if(S.parentNode==O){for(N=1;N<=Q;N++){F.insertAfter(e(S),S)}break}}if(M==-1){for(N=1;N<=Q;N++){O.insertBefore(e(O.cells[0]),O.cells[0])}}}}}function B(){d(f,function(L,M){d(L,function(O,N){var R,Q,S,P;if(j(O)){O=O.elm;R=h(O,"colspan");Q=h(O,"rowspan");if(R>1||Q>1){O.colSpan=O.rowSpan=1;for(P=0;P<R-1;P++){F.insertAfter(e(O),O)}t(N,M,Q-1,R)}}})})}function p(T,Q,W){var O,N,V,U,S,P,R,L,T,M;if(T){pos=E(T);O=pos.x;N=pos.y;V=O+(Q-1);U=N+(W-1)}else{O=K.x;N=K.y;V=C.x;U=C.y}R=w(O,N);L=w(V,U);if(R&&L&&R.part==L.part){B();s();R=w(O,N).elm;R.colSpan=(V-O)+1;R.rowSpan=(U-N)+1;for(P=N;P<=U;P++){for(S=O;S<=V;S++){T=f[P][S].elm;if(T!=R){M=c.grep(T.childNodes);d(M,function(Y,X){if(Y.nodeName!="BR"||X!=M.length-1){R.appendChild(Y)}});F.remove(T)}}}q()}}function l(O){var L,Q,N,P,R,S,M,T;d(f,function(U,V){d(U,function(X,W){if(j(X)){X=X.elm;R=X.parentNode;S=z(R,false);L=V;if(O){return false}}});if(O){return !L}});for(P=0;P<f[0].length;P++){Q=f[L][P].elm;if(Q!=N){if(!O){rowSpan=h(Q,"rowspan");if(rowSpan>1){Q.rowSpan=rowSpan+1;continue}}else{if(L>0&&f[L-1][P]){T=f[L-1][P].elm;rowSpan=h(T,"rowspan");if(rowSpan>1){T.rowSpan=rowSpan+1;continue}}}M=e(Q);M.colSpan=Q.colSpan;S.appendChild(M);N=Q}}if(S.hasChildNodes()){if(!O){F.insertAfter(S,R)}else{R.parentNode.insertBefore(S,R)}}}function g(M){var N,L;d(f,function(O,P){d(O,function(R,Q){if(j(R)){N=Q;if(M){return false}}});if(M){return !N}});d(f,function(R,S){var O=R[N].elm,P,Q;if(O!=L){Q=h(O,"colspan");P=h(O,"rowspan");if(Q==1){if(!M){F.insertAfter(e(O),O);t(N,S,P-1,Q)}else{O.parentNode.insertBefore(e(O),O);t(N,S,P-1,Q)}}else{O.colSpan++}L=O}})}function n(){var L=[];d(f,function(M,N){d(M,function(P,O){if(j(P)&&c.inArray(L,O)===-1){d(f,function(S){var Q=S[O].elm,R;R=h(Q,"colspan");if(R>1){Q.colSpan=R-1}else{F.remove(Q)}});L.push(O)}})});q()}function m(){var M;function L(P){var O,Q,N;O=F.getNext(P,"tr");d(P.cells,function(R){var S=h(R,"rowspan");if(S>1){R.rowSpan=S-1;Q=E(R);t(Q.x,Q.y,1,1)}});Q=E(P.cells[0]);d(f[Q.y],function(R){var S;R=R.elm;if(R!=N){S=h(R,"rowspan");if(S<=1){F.remove(R)}else{R.rowSpan=S-1}N=R}})}M=k();d(M.reverse(),function(N){L(N)});q()}function D(){var L=k();F.remove(L);q();return L}function I(){var L=k();d(L,function(N,M){L[M]=z(N,true)});return L}function A(N,M){var O=k(),L=O[M?0:O.length-1],P=L.cells.length;d(f,function(R){var Q;P=0;d(R,function(T,S){if(T.real){P+=T.colspan}if(T.elm.parentNode==L){Q=1}});if(Q){return false}});if(!M){N.reverse()}d(N,function(S){var R=S.cells.length,Q;for(i=0;i<R;i++){Q=S.cells[i];Q.colSpan=Q.rowSpan=1}for(i=R;i<P;i++){S.appendChild(e(S.cells[R-1]))}for(i=P;i<R;i++){F.remove(S.cells[i])}if(M){L.parentNode.insertBefore(S,L)}else{F.insertAfter(S,L)}})}function E(L){var M;d(f,function(N,O){d(N,function(Q,P){if(Q.elm==L){M={x:P,y:O};return false}});return !M});return M}function v(L){K=E(L)}function H(){var N,M,L;M=L=0;d(f,function(O,P){d(O,function(R,Q){var T,S;if(j(R)){R=f[P][Q];if(Q>M){M=Q}if(P>L){L=P}if(R.real){T=R.colspan-1;S=R.rowspan-1;if(T){if(Q+T>M){M=Q+T}}if(S){if(P+S>L){L=P+S}}}}})});return{x:M,y:L}}function u(R){var O,N,T,S,M,L,P,Q;C=E(R);if(K&&C){O=Math.min(K.x,C.x);N=Math.min(K.y,C.y);T=Math.max(K.x,C.x);S=Math.max(K.y,C.y);M=T;L=S;for(y=N;y<=L;y++){R=f[y][O];if(!R.real){if(O-(R.colspan-1)<O){O-=R.colspan-1}}}for(x=O;x<=M;x++){R=f[N][x];if(!R.real){if(N-(R.rowspan-1)<N){N-=R.rowspan-1}}}for(y=N;y<=S;y++){for(x=O;x<=T;x++){R=f[y][x];if(R.real){P=R.colspan-1;Q=R.rowspan-1;if(P){if(x+P>M){M=x+P}}if(Q){if(y+Q>L){L=y+Q}}}}}F.removeClass(F.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=N;y<=L;y++){for(x=O;x<=M;x++){F.addClass(f[y][x].elm,"mceSelected")}}}}c.extend(this,{deleteTable:r,split:B,merge:p,insertRow:l,insertCol:g,deleteCols:n,deleteRows:m,cutRows:D,copyRows:I,pasteRows:A,getPos:E,setStartCell:v,setEndCell:u})}c.create("tinymce.plugins.TablePlugin",{init:function(f,g){var e,k;function j(n){var m=f.selection,l=f.dom.getParent(n||m.getNode(),"table");if(l){return new a(l,f.dom,m)}}function h(){f.getBody().style.webkitUserSelect="";f.dom.removeClass(f.dom.select("td.mceSelected,th.mceSelected"),"mceSelected")}d([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(l){f.addButton(l[0],{title:l[1],cmd:l[2],ui:l[3]})});if(!c.isIE){f.onClick.add(function(l,m){m=m.target;if(m.nodeName==="TABLE"){l.selection.select(m)}})}f.onNodeChange.add(function(m,l,q){var o;q=m.selection.getStart();o=m.dom.getParent(q,"td,th,caption");l.setActive("table",q.nodeName==="TABLE"||!!o);if(o&&o.nodeName==="CAPTION"){o=0}l.setDisabled("delete_table",!o);l.setDisabled("delete_col",!o);l.setDisabled("delete_table",!o);l.setDisabled("delete_row",!o);l.setDisabled("col_after",!o);l.setDisabled("col_before",!o);l.setDisabled("row_after",!o);l.setDisabled("row_before",!o);l.setDisabled("row_props",!o);l.setDisabled("cell_props",!o);l.setDisabled("split_cells",!o);l.setDisabled("merge_cells",!o)});f.onInit.add(function(m){var l,p,q=m.dom,n;e=m.windowManager;m.onMouseDown.add(function(r,s){if(s.button!=2){h();p=q.getParent(s.target,"td,th");l=q.getParent(p,"table")}});q.bind(m.getDoc(),"mouseover",function(u){var s,r,t=u.target;if(p&&(n||t!=p)&&(t.nodeName=="TD"||t.nodeName=="TH")){r=q.getParent(t,"table");if(r==l){if(!n){n=j(r);n.setStartCell(p);m.getBody().style.webkitUserSelect="none"}n.setEndCell(t)}s=m.selection.getSel();if(s.removeAllRanges){s.removeAllRanges()}else{s.empty()}u.preventDefault()}});m.onMouseUp.add(function(A,B){var s,u=A.selection,C,D=u.getSel(),r,v,t,z;if(p){if(n){A.getBody().style.webkitUserSelect=""}function w(E,G){var F=new c.dom.TreeWalker(E,E);do{if(E.nodeType==3&&c.trim(E.nodeValue).length!=0){if(G){s.setStart(E,0)}else{s.setEnd(E,E.nodeValue.length)}return}if(E.nodeName=="BR"){if(G){s.setStartBefore(E)}else{s.setEndBefore(E)}return}}while(E=(G?F.next():F.prev()))}C=q.select("td.mceSelected,th.mceSelected");if(C.length>0){s=q.createRng();v=C[0];z=C[C.length-1];w(v,1);r=new c.dom.TreeWalker(v,q.getParent(C[0],"table"));do{if(v.nodeName=="TD"||v.nodeName=="TH"){if(!q.hasClass(v,"mceSelected")){break}t=v}}while(v=r.next());w(t);u.setRng(s)}A.nodeChanged();p=n=l=null}});m.onKeyUp.add(function(r,s){h()});if(m&&m.plugins.contextmenu){m.plugins.contextmenu.onContextMenu.add(function(t,r,v){var w,u=m.selection,s=u.getNode()||m.getBody();if(m.dom.getParent(v,"td")||m.dom.getParent(v,"th")||m.dom.select("td.mceSelected,th.mceSelected").length){r.removeAll();if(s.nodeName=="A"&&!m.dom.getAttrib(s,"name")){r.add({title:"advanced.link_desc",icon:"link",cmd:m.plugins.advlink?"mceAdvLink":"mceLink",ui:true});r.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});r.addSeparator()}if(s.nodeName=="IMG"&&s.className.indexOf("mceItem")==-1){r.add({title:"advanced.image_desc",icon:"image",cmd:m.plugins.advimage?"mceAdvImage":"mceImage",ui:true});r.addSeparator()}r.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});r.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});r.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});r.addSeparator();w=r.addMenu({title:"table.cell"});w.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});w.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});w.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});w=r.addMenu({title:"table.row"});w.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});w.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});w.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});w.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});w.addSeparator();w.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});w.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});w.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!k);w.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!k);w=r.addMenu({title:"table.col"});w.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});w.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});w.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{r.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(!c.isIE){function o(){var r;for(r=m.getBody().lastChild;r&&r.nodeType==3&&!r.nodeValue.length;r=r.previousSibling){}if(r&&r.nodeName=="TABLE"){m.dom.add(m.getBody(),"p",null,'<br mce_bogus="1" />')}}if(c.isGecko){m.onKeyDown.add(function(s,u){var r,t,v=s.dom;if(u.keyCode==37||u.keyCode==38){r=s.selection.getRng();t=v.getParent(r.startContainer,"table");if(t&&s.getBody().firstChild==t){if(b(r,t)){r=v.createRng();r.setStartBefore(t);r.setEndBefore(t);s.selection.setRng(r);u.preventDefault()}}}})}m.onKeyUp.add(o);m.onSetContent.add(o);m.onVisualAid.add(o);m.onPreProcess.add(function(r,t){var s=t.node.lastChild;if(s&&s.childNodes.length==1&&s.firstChild.nodeName=="BR"){r.dom.remove(s)}});o()}});d({mceTableSplitCells:function(l){l.split()},mceTableMergeCells:function(m){var n,o,l;l=f.dom.getParent(f.selection.getNode(),"th,td");if(l){n=l.rowSpan;o=l.colSpan}if(!f.dom.select("td.mceSelected,th.mceSelected").length){e.open({url:g+"/merge_cells.htm",width:240+parseInt(f.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(f.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:n,cols:o,onaction:function(p){m.merge(l,p.cols,p.rows)},plugin_url:g})}else{m.merge()}},mceTableInsertRowBefore:function(l){l.insertRow(true)},mceTableInsertRowAfter:function(l){l.insertRow()},mceTableInsertColBefore:function(l){l.insertCol(true)},mceTableInsertColAfter:function(l){l.insertCol()},mceTableDeleteCol:function(l){l.deleteCols()},mceTableDeleteRow:function(l){l.deleteRows()},mceTableCutRow:function(l){k=l.cutRows()},mceTableCopyRow:function(l){k=l.copyRows()},mceTablePasteRowBefore:function(l){l.pasteRows(k,true)},mceTablePasteRowAfter:function(l){l.pasteRows(k)},mceTableDelete:function(l){l.deleteTable()}},function(m,l){f.addCommand(l,function(){var n=j();if(n){m(n);f.execCommand("mceRepaint");h()}})});d({mceInsertTable:function(l){e.open({url:g+"/table.htm",width:400+parseInt(f.getLang("table.table_delta_width",0)),height:320+parseInt(f.getLang("table.table_delta_height",0)),inline:1},{plugin_url:g,action:l?l.action:0})},mceTableRowProps:function(){e.open({url:g+"/row.htm",width:400+parseInt(f.getLang("table.rowprops_delta_width",0)),height:295+parseInt(f.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:g})},mceTableCellProps:function(){e.open({url:g+"/cell.htm",width:400+parseInt(f.getLang("table.cellprops_delta_width",0)),height:295+parseInt(f.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:g})}},function(m,l){f.addCommand(l,function(n,o){m(o)})})}});c.PluginManager.add("table",c.plugins.TablePlugin)})(tinymce); 
     1(function(d){var e=d.each;function c(g,h){var j=h.ownerDocument,f=j.createRange(),k;f.setStartBefore(h);f.setEnd(g.endContainer,g.endOffset);k=j.createElement("body");k.appendChild(f.cloneContents());return k.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length==0}function a(g,f){return parseInt(g.getAttribute(f)||1)}function b(H,G,K){var g,L,D,o;t();o=G.getParent(K.getStart(),"th,td");if(o){L=F(o);D=I();o=z(L.x,L.y)}function A(N,M){N=N.cloneNode(M);N.removeAttribute("id");return N}function t(){var M=0;g=[];e(["thead","tbody","tfoot"],function(N){var O=G.select("> "+N+" tr",H);e(O,function(P,Q){Q+=M;e(G.select("> td, > th",P),function(W,R){var S,T,U,V;if(g[Q]){while(g[Q][R]){R++}}U=a(W,"rowspan");V=a(W,"colspan");for(T=Q;T<Q+U;T++){if(!g[T]){g[T]=[]}for(S=R;S<R+V;S++){g[T][S]={part:N,real:T==Q&&S==R,elm:W,rowspan:U,colspan:V}}}})});M+=O.length})}function z(M,O){var N;N=g[O];if(N){return N[M]}}function s(O,M,N){if(O){N=parseInt(N);if(N===1){O.removeAttribute(M,1)}else{O.setAttribute(M,N,1)}}}function j(M){return M&&(G.hasClass(M.elm,"mceSelected")||M==o)}function k(){var M=[];e(H.rows,function(N){e(N.cells,function(O){if(G.hasClass(O,"mceSelected")||O==o.elm){M.push(N);return false}})});return M}function r(){var M=G.createRng();M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H)}function f(M){var N;d.walk(M,function(P){var O;if(P.nodeType==3){e(G.getParents(P.parentNode,null,M).reverse(),function(Q){Q=A(Q,false);if(!N){N=O=Q}else{if(O){O.appendChild(Q)}}O=Q});if(O){O.innerHTML=d.isIE?"&nbsp;":'<br data-mce-bogus="1" />'}return false}},"childNodes");M=A(M,false);s(M,"rowSpan",1);s(M,"colSpan",1);if(N){M.appendChild(N)}else{if(!d.isIE){M.innerHTML='<br data-mce-bogus="1" />'}}return M}function q(){var M=G.createRng();e(G.select("tr",H),function(N){if(N.cells.length==0){G.remove(N)}});if(G.select("tr",H).length==0){M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H);return}e(G.select("thead,tbody,tfoot",H),function(N){if(N.rows.length==0){G.remove(N)}});t();row=g[Math.min(g.length-1,L.y)];if(row){K.select(row[Math.min(row.length-1,L.x)].elm,true);K.collapse(true)}}function u(S,Q,U,R){var P,N,M,O,T;P=g[Q][S].elm.parentNode;for(M=1;M<=U;M++){P=G.getNext(P,"tr");if(P){for(N=S;N>=0;N--){T=g[Q+M][N].elm;if(T.parentNode==P){for(O=1;O<=R;O++){G.insertAfter(f(T),T)}break}}if(N==-1){for(O=1;O<=R;O++){P.insertBefore(f(P.cells[0]),P.cells[0])}}}}}function C(){e(g,function(M,N){e(M,function(P,O){var S,R,T,Q;if(j(P)){P=P.elm;S=a(P,"colspan");R=a(P,"rowspan");if(S>1||R>1){s(P,"rowSpan",1);s(P,"colSpan",1);for(Q=0;Q<S-1;Q++){G.insertAfter(f(P),P)}u(O,N,R-1,S)}}})})}function p(V,S,Y){var P,O,X,W,U,R,T,M,V,N,Q;if(V){pos=F(V);P=pos.x;O=pos.y;X=P+(S-1);W=O+(Y-1)}else{P=L.x;O=L.y;X=D.x;W=D.y}T=z(P,O);M=z(X,W);if(T&&M&&T.part==M.part){C();t();T=z(P,O).elm;s(T,"colSpan",(X-P)+1);s(T,"rowSpan",(W-O)+1);for(R=O;R<=W;R++){for(U=P;U<=X;U++){if(!g[R]||!g[R][U]){continue}V=g[R][U].elm;if(V!=T){N=d.grep(V.childNodes);e(N,function(Z){T.appendChild(Z)});if(N.length){N=d.grep(T.childNodes);Q=0;e(N,function(Z){if(Z.nodeName=="BR"&&G.getAttrib(Z,"data-mce-bogus")&&Q++<N.length-1){T.removeChild(Z)}})}G.remove(V)}}}q()}}function l(Q){var M,S,P,R,T,U,N,V,O;e(g,function(W,X){e(W,function(Z,Y){if(j(Z)){Z=Z.elm;T=Z.parentNode;U=A(T,false);M=X;if(Q){return false}}});if(Q){return !M}});for(R=0;R<g[0].length;R++){if(!g[M][R]){continue}S=g[M][R].elm;if(S!=P){if(!Q){O=a(S,"rowspan");if(O>1){s(S,"rowSpan",O+1);continue}}else{if(M>0&&g[M-1][R]){V=g[M-1][R].elm;O=a(V,"rowSpan");if(O>1){s(V,"rowSpan",O+1);continue}}}N=f(S);s(N,"colSpan",S.colSpan);U.appendChild(N);P=S}}if(U.hasChildNodes()){if(!Q){G.insertAfter(U,T)}else{T.parentNode.insertBefore(U,T)}}}function h(N){var O,M;e(g,function(P,Q){e(P,function(S,R){if(j(S)){O=R;if(N){return false}}});if(N){return !O}});e(g,function(S,T){var P,Q,R;if(!S[O]){return}P=S[O].elm;if(P!=M){R=a(P,"colspan");Q=a(P,"rowspan");if(R==1){if(!N){G.insertAfter(f(P),P);u(O,T,Q-1,R)}else{P.parentNode.insertBefore(f(P),P);u(O,T,Q-1,R)}}else{s(P,"colSpan",P.colSpan+1)}M=P}})}function n(){var M=[];e(g,function(N,O){e(N,function(Q,P){if(j(Q)&&d.inArray(M,P)===-1){e(g,function(T){var R=T[P].elm,S;S=a(R,"colSpan");if(S>1){s(R,"colSpan",S-1)}else{G.remove(R)}});M.push(P)}})});q()}function m(){var N;function M(Q){var P,R,O;P=G.getNext(Q,"tr");e(Q.cells,function(S){var T=a(S,"rowSpan");if(T>1){s(S,"rowSpan",T-1);R=F(S);u(R.x,R.y,1,1)}});R=F(Q.cells[0]);e(g[R.y],function(S){var T;S=S.elm;if(S!=O){T=a(S,"rowSpan");if(T<=1){G.remove(S)}else{s(S,"rowSpan",T-1)}O=S}})}N=k();e(N.reverse(),function(O){M(O)});q()}function E(){var M=k();G.remove(M);q();return M}function J(){var M=k();e(M,function(O,N){M[N]=A(O,true)});return M}function B(O,N){var P=k(),M=P[N?0:P.length-1],Q=M.cells.length;e(g,function(S){var R;Q=0;e(S,function(U,T){if(U.real){Q+=U.colspan}if(U.elm.parentNode==M){R=1}});if(R){return false}});if(!N){O.reverse()}e(O,function(T){var S=T.cells.length,R;for(i=0;i<S;i++){R=T.cells[i];s(R,"colSpan",1);s(R,"rowSpan",1)}for(i=S;i<Q;i++){T.appendChild(f(T.cells[S-1]))}for(i=Q;i<S;i++){G.remove(T.cells[i])}if(N){M.parentNode.insertBefore(T,M)}else{G.insertAfter(T,M)}})}function F(M){var N;e(g,function(O,P){e(O,function(R,Q){if(R.elm==M){N={x:Q,y:P};return false}});return !N});return N}function w(M){L=F(M)}function I(){var O,N,M;N=M=0;e(g,function(P,Q){e(P,function(S,R){var U,T;if(j(S)){S=g[Q][R];if(R>N){N=R}if(Q>M){M=Q}if(S.real){U=S.colspan-1;T=S.rowspan-1;if(U){if(R+U>N){N=R+U}}if(T){if(Q+T>M){M=Q+T}}}}})});return{x:N,y:M}}function v(S){var P,O,U,T,N,M,Q,R;D=F(S);if(L&&D){P=Math.min(L.x,D.x);O=Math.min(L.y,D.y);U=Math.max(L.x,D.x);T=Math.max(L.y,D.y);N=U;M=T;for(y=O;y<=M;y++){S=g[y][P];if(!S.real){if(P-(S.colspan-1)<P){P-=S.colspan-1}}}for(x=P;x<=N;x++){S=g[O][x];if(!S.real){if(O-(S.rowspan-1)<O){O-=S.rowspan-1}}}for(y=O;y<=T;y++){for(x=P;x<=U;x++){S=g[y][x];if(S.real){Q=S.colspan-1;R=S.rowspan-1;if(Q){if(x+Q>N){N=x+Q}}if(R){if(y+R>M){M=y+R}}}}}G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=O;y<=M;y++){for(x=P;x<=N;x++){if(g[y][x]){G.addClass(g[y][x].elm,"mceSelected")}}}}}d.extend(this,{deleteTable:r,split:C,merge:p,insertRow:l,insertCol:h,deleteCols:n,deleteRows:m,cutRows:E,copyRows:J,pasteRows:B,getPos:F,setStartCell:w,setEndCell:v})}d.create("tinymce.plugins.TablePlugin",{init:function(g,h){var f,m,j=true;function l(p){var o=g.selection,n=g.dom.getParent(p||o.getNode(),"table");if(n){return new b(n,g.dom,o)}}function k(){g.getBody().style.webkitUserSelect="";if(j){g.dom.removeClass(g.dom.select("td.mceSelected,th.mceSelected"),"mceSelected");j=false}}e([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(n){g.addButton(n[0],{title:n[1],cmd:n[2],ui:n[3]})});if(!d.isIE){g.onClick.add(function(n,o){o=o.target;if(o.nodeName==="TABLE"){n.selection.select(o);n.nodeChanged()}})}g.onPreProcess.add(function(o,p){var n,q,r,t=o.dom,s;n=t.select("table",p.node);q=n.length;while(q--){r=n[q];t.setAttrib(r,"data-mce-style","");if((s=t.getAttrib(r,"width"))){t.setStyle(r,"width",s);t.setAttrib(r,"width","")}if((s=t.getAttrib(r,"height"))){t.setStyle(r,"height",s);t.setAttrib(r,"height","")}}});g.onNodeChange.add(function(q,o,s){var r;s=q.selection.getStart();r=q.dom.getParent(s,"td,th,caption");o.setActive("table",s.nodeName==="TABLE"||!!r);if(r&&r.nodeName==="CAPTION"){r=0}o.setDisabled("delete_table",!r);o.setDisabled("delete_col",!r);o.setDisabled("delete_table",!r);o.setDisabled("delete_row",!r);o.setDisabled("col_after",!r);o.setDisabled("col_before",!r);o.setDisabled("row_after",!r);o.setDisabled("row_before",!r);o.setDisabled("row_props",!r);o.setDisabled("cell_props",!r);o.setDisabled("split_cells",!r);o.setDisabled("merge_cells",!r)});g.onInit.add(function(r){var p,t,q=r.dom,u;f=r.windowManager;r.onMouseDown.add(function(w,z){if(z.button!=2){k();t=q.getParent(z.target,"td,th");p=q.getParent(t,"table")}});q.bind(r.getDoc(),"mouseover",function(C){var A,z,B=C.target;if(t&&(u||B!=t)&&(B.nodeName=="TD"||B.nodeName=="TH")){z=q.getParent(B,"table");if(z==p){if(!u){u=l(z);u.setStartCell(t);r.getBody().style.webkitUserSelect="none"}u.setEndCell(B);j=true}A=r.selection.getSel();try{if(A.removeAllRanges){A.removeAllRanges()}else{A.empty()}}catch(w){}C.preventDefault()}});r.onMouseUp.add(function(F,G){var z,B=F.selection,H,I=B.getSel(),w,C,A,E;if(t){if(u){F.getBody().style.webkitUserSelect=""}function D(J,L){var K=new d.dom.TreeWalker(J,J);do{if(J.nodeType==3&&d.trim(J.nodeValue).length!=0){if(L){z.setStart(J,0)}else{z.setEnd(J,J.nodeValue.length)}return}if(J.nodeName=="BR"){if(L){z.setStartBefore(J)}else{z.setEndBefore(J)}return}}while(J=(L?K.next():K.prev()))}H=q.select("td.mceSelected,th.mceSelected");if(H.length>0){z=q.createRng();C=H[0];E=H[H.length-1];z.setStartBefore(C);z.setEndAfter(C);D(C,1);w=new d.dom.TreeWalker(C,q.getParent(H[0],"table"));do{if(C.nodeName=="TD"||C.nodeName=="TH"){if(!q.hasClass(C,"mceSelected")){break}A=C}}while(C=w.next());D(A);B.setRng(z)}F.nodeChanged();t=u=p=null}});r.onKeyUp.add(function(w,z){k()});r.onKeyDown.add(function(w,z){n(w)});r.onMouseDown.add(function(w,z){if(z.button!=2){n(w)}});function o(D,z,A,F){var B=3,G=D.dom.getParent(z.startContainer,"TABLE"),C,w,E;if(G){C=G.parentNode}w=z.startContainer.nodeType==B&&z.startOffset==0&&z.endOffset==0&&F&&(A.nodeName=="TR"||A==C);E=(A.nodeName=="TD"||A.nodeName=="TH")&&!F;return w||E}function n(A){if(!d.isWebKit){return}var z=A.selection.getRng();var C=A.selection.getNode();var B=A.dom.getParent(z.startContainer,"TD");if(!o(A,z,C,B)){return}if(!B){B=C}var w=B.lastChild;while(w.lastChild){w=w.lastChild}z.setEnd(w,w.nodeValue.length);A.selection.setRng(z)}r.plugins.table.fixTableCellSelection=n;if(r&&r.plugins.contextmenu){r.plugins.contextmenu.onContextMenu.add(function(A,w,C){var D,B=r.selection,z=B.getNode()||r.getBody();if(r.dom.getParent(C,"td")||r.dom.getParent(C,"th")||r.dom.select("td.mceSelected,th.mceSelected").length){w.removeAll();if(z.nodeName=="A"&&!r.dom.getAttrib(z,"name")){w.add({title:"advanced.link_desc",icon:"link",cmd:r.plugins.advlink?"mceAdvLink":"mceLink",ui:true});w.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});w.addSeparator()}if(z.nodeName=="IMG"&&z.className.indexOf("mceItem")==-1){w.add({title:"advanced.image_desc",icon:"image",cmd:r.plugins.advimage?"mceAdvImage":"mceImage",ui:true});w.addSeparator()}w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});w.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});w.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});w.addSeparator();D=w.addMenu({title:"table.cell"});D.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});D.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});D.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});D=w.addMenu({title:"table.row"});D.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});D.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});D.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});D.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});D.addSeparator();D.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});D.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});D.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!m);D.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!m);D=w.addMenu({title:"table.col"});D.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});D.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});D.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(d.isWebKit){function v(B,M){function F(Q){B.selection.setCursorLocation(Q,0)}function H(R,Q){return R.keyCode==z?Q.previousSibling:Q.nextSibling}function G(R,S){var Q=H(R,S);return Q!==null&&Q.tagName==="TR"?Q:null}function C(Q,R){return Q.dom.getParent(R,"table")}function O(Q){var R=C(B,Q);return H(M,R)}function A(Q){return Q.keyCode==z||Q.keyCode==I}function D(Q){var S=Q.selection.getNode();var R=Q.dom.getParent(S,"tr");return R!==null}function N(R){var Q=0;var S=R;while(S.previousSibling){S=S.previousSibling;Q=Q+a(S,"colspan")}return Q}function E(S,Q){var T=0;var R=0;e(S.children,function(U,V){T=T+a(U,"colspan");R=V;if(T>Q){return false}});return R}function w(S,T,V){var U=N(S.dom.getParent(T,"td,th"));var R=E(V,U);var Q=V.childNodes[R];F(Q)}function L(R,T){var Q=O(R);if(Q!==null){F(Q);return d.dom.Event.cancel(T)}else{var S=T.keyCode==z?R.firstChild:R.lastChild;F(S);return true}}var z=38;var I=40;if(A(M)&&D(B)){var J=B.selection.getNode();var P=B.dom.getParent(J,"tr");var K=G(M,P);if(K==null){return L(P,M)}else{w(B,J,K);d.dom.Event.cancel(M);return true}}}r.onKeyDown.add(v)}if(!d.isIE){function s(){var w;for(w=r.getBody().lastChild;w&&w.nodeType==3&&!w.nodeValue.length;w=w.previousSibling){}if(w&&w.nodeName=="TABLE"){r.dom.add(r.getBody(),"p",null,'<br mce_bogus="1" />')}}if(d.isGecko){r.onKeyDown.add(function(z,B){var w,A,C=z.dom;if(B.keyCode==37||B.keyCode==38){w=z.selection.getRng();A=C.getParent(w.startContainer,"table");if(A&&z.getBody().firstChild==A){if(c(w,A)){w=C.createRng();w.setStartBefore(A);w.setEndBefore(A);z.selection.setRng(w);B.preventDefault()}}}})}r.onKeyUp.add(s);r.onSetContent.add(s);r.onVisualAid.add(s);r.onPreProcess.add(function(w,A){var z=A.node.lastChild;if(z&&z.childNodes.length==1&&z.firstChild.nodeName=="BR"){w.dom.remove(z)}});s();r.startContent=r.getContent({format:"raw"})}});e({mceTableSplitCells:function(n){n.split()},mceTableMergeCells:function(o){var p,q,n;n=g.dom.getParent(g.selection.getNode(),"th,td");if(n){p=n.rowSpan;q=n.colSpan}if(!g.dom.select("td.mceSelected,th.mceSelected").length){f.open({url:h+"/merge_cells.htm",width:240+parseInt(g.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(g.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:p,cols:q,onaction:function(r){o.merge(n,r.cols,r.rows)},plugin_url:h})}else{o.merge()}},mceTableInsertRowBefore:function(n){n.insertRow(true)},mceTableInsertRowAfter:function(n){n.insertRow()},mceTableInsertColBefore:function(n){n.insertCol(true)},mceTableInsertColAfter:function(n){n.insertCol()},mceTableDeleteCol:function(n){n.deleteCols()},mceTableDeleteRow:function(n){n.deleteRows()},mceTableCutRow:function(n){m=n.cutRows()},mceTableCopyRow:function(n){m=n.copyRows()},mceTablePasteRowBefore:function(n){n.pasteRows(m,true)},mceTablePasteRowAfter:function(n){n.pasteRows(m)},mceTableDelete:function(n){n.deleteTable()}},function(o,n){g.addCommand(n,function(){var p=l();if(p){o(p);g.execCommand("mceRepaint");k()}})});e({mceInsertTable:function(n){f.open({url:h+"/table.htm",width:400+parseInt(g.getLang("table.table_delta_width",0)),height:320+parseInt(g.getLang("table.table_delta_height",0)),inline:1},{plugin_url:h,action:n?n.action:0})},mceTableRowProps:function(){f.open({url:h+"/row.htm",width:400+parseInt(g.getLang("table.rowprops_delta_width",0)),height:295+parseInt(g.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:h})},mceTableCellProps:function(){f.open({url:h+"/cell.htm",width:400+parseInt(g.getLang("table.cellprops_delta_width",0)),height:295+parseInt(g.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:h})}},function(o,n){g.addCommand(n,function(p,q){o(q)})})}});d.PluginManager.add("table",d.plugins.TablePlugin)})(tinymce); 
  • mce-table-buttons/trunk/table/js/cell.js

    r365542 r479677  
    6464    var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0]; 
    6565 
     66    if (!AutoValidator.validate(formObj)) { 
     67        tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.'); 
     68        return false; 
     69    } 
     70 
    6671    tinyMCEPopup.restoreSelection(); 
    6772    el = ed.selection.getStart(); 
     
    8489    } 
    8590 
    86     ed.execCommand('mceBeginUndoLevel'); 
    87  
    8891    switch (getSelectValue(formObj, 'action')) { 
    8992        case "cell": 
     
    126129            break; 
    127130 
     131        case "col": 
     132            var curr, col = 0, cell = trElm.firstChild, rows = tableElm.getElementsByTagName("tr"); 
     133 
     134            if (cell.nodeName != "TD" && cell.nodeName != "TH") 
     135                cell = nextCell(cell); 
     136 
     137            do { 
     138                if (cell == tdElm) 
     139                    break; 
     140                col += cell.getAttribute("colspan"); 
     141            } while ((cell = nextCell(cell)) != null); 
     142 
     143            for (var i=0; i<rows.length; i++) { 
     144                cell = rows[i].firstChild; 
     145 
     146                if (cell.nodeName != "TD" && cell.nodeName != "TH") 
     147                    cell = nextCell(cell); 
     148 
     149                curr = 0; 
     150                do { 
     151                    if (curr == col) { 
     152                        cell = updateCell(cell, true); 
     153                        break; 
     154                    } 
     155                    curr += cell.getAttribute("colspan"); 
     156                } while ((cell = nextCell(cell)) != null); 
     157            } 
     158 
     159            break; 
     160 
    128161        case "all": 
    129162            var rows = tableElm.getElementsByTagName("tr"); 
     
    167200 
    168201    if (!skip_id) 
    169         td.setAttribute('id', formObj.id.value); 
    170  
    171     td.setAttribute('align', formObj.align.value); 
    172     td.setAttribute('vAlign', formObj.valign.value); 
    173     td.setAttribute('lang', formObj.lang.value); 
    174     td.setAttribute('dir', getSelectValue(formObj, 'dir')); 
    175     td.setAttribute('style', ed.dom.serializeStyle(ed.dom.parseStyle(formObj.style.value))); 
    176     td.setAttribute('scope', formObj.scope.value); 
    177     ed.dom.setAttrib(td, 'class', getSelectValue(formObj, 'class')); 
     202        dom.setAttrib(td, 'id', formObj.id.value); 
     203 
     204    dom.setAttrib(td, 'align', formObj.align.value); 
     205    dom.setAttrib(td, 'vAlign', formObj.valign.value); 
     206    dom.setAttrib(td, 'lang', formObj.lang.value); 
     207    dom.setAttrib(td, 'dir', getSelectValue(formObj, 'dir')); 
     208    dom.setAttrib(td, 'style', ed.dom.serializeStyle(ed.dom.parseStyle(formObj.style.value))); 
     209    dom.setAttrib(td, 'scope', formObj.scope.value); 
     210    dom.setAttrib(td, 'class', getSelectValue(formObj, 'class')); 
    178211 
    179212    // Clear deprecated attributes 
  • mce-table-buttons/trunk/table/js/row.js

    r365542 r479677  
    5757    var action = getSelectValue(formObj, 'action'); 
    5858 
     59    if (!AutoValidator.validate(formObj)) { 
     60        tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.'); 
     61        return false; 
     62    } 
     63 
    5964    tinyMCEPopup.restoreSelection(); 
    6065    trElm = dom.getParent(inst.selection.getStart(), "tr"); 
     
    8186    } 
    8287 
    83     inst.execCommand('mceBeginUndoLevel'); 
    84  
    8588    switch (action) { 
    8689        case "row": 
     
    124127    // Update row element 
    125128    if (!skip_id) 
    126         tr_elm.setAttribute('id', formObj.id.value); 
    127  
    128     tr_elm.setAttribute('align', getSelectValue(formObj, 'align')); 
    129     tr_elm.setAttribute('vAlign', getSelectValue(formObj, 'valign')); 
    130     tr_elm.setAttribute('lang', formObj.lang.value); 
    131     tr_elm.setAttribute('dir', getSelectValue(formObj, 'dir')); 
    132     tr_elm.setAttribute('style', dom.serializeStyle(dom.parseStyle(formObj.style.value))); 
     129        dom.setAttrib(tr_elm, 'id', formObj.id.value); 
     130 
     131    dom.setAttrib(tr_elm, 'align', getSelectValue(formObj, 'align')); 
     132    dom.setAttrib(tr_elm, 'vAlign', getSelectValue(formObj, 'valign')); 
     133    dom.setAttrib(tr_elm, 'lang', formObj.lang.value); 
     134    dom.setAttrib(tr_elm, 'dir', getSelectValue(formObj, 'dir')); 
     135    dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(formObj.style.value))); 
    133136    dom.setAttrib(tr_elm, 'class', getSelectValue(formObj, 'class')); 
    134137 
    135138    // Clear deprecated attributes 
    136     tr_elm.setAttribute('background', ''); 
    137     tr_elm.setAttribute('bgColor', ''); 
    138     tr_elm.setAttribute('height', ''); 
     139    dom.setAttrib(tr_elm, 'background', ''); 
     140    dom.setAttrib(tr_elm, 'bgColor', ''); 
     141    dom.setAttrib(tr_elm, 'height', ''); 
    139142 
    140143    // Set styles 
     
    164167            newParent = doc.createElement(dest); 
    165168 
    166             if (dest == "thead") { 
    167                 if (theTable.firstChild.nodeName == 'CAPTION') 
    168                     inst.dom.insertAfter(newParent, theTable.firstChild); 
    169                 else 
    170                     theTable.insertBefore(newParent, theTable.firstChild); 
    171             } else 
    172                 theTable.appendChild(newParent); 
     169            if (theTable.firstChild.nodeName == 'CAPTION') 
     170                inst.dom.insertAfter(newParent, theTable.firstChild); 
     171            else 
     172                theTable.insertBefore(newParent, theTable.firstChild); 
    173173        } 
    174174 
  • mce-table-buttons/trunk/table/js/table.js

    r365542 r479677  
    1313 
    1414    if (!AutoValidator.validate(formObj)) { 
    15         tinyMCEPopup.alert(inst.getLang('invalid_data')); 
     15        tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.'); 
    1616        return false; 
    1717    } 
     
    2222    cols = formObj.elements['cols'].value; 
    2323    rows = formObj.elements['rows'].value; 
    24     border = formObj.elements['border'].value != "" ? formObj.elements['border'].value  : 0; 
     24    border = formObj.elements['border'].value != "" ? formObj.elements['border'].value : 0; 
    2525    cellpadding = formObj.elements['cellpadding'].value != "" ? formObj.elements['cellpadding'].value : ""; 
    2626    cellspacing = formObj.elements['cellspacing'].value != "" ? formObj.elements['cellspacing'].value : ""; 
     
    5959    // Update table 
    6060    if (action == "update") { 
    61         inst.execCommand('mceBeginUndoLevel'); 
    62  
    6361        dom.setAttrib(elm, 'cellPadding', cellpadding, true); 
    6462        dom.setAttrib(elm, 'cellSpacing', cellspacing, true); 
     
    8381 
    8482            if (!tinymce.isIE) 
    85                 capEl.innerHTML = '<br _mce_bogus="1"/>'; 
     83                capEl.innerHTML = '<br data-mce-bogus="1"/>'; 
    8684 
    8785            elm.insertBefore(capEl, elm.firstChild); 
     
    152150    html += makeAttrib('cellpadding', cellpadding); 
    153151    html += makeAttrib('cellspacing', cellspacing); 
    154     html += makeAttrib('_mce_new', '1'); 
     152    html += makeAttrib('data-mce-new', '1'); 
    155153 
    156154    if (width && inst.settings.inline_styles) { 
     
    188186    if (caption) { 
    189187        if (!tinymce.isIE) 
    190             html += '<caption><br _mce_bogus="1"/></caption>'; 
     188            html += '<caption><br data-mce-bogus="1"/></caption>'; 
    191189        else 
    192190            html += '<caption></caption>'; 
     
    198196        for (var x=0; x<cols; x++) { 
    199197            if (!tinymce.isIE) 
    200                 html += '<td><br _mce_bogus="1"/></td>'; 
     198                html += '<td><br data-mce-bogus="1"/></td>'; 
    201199            else 
    202200                html += '<td></td>'; 
     
    208206    html += "</table>"; 
    209207 
    210     inst.execCommand('mceBeginUndoLevel'); 
    211  
    212208    // Move table 
    213209    if (inst.settings.fix_table_elements) { 
     
    232228        inst.execCommand('mceInsertContent', false, html); 
    233229 
    234     tinymce.each(dom.select('table[_mce_new]'), function(node) { 
     230    tinymce.each(dom.select('table[data-mce-new]'), function(node) { 
    235231        var td = dom.select('td', node); 
    236232 
     
    243239        } 
    244240 
    245         dom.setAttrib(node, '_mce_new', ''); 
     241        dom.setAttrib(node, 'data-mce-new', ''); 
    246242    }); 
    247243 
  • mce-table-buttons/trunk/table/langs/en_dlg.js

    r365542 r479677  
    1 tinyMCE.addI18n('en.table_dlg',{ 
    2 general_tab:"General", 
    3 advanced_tab:"Advanced", 
    4 general_props:"General properties", 
    5 advanced_props:"Advanced properties", 
    6 rowtype:"Row in table part", 
    7 title:"Insert/Modify table", 
    8 width:"Width", 
    9 height:"Height", 
    10 cols:"Cols", 
    11 rows:"Rows", 
    12 cellspacing:"Cellspacing", 
    13 cellpadding:"Cellpadding", 
    14 border:"Border", 
    15 align:"Alignment", 
    16 align_default:"Default", 
    17 align_left:"Left", 
    18 align_right:"Right", 
    19 align_middle:"Center", 
    20 row_title:"Table row properties", 
    21 cell_title:"Table cell properties", 
    22 cell_type:"Cell type", 
    23 valign:"Vertical alignment", 
    24 align_top:"Top", 
    25 align_bottom:"Bottom", 
    26 bordercolor:"Border color", 
    27 bgcolor:"Background color", 
    28 merge_cells_title:"Merge table cells", 
    29 id:"Id", 
    30 style:"Style", 
    31 langdir:"Language direction", 
    32 langcode:"Language code", 
    33 mime:"Target MIME type", 
    34 ltr:"Left to right", 
    35 rtl:"Right to left", 
    36 bgimage:"Background image", 
    37 summary:"Summary", 
    38 td:"Data", 
    39 th:"Header", 
    40 cell_cell:"Update current cell", 
    41 cell_row:"Update all cells in row", 
    42 cell_all:"Update all cells in table", 
    43 row_row:"Update current row", 
    44 row_odd:"Update odd rows in table", 
    45 row_even:"Update even rows in table", 
    46 row_all:"Update all rows in table", 
    47 thead:"Table Head", 
    48 tbody:"Table Body", 
    49 tfoot:"Table Foot", 
    50 scope:"Scope", 
    51 rowgroup:"Row Group", 
    52 colgroup:"Col Group", 
    53 col_limit:"You've exceeded the maximum number of columns of {$cols}.", 
    54 row_limit:"You've exceeded the maximum number of rows of {$rows}.", 
    55 cell_limit:"You've exceeded the maximum number of cells of {$cells}.", 
    56 missing_scope:"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.", 
    57 caption:"Table caption", 
    58 frame:"Frame", 
    59 frame_none:"none", 
    60 frame_groups:"groups", 
    61 frame_rows:"rows", 
    62 frame_cols:"cols", 
    63 frame_all:"all", 
    64 rules:"Rules", 
    65 rules_void:"void", 
    66 rules_above:"above", 
    67 rules_below:"below", 
    68 rules_hsides:"hsides", 
    69 rules_lhs:"lhs", 
    70 rules_rhs:"rhs", 
    71 rules_vsides:"vsides", 
    72 rules_box:"box", 
    73 rules_border:"border" 
    74 }); 
     1tinyMCE.addI18n('en.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"below","rules_above":"above","rules_void":"void",rules:"Rules","frame_all":"all","frame_cols":"cols","frame_rows":"rows","frame_groups":"groups","frame_none":"none",frame:"Frame",caption:"Table Caption","missing_scope":"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.","cell_limit":"You\'ve exceeded the maximum number of cells of {$cells}.","row_limit":"You\'ve exceeded the maximum number of rows of {$rows}.","col_limit":"You\'ve exceeded the maximum number of columns of {$cols}.",colgroup:"Col Group",rowgroup:"Row Group",scope:"Scope",tfoot:"Footer",tbody:"Body",thead:"Header","row_all":"Update All Rows in Table","row_even":"Update Even Rows in Table","row_odd":"Update Odd Rows in Table","row_row":"Update Current Row","cell_all":"Update All Cells in Table","cell_row":"Update All Cells in Row","cell_cell":"Update Current Cell",th:"Header",td:"Data",summary:"Summary",bgimage:"Background Image",rtl:"Right to Left",ltr:"Left to Right",mime:"Target MIME Type",langcode:"Language Code",langdir:"Language Direction",style:"Style",id:"ID","merge_cells_title":"Merge Table Cells",bgcolor:"Background Color",bordercolor:"Border Color","align_bottom":"Bottom","align_top":"Top",valign:"Vertical Alignment","cell_type":"Cell Type","cell_title":"Table Cell Properties","row_title":"Table Row Properties","align_middle":"Center","align_right":"Right","align_left":"Left","align_default":"Default",align:"Alignment",border:"Border",cellpadding:"Cell Padding",cellspacing:"Cell Spacing",rows:"Rows",cols:"Columns",height:"Height",width:"Width",title:"Insert/Edit Table",rowtype:"Row Type","advanced_props":"Advanced Properties","general_props":"General Properties","advanced_tab":"Advanced","general_tab":"General","cell_col":"Update all cells in column"}); 
  • mce-table-buttons/trunk/table/merge_cells.htm

    r365542 r479677  
    88    <script type="text/javascript" src="js/merge_cells.js"></script> 
    99</head> 
    10 <body style="margin: 8px"> 
     10<body style="margin: 8px" role="application"> 
    1111<form onsubmit="MergeCellsDialog.merge();return false;" action="#"> 
    1212    <fieldset> 
    1313        <legend>{#table_dlg.merge_cells_title}</legend> 
    14           <table border="0" cellpadding="0" cellspacing="3" width="100%"> 
    15               <tr> 
    16                 <td>{#table_dlg.cols}:</td> 
    17                 <td align="right"><input type="text" name="numcols" value="" class="number min1 mceFocus" style="width: 30px" /></td> 
    18               </tr> 
    19               <tr> 
    20                 <td>{#table_dlg.rows}:</td> 
    21                 <td align="right"><input type="text" name="numrows" value="" class="number min1" style="width: 30px" /></td> 
    22               </tr> 
    23           </table> 
     14        <table role="presentation" border="0" cellpadding="0" cellspacing="3" width="100%"> 
     15            <tr> 
     16                <td><label for="numcols">{#table_dlg.cols}</label>:</td> 
     17                <td align="right"><input type="text" id="numcols" name="numcols" value="" class="number min1 mceFocus" style="width: 30px" aria-required="true" /></td> 
     18            </tr> 
     19            <tr> 
     20                <td><label for="numrows">{#table_dlg.rows}</label>:</td> 
     21                <td align="right"><input type="text" id="numrows" name="numrows" value="" class="number min1" style="width: 30px" aria-required="true" /></td> 
     22            </tr> 
     23        </table> 
    2424    </fieldset> 
    2525 
  • mce-table-buttons/trunk/table/row.htm

    r365542 r479677  
    66    <script type="text/javascript" src="../../../../wp-includes/js/tinymce/utils/mctabs.js"></script> 
    77    <script type="text/javascript" src="../../../../wp-includes/js/tinymce/utils/form_utils.js"></script> 
     8    <script type="text/javascript" src="../../../../wp-includes/js/tinymce/utils/validate.js"></script> 
    89    <script type="text/javascript" src="../../../../wp-includes/js/tinymce/utils/editable_selects.js"></script> 
    910    <script type="text/javascript" src="js/row.js"></script> 
    1011    <link href="css/row.css" rel="stylesheet" type="text/css" /> 
    1112</head> 
    12 <body id="tablerow" style="display: none"> 
     13<body id="tablerow" style="display: none" role="application"> 
    1314    <form onsubmit="updateAction();return false;" action="#"> 
    1415        <div class="tabs"> 
    1516            <ul> 
    16                 <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li> 
    17                 <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li> 
     17                <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li> 
     18                <li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li> 
    1819            </ul> 
    1920        </div> 
     
    2425                    <legend>{#table_dlg.general_props}</legend> 
    2526 
    26                     <table border="0" cellpadding="4" cellspacing="0"> 
     27                    <table role="presentation" border="0" cellpadding="4" cellspacing="0"> 
    2728                        <tr> 
    2829                            <td><label for="rowtype">{#table_dlg.rowtype}</label></td> 
     
    7172                        <tr> 
    7273                            <td><label for="height">{#table_dlg.height}</label></td> 
    73                             <td class="col2"><input name="height" type="text" id="height" value="" size="4" maxlength="4" onchange="changedSize();" /></td> 
     74                            <td class="col2"><input name="height" type="text" id="height" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td> 
    7475                        </tr> 
    7576                    </table> 
     
    8182                    <legend>{#table_dlg.advanced_props}</legend> 
    8283 
    83                     <table border="0" cellpadding="0" cellspacing="4"> 
     84                    <table role="presentation" border="0" cellpadding="0" cellspacing="4"> 
    8485                        <tr> 
    8586                            <td class="column1"><label for="id">{#table_dlg.id}</label></td>  
     
    113114                            <td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>  
    114115                            <td> 
    115                                 <table border="0" cellpadding="0" cellspacing="0"> 
     116                                <table role="presentation" border="0" cellpadding="0" cellspacing="0"> 
    116117                                    <tr> 
    117118                                        <td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td> 
     
    123124 
    124125                        <tr> 
    125                             <td class="column1"><label for="bgcolor">{#table_dlg.bgcolor}</label></td>  
     126                            <td class="column1"><label for="bgcolor" id="bgcolor_label">{#table_dlg.bgcolor}</label></td>  
    126127                            <td> 
    127                                 <table border="0" cellpadding="0" cellspacing="0"> 
     128                                <span role="group" aria-labelledby="bgcolor_label"> 
     129                                <table role="presentation" border="0" cellpadding="0" cellspacing="0"> 
    128130                                    <tr> 
    129131                                        <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td> 
     
    131133                                    </tr> 
    132134                                </table> 
     135                                </span> 
    133136                            </td>  
    134137                        </tr> 
  • mce-table-buttons/trunk/table/table.htm

    r365542 r479677  
    1111    <link href="css/table.css" rel="stylesheet" type="text/css" /> 
    1212</head> 
    13 <body id="table" style="display: none"> 
     13<body id="table" style="display: none" role="application" aria-labelledby="app_title"> 
     14    <span style="display:none;" id="app_title">{#table_dlg.title}</span> 
    1415    <form onsubmit="insertTable();return false;" action="#"> 
    1516        <div class="tabs"> 
    1617            <ul> 
    17                 <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li> 
    18                 <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li> 
     18                <li id="general_tab" aria-controls="general_panel" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li> 
     19                <li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li> 
    1920            </ul> 
    2021        </div> 
     
    2425                <fieldset> 
    2526                    <legend>{#table_dlg.general_props}</legend> 
    26                       <table border="0" cellpadding="4" cellspacing="0" width="100%"> 
    27                               <tr> 
    28                                 <td><label id="colslabel" for="cols">{#table_dlg.cols}</label></td> 
    29                                 <td><input id="cols" name="cols" type="text" value="" size="3" maxlength="3" class="required number min1 mceFocus" /></td> 
    30                                 <td><label id="rowslabel" for="rows">{#table_dlg.rows}</label></td> 
    31                                 <td><input id="rows" name="rows" type="text" value="" size="3" maxlength="3" class="required number min1" /></td> 
    32                               </tr> 
    33                               <tr> 
    34                                 <td><label id="cellpaddinglabel" for="cellpadding">{#table_dlg.cellpadding}</label></td> 
    35                                 <td><input id="cellpadding" name="cellpadding" type="text" value="" size="3" maxlength="3" class="number" /></td> 
    36                                 <td><label id="cellspacinglabel" for="cellspacing">{#table_dlg.cellspacing}</label></td> 
    37                                 <td><input id="cellspacing" name="cellspacing" type="text" value="" size="3" maxlength="3" class="number" /></td> 
    38                               </tr> 
    39                               <tr> 
    40                                 <td><label id="alignlabel" for="align">{#table_dlg.align}</label></td> 
    41                                 <td><select id="align" name="align"> 
    42                                     <option value="">{#not_set}</option> 
    43                                     <option value="center">{#table_dlg.align_middle}</option> 
    44                                     <option value="left">{#table_dlg.align_left}</option> 
    45                                     <option value="right">{#table_dlg.align_right}</option> 
    46                                   </select></td> 
    47                                 <td><label id="borderlabel" for="border">{#table_dlg.border}</label></td> 
    48                                 <td><input id="border" name="border" type="text" value="" size="3" maxlength="3" onchange="changedBorder();" class="number" /></td> 
    49                               </tr> 
    50                               <tr id="width_row"> 
    51                                 <td><label id="widthlabel" for="width">{#table_dlg.width}</label></td> 
    52                                 <td><input name="width" type="text" id="width" value="" size="4" maxlength="4" onchange="changedSize();" class="size" /></td> 
    53                                 <td><label id="heightlabel" for="height">{#table_dlg.height}</label></td> 
    54                                 <td><input name="height" type="text" id="height" value="" size="4" maxlength="4" onchange="changedSize();" class="size" /></td> 
    55                               </tr> 
    56                               <tr id="styleSelectRow"> 
    57                                 <td><label id="classlabel" for="class">{#class_name}</label></td> 
    58                                 <td colspan="3"> 
    59                                 <select id="class" name="class" class="mceEditableSelect"> 
    60                                     <option value="" selected="selected">{#not_set}</option> 
    61                                 </select></td> 
    62                               </tr> 
    63                               <tr> 
    64                                 <td class="column1"><label for="caption">{#table_dlg.caption}</label></td>  
    65                                 <td><input id="caption" name="caption" type="checkbox" class="checkbox" value="true" /></td>  
    66                               </tr> 
    67                             </table> 
     27                    <table role="presentation" border="0" cellpadding="4" cellspacing="0" width="100%"> 
     28                        <tr> 
     29                            <td><label id="colslabel" for="cols">{#table_dlg.cols}</label></td> 
     30                            <td><input id="cols" name="cols" type="text" value="" size="3" maxlength="3" class="required number min1 mceFocus" aria-required="true" /></td> 
     31                            <td><label id="rowslabel" for="rows">{#table_dlg.rows}</label></td> 
     32                            <td><input id="rows" name="rows" type="text" value="" size="3" maxlength="3" class="required number min1" aria-required="true" /></td> 
     33                        </tr> 
     34                        <tr> 
     35                            <td><label id="cellpaddinglabel" for="cellpadding">{#table_dlg.cellpadding}</label></td> 
     36                            <td><input id="cellpadding" name="cellpadding" type="text" value="" size="3" maxlength="3" class="number" /></td> 
     37                            <td><label id="cellspacinglabel" for="cellspacing">{#table_dlg.cellspacing}</label></td> 
     38                            <td><input id="cellspacing" name="cellspacing" type="text" value="" size="3" maxlength="3" class="number" /></td> 
     39                        </tr> 
     40                        <tr> 
     41                            <td><label id="alignlabel" for="align">{#table_dlg.align}</label></td> 
     42                            <td><select id="align" name="align"> 
     43                                <option value="">{#not_set}</option> 
     44                                <option value="center">{#table_dlg.align_middle}</option> 
     45                                <option value="left">{#table_dlg.align_left}</option> 
     46                                <option value="right">{#table_dlg.align_right}</option> 
     47                            </select></td> 
     48                            <td><label id="borderlabel" for="border">{#table_dlg.border}</label></td> 
     49                            <td><input id="border" name="border" type="text" value="" size="3" maxlength="3" onchange="changedBorder();" class="number" /></td> 
     50                        </tr> 
     51                        <tr id="width_row"> 
     52                            <td><label id="widthlabel" for="width">{#table_dlg.width}</label></td> 
     53                            <td><input name="width" type="text" id="width" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td> 
     54                            <td><label id="heightlabel" for="height">{#table_dlg.height}</label></td> 
     55                            <td><input name="height" type="text" id="height" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td> 
     56                        </tr> 
     57                        <tr id="styleSelectRow" > 
     58                            <td><label id="classlabel" for="class">{#class_name}</label></td> 
     59                            <td colspan="3" > 
     60                            <select id="class" name="class" class="mceEditableSelect"> 
     61                                <option value="" selected="selected">{#not_set}</option> 
     62                            </select></td> 
     63                        </tr> 
     64                        <tr> 
     65                            <td class="column1" ><label for="caption">{#table_dlg.caption}</label></td>  
     66                            <td><input id="caption" name="caption" type="checkbox" class="checkbox" value="true" /></td>  
     67                        </tr> 
     68                    </table> 
    6869                </fieldset> 
    6970            </div> 
     
    7374                    <legend>{#table_dlg.advanced_props}</legend> 
    7475 
    75                     <table border="0" cellpadding="0" cellspacing="4"> 
     76                    <table role="presentation" border="0" cellpadding="0" cellspacing="4"> 
    7677                        <tr> 
    7778                            <td class="column1"><label for="id">{#table_dlg.id}</label></td>  
     
    99100                            <td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>  
    100101                            <td> 
    101                                 <table border="0" cellpadding="0" cellspacing="0"> 
     102                                <table role="presentation" aria-labelledby="backgroundimage_label" border="0" cellpadding="0" cellspacing="0"> 
    102103                                    <tr> 
    103104                                        <td><input id="backgroundimage" name="backgroundimage" type="text" value="" class="advfield" onchange="changedBackgroundImage();" /></td> 
     
    151152                        </tr> 
    152153 
    153                         <tr> 
    154                             <td class="column1"><label for="bordercolor">{#table_dlg.bordercolor}</label></td>  
     154                        <tr role="group" aria-labelledby="bordercolor_label"> 
     155                            <td class="column1"><label id="bordercolor_label" for="bordercolor">{#table_dlg.bordercolor}</label></td>  
    155156                            <td> 
    156                                 <table border="0" cellpadding="0" cellspacing="0"> 
     157                                <table role="presentation" border="0" cellpadding="0" cellspacing="0"> 
    157158                                    <tr> 
    158159                                        <td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td> 
     
    163164                        </tr> 
    164165 
    165                         <tr> 
    166                             <td class="column1"><label for="bgcolor">{#table_dlg.bgcolor}</label></td>  
     166                        <tr role="group" aria-labelledby="bgcolor_label"> 
     167                            <td class="column1"><label id="bgcolor_label" for="bgcolor">{#table_dlg.bgcolor}</label></td>  
    167168                            <td> 
    168                                 <table border="0" cellpadding="0" cellspacing="0"> 
     169                                <table role="presentation" border="0" cellpadding="0" cellspacing="0"> 
    169170                                    <tr> 
    170171                                        <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td> 
Note: See TracChangeset for help on using the changeset viewer.