TinyMCE Advanced - Version 3.2.7

Version Description

Compatibility with WordPress 2.9 and TinyMCE 3.2.7, several minor bug fixes.

Download this release

Release Info

Developer azaozz
Plugin Icon 128x128 TinyMCE Advanced
Version 3.2.7
Comparing to
See all releases

Code changes from version 3.2.4 to 3.2.7

mce/advhr/rule.htm CHANGED
@@ -1,62 +1,62 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#advhr.advhr_desc}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=3241-1141"></script>
6
- <script type="text/javascript" src="js/rule.js?ver=3241-1141"></script>
7
- <script type="text/javascript" src="../../utils/mctabs.js?ver=3241-1141"></script>
8
- <script type="text/javascript" src="../../utils/form_utils.js?ver=3241-1141"></script>
9
- <link href="css/advhr.css?ver=3241-1141" rel="stylesheet" type="text/css" />
10
- </head>
11
- <body>
12
- <form onsubmit="AdvHRDialog.update();return false;" action="#">
13
- <div class="tabs">
14
- <ul>
15
- <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advhr.advhr_desc}</a></span></li>
16
- </ul>
17
- </div>
18
-
19
- <div class="panel_wrapper">
20
- <div id="general_panel" class="panel current">
21
- <table border="0" cellpadding="4" cellspacing="0">
22
- <tr>
23
- <td><label for="width">{#advhr_dlg.width}</label></td>
24
- <td class="nowrap">
25
- <input id="width" name="width" type="text" value="" class="mceFocus" />
26
- <select name="width2" id="width2">
27
- <option value="">px</option>
28
- <option value="%">%</option>
29
- </select>
30
- </td>
31
- </tr>
32
- <tr>
33
- <td><label for="size">{#advhr_dlg.size}</label></td>
34
- <td><select id="size" name="size">
35
- <option value="">Normal</option>
36
- <option value="1">1</option>
37
- <option value="2">2</option>
38
- <option value="3">3</option>
39
- <option value="4">4</option>
40
- <option value="5">5</option>
41
- </select></td>
42
- </tr>
43
- <tr>
44
- <td><label for="noshade">{#advhr_dlg.noshade}</label></td>
45
- <td><input type="checkbox" name="noshade" id="noshade" class="radio" /></td>
46
- </tr>
47
- </table>
48
- </div>
49
- </div>
50
-
51
- <div class="mceActionPanel">
52
- <div style="float: left">
53
- <input type="submit" id="insert" name="insert" value="{#insert}" />
54
- </div>
55
-
56
- <div style="float: right">
57
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
58
- </div>
59
- </div>
60
- </form>
61
- </body>
62
- </html>
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <title>{#advhr.advhr_desc}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js?ver=327-1235"></script>
6
+ <script type="text/javascript" src="js/rule.js?ver=327-1235"></script>
7
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=327-1235"></script>
8
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=327-1235"></script>
9
+ <link href="css/advhr.css?ver=327-1235" rel="stylesheet" type="text/css" />
10
+ </head>
11
+ <body>
12
+ <form onsubmit="AdvHRDialog.update();return false;" action="#">
13
+ <div class="tabs">
14
+ <ul>
15
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advhr.advhr_desc}</a></span></li>
16
+ </ul>
17
+ </div>
18
+
19
+ <div class="panel_wrapper">
20
+ <div id="general_panel" class="panel current">
21
+ <table border="0" cellpadding="4" cellspacing="0">
22
+ <tr>
23
+ <td><label for="width">{#advhr_dlg.width}</label></td>
24
+ <td class="nowrap">
25
+ <input id="width" name="width" type="text" value="" class="mceFocus" />
26
+ <select name="width2" id="width2">
27
+ <option value="">px</option>
28
+ <option value="%">%</option>
29
+ </select>
30
+ </td>
31
+ </tr>
32
+ <tr>
33
+ <td><label for="size">{#advhr_dlg.size}</label></td>
34
+ <td><select id="size" name="size">
35
+ <option value="">Normal</option>
36
+ <option value="1">1</option>
37
+ <option value="2">2</option>
38
+ <option value="3">3</option>
39
+ <option value="4">4</option>
40
+ <option value="5">5</option>
41
+ </select></td>
42
+ </tr>
43
+ <tr>
44
+ <td><label for="noshade">{#advhr_dlg.noshade}</label></td>
45
+ <td><input type="checkbox" name="noshade" id="noshade" class="radio" /></td>
46
+ </tr>
47
+ </table>
48
+ </div>
49
+ </div>
50
+
51
+ <div class="mceActionPanel">
52
+ <div style="float: left">
53
+ <input type="submit" id="insert" name="insert" value="{#insert}" />
54
+ </div>
55
+
56
+ <div style="float: right">
57
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
58
+ </div>
59
+ </div>
60
+ </form>
61
+ </body>
62
+ </html>
mce/advimage/image.htm CHANGED
@@ -2,13 +2,13 @@
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#advimage_dlg.dialog_title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=3241-1141"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=3241-1141"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=3241-1141"></script>
8
- <script type="text/javascript" src="../../utils/validate.js?ver=3241-1141"></script>
9
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=3241-1141"></script>
10
- <script type="text/javascript" src="js/image.js?ver=3241-1141"></script>
11
- <link href="css/advimage.css?ver=3241-1141" rel="stylesheet" type="text/css" />
12
  </head>
13
  <body id="advimage" style="display: none">
14
  <form onsubmit="ImageDialog.insert();return false;" action="#">
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#advimage_dlg.dialog_title}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js?ver=327-1235"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=327-1235"></script>
7
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=327-1235"></script>
8
+ <script type="text/javascript" src="../../utils/validate.js?ver=327-1235"></script>
9
+ <script type="text/javascript" src="../../utils/editable_selects.js?ver=327-1235"></script>
10
+ <script type="text/javascript" src="js/image.js?ver=327-1235"></script>
11
+ <link href="css/advimage.css?ver=327-1235" rel="stylesheet" type="text/css" />
12
  </head>
13
  <body id="advimage" style="display: none">
14
  <form onsubmit="ImageDialog.insert();return false;" action="#">
mce/advlink/link.htm CHANGED
@@ -2,12 +2,12 @@
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#advlink_dlg.title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=3241-1141"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=3241-1141"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=3241-1141"></script>
8
- <script type="text/javascript" src="../../utils/validate.js?ver=3241-1141"></script>
9
- <script type="text/javascript" src="js/advlink.js?ver=3241-1141"></script>
10
- <link href="css/advlink.css?ver=3241-1141" rel="stylesheet" type="text/css" />
11
  </head>
12
  <body id="advlink" style="display: none">
13
  <form onsubmit="insertAction();return false;" action="#">
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#advlink_dlg.title}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js?ver=327-1235"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=327-1235"></script>
7
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=327-1235"></script>
8
+ <script type="text/javascript" src="../../utils/validate.js?ver=327-1235"></script>
9
+ <script type="text/javascript" src="js/advlink.js?ver=327-1235"></script>
10
+ <link href="css/advlink.css?ver=327-1235" rel="stylesheet" type="text/css" />
11
  </head>
12
  <body id="advlink" style="display: none">
13
  <form onsubmit="insertAction();return false;" action="#">
mce/searchreplace/searchreplace.htm CHANGED
@@ -2,11 +2,11 @@
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#searchreplace_dlg.replace_title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=3241-1141"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=3241-1141"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=3241-1141"></script>
8
- <script type="text/javascript" src="js/searchreplace.js?ver=3241-1141"></script>
9
- <link rel="stylesheet" type="text/css" href="css/searchreplace.css?ver=3241-1141" />
10
  </head>
11
  <body style="display:none;">
12
  <form onsubmit="SearchReplaceDialog.searchNext('none');return false;" action="#">
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#searchreplace_dlg.replace_title}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js?ver=327-1235"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=327-1235"></script>
7
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=327-1235"></script>
8
+ <script type="text/javascript" src="js/searchreplace.js?ver=327-1235"></script>
9
+ <link rel="stylesheet" type="text/css" href="css/searchreplace.css?ver=327-1235" />
10
  </head>
11
  <body style="display:none;">
12
  <form onsubmit="SearchReplaceDialog.searchNext('none');return false;" action="#">
mce/style/props.htm CHANGED
@@ -2,12 +2,12 @@
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#style_dlg.title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=3241-1141"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=3241-1141"></script>
7
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=3241-1141"></script>
8
- <script type="text/javascript" src="../../utils/form_utils.js?ver=3241-1141"></script>
9
- <script type="text/javascript" src="js/props.js?ver=3241-1141"></script>
10
- <link href="css/props.css?ver=3241-1141" rel="stylesheet" type="text/css" />
11
  </head>
12
 
13
  <body id="styleprops" style="display: none">
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#style_dlg.title}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js?ver=327-1235"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=327-1235"></script>
7
+ <script type="text/javascript" src="../../utils/editable_selects.js?ver=327-1235"></script>
8
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=327-1235"></script>
9
+ <script type="text/javascript" src="js/props.js?ver=327-1235"></script>
10
+ <link href="css/props.css?ver=327-1235" rel="stylesheet" type="text/css" />
11
  </head>
12
 
13
  <body id="styleprops" style="display: none">
mce/table/cell.htm CHANGED
@@ -2,12 +2,12 @@
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#table_dlg.cell_title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=3241-1141"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=3241-1141"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=3241-1141"></script>
8
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=3241-1141"></script>
9
- <script type="text/javascript" src="js/cell.js?ver=3241-1141"></script>
10
- <link href="css/cell.css?ver=3241-1141" rel="stylesheet" type="text/css" />
11
  </head>
12
  <body id="tablecell" style="display: none">
13
  <form onsubmit="updateAction();return false;" action="#">
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#table_dlg.cell_title}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js?ver=327-1235"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=327-1235"></script>
7
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=327-1235"></script>
8
+ <script type="text/javascript" src="../../utils/editable_selects.js?ver=327-1235"></script>
9
+ <script type="text/javascript" src="js/cell.js?ver=327-1235"></script>
10
+ <link href="css/cell.css?ver=327-1235" rel="stylesheet" type="text/css" />
11
  </head>
12
  <body id="tablecell" style="display: none">
13
  <form onsubmit="updateAction();return false;" action="#">
mce/table/editor_plugin.js CHANGED
@@ -1 +1 @@
1
- (function(){var a=tinymce.each;tinymce.create("tinymce.plugins.TablePlugin",{init:function(b,c){var d=this;d.editor=b;d.url=c;a([["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(e){b.addButton(e[0],{title:e[1],cmd:e[2],ui:e[3]})});if(b.getParam("inline_styles")){b.onPreProcess.add(function(e,g){var f=e.dom;a(f.select("table",g.node),function(i){var h;if(h=f.getAttrib(i,"width")){f.setStyle(i,"width",h);f.setAttrib(i,"width")}if(h=f.getAttrib(i,"height")){f.setStyle(i,"height",h);f.setAttrib(i,"height")}})})}b.onInit.add(function(){if(b&&b.plugins.contextmenu){b.plugins.contextmenu.onContextMenu.add(function(h,f,j){var k,i=b.selection,g=i.getNode()||b.getBody();if(b.dom.getParent(j,"td")||b.dom.getParent(j,"th")){f.removeAll();if(g.nodeName=="A"&&!b.dom.getAttrib(g,"name")){f.add({title:"advanced.link_desc",icon:"link",cmd:b.plugins.advlink?"mceAdvLink":"mceLink",ui:true});f.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});f.addSeparator()}if(g.nodeName=="IMG"&&g.className.indexOf("mceItem")==-1){f.add({title:"advanced.image_desc",icon:"image",cmd:b.plugins.advimage?"mceAdvImage":"mceImage",ui:true});f.addSeparator()}f.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",ui:true,value:{action:"insert"}});f.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable",ui:true});f.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete",ui:true});f.addSeparator();k=f.addMenu({title:"table.cell"});k.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps",ui:true});k.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells",ui:true});k.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells",ui:true});k=f.addMenu({title:"table.row"});k.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps",ui:true});k.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});k.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});k.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});k.addSeparator();k.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});k.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});k.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"});k.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"});k=f.addMenu({title:"table.col"});k.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});k.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});k.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{f.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",ui:true})}})}});b.onKeyDown.add(function(f,g){if(g.keyCode==9&&f.dom.getParent(f.selection.getNode(),"TABLE")){if(!tinymce.isGecko&&!tinymce.isOpera){tinyMCE.execInstanceCommand(f.editorId,"mceTableMoveToNextRow",true);return tinymce.dom.Event.cancel(g)}f.undoManager.add()}});if(!tinymce.isIE){if(b.getParam("table_selection",true)){b.onClick.add(function(f,g){g=g.target;if(g.nodeName==="TABLE"){f.selection.select(g)}})}}b.onNodeChange.add(function(f,e,h){var g=f.dom.getParent(h,"td,th,caption");e.setActive("table",h.nodeName==="TABLE"||!!g);if(g&&g.nodeName==="CAPTION"){g=null}e.setDisabled("delete_table",!g);e.setDisabled("delete_col",!g);e.setDisabled("delete_table",!g);e.setDisabled("delete_row",!g);e.setDisabled("col_after",!g);e.setDisabled("col_before",!g);e.setDisabled("row_after",!g);e.setDisabled("row_before",!g);e.setDisabled("row_props",!g);e.setDisabled("cell_props",!g);e.setDisabled("split_cells",!g||(parseInt(f.dom.getAttrib(g,"colspan","1"))<2&&parseInt(f.dom.getAttrib(g,"rowspan","1"))<2));e.setDisabled("merge_cells",!g)});if(!tinymce.isIE){b.onBeforeSetContent.add(function(e,f){if(f.initial){f.content=f.content.replace(/<(td|th)([^>]+|)>\s*<\/(td|th)>/g,tinymce.isOpera?"<$1$2>&nbsp;</$1>":'<$1$2><br mce_bogus="1" /></$1>')}})}},execCommand:function(f,e,g){var d=this.editor,c;switch(f){case"mceTableMoveToNextRow":case"mceInsertTable":case"mceTableRowProps":case"mceTableCellProps":case"mceTableSplitCells":case"mceTableMergeCells":case"mceTableInsertRowBefore":case"mceTableInsertRowAfter":case"mceTableDeleteRow":case"mceTableInsertColBefore":case"mceTableInsertColAfter":case"mceTableDeleteCol":case"mceTableCutRow":case"mceTableCopyRow":case"mceTablePasteRowBefore":case"mceTablePasteRowAfter":case"mceTableDelete":d.execCommand("mceBeginUndoLevel");this._doExecCommand(f,e,g);d.execCommand("mceEndUndoLevel");return true}return false},getInfo:function(){return{longname:"Tables",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/table",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_doExecCommand:function(r,Z,ae){var V=this.editor,au=V,g=this.url;var n=V.selection.getNode();var W=V.dom.getParent(n,"tr");var aq=V.dom.getParent(n,"td,th");var F=V.dom.getParent(n,"table");var k=V.contentWindow.document;var av=F?F.getAttribute("border"):"";if(W&&aq==null){aq=W.cells[0]}function ap(y,x){for(var ax=0;ax<y.length;ax++){if(y[ax].length>0&&ap(y[ax],x)){return true}if(y[ax]==x){return true}}return false}function aj(x,i){var y;ad=e(F);x=x||0;i=i||0;x=Math.max(o.cellindex+x,0);i=Math.max(o.rowindex+i,0);V.execCommand("mceRepaint");y=d(ad,i,x);if(y){V.selection.select(y.firstChild||y);V.selection.collapse(1)}}function ah(){var i=k.createElement("td");if(!tinymce.isIE){i.innerHTML='<br mce_bogus="1"/>'}}function j(y){var x=V.dom.getAttrib(y,"colspan");var i=V.dom.getAttrib(y,"rowspan");x=x==""?1:parseInt(x);i=i==""?1:parseInt(i);return{colspan:x,rowspan:i}}function al(ax,az){var i,ay;for(ay=0;ay<ax.length;ay++){for(i=0;i<ax[ay].length;i++){if(ax[ay][i]==az){return{cellindex:i,rowindex:ay}}}}return null}function d(x,y,i){if(x[y]&&x[y][i]){return x[y][i]}return null}function A(aC,ax){var az=[],y=0,aA,ay,ax,aB;for(aA=0;aA<aC.rows.length;aA++){for(ay=0;ay<aC.rows[aA].cells.length;ay++,y++){az[y]=aC.rows[aA].cells[ay]}}for(aA=0;aA<az.length;aA++){if(az[aA]==ax){if(aB=az[aA+1]){return aB}}}}function e(aE){var i=[],aF=aE.rows,aC,aB,ay,az,aD,ax,aA;for(aB=0;aB<aF.length;aB++){for(aC=0;aC<aF[aB].cells.length;aC++){ay=aF[aB].cells[aC];az=j(ay);for(aD=aC;i[aB]&&i[aB][aD];aD++){}for(aA=aB;aA<aB+az.rowspan;aA++){if(!i[aA]){i[aA]=[]}for(ax=aD;ax<aD+az.colspan;ax++){i[aA][ax]=ay}}}}return i}function m(aG,aD,ay,ax){var y=e(aG),aF=al(y,ay);var aH,aC;if(ax.cells.length!=aD.childNodes.length){aH=aD.childNodes;aC=null;for(var aE=0;ay=d(y,aF.rowindex,aE);aE++){var aA=true;var aB=j(ay);if(ap(aH,ay)){ax.childNodes[aE]._delete=true}else{if((aC==null||ay!=aC)&&aB.colspan>1){for(var az=aE;az<aE+ay.colSpan;az++){ax.childNodes[az]._delete=true}}}if((aC==null||ay!=aC)&&aB.rowspan>1){ay.rowSpan=aB.rowspan+1}aC=ay}B(F)}}function O(x,i){while((x=x.previousSibling)!=null){if(x.nodeName==i){return x}}return null}function af(ax,ay){var x=ay.split(",");while((ax=ax.nextSibling)!=null){for(var y=0;y<x.length;y++){if(ax.nodeName.toLowerCase()==x[y].toLowerCase()){return ax}}}return null}function B(ax){if(ax.rows==0){return}var y=ax.rows[0];do{var x=af(y,"TR");if(y._delete){y.parentNode.removeChild(y);continue}var ay=y.cells[0];if(ay.cells>1){do{var i=af(ay,"TD,TH");if(ay._delete){ay.parentNode.removeChild(ay)}}while((ay=i)!=null)}}while((y=x)!=null)}function p(ax,aA,az){ax.rowSpan=1;var x=af(aA,"TR");for(var ay=1;ay<az&&x;ay++){var y=k.createElement("td");if(!tinymce.isIE){y.innerHTML='<br mce_bogus="1"/>'}if(tinymce.isIE){x.insertBefore(y,x.cells(ax.cellIndex))}else{x.insertBefore(y,x.cells[ax.cellIndex])}x=af(x,"TR")}}function S(aF,aH,aB){var y=e(aH);var ax=aB.cloneNode(false);var aG=al(y,aB.cells[0]);var aC=null;var aA=V.dom.getAttrib(aH,"border");var az=null;for(var aE=0;az=d(y,aG.rowindex,aE);aE++){var aD=null;if(aC!=az){for(var ay=0;ay<aB.cells.length;ay++){if(az==aB.cells[ay]){aD=az.cloneNode(true);break}}}if(aD==null){aD=aF.createElement("td");if(!tinymce.isIE){aD.innerHTML='<br mce_bogus="1"/>'}}aD.colSpan=1;aD.rowSpan=1;ax.appendChild(aD);aC=az}return ax}switch(r){case"mceTableMoveToNextRow":var L=A(F,aq);if(!L){V.execCommand("mceTableInsertRowAfter",aq);L=A(F,aq)}V.selection.select(L);V.selection.collapse(true);return true;case"mceTableRowProps":if(W==null){return true}if(Z){V.windowManager.open({url:g+"/row.htm",width:400+parseInt(V.getLang("table.rowprops_delta_width",0)),height:295+parseInt(V.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:g})}return true;case"mceTableCellProps":if(aq==null){return true}if(Z){V.windowManager.open({url:g+"/cell.htm",width:400+parseInt(V.getLang("table.cellprops_delta_width",0)),height:295+parseInt(V.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:g})}return true;case"mceInsertTable":if(Z){V.windowManager.open({url:g+"/table.htm",width:400+parseInt(V.getLang("table.table_delta_width",0)),height:320+parseInt(V.getLang("table.table_delta_height",0)),inline:1},{plugin_url:g,action:ae?ae.action:0})}return true;case"mceTableDelete":var G=V.dom.getParent(V.selection.getNode(),"table");if(G){G.parentNode.removeChild(G);V.execCommand("mceRepaint")}return true;case"mceTableSplitCells":case"mceTableMergeCells":case"mceTableInsertRowBefore":case"mceTableInsertRowAfter":case"mceTableDeleteRow":case"mceTableInsertColBefore":case"mceTableInsertColAfter":case"mceTableDeleteCol":case"mceTableCutRow":case"mceTableCopyRow":case"mceTablePasteRowBefore":case"mceTablePasteRowAfter":if(!F){return true}if(W&&F!=W.parentNode){F=W.parentNode}if(F&&W){switch(r){case"mceTableCutRow":if(!W||!aq){return true}V.tableRowClipboard=S(k,F,W);V.execCommand("mceTableDeleteRow");break;case"mceTableCopyRow":if(!W||!aq){return true}V.tableRowClipboard=S(k,F,W);break;case"mceTablePasteRowBefore":if(!W||!aq){return true}var v=V.tableRowClipboard.cloneNode(true);var h=O(W,"TR");if(h!=null){m(F,h,h.cells[0],v)}W.parentNode.insertBefore(v,W);break;case"mceTablePasteRowAfter":if(!W||!aq){return true}var X=af(W,"TR");var v=V.tableRowClipboard.cloneNode(true);m(F,W,aq,v);if(X==null){W.parentNode.appendChild(v)}else{X.parentNode.insertBefore(v,X)}break;case"mceTableInsertRowBefore":if(!W||!aq){return true}var ad=e(F);var o=al(ad,aq);var v=k.createElement("tr");var u=null;o.rowindex--;if(o.rowindex<0){o.rowindex=0}for(var ac=0;aq=d(ad,o.rowindex,ac);ac++){if(aq!=u){var E=j(aq);if(E.rowspan==1){var J=k.createElement("td");if(!tinymce.isIE){J.innerHTML='<br mce_bogus="1"/>'}J.colSpan=aq.colSpan;v.appendChild(J)}else{aq.rowSpan=E.rowspan+1}u=aq}}W.parentNode.insertBefore(v,W);aj(0,1);break;case"mceTableInsertRowAfter":if(!W||!aq){return true}var ad=e(F);var o=al(ad,aq);var v=k.createElement("tr");var u=null;for(var ac=0;aq=d(ad,o.rowindex,ac);ac++){if(aq!=u){var E=j(aq);if(E.rowspan==1){var J=k.createElement("td");if(!tinymce.isIE){J.innerHTML='<br mce_bogus="1"/>'}J.colSpan=aq.colSpan;v.appendChild(J)}else{aq.rowSpan=E.rowspan+1}u=aq}}if(v.hasChildNodes()){var X=af(W,"TR");if(X){X.parentNode.insertBefore(v,X)}else{F.appendChild(v)}}aj(0,1);break;case"mceTableDeleteRow":if(!W||!aq){return true}var ad=e(F);var o=al(ad,aq);if(ad.length==1&&F.nodeName=="TBODY"){V.dom.remove(V.dom.getParent(F,"table"));return true}var D=W.cells;var X=af(W,"TR");for(var ac=0;ac<D.length;ac++){if(D[ac].rowSpan>1){var J=D[ac].cloneNode(true);var E=j(D[ac]);J.rowSpan=E.rowspan-1;var ak=X.cells[ac];if(ak==null){X.appendChild(J)}else{X.insertBefore(J,ak)}}}var u=null;for(var ac=0;aq=d(ad,o.rowindex,ac);ac++){if(aq!=u){var E=j(aq);if(E.rowspan>1){aq.rowSpan=E.rowspan-1}else{W=aq.parentNode;if(W.parentNode){W._delete=true}}u=aq}}B(F);aj(0,-1);break;case"mceTableInsertColBefore":if(!W||!aq){return true}var ad=e(V.dom.getParent(F,"table"));var o=al(ad,aq);var u=null;for(var aa=0;aq=d(ad,aa,o.cellindex);aa++){if(aq!=u){var E=j(aq);if(E.colspan==1){var J=k.createElement(aq.nodeName);if(!tinymce.isIE){J.innerHTML='<br mce_bogus="1"/>'}J.rowSpan=aq.rowSpan;aq.parentNode.insertBefore(J,aq)}else{aq.colSpan++}u=aq}}aj();break;case"mceTableInsertColAfter":if(!W||!aq){return true}var ad=e(V.dom.getParent(F,"table"));var o=al(ad,aq);var u=null;for(var aa=0;aq=d(ad,aa,o.cellindex);aa++){if(aq!=u){var E=j(aq);if(E.colspan==1){var J=k.createElement(aq.nodeName);if(!tinymce.isIE){J.innerHTML='<br mce_bogus="1"/>'}J.rowSpan=aq.rowSpan;var ak=af(aq,"TD,TH");if(ak==null){aq.parentNode.appendChild(J)}else{ak.parentNode.insertBefore(J,ak)}}else{aq.colSpan++}u=aq}}aj(1);break;case"mceTableDeleteCol":if(!W||!aq){return true}var ad=e(F);var o=al(ad,aq);var u=null;if((ad.length>1&&ad[0].length<=1)&&F.nodeName=="TBODY"){V.dom.remove(V.dom.getParent(F,"table"));return true}for(var aa=0;aq=d(ad,aa,o.cellindex);aa++){if(aq!=u){var E=j(aq);if(E.colspan>1){aq.colSpan=E.colspan-1}else{if(aq.parentNode){aq.parentNode.removeChild(aq)}}u=aq}}aj(-1);break;case"mceTableSplitCells":if(!W||!aq){return true}var l=j(aq);var C=l.colspan;var H=l.rowspan;if(C>1||H>1){aq.colSpan=1;for(var am=1;am<C;am++){var J=k.createElement("td");if(!tinymce.isIE){J.innerHTML='<br mce_bogus="1"/>'}W.insertBefore(J,af(aq,"TD,TH"));if(H>1){p(J,W,H)}}p(aq,W,H)}F=V.dom.getParent(V.selection.getNode(),"table");break;case"mceTableMergeCells":var ao=[];var R=V.selection.getSel();var ad=e(F);if(tinymce.isIE||R.rangeCount==1){if(Z){var t=j(aq);V.windowManager.open({url:g+"/merge_cells.htm",width:240+parseInt(V.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(V.getLang("table.merge_cells_delta_height",0)),inline:1},{action:"update",numcols:t.colspan,numrows:t.rowspan,plugin_url:g});return true}else{var U=parseInt(ae.numrows);var c=parseInt(ae.numcols);var o=al(ad,aq);if((""+U)=="NaN"){U=1}if((""+c)=="NaN"){c=1}var b=F.rows;for(var aa=o.rowindex;aa<ad.length;aa++){var ag=[];for(var ac=o.cellindex;ac<ad[aa].length;ac++){var f=d(ad,aa,ac);if(f&&!ap(ao,f)&&!ap(ag,f)){var N=al(ad,f);if(N.cellindex<o.cellindex+c&&N.rowindex<o.rowindex+U){ag[ag.length]=f}}}if(ag.length>0){ao[ao.length]=ag}var f=d(ad,o.rowindex,o.cellindex);a(au.dom.select("br",f),function(y,x){if(x>0&&au.dom.getAttrib("mce_bogus")){au.dom.remove(y)}})}}}else{var D=[];var R=V.selection.getSel();var Y=null;var an=null;var z=-1,aw=-1,w,at;if(R.rangeCount<2){return true}for(var am=0;am<R.rangeCount;am++){var ai=R.getRangeAt(am);var aq=ai.startContainer.childNodes[ai.startOffset];if(!aq){break}if(aq.nodeName=="TD"||aq.nodeName=="TH"){D[D.length]=aq}}var b=F.rows;for(var aa=0;aa<b.length;aa++){var ag=[];for(var ac=0;ac<b[aa].cells.length;ac++){var f=b[aa].cells[ac];for(var am=0;am<D.length;am++){if(f==D[am]){ag[ag.length]=f}}}if(ag.length>0){ao[ao.length]=ag}}var an=[];var Y=null;for(var aa=0;aa<ad.length;aa++){for(var ac=0;ac<ad[aa].length;ac++){ad[aa][ac]._selected=false;for(var am=0;am<D.length;am++){if(ad[aa][ac]==D[am]){if(z==-1){z=ac;aw=aa}w=ac;at=aa;ad[aa][ac]._selected=true}}}}for(var aa=aw;aa<=at;aa++){for(var ac=z;ac<=w;ac++){if(!ad[aa][ac]._selected){alert("Invalid selection for merge.");return true}}}}var s=1,q=1;var T=-1;for(var aa=0;aa<ao.length;aa++){var I=0;for(var ac=0;ac<ao[aa].length;ac++){var E=j(ao[aa][ac]);I+=E.colspan;if(T!=-1&&E.rowspan!=T){alert("Invalid selection for merge.");return true}T=E.rowspan}if(I>q){q=I}T=-1}var Q=-1;for(var ac=0;ac<ao[0].length;ac++){var M=0;for(var aa=0;aa<ao.length;aa++){var E=j(ao[aa][ac]);M+=E.rowspan;if(Q!=-1&&E.colspan!=Q){alert("Invalid selection for merge.");return true}Q=E.colspan}if(M>s){s=M}Q=-1}aq=ao[0][0];aq.rowSpan=s;aq.colSpan=q;for(var aa=0;aa<ao.length;aa++){for(var ac=0;ac<ao[aa].length;ac++){var P=ao[aa][ac].innerHTML;var K=P.replace(/[ \t\r\n]/g,"");if(K!="<br/>"&&K!="<br>"&&K!='<br mce_bogus="1"/>'&&(ac+aa>0)){aq.innerHTML+=P}if(ao[aa][ac]!=aq&&!ao[aa][ac]._deleted){var o=al(ad,ao[aa][ac]);var ar=ao[aa][ac].parentNode;ar.removeChild(ao[aa][ac]);ao[aa][ac]._deleted=true;if(!ar.hasChildNodes()){ar.parentNode.removeChild(ar);var ab=null;for(var ac=0;cellElm=d(ad,o.rowindex,ac);ac++){if(cellElm!=ab&&cellElm.rowSpan>1){cellElm.rowSpan--}ab=cellElm}if(aq.rowSpan>1){aq.rowSpan--}}}}}a(au.dom.select("br",aq),function(y,x){if(x>0&&au.dom.getAttrib(y,"mce_bogus")){au.dom.remove(y)}});break}F=V.dom.getParent(V.selection.getNode(),"table");V.addVisual(F);V.nodeChanged()}return true}return false}});tinymce.PluginManager.add("table",tinymce.plugins.TablePlugin)})();
1
+ (function(){var b=tinymce.each;function a(d,e){var f=e.ownerDocument,c=f.createRange(),g;c.setStartBefore(e);c.setEnd(d.endContainer,d.endOffset);g=f.createElement("body");g.appendChild(c.cloneContents());return g.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length==0}tinymce.create("tinymce.plugins.TablePlugin",{init:function(c,d){var e=this;e.editor=c;e.url=d;b([["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(f){c.addButton(f[0],{title:f[1],cmd:f[2],ui:f[3]})});if(c.getParam("inline_styles")){c.onPreProcess.add(function(f,h){var g=f.dom;b(g.select("table",h.node),function(j){var i;if(i=g.getAttrib(j,"width")){g.setStyle(j,"width",i);g.setAttrib(j,"width")}if(i=g.getAttrib(j,"height")){g.setStyle(j,"height",i);g.setAttrib(j,"height")}})})}c.onInit.add(function(){if(!tinymce.isIE&&c.getParam("forced_root_block")){function f(){var g=c.getBody().lastChild;if(g&&g.nodeName=="TABLE"){c.dom.add(c.getBody(),"p",null,'<br mce_bogus="1" />')}}if(tinymce.isGecko){c.onKeyDown.add(function(h,j){var g,i,k=h.dom;if(j.keyCode==37||j.keyCode==38){g=h.selection.getRng();i=k.getParent(g.startContainer,"table");if(i&&h.getBody().firstChild==i){if(a(g,i)){g=k.createRng();g.setStartBefore(i);g.setEndBefore(i);h.selection.setRng(g);j.preventDefault()}}}})}c.onKeyUp.add(f);c.onSetContent.add(f);c.onVisualAid.add(f);c.onPreProcess.add(function(g,i){var h=i.node.lastChild;if(h&&h.childNodes.length==1&&h.firstChild.nodeName=="BR"){g.dom.remove(h)}});f()}if(c&&c.plugins.contextmenu){c.plugins.contextmenu.onContextMenu.add(function(i,g,k){var l,j=c.selection,h=j.getNode()||c.getBody();if(c.dom.getParent(k,"td")||c.dom.getParent(k,"th")){g.removeAll();if(h.nodeName=="A"&&!c.dom.getAttrib(h,"name")){g.add({title:"advanced.link_desc",icon:"link",cmd:c.plugins.advlink?"mceAdvLink":"mceLink",ui:true});g.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});g.addSeparator()}if(h.nodeName=="IMG"&&h.className.indexOf("mceItem")==-1){g.add({title:"advanced.image_desc",icon:"image",cmd:c.plugins.advimage?"mceAdvImage":"mceImage",ui:true});g.addSeparator()}g.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",ui:true,value:{action:"insert"}});g.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable",ui:true});g.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete",ui:true});g.addSeparator();l=g.addMenu({title:"table.cell"});l.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps",ui:true});l.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells",ui:true});l.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells",ui:true});l=g.addMenu({title:"table.row"});l.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps",ui:true});l.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});l.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});l.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});l.addSeparator();l.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});l.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});l.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"});l.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"});l=g.addMenu({title:"table.col"});l.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});l.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});l.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{g.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",ui:true})}})}});c.onKeyDown.add(function(f,g){if(g.keyCode==9&&f.dom.getParent(f.selection.getNode(),"TABLE")){if(!tinymce.isGecko&&!tinymce.isOpera){tinyMCE.execInstanceCommand(f.editorId,"mceTableMoveToNextRow",true);return tinymce.dom.Event.cancel(g)}f.undoManager.add()}});if(!tinymce.isIE){if(c.getParam("table_selection",true)){c.onClick.add(function(f,g){g=g.target;if(g.nodeName==="TABLE"){f.selection.select(g)}})}}c.onNodeChange.add(function(g,f,i){var h=g.dom.getParent(i,"td,th,caption");f.setActive("table",i.nodeName==="TABLE"||!!h);if(h&&h.nodeName==="CAPTION"){h=null}f.setDisabled("delete_table",!h);f.setDisabled("delete_col",!h);f.setDisabled("delete_table",!h);f.setDisabled("delete_row",!h);f.setDisabled("col_after",!h);f.setDisabled("col_before",!h);f.setDisabled("row_after",!h);f.setDisabled("row_before",!h);f.setDisabled("row_props",!h);f.setDisabled("cell_props",!h);f.setDisabled("split_cells",!h||(parseInt(g.dom.getAttrib(h,"colspan","1"))<2&&parseInt(g.dom.getAttrib(h,"rowspan","1"))<2));f.setDisabled("merge_cells",!h)});if(!tinymce.isIE){c.onBeforeSetContent.add(function(f,g){if(g.initial){g.content=g.content.replace(/<(td|th)([^>]+|)>\s*<\/(td|th)>/g,tinymce.isOpera?"<$1$2>&nbsp;</$1>":'<$1$2><br mce_bogus="1" /></$1>')}})}},execCommand:function(f,e,g){var d=this.editor,c;switch(f){case"mceTableMoveToNextRow":case"mceInsertTable":case"mceTableRowProps":case"mceTableCellProps":case"mceTableSplitCells":case"mceTableMergeCells":case"mceTableInsertRowBefore":case"mceTableInsertRowAfter":case"mceTableDeleteRow":case"mceTableInsertColBefore":case"mceTableInsertColAfter":case"mceTableDeleteCol":case"mceTableCutRow":case"mceTableCopyRow":case"mceTablePasteRowBefore":case"mceTablePasteRowAfter":case"mceTableDelete":d.execCommand("mceBeginUndoLevel");this._doExecCommand(f,e,g);d.execCommand("mceEndUndoLevel");return true}return false},getInfo:function(){return{longname:"Tables",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/table",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_doExecCommand:function(s,aa,af){var W=this.editor,av=W,h=this.url;var o=W.selection.getNode();var X=W.dom.getParent(o,"tr");var ar=W.dom.getParent(o,"td,th");var G=W.dom.getParent(o,"table");var l=W.contentWindow.document;var aw=G?G.getAttribute("border"):"";if(X&&ar==null){ar=X.cells[0]}function aq(y,x){for(var ay=0;ay<y.length;ay++){if(y[ay].length>0&&aq(y[ay],x)){return true}if(y[ay]==x){return true}}return false}function ak(x,i){var y;ae=f(G);x=x||0;i=i||0;x=Math.max(p.cellindex+x,0);i=Math.max(p.rowindex+i,0);W.execCommand("mceRepaint");y=e(ae,i,x);if(y){W.selection.select(y.firstChild||y);W.selection.collapse(1)}}function ai(){var i=l.createElement("td");if(!tinymce.isIE){i.innerHTML='<br mce_bogus="1"/>'}}function k(y){var x=W.dom.getAttrib(y,"colspan");var i=W.dom.getAttrib(y,"rowspan");x=x==""?1:parseInt(x);i=i==""?1:parseInt(i);return{colspan:x,rowspan:i}}function am(ay,aA){var i,az;for(az=0;az<ay.length;az++){for(i=0;i<ay[az].length;i++){if(ay[az][i]==aA){return{cellindex:i,rowindex:az}}}}return null}function e(x,y,i){if(x[y]&&x[y][i]){return x[y][i]}return null}function B(aD,ay){var aA=[],y=0,aB,az,ay,aC;for(aB=0;aB<aD.rows.length;aB++){for(az=0;az<aD.rows[aB].cells.length;az++,y++){aA[y]=aD.rows[aB].cells[az]}}for(aB=0;aB<aA.length;aB++){if(aA[aB]==ay){if(aC=aA[aB+1]){return aC}}}}function f(aF){var i=[],aG=aF.rows,aD,aC,az,aA,aE,ay,aB;for(aC=0;aC<aG.length;aC++){for(aD=0;aD<aG[aC].cells.length;aD++){az=aG[aC].cells[aD];aA=k(az);for(aE=aD;i[aC]&&i[aC][aE];aE++){}for(aB=aC;aB<aC+aA.rowspan;aB++){if(!i[aB]){i[aB]=[]}for(ay=aE;ay<aE+aA.colspan;ay++){i[aB][ay]=az}}}}return i}function n(aH,aE,az,ay){var y=f(aH),aG=am(y,az);var aI,aD;if(ay.cells.length!=aE.childNodes.length){aI=aE.childNodes;aD=null;for(var aF=0;az=e(y,aG.rowindex,aF);aF++){var aB=true;var aC=k(az);if(aq(aI,az)){ay.childNodes[aF]._delete=true}else{if((aD==null||az!=aD)&&aC.colspan>1){for(var aA=aF;aA<aF+az.colSpan;aA++){ay.childNodes[aA]._delete=true}}}if((aD==null||az!=aD)&&aC.rowspan>1){az.rowSpan=aC.rowspan+1}aD=az}C(G)}}function P(x,i){while((x=x.previousSibling)!=null){if(x.nodeName==i){return x}}return null}function ag(ay,az){var x=az.split(",");while((ay=ay.nextSibling)!=null){for(var y=0;y<x.length;y++){if(ay.nodeName.toLowerCase()==x[y].toLowerCase()){return ay}}}return null}function C(ay){if(ay.rows==0){return}var y=ay.rows[0];do{var x=ag(y,"TR");if(y._delete){y.parentNode.removeChild(y);continue}var az=y.cells[0];if(az.cells>1){do{var i=ag(az,"TD,TH");if(az._delete){az.parentNode.removeChild(az)}}while((az=i)!=null)}}while((y=x)!=null)}function q(ay,aB,aA){ay.rowSpan=1;var x=ag(aB,"TR");for(var az=1;az<aA&&x;az++){var y=l.createElement("td");if(!tinymce.isIE){y.innerHTML='<br mce_bogus="1"/>'}if(tinymce.isIE){x.insertBefore(y,x.cells(ay.cellIndex))}else{x.insertBefore(y,x.cells[ay.cellIndex])}x=ag(x,"TR")}}function T(aG,aI,aC){var y=f(aI);var ay=aC.cloneNode(false);var aH=am(y,aC.cells[0]);var aD=null;var aB=W.dom.getAttrib(aI,"border");var aA=null;for(var aF=0;aA=e(y,aH.rowindex,aF);aF++){var aE=null;if(aD!=aA){for(var az=0;az<aC.cells.length;az++){if(aA==aC.cells[az]){aE=aA.cloneNode(true);break}}}if(aE==null){aE=aG.createElement("td");if(!tinymce.isIE){aE.innerHTML='<br mce_bogus="1"/>'}}aE.colSpan=1;aE.rowSpan=1;ay.appendChild(aE);aD=aA}return ay}switch(s){case"mceTableMoveToNextRow":var M=B(G,ar);if(!M){W.execCommand("mceTableInsertRowAfter",ar);M=B(G,ar)}W.selection.select(M);W.selection.collapse(true);return true;case"mceTableRowProps":if(X==null){return true}if(aa){W.windowManager.open({url:h+"/row.htm",width:400+parseInt(W.getLang("table.rowprops_delta_width",0)),height:295+parseInt(W.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:h})}return true;case"mceTableCellProps":if(ar==null){return true}if(aa){W.windowManager.open({url:h+"/cell.htm",width:400+parseInt(W.getLang("table.cellprops_delta_width",0)),height:295+parseInt(W.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:h})}return true;case"mceInsertTable":if(aa){W.windowManager.open({url:h+"/table.htm",width:400+parseInt(W.getLang("table.table_delta_width",0)),height:320+parseInt(W.getLang("table.table_delta_height",0)),inline:1},{plugin_url:h,action:af?af.action:0})}return true;case"mceTableDelete":var H=W.dom.getParent(W.selection.getNode(),"table");if(H){H.parentNode.removeChild(H);W.execCommand("mceRepaint")}return true;case"mceTableSplitCells":case"mceTableMergeCells":case"mceTableInsertRowBefore":case"mceTableInsertRowAfter":case"mceTableDeleteRow":case"mceTableInsertColBefore":case"mceTableInsertColAfter":case"mceTableDeleteCol":case"mceTableCutRow":case"mceTableCopyRow":case"mceTablePasteRowBefore":case"mceTablePasteRowAfter":if(!G){return true}if(X&&G!=X.parentNode){G=X.parentNode}if(G&&X){switch(s){case"mceTableCutRow":if(!X||!ar){return true}W.tableRowClipboard=T(l,G,X);W.execCommand("mceTableDeleteRow");break;case"mceTableCopyRow":if(!X||!ar){return true}W.tableRowClipboard=T(l,G,X);break;case"mceTablePasteRowBefore":if(!X||!ar){return true}var w=W.tableRowClipboard.cloneNode(true);var j=P(X,"TR");if(j!=null){n(G,j,j.cells[0],w)}X.parentNode.insertBefore(w,X);break;case"mceTablePasteRowAfter":if(!X||!ar){return true}var Y=ag(X,"TR");var w=W.tableRowClipboard.cloneNode(true);n(G,X,ar,w);if(Y==null){X.parentNode.appendChild(w)}else{Y.parentNode.insertBefore(w,Y)}break;case"mceTableInsertRowBefore":if(!X||!ar){return true}var ae=f(G);var p=am(ae,ar);var w=l.createElement("tr");var v=null;p.rowindex--;if(p.rowindex<0){p.rowindex=0}for(var ad=0;ar=e(ae,p.rowindex,ad);ad++){if(ar!=v){var F=k(ar);if(F.rowspan==1){var K=l.createElement("td");if(!tinymce.isIE){K.innerHTML='<br mce_bogus="1"/>'}K.colSpan=ar.colSpan;w.appendChild(K)}else{ar.rowSpan=F.rowspan+1}v=ar}}X.parentNode.insertBefore(w,X);ak(0,1);break;case"mceTableInsertRowAfter":if(!X||!ar){return true}var ae=f(G);var p=am(ae,ar);var w=l.createElement("tr");var v=null;for(var ad=0;ar=e(ae,p.rowindex,ad);ad++){if(ar!=v){var F=k(ar);if(F.rowspan==1){var K=l.createElement("td");if(!tinymce.isIE){K.innerHTML='<br mce_bogus="1"/>'}K.colSpan=ar.colSpan;w.appendChild(K)}else{ar.rowSpan=F.rowspan+1}v=ar}}if(w.hasChildNodes()){var Y=ag(X,"TR");if(Y){Y.parentNode.insertBefore(w,Y)}else{G.appendChild(w)}}ak(0,1);break;case"mceTableDeleteRow":if(!X||!ar){return true}var ae=f(G);var p=am(ae,ar);if(ae.length==1&&G.nodeName=="TBODY"){W.dom.remove(W.dom.getParent(G,"table"));return true}var E=X.cells;var Y=ag(X,"TR");for(var ad=0;ad<E.length;ad++){if(E[ad].rowSpan>1){var K=E[ad].cloneNode(true);var F=k(E[ad]);K.rowSpan=F.rowspan-1;var al=Y.cells[ad];if(al==null){Y.appendChild(K)}else{Y.insertBefore(K,al)}}}var v=null;for(var ad=0;ar=e(ae,p.rowindex,ad);ad++){if(ar!=v){var F=k(ar);if(F.rowspan>1){ar.rowSpan=F.rowspan-1}else{X=ar.parentNode;if(X.parentNode){X._delete=true}}v=ar}}C(G);ak(0,-1);break;case"mceTableInsertColBefore":if(!X||!ar){return true}var ae=f(W.dom.getParent(G,"table"));var p=am(ae,ar);var v=null;for(var ab=0;ar=e(ae,ab,p.cellindex);ab++){if(ar!=v){var F=k(ar);if(F.colspan==1){var K=l.createElement(ar.nodeName);if(!tinymce.isIE){K.innerHTML='<br mce_bogus="1"/>'}K.rowSpan=ar.rowSpan;ar.parentNode.insertBefore(K,ar)}else{ar.colSpan++}v=ar}}ak();break;case"mceTableInsertColAfter":if(!X||!ar){return true}var ae=f(W.dom.getParent(G,"table"));var p=am(ae,ar);var v=null;for(var ab=0;ar=e(ae,ab,p.cellindex);ab++){if(ar!=v){var F=k(ar);if(F.colspan==1){var K=l.createElement(ar.nodeName);if(!tinymce.isIE){K.innerHTML='<br mce_bogus="1"/>'}K.rowSpan=ar.rowSpan;var al=ag(ar,"TD,TH");if(al==null){ar.parentNode.appendChild(K)}else{al.parentNode.insertBefore(K,al)}}else{ar.colSpan++}v=ar}}ak(1);break;case"mceTableDeleteCol":if(!X||!ar){return true}var ae=f(G);var p=am(ae,ar);var v=null;if((ae.length>1&&ae[0].length<=1)&&G.nodeName=="TBODY"){W.dom.remove(W.dom.getParent(G,"table"));return true}for(var ab=0;ar=e(ae,ab,p.cellindex);ab++){if(ar!=v){var F=k(ar);if(F.colspan>1){ar.colSpan=F.colspan-1}else{if(ar.parentNode){ar.parentNode.removeChild(ar)}}v=ar}}ak(-1);break;case"mceTableSplitCells":if(!X||!ar){return true}var m=k(ar);var D=m.colspan;var I=m.rowspan;if(D>1||I>1){ar.colSpan=1;for(var an=1;an<D;an++){var K=l.createElement("td");if(!tinymce.isIE){K.innerHTML='<br mce_bogus="1"/>'}X.insertBefore(K,ag(ar,"TD,TH"));if(I>1){q(K,X,I)}}q(ar,X,I)}G=W.dom.getParent(W.selection.getNode(),"table");break;case"mceTableMergeCells":var ap=[];var S=W.selection.getSel();var ae=f(G);if(tinymce.isIE||S.rangeCount==1){if(aa){var u=k(ar);W.windowManager.open({url:h+"/merge_cells.htm",width:240+parseInt(W.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(W.getLang("table.merge_cells_delta_height",0)),inline:1},{action:"update",numcols:u.colspan,numrows:u.rowspan,plugin_url:h});return true}else{var V=parseInt(af.numrows);var d=parseInt(af.numcols);var p=am(ae,ar);if((""+V)=="NaN"){V=1}if((""+d)=="NaN"){d=1}var c=G.rows;for(var ab=p.rowindex;ab<ae.length;ab++){var ah=[];for(var ad=p.cellindex;ad<ae[ab].length;ad++){var g=e(ae,ab,ad);if(g&&!aq(ap,g)&&!aq(ah,g)){var O=am(ae,g);if(O.cellindex<p.cellindex+d&&O.rowindex<p.rowindex+V){ah[ah.length]=g}}}if(ah.length>0){ap[ap.length]=ah}var g=e(ae,p.rowindex,p.cellindex);b(av.dom.select("br",g),function(y,x){if(x>0&&av.dom.getAttrib("mce_bogus")){av.dom.remove(y)}})}}}else{var E=[];var S=W.selection.getSel();var Z=null;var ao=null;var A=-1,ax=-1,z,au;if(S.rangeCount<2){return true}for(var an=0;an<S.rangeCount;an++){var aj=S.getRangeAt(an);var ar=aj.startContainer.childNodes[aj.startOffset];if(!ar){break}if(ar.nodeName=="TD"||ar.nodeName=="TH"){E[E.length]=ar}}var c=G.rows;for(var ab=0;ab<c.length;ab++){var ah=[];for(var ad=0;ad<c[ab].cells.length;ad++){var g=c[ab].cells[ad];for(var an=0;an<E.length;an++){if(g==E[an]){ah[ah.length]=g}}}if(ah.length>0){ap[ap.length]=ah}}var ao=[];var Z=null;for(var ab=0;ab<ae.length;ab++){for(var ad=0;ad<ae[ab].length;ad++){ae[ab][ad]._selected=false;for(var an=0;an<E.length;an++){if(ae[ab][ad]==E[an]){if(A==-1){A=ad;ax=ab}z=ad;au=ab;ae[ab][ad]._selected=true}}}}for(var ab=ax;ab<=au;ab++){for(var ad=A;ad<=z;ad++){if(!ae[ab][ad]._selected){alert("Invalid selection for merge.");return true}}}}var t=1,r=1;var U=-1;for(var ab=0;ab<ap.length;ab++){var J=0;for(var ad=0;ad<ap[ab].length;ad++){var F=k(ap[ab][ad]);J+=F.colspan;if(U!=-1&&F.rowspan!=U){alert("Invalid selection for merge.");return true}U=F.rowspan}if(J>r){r=J}U=-1}var R=-1;for(var ad=0;ad<ap[0].length;ad++){var N=0;for(var ab=0;ab<ap.length;ab++){var F=k(ap[ab][ad]);N+=F.rowspan;if(R!=-1&&F.colspan!=R){alert("Invalid selection for merge.");return true}R=F.colspan}if(N>t){t=N}R=-1}ar=ap[0][0];ar.rowSpan=t;ar.colSpan=r;for(var ab=0;ab<ap.length;ab++){for(var ad=0;ad<ap[ab].length;ad++){var Q=ap[ab][ad].innerHTML;var L=Q.replace(/[ \t\r\n]/g,"");if(L!="<br/>"&&L!="<br>"&&L!='<br mce_bogus="1"/>'&&(ad+ab>0)){ar.innerHTML+=Q}if(ap[ab][ad]!=ar&&!ap[ab][ad]._deleted){var p=am(ae,ap[ab][ad]);var at=ap[ab][ad].parentNode;at.removeChild(ap[ab][ad]);ap[ab][ad]._deleted=true;if(!at.hasChildNodes()){at.parentNode.removeChild(at);var ac=null;for(var ad=0;cellElm=e(ae,p.rowindex,ad);ad++){if(cellElm!=ac&&cellElm.rowSpan>1){cellElm.rowSpan--}ac=cellElm}if(ar.rowSpan>1){ar.rowSpan--}}}}}b(av.dom.select("br",ar),function(y,x){if(x>0&&av.dom.getAttrib(y,"mce_bogus")){av.dom.remove(y)}});break}G=W.dom.getParent(W.selection.getNode(),"table");W.addVisual(G);W.nodeChanged()}return true}return false}});tinymce.PluginManager.add("table",tinymce.plugins.TablePlugin)})();
mce/table/js/table.js CHANGED
@@ -24,14 +24,14 @@ function insertTable() {
24
  border = formObj.elements['border'].value != "" ? formObj.elements['border'].value : 0;
25
  cellpadding = formObj.elements['cellpadding'].value != "" ? formObj.elements['cellpadding'].value : "";
26
  cellspacing = formObj.elements['cellspacing'].value != "" ? formObj.elements['cellspacing'].value : "";
27
- align = formObj.elements['align'].options[formObj.elements['align'].selectedIndex].value;
28
- frame = formObj.elements['frame'].options[formObj.elements['frame'].selectedIndex].value;
29
- rules = formObj.elements['rules'].options[formObj.elements['rules'].selectedIndex].value;
30
  width = formObj.elements['width'].value;
31
  height = formObj.elements['height'].value;
32
  bordercolor = formObj.elements['bordercolor'].value;
33
  bgcolor = formObj.elements['bgcolor'].value;
34
- className = formObj.elements['class'].options[formObj.elements['class'].selectedIndex].value;
35
  id = formObj.elements['id'].value;
36
  summary = formObj.elements['summary'].value;
37
  style = formObj.elements['style'].value;
@@ -322,7 +322,7 @@ function init() {
322
 
323
  // Update form
324
  selectByValue(formObj, 'align', align);
325
- selectByValue(formObj, 'frame', frame);
326
  selectByValue(formObj, 'rules', rules);
327
  selectByValue(formObj, 'class', className, true, true);
328
  formObj.cols.value = cols;
24
  border = formObj.elements['border'].value != "" ? formObj.elements['border'].value : 0;
25
  cellpadding = formObj.elements['cellpadding'].value != "" ? formObj.elements['cellpadding'].value : "";
26
  cellspacing = formObj.elements['cellspacing'].value != "" ? formObj.elements['cellspacing'].value : "";
27
+ align = getSelectValue(formObj, "align");
28
+ frame = getSelectValue(formObj, "tframe");
29
+ rules = getSelectValue(formObj, "rules");
30
  width = formObj.elements['width'].value;
31
  height = formObj.elements['height'].value;
32
  bordercolor = formObj.elements['bordercolor'].value;
33
  bgcolor = formObj.elements['bgcolor'].value;
34
+ className = getSelectValue(formObj, "class");
35
  id = formObj.elements['id'].value;
36
  summary = formObj.elements['summary'].value;
37
  style = formObj.elements['style'].value;
322
 
323
  // Update form
324
  selectByValue(formObj, 'align', align);
325
+ selectByValue(formObj, 'tframe', frame);
326
  selectByValue(formObj, 'rules', rules);
327
  selectByValue(formObj, 'class', className, true, true);
328
  formObj.cols.value = cols;
mce/table/merge_cells.htm CHANGED
@@ -2,10 +2,10 @@
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#table_dlg.merge_cells_title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=3241-1141"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=3241-1141"></script>
7
- <script type="text/javascript" src="../../utils/validate.js?ver=3241-1141"></script>
8
- <script type="text/javascript" src="js/merge_cells.js?ver=3241-1141"></script>
9
  </head>
10
  <body style="margin: 8px">
11
  <form onsubmit="mergeCells();return false;" action="#">
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#table_dlg.merge_cells_title}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js?ver=327-1235"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=327-1235"></script>
7
+ <script type="text/javascript" src="../../utils/validate.js?ver=327-1235"></script>
8
+ <script type="text/javascript" src="js/merge_cells.js?ver=327-1235"></script>
9
  </head>
10
  <body style="margin: 8px">
11
  <form onsubmit="mergeCells();return false;" action="#">
mce/table/row.htm CHANGED
@@ -2,12 +2,12 @@
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#table_dlg.row_title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=3241-1141"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=3241-1141"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=3241-1141"></script>
8
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=3241-1141"></script>
9
- <script type="text/javascript" src="js/row.js?ver=3241-1141"></script>
10
- <link href="css/row.css?ver=3241-1141" rel="stylesheet" type="text/css" />
11
  </head>
12
  <body id="tablerow" style="display: none">
13
  <form onsubmit="updateAction();return false;" action="#">
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#table_dlg.row_title}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js?ver=327-1235"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=327-1235"></script>
7
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=327-1235"></script>
8
+ <script type="text/javascript" src="../../utils/editable_selects.js?ver=327-1235"></script>
9
+ <script type="text/javascript" src="js/row.js?ver=327-1235"></script>
10
+ <link href="css/row.css?ver=327-1235" rel="stylesheet" type="text/css" />
11
  </head>
12
  <body id="tablerow" style="display: none">
13
  <form onsubmit="updateAction();return false;" action="#">
mce/table/table.htm CHANGED
@@ -2,13 +2,13 @@
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#table_dlg.title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=3241-1141"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=3241-1141"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=3241-1141"></script>
8
- <script type="text/javascript" src="../../utils/validate.js?ver=3241-1141"></script>
9
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=3241-1141"></script>
10
- <script type="text/javascript" src="js/table.js?ver=3241-1141"></script>
11
- <link href="css/table.css?ver=3241-1141" rel="stylesheet" type="text/css" />
12
  </head>
13
  <body id="table" style="display: none">
14
  <form onsubmit="insertTable();return false;" action="#">
@@ -108,9 +108,9 @@
108
  </tr>
109
 
110
  <tr>
111
- <td class="column1"><label for="frame">{#table_dlg.frame}</label></td>
112
  <td>
113
- <select id="frame" name="frame" class="advfield">
114
  <option value="">{#not_set}</option>
115
  <option value="void">{#table_dlg.rules_void}</option>
116
  <option value="above">{#table_dlg.rules_above}</option>
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#table_dlg.title}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js?ver=327-1235"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=327-1235"></script>
7
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=327-1235"></script>
8
+ <script type="text/javascript" src="../../utils/validate.js?ver=327-1235"></script>
9
+ <script type="text/javascript" src="../../utils/editable_selects.js?ver=327-1235"></script>
10
+ <script type="text/javascript" src="js/table.js?ver=327-1235"></script>
11
+ <link href="css/table.css?ver=327-1235" rel="stylesheet" type="text/css" />
12
  </head>
13
  <body id="table" style="display: none">
14
  <form onsubmit="insertTable();return false;" action="#">
108
  </tr>
109
 
110
  <tr>
111
+ <td class="column1"><label for="tframe">{#table_dlg.frame}</label></td>
112
  <td>
113
+ <select id="tframe" name="tframe" class="advfield">
114
  <option value="">{#not_set}</option>
115
  <option value="void">{#table_dlg.rules_void}</option>
116
  <option value="above">{#table_dlg.rules_above}</option>
mce/xhtmlxtras/abbr.htm CHANGED
@@ -2,13 +2,13 @@
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#xhtmlxtras_dlg.title_abbr_element}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=3241-1141"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=3241-1141"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=3241-1141"></script>
8
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=3241-1141"></script>
9
- <script type="text/javascript" src="js/element_common.js?ver=3241-1141"></script>
10
- <script type="text/javascript" src="js/abbr.js?ver=3241-1141"></script>
11
- <link rel="stylesheet" type="text/css" href="css/popup.css?ver=3241-1141" />
12
  </head>
13
  <body style="display: none">
14
  <form onsubmit="insertAbbr();return false;" action="#">
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#xhtmlxtras_dlg.title_abbr_element}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js?ver=327-1235"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=327-1235"></script>
7
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=327-1235"></script>
8
+ <script type="text/javascript" src="../../utils/editable_selects.js?ver=327-1235"></script>
9
+ <script type="text/javascript" src="js/element_common.js?ver=327-1235"></script>
10
+ <script type="text/javascript" src="js/abbr.js?ver=327-1235"></script>
11
+ <link rel="stylesheet" type="text/css" href="css/popup.css?ver=327-1235" />
12
  </head>
13
  <body style="display: none">
14
  <form onsubmit="insertAbbr();return false;" action="#">
mce/xhtmlxtras/acronym.htm CHANGED
@@ -2,13 +2,13 @@
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#xhtmlxtras_dlg.title_acronym_element}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=3241-1141"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=3241-1141"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=3241-1141"></script>
8
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=3241-1141"></script>
9
- <script type="text/javascript" src="js/element_common.js?ver=3241-1141"></script>
10
- <script type="text/javascript" src="js/acronym.js?ver=3241-1141"></script>
11
- <link rel="stylesheet" type="text/css" href="css/popup.css?ver=3241-1141" />
12
  </head>
13
  <body style="display: none">
14
  <form onsubmit="insertAcronym();return false;" action="#">
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#xhtmlxtras_dlg.title_acronym_element}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js?ver=327-1235"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=327-1235"></script>
7
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=327-1235"></script>
8
+ <script type="text/javascript" src="../../utils/editable_selects.js?ver=327-1235"></script>
9
+ <script type="text/javascript" src="js/element_common.js?ver=327-1235"></script>
10
+ <script type="text/javascript" src="js/acronym.js?ver=327-1235"></script>
11
+ <link rel="stylesheet" type="text/css" href="css/popup.css?ver=327-1235" />
12
  </head>
13
  <body style="display: none">
14
  <form onsubmit="insertAcronym();return false;" action="#">
mce/xhtmlxtras/attributes.htm CHANGED
@@ -2,12 +2,12 @@
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#xhtmlxtras_dlg.attribs_title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=3241-1141"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=3241-1141"></script>
7
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=3241-1141"></script>
8
- <script type="text/javascript" src="../../utils/form_utils.js?ver=3241-1141"></script>
9
- <script type="text/javascript" src="js/attributes.js?ver=3241-1141"></script>
10
- <link rel="stylesheet" type="text/css" href="css/attributes.css?ver=3241-1141" />
11
  </head>
12
  <body style="display: none">
13
  <form onsubmit="insertAction();return false;" action="#">
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#xhtmlxtras_dlg.attribs_title}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js?ver=327-1235"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=327-1235"></script>
7
+ <script type="text/javascript" src="../../utils/editable_selects.js?ver=327-1235"></script>
8
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=327-1235"></script>
9
+ <script type="text/javascript" src="js/attributes.js?ver=327-1235"></script>
10
+ <link rel="stylesheet" type="text/css" href="css/attributes.css?ver=327-1235" />
11
  </head>
12
  <body style="display: none">
13
  <form onsubmit="insertAction();return false;" action="#">
mce/xhtmlxtras/cite.htm CHANGED
@@ -2,13 +2,13 @@
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#xhtmlxtras_dlg.title_cite_element}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=3241-1141"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=3241-1141"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=3241-1141"></script>
8
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=3241-1141"></script>
9
- <script type="text/javascript" src="js/element_common.js?ver=3241-1141"></script>
10
- <script type="text/javascript" src="js/cite.js?ver=3241-1141"></script>
11
- <link rel="stylesheet" type="text/css" href="css/popup.css?ver=3241-1141" />
12
  </head>
13
  <body style="display: none">
14
  <form onsubmit="insertCite();return false;" action="#">
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#xhtmlxtras_dlg.title_cite_element}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js?ver=327-1235"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=327-1235"></script>
7
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=327-1235"></script>
8
+ <script type="text/javascript" src="../../utils/editable_selects.js?ver=327-1235"></script>
9
+ <script type="text/javascript" src="js/element_common.js?ver=327-1235"></script>
10
+ <script type="text/javascript" src="js/cite.js?ver=327-1235"></script>
11
+ <link rel="stylesheet" type="text/css" href="css/popup.css?ver=327-1235" />
12
  </head>
13
  <body style="display: none">
14
  <form onsubmit="insertCite();return false;" action="#">
mce/xhtmlxtras/del.htm CHANGED
@@ -2,13 +2,13 @@
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#xhtmlxtras_dlg.title_del_element}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=3241-1141"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=3241-1141"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=3241-1141"></script>
8
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=3241-1141"></script>
9
- <script type="text/javascript" src="js/element_common.js?ver=3241-1141"></script>
10
- <script type="text/javascript" src="js/del.js?ver=3241-1141"></script>
11
- <link rel="stylesheet" type="text/css" href="css/popup.css?ver=3241-1141" />
12
  </head>
13
  <body id="xhtmlxtrasins" style="display: none">
14
  <form onsubmit="insertDel();return false;" action="#">
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#xhtmlxtras_dlg.title_del_element}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js?ver=327-1235"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=327-1235"></script>
7
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=327-1235"></script>
8
+ <script type="text/javascript" src="../../utils/editable_selects.js?ver=327-1235"></script>
9
+ <script type="text/javascript" src="js/element_common.js?ver=327-1235"></script>
10
+ <script type="text/javascript" src="js/del.js?ver=327-1235"></script>
11
+ <link rel="stylesheet" type="text/css" href="css/popup.css?ver=327-1235" />
12
  </head>
13
  <body id="xhtmlxtrasins" style="display: none">
14
  <form onsubmit="insertDel();return false;" action="#">
mce/xhtmlxtras/ins.htm CHANGED
@@ -2,13 +2,13 @@
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#xhtmlxtras_dlg.title_ins_element}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=3241-1141"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=3241-1141"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=3241-1141"></script>
8
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=3241-1141"></script>
9
- <script type="text/javascript" src="js/element_common.js?ver=3241-1141"></script>
10
- <script type="text/javascript" src="js/ins.js?ver=3241-1141"></script>
11
- <link rel="stylesheet" type="text/css" href="css/popup.css?ver=3241-1141" />
12
  </head>
13
  <body id="xhtmlxtrasins" style="display: none">
14
  <form onsubmit="insertIns();return false;" action="#">
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>{#xhtmlxtras_dlg.title_ins_element}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js?ver=327-1235"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=327-1235"></script>
7
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=327-1235"></script>
8
+ <script type="text/javascript" src="../../utils/editable_selects.js?ver=327-1235"></script>
9
+ <script type="text/javascript" src="js/element_common.js?ver=327-1235"></script>
10
+ <script type="text/javascript" src="js/ins.js?ver=327-1235"></script>
11
+ <link rel="stylesheet" type="text/css" href="css/popup.css?ver=327-1235" />
12
  </head>
13
  <body id="xhtmlxtrasins" style="display: none">
14
  <form onsubmit="insertIns();return false;" action="#">
readme.txt CHANGED
@@ -2,31 +2,15 @@
2
  Contributors: Andrew Ozz
3
  Donate link:
4
  Tags: wysiwyg, formatting, tinymce, write, edit, post
5
- Requires at least: 2.8
6
- Tested up to: 2.8
7
- Stable tag: 3.2.4
8
 
9
- Enables most of the advanced features of TinyMCE, the WordPress WYSIWYG editor.
10
 
11
  == Description ==
12
 
13
- This plugin adds 15 plugins to [TinyMCE](http://tinymce.moxiecode.com/): Advanced hr, Advanced Image, Advanced Link, Context Menu, Emotions (Smilies), Date and Time, IESpell, Layer, Nonbreaking, Print, Search and Replace, Style, Table, Visual Characters and XHTML Extras.
14
-
15
- Version 2.0 includes an admin page for arranging the TinyMCE toolbar buttons, easy installation, a lot of bugfixes, customized "Smilies" plugin that uses the built-in WordPress smilies, etc. The admin page uses jQuery and jQuery UI that lets you "drag and drop" the TinyMCE buttons to arrange your own toolbars and enables/disables the corresponding plugins depending on the used buttons.
16
-
17
- Version 2.1: Improved language selection, improved compatibility with WordPress 2.3 and TinyMCE 2.1.1.1, option to override some of the imported css classes and other small improvements and bugfixes.
18
-
19
- Version 2.2: Deactivate/Uninstall option page, font size drop-down menu and other small changes.
20
-
21
- Version 3.0: Support for WordPress 2.5 and TinyMCE 3.0.
22
-
23
- Version 3.0.1: Compatibility with WordPress 2.5.1 and TinyMCE 3.0.7, added option to disable the removal of P and BR tags when saving and in the HTML editor (autop), added two more buttons to the HTML editor: autop and undo, fixed the removal of non-default TinyMCE buttons.
24
-
25
- Version 3.1: Compatibility with WordPress 2.6 and TinyMCE 3.1, keeps empty paragrarhs when disabling the removal of P and BR tags, the buttons for MCImageManager and MCFileManager can be arranged (if installed).
26
-
27
- Version 3.2: Compatibility with WordPress 2.7 and TinyMCE 3.2, minor bug fixes.
28
-
29
- Version 3.2.4: Compatibility with WordPress 2.8 and TinyMCE 3.2.4, minor bug fixes.
30
 
31
  **Language Support:** The plugin interface in only in English, but the TinyMCE plugins include several translations: German, French, Italian, Spanish, Portuguese, Russian, Chinese and Japanese. More translations are available at the [TinyMCE web site](http://tinymce.moxiecode.com/download_i18n.php).
32
 
@@ -47,7 +31,7 @@ Version 3.2.4: Compatibility with WordPress 2.8 and TinyMCE 3.2.4, minor bug fix
47
  2. Unzip.
48
  3. Upload to the plugins directory (wp-content/plugins).
49
  4. Activate the plugin.
50
- 5. Set your preferences at "Manage - TinyMCE Advanced".
51
  6. Clear your browser cache.
52
 
53
 
@@ -58,11 +42,41 @@ Version 3.2.4: Compatibility with WordPress 2.8 and TinyMCE 3.2.4, minor bug fix
58
  3. Follow the above steps to install the new version.
59
 
60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  == Frequently Asked Questions ==
62
 
63
  = No styles are imported in the Styles drop-down menu. =
64
 
65
- These styles (just the classes) are imported from your current theme style.css file. However some themes use @import to load the actual css file(s). Tiny does not follow these links. To make the classes appear, add their names to tadv-mce.css file located in "tinymce-advanced/css". You do not need to copy the whole classes, just add the names, like that:
66
 
67
  .my-class{}
68
  .my-other-class{}
@@ -77,7 +91,11 @@ The "Emotions" button in TinyMCE adds the codes for the smilies. The actual imag
77
 
78
  = The plugin does not add any buttons. =
79
 
80
- Make sure the "Use the visual editor when writing" checkbox under "Users - Your Profile" is checked.
 
 
 
 
81
 
82
  = Other questions? More screenshots? =
83
 
2
  Contributors: Andrew Ozz
3
  Donate link:
4
  Tags: wysiwyg, formatting, tinymce, write, edit, post
5
+ Requires at least: 2.9
6
+ Tested up to: 2.9
7
+ Stable tag: 3.2.7
8
 
9
+ Enables the advanced features of TinyMCE, the WordPress WYSIWYG editor.
10
 
11
  == Description ==
12
 
13
+ This plugin adds 15 plugins to [TinyMCE](http://tinymce.moxiecode.com/): Advanced HR, Advanced Image, Advanced Link, Context Menu, Emotions (Smilies), Date and Time, IESpell, Layer, Nonbreaking, Print, Search and Replace, Style, Table, Visual Characters and XHTML Extras.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
  **Language Support:** The plugin interface in only in English, but the TinyMCE plugins include several translations: German, French, Italian, Spanish, Portuguese, Russian, Chinese and Japanese. More translations are available at the [TinyMCE web site](http://tinymce.moxiecode.com/download_i18n.php).
16
 
31
  2. Unzip.
32
  3. Upload to the plugins directory (wp-content/plugins).
33
  4. Activate the plugin.
34
+ 5. Set your preferences at "Tools - TinyMCE Advanced".
35
  6. Clear your browser cache.
36
 
37
 
42
  3. Follow the above steps to install the new version.
43
 
44
 
45
+ == Changelog ==
46
+
47
+ = 3.2.7 =
48
+ Compatibility with WordPress 2.9 and TinyMCE 3.2.7, several minor bug fixes.
49
+
50
+ = 3.2.4 =
51
+ Compatibility with WordPress 2.8 and TinyMCE 3.2.4, minor bug fixes.
52
+
53
+ = 3.2 =
54
+ Compatibility with WordPress 2.7 and TinyMCE 3.2, minor bug fixes.
55
+
56
+ = 3.1 =
57
+ Compatibility with WordPress 2.6 and TinyMCE 3.1, keeps empty paragrarhs when disabling the removal of P and BR tags, the buttons for MCImageManager and MCFileManager can be arranged (if installed).
58
+
59
+ = 3.0.1 =
60
+ Compatibility with WordPress 2.5.1 and TinyMCE 3.0.7, added option to disable the removal of P and BR tags when saving and in the HTML editor (autop), added two more buttons to the HTML editor: autop and undo, fixed the removal of non-default TinyMCE buttons.
61
+
62
+ = 3.0 =
63
+ Support for WordPress 2.5 and TinyMCE 3.0.
64
+
65
+ = 2.2 =
66
+ Deactivate/Uninstall option page, font size drop-down menu and other small changes.
67
+
68
+ = 2.1 =
69
+ Improved language selection, improved compatibility with WordPress 2.3 and TinyMCE 2.1.1.1, option to override some of the imported css classes and other small improvements and bugfixes.
70
+
71
+ = 2.0 =
72
+ Includes an admin page for arranging the TinyMCE toolbar buttons, easy installation, a lot of bugfixes, customized "Smilies" plugin that uses the built-in WordPress smilies, etc. The admin page uses jQuery and jQuery UI that lets you "drag and drop" the TinyMCE buttons to arrange your own toolbars and enables/disables the corresponding plugins depending on the used buttons.
73
+
74
+
75
  == Frequently Asked Questions ==
76
 
77
  = No styles are imported in the Styles drop-down menu. =
78
 
79
+ These styles (just the classes) are imported from your current theme style.css file. However some themes use @import to load the actual css file(s). Tiny does not follow these links. To make the classes appear, add their names to tadv-mce.css file located in "tinymce-advanced/css". You do not need to copy the whole classes if you do not want them to appear in the editor, just add the names, like that:
80
 
81
  .my-class{}
82
  .my-other-class{}
91
 
92
  = The plugin does not add any buttons. =
93
 
94
+ Make sure the "Disable the visual editor when writing" checkbox under "Users - Your Profile" is **not** checked.
95
+
96
+ = I still see the "old" buttons in the editor =
97
+
98
+ Click on "Remove options" on the plugin settings page and then on "reload this page" to reset all buttons.
99
 
100
  = Other questions? More screenshots? =
101
 
tadv_admin.php CHANGED
@@ -36,7 +36,7 @@ $imgpath = WP_PLUGIN_URL . '/tinymce-advanced/images/';
36
  $tadv_toolbars = get_option('tadv_toolbars');
37
  if ( ! is_array($tadv_toolbars) ) {
38
  @include_once( WP_PLUGIN_DIR . '/tinymce-advanced/tadv_defaults.php');
39
- $tadv_options = array( 'advlink' => 1, 'advimage' => 1, 'importcss' => 0, 'contextmenu' => 0, 'tadvreplace' => 0 );
40
  } else {
41
  $tadv_options = get_option('tadv_options');
42
  $tadv_toolbars['toolbar_1'] = isset($tadv_toolbars['toolbar_1']) ? (array) $tadv_toolbars['toolbar_1'] : array();
@@ -309,7 +309,10 @@ if ( is_array($buttons) ) {
309
  </td></tr>
310
 
311
  <tr><td style="border:1px solid #CD0000;padding:2px 12px 8px;">
312
- <p style="font-weight:bold;color:#CD0000;"><?php _e('Advanced', 'tadv'); ?></p>
 
 
 
313
 
314
  <p><label for="importcss" class="tadv-box"><?php _e('Import the current theme CSS classes', 'tadv'); ?> &nbsp;
315
  <input type="checkbox" class="tadv-chk" name="importcss" id="importcss" <?php if ( $tadv_options['importcss'] == '1' ) echo ' checked="checked"'; ?> /></label></p>
36
  $tadv_toolbars = get_option('tadv_toolbars');
37
  if ( ! is_array($tadv_toolbars) ) {
38
  @include_once( WP_PLUGIN_DIR . '/tinymce-advanced/tadv_defaults.php');
39
+ $tadv_options = array( 'advlink' => 1, 'advimage' => 1, 'importcss' => 0, 'contextmenu' => 0, 'fix_autop' => 0 );
40
  } else {
41
  $tadv_options = get_option('tadv_options');
42
  $tadv_toolbars['toolbar_1'] = isset($tadv_toolbars['toolbar_1']) ? (array) $tadv_toolbars['toolbar_1'] : array();
309
  </td></tr>
310
 
311
  <tr><td style="border:1px solid #CD0000;padding:2px 12px 8px;">
312
+ <p style="font-weight:bold;color:#CD0000;"><?php _e('Advanced', 'tadv'); ?></p><?php
313
+
314
+ if ( function_exists('mceopt_admin') )
315
+ echo '<p><a href="' . admin_url('options-general.php?page=tinymce-options/tinymce-options.php') . '">' . __('Manage TinyMCE Options', 'tadv') . '</a></p>'; ?>
316
 
317
  <p><label for="importcss" class="tadv-box"><?php _e('Import the current theme CSS classes', 'tadv'); ?> &nbsp;
318
  <input type="checkbox" class="tadv-chk" name="importcss" id="importcss" <?php if ( $tadv_options['importcss'] == '1' ) echo ' checked="checked"'; ?> /></label></p>
tiny_mce_popup.js CHANGED
@@ -2,4 +2,4 @@
2
  // Uncomment and change this document.domain value if you are loading the script cross subdomains
3
  // document.domain = 'moxiecode.com';
4
 
5
- var tinymce=null,tinyMCEPopup,tinyMCE;tinyMCEPopup={init:function(){var b=this,a,c;a=b.getWin();tinymce=a.tinymce;tinyMCE=a.tinyMCE;b.editor=tinymce.EditorManager.activeEditor;b.params=b.editor.windowManager.params;b.features=b.editor.windowManager.features;b.dom=b.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document);if(b.features.popup_css!==false){b.dom.loadCSS(b.features.popup_css||b.editor.settings.popup_css)}b.listeners=[];b.onInit={add:function(e,d){b.listeners.push({func:e,scope:d})}};b.isWindow=!b.getWindowArg("mce_inline");b.id=b.getWindowArg("mce_window_id");b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return window.dialogArguments||opener||parent||top},getWindowArg:function(c,b){var a=this.params[c];return tinymce.is(a)?a:b},getParam:function(b,a){return this.editor.getParam(b,a)},getLang:function(b,a){return this.editor.getLang(b,a)},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},resizeToInnerSize:function(){var e=this,g,a=document.body,c=e.dom.getViewPort(window),d,f;d=e.getWindowArg("mce_width")-c.w;f=e.getWindowArg("mce_height")-c.h;if(e.isWindow){window.resizeBy(d,f)}else{e.editor.windowManager.resizeBy(d,f,e.id)}},executeOnLoad:function(s){this.onInit.add(function(){eval(s)})},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark("simple")},restoreSelection:function(){var a=tinyMCEPopup;if(!a.isWindow&&tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}},requireLangPack:function(){var b=this,a=b.getWindowArg("plugin_url")||b.getWindowArg("theme_url");if(a&&b.editor.settings.language&&b.features.translate_i18n!==false){a+="/langs/"+b.editor.settings.language+"_dlg.js";if(!tinymce.ScriptLoader.isDone(a)){document.write('<script type="text/javascript" src="'+tinymce._addVer(a)+'"><\/script>');tinymce.ScriptLoader.markDone(a)}}},pickColor:function(b,a){this.execCommand("mceColorPicker",true,{color:document.getElementById(a).value,func:function(e){document.getElementById(a).value=e;try{document.getElementById(a).onchange()}catch(d){}}})},openBrowser:function(a,c,b){tinyMCEPopup.restoreSelection();this.editor.execCallback("file_browser_callback",a,document.getElementById(a).value,c,window)},confirm:function(b,a,c){this.editor.windowManager.confirm(b,a,c,window)},alert:function(b,a,c){this.editor.windowManager.alert(b,a,c,window)},close:function(){var a=this;function b(){a.editor.windowManager.close(window);tinymce=tinyMCE=a.editor=a.params=a.dom=a.dom.doc=null}if(tinymce.isOpera){a.getWin().setTimeout(b,0)}else{b()}},_restoreSelection:function(){var a=window.event.srcElement;if(a.nodeName=="INPUT"&&(a.type=="submit"||a.type=="button")){tinyMCEPopup.restoreSelection()}},_onDOMLoaded:function(){var b=tinyMCEPopup,d=document.title,e,c,a;if(b.domLoaded){return}b.domLoaded=1;if(b.features.translate_i18n!==false){c=document.body.innerHTML;if(tinymce.isIE){c=c.replace(/ (value|title|alt)=([^"][^\s>]+)/gi,' $1="$2"')}document.dir=b.editor.getParam("directionality","");if((a=b.editor.translate(c))&&a!=c){document.body.innerHTML=a}if((a=b.editor.translate(d))&&a!=d){document.title=d=a}}document.body.style.display="";if(tinymce.isIE){document.attachEvent("onmouseup",tinyMCEPopup._restoreSelection);b.dom.add(b.dom.select("head")[0],"base",{target:"_self"})}b.restoreSelection();b.resizeToInnerSize();if(!b.isWindow){b.editor.windowManager.setTitle(window,d)}else{window.focus()}if(!tinymce.isIE&&!b.isWindow){tinymce.dom.Event._add(document,"focus",function(){b.editor.windowManager.focus(b.id)})}tinymce.each(b.dom.select("select"),function(f){f.onkeydown=tinyMCEPopup._accessHandler});tinymce.each(b.listeners,function(f){f.func.call(f.scope,b.editor)});if(b.getWindowArg("mce_auto_focus",true)){window.focus();tinymce.each(document.forms,function(g){tinymce.each(g.elements,function(f){if(b.dom.hasClass(f,"mceFocus")&&!f.disabled){f.focus();return false}})})}document.onkeyup=tinyMCEPopup._closeWinKeyHandler},_accessHandler:function(a){a=a||window.event;if(a.keyCode==13||a.keyCode==32){a=a.target||a.srcElement;if(a.onchange){a.onchange()}return tinymce.dom.Event.cancel(a)}},_closeWinKeyHandler:function(a){a=a||window.event;if(a.keyCode==27){tinyMCEPopup.close()}},_wait:function(){if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);tinyMCEPopup._onDOMLoaded()}});if(document.documentElement.doScroll&&window==window.top){(function(){if(tinyMCEPopup.domLoaded){return}try{document.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}tinyMCEPopup._onDOMLoaded()})()}document.attachEvent("onload",tinyMCEPopup._onDOMLoaded)}else{if(document.addEventListener){window.addEventListener("DOMContentLoaded",tinyMCEPopup._onDOMLoaded,false);window.addEventListener("load",tinyMCEPopup._onDOMLoaded,false)}}}};tinyMCEPopup.init();tinyMCEPopup._wait();
2
  // Uncomment and change this document.domain value if you are loading the script cross subdomains
3
  // document.domain = 'moxiecode.com';
4
 
5
+ var tinymce=null,tinyMCEPopup,tinyMCE;tinyMCEPopup={init:function(){var b=this,a,c;a=b.getWin();tinymce=a.tinymce;tinyMCE=a.tinyMCE;b.editor=tinymce.EditorManager.activeEditor;b.params=b.editor.windowManager.params;b.features=b.editor.windowManager.features;b.dom=b.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document);if(b.features.popup_css!==false){b.dom.loadCSS(b.features.popup_css||b.editor.settings.popup_css)}b.listeners=[];b.onInit={add:function(e,d){b.listeners.push({func:e,scope:d})}};b.isWindow=!b.getWindowArg("mce_inline");b.id=b.getWindowArg("mce_window_id");b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return(!window.frameElement&&window.dialogArguments)||opener||parent||top},getWindowArg:function(c,b){var a=this.params[c];return tinymce.is(a)?a:b},getParam:function(b,a){return this.editor.getParam(b,a)},getLang:function(b,a){return this.editor.getLang(b,a)},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},resizeToInnerSize:function(){var e=this,g,a=document.body,c=e.dom.getViewPort(window),d,f;d=e.getWindowArg("mce_width")-c.w;f=e.getWindowArg("mce_height")-c.h;if(e.isWindow){window.resizeBy(d,f)}else{e.editor.windowManager.resizeBy(d,f,e.id)}},executeOnLoad:function(s){this.onInit.add(function(){eval(s)})},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;if(!a.isWindow&&tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}},requireLangPack:function(){var b=this,a=b.getWindowArg("plugin_url")||b.getWindowArg("theme_url");if(a&&b.editor.settings.language&&b.features.translate_i18n!==false){a+="/langs/"+b.editor.settings.language+"_dlg.js";if(!tinymce.ScriptLoader.isDone(a)){document.write('<script type="text/javascript" src="'+tinymce._addVer(a)+'"><\/script>');tinymce.ScriptLoader.markDone(a)}}},pickColor:function(b,a){this.execCommand("mceColorPicker",true,{color:document.getElementById(a).value,func:function(e){document.getElementById(a).value=e;try{document.getElementById(a).onchange()}catch(d){}}})},openBrowser:function(a,c,b){tinyMCEPopup.restoreSelection();this.editor.execCallback("file_browser_callback",a,document.getElementById(a).value,c,window)},confirm:function(b,a,c){this.editor.windowManager.confirm(b,a,c,window)},alert:function(b,a,c){this.editor.windowManager.alert(b,a,c,window)},close:function(){var a=this;function b(){a.editor.windowManager.close(window);tinymce=tinyMCE=a.editor=a.params=a.dom=a.dom.doc=null}if(tinymce.isOpera){a.getWin().setTimeout(b,0)}else{b()}},_restoreSelection:function(){var a=window.event.srcElement;if(a.nodeName=="INPUT"&&(a.type=="submit"||a.type=="button")){tinyMCEPopup.restoreSelection()}},_onDOMLoaded:function(){var b=tinyMCEPopup,d=document.title,e,c,a;if(b.domLoaded){return}b.domLoaded=1;if(b.features.translate_i18n!==false){c=document.body.innerHTML;if(tinymce.isIE){c=c.replace(/ (value|title|alt)=([^"][^\s>]+)/gi,' $1="$2"')}document.dir=b.editor.getParam("directionality","");if((a=b.editor.translate(c))&&a!=c){document.body.innerHTML=a}if((a=b.editor.translate(d))&&a!=d){document.title=d=a}}document.body.style.display="";if(tinymce.isIE){document.attachEvent("onmouseup",tinyMCEPopup._restoreSelection);b.dom.add(b.dom.select("head")[0],"base",{target:"_self"})}b.restoreSelection();b.resizeToInnerSize();if(!b.isWindow){b.editor.windowManager.setTitle(window,d)}else{window.focus()}if(!tinymce.isIE&&!b.isWindow){tinymce.dom.Event._add(document,"focus",function(){b.editor.windowManager.focus(b.id)})}tinymce.each(b.dom.select("select"),function(f){f.onkeydown=tinyMCEPopup._accessHandler});tinymce.each(b.listeners,function(f){f.func.call(f.scope,b.editor)});if(b.getWindowArg("mce_auto_focus",true)){window.focus();tinymce.each(document.forms,function(g){tinymce.each(g.elements,function(f){if(b.dom.hasClass(f,"mceFocus")&&!f.disabled){f.focus();return false}})})}document.onkeyup=tinyMCEPopup._closeWinKeyHandler},_accessHandler:function(a){a=a||window.event;if(a.keyCode==13||a.keyCode==32){a=a.target||a.srcElement;if(a.onchange){a.onchange()}return tinymce.dom.Event.cancel(a)}},_closeWinKeyHandler:function(a){a=a||window.event;if(a.keyCode==27){tinyMCEPopup.close()}},_wait:function(){if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);tinyMCEPopup._onDOMLoaded()}});if(document.documentElement.doScroll&&window==window.top){(function(){if(tinyMCEPopup.domLoaded){return}try{document.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}tinyMCEPopup._onDOMLoaded()})()}document.attachEvent("onload",tinyMCEPopup._onDOMLoaded)}else{if(document.addEventListener){window.addEventListener("DOMContentLoaded",tinyMCEPopup._onDOMLoaded,false);window.addEventListener("load",tinyMCEPopup._onDOMLoaded,false)}}}};tinyMCEPopup.init();tinyMCEPopup._wait();
tinymce-advanced.php CHANGED
@@ -2,8 +2,8 @@
2
  /*
3
  Plugin Name: TinyMCE Advanced
4
  Plugin URI: http://www.laptoptips.ca/projects/tinymce-advanced/
5
- Description: Enables advanced features and plugins in TinyMCE.
6
- Version: 3.2.4
7
  Author: Andrew Ozz
8
  Author URI: http://www.laptoptips.ca/
9
 
@@ -37,7 +37,7 @@ if ( ! function_exists('tadv_activate') ) {
37
  function tadv_activate() {
38
 
39
  @include_once('tadv_defaults.php');
40
- $tadv_options = array( 'advlink' => 1, 'advimage' => 1, 'importcss' => 0, 'contextmenu' => 0, 'tadvreplace' => 0 );
41
 
42
  if ( isset($tadv_toolbars) ) {
43
  add_option( 'tadv_toolbars', $tadv_toolbars, '', 'no' );
@@ -60,7 +60,8 @@ if ( ! function_exists('tdav_css') ) {
60
  if ( $tadv_options['importcss'] == '1' )
61
  $wp .= ',' . get_bloginfo('stylesheet_url');
62
 
63
- return $wp .= ',' . WP_PLUGIN_URL . '/tinymce-advanced/css/tadv-mce.css';
 
64
  }
65
  }
66
  add_filter( 'mce_css', 'tdav_css' );
@@ -107,8 +108,8 @@ if ( is_admin() && !defined('DOING_AJAX') && !defined('DOING_CRON') ) {
107
  if ( ! function_exists('tadv_mce_btns') ) {
108
  function tadv_mce_btns($orig) {
109
  global $tadv_allbtns, $tadv_hidden_row;
110
- $tadv_btns1 = (array) get_option('tadv_btns1');
111
- $tadv_allbtns = (array) get_option('tadv_allbtns');
112
 
113
  if ( in_array( 'wp_adv', $tadv_btns1 ) )
114
  $tadv_hidden_row = 2;
@@ -125,7 +126,7 @@ add_filter( 'mce_buttons', 'tadv_mce_btns', 999 );
125
  if ( ! function_exists('tadv_mce_btns2') ) {
126
  function tadv_mce_btns2($orig) {
127
  global $tadv_allbtns, $tadv_hidden_row;
128
- $tadv_btns2 = (array) get_option('tadv_btns2');
129
 
130
  if ( in_array( 'wp_adv', $tadv_btns2 ) )
131
  $tadv_hidden_row = 3;
@@ -142,7 +143,7 @@ add_filter( 'mce_buttons_2', 'tadv_mce_btns2', 999 );
142
  if ( ! function_exists('tadv_mce_btns3') ) {
143
  function tadv_mce_btns3($orig) {
144
  global $tadv_allbtns, $tadv_hidden_row;
145
- $tadv_btns3 = (array) get_option('tadv_btns3');
146
 
147
  if ( in_array( 'wp_adv', $tadv_btns3 ) )
148
  $tadv_hidden_row = 4;
@@ -159,7 +160,7 @@ add_filter( 'mce_buttons_3', 'tadv_mce_btns3', 999 );
159
  if ( ! function_exists('tadv_mce_btns4') ) {
160
  function tadv_mce_btns4($orig) {
161
  global $tadv_allbtns;
162
- $tadv_btns4 = (array) get_option('tadv_btns4');
163
 
164
  if ( is_array($orig) && ! empty($orig) ) {
165
  $orig = array_diff( $orig, $tadv_allbtns );
@@ -173,15 +174,16 @@ add_filter( 'mce_buttons_4', 'tadv_mce_btns4', 999 );
173
  if ( ! function_exists('tadv_mce_options') ) {
174
  function tadv_mce_options($init) {
175
  global $tadv_hidden_row;
176
- $tadv_options = get_option('tadv_options');
177
 
178
  if ( $tadv_hidden_row > 0 )
179
  $init['wordpress_adv_toolbar'] = 'toolbar' . $tadv_hidden_row;
180
- else $init['wordpress_adv_hidden'] = false;
 
181
 
182
- if ( isset($tadv_options['fix_autop']) && $tadv_options['fix_autop'] == 1 ) {
183
  $init['apply_source_formatting'] = true;
184
- }
185
  return $init;
186
  }
187
  }
@@ -189,10 +191,10 @@ add_filter( 'tiny_mce_before_init', 'tadv_mce_options' );
189
 
190
  if ( ! function_exists('tadv_htmledit') ) {
191
  function tadv_htmledit($c) {
192
- $tadv_options = get_option('tadv_options');
193
 
194
  if ( isset($tadv_options['fix_autop']) && $tadv_options['fix_autop'] == 1 ) {
195
- $c = preg_replace( array('/&amp;/','/&lt;/','/&gt;/'), array('&','<','>'), $c );
196
  $c = wpautop($c);
197
  $c = htmlspecialchars($c, ENT_NOQUOTES);
198
  }
@@ -204,12 +206,13 @@ add_filter('htmledit_pre', 'tadv_htmledit', 999);
204
  if ( ! function_exists('tmce_init') ) {
205
  function tmce_init() {
206
  global $wp_scripts;
207
- $tadv_options = get_option('tadv_options');
208
 
209
- if ( ! isset($tadv_options['fix_autop']) || $tadv_options['fix_autop'] != 1 ) return;
 
210
 
211
  $queue = $wp_scripts->queue;
212
- if ( is_array($queue) && in_array( 'autosave', $queue ) )
213
  wp_enqueue_script( 'tadv_replace', WP_PLUGIN_URL . '/tinymce-advanced/js/tadv_replace.js', array('editor'), '20080425' );
214
  }
215
  }
@@ -218,6 +221,9 @@ add_action( 'admin_enqueue_scripts', 'tmce_init', 25 );
218
  if ( ! function_exists('tadv_load_plugins') ) {
219
  function tadv_load_plugins($plug) {
220
  $tadv_plugins = (array) get_option('tadv_plugins');
 
 
 
221
  $plugpath = WP_PLUGIN_URL . '/tinymce-advanced/mce/';
222
 
223
  $plug = (array) $plug;
@@ -231,13 +237,18 @@ add_action( 'mce_external_plugins', 'tadv_load_plugins', 999 );
231
 
232
  if ( ! function_exists('tadv_load_langs') ) {
233
  function tadv_load_langs($langs) {
234
- $tadv_plugins = get_option('tadv_plugins', array());
 
 
 
235
  $langpath = WP_PLUGIN_DIR . '/tinymce-advanced/mce/';
236
  $nolangs = array( 'bbcode', 'contextmenu', 'insertdatetime', 'layer', 'nonbreaking', 'print', 'visualchars', 'emotions', 'tadvreplace' );
237
 
238
  $langs = (array) $langs;
239
  foreach( $tadv_plugins as $plugin ) {
240
- if ( in_array( $plugin, $nolangs ) ) continue;
 
 
241
  $langs["$plugin"] = $langpath . $plugin . '/langs/langs.php';
242
  }
243
  return $langs;
2
  /*
3
  Plugin Name: TinyMCE Advanced
4
  Plugin URI: http://www.laptoptips.ca/projects/tinymce-advanced/
5
+ Description: Enables advanced features and plugins in TinyMCE, the visual editor in WordPress.
6
+ Version: 3.2.7
7
  Author: Andrew Ozz
8
  Author URI: http://www.laptoptips.ca/
9
 
37
  function tadv_activate() {
38
 
39
  @include_once('tadv_defaults.php');
40
+ $tadv_options = array( 'advlink' => 1, 'advimage' => 1, 'importcss' => 0, 'contextmenu' => 0, 'fix_autop' => 0 );
41
 
42
  if ( isset($tadv_toolbars) ) {
43
  add_option( 'tadv_toolbars', $tadv_toolbars, '', 'no' );
60
  if ( $tadv_options['importcss'] == '1' )
61
  $wp .= ',' . get_bloginfo('stylesheet_url');
62
 
63
+ $wp .= ',' . WP_PLUGIN_URL . '/tinymce-advanced/css/tadv-mce.css';
64
+ return trim($wp, ' ,');
65
  }
66
  }
67
  add_filter( 'mce_css', 'tdav_css' );
108
  if ( ! function_exists('tadv_mce_btns') ) {
109
  function tadv_mce_btns($orig) {
110
  global $tadv_allbtns, $tadv_hidden_row;
111
+ $tadv_btns1 = (array) get_option('tadv_btns1', array());
112
+ $tadv_allbtns = (array) get_option('tadv_allbtns', array());
113
 
114
  if ( in_array( 'wp_adv', $tadv_btns1 ) )
115
  $tadv_hidden_row = 2;
126
  if ( ! function_exists('tadv_mce_btns2') ) {
127
  function tadv_mce_btns2($orig) {
128
  global $tadv_allbtns, $tadv_hidden_row;
129
+ $tadv_btns2 = (array) get_option('tadv_btns2', array());
130
 
131
  if ( in_array( 'wp_adv', $tadv_btns2 ) )
132
  $tadv_hidden_row = 3;
143
  if ( ! function_exists('tadv_mce_btns3') ) {
144
  function tadv_mce_btns3($orig) {
145
  global $tadv_allbtns, $tadv_hidden_row;
146
+ $tadv_btns3 = (array) get_option('tadv_btns3', array());
147
 
148
  if ( in_array( 'wp_adv', $tadv_btns3 ) )
149
  $tadv_hidden_row = 4;
160
  if ( ! function_exists('tadv_mce_btns4') ) {
161
  function tadv_mce_btns4($orig) {
162
  global $tadv_allbtns;
163
+ $tadv_btns4 = (array) get_option('tadv_btns4', array());
164
 
165
  if ( is_array($orig) && ! empty($orig) ) {
166
  $orig = array_diff( $orig, $tadv_allbtns );
174
  if ( ! function_exists('tadv_mce_options') ) {
175
  function tadv_mce_options($init) {
176
  global $tadv_hidden_row;
177
+ $tadv_options = get_option('tadv_options', array());
178
 
179
  if ( $tadv_hidden_row > 0 )
180
  $init['wordpress_adv_toolbar'] = 'toolbar' . $tadv_hidden_row;
181
+ else
182
+ $init['wordpress_adv_hidden'] = false;
183
 
184
+ if ( isset($tadv_options['fix_autop']) && $tadv_options['fix_autop'] == 1 )
185
  $init['apply_source_formatting'] = true;
186
+
187
  return $init;
188
  }
189
  }
191
 
192
  if ( ! function_exists('tadv_htmledit') ) {
193
  function tadv_htmledit($c) {
194
+ $tadv_options = get_option('tadv_options', array());
195
 
196
  if ( isset($tadv_options['fix_autop']) && $tadv_options['fix_autop'] == 1 ) {
197
+ $c = str_replace( array('&amp;', '&lt;', '&gt;'), array('&', '<', '>'), $c );
198
  $c = wpautop($c);
199
  $c = htmlspecialchars($c, ENT_NOQUOTES);
200
  }
206
  if ( ! function_exists('tmce_init') ) {
207
  function tmce_init() {
208
  global $wp_scripts;
209
+ $tadv_options = get_option('tadv_options', array());
210
 
211
+ if ( ! isset($tadv_options['fix_autop']) || $tadv_options['fix_autop'] != 1 )
212
+ return;
213
 
214
  $queue = $wp_scripts->queue;
215
+ if ( is_array($queue) && in_array( 'editor', $queue, true ) )
216
  wp_enqueue_script( 'tadv_replace', WP_PLUGIN_URL . '/tinymce-advanced/js/tadv_replace.js', array('editor'), '20080425' );
217
  }
218
  }
221
  if ( ! function_exists('tadv_load_plugins') ) {
222
  function tadv_load_plugins($plug) {
223
  $tadv_plugins = (array) get_option('tadv_plugins');
224
+ if ( empty($tadv_plugins) || !is_array($tadv_plugins) )
225
+ return $plug;
226
+
227
  $plugpath = WP_PLUGIN_URL . '/tinymce-advanced/mce/';
228
 
229
  $plug = (array) $plug;
237
 
238
  if ( ! function_exists('tadv_load_langs') ) {
239
  function tadv_load_langs($langs) {
240
+ $tadv_plugins = get_option('tadv_plugins');
241
+ if ( empty($tadv_plugins) || !is_array($tadv_plugins) )
242
+ return $langs;
243
+
244
  $langpath = WP_PLUGIN_DIR . '/tinymce-advanced/mce/';
245
  $nolangs = array( 'bbcode', 'contextmenu', 'insertdatetime', 'layer', 'nonbreaking', 'print', 'visualchars', 'emotions', 'tadvreplace' );
246
 
247
  $langs = (array) $langs;
248
  foreach( $tadv_plugins as $plugin ) {
249
+ if ( in_array( $plugin, $nolangs ) )
250
+ continue;
251
+
252
  $langs["$plugin"] = $langpath . $plugin . '/langs/langs.php';
253
  }
254
  return $langs;
utils/form_utils.js CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * $Id: form_utils.js 996 2009-02-06 17:32:20Z spocke $
3
  *
4
  * Various form utilitiy functions.
5
  *
@@ -92,7 +92,7 @@ function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
92
  function getSelectValue(form_obj, field_name) {
93
  var elm = form_obj.elements[field_name];
94
 
95
- if (elm == null || elm.options == null)
96
  return "";
97
 
98
  return elm.options[elm.selectedIndex].value;
1
  /**
2
+ * $Id: form_utils.js 1184 2009-08-11 11:47:27Z spocke $
3
  *
4
  * Various form utilitiy functions.
5
  *
92
  function getSelectValue(form_obj, field_name) {
93
  var elm = form_obj.elements[field_name];
94
 
95
+ if (elm == null || elm.options == null || elm.selectedIndex === -1)
96
  return "";
97
 
98
  return elm.options[elm.selectedIndex].value;