cable 0.9.15 → 0.9.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. data/VERSION +1 -1
  2. data/public/javascripts/tinymce/langs/en.js +54 -2
  3. data/public/javascripts/tinymce/plugins/advhr/langs/en_dlg.js +2 -0
  4. data/public/javascripts/tinymce/plugins/advhr/rule.htm +30 -29
  5. data/public/javascripts/tinymce/plugins/advimage/image.htm +34 -31
  6. data/public/javascripts/tinymce/plugins/advimage/js/image.js +4 -2
  7. data/public/javascripts/tinymce/plugins/advimage/langs/en_dlg.js +2 -0
  8. data/public/javascripts/tinymce/plugins/advlink/js/advlink.js +5 -10
  9. data/public/javascripts/tinymce/plugins/advlink/langs/en_dlg.js +4 -2
  10. data/public/javascripts/tinymce/plugins/advlink/link.htm +34 -29
  11. data/public/javascripts/tinymce/plugins/advlist/editor_plugin.js +1 -1
  12. data/public/javascripts/tinymce/plugins/advlist/editor_plugin_src.js +3 -3
  13. data/public/javascripts/tinymce/plugins/autolink/editor_plugin.js +1 -0
  14. data/public/javascripts/tinymce/plugins/autolink/editor_plugin_src.js +169 -0
  15. data/public/javascripts/tinymce/plugins/autosave/editor_plugin.js +1 -1
  16. data/public/javascripts/tinymce/plugins/autosave/editor_plugin_src.js +13 -4
  17. data/public/javascripts/tinymce/plugins/bbcode/editor_plugin.js +1 -1
  18. data/public/javascripts/tinymce/plugins/bbcode/editor_plugin_src.js +1 -1
  19. data/public/javascripts/tinymce/plugins/contextmenu/editor_plugin.js +1 -1
  20. data/public/javascripts/tinymce/plugins/contextmenu/editor_plugin_src.js +23 -14
  21. data/public/javascripts/tinymce/plugins/emotions/emotions.htm +15 -14
  22. data/public/javascripts/tinymce/plugins/fullpage/css/fullpage.css +6 -4
  23. data/public/javascripts/tinymce/plugins/fullpage/editor_plugin.js +1 -1
  24. data/public/javascripts/tinymce/plugins/fullpage/editor_plugin_src.js +53 -8
  25. data/public/javascripts/tinymce/plugins/fullpage/fullpage.htm +2 -2
  26. data/public/javascripts/tinymce/plugins/fullpage/js/fullpage.js +45 -19
  27. data/public/javascripts/tinymce/plugins/fullscreen/editor_plugin.js +1 -1
  28. data/public/javascripts/tinymce/plugins/fullscreen/editor_plugin_src.js +10 -2
  29. data/public/javascripts/tinymce/plugins/inlinepopups/editor_plugin.js +1 -1
  30. data/public/javascripts/tinymce/plugins/inlinepopups/editor_plugin_src.js +76 -15
  31. data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css +0 -10
  32. data/public/javascripts/tinymce/plugins/layer/editor_plugin.js +1 -1
  33. data/public/javascripts/tinymce/plugins/layer/editor_plugin_src.js +2 -0
  34. data/public/javascripts/tinymce/plugins/legacyoutput/editor_plugin.js +1 -1
  35. data/public/javascripts/tinymce/plugins/legacyoutput/editor_plugin_src.js +29 -26
  36. data/public/javascripts/tinymce/plugins/lists/editor_plugin.js +1 -0
  37. data/public/javascripts/tinymce/plugins/lists/editor_plugin_src.js +617 -0
  38. data/public/javascripts/tinymce/plugins/media/css/media.css +5 -4
  39. data/public/javascripts/tinymce/plugins/media/editor_plugin.js +1 -1
  40. data/public/javascripts/tinymce/plugins/media/editor_plugin_src.js +652 -296
  41. data/public/javascripts/tinymce/plugins/media/js/media.js +327 -603
  42. data/public/javascripts/tinymce/plugins/media/langs/en_dlg.js +8 -2
  43. data/public/javascripts/tinymce/plugins/media/media.htm +283 -288
  44. data/public/javascripts/tinymce/plugins/media/moxieplayer.swf +0 -0
  45. data/public/javascripts/tinymce/plugins/nonbreaking/editor_plugin.js +1 -1
  46. data/public/javascripts/tinymce/plugins/nonbreaking/editor_plugin_src.js +1 -1
  47. data/public/javascripts/tinymce/plugins/pagebreak/editor_plugin.js +1 -1
  48. data/public/javascripts/tinymce/plugins/pagebreak/editor_plugin_src.js +1 -4
  49. data/public/javascripts/tinymce/plugins/paste/editor_plugin.js +1 -1
  50. data/public/javascripts/tinymce/plugins/paste/editor_plugin_src.js +106 -128
  51. data/public/javascripts/tinymce/plugins/searchreplace/editor_plugin.js +1 -1
  52. data/public/javascripts/tinymce/plugins/searchreplace/editor_plugin_src.js +4 -0
  53. data/public/javascripts/tinymce/plugins/searchreplace/js/searchreplace.js +14 -10
  54. data/public/javascripts/tinymce/plugins/searchreplace/searchreplace.htm +17 -16
  55. data/public/javascripts/tinymce/plugins/spellchecker/editor_plugin.js +1 -1
  56. data/public/javascripts/tinymce/plugins/spellchecker/editor_plugin_src.js +55 -37
  57. data/public/javascripts/tinymce/plugins/style/js/props.js +2 -8
  58. data/public/javascripts/tinymce/plugins/style/langs/en_dlg.js +8 -1
  59. data/public/javascripts/tinymce/plugins/style/props.htm +513 -398
  60. data/public/javascripts/tinymce/plugins/tabfocus/editor_plugin.js +1 -1
  61. data/public/javascripts/tinymce/plugins/tabfocus/editor_plugin_src.js +30 -28
  62. data/public/javascripts/tinymce/plugins/table/cell.htm +12 -12
  63. data/public/javascripts/tinymce/plugins/table/editor_plugin.js +1 -1
  64. data/public/javascripts/tinymce/plugins/table/editor_plugin_src.js +85 -26
  65. data/public/javascripts/tinymce/plugins/table/js/cell.js +9 -11
  66. data/public/javascripts/tinymce/plugins/table/js/row.js +13 -18
  67. data/public/javascripts/tinymce/plugins/table/js/table.js +8 -12
  68. data/public/javascripts/tinymce/plugins/table/langs/en_dlg.js +1 -1
  69. data/public/javascripts/tinymce/plugins/table/merge_cells.htm +11 -11
  70. data/public/javascripts/tinymce/plugins/table/row.htm +10 -8
  71. data/public/javascripts/tinymce/plugins/table/table.htm +54 -53
  72. data/public/javascripts/tinymce/plugins/template/js/template.js +1 -1
  73. data/public/javascripts/tinymce/plugins/visualchars/editor_plugin.js +1 -1
  74. data/public/javascripts/tinymce/plugins/visualchars/editor_plugin_src.js +1 -1
  75. data/public/javascripts/tinymce/plugins/wordcount/editor_plugin.js +1 -1
  76. data/public/javascripts/tinymce/plugins/wordcount/editor_plugin_src.js +35 -19
  77. data/public/javascripts/tinymce/plugins/xhtmlxtras/abbr.htm +6 -5
  78. data/public/javascripts/tinymce/plugins/xhtmlxtras/acronym.htm +6 -5
  79. data/public/javascripts/tinymce/plugins/xhtmlxtras/attributes.htm +6 -5
  80. data/public/javascripts/tinymce/plugins/xhtmlxtras/cite.htm +5 -4
  81. data/public/javascripts/tinymce/plugins/xhtmlxtras/del.htm +9 -8
  82. data/public/javascripts/tinymce/plugins/xhtmlxtras/ins.htm +11 -10
  83. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/attributes.js +0 -1
  84. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/del.js +2 -2
  85. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/element_common.js +3 -5
  86. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/ins.js +4 -3
  87. data/public/javascripts/tinymce/themes/advanced/about.htm +3 -5
  88. data/public/javascripts/tinymce/themes/advanced/anchor.htm +5 -5
  89. data/public/javascripts/tinymce/themes/advanced/charmap.htm +39 -40
  90. data/public/javascripts/tinymce/themes/advanced/color_picker.htm +10 -9
  91. data/public/javascripts/tinymce/themes/advanced/editor_template.js +1 -1
  92. data/public/javascripts/tinymce/themes/advanced/editor_template_src.js +171 -40
  93. data/public/javascripts/tinymce/themes/advanced/image.htm +51 -51
  94. data/public/javascripts/tinymce/{plugins/media → themes/advanced}/img/flash.gif +0 -0
  95. data/public/javascripts/tinymce/themes/advanced/img/iframe.gif +0 -0
  96. data/public/javascripts/tinymce/{plugins/pagebreak → themes/advanced}/img/pagebreak.gif +0 -0
  97. data/public/javascripts/tinymce/{plugins/media → themes/advanced}/img/quicktime.gif +0 -0
  98. data/public/javascripts/tinymce/{plugins/media → themes/advanced}/img/realmedia.gif +0 -0
  99. data/public/javascripts/tinymce/{plugins/media → themes/advanced}/img/shockwave.gif +0 -0
  100. data/public/javascripts/tinymce/{plugins/media → themes/advanced}/img/trans.gif +0 -0
  101. data/public/javascripts/tinymce/themes/advanced/img/video.gif +0 -0
  102. data/public/javascripts/tinymce/{plugins/media → themes/advanced}/img/windowsmedia.gif +0 -0
  103. data/public/javascripts/tinymce/themes/advanced/js/about.js +1 -0
  104. data/public/javascripts/tinymce/themes/advanced/js/anchor.js +5 -0
  105. data/public/javascripts/tinymce/themes/advanced/js/charmap.js +26 -6
  106. data/public/javascripts/tinymce/themes/advanced/js/color_picker.js +108 -32
  107. data/public/javascripts/tinymce/themes/advanced/js/image.js +3 -1
  108. data/public/javascripts/tinymce/themes/advanced/js/link.js +4 -7
  109. data/public/javascripts/tinymce/themes/advanced/js/source_editor.js +1 -1
  110. data/public/javascripts/tinymce/themes/advanced/langs/en.js +8 -2
  111. data/public/javascripts/tinymce/themes/advanced/langs/en_dlg.js +6 -3
  112. data/public/javascripts/tinymce/themes/advanced/link.htm +27 -28
  113. data/public/javascripts/tinymce/themes/advanced/shortcuts.htm +47 -0
  114. data/public/javascripts/tinymce/themes/advanced/skins/default/content.css +11 -0
  115. data/public/javascripts/tinymce/themes/advanced/skins/default/ui.css +4 -4
  116. data/public/javascripts/tinymce/themes/advanced/skins/highcontrast/content.css +23 -0
  117. data/public/javascripts/tinymce/themes/advanced/skins/highcontrast/dialog.css +105 -0
  118. data/public/javascripts/tinymce/themes/advanced/skins/highcontrast/ui.css +101 -0
  119. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/content.css +10 -0
  120. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/dialog.css +1 -0
  121. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/ui.css +5 -4
  122. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/ui_black.css +1 -1
  123. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/ui_silver.css +1 -1
  124. data/public/javascripts/tinymce/themes/advanced/source_editor.htm +3 -3
  125. data/public/javascripts/tinymce/themes/simple/editor_template.js +1 -1
  126. data/public/javascripts/tinymce/themes/simple/editor_template_src.js +1 -2
  127. data/public/javascripts/tinymce/tiny_mce.js +1 -1
  128. data/public/javascripts/tinymce/tiny_mce_popup.js +1 -1
  129. data/public/javascripts/tinymce/tiny_mce_src.js +6383 -4025
  130. data/public/javascripts/tinymce/utils/form_utils.js +14 -4
  131. data/public/javascripts/tinymce/utils/mctabs.js +95 -10
  132. data/public/javascripts/tinymce/utils/validate.js +34 -2
  133. metadata +50 -93
  134. data/public/javascripts/tinymce/plugins/media/css/content.css +0 -6
  135. data/public/javascripts/tinymce/plugins/media/img/flv_player.swf +0 -0
  136. data/public/javascripts/tinymce/plugins/pagebreak/css/content.css +0 -1
  137. data/public/javascripts/tinymce/plugins/pagebreak/img/trans.gif +0 -0
  138. data/public/javascripts/tinymce/plugins/pdw/editor_plugin.js +0 -4
  139. data/public/javascripts/tinymce/plugins/pdw/editor_plugin_src.js +0 -158
  140. data/public/javascripts/tinymce/plugins/pdw/img/toolbars.gif +0 -0
  141. data/public/javascripts/tinymce/plugins/pdw/langs/en.js +0 -3
  142. data/public/javascripts/tinymce/plugins/pdw/langs/nl.js +0 -3
