TinyMCE Advanced - Version 3.5.8

Version Description

Download this release

Release Info

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

Code changes from version 3.4.9 to 3.5.8

mce/advhr/rule.htm CHANGED
@@ -2,11 +2,11 @@
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=349"></script>
6
- <script type="text/javascript" src="js/rule.js?ver=349"></script>
7
- <script type="text/javascript" src="../../utils/mctabs.js?ver=349"></script>
8
- <script type="text/javascript" src="../../utils/form_utils.js?ver=349"></script>
9
- <link href="css/advhr.css?ver=349" rel="stylesheet" type="text/css" />
10
  </head>
11
  <body role="application">
12
  <form onsubmit="AdvHRDialog.update();return false;" action="#">
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=358"></script>
6
+ <script type="text/javascript" src="js/rule.js?ver=358"></script>
7
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=358"></script>
8
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=358"></script>
9
+ <link href="css/advhr.css?ver=358" rel="stylesheet" type="text/css" />
10
  </head>
11
  <body role="application">
12
  <form onsubmit="AdvHRDialog.update();return false;" action="#">
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=349"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=349"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=349"></script>
8
- <script type="text/javascript" src="../../utils/validate.js?ver=349"></script>
9
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=349"></script>
10
- <script type="text/javascript" src="js/image.js?ver=349"></script>
11
- <link href="css/advimage.css?ver=349" rel="stylesheet" type="text/css" />
12
  </head>
13
  <body id="advimage" style="display: none" role="application" aria-labelledby="app_title">
14
  <span id="app_title" style="display:none">{#advimage_dlg.dialog_title}</span>
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=358"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=358"></script>
7
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=358"></script>
8
+ <script type="text/javascript" src="../../utils/validate.js?ver=358"></script>
9
+ <script type="text/javascript" src="../../utils/editable_selects.js?ver=358"></script>
10
+ <script type="text/javascript" src="js/image.js?ver=358"></script>
11
+ <link href="css/advimage.css?ver=358" rel="stylesheet" type="text/css" />
12
  </head>
13
  <body id="advimage" style="display: none" role="application" aria-labelledby="app_title">
14
  <span id="app_title" style="display:none">{#advimage_dlg.dialog_title}</span>
mce/advimage/js/image.js CHANGED
@@ -395,12 +395,14 @@ var ImageDialog = {
395
  if (v == '0')
396
  img.style.border = isIE ? '0' : '0 none none';
397
  else {
398
- if (b.length == 3 && b[isIE ? 2 : 1])
399
- bStyle = b[isIE ? 2 : 1];
 
 
400
  else if (!bStyle || bStyle == 'none')
401
  bStyle = 'solid';
402
  if (b.length == 3 && b[isIE ? 0 : 2])
403
- bColor = b[isIE ? 0 : 2];
404
  else if (!bColor || bColor == 'none')
405
  bColor = 'black';
406
  img.style.border = v + 'px ' + bStyle + ' ' + bColor;
395
  if (v == '0')
396
  img.style.border = isIE ? '0' : '0 none none';
397
  else {
398
+ var isOldIE = tinymce.isIE && (!document.documentMode || document.documentMode < 9);
399
+
400
+ if (b.length == 3 && b[isOldIE ? 2 : 1])
401
+ bStyle = b[isOldIE ? 2 : 1];
402
  else if (!bStyle || bStyle == 'none')
403
  bStyle = 'solid';
404
  if (b.length == 3 && b[isIE ? 0 : 2])
405
+ bColor = b[isOldIE ? 0 : 2];
406
  else if (!bColor || bColor == 'none')
407
  bColor = 'black';
408
  img.style.border = v + 'px ' + bStyle + ' ' + bColor;
mce/advlink/js/advlink.js CHANGED
@@ -64,13 +64,14 @@ function init() {
64
  if (elm != null && elm.nodeName == "A")
65
  action = "update";
66
 
67
- formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true);
68
 
69
  setPopupControlsDisabled(true);
70
 
71
  if (action == "update") {
72
  var href = inst.dom.getAttrib(elm, 'href');
73
  var onclick = inst.dom.getAttrib(elm, 'onclick');
 
74
 
75
  // Setup form data
76
  setFormValue('href', href);
@@ -98,7 +99,7 @@ function init() {
98
  setFormValue('onkeypress', inst.dom.getAttrib(elm, 'onkeypress'));
99
  setFormValue('onkeydown', inst.dom.getAttrib(elm, 'onkeydown'));
100
  setFormValue('onkeyup', inst.dom.getAttrib(elm, 'onkeyup'));
101
- setFormValue('target', inst.dom.getAttrib(elm, 'target'));
102
  setFormValue('classes', inst.dom.getAttrib(elm, 'class'));
103
 
104
  // Parse onclick data
@@ -119,7 +120,7 @@ function init() {
119
  addClassesToList('classlist', 'advlink_styles');
120
 
121
  selectByValue(formObj, 'classlist', inst.dom.getAttrib(elm, 'class'), true);
122
- selectByValue(formObj, 'targetlist', inst.dom.getAttrib(elm, 'target'), true);
123
  } else
124
  addClassesToList('classlist', 'advlink_styles');
125
  }
@@ -377,6 +378,9 @@ function getAnchorListHTML(id, target) {
377
  for (i=0, len=nodes.length; i<len; i++) {
378
  if ((name = ed.dom.getAttrib(nodes[i], "name")) != "")
379
  html += '<option value="#' + name + '">' + name + '</option>';
 
 
 
380
  }
381
 
382
  if (html == "")
@@ -488,7 +492,7 @@ function getLinkListHTML(elm_id, target_form_element, onchange_func) {
488
  var html = "";
489
 
490
  html += '<select id="' + elm_id + '" name="' + elm_id + '"';
491
- html += ' class="mceLinkList" onfoc2us="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value=';
492
  html += 'this.options[this.selectedIndex].value;';
493
 
494
  if (typeof(onchange_func) != "undefined")
@@ -510,7 +514,7 @@ function getTargetListHTML(elm_id, target_form_element) {
510
  var targets = tinyMCEPopup.getParam('theme_advanced_link_targets', '').split(';');
511
  var html = '';
512
 
513
- html += '<select id="' + elm_id + '" name="' + elm_id + '" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value=';
514
  html += 'this.options[this.selectedIndex].value;">';
515
  html += '<option value="_self">' + tinyMCEPopup.getLang('advlink_dlg.target_same') + '</option>';
516
  html += '<option value="_blank">' + tinyMCEPopup.getLang('advlink_dlg.target_blank') + ' (_blank)</option>';
64
  if (elm != null && elm.nodeName == "A")
65
  action = "update";
66
 
67
+ formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true);
68
 
69
  setPopupControlsDisabled(true);
70
 
71
  if (action == "update") {
72
  var href = inst.dom.getAttrib(elm, 'href');
73
  var onclick = inst.dom.getAttrib(elm, 'onclick');
74
+ var linkTarget = inst.dom.getAttrib(elm, 'target') ? inst.dom.getAttrib(elm, 'target') : "_self";
75
 
76
  // Setup form data
77
  setFormValue('href', href);
99
  setFormValue('onkeypress', inst.dom.getAttrib(elm, 'onkeypress'));
100
  setFormValue('onkeydown', inst.dom.getAttrib(elm, 'onkeydown'));
101
  setFormValue('onkeyup', inst.dom.getAttrib(elm, 'onkeyup'));
102
+ setFormValue('target', linkTarget);
103
  setFormValue('classes', inst.dom.getAttrib(elm, 'class'));
104
 
105
  // Parse onclick data
120
  addClassesToList('classlist', 'advlink_styles');
121
 
122
  selectByValue(formObj, 'classlist', inst.dom.getAttrib(elm, 'class'), true);
123
+ selectByValue(formObj, 'targetlist', linkTarget, true);
124
  } else
125
  addClassesToList('classlist', 'advlink_styles');
126
  }
378
  for (i=0, len=nodes.length; i<len; i++) {
379
  if ((name = ed.dom.getAttrib(nodes[i], "name")) != "")
380
  html += '<option value="#' + name + '">' + name + '</option>';
381
+
382
+ if ((name = nodes[i].id) != "" && !nodes[i].href)
383
+ html += '<option value="#' + name + '">' + name + '</option>';
384
  }
385
 
386
  if (html == "")
492
  var html = "";
493
 
494
  html += '<select id="' + elm_id + '" name="' + elm_id + '"';
495
+ html += ' class="mceLinkList" onchange="this.form.' + target_form_element + '.value=';
496
  html += 'this.options[this.selectedIndex].value;';
497
 
498
  if (typeof(onchange_func) != "undefined")
514
  var targets = tinyMCEPopup.getParam('theme_advanced_link_targets', '').split(';');
515
  var html = '';
516
 
517
+ html += '<select id="' + elm_id + '" name="' + elm_id + '" onchange="this.form.' + target_form_element + '.value=';
518
  html += 'this.options[this.selectedIndex].value;">';
519
  html += '<option value="_self">' + tinyMCEPopup.getLang('advlink_dlg.target_same') + '</option>';
520
  html += '<option value="_blank">' + tinyMCEPopup.getLang('advlink_dlg.target_blank') + ' (_blank)</option>';
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=349"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=349"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=349"></script>
8
- <script type="text/javascript" src="../../utils/validate.js?ver=349"></script>
9
- <script type="text/javascript" src="js/advlink.js?ver=349"></script>
10
- <link href="css/advlink.css?ver=349" rel="stylesheet" type="text/css" />
11
  </head>
12
  <body id="advlink" style="display: none" role="application" onload="javascript:mcTabs.displayTab('general_tab','general_panel', true);" aria-labelledby="app_label">
13
  <span class="mceVoiceLabel" id="app_label" style="display:none;">{#advlink_dlg.title}</span>
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=358"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=358"></script>
7
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=358"></script>
8
+ <script type="text/javascript" src="../../utils/validate.js?ver=358"></script>
9
+ <script type="text/javascript" src="js/advlink.js?ver=358"></script>
10
+ <link href="css/advlink.css?ver=358" rel="stylesheet" type="text/css" />
11
  </head>
12
  <body id="advlink" style="display: none" role="application" onload="javascript:mcTabs.displayTab('general_tab','general_panel', true);" aria-labelledby="app_label">
13
  <span class="mceVoiceLabel" id="app_label" style="display:none;">{#advlink_dlg.title}</span>
mce/contextmenu/editor_plugin.js CHANGED
@@ -1 +1 @@
1
- (function(){var a=tinymce.dom.Event,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.ContextMenu",{init:function(e){var h=this,f,d,i;h.editor=e;d=e.settings.contextmenu_never_use_native;h.onContextMenu=new tinymce.util.Dispatcher(this);f=e.onContextMenu.add(function(j,k){if((i!==0?i:k.ctrlKey)&&!d){return}a.cancel(k);if(k.target.nodeName=="IMG"){j.selection.select(k.target)}h._getMenu(j).showMenu(k.clientX||k.pageX,k.clientY||k.pageY);a.add(j.getDoc(),"click",function(l){g(j,l)});j.nodeChanged()});e.onRemove.add(function(){if(h._menu){h._menu.removeAll()}});function g(j,k){i=0;if(k&&k.button==2){i=k.ctrlKey;return}if(h._menu){h._menu.removeAll();h._menu.destroy();a.remove(j.getDoc(),"click",g);h._menu=null}}e.onMouseDown.add(g);e.onKeyDown.add(g);e.onKeyDown.add(function(j,k){if(k.shiftKey&&!k.ctrlKey&&!k.altKey&&k.keyCode===121){a.cancel(k);f(j,k)}})},getInfo:function(){return{longname:"Contextmenu",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getMenu:function(e){var g=this,d=g._menu,j=e.selection,f=j.isCollapsed(),h=j.getNode()||e.getBody(),i,k;if(d){d.removeAll();d.destroy()}k=b.getPos(e.getContentAreaContainer());d=e.controlManager.createDropMenu("contextmenu",{offset_x:k.x+e.getParam("contextmenu_offset_x",0),offset_y:k.y+e.getParam("contextmenu_offset_y",0),constrain:1,keyboard_focus:true});g._menu=d;d.add({title:"advanced.cut_desc",icon:"cut",cmd:"Cut"}).setDisabled(f);d.add({title:"advanced.copy_desc",icon:"copy",cmd:"Copy"}).setDisabled(f);d.add({title:"advanced.paste_desc",icon:"paste",cmd:"Paste"});if((h.nodeName=="A"&&!e.dom.getAttrib(h,"name"))||!f){d.addSeparator();d.add({title:"advanced.link_desc",icon:"link",cmd:e.plugins.advlink?"mceAdvLink":"mceLink",ui:true});d.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"})}d.addSeparator();d.add({title:"advanced.image_desc",icon:"image",cmd:e.plugins.advimage?"mceAdvImage":"mceImage",ui:true});d.addSeparator();i=d.addMenu({title:"contextmenu.align"});i.add({title:"contextmenu.left",icon:"justifyleft",cmd:"JustifyLeft"});i.add({title:"contextmenu.center",icon:"justifycenter",cmd:"JustifyCenter"});i.add({title:"contextmenu.right",icon:"justifyright",cmd:"JustifyRight"});i.add({title:"contextmenu.full",icon:"justifyfull",cmd:"JustifyFull"});g.onContextMenu.dispatch(g,d,h,f);return d}});tinymce.PluginManager.add("contextmenu",tinymce.plugins.ContextMenu)})();
1
+ (function(){var a=tinymce.dom.Event,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.ContextMenu",{init:function(f){var i=this,g,d,j,e;i.editor=f;d=f.settings.contextmenu_never_use_native;i.onContextMenu=new tinymce.util.Dispatcher(this);e=function(k){h(f,k)};g=f.onContextMenu.add(function(k,l){if((j!==0?j:l.ctrlKey)&&!d){return}a.cancel(l);if(l.target.nodeName=="IMG"){k.selection.select(l.target)}i._getMenu(k).showMenu(l.clientX||l.pageX,l.clientY||l.pageY);a.add(k.getDoc(),"click",e);k.nodeChanged()});f.onRemove.add(function(){if(i._menu){i._menu.removeAll()}});function h(k,l){j=0;if(l&&l.button==2){j=l.ctrlKey;return}if(i._menu){i._menu.removeAll();i._menu.destroy();a.remove(k.getDoc(),"click",e);i._menu=null}}f.onMouseDown.add(h);f.onKeyDown.add(h);f.onKeyDown.add(function(k,l){if(l.shiftKey&&!l.ctrlKey&&!l.altKey&&l.keyCode===121){a.cancel(l);g(k,l)}})},getInfo:function(){return{longname:"Contextmenu",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getMenu:function(e){var g=this,d=g._menu,j=e.selection,f=j.isCollapsed(),h=j.getNode()||e.getBody(),i,k;if(d){d.removeAll();d.destroy()}k=b.getPos(e.getContentAreaContainer());d=e.controlManager.createDropMenu("contextmenu",{offset_x:k.x+e.getParam("contextmenu_offset_x",0),offset_y:k.y+e.getParam("contextmenu_offset_y",0),constrain:1,keyboard_focus:true});g._menu=d;d.add({title:"advanced.cut_desc",icon:"cut",cmd:"Cut"}).setDisabled(f);d.add({title:"advanced.copy_desc",icon:"copy",cmd:"Copy"}).setDisabled(f);d.add({title:"advanced.paste_desc",icon:"paste",cmd:"Paste"});if((h.nodeName=="A"&&!e.dom.getAttrib(h,"name"))||!f){d.addSeparator();d.add({title:"advanced.link_desc",icon:"link",cmd:e.plugins.advlink?"mceAdvLink":"mceLink",ui:true});d.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"})}d.addSeparator();d.add({title:"advanced.image_desc",icon:"image",cmd:e.plugins.advimage?"mceAdvImage":"mceImage",ui:true});d.addSeparator();i=d.addMenu({title:"contextmenu.align"});i.add({title:"contextmenu.left",icon:"justifyleft",cmd:"JustifyLeft"});i.add({title:"contextmenu.center",icon:"justifycenter",cmd:"JustifyCenter"});i.add({title:"contextmenu.right",icon:"justifyright",cmd:"JustifyRight"});i.add({title:"contextmenu.full",icon:"justifyfull",cmd:"JustifyFull"});g.onContextMenu.dispatch(g,d,h,f);return d}});tinymce.PluginManager.add("contextmenu",tinymce.plugins.ContextMenu)})();
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=349"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=349"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=349"></script>
8
- <script type="text/javascript" src="js/searchreplace.js?ver=349"></script>
9
- <link rel="stylesheet" type="text/css" href="css/searchreplace.css?ver=349" />
10
  </head>
11
  <body style="display:none;" role="application" aria-labelledby="app_title">
12
  <span id="app_title" style="display:none">{#searchreplace_dlg.replace_title}</span>
@@ -93,7 +93,7 @@
93
  <input type="submit" id="insert" name="insert" value="{#searchreplace_dlg.findnext}" />
94
  <input type="button" class="button" id="replaceBtn" name="replaceBtn" value="{#searchreplace_dlg.replace}" onclick="SearchReplaceDialog.searchNext('current');" />
95
  <input type="button" class="button" id="replaceAllBtn" name="replaceAllBtn" value="{#searchreplace_dlg.replaceall}" onclick="SearchReplaceDialog.searchNext('all');" />
96
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
97
  </div>
98
  </form>
99
  </body>
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=358"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=358"></script>
7
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=358"></script>
8
+ <script type="text/javascript" src="js/searchreplace.js?ver=358"></script>
9
+ <link rel="stylesheet" type="text/css" href="css/searchreplace.css?ver=358" />
10
  </head>
11
  <body style="display:none;" role="application" aria-labelledby="app_title">
12
  <span id="app_title" style="display:none">{#searchreplace_dlg.replace_title}</span>
93
  <input type="submit" id="insert" name="insert" value="{#searchreplace_dlg.findnext}" />
94
  <input type="button" class="button" id="replaceBtn" name="replaceBtn" value="{#searchreplace_dlg.replace}" onclick="SearchReplaceDialog.searchNext('current');" />
95
  <input type="button" class="button" id="replaceAllBtn" name="replaceAllBtn" value="{#searchreplace_dlg.replaceall}" onclick="SearchReplaceDialog.searchNext('all');" />
96
+ <input type="button" id="cancel" name="close" value="{#close}" onclick="tinyMCEPopup.close();" />
97
  </div>
98
  </form>
99
  </body>
mce/style/css/props.css CHANGED
@@ -5,6 +5,7 @@ select, #block_text_indent, #box_width, #box_height, #box_padding_top, #box_padd
5
  #box_margin_top, #box_margin_right, #box_margin_bottom, #box_margin_left, #positioning_width, #positioning_height, #positioning_zindex {width:70px;}
6
  #positioning_placement_top, #positioning_placement_right, #positioning_placement_bottom, #positioning_placement_left {width:70px;}
7
  #positioning_clip_top, #positioning_clip_right, #positioning_clip_bottom, #positioning_clip_left {width:70px;}
 
8
  .panel_wrapper div.current {padding-top:10px;height:230px;}
9
  .delim {border-left:1px solid gray;}
10
  .tdelim {border-bottom:1px solid gray;}
5
  #box_margin_top, #box_margin_right, #box_margin_bottom, #box_margin_left, #positioning_width, #positioning_height, #positioning_zindex {width:70px;}
6
  #positioning_placement_top, #positioning_placement_right, #positioning_placement_bottom, #positioning_placement_left {width:70px;}
7
  #positioning_clip_top, #positioning_clip_right, #positioning_clip_bottom, #positioning_clip_left {width:70px;}
8
+ .panel_toggle_insert_span {padding-top:10px;}
9
  .panel_wrapper div.current {padding-top:10px;height:230px;}
10
  .delim {border-left:1px solid gray;}
11
  .tdelim {border-bottom:1px solid gray;}
mce/style/editor_plugin.js CHANGED
@@ -1 +1 @@
1
- (function(){tinymce.create("tinymce.plugins.StylePlugin",{init:function(a,b){a.addCommand("mceStyleProps",function(){a.windowManager.open({file:b+"/props.htm",width:480+parseInt(a.getLang("style.delta_width",0)),height:320+parseInt(a.getLang("style.delta_height",0)),inline:1},{plugin_url:b,style_text:a.selection.getNode().style.cssText})});a.addCommand("mceSetElementStyle",function(d,c){if(e=a.selection.getNode()){a.dom.setAttrib(e,"style",c);a.execCommand("mceRepaint")}});a.onNodeChange.add(function(d,c,f){c.setDisabled("styleprops",f.nodeName==="BODY")});a.addButton("styleprops",{title:"style.desc",cmd:"mceStyleProps"})},getInfo:function(){return{longname:"Style",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("style",tinymce.plugins.StylePlugin)})();
1
+ (function(){tinymce.create("tinymce.plugins.StylePlugin",{init:function(a,b){a.addCommand("mceStyleProps",function(){var c=false;var f=a.selection.getSelectedBlocks();var d=[];if(f.length===1){d.push(a.selection.getNode().style.cssText)}else{tinymce.each(f,function(g){d.push(a.dom.getAttrib(g,"style"))});c=true}a.windowManager.open({file:b+"/props.htm",width:480+parseInt(a.getLang("style.delta_width",0)),height:340+parseInt(a.getLang("style.delta_height",0)),inline:1},{applyStyleToBlocks:c,plugin_url:b,styles:d})});a.addCommand("mceSetElementStyle",function(d,c){if(e=a.selection.getNode()){a.dom.setAttrib(e,"style",c);a.execCommand("mceRepaint")}});a.onNodeChange.add(function(d,c,f){c.setDisabled("styleprops",f.nodeName==="BODY")});a.addButton("styleprops",{title:"style.desc",cmd:"mceStyleProps"})},getInfo:function(){return{longname:"Style",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("style",tinymce.plugins.StylePlugin)})();
mce/style/js/props.js CHANGED
@@ -27,10 +27,41 @@ var defaultBorderStyle = "none;solid;dashed;dotted;double;groove;ridge;inset;out
27
  var defaultBorderWidth = "thin;medium;thick";
28
  var defaultListType = "disc;circle;square;decimal;lower-roman;upper-roman;lower-alpha;upper-alpha;none";
29
 
30
- function init() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  var ce = document.getElementById('container'), h;
32
 
33
- ce.style.cssText = tinyMCEPopup.getWindowArg('style_text');
 
 
 
 
34
 
35
  h = getBrowserHTML('background_image_browser','background_image','image','advimage');
36
  document.getElementById("background_image_browser").innerHTML = h;
@@ -368,13 +399,41 @@ function hasEqualValues(a) {
368
  return true;
369
  }
370
 
 
 
 
 
371
  function applyAction() {
372
  var ce = document.getElementById('container'), ed = tinyMCEPopup.editor;
373
 
374
  generateCSS();
375
 
376
  tinyMCEPopup.restoreSelection();
377
- ed.dom.setAttrib(ed.selection.getSelectedBlocks(), 'style', tinyMCEPopup.editor.dom.serializeStyle(tinyMCEPopup.editor.dom.parseStyle(ce.style.cssText)));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
378
  }
379
 
380
  function updateAction() {
27
  var defaultBorderWidth = "thin;medium;thick";
28
  var defaultListType = "disc;circle;square;decimal;lower-roman;upper-roman;lower-alpha;upper-alpha;none";
29
 
30
+ function aggregateStyles(allStyles) {
31
+ var mergedStyles = {};
32
+
33
+ tinymce.each(allStyles, function(style) {
34
+ if (style !== '') {
35
+ var parsedStyles = tinyMCEPopup.editor.dom.parseStyle(style);
36
+ for (var name in parsedStyles) {
37
+ if (parsedStyles.hasOwnProperty(name)) {
38
+ if (mergedStyles[name] === undefined) {
39
+ mergedStyles[name] = parsedStyles[name];
40
+ }
41
+ else if (name === 'text-decoration') {
42
+ if (mergedStyles[name].indexOf(parsedStyles[name]) === -1) {
43
+ mergedStyles[name] = mergedStyles[name] +' '+ parsedStyles[name];
44
+ }
45
+ }
46
+ }
47
+ }
48
+ }
49
+ });
50
+
51
+ return mergedStyles;
52
+ }
53
+
54
+ var applyActionIsInsert;
55
+ var existingStyles;
56
+
57
+ function init(ed) {
58
  var ce = document.getElementById('container'), h;
59
 
60
+ existingStyles = aggregateStyles(tinyMCEPopup.getWindowArg('styles'));
61
+ ce.style.cssText = tinyMCEPopup.editor.dom.serializeStyle(existingStyles);
62
+
63
+ applyActionIsInsert = ed.getParam("edit_css_style_insert_span", false);
64
+ document.getElementById('toggle_insert_span').checked = applyActionIsInsert;
65
 
66
  h = getBrowserHTML('background_image_browser','background_image','image','advimage');
67
  document.getElementById("background_image_browser").innerHTML = h;
399
  return true;
400
  }
401
 
402
+ function toggleApplyAction() {
403
+ applyActionIsInsert = ! applyActionIsInsert;
404
+ }
405
+
406
  function applyAction() {
407
  var ce = document.getElementById('container'), ed = tinyMCEPopup.editor;
408
 
409
  generateCSS();
410
 
411
  tinyMCEPopup.restoreSelection();
412
+
413
+ var newStyles = tinyMCEPopup.editor.dom.parseStyle(ce.style.cssText);
414
+
415
+ if (applyActionIsInsert) {
416
+ ed.formatter.register('plugin_style', {
417
+ inline: 'span', styles: existingStyles
418
+ });
419
+ ed.formatter.remove('plugin_style');
420
+
421
+ ed.formatter.register('plugin_style', {
422
+ inline: 'span', styles: newStyles
423
+ });
424
+ ed.formatter.apply('plugin_style');
425
+ } else {
426
+ var nodes;
427
+
428
+ if (tinyMCEPopup.getWindowArg('applyStyleToBlocks')) {
429
+ nodes = ed.selection.getSelectedBlocks();
430
+ }
431
+ else {
432
+ nodes = ed.selection.getNode();
433
+ }
434
+
435
+ ed.dom.setAttrib(nodes, 'style', tinyMCEPopup.editor.dom.serializeStyle(newStyles));
436
+ }
437
  }
438
 
439
  function updateAction() {
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=349"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=349"></script>
7
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=349"></script>
8
- <script type="text/javascript" src="../../utils/form_utils.js?ver=349"></script>
9
- <script type="text/javascript" src="js/props.js?ver=349"></script>
10
- <link href="css/props.css?ver=349" rel="stylesheet" type="text/css" />
11
  </head>
12
 
13
  <body id="styleprops" style="display: none" role="application" aria-labelledby="app_title">
@@ -825,6 +825,11 @@
825
  </div>
826
  </div>
827
 
 
 
 
 
 
828
  <div class="mceActionPanel">
829
  <input type="submit" id="insert" name="insert" value="{#update}" />
830
  <input type="button" class="button" id="apply" name="apply" value="{#style_dlg.apply}" onClick="applyAction();" />
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=358"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=358"></script>
7
+ <script type="text/javascript" src="../../utils/editable_selects.js?ver=358"></script>
8
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=358"></script>
9
+ <script type="text/javascript" src="js/props.js?ver=358"></script>
10
+ <link href="css/props.css?ver=358" rel="stylesheet" type="text/css" />
11
  </head>
12
 
13
  <body id="styleprops" style="display: none" role="application" aria-labelledby="app_title">
825
  </div>
826
  </div>
827
 
828
+ <div class="panel_toggle_insert_span">
829
+ <input type="checkbox" class="checkbox" id="toggle_insert_span" name="toggle_insert_span" onClick="toggleApplyAction();" />
830
+ <label for="toggle_insert_span">{#style_dlg.toggle_insert_span}</label>
831
+ </div>
832
+
833
  <div class="mceActionPanel">
834
  <input type="submit" id="insert" name="insert" value="{#update}" />
835
  <input type="button" class="button" id="apply" name="apply" value="{#style_dlg.apply}" onClick="applyAction();" />
mce/table/cell.htm CHANGED
@@ -2,13 +2,13 @@
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=349"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=349"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=349"></script>
8
- <script type="text/javascript" src="../../utils/validate.js?ver=349"></script>
9
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=349"></script>
10
- <script type="text/javascript" src="js/cell.js?ver=349"></script>
11
- <link href="css/cell.css?ver=349" rel="stylesheet" type="text/css" />
12
  </head>
13
  <body id="tablecell" style="display: none" role="application">
14
  <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=358"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=358"></script>
7
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=358"></script>
8
+ <script type="text/javascript" src="../../utils/validate.js?ver=358"></script>
9
+ <script type="text/javascript" src="../../utils/editable_selects.js?ver=358"></script>
10
+ <script type="text/javascript" src="js/cell.js?ver=358"></script>
11
+ <link href="css/cell.css?ver=358" rel="stylesheet" type="text/css" />
12
  </head>
13
  <body id="tablecell" style="display: none" role="application">
14
  <form onsubmit="updateAction();return false;" action="#">
mce/table/editor_plugin.js CHANGED
@@ -1 +1 @@
1
- (function(d){var e=d.each;function c(g,h){var j=h.ownerDocument,f=j.createRange(),k;f.setStartBefore(h);f.setEnd(g.endContainer,g.endOffset);k=j.createElement("body");k.appendChild(f.cloneContents());return k.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length==0}function a(g,f){return parseInt(g.getAttribute(f)||1)}function b(H,G,K){var g,L,D,o;t();o=G.getParent(K.getStart(),"th,td");if(o){L=F(o);D=I();o=z(L.x,L.y)}function A(N,M){N=N.cloneNode(M);N.removeAttribute("id");return N}function t(){var M=0;g=[];e(["thead","tbody","tfoot"],function(N){var O=G.select("> "+N+" tr",H);e(O,function(P,Q){Q+=M;e(G.select("> td, > th",P),function(W,R){var S,T,U,V;if(g[Q]){while(g[Q][R]){R++}}U=a(W,"rowspan");V=a(W,"colspan");for(T=Q;T<Q+U;T++){if(!g[T]){g[T]=[]}for(S=R;S<R+V;S++){g[T][S]={part:N,real:T==Q&&S==R,elm:W,rowspan:U,colspan:V}}}})});M+=O.length})}function z(M,O){var N;N=g[O];if(N){return N[M]}}function s(O,M,N){if(O){N=parseInt(N);if(N===1){O.removeAttribute(M,1)}else{O.setAttribute(M,N,1)}}}function j(M){return M&&(G.hasClass(M.elm,"mceSelected")||M==o)}function k(){var M=[];e(H.rows,function(N){e(N.cells,function(O){if(G.hasClass(O,"mceSelected")||O==o.elm){M.push(N);return false}})});return M}function r(){var M=G.createRng();M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H)}function f(M){var N;d.walk(M,function(P){var O;if(P.nodeType==3){e(G.getParents(P.parentNode,null,M).reverse(),function(Q){Q=A(Q,false);if(!N){N=O=Q}else{if(O){O.appendChild(Q)}}O=Q});if(O){O.innerHTML=d.isIE?"&nbsp;":'<br data-mce-bogus="1" />'}return false}},"childNodes");M=A(M,false);s(M,"rowSpan",1);s(M,"colSpan",1);if(N){M.appendChild(N)}else{if(!d.isIE){M.innerHTML='<br data-mce-bogus="1" />'}}return M}function q(){var M=G.createRng();e(G.select("tr",H),function(N){if(N.cells.length==0){G.remove(N)}});if(G.select("tr",H).length==0){M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H);return}e(G.select("thead,tbody,tfoot",H),function(N){if(N.rows.length==0){G.remove(N)}});t();row=g[Math.min(g.length-1,L.y)];if(row){K.select(row[Math.min(row.length-1,L.x)].elm,true);K.collapse(true)}}function u(S,Q,U,R){var P,N,M,O,T;P=g[Q][S].elm.parentNode;for(M=1;M<=U;M++){P=G.getNext(P,"tr");if(P){for(N=S;N>=0;N--){T=g[Q+M][N].elm;if(T.parentNode==P){for(O=1;O<=R;O++){G.insertAfter(f(T),T)}break}}if(N==-1){for(O=1;O<=R;O++){P.insertBefore(f(P.cells[0]),P.cells[0])}}}}}function C(){e(g,function(M,N){e(M,function(P,O){var S,R,T,Q;if(j(P)){P=P.elm;S=a(P,"colspan");R=a(P,"rowspan");if(S>1||R>1){s(P,"rowSpan",1);s(P,"colSpan",1);for(Q=0;Q<S-1;Q++){G.insertAfter(f(P),P)}u(O,N,R-1,S)}}})})}function p(V,S,Y){var P,O,X,W,U,R,T,M,V,N,Q;if(V){pos=F(V);P=pos.x;O=pos.y;X=P+(S-1);W=O+(Y-1)}else{P=L.x;O=L.y;X=D.x;W=D.y}T=z(P,O);M=z(X,W);if(T&&M&&T.part==M.part){C();t();T=z(P,O).elm;s(T,"colSpan",(X-P)+1);s(T,"rowSpan",(W-O)+1);for(R=O;R<=W;R++){for(U=P;U<=X;U++){if(!g[R]||!g[R][U]){continue}V=g[R][U].elm;if(V!=T){N=d.grep(V.childNodes);e(N,function(Z){T.appendChild(Z)});if(N.length){N=d.grep(T.childNodes);Q=0;e(N,function(Z){if(Z.nodeName=="BR"&&G.getAttrib(Z,"data-mce-bogus")&&Q++<N.length-1){T.removeChild(Z)}})}G.remove(V)}}}q()}}function l(Q){var M,S,P,R,T,U,N,V,O;e(g,function(W,X){e(W,function(Z,Y){if(j(Z)){Z=Z.elm;T=Z.parentNode;U=A(T,false);M=X;if(Q){return false}}});if(Q){return !M}});for(R=0;R<g[0].length;R++){if(!g[M][R]){continue}S=g[M][R].elm;if(S!=P){if(!Q){O=a(S,"rowspan");if(O>1){s(S,"rowSpan",O+1);continue}}else{if(M>0&&g[M-1][R]){V=g[M-1][R].elm;O=a(V,"rowSpan");if(O>1){s(V,"rowSpan",O+1);continue}}}N=f(S);s(N,"colSpan",S.colSpan);U.appendChild(N);P=S}}if(U.hasChildNodes()){if(!Q){G.insertAfter(U,T)}else{T.parentNode.insertBefore(U,T)}}}function h(N){var O,M;e(g,function(P,Q){e(P,function(S,R){if(j(S)){O=R;if(N){return false}}});if(N){return !O}});e(g,function(S,T){var P,Q,R;if(!S[O]){return}P=S[O].elm;if(P!=M){R=a(P,"colspan");Q=a(P,"rowspan");if(R==1){if(!N){G.insertAfter(f(P),P);u(O,T,Q-1,R)}else{P.parentNode.insertBefore(f(P),P);u(O,T,Q-1,R)}}else{s(P,"colSpan",P.colSpan+1)}M=P}})}function n(){var M=[];e(g,function(N,O){e(N,function(Q,P){if(j(Q)&&d.inArray(M,P)===-1){e(g,function(T){var R=T[P].elm,S;S=a(R,"colSpan");if(S>1){s(R,"colSpan",S-1)}else{G.remove(R)}});M.push(P)}})});q()}function m(){var N;function M(Q){var P,R,O;P=G.getNext(Q,"tr");e(Q.cells,function(S){var T=a(S,"rowSpan");if(T>1){s(S,"rowSpan",T-1);R=F(S);u(R.x,R.y,1,1)}});R=F(Q.cells[0]);e(g[R.y],function(S){var T;S=S.elm;if(S!=O){T=a(S,"rowSpan");if(T<=1){G.remove(S)}else{s(S,"rowSpan",T-1)}O=S}})}N=k();e(N.reverse(),function(O){M(O)});q()}function E(){var M=k();G.remove(M);q();return M}function J(){var M=k();e(M,function(O,N){M[N]=A(O,true)});return M}function B(O,N){var P=k(),M=P[N?0:P.length-1],Q=M.cells.length;e(g,function(S){var R;Q=0;e(S,function(U,T){if(U.real){Q+=U.colspan}if(U.elm.parentNode==M){R=1}});if(R){return false}});if(!N){O.reverse()}e(O,function(T){var S=T.cells.length,R;for(i=0;i<S;i++){R=T.cells[i];s(R,"colSpan",1);s(R,"rowSpan",1)}for(i=S;i<Q;i++){T.appendChild(f(T.cells[S-1]))}for(i=Q;i<S;i++){G.remove(T.cells[i])}if(N){M.parentNode.insertBefore(T,M)}else{G.insertAfter(T,M)}})}function F(M){var N;e(g,function(O,P){e(O,function(R,Q){if(R.elm==M){N={x:Q,y:P};return false}});return !N});return N}function w(M){L=F(M)}function I(){var O,N,M;N=M=0;e(g,function(P,Q){e(P,function(S,R){var U,T;if(j(S)){S=g[Q][R];if(R>N){N=R}if(Q>M){M=Q}if(S.real){U=S.colspan-1;T=S.rowspan-1;if(U){if(R+U>N){N=R+U}}if(T){if(Q+T>M){M=Q+T}}}}})});return{x:N,y:M}}function v(S){var P,O,U,T,N,M,Q,R;D=F(S);if(L&&D){P=Math.min(L.x,D.x);O=Math.min(L.y,D.y);U=Math.max(L.x,D.x);T=Math.max(L.y,D.y);N=U;M=T;for(y=O;y<=M;y++){S=g[y][P];if(!S.real){if(P-(S.colspan-1)<P){P-=S.colspan-1}}}for(x=P;x<=N;x++){S=g[O][x];if(!S.real){if(O-(S.rowspan-1)<O){O-=S.rowspan-1}}}for(y=O;y<=T;y++){for(x=P;x<=U;x++){S=g[y][x];if(S.real){Q=S.colspan-1;R=S.rowspan-1;if(Q){if(x+Q>N){N=x+Q}}if(R){if(y+R>M){M=y+R}}}}}G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=O;y<=M;y++){for(x=P;x<=N;x++){if(g[y][x]){G.addClass(g[y][x].elm,"mceSelected")}}}}}d.extend(this,{deleteTable:r,split:C,merge:p,insertRow:l,insertCol:h,deleteCols:n,deleteRows:m,cutRows:E,copyRows:J,pasteRows:B,getPos:F,setStartCell:w,setEndCell:v})}d.create("tinymce.plugins.TablePlugin",{init:function(g,h){var f,m,j=true;function l(p){var o=g.selection,n=g.dom.getParent(p||o.getNode(),"table");if(n){return new b(n,g.dom,o)}}function k(){g.getBody().style.webkitUserSelect="";if(j){g.dom.removeClass(g.dom.select("td.mceSelected,th.mceSelected"),"mceSelected");j=false}}e([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(n){g.addButton(n[0],{title:n[1],cmd:n[2],ui:n[3]})});if(!d.isIE){g.onClick.add(function(n,o){o=o.target;if(o.nodeName==="TABLE"){n.selection.select(o);n.nodeChanged()}})}g.onPreProcess.add(function(o,p){var n,q,r,t=o.dom,s;n=t.select("table",p.node);q=n.length;while(q--){r=n[q];t.setAttrib(r,"data-mce-style","");if((s=t.getAttrib(r,"width"))){t.setStyle(r,"width",s);t.setAttrib(r,"width","")}if((s=t.getAttrib(r,"height"))){t.setStyle(r,"height",s);t.setAttrib(r,"height","")}}});g.onNodeChange.add(function(q,o,s){var r;s=q.selection.getStart();r=q.dom.getParent(s,"td,th,caption");o.setActive("table",s.nodeName==="TABLE"||!!r);if(r&&r.nodeName==="CAPTION"){r=0}o.setDisabled("delete_table",!r);o.setDisabled("delete_col",!r);o.setDisabled("delete_table",!r);o.setDisabled("delete_row",!r);o.setDisabled("col_after",!r);o.setDisabled("col_before",!r);o.setDisabled("row_after",!r);o.setDisabled("row_before",!r);o.setDisabled("row_props",!r);o.setDisabled("cell_props",!r);o.setDisabled("split_cells",!r);o.setDisabled("merge_cells",!r)});g.onInit.add(function(r){var p,t,q=r.dom,u;f=r.windowManager;r.onMouseDown.add(function(w,z){if(z.button!=2){k();t=q.getParent(z.target,"td,th");p=q.getParent(t,"table")}});q.bind(r.getDoc(),"mouseover",function(C){var A,z,B=C.target;if(t&&(u||B!=t)&&(B.nodeName=="TD"||B.nodeName=="TH")){z=q.getParent(B,"table");if(z==p){if(!u){u=l(z);u.setStartCell(t);r.getBody().style.webkitUserSelect="none"}u.setEndCell(B);j=true}A=r.selection.getSel();try{if(A.removeAllRanges){A.removeAllRanges()}else{A.empty()}}catch(w){}C.preventDefault()}});r.onMouseUp.add(function(F,G){var z,B=F.selection,H,I=B.getSel(),w,C,A,E;if(t){if(u){F.getBody().style.webkitUserSelect=""}function D(J,L){var K=new d.dom.TreeWalker(J,J);do{if(J.nodeType==3&&d.trim(J.nodeValue).length!=0){if(L){z.setStart(J,0)}else{z.setEnd(J,J.nodeValue.length)}return}if(J.nodeName=="BR"){if(L){z.setStartBefore(J)}else{z.setEndBefore(J)}return}}while(J=(L?K.next():K.prev()))}H=q.select("td.mceSelected,th.mceSelected");if(H.length>0){z=q.createRng();C=H[0];E=H[H.length-1];z.setStartBefore(C);z.setEndAfter(C);D(C,1);w=new d.dom.TreeWalker(C,q.getParent(H[0],"table"));do{if(C.nodeName=="TD"||C.nodeName=="TH"){if(!q.hasClass(C,"mceSelected")){break}A=C}}while(C=w.next());D(A);B.setRng(z)}F.nodeChanged();t=u=p=null}});r.onKeyUp.add(function(w,z){k()});r.onKeyDown.add(function(w,z){n(w)});r.onMouseDown.add(function(w,z){if(z.button!=2){n(w)}});function o(D,z,A,F){var B=3,G=D.dom.getParent(z.startContainer,"TABLE"),C,w,E;if(G){C=G.parentNode}w=z.startContainer.nodeType==B&&z.startOffset==0&&z.endOffset==0&&F&&(A.nodeName=="TR"||A==C);E=(A.nodeName=="TD"||A.nodeName=="TH")&&!F;return w||E}function n(A){if(!d.isWebKit){return}var z=A.selection.getRng();var C=A.selection.getNode();var B=A.dom.getParent(z.startContainer,"TD,TH");if(!o(A,z,C,B)){return}if(!B){B=C}var w=B.lastChild;while(w.lastChild){w=w.lastChild}z.setEnd(w,w.nodeValue.length);A.selection.setRng(z)}r.plugins.table.fixTableCellSelection=n;if(r&&r.plugins.contextmenu){r.plugins.contextmenu.onContextMenu.add(function(A,w,C){var D,B=r.selection,z=B.getNode()||r.getBody();if(r.dom.getParent(C,"td")||r.dom.getParent(C,"th")||r.dom.select("td.mceSelected,th.mceSelected").length){w.removeAll();if(z.nodeName=="A"&&!r.dom.getAttrib(z,"name")){w.add({title:"advanced.link_desc",icon:"link",cmd:r.plugins.advlink?"mceAdvLink":"mceLink",ui:true});w.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});w.addSeparator()}if(z.nodeName=="IMG"&&z.className.indexOf("mceItem")==-1){w.add({title:"advanced.image_desc",icon:"image",cmd:r.plugins.advimage?"mceAdvImage":"mceImage",ui:true});w.addSeparator()}w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});w.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});w.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});w.addSeparator();D=w.addMenu({title:"table.cell"});D.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});D.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});D.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});D=w.addMenu({title:"table.row"});D.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});D.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});D.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});D.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});D.addSeparator();D.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});D.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});D.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!m);D.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!m);D=w.addMenu({title:"table.col"});D.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});D.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});D.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(d.isWebKit){function v(C,N){var L=d.VK;var Q=N.keyCode;function O(Y,U,S){var T=Y?"previousSibling":"nextSibling";var Z=C.dom.getParent(U,"tr");var X=Z[T];if(X){z(C,U,X,Y);d.dom.Event.cancel(S);return true}else{var aa=C.dom.getParent(Z,"table");var W=Z.parentNode;var R=W.nodeName.toLowerCase();if(R==="tbody"||R===(Y?"tfoot":"thead")){var V=w(Y,aa,W,"tbody");if(V!==null){return K(Y,V,U,S)}}return M(Y,Z,T,aa,S)}}function w(V,T,U,X){var S=C.dom.select(">"+X,T);var R=S.indexOf(U);if(V&&R===0||!V&&R===S.length-1){return B(V,T)}else{if(R===-1){var W=U.tagName.toLowerCase()==="thead"?0:S.length-1;return S[W]}else{return S[R+(V?-1:1)]}}}function B(U,T){var S=U?"thead":"tfoot";var R=C.dom.select(">"+S,T);return R.length!==0?R[0]:null}function K(V,T,S,U){var R=J(T,V);R&&z(C,S,R,V);d.dom.Event.cancel(U);return true}function M(Y,U,R,X,W){var S=X[R];if(S){F(S);return true}else{var V=C.dom.getParent(X,"td,th");if(V){return O(Y,V,W)}else{var T=J(U,!Y);F(T);return d.dom.Event.cancel(W)}}}function J(S,R){return S&&S[R?"lastChild":"firstChild"]}function F(R){C.selection.setCursorLocation(R,0)}function A(){return Q==L.UP||Q==L.DOWN}function D(R){var T=R.selection.getNode();var S=R.dom.getParent(T,"tr");return S!==null}function P(S){var R=0;var T=S;while(T.previousSibling){T=T.previousSibling;R=R+a(T,"colspan")}return R}function E(T,R){var U=0;var S=0;e(T.children,function(V,W){U=U+a(V,"colspan");S=W;if(U>R){return false}});return S}function z(T,W,Y,V){var X=P(T.dom.getParent(W,"td,th"));var S=E(Y,X);var R=Y.childNodes[S];var U=J(R,V);F(U||R)}function H(R){var T=C.selection.getNode();var U=C.dom.getParent(T,"td,th");var S=C.dom.getParent(R,"td,th");return U&&U!==S&&I(U,S)}function I(S,R){return C.dom.getParent(S,"TABLE")===C.dom.getParent(R,"TABLE")}if(A()&&D(C)){var G=C.selection.getNode();setTimeout(function(){if(H(G)){O(!N.shiftKey&&Q===L.UP,G,N)}},0)}}r.onKeyDown.add(v)}if(!d.isIE){function s(){var w;for(w=r.getBody().lastChild;w&&w.nodeType==3&&!w.nodeValue.length;w=w.previousSibling){}if(w&&w.nodeName=="TABLE"){r.dom.add(r.getBody(),"p",null,'<br mce_bogus="1" />')}}if(d.isGecko){r.onKeyDown.add(function(z,B){var w,A,C=z.dom;if(B.keyCode==37||B.keyCode==38){w=z.selection.getRng();A=C.getParent(w.startContainer,"table");if(A&&z.getBody().firstChild==A){if(c(w,A)){w=C.createRng();w.setStartBefore(A);w.setEndBefore(A);z.selection.setRng(w);B.preventDefault()}}}})}r.onKeyUp.add(s);r.onSetContent.add(s);r.onVisualAid.add(s);r.onPreProcess.add(function(w,A){var z=A.node.lastChild;if(z&&z.childNodes.length==1&&z.firstChild.nodeName=="BR"){w.dom.remove(z)}});if(d.isGecko){r.onKeyDown.add(function(z,B){if(B.keyCode===d.VK.ENTER&&B.shiftKey){var A=z.selection.getRng().startContainer;var C=q.getParent(A,"td,th");if(C){var w=z.getDoc().createTextNode("\uFEFF");q.insertAfter(w,A)}}})}s();r.startContent=r.getContent({format:"raw"})}});e({mceTableSplitCells:function(n){n.split()},mceTableMergeCells:function(o){var p,q,n;n=g.dom.getParent(g.selection.getNode(),"th,td");if(n){p=n.rowSpan;q=n.colSpan}if(!g.dom.select("td.mceSelected,th.mceSelected").length){f.open({url:h+"/merge_cells.htm",width:240+parseInt(g.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(g.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:p,cols:q,onaction:function(r){o.merge(n,r.cols,r.rows)},plugin_url:h})}else{o.merge()}},mceTableInsertRowBefore:function(n){n.insertRow(true)},mceTableInsertRowAfter:function(n){n.insertRow()},mceTableInsertColBefore:function(n){n.insertCol(true)},mceTableInsertColAfter:function(n){n.insertCol()},mceTableDeleteCol:function(n){n.deleteCols()},mceTableDeleteRow:function(n){n.deleteRows()},mceTableCutRow:function(n){m=n.cutRows()},mceTableCopyRow:function(n){m=n.copyRows()},mceTablePasteRowBefore:function(n){n.pasteRows(m,true)},mceTablePasteRowAfter:function(n){n.pasteRows(m)},mceTableDelete:function(n){n.deleteTable()}},function(o,n){g.addCommand(n,function(){var p=l();if(p){o(p);g.execCommand("mceRepaint");k()}})});e({mceInsertTable:function(n){f.open({url:h+"/table.htm",width:400+parseInt(g.getLang("table.table_delta_width",0)),height:320+parseInt(g.getLang("table.table_delta_height",0)),inline:1},{plugin_url:h,action:n?n.action:0})},mceTableRowProps:function(){f.open({url:h+"/row.htm",width:400+parseInt(g.getLang("table.rowprops_delta_width",0)),height:295+parseInt(g.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:h})},mceTableCellProps:function(){f.open({url:h+"/cell.htm",width:400+parseInt(g.getLang("table.cellprops_delta_width",0)),height:295+parseInt(g.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:h})}},function(o,n){g.addCommand(n,function(p,q){o(q)})})}});d.PluginManager.add("table",d.plugins.TablePlugin)})(tinymce);
1
+ (function(d){var e=d.each;function c(g,h){var j=h.ownerDocument,f=j.createRange(),k;f.setStartBefore(h);f.setEnd(g.endContainer,g.endOffset);k=j.createElement("body");k.appendChild(f.cloneContents());return k.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length==0}function a(g,f){return parseInt(g.getAttribute(f)||1)}function b(H,G,K){var g,L,D,o;t();o=G.getParent(K.getStart(),"th,td");if(o){L=F(o);D=I();o=z(L.x,L.y)}function A(N,M){N=N.cloneNode(M);N.removeAttribute("id");return N}function t(){var M=0;g=[];e(["thead","tbody","tfoot"],function(N){var O=G.select("> "+N+" tr",H);e(O,function(P,Q){Q+=M;e(G.select("> td, > th",P),function(W,R){var S,T,U,V;if(g[Q]){while(g[Q][R]){R++}}U=a(W,"rowspan");V=a(W,"colspan");for(T=Q;T<Q+U;T++){if(!g[T]){g[T]=[]}for(S=R;S<R+V;S++){g[T][S]={part:N,real:T==Q&&S==R,elm:W,rowspan:U,colspan:V}}}})});M+=O.length})}function z(M,O){var N;N=g[O];if(N){return N[M]}}function s(O,M,N){if(O){N=parseInt(N);if(N===1){O.removeAttribute(M,1)}else{O.setAttribute(M,N,1)}}}function j(M){return M&&(G.hasClass(M.elm,"mceSelected")||M==o)}function k(){var M=[];e(H.rows,function(N){e(N.cells,function(O){if(G.hasClass(O,"mceSelected")||O==o.elm){M.push(N);return false}})});return M}function r(){var M=G.createRng();M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H)}function f(M){var N;d.walk(M,function(P){var O;if(P.nodeType==3){e(G.getParents(P.parentNode,null,M).reverse(),function(Q){Q=A(Q,false);if(!N){N=O=Q}else{if(O){O.appendChild(Q)}}O=Q});if(O){O.innerHTML=d.isIE?"&nbsp;":'<br data-mce-bogus="1" />'}return false}},"childNodes");M=A(M,false);s(M,"rowSpan",1);s(M,"colSpan",1);if(N){M.appendChild(N)}else{if(!d.isIE){M.innerHTML='<br data-mce-bogus="1" />'}}return M}function q(){var M=G.createRng();e(G.select("tr",H),function(N){if(N.cells.length==0){G.remove(N)}});if(G.select("tr",H).length==0){M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H);return}e(G.select("thead,tbody,tfoot",H),function(N){if(N.rows.length==0){G.remove(N)}});t();row=g[Math.min(g.length-1,L.y)];if(row){K.select(row[Math.min(row.length-1,L.x)].elm,true);K.collapse(true)}}function u(S,Q,U,R){var P,N,M,O,T;P=g[Q][S].elm.parentNode;for(M=1;M<=U;M++){P=G.getNext(P,"tr");if(P){for(N=S;N>=0;N--){T=g[Q+M][N].elm;if(T.parentNode==P){for(O=1;O<=R;O++){G.insertAfter(f(T),T)}break}}if(N==-1){for(O=1;O<=R;O++){P.insertBefore(f(P.cells[0]),P.cells[0])}}}}}function C(){e(g,function(M,N){e(M,function(P,O){var S,R,T,Q;if(j(P)){P=P.elm;S=a(P,"colspan");R=a(P,"rowspan");if(S>1||R>1){s(P,"rowSpan",1);s(P,"colSpan",1);for(Q=0;Q<S-1;Q++){G.insertAfter(f(P),P)}u(O,N,R-1,S)}}})})}function p(V,S,Y){var P,O,X,W,U,R,T,M,V,N,Q;if(V){pos=F(V);P=pos.x;O=pos.y;X=P+(S-1);W=O+(Y-1)}else{L=D=null;e(g,function(Z,aa){e(Z,function(ac,ab){if(j(ac)){if(!L){L={x:ab,y:aa}}D={x:ab,y:aa}}})});P=L.x;O=L.y;X=D.x;W=D.y}T=z(P,O);M=z(X,W);if(T&&M&&T.part==M.part){C();t();T=z(P,O).elm;s(T,"colSpan",(X-P)+1);s(T,"rowSpan",(W-O)+1);for(R=O;R<=W;R++){for(U=P;U<=X;U++){if(!g[R]||!g[R][U]){continue}V=g[R][U].elm;if(V!=T){N=d.grep(V.childNodes);e(N,function(Z){T.appendChild(Z)});if(N.length){N=d.grep(T.childNodes);Q=0;e(N,function(Z){if(Z.nodeName=="BR"&&G.getAttrib(Z,"data-mce-bogus")&&Q++<N.length-1){T.removeChild(Z)}})}G.remove(V)}}}q()}}function l(Q){var M,S,P,R,T,U,N,V,O;e(g,function(W,X){e(W,function(Z,Y){if(j(Z)){Z=Z.elm;T=Z.parentNode;U=A(T,false);M=X;if(Q){return false}}});if(Q){return !M}});for(R=0;R<g[0].length;R++){if(!g[M][R]){continue}S=g[M][R].elm;if(S!=P){if(!Q){O=a(S,"rowspan");if(O>1){s(S,"rowSpan",O+1);continue}}else{if(M>0&&g[M-1][R]){V=g[M-1][R].elm;O=a(V,"rowSpan");if(O>1){s(V,"rowSpan",O+1);continue}}}N=f(S);s(N,"colSpan",S.colSpan);U.appendChild(N);P=S}}if(U.hasChildNodes()){if(!Q){G.insertAfter(U,T)}else{T.parentNode.insertBefore(U,T)}}}function h(N){var O,M;e(g,function(P,Q){e(P,function(S,R){if(j(S)){O=R;if(N){return false}}});if(N){return !O}});e(g,function(S,T){var P,Q,R;if(!S[O]){return}P=S[O].elm;if(P!=M){R=a(P,"colspan");Q=a(P,"rowspan");if(R==1){if(!N){G.insertAfter(f(P),P);u(O,T,Q-1,R)}else{P.parentNode.insertBefore(f(P),P);u(O,T,Q-1,R)}}else{s(P,"colSpan",P.colSpan+1)}M=P}})}function n(){var M=[];e(g,function(N,O){e(N,function(Q,P){if(j(Q)&&d.inArray(M,P)===-1){e(g,function(T){var R=T[P].elm,S;S=a(R,"colSpan");if(S>1){s(R,"colSpan",S-1)}else{G.remove(R)}});M.push(P)}})});q()}function m(){var N;function M(Q){var P,R,O;P=G.getNext(Q,"tr");e(Q.cells,function(S){var T=a(S,"rowSpan");if(T>1){s(S,"rowSpan",T-1);R=F(S);u(R.x,R.y,1,1)}});R=F(Q.cells[0]);e(g[R.y],function(S){var T;S=S.elm;if(S!=O){T=a(S,"rowSpan");if(T<=1){G.remove(S)}else{s(S,"rowSpan",T-1)}O=S}})}N=k();e(N.reverse(),function(O){M(O)});q()}function E(){var M=k();G.remove(M);q();return M}function J(){var M=k();e(M,function(O,N){M[N]=A(O,true)});return M}function B(O,N){if(!O){return}var P=k(),M=P[N?0:P.length-1],Q=M.cells.length;e(g,function(S){var R;Q=0;e(S,function(U,T){if(U.real){Q+=U.colspan}if(U.elm.parentNode==M){R=1}});if(R){return false}});if(!N){O.reverse()}e(O,function(T){var S=T.cells.length,R;for(i=0;i<S;i++){R=T.cells[i];s(R,"colSpan",1);s(R,"rowSpan",1)}for(i=S;i<Q;i++){T.appendChild(f(T.cells[S-1]))}for(i=Q;i<S;i++){G.remove(T.cells[i])}if(N){M.parentNode.insertBefore(T,M)}else{G.insertAfter(T,M)}});G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected")}function F(M){var N;e(g,function(O,P){e(O,function(R,Q){if(R.elm==M){N={x:Q,y:P};return false}});return !N});return N}function w(M){L=F(M)}function I(){var O,N,M;N=M=0;e(g,function(P,Q){e(P,function(S,R){var U,T;if(j(S)){S=g[Q][R];if(R>N){N=R}if(Q>M){M=Q}if(S.real){U=S.colspan-1;T=S.rowspan-1;if(U){if(R+U>N){N=R+U}}if(T){if(Q+T>M){M=Q+T}}}}})});return{x:N,y:M}}function v(S){var P,O,U,T,N,M,Q,R;D=F(S);if(L&&D){P=Math.min(L.x,D.x);O=Math.min(L.y,D.y);U=Math.max(L.x,D.x);T=Math.max(L.y,D.y);N=U;M=T;for(y=O;y<=M;y++){S=g[y][P];if(!S.real){if(P-(S.colspan-1)<P){P-=S.colspan-1}}}for(x=P;x<=N;x++){S=g[O][x];if(!S.real){if(O-(S.rowspan-1)<O){O-=S.rowspan-1}}}for(y=O;y<=T;y++){for(x=P;x<=U;x++){S=g[y][x];if(S.real){Q=S.colspan-1;R=S.rowspan-1;if(Q){if(x+Q>N){N=x+Q}}if(R){if(y+R>M){M=y+R}}}}}G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=O;y<=M;y++){for(x=P;x<=N;x++){if(g[y][x]){G.addClass(g[y][x].elm,"mceSelected")}}}}}d.extend(this,{deleteTable:r,split:C,merge:p,insertRow:l,insertCol:h,deleteCols:n,deleteRows:m,cutRows:E,copyRows:J,pasteRows:B,getPos:F,setStartCell:w,setEndCell:v})}d.create("tinymce.plugins.TablePlugin",{init:function(g,h){var f,m,j=true;function l(p){var o=g.selection,n=g.dom.getParent(p||o.getNode(),"table");if(n){return new b(n,g.dom,o)}}function k(){g.getBody().style.webkitUserSelect="";if(j){g.dom.removeClass(g.dom.select("td.mceSelected,th.mceSelected"),"mceSelected");j=false}}e([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(n){g.addButton(n[0],{title:n[1],cmd:n[2],ui:n[3]})});if(!d.isIE){g.onClick.add(function(n,o){o=o.target;if(o.nodeName==="TABLE"){n.selection.select(o);n.nodeChanged()}})}g.onPreProcess.add(function(o,p){var n,q,r,t=o.dom,s;n=t.select("table",p.node);q=n.length;while(q--){r=n[q];t.setAttrib(r,"data-mce-style","");if((s=t.getAttrib(r,"width"))){t.setStyle(r,"width",s);t.setAttrib(r,"width","")}if((s=t.getAttrib(r,"height"))){t.setStyle(r,"height",s);t.setAttrib(r,"height","")}}});g.onNodeChange.add(function(q,o,s){var r;s=q.selection.getStart();r=q.dom.getParent(s,"td,th,caption");o.setActive("table",s.nodeName==="TABLE"||!!r);if(r&&r.nodeName==="CAPTION"){r=0}o.setDisabled("delete_table",!r);o.setDisabled("delete_col",!r);o.setDisabled("delete_table",!r);o.setDisabled("delete_row",!r);o.setDisabled("col_after",!r);o.setDisabled("col_before",!r);o.setDisabled("row_after",!r);o.setDisabled("row_before",!r);o.setDisabled("row_props",!r);o.setDisabled("cell_props",!r);o.setDisabled("split_cells",!r);o.setDisabled("merge_cells",!r)});g.onInit.add(function(r){var p,t,q=r.dom,u;f=r.windowManager;r.onMouseDown.add(function(w,z){if(z.button!=2){k();t=q.getParent(z.target,"td,th");p=q.getParent(t,"table")}});q.bind(r.getDoc(),"mouseover",function(C){var A,z,B=C.target;if(t&&(u||B!=t)&&(B.nodeName=="TD"||B.nodeName=="TH")){z=q.getParent(B,"table");if(z==p){if(!u){u=l(z);u.setStartCell(t);r.getBody().style.webkitUserSelect="none"}u.setEndCell(B);j=true}A=r.selection.getSel();try{if(A.removeAllRanges){A.removeAllRanges()}else{A.empty()}}catch(w){}C.preventDefault()}});r.onMouseUp.add(function(F,G){var z,B=F.selection,H,I=B.getSel(),w,C,A,E;if(t){if(u){F.getBody().style.webkitUserSelect=""}function D(J,L){var K=new d.dom.TreeWalker(J,J);do{if(J.nodeType==3&&d.trim(J.nodeValue).length!=0){if(L){z.setStart(J,0)}else{z.setEnd(J,J.nodeValue.length)}return}if(J.nodeName=="BR"){if(L){z.setStartBefore(J)}else{z.setEndBefore(J)}return}}while(J=(L?K.next():K.prev()))}H=q.select("td.mceSelected,th.mceSelected");if(H.length>0){z=q.createRng();C=H[0];E=H[H.length-1];z.setStartBefore(C);z.setEndAfter(C);D(C,1);w=new d.dom.TreeWalker(C,q.getParent(H[0],"table"));do{if(C.nodeName=="TD"||C.nodeName=="TH"){if(!q.hasClass(C,"mceSelected")){break}A=C}}while(C=w.next());D(A);B.setRng(z)}F.nodeChanged();t=u=p=null}});r.onKeyUp.add(function(w,z){k()});r.onKeyDown.add(function(w,z){n(w)});r.onMouseDown.add(function(w,z){if(z.button!=2){n(w)}});function o(D,z,A,F){var B=3,G=D.dom.getParent(z.startContainer,"TABLE"),C,w,E;if(G){C=G.parentNode}w=z.startContainer.nodeType==B&&z.startOffset==0&&z.endOffset==0&&F&&(A.nodeName=="TR"||A==C);E=(A.nodeName=="TD"||A.nodeName=="TH")&&!F;return w||E}function n(A){if(!d.isWebKit){return}var z=A.selection.getRng();var C=A.selection.getNode();var B=A.dom.getParent(z.startContainer,"TD,TH");if(!o(A,z,C,B)){return}if(!B){B=C}var w=B.lastChild;while(w.lastChild){w=w.lastChild}z.setEnd(w,w.nodeValue.length);A.selection.setRng(z)}r.plugins.table.fixTableCellSelection=n;if(r&&r.plugins.contextmenu){r.plugins.contextmenu.onContextMenu.add(function(A,w,C){var D,B=r.selection,z=B.getNode()||r.getBody();if(r.dom.getParent(C,"td")||r.dom.getParent(C,"th")||r.dom.select("td.mceSelected,th.mceSelected").length){w.removeAll();if(z.nodeName=="A"&&!r.dom.getAttrib(z,"name")){w.add({title:"advanced.link_desc",icon:"link",cmd:r.plugins.advlink?"mceAdvLink":"mceLink",ui:true});w.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});w.addSeparator()}if(z.nodeName=="IMG"&&z.className.indexOf("mceItem")==-1){w.add({title:"advanced.image_desc",icon:"image",cmd:r.plugins.advimage?"mceAdvImage":"mceImage",ui:true});w.addSeparator()}w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});w.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});w.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});w.addSeparator();D=w.addMenu({title:"table.cell"});D.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});D.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});D.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});D=w.addMenu({title:"table.row"});D.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});D.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});D.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});D.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});D.addSeparator();D.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});D.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});D.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!m);D.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!m);D=w.addMenu({title:"table.col"});D.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});D.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});D.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(d.isWebKit){function v(C,N){var L=d.VK;var Q=N.keyCode;function O(Y,U,S){var T=Y?"previousSibling":"nextSibling";var Z=C.dom.getParent(U,"tr");var X=Z[T];if(X){z(C,U,X,Y);d.dom.Event.cancel(S);return true}else{var aa=C.dom.getParent(Z,"table");var W=Z.parentNode;var R=W.nodeName.toLowerCase();if(R==="tbody"||R===(Y?"tfoot":"thead")){var V=w(Y,aa,W,"tbody");if(V!==null){return K(Y,V,U,S)}}return M(Y,Z,T,aa,S)}}function w(V,T,U,X){var S=C.dom.select(">"+X,T);var R=S.indexOf(U);if(V&&R===0||!V&&R===S.length-1){return B(V,T)}else{if(R===-1){var W=U.tagName.toLowerCase()==="thead"?0:S.length-1;return S[W]}else{return S[R+(V?-1:1)]}}}function B(U,T){var S=U?"thead":"tfoot";var R=C.dom.select(">"+S,T);return R.length!==0?R[0]:null}function K(V,T,S,U){var R=J(T,V);R&&z(C,S,R,V);d.dom.Event.cancel(U);return true}function M(Y,U,R,X,W){var S=X[R];if(S){F(S);return true}else{var V=C.dom.getParent(X,"td,th");if(V){return O(Y,V,W)}else{var T=J(U,!Y);F(T);return d.dom.Event.cancel(W)}}}function J(S,R){var T=S&&S[R?"lastChild":"firstChild"];return T&&T.nodeName==="BR"?C.dom.getParent(T,"td,th"):T}function F(R){C.selection.setCursorLocation(R,0)}function A(){return Q==L.UP||Q==L.DOWN}function D(R){var T=R.selection.getNode();var S=R.dom.getParent(T,"tr");return S!==null}function P(S){var R=0;var T=S;while(T.previousSibling){T=T.previousSibling;R=R+a(T,"colspan")}return R}function E(T,R){var U=0;var S=0;e(T.children,function(V,W){U=U+a(V,"colspan");S=W;if(U>R){return false}});return S}function z(T,W,Y,V){var X=P(T.dom.getParent(W,"td,th"));var S=E(Y,X);var R=Y.childNodes[S];var U=J(R,V);F(U||R)}function H(R){var T=C.selection.getNode();var U=C.dom.getParent(T,"td,th");var S=C.dom.getParent(R,"td,th");return U&&U!==S&&I(U,S)}function I(S,R){return C.dom.getParent(S,"TABLE")===C.dom.getParent(R,"TABLE")}if(A()&&D(C)){var G=C.selection.getNode();setTimeout(function(){if(H(G)){O(!N.shiftKey&&Q===L.UP,G,N)}},0)}}r.onKeyDown.add(v)}function s(){var w;for(w=r.getBody().lastChild;w&&w.nodeType==3&&!w.nodeValue.length;w=w.previousSibling){}if(w&&w.nodeName=="TABLE"){if(r.settings.forced_root_block){r.dom.add(r.getBody(),r.settings.forced_root_block,null,d.isIE?"&nbsp;":'<br data-mce-bogus="1" />')}else{r.dom.add(r.getBody(),"br",{"data-mce-bogus":"1"})}}}if(d.isGecko){r.onKeyDown.add(function(z,B){var w,A,C=z.dom;if(B.keyCode==37||B.keyCode==38){w=z.selection.getRng();A=C.getParent(w.startContainer,"table");if(A&&z.getBody().firstChild==A){if(c(w,A)){w=C.createRng();w.setStartBefore(A);w.setEndBefore(A);z.selection.setRng(w);B.preventDefault()}}}})}r.onKeyUp.add(s);r.onSetContent.add(s);r.onVisualAid.add(s);r.onPreProcess.add(function(w,A){var z=A.node.lastChild;if(z&&(z.nodeName=="BR"||(z.childNodes.length==1&&(z.firstChild.nodeName=="BR"||z.firstChild.nodeValue=="\u00a0")))&&z.previousSibling&&z.previousSibling.nodeName=="TABLE"){w.dom.remove(z)}});s();r.startContent=r.getContent({format:"raw"})});e({mceTableSplitCells:function(n){n.split()},mceTableMergeCells:function(o){var p,q,n;n=g.dom.getParent(g.selection.getNode(),"th,td");if(n){p=n.rowSpan;q=n.colSpan}if(!g.dom.select("td.mceSelected,th.mceSelected").length){f.open({url:h+"/merge_cells.htm",width:240+parseInt(g.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(g.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:p,cols:q,onaction:function(r){o.merge(n,r.cols,r.rows)},plugin_url:h})}else{o.merge()}},mceTableInsertRowBefore:function(n){n.insertRow(true)},mceTableInsertRowAfter:function(n){n.insertRow()},mceTableInsertColBefore:function(n){n.insertCol(true)},mceTableInsertColAfter:function(n){n.insertCol()},mceTableDeleteCol:function(n){n.deleteCols()},mceTableDeleteRow:function(n){n.deleteRows()},mceTableCutRow:function(n){m=n.cutRows()},mceTableCopyRow:function(n){m=n.copyRows()},mceTablePasteRowBefore:function(n){n.pasteRows(m,true)},mceTablePasteRowAfter:function(n){n.pasteRows(m)},mceTableDelete:function(n){n.deleteTable()}},function(o,n){g.addCommand(n,function(){var p=l();if(p){o(p);g.execCommand("mceRepaint");k()}})});e({mceInsertTable:function(n){f.open({url:h+"/table.htm",width:400+parseInt(g.getLang("table.table_delta_width",0)),height:320+parseInt(g.getLang("table.table_delta_height",0)),inline:1},{plugin_url:h,action:n?n.action:0})},mceTableRowProps:function(){f.open({url:h+"/row.htm",width:400+parseInt(g.getLang("table.rowprops_delta_width",0)),height:295+parseInt(g.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:h})},mceTableCellProps:function(){f.open({url:h+"/cell.htm",width:400+parseInt(g.getLang("table.cellprops_delta_width",0)),height:295+parseInt(g.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:h})}},function(o,n){g.addCommand(n,function(p,q){o(q)})})}});d.PluginManager.add("table",d.plugins.TablePlugin)})(tinymce);
mce/table/js/cell.js CHANGED
@@ -137,7 +137,7 @@ function updateAction() {
137
  do {
138
  if (cell == tdElm)
139
  break;
140
- col += cell.getAttribute("colspan");
141
  } while ((cell = nextCell(cell)) != null);
142
 
143
  for (var i=0; i<rows.length; i++) {
@@ -152,7 +152,7 @@ function updateAction() {
152
  cell = updateCell(cell, true);
153
  break;
154
  }
155
- curr += cell.getAttribute("colspan");
156
  } while ((cell = nextCell(cell)) != null);
157
  }
158
 
137
  do {
138
  if (cell == tdElm)
139
  break;
140
+ col += cell.getAttribute("colspan")?cell.getAttribute("colspan"):1;
141
  } while ((cell = nextCell(cell)) != null);
142
 
143
  for (var i=0; i<rows.length; i++) {
152
  cell = updateCell(cell, true);
153
  break;
154
  }
155
+ curr += cell.getAttribute("colspan")?cell.getAttribute("colspan"):1;
156
  } while ((cell = nextCell(cell)) != null);
157
  }