@@ -9,7 +9,7 @@
9
9
  <link href="css/fullpage.css" rel="stylesheet" type="text/css" />
10
10
  </head>
11
11
  <body id="advlink" style="display: none">
12
- <form onsubmit="updateAction();return false;" name="fullpage" action="#">
12
+ <form onsubmit="updateAction();return false;" name="fullpage" action="#">
13
13
  <div class="tabs">
14
14
  <ul>
15
15
  <li id="meta_tab" class="current"><span><a href="javascript:mcTabs.displayTab('meta_tab','meta_panel');" onmousedown="return false;">{#fullpage_dlg.meta_tab}</a></span></li>
@@ -566,6 +566,6 @@
566
566
  <input type="submit" id="insert" name="update" value="{#update}" />
567
567
  <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
568
568
  </div>
569
- </form>
569
+ </form>
570
570
  </body>
571
571
  </html>
@@ -47,7 +47,7 @@ var defaultFontNames = 'Arial=arial,helvetica,sans-serif;Courier New=courier new
47
47
  var defaultFontSizes = '10px,11px,12px,13px,14px,15px,16px';
48
48
 
49
49
  function init() {
50
- var f = document.forms['fullpage'], el = f.elements, e, i, p, doctypes, encodings, mediaTypes, fonts, ed = tinyMCEPopup.editor, dom = tinyMCEPopup.dom, style;
50
+ var f = document.forms['fullpage'], el = f.elements, e, i, p, doctypes, encodings, mediaTypes, dir, fonts, ed = tinyMCEPopup.editor, dom = tinyMCEPopup.dom, style, xmlVer, xmlEnc, docType;
51
51
 
52
52
  // Setup doctype select box
53
53
  doctypes = ed.getParam("fullpage_doctypes", defaultDocTypes).split(',');
@@ -124,7 +124,7 @@ function init() {
124
124
  // Preprocess the HTML disable scripts and urls
125
125
  h = h.replace(/<script>/gi, '<script type="text/javascript">');
126
126
  h = h.replace(/type=([\"\'])?/gi, 'type=$1-mce-');
127
- h = h.replace(/(src=|href=)/g, '_mce_$1');
127
+ h = h.replace(/(src=|href=)/g, 'data-mce-$1');
128
128
 
129
129
  // Write in the content in the iframe
130
130
  doc.write(h + '</body></html>');
@@ -135,6 +135,11 @@ function init() {
135
135
  xmlEnc = getReItem(/<\?\s*?xml.*?encoding\s*?=\s*?"(.*?)".*?\?>/gi, h, 1);
136
136
  docType = getReItem(/<\!DOCTYPE.*?>/gi, h.replace(/\n/g, ''), 0).replace(/ +/g, ' ');
137
137
  f.langcode.value = getReItem(/lang="(.*?)"/gi, h, 1);
138
+
139
+ // Get direction and inherit it from the html-tag too (according to w3c recommandation)
140
+ dir = getReItem(/dir\s*=\s*["']([^"']*)["']/i, h, 1);
141
+ if(doc.body.hasAttribute('dir') && (doc.body.getAttribute('dir') != ''))
142
+ dir = doc.body.getAttribute('dir');
138
143
 
139
144
  // Parse title
140
145
  if (e = doc.getElementsByTagName('title')[0])
@@ -142,7 +147,7 @@ function init() {
142
147
 
143
148
  // Parse meta
144
149
  tinymce.each(doc.getElementsByTagName('meta'), function(n) {
145
- var na = (n.getAttribute('name', 2) || '').toLowerCase(), va = n.getAttribute('content', 2), eq = n.getAttribute('httpEquiv', 2) || '';
150
+ var na = (n.getAttribute('name', 2) || '').toLowerCase(), va = n.getAttribute('content', 2), eq = n.getAttribute('http-equiv', 2) || '';
146
151
 
147
152
  e = el['meta' + na];
148
153
 
@@ -168,7 +173,7 @@ function init() {
168
173
 
169
174
  selectByValue(f, 'doctypes', docType, true, true);
170
175
  selectByValue(f, 'docencoding', xmlEnc, true, true);
171
- selectByValue(f, 'langdir', doc.body.getAttribute('dir', 2) || '', true, true);
176
+ selectByValue(f, 'langdir', dir, true, true);
172
177
 
173
178
  if (xmlVer != '')
174
179
  el.xml_pi.checked = true;
@@ -180,7 +185,7 @@ function init() {
180
185
  var m = l.getAttribute('media', 2) || '', t = l.getAttribute('type', 2) || '';
181
186
 
182
187
  if (t == "-mce-text/css" && (m == "" || m == "screen" || m == "all") && (l.getAttribute('rel', 2) || '') == "stylesheet") {
183
- f.stylesheet.value = l.getAttribute('_mce_href', 2) || '';
188
+ f.stylesheet.value = l.getAttribute('data-mce-href', 2) || '';
184
189
  return false;
185
190
  }
186
191
  });
@@ -278,8 +283,8 @@ function updateAction() {
278
283
  // Fix scripts without a type
279
284
  nl = doc.getElementsByTagName('script');
280
285
  for (i=0; i<nl.length; i++) {
281
- if (tinyMCEPopup.dom.getAttrib(nl[i], '_mce_type') == '')
282
- nl[i].setAttribute('_mce_type', 'text/javascript');
286
+ if (tinyMCEPopup.dom.getAttrib(nl[i], 'data-mce-type') == '')
287
+ nl[i].setAttribute('mce-type', 'text/javascript');
283
288
  }
284
289
 
285
290
  // Get primary stylesheet
@@ -289,13 +294,13 @@ function updateAction() {
289
294
 
290
295
  tmp = tinyMCEPopup.dom.getAttrib(l, 'media');
291
296
 
292
- if (tinyMCEPopup.dom.getAttrib(l, '_mce_type') == "text/css" && (tmp == "" || tmp == "screen" || tmp == "all") && tinyMCEPopup.dom.getAttrib(l, 'rel') == "stylesheet") {
297
+ if (tinyMCEPopup.dom.getAttrib(l, 'data-mce-type') == "text/css" && (tmp == "" || tmp == "screen" || tmp == "all") && tinyMCEPopup.dom.getAttrib(l, 'rel') == "stylesheet") {
293
298
  addlink = false;
294
299
 
295
300
  if (f.stylesheet.value == '')
296
301
  l.parentNode.removeChild(l);
297
302
  else
298
- l.setAttribute('_mce_href', f.stylesheet.value);
303
+ l.setAttribute('data-mce-href', f.stylesheet.value);
299
304
 
300
305
  break;
301
306
  }
@@ -306,7 +311,7 @@ function updateAction() {
306
311
  l = doc.createElement('link');
307
312
 
308
313
  l.setAttribute('type', 'text/css');
309
- l.setAttribute('_mce_href', f.stylesheet.value);
314
+ l.setAttribute('data-mce-href', f.stylesheet.value);
310
315
  l.setAttribute('rel', 'stylesheet');
311
316
 
312
317
  head.appendChild(l);
@@ -319,18 +324,30 @@ function updateAction() {
319
324
  setMeta(head, 'robots', getSelectValue(f, 'metarobots'));
320
325
  setMeta(head, 'Content-Type', getSelectValue(f, 'docencoding'));
321
326
 
322
- doc.body.dir = getSelectValue(f, 'langdir');
327
+ setAttr(doc.body, 'dir', getSelectValue(f, 'langdir'));
323
328
  doc.body.style.cssText = f.style.value;
324
329
 
325
- doc.body.setAttribute('vLink', f.visited_color.value);
326
- doc.body.setAttribute('link', f.link_color.value);
327
- doc.body.setAttribute('text', f.textcolor.value);
328
- doc.body.setAttribute('aLink', f.active_color.value);
330
+ function setAttr(elm, name, value) {
331
+ value = "" + value;
332
+
333
+ if (value.length > 0)
334
+ elm.setAttribute(name, value);
335
+ else
336
+ elm.removeAttribute(name, value);
337
+ }
338
+
339
+ setAttr(doc.body, 'vLink', f.visited_color.value);
340
+ setAttr(doc.body, 'link', f.link_color.value);
341
+ setAttr(doc.body, 'aLink', f.active_color.value);
329
342
 
330
343
  doc.body.style.fontFamily = getSelectValue(f, 'fontface');
331
344
  doc.body.style.fontSize = getSelectValue(f, 'fontsize');
332
345
  doc.body.style.backgroundColor = f.bgcolor.value;
333
346
 
347
+ // Bug #4216: Using deprecated text attribute does not work in all browsers
348
+ doc.body.style.color = f.textcolor.value;
349
+ setAttr(doc.body, 'text', '');
350
+
334
351
  if (f.leftmargin.value != '')
335
352
  doc.body.style.marginLeft = f.leftmargin.value + 'px';
336
353
 
@@ -344,8 +361,8 @@ function updateAction() {
344
361
  doc.body.style.marginTop = f.topmargin.value + 'px';
345
362
 
346
363
  html = doc.getElementsByTagName('html')[0];
347
- html.setAttribute('lang', f.langcode.value);
348
- html.setAttribute('xml:lang', f.langcode.value);
364
+ setAttr(html, 'lang', f.langcode.value);
365
+ setAttr(html, 'xml:lang', f.langcode.value);
349
366
 
350
367
  if (f.bgimage.value != '')
351
368
  doc.body.style.backgroundImage = "url('" + f.bgimage.value + "')";
@@ -358,10 +375,19 @@ function updateAction() {
358
375
  h = ser.serialize(doc.documentElement);
359
376
  h = h.substring(0, h.lastIndexOf('</body>'));
360
377
 
361
- if (h.indexOf('<title>') == -1)
378
+ if (h.indexOf('<title>') == -1 && f.metatitle.value)
362
379
  h = h.replace(/<head.*?>/, '$&\n' + '<title>' + tinyMCEPopup.dom.encode(f.metatitle.value) + '</title>');
363
- else
380
+ else if (f.metatitle.value)
364
381
  h = h.replace(/<title>(.*?)<\/title>/, '<title>' + tinyMCEPopup.dom.encode(f.metatitle.value) + '</title>');
382
+ else
383
+ h = h.replace(/<title>(.*?)<\/title>\n*/, '');
384
+
385
+ if(v = f.langcode.value)
386
+ htmlt = '<html lang="' + v + '" xml:lang="' + v + '">';
387
+ else
388
+ htmlt = '<html>';
389
+
390
+ h = h.replace(/<html.*?>/, htmlt);
365
391
 
366
392
  if ((v = getSelectValue(f, 'doctypes')) != '')
367
393
  h = v + '\n' + h;
@@ -1 +1 @@
1
- (function(){var a=tinymce.DOM;tinymce.create("tinymce.plugins.FullScreenPlugin",{init:function(c,d){var e=this,f={},b;e.editor=c;c.addCommand("mceFullScreen",function(){var h,i=a.doc.documentElement;if(c.getParam("fullscreen_is_enabled")){if(c.getParam("fullscreen_new_window")){closeFullscreen()}else{a.win.setTimeout(function(){tinymce.dom.Event.remove(a.win,"resize",e.resizeFunc);tinyMCE.get(c.getParam("fullscreen_editor_id")).setContent(c.getContent({format:"raw"}),{format:"raw"});tinyMCE.remove(c);a.remove("mce_fullscreen_container");i.style.overflow=c.getParam("fullscreen_html_overflow");a.setStyle(a.doc.body,"overflow",c.getParam("fullscreen_overflow"));a.win.scrollTo(c.getParam("fullscreen_scrollx"),c.getParam("fullscreen_scrolly"));tinyMCE.settings=tinyMCE.oldSettings},10)}return}if(c.getParam("fullscreen_new_window")){h=a.win.open(d+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{h.resizeTo(screen.availWidth,screen.availHeight)}catch(g){}}else{tinyMCE.oldSettings=tinyMCE.settings;f.fullscreen_overflow=a.getStyle(a.doc.body,"overflow",1)||"auto";f.fullscreen_html_overflow=a.getStyle(i,"overflow",1);b=a.getViewPort();f.fullscreen_scrollx=b.x;f.fullscreen_scrolly=b.y;if(tinymce.isOpera&&f.fullscreen_overflow=="visible"){f.fullscreen_overflow="auto"}if(tinymce.isIE&&f.fullscreen_overflow=="scroll"){f.fullscreen_overflow="auto"}if(tinymce.isIE&&(f.fullscreen_html_overflow=="visible"||f.fullscreen_html_overflow=="scroll")){f.fullscreen_html_overflow="auto"}if(f.fullscreen_overflow=="0px"){f.fullscreen_overflow=""}a.setStyle(a.doc.body,"overflow","hidden");i.style.overflow="hidden";b=a.getViewPort();a.win.scrollTo(0,0);if(tinymce.isIE){b.h-=1}n=a.add(a.doc.body,"div",{id:"mce_fullscreen_container",style:"position:"+(tinymce.isIE6||(tinymce.isIE&&!a.boxModel)?"absolute":"fixed")+";top:0;left:0;width:"+b.w+"px;height:"+b.h+"px;z-index:200000;"});a.add(n,"div",{id:"mce_fullscreen"});tinymce.each(c.settings,function(j,k){f[k]=j});f.id="mce_fullscreen";f.width=n.clientWidth;f.height=n.clientHeight-15;f.fullscreen_is_enabled=true;f.fullscreen_editor_id=c.id;f.theme_advanced_resizing=false;f.save_onsavecallback=function(){c.setContent(tinyMCE.get(f.id).getContent({format:"raw"}),{format:"raw"});c.execCommand("mceSave")};tinymce.each(c.getParam("fullscreen_settings"),function(l,j){f[j]=l});if(f.theme_advanced_toolbar_location==="external"){f.theme_advanced_toolbar_location="top"}e.fullscreenEditor=new tinymce.Editor("mce_fullscreen",f);e.fullscreenEditor.onInit.add(function(){e.fullscreenEditor.setContent(c.getContent());e.fullscreenEditor.focus()});e.fullscreenEditor.render();e.fullscreenElement=new tinymce.dom.Element("mce_fullscreen_container");e.fullscreenElement.update();e.resizeFunc=tinymce.dom.Event.add(a.win,"resize",function(){var m=tinymce.DOM.getViewPort(),k=e.fullscreenEditor,j,l;j=k.dom.getSize(k.getContainer().firstChild);l=k.dom.getSize(k.getContainer().getElementsByTagName("iframe")[0]);k.theme.resizeTo(m.w-j.w+l.w,m.h-j.h+l.h)})}});c.addButton("fullscreen",{title:"fullscreen.desc",cmd:"mceFullScreen"});c.onNodeChange.add(function(h,g){g.setActive("fullscreen",h.getParam("fullscreen_is_enabled"))})},getInfo:function(){return{longname:"Fullscreen",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("fullscreen",tinymce.plugins.FullScreenPlugin)})();
1
+ (function(){var a=tinymce.DOM;tinymce.create("tinymce.plugins.FullScreenPlugin",{init:function(d,e){var f=this,g={},c,b;f.editor=d;d.addCommand("mceFullScreen",function(){var i,j=a.doc.documentElement;if(d.getParam("fullscreen_is_enabled")){if(d.getParam("fullscreen_new_window")){closeFullscreen()}else{a.win.setTimeout(function(){tinymce.dom.Event.remove(a.win,"resize",f.resizeFunc);tinyMCE.get(d.getParam("fullscreen_editor_id")).setContent(d.getContent({format:"raw"}),{format:"raw"});tinyMCE.remove(d);a.remove("mce_fullscreen_container");j.style.overflow=d.getParam("fullscreen_html_overflow");a.setStyle(a.doc.body,"overflow",d.getParam("fullscreen_overflow"));a.win.scrollTo(d.getParam("fullscreen_scrollx"),d.getParam("fullscreen_scrolly"));tinyMCE.settings=tinyMCE.oldSettings},10)}return}if(d.getParam("fullscreen_new_window")){i=a.win.open(e+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{i.resizeTo(screen.availWidth,screen.availHeight)}catch(h){}}else{tinyMCE.oldSettings=tinyMCE.settings;g.fullscreen_overflow=a.getStyle(a.doc.body,"overflow",1)||"auto";g.fullscreen_html_overflow=a.getStyle(j,"overflow",1);c=a.getViewPort();g.fullscreen_scrollx=c.x;g.fullscreen_scrolly=c.y;if(tinymce.isOpera&&g.fullscreen_overflow=="visible"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&g.fullscreen_overflow=="scroll"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&(g.fullscreen_html_overflow=="visible"||g.fullscreen_html_overflow=="scroll")){g.fullscreen_html_overflow="auto"}if(g.fullscreen_overflow=="0px"){g.fullscreen_overflow=""}a.setStyle(a.doc.body,"overflow","hidden");j.style.overflow="hidden";c=a.getViewPort();a.win.scrollTo(0,0);if(tinymce.isIE){c.h-=1}if(tinymce.isIE6){b="absolute;top:"+c.y}else{b="fixed;top:0"}n=a.add(a.doc.body,"div",{id:"mce_fullscreen_container",style:"position:"+b+";left:0;width:"+c.w+"px;height:"+c.h+"px;z-index:200000;"});a.add(n,"div",{id:"mce_fullscreen"});tinymce.each(d.settings,function(k,l){g[l]=k});g.id="mce_fullscreen";g.width=n.clientWidth;g.height=n.clientHeight-15;g.fullscreen_is_enabled=true;g.fullscreen_editor_id=d.id;g.theme_advanced_resizing=false;g.save_onsavecallback=function(){d.setContent(tinyMCE.get(g.id).getContent({format:"raw"}),{format:"raw"});d.execCommand("mceSave")};tinymce.each(d.getParam("fullscreen_settings"),function(m,l){g[l]=m});if(g.theme_advanced_toolbar_location==="external"){g.theme_advanced_toolbar_location="top"}f.fullscreenEditor=new tinymce.Editor("mce_fullscreen",g);f.fullscreenEditor.onInit.add(function(){f.fullscreenEditor.setContent(d.getContent());f.fullscreenEditor.focus()});f.fullscreenEditor.render();f.fullscreenElement=new tinymce.dom.Element("mce_fullscreen_container");f.fullscreenElement.update();f.resizeFunc=tinymce.dom.Event.add(a.win,"resize",function(){var o=tinymce.DOM.getViewPort(),l=f.fullscreenEditor,k,m;k=l.dom.getSize(l.getContainer().firstChild);m=l.dom.getSize(l.getContainer().getElementsByTagName("iframe")[0]);l.theme.resizeTo(o.w-k.w+m.w,o.h-k.h+m.h)})}});d.addButton("fullscreen",{title:"fullscreen.desc",cmd:"mceFullScreen"});d.onNodeChange.add(function(i,h){h.setActive("fullscreen",i.getParam("fullscreen_is_enabled"))})},getInfo:function(){return{longname:"Fullscreen",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("fullscreen",tinymce.plugins.FullScreenPlugin)})();
@@ -13,7 +13,7 @@
13
13
 
14
14
  tinymce.create('tinymce.plugins.FullScreenPlugin', {
15
15
  init : function(ed, url) {
16
- var t = this, s = {}, vp;
16
+ var t = this, s = {}, vp, posCss;
17
17
 
18
18
  t.editor = ed;
19
19
 
@@ -78,7 +78,15 @@
78
78
  if (tinymce.isIE)
79
79
  vp.h -= 1;
80
80
 
81
- n = DOM.add(DOM.doc.body, 'div', {id : 'mce_fullscreen_container', style : 'position:' + (tinymce.isIE6 || (tinymce.isIE && !DOM.boxModel) ? 'absolute' : 'fixed') + ';top:0;left:0;width:' + vp.w + 'px;height:' + vp.h + 'px;z-index:200000;'});
81
+ // Use fixed position if it exists
82
+ if (tinymce.isIE6)
83
+ posCss = 'absolute;top:' + vp.y;
84
+ else
85
+ posCss = 'fixed;top:0';
86
+
87
+ n = DOM.add(DOM.doc.body, 'div', {
88
+ id : 'mce_fullscreen_container',
89
+ style : 'position:' + posCss + ';left:0;width:' + vp.w + 'px;height:' + vp.h + 'px;z-index:200000;'});
82
90
  DOM.add(n, 'div', {id : 'mce_fullscreen'});
83
91
 
84
92
  tinymce.each(ed.settings, function(v, n) {
@@ -1 +1 @@
1
- (function(){var d=tinymce.DOM,b=tinymce.dom.Element,a=tinymce.dom.Event,e=tinymce.each,c=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(f,g){f.onBeforeRenderUI.add(function(){f.windowManager=new tinymce.InlineWindowManager(f);d.loadCSS(g+"/skins/"+(f.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(f){var g=this;g.parent(f);g.zIndex=300000;g.count=0;g.windows={}},open:function(r,j){var y=this,i,k="",q=y.editor,g=0,s=0,h,m,n,o,l,v,x;r=r||{};j=j||{};if(!r.inline){return y.parent(r,j)}if(!r.type){y.bookmark=q.selection.getBookmark(1)}i=d.uniqueId();h=d.getViewPort();r.width=parseInt(r.width||320);r.height=parseInt(r.height||240)+(tinymce.isIE?8:0);r.min_width=parseInt(r.min_width||150);r.min_height=parseInt(r.min_height||100);r.max_width=parseInt(r.max_width||2000);r.max_height=parseInt(r.max_height||2000);r.left=r.left||Math.round(Math.max(h.x,h.x+(h.w/2)-(r.width/2)));r.top=r.top||Math.round(Math.max(h.y,h.y+(h.h/2)-(r.height/2)));r.movable=r.resizable=true;j.mce_width=r.width;j.mce_height=r.height;j.mce_inline=true;j.mce_window_id=i;j.mce_auto_focus=r.auto_focus;y.features=r;y.params=j;y.onOpen.dispatch(y,r,j);if(r.type){k+=" mceModal";if(r.type){k+=" mce"+r.type.substring(0,1).toUpperCase()+r.type.substring(1)}r.resizable=false}if(r.statusbar){k+=" mceStatusbar"}if(r.resizable){k+=" mceResizable"}if(r.minimizable){k+=" mceMinimizable"}if(r.maximizable){k+=" mceMaximizable"}if(r.movable){k+=" mceMovable"}y._addAll(d.doc.body,["div",{id:i,"class":(q.settings.inlinepopups_skin||"clearlooks2")+(tinymce.isIE&&window.getSelection?" ie9":""),style:"width:100px;height:100px"},["div",{id:i+"_wrapper","class":"mceWrapper"+k},["div",{id:i+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_title"},r.title||""]],["div",{id:i+"_middle","class":"mceMiddle"},["div",{id:i+"_left","class":"mceLeft"}],["span",{id:i+"_content"}],["div",{id:i+"_right","class":"mceRight"}]],["div",{id:i+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_status"},"Content"]],["a",{"class":"mceMove",tabindex:"-1",href:"javascript:;"}],["a",{"class":"mceMin",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMax",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMed",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceClose",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{id:i+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);d.setStyles(i,{top:-10000,left:-10000});if(tinymce.isGecko){d.setStyle(i,"overflow","auto")}if(!r.type){g+=d.get(i+"_left").clientWidth;g+=d.get(i+"_right").clientWidth;s+=d.get(i+"_top").clientHeight;s+=d.get(i+"_bottom").clientHeight}d.setStyles(i,{top:r.top,left:r.left,width:r.width+g,height:r.height+s});x=r.url||r.file;if(x){if(tinymce.relaxedDomain){x+=(x.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}x=tinymce._addVer(x)}if(!r.type){d.add(i+"_content","iframe",{id:i+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});d.setStyles(i+"_ifr",{width:r.width,height:r.height});d.setAttrib(i+"_ifr","src",x)}else{d.add(i+"_wrapper","a",{id:i+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");if(r.type=="confirm"){d.add(i+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel")}d.add(i+"_middle","div",{"class":"mceIcon"});d.setHTML(i+"_content",r.content.replace("\n","<br />"))}n=a.add(i,"mousedown",function(t){var u=t.target,f,p;f=y.windows[i];y.focus(i);if(u.nodeName=="A"||u.nodeName=="a"){if(u.className=="mceMax"){f.oldPos=f.element.getXY();f.oldSize=f.element.getSize();p=d.getViewPort();p.w-=2;p.h-=2;f.element.moveTo(p.x,p.y);f.element.resizeTo(p.w,p.h);d.setStyles(i+"_ifr",{width:p.w-f.deltaWidth,height:p.h-f.deltaHeight});d.addClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMed"){f.element.moveTo(f.oldPos.x,f.oldPos.y);f.element.resizeTo(f.oldSize.w,f.oldSize.h);f.iframeElement.resizeTo(f.oldSize.w-f.deltaWidth,f.oldSize.h-f.deltaHeight);d.removeClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMove"){return y._startDrag(i,t,u.className)}else{if(d.hasClass(u,"mceResize")){return y._startDrag(i,t,u.className.substring(13))}}}}}});o=a.add(i,"click",function(f){var p=f.target;y.focus(i);if(p.nodeName=="A"||p.nodeName=="a"){switch(p.className){case"mceClose":y.close(null,i);return a.cancel(f);case"mceButton mceOk":case"mceButton mceCancel":r.button_func(p.className=="mceButton mceOk");return a.cancel(f)}}});v=y.windows[i]={id:i,mousedown_func:n,click_func:o,element:new b(i,{blocker:1,container:q.getContainer()}),iframeElement:new b(i+"_ifr"),features:r,deltaWidth:g,deltaHeight:s};v.iframeElement.on("focus",function(){y.focus(i)});if(y.count==0&&y.editor.getParam("dialog_type","modal")=="modal"){d.add(d.doc.body,"div",{id:"mceModalBlocker","class":(y.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{zIndex:y.zIndex-1}});d.show("mceModalBlocker")}else{d.setStyle("mceModalBlocker","z-index",y.zIndex-1)}if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceModalBlocker",{position:"absolute",left:h.x,top:h.y,width:h.w-2,height:h.h-2})}y.focus(i);y._fixIELayout(i,1);if(d.get(i+"_ok")){d.get(i+"_ok").focus()}y.count++;return v},focus:function(h){var g=this,f;if(f=g.windows[h]){f.zIndex=this.zIndex++;f.element.setStyle("zIndex",f.zIndex);f.element.update();h=h+"_wrapper";d.removeClass(g.lastId,"mceFocus");d.addClass(h,"mceFocus");g.lastId=h}},_addAll:function(k,h){var g,l,f=this,j=tinymce.DOM;if(c(h,"string")){k.appendChild(j.doc.createTextNode(h))}else{if(h.length){k=k.appendChild(j.create(h[0],h[1]));for(g=2;g<h.length;g++){f._addAll(k,h[g])}}}},_startDrag:function(v,G,E){var o=this,u,z,C=d.doc,f,l=o.windows[v],h=l.element,y=h.getXY(),x,q,F,g,A,s,r,j,i,m,k,n,B;g={x:0,y:0};A=d.getViewPort();A.w-=2;A.h-=2;j=G.screenX;i=G.screenY;m=k=n=B=0;u=a.add(C,"mouseup",function(p){a.remove(C,"mouseup",u);a.remove(C,"mousemove",z);if(f){f.remove()}h.moveBy(m,k);h.resizeBy(n,B);q=h.getSize();d.setStyles(v+"_ifr",{width:q.w-l.deltaWidth,height:q.h-l.deltaHeight});o._fixIELayout(v,1);return a.cancel(p)});if(E!="Move"){D()}function D(){if(f){return}o._fixIELayout(v,0);d.add(C.body,"div",{id:"mceEventBlocker","class":"mceEventBlocker "+(o.editor.settings.inlinepopups_skin||"clearlooks2"),style:{zIndex:o.zIndex+1}});if(tinymce.isIE6||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceEventBlocker",{position:"absolute",left:A.x,top:A.y,width:A.w-2,height:A.h-2})}f=new b("mceEventBlocker");f.update();x=h.getXY();q=h.getSize();s=g.x+x.x-A.x;r=g.y+x.y-A.y;d.add(f.get(),"div",{id:"mcePlaceHolder","class":"mcePlaceHolder",style:{left:s,top:r,width:q.w,height:q.h}});F=new b("mcePlaceHolder")}z=a.add(C,"mousemove",function(w){var p,H,t;D();p=w.screenX-j;H=w.screenY-i;switch(E){case"ResizeW":m=p;n=0-p;break;case"ResizeE":n=p;break;case"ResizeN":case"ResizeNW":case"ResizeNE":if(E=="ResizeNW"){m=p;n=0-p}else{if(E=="ResizeNE"){n=p}}k=H;B=0-H;break;case"ResizeS":case"ResizeSW":case"ResizeSE":if(E=="ResizeSW"){m=p;n=0-p}else{if(E=="ResizeSE"){n=p}}B=H;break;case"mceMove":m=p;k=H;break}if(n<(t=l.features.min_width-q.w)){if(m!==0){m+=n-t}n=t}if(B<(t=l.features.min_height-q.h)){if(k!==0){k+=B-t}B=t}n=Math.min(n,l.features.max_width-q.w);B=Math.min(B,l.features.max_height-q.h);m=Math.max(m,A.x-(s+A.x));k=Math.max(k,A.y-(r+A.y));m=Math.min(m,(A.w+A.x)-(s+q.w+A.x));k=Math.min(k,(A.h+A.y)-(r+q.h+A.y));if(m+k!==0){if(s+m<0){m=0}if(r+k<0){k=0}F.moveTo(s+m,r+k)}if(n+B!==0){F.resizeTo(q.w+n,q.h+B)}return a.cancel(w)});return a.cancel(G)},resizeBy:function(g,h,i){var f=this.windows[i];if(f){f.element.resizeBy(g,h);f.iframeElement.resizeBy(g,h)}},close:function(j,l){var h=this,g,k=d.doc,f=0,i,l;l=h._findId(l||j);if(!h.windows[l]){h.parent(j);return}h.count--;if(h.count==0){d.remove("mceModalBlocker")}if(g=h.windows[l]){h.onClose.dispatch(h);a.remove(k,"mousedown",g.mousedownFunc);a.remove(k,"click",g.clickFunc);a.clear(l);a.clear(l+"_ifr");d.setAttrib(l+"_ifr","src",'javascript:""');g.element.remove();delete h.windows[l];e(h.windows,function(m){if(m.zIndex>f){i=m;f=m.zIndex}});if(i){h.focus(i.id)}}},setTitle:function(f,g){var h;f=this._findId(f);if(h=d.get(f+"_title")){h.innerHTML=d.encode(g)}},alert:function(g,f,j){var i=this,h;h=i.open({title:i,type:"alert",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},confirm:function(g,f,j){var i=this,h;h=i.open({title:i,type:"confirm",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},_findId:function(f){var g=this;if(typeof(f)=="string"){return f}e(g.windows,function(h){var i=d.get(h.id+"_ifr");if(i&&f==i.contentWindow){f=h.id;return false}});return f},_fixIELayout:function(i,h){var f,g;if(!tinymce.isIE6){return}e(["n","s","w","e","nw","ne","sw","se"],function(j){var k=d.get(i+"_resize_"+j);d.setStyles(k,{width:h?k.clientWidth:"",height:h?k.clientHeight:"",cursor:d.getStyle(k,"cursor",1)});d.setStyle(i+"_bottom","bottom","-1px");k=0});if(f=this.windows[i]){f.element.hide();f.element.show();e(d.select("div,a",i),function(k,j){if(k.currentStyle.backgroundImage!="none"){g=new Image();g.src=k.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1")}});d.get(i).style.filter=""}}});tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)})();
1
+ (function(){var d=tinymce.DOM,b=tinymce.dom.Element,a=tinymce.dom.Event,e=tinymce.each,c=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(f,g){f.onBeforeRenderUI.add(function(){f.windowManager=new tinymce.InlineWindowManager(f);d.loadCSS(g+"/skins/"+(f.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(f){var g=this;g.parent(f);g.zIndex=300000;g.count=0;g.windows={}},open:function(s,j){var z=this,i,k="",r=z.editor,g=0,v=0,h,m,o,q,l,x,y,n;s=s||{};j=j||{};if(!s.inline){return z.parent(s,j)}n=z._frontWindow();if(n&&d.get(n.id+"_ifr")){n.focussedElement=d.get(n.id+"_ifr").contentWindow.document.activeElement}if(!s.type){z.bookmark=r.selection.getBookmark(1)}i=d.uniqueId();h=d.getViewPort();s.width=parseInt(s.width||320);s.height=parseInt(s.height||240)+(tinymce.isIE?8:0);s.min_width=parseInt(s.min_width||150);s.min_height=parseInt(s.min_height||100);s.max_width=parseInt(s.max_width||2000);s.max_height=parseInt(s.max_height||2000);s.left=s.left||Math.round(Math.max(h.x,h.x+(h.w/2)-(s.width/2)));s.top=s.top||Math.round(Math.max(h.y,h.y+(h.h/2)-(s.height/2)));s.movable=s.resizable=true;j.mce_width=s.width;j.mce_height=s.height;j.mce_inline=true;j.mce_window_id=i;j.mce_auto_focus=s.auto_focus;z.features=s;z.params=j;z.onOpen.dispatch(z,s,j);if(s.type){k+=" mceModal";if(s.type){k+=" mce"+s.type.substring(0,1).toUpperCase()+s.type.substring(1)}s.resizable=false}if(s.statusbar){k+=" mceStatusbar"}if(s.resizable){k+=" mceResizable"}if(s.minimizable){k+=" mceMinimizable"}if(s.maximizable){k+=" mceMaximizable"}if(s.movable){k+=" mceMovable"}z._addAll(d.doc.body,["div",{id:i,role:"dialog","aria-labelledby":s.type?i+"_content":i+"_title","class":(r.settings.inlinepopups_skin||"clearlooks2")+(tinymce.isIE&&window.getSelection?" ie9":""),style:"width:100px;height:100px"},["div",{id:i+"_wrapper","class":"mceWrapper"+k},["div",{id:i+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_title"},s.title||""]],["div",{id:i+"_middle","class":"mceMiddle"},["div",{id:i+"_left","class":"mceLeft",tabindex:"0"}],["span",{id:i+"_content"}],["div",{id:i+"_right","class":"mceRight",tabindex:"0"}]],["div",{id:i+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_status"},"Content"]],["a",{"class":"mceMove",tabindex:"-1",href:"javascript:;"}],["a",{"class":"mceMin",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMax",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMed",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceClose",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{id:i+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);d.setStyles(i,{top:-10000,left:-10000});if(tinymce.isGecko){d.setStyle(i,"overflow","auto")}if(!s.type){g+=d.get(i+"_left").clientWidth;g+=d.get(i+"_right").clientWidth;v+=d.get(i+"_top").clientHeight;v+=d.get(i+"_bottom").clientHeight}d.setStyles(i,{top:s.top,left:s.left,width:s.width+g,height:s.height+v});y=s.url||s.file;if(y){if(tinymce.relaxedDomain){y+=(y.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}y=tinymce._addVer(y)}if(!s.type){d.add(i+"_content","iframe",{id:i+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});d.setStyles(i+"_ifr",{width:s.width,height:s.height});d.setAttrib(i+"_ifr","src",y)}else{d.add(i+"_wrapper","a",{id:i+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");if(s.type=="confirm"){d.add(i+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel")}d.add(i+"_middle","div",{"class":"mceIcon"});d.setHTML(i+"_content",s.content.replace("\n","<br />"));a.add(i,"keyup",function(f){var p=27;if(f.keyCode===p){s.button_func(false);return a.cancel(f)}});a.add(i,"keydown",function(f){var t,p=9;if(f.keyCode===p){t=d.select("a.mceCancel",i+"_wrapper")[0];if(t&&t!==f.target){t.focus()}else{d.get(i+"_ok").focus()}return a.cancel(f)}})}o=a.add(i,"mousedown",function(t){var u=t.target,f,p;f=z.windows[i];z.focus(i);if(u.nodeName=="A"||u.nodeName=="a"){if(u.className=="mceMax"){f.oldPos=f.element.getXY();f.oldSize=f.element.getSize();p=d.getViewPort();p.w-=2;p.h-=2;f.element.moveTo(p.x,p.y);f.element.resizeTo(p.w,p.h);d.setStyles(i+"_ifr",{width:p.w-f.deltaWidth,height:p.h-f.deltaHeight});d.addClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMed"){f.element.moveTo(f.oldPos.x,f.oldPos.y);f.element.resizeTo(f.oldSize.w,f.oldSize.h);f.iframeElement.resizeTo(f.oldSize.w-f.deltaWidth,f.oldSize.h-f.deltaHeight);d.removeClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMove"){return z._startDrag(i,t,u.className)}else{if(d.hasClass(u,"mceResize")){return z._startDrag(i,t,u.className.substring(13))}}}}}});q=a.add(i,"click",function(f){var p=f.target;z.focus(i);if(p.nodeName=="A"||p.nodeName=="a"){switch(p.className){case"mceClose":z.close(null,i);return a.cancel(f);case"mceButton mceOk":case"mceButton mceCancel":s.button_func(p.className=="mceButton mceOk");return a.cancel(f)}}});a.add([i+"_left",i+"_right"],"focus",function(p){var t=d.get(i+"_ifr");if(t){var f=t.contentWindow.document.body;var u=d.select(":input:enabled,*[tabindex=0]",f);if(p.target.id===(i+"_left")){u[u.length-1].focus()}else{u[0].focus()}}else{d.get(i+"_ok").focus()}});x=z.windows[i]={id:i,mousedown_func:o,click_func:q,element:new b(i,{blocker:1,container:r.getContainer()}),iframeElement:new b(i+"_ifr"),features:s,deltaWidth:g,deltaHeight:v};x.iframeElement.on("focus",function(){z.focus(i)});if(z.count==0&&z.editor.getParam("dialog_type","modal")=="modal"){d.add(d.doc.body,"div",{id:"mceModalBlocker","class":(z.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{zIndex:z.zIndex-1}});d.show("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","true")}else{d.setStyle("mceModalBlocker","z-index",z.zIndex-1)}if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceModalBlocker",{position:"absolute",left:h.x,top:h.y,width:h.w-2,height:h.h-2})}d.setAttrib(i,"aria-hidden","false");z.focus(i);z._fixIELayout(i,1);if(d.get(i+"_ok")){d.get(i+"_ok").focus()}z.count++;return x},focus:function(h){var g=this,f;if(f=g.windows[h]){f.zIndex=this.zIndex++;f.element.setStyle("zIndex",f.zIndex);f.element.update();h=h+"_wrapper";d.removeClass(g.lastId,"mceFocus");d.addClass(h,"mceFocus");g.lastId=h;if(f.focussedElement){f.focussedElement.focus()}else{if(d.get(h+"_ok")){d.get(f.id+"_ok").focus()}else{if(d.get(f.id+"_ifr")){d.get(f.id+"_ifr").focus()}}}}},_addAll:function(k,h){var g,l,f=this,j=tinymce.DOM;if(c(h,"string")){k.appendChild(j.doc.createTextNode(h))}else{if(h.length){k=k.appendChild(j.create(h[0],h[1]));for(g=2;g<h.length;g++){f._addAll(k,h[g])}}}},_startDrag:function(v,G,E){var o=this,u,z,C=d.doc,f,l=o.windows[v],h=l.element,y=h.getXY(),x,q,F,g,A,s,r,j,i,m,k,n,B;g={x:0,y:0};A=d.getViewPort();A.w-=2;A.h-=2;j=G.screenX;i=G.screenY;m=k=n=B=0;u=a.add(C,"mouseup",function(p){a.remove(C,"mouseup",u);a.remove(C,"mousemove",z);if(f){f.remove()}h.moveBy(m,k);h.resizeBy(n,B);q=h.getSize();d.setStyles(v+"_ifr",{width:q.w-l.deltaWidth,height:q.h-l.deltaHeight});o._fixIELayout(v,1);return a.cancel(p)});if(E!="Move"){D()}function D(){if(f){return}o._fixIELayout(v,0);d.add(C.body,"div",{id:"mceEventBlocker","class":"mceEventBlocker "+(o.editor.settings.inlinepopups_skin||"clearlooks2"),style:{zIndex:o.zIndex+1}});if(tinymce.isIE6||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceEventBlocker",{position:"absolute",left:A.x,top:A.y,width:A.w-2,height:A.h-2})}f=new b("mceEventBlocker");f.update();x=h.getXY();q=h.getSize();s=g.x+x.x-A.x;r=g.y+x.y-A.y;d.add(f.get(),"div",{id:"mcePlaceHolder","class":"mcePlaceHolder",style:{left:s,top:r,width:q.w,height:q.h}});F=new b("mcePlaceHolder")}z=a.add(C,"mousemove",function(w){var p,H,t;D();p=w.screenX-j;H=w.screenY-i;switch(E){case"ResizeW":m=p;n=0-p;break;case"ResizeE":n=p;break;case"ResizeN":case"ResizeNW":case"ResizeNE":if(E=="ResizeNW"){m=p;n=0-p}else{if(E=="ResizeNE"){n=p}}k=H;B=0-H;break;case"ResizeS":case"ResizeSW":case"ResizeSE":if(E=="ResizeSW"){m=p;n=0-p}else{if(E=="ResizeSE"){n=p}}B=H;break;case"mceMove":m=p;k=H;break}if(n<(t=l.features.min_width-q.w)){if(m!==0){m+=n-t}n=t}if(B<(t=l.features.min_height-q.h)){if(k!==0){k+=B-t}B=t}n=Math.min(n,l.features.max_width-q.w);B=Math.min(B,l.features.max_height-q.h);m=Math.max(m,A.x-(s+A.x));k=Math.max(k,A.y-(r+A.y));m=Math.min(m,(A.w+A.x)-(s+q.w+A.x));k=Math.min(k,(A.h+A.y)-(r+q.h+A.y));if(m+k!==0){if(s+m<0){m=0}if(r+k<0){k=0}F.moveTo(s+m,r+k)}if(n+B!==0){F.resizeTo(q.w+n,q.h+B)}return a.cancel(w)});return a.cancel(G)},resizeBy:function(g,h,i){var f=this.windows[i];if(f){f.element.resizeBy(g,h);f.iframeElement.resizeBy(g,h)}},close:function(i,k){var g=this,f,j=d.doc,h,k;k=g._findId(k||i);if(!g.windows[k]){g.parent(i);return}g.count--;if(g.count==0){d.remove("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","false");g.editor.focus()}if(f=g.windows[k]){g.onClose.dispatch(g);a.remove(j,"mousedown",f.mousedownFunc);a.remove(j,"click",f.clickFunc);a.clear(k);a.clear(k+"_ifr");d.setAttrib(k+"_ifr","src",'javascript:""');f.element.remove();delete g.windows[k];h=g._frontWindow();if(h){g.focus(h.id)}}},_frontWindow:function(){var g,f=0;e(this.windows,function(h){if(h.zIndex>f){g=h;f=h.zIndex}});return g},setTitle:function(f,g){var h;f=this._findId(f);if(h=d.get(f+"_title")){h.innerHTML=d.encode(g)}},alert:function(g,f,j){var i=this,h;h=i.open({title:i,type:"alert",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},confirm:function(g,f,j){var i=this,h;h=i.open({title:i,type:"confirm",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},_findId:function(f){var g=this;if(typeof(f)=="string"){return f}e(g.windows,function(h){var i=d.get(h.id+"_ifr");if(i&&f==i.contentWindow){f=h.id;return false}});return f},_fixIELayout:function(i,h){var f,g;if(!tinymce.isIE6){return}e(["n","s","w","e","nw","ne","sw","se"],function(j){var k=d.get(i+"_resize_"+j);d.setStyles(k,{width:h?k.clientWidth:"",height:h?k.clientHeight:"",cursor:d.getStyle(k,"cursor",1)});d.setStyle(i+"_bottom","bottom","-1px");k=0});if(f=this.windows[i]){f.element.hide();f.element.show();e(d.select("div,a",i),function(k,j){if(k.currentStyle.backgroundImage!="none"){g=new Image();g.src=k.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1")}});d.get(i).style.filter=""}}});tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)})();
@@ -42,7 +42,7 @@
42
42
  },
43
43
 
44
44
  open : function(f, p) {
45
- var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w, u;
45
+ var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w, u, parentWindow;
46
46
 
47
47
  f = f || {};
48
48
  p = p || {};
@@ -51,6 +51,11 @@
51
51
  if (!f.inline)
52
52
  return t.parent(f, p);
53
53
 
54
+ parentWindow = t._frontWindow();
55
+ if (parentWindow && DOM.get(parentWindow.id + '_ifr')) {
56
+ parentWindow.focussedElement = DOM.get(parentWindow.id + '_ifr').contentWindow.document.activeElement;
57
+ }
58
+
54
59
  // Only store selection if the type is a normal window
55
60
  if (!f.type)
56
61
  t.bookmark = ed.selection.getBookmark(1);
@@ -107,7 +112,7 @@
107
112
 
108
113
  // Create DOM objects
109
114
  t._addAll(DOM.doc.body,
110
- ['div', {id : id, 'class' : (ed.settings.inlinepopups_skin || 'clearlooks2') + (tinymce.isIE && window.getSelection ? ' ie9' : ''), style : 'width:100px;height:100px'},
115
+ ['div', {id : id, role : 'dialog', 'aria-labelledby': f.type ? id + '_content' : id + '_title', 'class' : (ed.settings.inlinepopups_skin || 'clearlooks2') + (tinymce.isIE && window.getSelection ? ' ie9' : ''), style : 'width:100px;height:100px'},
111
116
  ['div', {id : id + '_wrapper', 'class' : 'mceWrapper' + opt},
112
117
  ['div', {id : id + '_top', 'class' : 'mceTop'},
113
118
  ['div', {'class' : 'mceLeft'}],
@@ -117,9 +122,9 @@
117
122
  ],
118
123
 
119
124
  ['div', {id : id + '_middle', 'class' : 'mceMiddle'},
120
- ['div', {id : id + '_left', 'class' : 'mceLeft'}],
125
+ ['div', {id : id + '_left', 'class' : 'mceLeft', tabindex : '0'}],
121
126
  ['span', {id : id + '_content'}],
122
- ['div', {id : id + '_right', 'class' : 'mceRight'}]
127
+ ['div', {id : id + '_right', 'class' : 'mceRight', tabindex : '0'}]
123
128
  ],
124
129
 
125
130
  ['div', {id : id + '_bottom', 'class' : 'mceBottom'},
@@ -183,6 +188,27 @@
183
188
 
184
189
  DOM.add(id + '_middle', 'div', {'class' : 'mceIcon'});
185
190
  DOM.setHTML(id + '_content', f.content.replace('\n', '<br />'));
191
+
192
+ Event.add(id, 'keyup', function(evt) {
193
+ var VK_ESCAPE = 27;
194
+ if (evt.keyCode === VK_ESCAPE) {
195
+ f.button_func(false);
196
+ return Event.cancel(evt);
197
+ }
198
+ });
199
+
200
+ Event.add(id, 'keydown', function(evt) {
201
+ var cancelButton, VK_TAB = 9;
202
+ if (evt.keyCode === VK_TAB) {
203
+ cancelButton = DOM.select('a.mceCancel', id + '_wrapper')[0];
204
+ if (cancelButton && cancelButton !== evt.target) {
205
+ cancelButton.focus();
206
+ } else {
207
+ DOM.get(id + '_ok').focus();
208
+ }
209
+ return Event.cancel(evt);
210
+ }
211
+ });
186
212
  }
187
213
 
188
214
  // Register events
@@ -239,7 +265,23 @@
239
265
  }
240
266
  }
241
267
  });
242
-
268
+
269
+ // Make sure the tab order loops within the dialog.
270
+ Event.add([id + '_left', id + '_right'], 'focus', function(evt) {
271
+ var iframe = DOM.get(id + '_ifr');
272
+ if (iframe) {
273
+ var body = iframe.contentWindow.document.body;
274
+ var focusable = DOM.select(':input:enabled,*[tabindex=0]', body);
275
+ if (evt.target.id === (id + '_left')) {
276
+ focusable[focusable.length - 1].focus();
277
+ } else {
278
+ focusable[0].focus();
279
+ }
280
+ } else {
281
+ DOM.get(id + '_ok').focus();
282
+ }
283
+ });
284
+
243
285
  // Add window
244
286
  w = t.windows[id] = {
245
287
  id : id,
@@ -265,19 +307,20 @@
265
307
  });
266
308
 
267
309
  DOM.show('mceModalBlocker'); // Reduces flicker in IE
310
+ DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'true');
268
311
  } else
269
312
  DOM.setStyle('mceModalBlocker', 'z-index', t.zIndex - 1);
270
313
 
271
314
  if (tinymce.isIE6 || /Firefox\/2\./.test(navigator.userAgent) || (tinymce.isIE && !DOM.boxModel))
272
315
  DOM.setStyles('mceModalBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2});
273
316
 
317
+ DOM.setAttrib(id, 'aria-hidden', 'false');
274
318
  t.focus(id);
275
319
  t._fixIELayout(id, 1);
276
320
 
277
321
  // Focus ok button
278
322
  if (DOM.get(id + '_ok'))
279
323
  DOM.get(id + '_ok').focus();
280
-
281
324
  t.count++;
282
325
 
283
326
  return w;
@@ -295,6 +338,14 @@
295
338
  DOM.removeClass(t.lastId, 'mceFocus');
296
339
  DOM.addClass(id, 'mceFocus');
297
340
  t.lastId = id;
341
+
342
+ if (w.focussedElement) {
343
+ w.focussedElement.focus();
344
+ } else if (DOM.get(id + '_ok')) {
345
+ DOM.get(w.id + '_ok').focus();
346
+ } else if (DOM.get(w.id + '_ifr')) {
347
+ DOM.get(w.id + '_ifr').focus();
348
+ }
298
349
  }
299
350
  },
300
351
 
@@ -478,7 +529,7 @@
478
529
  },
479
530
 
480
531
  close : function(win, id) {
481
- var t = this, w, d = DOM.doc, ix = 0, fw, id;
532
+ var t = this, w, d = DOM.doc, fw, id;
482
533
 
483
534
  id = t._findId(id || win);
484
535
 
@@ -490,8 +541,11 @@
490
541
 
491
542
  t.count--;
492
543
 
493
- if (t.count == 0)
544
+ if (t.count == 0) {
494
545
  DOM.remove('mceModalBlocker');
546
+ DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'false');
547
+ t.editor.focus();
548
+ }
495
549
 
496
550
  if (w = t.windows[id]) {
497
551
  t.onClose.dispatch(t);
@@ -504,18 +558,25 @@
504
558
  w.element.remove();
505
559
  delete t.windows[id];
506
560
 
507
- // Find front most window and focus that
508
- each (t.windows, function(w) {
509
- if (w.zIndex > ix) {
510
- fw = w;
511
- ix = w.zIndex;
512
- }
513
- });
561
+ fw = t._frontWindow();
514
562
 
515
563
  if (fw)
516
564
  t.focus(fw.id);
517
565
  }
518
566
  },
567
+
568
+ // Find front most window
569
+ _frontWindow : function() {
570
+ var fw, ix = 0;
571
+ // Find front most window and focus that
572
+ each (this.windows, function(w) {
573
+ if (w.zIndex > ix) {
574
+ fw = w;
575
+ ix = w.zIndex;
576
+ }
577
+ });
578
+ return fw;
579
+ },
519
580
 
520
581
  setTitle : function(w, ti) {
521
582
  var e;
@@ -88,13 +88,3 @@
88
88
  .clearlooks2 .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px}
89
89
  .clearlooks2 .mceConfirm .mceCancel {left:50%; top:auto}
90
90
  .clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif)}
91
-
92
- /* IE9 fixes */
93
- .clearlooks2.ie9 .mceTop .mceCenter {clip:auto;}
94
- .clearlooks2.ie9 .mceMiddle {clip:auto;}
95
- .clearlooks2.ie9 .mceMiddle .mceLeft, .clearlooks2.ie9 .mceMiddle .mceRight {top: 23px;}
96
- .clearlooks2.ie9 .mceAlert .mceMiddle span, .clearlooks2.ie9 .mceConfirm .mceMiddle span {top:13px;}
97
- .clearlooks2.ie9 .mceModal .mceMiddle {top:23px}
98
- .clearlooks2.ie9 .mceModal .mceMiddle .mceLeft, .clearlooks2.ie9 .mceModal .mceMiddle .mceRight {top: 0}
99
- .clearlooks2.ie9 .mceMiddle .mceIcon {top:13px}
100
- .clearlooks2.ie9 .mceTop .mceCenter {top:0; right:auto; left:6px; width:calc(100%-12px)}
@@ -1 +1 @@
1
- (function(){tinymce.create("tinymce.plugins.Layer",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceInsertLayer",c._insertLayer,c);a.addCommand("mceMoveForward",function(){c._move(1)});a.addCommand("mceMoveBackward",function(){c._move(-1)});a.addCommand("mceMakeAbsolute",function(){c._toggleAbsolute()});a.addButton("moveforward",{title:"layer.forward_desc",cmd:"mceMoveForward"});a.addButton("movebackward",{title:"layer.backward_desc",cmd:"mceMoveBackward"});a.addButton("absolute",{title:"layer.absolute_desc",cmd:"mceMakeAbsolute"});a.addButton("insertlayer",{title:"layer.insertlayer_desc",cmd:"mceInsertLayer"});a.onInit.add(function(){if(tinymce.isIE){a.getDoc().execCommand("2D-Position",false,true)}});a.onNodeChange.add(c._nodeChange,c);a.onVisualAid.add(c._visualAid,c)},getInfo:function(){return{longname:"Layer",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,e){var c,d;c=this._getParentLayer(e);d=b.dom.getParent(e,"DIV,P,IMG");if(!d){a.setDisabled("absolute",1);a.setDisabled("moveforward",1);a.setDisabled("movebackward",1)}else{a.setDisabled("absolute",0);a.setDisabled("moveforward",!c);a.setDisabled("movebackward",!c);a.setActive("absolute",c&&c.style.position.toLowerCase()=="absolute")}},_visualAid:function(a,c,b){var d=a.dom;tinymce.each(d.select("div,p",c),function(f){if(/^(absolute|relative|static)$/i.test(f.style.position)){if(b){d.addClass(f,"mceItemVisualAid")}else{d.removeClass(f,"mceItemVisualAid")}}})},_move:function(h){var b=this.editor,f,g=[],e=this._getParentLayer(b.selection.getNode()),c=-1,j=-1,a;a=[];tinymce.walk(b.getBody(),function(d){if(d.nodeType==1&&/^(absolute|relative|static)$/i.test(d.style.position)){a.push(d)}},"childNodes");for(f=0;f<a.length;f++){g[f]=a[f].style.zIndex?parseInt(a[f].style.zIndex):0;if(c<0&&a[f]==e){c=f}}if(h<0){for(f=0;f<g.length;f++){if(g[f]<g[c]){j=f;break}}if(j>-1){a[c].style.zIndex=g[j];a[j].style.zIndex=g[c]}else{if(g[c]>0){a[c].style.zIndex=g[c]-1}}}else{for(f=0;f<g.length;f++){if(g[f]>g[c]){j=f;break}}if(j>-1){a[c].style.zIndex=g[j];a[j].style.zIndex=g[c]}else{a[c].style.zIndex=g[c]+1}}b.execCommand("mceRepaint")},_getParentLayer:function(a){return this.editor.dom.getParent(a,function(b){return b.nodeType==1&&/^(absolute|relative|static)$/i.test(b.style.position)})},_insertLayer:function(){var a=this.editor,b=a.dom.getPos(a.dom.getParent(a.selection.getNode(),"*"));a.dom.add(a.getBody(),"div",{style:{position:"absolute",left:b.x,top:(b.y>20?b.y:20),width:100,height:100},"class":"mceItemVisualAid"},a.selection.getContent()||a.getLang("layer.content"))},_toggleAbsolute:function(){var a=this.editor,b=this._getParentLayer(a.selection.getNode());if(!b){b=a.dom.getParent(a.selection.getNode(),"DIV,P,IMG")}if(b){if(b.style.position.toLowerCase()=="absolute"){a.dom.setStyles(b,{position:"",left:"",top:"",width:"",height:""});a.dom.removeClass(b,"mceItemVisualAid")}else{if(b.style.left==""){b.style.left=20+"px"}if(b.style.top==""){b.style.top=20+"px"}if(b.style.width==""){b.style.width=b.width?(b.width+"px"):"100px"}if(b.style.height==""){b.style.height=b.height?(b.height+"px"):"100px"}b.style.position="absolute";a.addVisual(a.getBody())}a.execCommand("mceRepaint");a.nodeChanged()}}});tinymce.PluginManager.add("layer",tinymce.plugins.Layer)})();
1
+ (function(){tinymce.create("tinymce.plugins.Layer",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceInsertLayer",c._insertLayer,c);a.addCommand("mceMoveForward",function(){c._move(1)});a.addCommand("mceMoveBackward",function(){c._move(-1)});a.addCommand("mceMakeAbsolute",function(){c._toggleAbsolute()});a.addButton("moveforward",{title:"layer.forward_desc",cmd:"mceMoveForward"});a.addButton("movebackward",{title:"layer.backward_desc",cmd:"mceMoveBackward"});a.addButton("absolute",{title:"layer.absolute_desc",cmd:"mceMakeAbsolute"});a.addButton("insertlayer",{title:"layer.insertlayer_desc",cmd:"mceInsertLayer"});a.onInit.add(function(){if(tinymce.isIE){a.getDoc().execCommand("2D-Position",false,true)}});a.onNodeChange.add(c._nodeChange,c);a.onVisualAid.add(c._visualAid,c)},getInfo:function(){return{longname:"Layer",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,e){var c,d;c=this._getParentLayer(e);d=b.dom.getParent(e,"DIV,P,IMG");if(!d){a.setDisabled("absolute",1);a.setDisabled("moveforward",1);a.setDisabled("movebackward",1)}else{a.setDisabled("absolute",0);a.setDisabled("moveforward",!c);a.setDisabled("movebackward",!c);a.setActive("absolute",c&&c.style.position.toLowerCase()=="absolute")}},_visualAid:function(a,c,b){var d=a.dom;tinymce.each(d.select("div,p",c),function(f){if(/^(absolute|relative|static)$/i.test(f.style.position)){if(b){d.addClass(f,"mceItemVisualAid")}else{d.removeClass(f,"mceItemVisualAid")}}})},_move:function(h){var b=this.editor,f,g=[],e=this._getParentLayer(b.selection.getNode()),c=-1,j=-1,a;a=[];tinymce.walk(b.getBody(),function(d){if(d.nodeType==1&&/^(absolute|relative|static)$/i.test(d.style.position)){a.push(d)}},"childNodes");for(f=0;f<a.length;f++){g[f]=a[f].style.zIndex?parseInt(a[f].style.zIndex):0;if(c<0&&a[f]==e){c=f}}if(h<0){for(f=0;f<g.length;f++){if(g[f]<g[c]){j=f;break}}if(j>-1){a[c].style.zIndex=g[j];a[j].style.zIndex=g[c]}else{if(g[c]>0){a[c].style.zIndex=g[c]-1}}}else{for(f=0;f<g.length;f++){if(g[f]>g[c]){j=f;break}}if(j>-1){a[c].style.zIndex=g[j];a[j].style.zIndex=g[c]}else{a[c].style.zIndex=g[c]+1}}b.execCommand("mceRepaint")},_getParentLayer:function(a){return this.editor.dom.getParent(a,function(b){return b.nodeType==1&&/^(absolute|relative|static)$/i.test(b.style.position)})},_insertLayer:function(){var a=this.editor,b=a.dom.getPos(a.dom.getParent(a.selection.getNode(),"*"));a.dom.add(a.getBody(),"div",{style:{position:"absolute",left:b.x,top:(b.y>20?b.y:20),width:100,height:100},"class":"mceItemVisualAid"},a.selection.getContent()||a.getLang("layer.content"))},_toggleAbsolute:function(){var a=this.editor,b=this._getParentLayer(a.selection.getNode());if(!b){b=a.dom.getParent(a.selection.getNode(),"DIV,P,IMG")}if(b){if(b.style.position.toLowerCase()=="absolute"){a.dom.setStyles(b,{position:"",left:"",top:"",width:"",height:""});a.dom.removeClass(b,"mceItemVisualAid")}else{if(b.style.left==""){b.style.left=20+"px"}if(b.style.top==""){b.style.top=20+"px"}if(b.style.width==""){b.style.width=b.width?(b.width+"px"):"100px"}if(b.style.height==""){b.style.height=b.height?(b.height+"px"):"100px"}b.style.position="absolute";a.dom.setAttrib(b,"data-mce-style","");a.addVisual(a.getBody())}a.execCommand("mceRepaint");a.nodeChanged()}}});tinymce.PluginManager.add("layer",tinymce.plugins.Layer)})();
@@ -198,6 +198,8 @@
198
198
  le.style.height = le.height ? (le.height + 'px') : '100px';
199
199
 
200
200
  le.style.position = "absolute";
201
+
202
+ ed.dom.setAttrib(le, 'data-mce-style', '');
201
203
  ed.addVisual(ed.getBody());
202
204
  }
203
205
 
@@ -1 +1 @@
1
- (function(a){a.onAddEditor.addToTop(function(c,b){b.settings.inline_styles=false});a.create("tinymce.plugins.LegacyOutput",{init:function(b){b.onInit.add(function(){var c="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",e=a.explode(b.settings.font_size_style_values),d=b.serializer;b.formatter.register({alignleft:{selector:c,attributes:{align:"left"}},aligncenter:{selector:c,attributes:{align:"center"}},alignright:{selector:c,attributes:{align:"right"}},alignfull:{selector:c,attributes:{align:"full"}},bold:{inline:"b"},italic:{inline:"i"},underline:{inline:"u"},strikethrough:{inline:"strike"},fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(f){return a.inArray(e,f.value)+1}}},forecolor:{inline:"font",styles:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}});d._setup();a.each("b,i,u,strike".split(","),function(f){var g=d.rules[f];if(!g){d.addRules(f)}});if(!d.rules.font){d.addRules("font[face|size|color|style]")}a.each(c.split(","),function(f){var h=d.rules[f],g;if(h){a.each(h.attribs,function(j,i){if(i.name=="align"){g=true;return false}});if(!g){h.attribs.push({name:"align"})}}});b.onNodeChange.add(function(g,k){var j,f,h,i;f=g.dom.getParent(g.selection.getNode(),"font");if(f){h=f.face;i=f.size}if(j=k.get("fontselect")){j.select(function(l){return l==h})}if(j=k.get("fontsizeselect")){j.select(function(m){var l=a.inArray(e,m.fontSize);return l+1==i})}})})},getInfo:function(){return{longname:"LegacyOutput",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput",version:a.majorVersion+"."+a.minorVersion}}});a.PluginManager.add("legacyoutput",a.plugins.LegacyOutput)})(tinymce);
1
+ (function(a){a.onAddEditor.addToTop(function(c,b){b.settings.inline_styles=false});a.create("tinymce.plugins.LegacyOutput",{init:function(b){b.onInit.add(function(){var c="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",e=a.explode(b.settings.font_size_style_values),d=b.schema;b.formatter.register({alignleft:{selector:c,attributes:{align:"left"}},aligncenter:{selector:c,attributes:{align:"center"}},alignright:{selector:c,attributes:{align:"right"}},alignfull:{selector:c,attributes:{align:"full"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:true}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:true}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(f){return a.inArray(e,f.value)+1}}},forecolor:{inline:"font",styles:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}});a.each("b,i,u,strike".split(","),function(f){d.addValidElements(f+"[*]")});if(!d.getElementRule("font")){d.addValidElements("font[face|size|color|style]")}a.each(c.split(","),function(f){var h=d.getElementRule(f),g;if(h){if(!h.attributes.align){h.attributes.align={};h.attributesOrder.push("align")}}});b.onNodeChange.add(function(g,k){var j,f,h,i;f=g.dom.getParent(g.selection.getNode(),"font");if(f){h=f.face;i=f.size}if(j=k.get("fontselect")){j.select(function(l){return l==h})}if(j=k.get("fontsizeselect")){j.select(function(m){var l=a.inArray(e,m.fontSize);return l+1==i})}})})},getInfo:function(){return{longname:"LegacyOutput",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput",version:a.majorVersion+"."+a.minorVersion}}});a.PluginManager.add("legacyoutput",a.plugins.LegacyOutput)})(tinymce);
@@ -26,7 +26,7 @@
26
26
  editor.onInit.add(function() {
27
27
  var alignElements = 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img',
28
28
  fontSizes = tinymce.explode(editor.settings.font_size_style_values),
29
- serializer = editor.serializer;
29
+ schema = editor.schema;
30
30
 
31
31
  // Override some internal formats to produce legacy elements and attributes
32
32
  editor.formatter.register({
@@ -36,11 +36,25 @@
36
36
  alignright : {selector : alignElements, attributes : {align : 'right'}},
37
37
  alignfull : {selector : alignElements, attributes : {align : 'full'}},
38
38
 
39
- // Change the basic formatting elements to use deprecated element types
40
- bold : {inline : 'b'},
41
- italic : {inline : 'i'},
42
- underline : {inline : 'u'},
43
- strikethrough : {inline : 'strike'},
39
+ // Change the basic formatting elements to use deprecated element types
40
+ bold : [
41
+ {inline : 'b', remove : 'all'},
42
+ {inline : 'strong', remove : 'all'},
43
+ {inline : 'span', styles : {fontWeight : 'bold'}}
44
+ ],
45
+ italic : [
46
+ {inline : 'i', remove : 'all'},
47
+ {inline : 'em', remove : 'all'},
48
+ {inline : 'span', styles : {fontStyle : 'italic'}}
49
+ ],
50
+ underline : [
51
+ {inline : 'u', remove : 'all'},
52
+ {inline : 'span', styles : {textDecoration : 'underline'}, exact : true}
53
+ ],
54
+ strikethrough : [
55
+ {inline : 'strike', remove : 'all'},
56
+ {inline : 'span', styles : {textDecoration: 'line-through'}, exact : true}
57
+ ],
44
58
 
45
59
  // Change font size and font family to use the deprecated font element
46
60
  fontname : {inline : 'font', attributes : {face : '%value'}},
@@ -58,35 +72,24 @@
58
72
  hilitecolor : {inline : 'font', styles : {backgroundColor : '%value'}}
59
73
  });
60
74
 
61
- // Force parsing of the serializer rules
62
- serializer._setup();
63
-
64
75
  // Check that deprecated elements are allowed if not add them
65
76
  tinymce.each('b,i,u,strike'.split(','), function(name) {
66
- var rule = serializer.rules[name];
67
-
68
- if (!rule)
69
- serializer.addRules(name);
77
+ schema.addValidElements(name + '[*]');
70
78
  });
71
79
 
72
80
  // Add font element if it's missing
73
- if (!serializer.rules["font"])
74
- serializer.addRules("font[face|size|color|style]");
81
+ if (!schema.getElementRule("font"))
82
+ schema.addValidElements("font[face|size|color|style]");
75
83
 
76
84
  // Add the missing and depreacted align attribute for the serialization engine
77
85
  tinymce.each(alignElements.split(','), function(name) {
78
- var rule = serializer.rules[name], found;
86
+ var rule = schema.getElementRule(name), found;
79
87
 
80
88
  if (rule) {
81
- tinymce.each(rule.attribs, function(name, attr) {
82
- if (attr.name == 'align') {
83
- found = true;
84
- return false;
85
- }
86
- });
87
-
88
- if (!found)
89
- rule.attribs.push({name : 'align'});
89
+ if (!rule.attributes.align) {
90
+ rule.attributes.align = {};
91
+ rule.attributesOrder.push('align');
92
+ }
90
93
  }
91
94
  });
92
95
 
@@ -133,4 +136,4 @@
133
136
 
134
137
  // Register plugin
135
138
  tinymce.PluginManager.add('legacyoutput', tinymce.plugins.LegacyOutput);
136
- })(tinymce);
139
+ })(tinymce);