158
 
mce/table/js/row.js CHANGED
@@ -25,6 +25,7 @@ function init() {
25
  var dir = dom.getAttrib(trElm, 'dir');
26
 
27
  selectByValue(formObj, 'rowtype', rowtype);
 
28
 
29
  // Any cells selected
30
  if (dom.select('td.mceSelected,th.mceSelected', trElm).length == 0) {
@@ -234,4 +235,20 @@ function changedColor() {
234
  formObj.style.value = dom.serializeStyle(st);
235
  }
236
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
237
  tinyMCEPopup.onInit.add(init);
25
  var dir = dom.getAttrib(trElm, 'dir');
26
 
27
  selectByValue(formObj, 'rowtype', rowtype);
28
+ setActionforRowType(formObj, rowtype);
29
 
30
  // Any cells selected
31
  if (dom.select('td.mceSelected,th.mceSelected', trElm).length == 0) {
235
  formObj.style.value = dom.serializeStyle(st);
236
  }
237
 
238
+ function changedRowType() {
239
+ var formObj = document.forms[0];
240
+ var rowtype = getSelectValue(formObj, 'rowtype');
241
+
242
+ setActionforRowType(formObj, rowtype);
243
+
244
+ }
245
+
246
+ function setActionforRowType(formObj, rowtype) {
247
+ if (rowtype === "tbody") {
248
+ formObj.action.disabled = false;
249
+ } else {
250
+ selectByValue(formObj, 'action', "row");
251
+ formObj.action.disabled = true;
252
+ }
253
+ }
254
  tinyMCEPopup.onInit.add(init);
mce/table/js/table.js CHANGED
@@ -242,13 +242,17 @@ function insertTable() {
242
  } else
243
  inst.execCommand('mceInsertContent', false, html);
244
 
245
- tinymce.each(dom.select('table[data-mce-new]'), function(node) {
 
 
246
  // Fixes a bug in IE where the caret cannot be placed after the table if the table is at the end of the document
247
  if (tinymce.isIE && node.nextSibling == null) {
248
- dom.insertAfter(dom.create('p'), node);
249
- }
 
 
 
250
 
251
- var tdorth = dom.select('td,th', node);
252
  try {
253
  // IE9 might fail to do this selection
254
  inst.selection.setCursorLocation(tdorth[0], 0);
@@ -303,6 +307,15 @@ function init() {
303
  var formObj = document.forms[0];
304
  var elm = dom.getParent(inst.selection.getNode(), "table");
305
 
 
 
 
 
 
 
 
 
 
306
  action = tinyMCEPopup.getWindowArg('action');
307
 
308
  if (!action)
242
  } else
243
  inst.execCommand('mceInsertContent', false, html);
244
 
245
+ tinymce.each(dom.select('table[data-mce-new]'), function(node) {
246
+ var tdorth = dom.select('td,th', node);
247
+
248
  // Fixes a bug in IE where the caret cannot be placed after the table if the table is at the end of the document
249
  if (tinymce.isIE && node.nextSibling == null) {
250
+ if (inst.settings.forced_root_block)
251
+ dom.insertAfter(dom.create(inst.settings.forced_root_block), node);
252
+ else
253
+ dom.insertAfter(dom.create('br', {'data-mce-bogus': '1'}), node);
254
+ }
255
 
 
256
  try {
257
  // IE9 might fail to do this selection
258
  inst.selection.setCursorLocation(tdorth[0], 0);
307
  var formObj = document.forms[0];
308
  var elm = dom.getParent(inst.selection.getNode(), "table");
309
 
310
+ // Hide advanced fields that isn't available in the schema
311
+ tinymce.each("summary id rules dir style frame".split(" "), function(name) {
312
+ var tr = tinyMCEPopup.dom.getParent(name, "tr") || tinyMCEPopup.dom.getParent("t" + name, "tr");
313
+
314
+ if (tr && !tinyMCEPopup.editor.schema.isValid("table", name)) {
315
+ tr.style.display = 'none';
316
+ }
317
+ });
318
+
319
  action = tinyMCEPopup.getWindowArg('action');
320
 
321
  if (!action)
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=349"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=349"></script>
7
- <script type="text/javascript" src="../../utils/validate.js?ver=349"></script>
8
- <script type="text/javascript" src="js/merge_cells.js?ver=349"></script>
9
  </head>
10
  <body style="margin: 8px" role="application">
11
  <form onsubmit="MergeCellsDialog.merge();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=358"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=358"></script>
7
+ <script type="text/javascript" src="../../utils/validate.js?ver=358"></script>
8
+ <script type="text/javascript" src="js/merge_cells.js?ver=358"></script>
9
  </head>
10
  <body style="margin: 8px" role="application">
11
  <form onsubmit="MergeCellsDialog.merge();return false;" action="#">
mce/table/row.htm CHANGED
@@ -2,13 +2,13 @@
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=349"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=349"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=349"></script>
8
- <script type="text/javascript" src="../../utils/validate.js?ver=349"></script>
9
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=349"></script>
10
- <script type="text/javascript" src="js/row.js?ver=349"></script>
11
- <link href="css/row.css?ver=349" rel="stylesheet" type="text/css" />
12
  </head>
13
  <body id="tablerow" style="display: none" role="application">
14
  <form onsubmit="updateAction();return false;" action="#">
@@ -28,7 +28,7 @@
28
  <tr>
29
  <td><label for="rowtype">{#table_dlg.rowtype}</label></td>
30
  <td class="col2">
31
- <select id="rowtype" name="rowtype" class="mceFocus">
32
  <option value="thead">{#table_dlg.thead}</option>
33
  <option value="tbody">{#table_dlg.tbody}</option>
34
  <option value="tfoot">{#table_dlg.tfoot}</option>
@@ -83,8 +83,8 @@
83
 
84
  <table role="presentation" border="0" cellpadding="0" cellspacing="4">
85
  <tr>
86
- <td class="column1"><label for="id">{#table_dlg.id}</label></td>
87
- <td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
88
  </tr>
89
 
90
  <tr>
@@ -93,25 +93,25 @@
93
  </tr>
94
 
95
  <tr>
96
- <td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
97
  <td>
98
- <select id="dir" name="dir" style="width: 200px">
99
- <option value="">{#not_set}</option>
100
- <option value="ltr">{#table_dlg.ltr}</option>
101
- <option value="rtl">{#table_dlg.rtl}</option>
102
  </select>
103
- </td>
104
  </tr>
105
 
106
  <tr>
107
- <td class="column1"><label for="lang">{#table_dlg.langcode}</label></td>
108
  <td>
109
  <input id="lang" name="lang" type="text" value="" style="width: 200px" />
110
- </td>
111
  </tr>
112
 
113
  <tr>
114
- <td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
115
  <td>
116
  <table role="presentation" border="0" cellpadding="0" cellspacing="0">
117
  <tr>
@@ -119,11 +119,11 @@
119
  <td id="backgroundimagebrowsercontainer">&nbsp;</td>
120
  </tr>
121
  </table>
122
- </td>
123
  </tr>
124
 
125
  <tr>
126
- <td class="column1"><label for="bgcolor" id="bgcolor_label">{#table_dlg.bgcolor}</label></td>
127
  <td>
128
  <span role="group" aria-labelledby="bgcolor_label">
129
  <table role="presentation" border="0" cellpadding="0" cellspacing="0">
@@ -133,7 +133,7 @@
133
  </tr>
134
  </table>
135
  </span>
136
- </td>
137
  </tr>
138
  </table>
139
  </fieldset>
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=358"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=358"></script>
7
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=358"></script>
8
+ <script type="text/javascript" src="../../utils/validate.js?ver=358"></script>
9
+ <script type="text/javascript" src="../../utils/editable_selects.js?ver=358"></script>
10
+ <script type="text/javascript" src="js/row.js?ver=358"></script>
11
+ <link href="css/row.css?ver=358" rel="stylesheet" type="text/css" />
12
  </head>
13
  <body id="tablerow" style="display: none" role="application">
14
  <form onsubmit="updateAction();return false;" action="#">
28
  <tr>
29
  <td><label for="rowtype">{#table_dlg.rowtype}</label></td>
30
  <td class="col2">
31
+ <select id="rowtype" name="rowtype" class="mceFocus" onChange="changedRowType();">
32
  <option value="thead">{#table_dlg.thead}</option>
33
  <option value="tbody">{#table_dlg.tbody}</option>
34
  <option value="tfoot">{#table_dlg.tfoot}</option>
83
 
84
  <table role="presentation" border="0" cellpadding="0" cellspacing="4">
85
  <tr>
86
+ <td class="column1"><label for="id">{#table_dlg.id}</label></td>
87
+ <td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
88
  </tr>
89
 
90
  <tr>
93
  </tr>
94
 
95
  <tr>
96
+ <td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
97
  <td>
98
+ <select id="dir" name="dir" style="width: 200px">
99
+ <option value="">{#not_set}</option>
100
+ <option value="ltr">{#table_dlg.ltr}</option>
101
+ <option value="rtl">{#table_dlg.rtl}</option>
102
  </select>
103
+ </td>
104
  </tr>
105
 
106
  <tr>
107
+ <td class="column1"><label for="lang">{#table_dlg.langcode}</label></td>
108
  <td>
109
  <input id="lang" name="lang" type="text" value="" style="width: 200px" />
110
+ </td>
111
  </tr>
112
 
113
  <tr>
114
+ <td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
115
  <td>
116
  <table role="presentation" border="0" cellpadding="0" cellspacing="0">
117
  <tr>
119
  <td id="backgroundimagebrowsercontainer">&nbsp;</td>
120
  </tr>
121
  </table>
122
+ </td>
123
  </tr>
124
 
125
  <tr>
126
+ <td class="column1"><label for="bgcolor" id="bgcolor_label">{#table_dlg.bgcolor}</label></td>
127
  <td>
128
  <span role="group" aria-labelledby="bgcolor_label">
129
  <table role="presentation" border="0" cellpadding="0" cellspacing="0">
133
  </tr>
134
  </table>
135
  </span>
136
+ </td>
137
  </tr>
138
  </table>
139
  </fieldset>
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=349"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=349"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=349"></script>
8
- <script type="text/javascript" src="../../utils/validate.js?ver=349"></script>
9
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=349"></script>
10
- <script type="text/javascript" src="js/table.js?ver=349"></script>
11
- <link href="css/table.css?ver=349" rel="stylesheet" type="text/css" />
12
  </head>
13
  <body id="table" style="display: none" role="application" aria-labelledby="app_title">
14
  <span style="display:none;" id="app_title">{#table_dlg.title}</span>
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=358"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=358"></script>
7
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=358"></script>
8
+ <script type="text/javascript" src="../../utils/validate.js?ver=358"></script>
9
+ <script type="text/javascript" src="../../utils/editable_selects.js?ver=358"></script>
10
+ <script type="text/javascript" src="js/table.js?ver=358"></script>
11
+ <link href="css/table.css?ver=358" rel="stylesheet" type="text/css" />
12
  </head>
13
  <body id="table" style="display: none" role="application" aria-labelledby="app_title">
14
  <span style="display:none;" id="app_title">{#table_dlg.title}</span>
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=349"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=349"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=349"></script>
8
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=349"></script>
9
- <script type="text/javascript" src="js/element_common.js?ver=349"></script>
10
- <script type="text/javascript" src="js/abbr.js?ver=349"></script>
11
- <link rel="stylesheet" type="text/css" href="css/popup.css?ver=349" />
12
  </head>
13
  <body style="display: none" role="application" aria-labelledby="app_title">
14
  <span style="display:none;" id="app_title">{#xhtmlxtras_dlg.title_abbr_element}</span>
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=358"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=358"></script>
7
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=358"></script>
8
+ <script type="text/javascript" src="../../utils/editable_selects.js?ver=358"></script>
9
+ <script type="text/javascript" src="js/element_common.js?ver=358"></script>
10
+ <script type="text/javascript" src="js/abbr.js?ver=358"></script>
11
+ <link rel="stylesheet" type="text/css" href="css/popup.css?ver=358" />
12
  </head>
13
  <body style="display: none" role="application" aria-labelledby="app_title">
14
  <span style="display:none;" id="app_title">{#xhtmlxtras_dlg.title_abbr_element}</span>
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=349"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=349"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=349"></script>
8
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=349"></script>
9
- <script type="text/javascript" src="js/element_common.js?ver=349"></script>
10
- <script type="text/javascript" src="js/acronym.js?ver=349"></script>
11
- <link rel="stylesheet" type="text/css" href="css/popup.css?ver=349" />
12
  </head>
13
  <body style="display: none" role="application" aria-labelledby="app_title">
14
  <span style="display:none;" id="app_title">{#xhtmlxtras_dlg.title_acronym_element}</span>
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=358"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=358"></script>
7
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=358"></script>
8
+ <script type="text/javascript" src="../../utils/editable_selects.js?ver=358"></script>
9
+ <script type="text/javascript" src="js/element_common.js?ver=358"></script>
10
+ <script type="text/javascript" src="js/acronym.js?ver=358"></script>
11
+ <link rel="stylesheet" type="text/css" href="css/popup.css?ver=358" />
12
  </head>
13
  <body style="display: none" role="application" aria-labelledby="app_title">
14
  <span style="display:none;" id="app_title">{#xhtmlxtras_dlg.title_acronym_element}</span>
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=349"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=349"></script>
7
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=349"></script>
8
- <script type="text/javascript" src="../../utils/form_utils.js?ver=349"></script>
9
- <script type="text/javascript" src="js/attributes.js?ver=349"></script>
10
- <link rel="stylesheet" type="text/css" href="css/attributes.css?ver=349" />
11
  </head>
12
  <body style="display: none" role="application" aria-labelledby="app_title">
13
  <span style="display:none;" id="app_title">{#xhtmlxtras_dlg.attribs_title}</span>
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=358"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=358"></script>
7
+ <script type="text/javascript" src="../../utils/editable_selects.js?ver=358"></script>
8
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=358"></script>
9
+ <script type="text/javascript" src="js/attributes.js?ver=358"></script>
10
+ <link rel="stylesheet" type="text/css" href="css/attributes.css?ver=358" />
11
  </head>
12
  <body style="display: none" role="application" aria-labelledby="app_title">
13
  <span style="display:none;" id="app_title">{#xhtmlxtras_dlg.attribs_title}</span>
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=349"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=349"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=349"></script>
8
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=349"></script>
9
- <script type="text/javascript" src="js/element_common.js?ver=349"></script>
10
- <script type="text/javascript" src="js/cite.js?ver=349"></script>
11
- <link rel="stylesheet" type="text/css" href="css/popup.css?ver=349" />
12
  </head>
13
  <body style="display: none" role="application" aria-labelledby="app_title">
14
  <span style="display:none;" id="app_title">{#xhtmlxtras_dlg.title_cite_element}</span>
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=358"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=358"></script>
7
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=358"></script>
8
+ <script type="text/javascript" src="../../utils/editable_selects.js?ver=358"></script>
9
+ <script type="text/javascript" src="js/element_common.js?ver=358"></script>
10
+ <script type="text/javascript" src="js/cite.js?ver=358"></script>
11
+ <link rel="stylesheet" type="text/css" href="css/popup.css?ver=358" />
12
  </head>
13
  <body style="display: none" role="application" aria-labelledby="app_title">
14
  <span style="display:none;" id="app_title">{#xhtmlxtras_dlg.title_cite_element}</span>
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=349"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=349"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=349"></script>
8
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=349"></script>
9
- <script type="text/javascript" src="js/element_common.js?ver=349"></script>
10
- <script type="text/javascript" src="js/del.js?ver=349"></script>
11
- <link rel="stylesheet" type="text/css" href="css/popup.css?ver=349" />
12
  </head>
13
  <body id="xhtmlxtrasins" style="display: none" role="application" aria-labelledby="app_title">
14
  <span style="display:none;" id="app_title">{#xhtmlxtras_dlg.title_del_element}</span>
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=358"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=358"></script>
7
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=358"></script>
8
+ <script type="text/javascript" src="../../utils/editable_selects.js?ver=358"></script>
9
+ <script type="text/javascript" src="js/element_common.js?ver=358"></script>
10
+ <script type="text/javascript" src="js/del.js?ver=358"></script>
11
+ <link rel="stylesheet" type="text/css" href="css/popup.css?ver=358" />
12
  </head>
13
  <body id="xhtmlxtrasins" style="display: none" role="application" aria-labelledby="app_title">
14
  <span style="display:none;" id="app_title">{#xhtmlxtras_dlg.title_del_element}</span>
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=349"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=349"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=349"></script>
8
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=349"></script>
9
- <script type="text/javascript" src="js/element_common.js?ver=349"></script>
10
- <script type="text/javascript" src="js/ins.js?ver=349"></script>
11
- <link rel="stylesheet" type="text/css" href="css/popup.css?ver=349" />
12
  </head>
13
  <body id="xhtmlxtrasins" style="display: none" role="application" aria-labelledby="app_title">
14
  <span style="display:none;" id="app_title">{#xhtmlxtras_dlg.title_ins_element}</span>
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=358"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js?ver=358"></script>
7
+ <script type="text/javascript" src="../../utils/form_utils.js?ver=358"></script>
8
+ <script type="text/javascript" src="../../utils/editable_selects.js?ver=358"></script>
9
+ <script type="text/javascript" src="js/element_common.js?ver=358"></script>
10
+ <script type="text/javascript" src="js/ins.js?ver=358"></script>
11
+ <link rel="stylesheet" type="text/css" href="css/popup.css?ver=358" />
12
  </head>
13
  <body id="xhtmlxtrasins" style="display: none" role="application" aria-labelledby="app_title">
14
  <span style="display:none;" id="app_title">{#xhtmlxtras_dlg.title_ins_element}</span>
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: azaozz
3
  Donate link:
4
  Tags: wysiwyg, formatting, tinymce, write, editor
5
- Requires at least: 3.4
6
- Tested up to: 3.4
7
- Stable tag: 3.4.5.1
8
 
9
  Enables the advanced features of TinyMCE, the WordPress WYSIWYG editor.
10
 
@@ -12,7 +12,7 @@ Enables the advanced features of TinyMCE, the WordPress WYSIWYG editor.
12
 
13
  Attention: if you are using customized tadv-mce.css and are updating from version 3.3.9 or earlier to version 3.3.9.1 or newer, see the release notes.
14
 
15
- This plugin adds 16 plugins to [TinyMCE](http://tinymce.moxiecode.com/): Advanced HR, Advanced Image, Advanced Link, Advanced List, Context Menu, Emotions (Smilies), Date and Time, IESpell, Layer, Nonbreaking, Print, Search and Replace, Style, Table, Visual Characters and XHTML Extras.
16
 
17
  **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).
18
 
2
  Contributors: azaozz
3
  Donate link:
4
  Tags: wysiwyg, formatting, tinymce, write, editor
5
+ Requires at least: 3.5
6
+ Tested up to: 3.5
7
+ Stable tag: 3.5.8
8
 
9
  Enables the advanced features of TinyMCE, the WordPress WYSIWYG editor.
10
 
12
 
13
  Attention: if you are using customized tadv-mce.css and are updating from version 3.3.9 or earlier to version 3.3.9.1 or newer, see the release notes.
14
 
15
+ This plugin adds 16 plugins to [TinyMCE](http://tinymce.com/): Advanced HR, Advanced Image, Advanced Link, Advanced List, Context Menu, Emotions (Smilies), Date and Time, IESpell, Layer, Nonbreaking, Print, Search and Replace, Style, Table, Visual Characters and XHTML Extras.
16
 
17
  **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).
18
 
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.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 a=this;setTimeout(function(){var b=a.dom.getViewPort(window);a.editor.windowManager.resizeBy(a.getWindowArg("mce_width")-b.w,a.getWindowArg("mce_height")-b.h,a.id||window)},10)},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&&b.editor.settings.language_load!==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}}if(!b.editor.getParam("browser_preferred_colors",false)||!b.isWindow){b.dom.addClass(document.body,"forceColors")}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,{ownEvents:true,proxy:tinyMCEPopup._eventProxy});b.dom.bind(window,"ready",b._onDOMLoaded,b);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 a=this;setTimeout(function(){var b=a.dom.getViewPort(window);a.editor.windowManager.resizeBy(a.getWindowArg("mce_width")-b.w,a.getWindowArg("mce_height")-b.h,a.id||window)},10)},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&&b.editor.settings.language_load!==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.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}}if(!b.editor.getParam("browser_preferred_colors",false)||!b.isWindow){b.dom.addClass(document.body,"forceColors")}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){b.dom.bind(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){var b=a.target||a.srcElement;if(b.onchange){b.onchange()}return tinymce.dom.Event.cancel(a)}},_closeWinKeyHandler:function(a){a=a||window.event;if(a.keyCode==27){tinyMCEPopup.close()}},_eventProxy:function(a){return function(b){tinyMCEPopup.dom.events.callNativeHandler(a,b)}}};tinyMCEPopup.init();
tinymce-advanced.php CHANGED
@@ -3,7 +3,7 @@
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.4.9
7
  Author: Andrew Ozz
8
  Author URI: http://www.laptoptips.ca/
9
 
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.5.8
7
  Author: Andrew Ozz
8
  Author URI: http://www.laptoptips.ca/
9