radiant-ck_editor_filter-extension 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (531) hide show
  1. data/README.markdown +7 -1
  2. data/VERSION +1 -1
  3. data/ck_editor_filter_extension.rb +1 -1
  4. data/public/javascripts/extensions/ck_editor_filter/ckeditor/CHANGES.html +1130 -373
  5. data/public/javascripts/extensions/ck_editor_filter/ckeditor/INSTALL.html +2 -2
  6. data/public/javascripts/extensions/ck_editor_filter/ckeditor/LICENSE.html +2 -2
  7. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/adobeair/application.xml +32 -0
  8. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/adobeair/run.bat +9 -0
  9. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/adobeair/run.sh +8 -0
  10. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/adobeair/sample.html +45 -0
  11. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/ajax.html +23 -25
  12. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/api.html +64 -24
  13. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/api_dialog.html +36 -19
  14. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/api_dialog/my_dialog.js +1 -1
  15. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/asp/advanced.asp +105 -0
  16. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/asp/events.asp +136 -0
  17. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/asp/index.html +103 -0
  18. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/asp/replace.asp +72 -0
  19. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/asp/replaceall.asp +77 -0
  20. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/asp/sample_posteddata.asp +46 -0
  21. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/asp/standalone.asp +72 -0
  22. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/assets/_posteddata.php +59 -0
  23. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/assets/output_for_flash.fla +0 -0
  24. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/assets/output_for_flash.swf +0 -0
  25. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/assets/output_xhtml.css +204 -0
  26. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/assets/parsesample.css +70 -0
  27. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/assets/swfobject.js +18 -0
  28. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/autogrow.html +103 -0
  29. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/bbcode.html +136 -0
  30. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/devtools.html +94 -0
  31. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/divreplace.html +27 -10
  32. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/enterkey.html +39 -12
  33. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/fullpage.html +33 -13
  34. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/index.html +88 -25
  35. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/jqueryadapter.html +34 -8
  36. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/output_for_flash.html +275 -0
  37. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/output_html.html +285 -0
  38. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/output_xhtml.html +181 -0
  39. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/advanced.php +56 -29
  40. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/events.php +58 -35
  41. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/index.html +47 -0
  42. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/replace.php +48 -24
  43. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/replaceall.php +50 -30
  44. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/standalone.php +52 -33
  45. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/placeholder.html +81 -0
  46. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/readonly.html +91 -0
  47. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/replacebyclass.html +22 -7
  48. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/replacebycode.html +25 -8
  49. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/sample.css +85 -3
  50. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/sample.js +1 -1
  51. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/sample_posteddata.php +21 -59
  52. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/sharedspaces.html +32 -10
  53. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/skins.html +38 -11
  54. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/stylesheetparser.html +93 -0
  55. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/tableresize.html +115 -0
  56. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/ui_color.html +49 -7
  57. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/ui_languages.html +53 -23
  58. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/adapters/jquery.js +17 -8
  59. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/_bootstrap.js +21 -18
  60. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ckeditor.js +42 -4
  61. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ckeditor_base.js +66 -29
  62. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ckeditor_basic.js +12 -15
  63. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/command.js +138 -2
  64. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/commanddefinition.js +59 -16
  65. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/config.js +142 -18
  66. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dataprocessor.js +6 -7
  67. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom.js +2 -3
  68. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/comment.js +1 -1
  69. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/document.js +29 -2
  70. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/documentfragment.js +3 -3
  71. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/domobject.js +59 -11
  72. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/element.js +249 -27
  73. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/elementpath.js +18 -3
  74. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/event.js +1 -1
  75. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/node.js +84 -56
  76. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/nodelist.js +4 -1
  77. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/range.js +345 -48
  78. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/rangelist.js +213 -0
  79. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/text.js +6 -1
  80. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/walker.js +40 -29
  81. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/window.js +1 -1
  82. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dtd.js +15 -11
  83. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/editor.js +336 -15
  84. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/editor_basic.js +19 -12
  85. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/env.js +80 -17
  86. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/event.js +12 -6
  87. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/eventInfo.js +5 -5
  88. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/focusmanager.js +27 -12
  89. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser.js +17 -5
  90. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/basicwriter.js +3 -3
  91. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/cdata.js +1 -1
  92. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/comment.js +1 -1
  93. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/element.js +14 -5
  94. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/filter.js +34 -8
  95. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/fragment.js +105 -108
  96. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/text.js +1 -1
  97. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/lang.js +12 -7
  98. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/loader.js +7 -9
  99. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/plugindefinition.js +18 -1
  100. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/plugins.js +21 -3
  101. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/resourcemanager.js +1 -1
  102. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/scriptloader.js +7 -25
  103. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/skins.js +5 -25
  104. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/themes.js +1 -1
  105. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/tools.js +61 -12
  106. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ui.js +13 -1
  107. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/_languages.js +2 -1
  108. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/_translationstatus.txt +58 -57
  109. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/af.js +521 -410
  110. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ar.js +160 -49
  111. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/bg.js +162 -51
  112. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/bn.js +162 -51
  113. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/bs.js +162 -51
  114. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ca.js +260 -149
  115. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/cs.js +233 -122
  116. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/cy.js +159 -48
  117. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/da.js +162 -51
  118. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/de.js +217 -106
  119. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/el.js +162 -51
  120. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/en-au.js +166 -55
  121. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/en-ca.js +166 -55
  122. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/en-gb.js +277 -166
  123. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/en.js +166 -55
  124. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/eo.js +162 -51
  125. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/es.js +182 -71
  126. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/et.js +162 -51
  127. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/eu.js +162 -51
  128. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fa.js +162 -51
  129. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fi.js +178 -67
  130. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fo.js +339 -228
  131. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fr-ca.js +162 -51
  132. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fr.js +261 -150
  133. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/gl.js +162 -51
  134. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/gu.js +162 -51
  135. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/he.js +179 -68
  136. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/hi.js +162 -51
  137. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/hr.js +162 -51
  138. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/hu.js +341 -230
  139. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/is.js +162 -51
  140. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/it.js +162 -51
  141. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ja.js +195 -84
  142. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ka.js +810 -0
  143. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/km.js +162 -51
  144. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ko.js +162 -51
  145. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/lt.js +162 -51
  146. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/lv.js +162 -51
  147. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/mn.js +162 -51
  148. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ms.js +162 -51
  149. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/nb.js +286 -175
  150. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/nl.js +178 -67
  151. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/no.js +286 -175
  152. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/pl.js +279 -168
  153. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/pt-br.js +318 -208
  154. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/pt.js +162 -51
  155. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ro.js +162 -51
  156. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ru.js +159 -48
  157. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sk.js +192 -81
  158. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sl.js +161 -50
  159. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sr-latn.js +162 -51
  160. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sr.js +162 -51
  161. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sv.js +357 -247
  162. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/th.js +162 -51
  163. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/tr.js +345 -235
  164. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/uk.js +387 -276
  165. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/vi.js +336 -225
  166. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/zh-cn.js +271 -160
  167. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/zh.js +162 -51
  168. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/a11yhelp/dialogs/a11yhelp.js +16 -5
  169. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/a11yhelp/lang/en.js +3 -3
  170. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/a11yhelp/lang/he.js +216 -0
  171. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/a11yhelp/plugin.js +4 -3
  172. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/about/dialogs/about.js +4 -1
  173. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/about/plugin.js +2 -1
  174. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/adobeair/plugin.js +228 -0
  175. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/ajax/plugin.js +152 -0
  176. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/autogrow/plugin.js +88 -0
  177. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/basicstyles/plugin.js +27 -19
  178. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/bbcode/plugin.js +924 -0
  179. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/bidi/plugin.js +331 -0
  180. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/blockquote/plugin.js +8 -4
  181. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/button/plugin.js +70 -55
  182. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/clipboard/dialogs/paste.js +115 -78
  183. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/clipboard/plugin.js +133 -69
  184. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/colorbutton/plugin.js +91 -23
  185. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/colordialog/dialogs/colordialog.js +192 -43
  186. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/colordialog/plugin.js +12 -10
  187. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/contextmenu/plugin.js +124 -221
  188. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/devtools/lang/en.js +16 -0
  189. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/devtools/plugin.js +173 -0
  190. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/dialog/dialogDefinition.js +840 -56
  191. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/dialog/plugin.js +652 -301
  192. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/dialogadvtab/plugin.js +205 -0
  193. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/dialogui/plugin.js +179 -50
  194. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/div/dialogs/div.js +40 -40
  195. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/div/plugin.js +4 -4
  196. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/docprops/dialogs/docprops.js +686 -0
  197. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/docprops/plugin.js +22 -0
  198. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/domiterator/plugin.js +59 -53
  199. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/editingblock/plugin.js +62 -17
  200. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/elementspath/plugin.js +137 -108
  201. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/enterkey/plugin.js +117 -47
  202. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/entities/plugin.js +95 -45
  203. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/fakeobjects/plugin.js +22 -16
  204. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/filebrowser/plugin.js +75 -30
  205. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/find/dialogs/find.js +111 -69
  206. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/find/plugin.js +2 -1
  207. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/flash/dialogs/flash.js +28 -20
  208. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/flash/plugin.js +14 -11
  209. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/floatpanel/plugin.js +50 -21
  210. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/font/plugin.js +3 -2
  211. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/format/plugin.js +17 -13
  212. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/button.js +38 -55
  213. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/checkbox.js +21 -11
  214. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/form.js +6 -6
  215. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/hiddenfield.js +26 -17
  216. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/radio.js +6 -6
  217. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/select.js +13 -7
  218. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/textarea.js +4 -4
  219. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/textfield.js +11 -5
  220. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/images/hiddenfield.gif +0 -0
  221. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/plugin.js +112 -41
  222. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/horizontalrule/plugin.js +1 -1
  223. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/htmldataprocessor/plugin.js +200 -63
  224. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/htmlwriter/plugin.js +26 -21
  225. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/iframe/dialogs/iframe.js +257 -0
  226. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/iframe/images/placeholder.png +0 -0
  227. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/iframe/plugin.js +106 -0
  228. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/iframedialog/plugin.js +59 -7
  229. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/image/dialogs/image.js +243 -218
  230. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/image/plugin.js +19 -2
  231. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/indent/plugin.js +335 -223
  232. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/justify/plugin.js +115 -30
  233. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/keystrokes/plugin.js +3 -7
  234. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/link/dialogs/anchor.js +85 -40
  235. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/link/dialogs/link.js +163 -184
  236. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/link/plugin.js +180 -32
  237. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/list/plugin.js +165 -81
  238. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/listblock/plugin.js +11 -6
  239. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/liststyle/dialogs/liststyle.js +204 -0
  240. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/liststyle/plugin.js +66 -0
  241. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/maximize/plugin.js +109 -40
  242. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/menu/plugin.js +166 -67
  243. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/menubutton/plugin.js +12 -7
  244. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/newpage/plugin.js +3 -3
  245. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pagebreak/plugin.js +95 -29
  246. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/panel/plugin.js +43 -20
  247. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/panelbutton/plugin.js +10 -11
  248. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pastefromword/filter/default.js +316 -119
  249. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pastefromword/plugin.js +32 -11
  250. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pastetext/dialogs/pastetext.js +19 -29
  251. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pastetext/plugin.js +15 -79
  252. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/placeholder/dialogs/placeholder.js +71 -0
  253. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/placeholder/lang/en.js +16 -0
  254. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/placeholder/lang/he.js +16 -0
  255. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/placeholder/placeholder.gif +0 -0
  256. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/placeholder/plugin.js +171 -0
  257. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/popup/plugin.js +9 -7
  258. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/preview/plugin.js +3 -2
  259. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/print/plugin.js +2 -1
  260. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/removeformat/plugin.js +89 -36
  261. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/resize/plugin.js +71 -18
  262. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/richcombo/plugin.js +40 -29
  263. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/save/plugin.js +2 -1
  264. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/scayt/dialogs/options.js +114 -110
  265. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/scayt/plugin.js +531 -170
  266. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/selection/plugin.js +791 -331
  267. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_address.png +0 -0
  268. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_blockquote.png +0 -0
  269. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_div.png +0 -0
  270. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h1.png +0 -0
  271. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h2.png +0 -0
  272. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h3.png +0 -0
  273. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h4.png +0 -0
  274. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h5.png +0 -0
  275. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h6.png +0 -0
  276. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_p.png +0 -0
  277. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_pre.png +0 -0
  278. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/plugin.js +14 -8
  279. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showborders/plugin.js +63 -26
  280. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/dialogs/smiley.js +31 -22
  281. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/plugin.js +15 -6
  282. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/sourcearea/plugin.js +18 -14
  283. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/specialchar/dialogs/specialchar.js +36 -59
  284. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/specialchar/lang/en.js +89 -0
  285. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/specialchar/plugin.js +45 -4
  286. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/styles/plugin.js +632 -212
  287. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/{stylescombo → styles}/styles/default.js +5 -2
  288. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/stylescombo/plugin.js +77 -140
  289. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/stylesheetparser/plugin.js +143 -0
  290. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/tab/plugin.js +109 -3
  291. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/table/dialogs/table.js +106 -23
  292. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/table/plugin.js +11 -3
  293. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/tableresize/plugin.js +450 -0
  294. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/tabletools/dialogs/tableCell.js +66 -64
  295. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/tabletools/plugin.js +348 -179
  296. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/dialogs/templates.js +41 -36
  297. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/plugin.js +3 -4
  298. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/templates/default.js +2 -2
  299. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/toolbar/plugin.js +193 -122
  300. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/dialogs/uicolor.js +6 -5
  301. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/lang/en.js +1 -1
  302. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/lang/he.js +15 -0
  303. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/plugin.js +2 -2
  304. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/yui/assets/yui.css +1 -1
  305. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/undo/plugin.js +73 -12
  306. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/dialogs/ciframe.html +1 -1
  307. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/dialogs/tmpFrameset.html +1 -1
  308. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/dialogs/wsc.css +1 -2
  309. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/dialogs/wsc.js +20 -4
  310. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/plugin.js +2 -2
  311. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wysiwygarea/plugin.js +751 -251
  312. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/xml/plugin.js +170 -0
  313. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/dialog.css +116 -18
  314. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/editor.css +1 -1
  315. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/elementspath.css +2 -1
  316. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/icons.css +42 -2
  317. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/icons.png +0 -0
  318. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/icons_rtl.png +0 -0
  319. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/mainui.css +25 -5
  320. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/menu.css +36 -15
  321. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/panel.css +18 -17
  322. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/presets.css +1 -1
  323. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/reset.css +7 -1
  324. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/richcombo.css +27 -10
  325. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/skin.js +4 -36
  326. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/templates.css +16 -12
  327. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/toolbar.css +69 -83
  328. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/dialog.css +111 -13
  329. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/editor.css +1 -1
  330. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/elementspath.css +2 -1
  331. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/icons.css +40 -1
  332. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/icons.png +0 -0
  333. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/icons_rtl.png +0 -0
  334. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/mainui.css +33 -7
  335. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/menu.css +37 -15
  336. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/panel.css +23 -22
  337. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/presets.css +1 -1
  338. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/reset.css +7 -1
  339. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/richcombo.css +40 -20
  340. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/skin.js +10 -17
  341. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/templates.css +16 -10
  342. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/toolbar.css +79 -32
  343. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/dialog.css +112 -13
  344. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/editor.css +1 -1
  345. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/elementspath.css +2 -1
  346. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/icons.css +40 -1
  347. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/icons.png +0 -0
  348. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/icons_rtl.png +0 -0
  349. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/mainui.css +25 -5
  350. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/menu.css +38 -16
  351. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/panel.css +22 -21
  352. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/presets.css +1 -1
  353. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/reset.css +7 -1
  354. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/richcombo.css +36 -23
  355. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/skin.js +10 -17
  356. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/templates.css +16 -10
  357. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/toolbar.css +67 -27
  358. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/themes/default/theme.js +106 -46
  359. data/public/javascripts/extensions/ck_editor_filter/ckeditor/adapters/jquery.js +2 -2
  360. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor.asp +955 -0
  361. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor.js +141 -117
  362. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor.pack +13 -7
  363. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor.php +1 -1
  364. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_basic.js +4 -4
  365. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_basic_source.js +2 -2
  366. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_php4.php +27 -54
  367. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_php5.php +26 -53
  368. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_source.js +2 -2
  369. data/public/javascripts/extensions/ck_editor_filter/ckeditor/config.js +1 -1
  370. data/public/javascripts/extensions/ck_editor_filter/ckeditor/contents.css +4 -16
  371. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/_languages.js +2 -2
  372. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/_translationstatus.txt +58 -57
  373. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/af.js +2 -2
  374. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ar.js +2 -2
  375. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/bg.js +2 -2
  376. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/bn.js +2 -2
  377. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/bs.js +2 -2
  378. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ca.js +2 -2
  379. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/cs.js +2 -2
  380. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/cy.js +2 -2
  381. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/da.js +2 -2
  382. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/de.js +2 -2
  383. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/el.js +2 -2
  384. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en-au.js +2 -2
  385. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en-ca.js +2 -2
  386. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en-gb.js +2 -2
  387. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en.js +2 -2
  388. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/eo.js +2 -2
  389. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/es.js +2 -2
  390. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/et.js +2 -2
  391. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/eu.js +2 -2
  392. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fa.js +2 -2
  393. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fi.js +2 -2
  394. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fo.js +2 -2
  395. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fr-ca.js +2 -2
  396. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fr.js +2 -2
  397. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/gl.js +2 -2
  398. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/gu.js +2 -2
  399. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/he.js +2 -2
  400. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/hi.js +2 -2
  401. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/hr.js +2 -2
  402. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/hu.js +2 -2
  403. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/is.js +2 -2
  404. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/it.js +2 -2
  405. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ja.js +2 -2
  406. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ka.js +6 -0
  407. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/km.js +2 -2
  408. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ko.js +2 -2
  409. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/lt.js +2 -2
  410. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/lv.js +2 -2
  411. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/mn.js +2 -2
  412. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ms.js +2 -2
  413. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/nb.js +2 -2
  414. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/nl.js +2 -2
  415. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/no.js +2 -2
  416. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/pl.js +2 -2
  417. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/pt-br.js +2 -2
  418. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/pt.js +2 -2
  419. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ro.js +2 -2
  420. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ru.js +2 -2
  421. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sk.js +2 -2
  422. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sl.js +2 -2
  423. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sr-latn.js +2 -2
  424. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sr.js +2 -2
  425. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sv.js +2 -2
  426. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/th.js +2 -2
  427. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/tr.js +2 -2
  428. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/uk.js +2 -2
  429. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/vi.js +2 -2
  430. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/zh-cn.js +2 -2
  431. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/zh.js +2 -2
  432. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +2 -2
  433. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/lang/en.js +2 -2
  434. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/lang/he.js +6 -0
  435. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/about/dialogs/about.js +2 -2
  436. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/adobeair/plugin.js +6 -0
  437. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/ajax/plugin.js +6 -0
  438. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/autogrow/plugin.js +6 -0
  439. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/bbcode/plugin.js +9 -0
  440. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/clipboard/dialogs/paste.js +3 -3
  441. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/colordialog/dialogs/colordialog.js +3 -2
  442. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/devtools/lang/en.js +6 -0
  443. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/devtools/plugin.js +6 -0
  444. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/dialog/dialogDefinition.js +1 -1
  445. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/div/dialogs/div.js +3 -2
  446. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/docprops/dialogs/docprops.js +10 -0
  447. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/docprops/plugin.js +6 -0
  448. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/find/dialogs/find.js +5 -5
  449. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/flash/dialogs/flash.js +5 -5
  450. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/button.js +2 -2
  451. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/checkbox.js +2 -2
  452. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/form.js +2 -2
  453. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/hiddenfield.js +2 -2
  454. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/radio.js +2 -2
  455. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/select.js +4 -4
  456. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/textarea.js +2 -2
  457. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/textfield.js +2 -2
  458. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
  459. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/iframe/dialogs/iframe.js +7 -0
  460. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/iframe/images/placeholder.png +0 -0
  461. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/iframedialog/plugin.js +2 -2
  462. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image/dialogs/image.js +9 -9
  463. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/link/dialogs/anchor.js +2 -2
  464. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/link/dialogs/link.js +7 -7
  465. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/liststyle/dialogs/liststyle.js +6 -0
  466. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/pastefromword/filter/default.js +7 -6
  467. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/pastetext/dialogs/pastetext.js +2 -2
  468. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/placeholder/dialogs/placeholder.js +6 -0
  469. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/placeholder/lang/en.js +6 -0
  470. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/placeholder/lang/he.js +6 -0
  471. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/placeholder/placeholder.gif +0 -0
  472. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/placeholder/plugin.js +6 -0
  473. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/radiantpreview/images/radiant-preview.png +0 -0
  474. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/scayt/dialogs/options.js +4 -4
  475. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/scayt/dialogs/toolbar.css +1 -1
  476. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_address.png +0 -0
  477. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
  478. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_div.png +0 -0
  479. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
  480. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
  481. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
  482. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
  483. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
  484. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
  485. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_p.png +0 -0
  486. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
  487. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/dialogs/smiley.js +3 -3
  488. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/specialchar.js +3 -3
  489. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/lang/en.js +6 -0
  490. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/{stylescombo → styles}/styles/default.js +2 -2
  491. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/stylesheetparser/plugin.js +6 -0
  492. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/table/dialogs/table.js +5 -5
  493. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/tableresize/plugin.js +7 -0
  494. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/tabletools/dialogs/tableCell.js +4 -4
  495. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/dialogs/templates.js +3 -3
  496. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/templates/default.js +2 -2
  497. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/dialogs/uicolor.js +3 -3
  498. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/lang/en.js +1 -1
  499. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/lang/he.js +6 -0
  500. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/plugin.js +2 -2
  501. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/assets/yui.css +2 -2
  502. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/yui.js +1 -1
  503. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/ciframe.html +1 -1
  504. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +1 -1
  505. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/wsc.css +2 -2
  506. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/wsc.js +3 -3
  507. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/xml/plugin.js +6 -0
  508. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/dialog.css +5 -5
  509. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/editor.css +9 -8
  510. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/icons.png +0 -0
  511. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/icons_rtl.png +0 -0
  512. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/skin.js +3 -3
  513. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/templates.css +2 -2
  514. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/dialog.css +5 -5
  515. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/editor.css +10 -9
  516. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/icons.png +0 -0
  517. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/icons_rtl.png +0 -0
  518. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/skin.js +2 -2
  519. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/templates.css +2 -2
  520. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/dialog.css +5 -4
  521. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/editor.css +9 -8
  522. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/icons.png +0 -0
  523. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/icons_rtl.png +0 -0
  524. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/skin.js +2 -2
  525. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/templates.css +2 -2
  526. data/public/javascripts/extensions/ck_editor_filter/ckeditor/themes/default/theme.js +4 -4
  527. data/public/javascripts/extensions/ck_editor_filter/radiant.ckeditor.js +21 -12
  528. metadata +94 -9
  529. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ajax.js +0 -143
  530. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/imagecacher.js +0 -58
  531. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/xml.js +0 -165
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
2
+ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
3
3
  For licensing, see LICENSE.html or http://ckeditor.com/license
4
4
  */
5
5
 
@@ -33,6 +33,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
33
33
 
34
34
  (function()
35
35
  {
36
+ var cssLength = CKEDITOR.tools.cssLength;
36
37
  function isTabVisible( tabId )
37
38
  {
38
39
  return !!this._.tabs[ tabId ][ 0 ].$.offsetHeight;
@@ -68,6 +69,30 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
68
69
  return null;
69
70
  }
70
71
 
72
+
73
+ function clearOrRecoverTextInputValue( container, isRecover )
74
+ {
75
+ var inputs = container.$.getElementsByTagName( 'input' );
76
+ for ( var i = 0, length = inputs.length; i < length ; i++ )
77
+ {
78
+ var item = new CKEDITOR.dom.element( inputs[ i ] );
79
+
80
+ if ( item.getAttribute( 'type' ).toLowerCase() == 'text' )
81
+ {
82
+ if ( isRecover )
83
+ {
84
+ item.setAttribute( 'value', item.getCustomData( 'fake_value' ) || '' );
85
+ item.removeCustomData( 'fake_value' );
86
+ }
87
+ else
88
+ {
89
+ item.setCustomData( 'fake_value', item.getAttribute( 'value' ) );
90
+ item.setAttribute( 'value', '' );
91
+ }
92
+ }
93
+ }
94
+ }
95
+
71
96
  /**
72
97
  * This is the base class for runtime dialog objects. An instance of this
73
98
  * class represents a single named dialog for a single editor instance.
@@ -80,10 +105,19 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
80
105
  CKEDITOR.dialog = function( editor, dialogName )
81
106
  {
82
107
  // Load the dialog definition.
83
- var definition = CKEDITOR.dialog._.dialogDefinitions[ dialogName ];
108
+ var definition = CKEDITOR.dialog._.dialogDefinitions[ dialogName ],
109
+ defaultDefinition = CKEDITOR.tools.clone( defaultDialogDefinition ),
110
+ buttonsOrder = editor.config.dialog_buttonsOrder || 'OS',
111
+ dir = editor.lang.dir;
112
+
113
+ if ( ( buttonsOrder == 'OS' && CKEDITOR.env.mac ) || // The buttons in MacOS Apps are in reverse order (#4750)
114
+ ( buttonsOrder == 'rtl' && dir == 'ltr' ) ||
115
+ ( buttonsOrder == 'ltr' && dir == 'rtl' ) )
116
+ defaultDefinition.buttons.reverse();
117
+
84
118
 
85
119
  // Completes the definition with the default values.
86
- definition = CKEDITOR.tools.extend( definition( editor ), defaultDialogDefinition );
120
+ definition = CKEDITOR.tools.extend( definition( editor ), defaultDefinition );
87
121
 
88
122
  // Clone a functionally independent copy for this dialog.
89
123
  definition = CKEDITOR.tools.clone( definition );
@@ -92,7 +126,6 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
92
126
  // functions.
93
127
  definition = new definitionObject( this, definition );
94
128
 
95
-
96
129
  var doc = CKEDITOR.document;
97
130
 
98
131
  var themeBuilt = editor.theme.buildDialog( editor );
@@ -105,7 +138,6 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
105
138
  name : dialogName,
106
139
  contentSize : { width : 0, height : 0 },
107
140
  size : { width : 0, height : 0 },
108
- updateSize : false,
109
141
  contents : {},
110
142
  buttons : {},
111
143
  accessKeyMap : {},
@@ -135,13 +167,15 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
135
167
 
136
168
  // Set the startup styles for the dialog, avoiding it enlarging the
137
169
  // page size on the dialog creation.
138
- this.parts.dialog.setStyles(
139
- {
170
+ var startStyles = {
140
171
  position : CKEDITOR.env.ie6Compat ? 'absolute' : 'fixed',
141
172
  top : 0,
142
- left: 0,
143
173
  visibility : 'hidden'
144
- });
174
+ };
175
+
176
+ startStyles[ dir == 'rtl' ? 'right' : 'left' ] = 0;
177
+ this.parts.dialog.setStyles( startStyles );
178
+
145
179
 
146
180
  // Call the CKEDITOR.event constructor to initialize this instance.
147
181
  CKEDITOR.event.call( this );
@@ -154,6 +188,34 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
154
188
  definition : definition
155
189
  }
156
190
  , editor ).definition;
191
+
192
+ var tabsToRemove = {};
193
+ // Cache tabs that should be removed.
194
+ if ( !( 'removeDialogTabs' in editor._ ) && editor.config.removeDialogTabs )
195
+ {
196
+ var removeContents = editor.config.removeDialogTabs.split( ';' );
197
+
198
+ for ( i = 0; i < removeContents.length; i++ )
199
+ {
200
+ var parts = removeContents[ i ].split( ':' );
201
+ if ( parts.length == 2 )
202
+ {
203
+ var removeDialogName = parts[ 0 ];
204
+ if ( !tabsToRemove[ removeDialogName ] )
205
+ tabsToRemove[ removeDialogName ] = [];
206
+ tabsToRemove[ removeDialogName ].push( parts[ 1 ] );
207
+ }
208
+ }
209
+ editor._.removeDialogTabs = tabsToRemove;
210
+ }
211
+
212
+ // Remove tabs of this dialog.
213
+ if ( editor._.removeDialogTabs && ( tabsToRemove = editor._.removeDialogTabs[ dialogName ] ) )
214
+ {
215
+ for ( i = 0; i < tabsToRemove.length; i++ )
216
+ definition.removeContents( tabsToRemove[ i ] );
217
+ }
218
+
157
219
  // Initialize load, show, hide, ok and cancel events.
158
220
  if ( definition.onLoad )
159
221
  this.on( 'load', definition.onLoad );
@@ -168,6 +230,9 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
168
230
  {
169
231
  this.on( 'ok', function( evt )
170
232
  {
233
+ // Dialog confirm might probably introduce content changes (#5415).
234
+ editor.fire( 'saveSnapshot' );
235
+ setTimeout( function () { editor.fire( 'saveSnapshot' ); }, 0 );
171
236
  if ( definition.onOk.call( this, evt ) === false )
172
237
  evt.data.hide = false;
173
238
  });
@@ -248,6 +313,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
248
313
  {
249
314
  if ( this.fire( 'cancel', { hide : true } ).hide !== false )
250
315
  this.hide();
316
+ evt.data.preventDefault();
251
317
  }, this );
252
318
 
253
319
  // Sort focus list according to tab order definitions.
@@ -312,7 +378,8 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
312
378
  if ( me != CKEDITOR.dialog._.currentTop )
313
379
  return;
314
380
 
315
- var keystroke = evt.data.getKeystroke();
381
+ var keystroke = evt.data.getKeystroke(),
382
+ rtl = editor.lang.dir == 'rtl';
316
383
 
317
384
  processed = 0;
318
385
  if ( keystroke == 9 || keystroke == CKEDITOR.SHIFT + 9 )
@@ -335,7 +402,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
335
402
 
336
403
  processed = 1;
337
404
  }
338
- else if ( keystroke == CKEDITOR.ALT + 121 && !me._.tabBarMode )
405
+ else if ( keystroke == CKEDITOR.ALT + 121 && !me._.tabBarMode && me.getPageCount() > 1 )
339
406
  {
340
407
  // Alt-F10 puts focus into the current tab item in the tab bar.
341
408
  me._.tabBarMode = true;
@@ -345,7 +412,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
345
412
  else if ( ( keystroke == 37 || keystroke == 39 ) && me._.tabBarMode )
346
413
  {
347
414
  // Arrow keys - used for changing tabs.
348
- nextId = ( keystroke == 37 ? getPreviousVisibleTab.call( me ) : getNextVisibleTab.call( me ) );
415
+ nextId = ( keystroke == ( rtl ? 39 : 37 ) ? getPreviousVisibleTab.call( me ) : getNextVisibleTab.call( me ) );
349
416
  me.selectPage( nextId );
350
417
  me._.tabs[ nextId ][ 0 ].focus();
351
418
  processed = 1;
@@ -381,11 +448,6 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
381
448
  if ( CKEDITOR.env.opera || ( CKEDITOR.env.gecko && CKEDITOR.env.mac ) )
382
449
  dialogElement.on( 'keypress', focusKeyPressHandler, this );
383
450
 
384
- if ( CKEDITOR.env.ie6Compat )
385
- {
386
- var coverDoc = coverElement.getChild( 0 ).getFrameDocument();
387
- coverDoc.on( 'keydown', focusKeydownHandler, this, null, 0 );
388
- }
389
451
  } );
390
452
  this.on( 'hide', function()
391
453
  {
@@ -407,7 +469,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
407
469
  setupFocus();
408
470
 
409
471
  if ( editor.config.dialog_startupFocusTab
410
- && me._.tabIdList.length > 1 )
472
+ && me._.pageCount > 1 )
411
473
  {
412
474
  me._.tabBarMode = true;
413
475
  me._.tabs[ me._.currentTabId ][ 0 ].focus();
@@ -472,16 +534,21 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
472
534
 
473
535
  // Insert the tabs and contents.
474
536
  for ( var i = 0 ; i < definition.contents.length ; i++ )
475
- this.addPage( definition.contents[i] );
537
+ {
538
+ var page = definition.contents[i];
539
+ page && this.addPage( page );
540
+ }
476
541
 
477
- this.parts['tabs'].on( 'click', function( evt )
542
+ this.parts[ 'tabs' ].on( 'click', function( evt )
478
543
  {
479
544
  var target = evt.data.getTarget();
480
545
  // If we aren't inside a tab, bail out.
481
546
  if ( target.hasClass( 'cke_dialog_tab' ) )
482
547
  {
548
+ // Get the ID of the tab, without the 'cke_' prefix and the unique number suffix.
483
549
  var id = target.$.id;
484
- this.selectPage( id.substr( 0, id.lastIndexOf( '_' ) ) );
550
+ this.selectPage( id.substring( 4, id.lastIndexOf( '_' ) ) );
551
+
485
552
  if ( this._.tabBarMode )
486
553
  {
487
554
  this._.tabBarMode = false;
@@ -505,8 +572,6 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
505
572
 
506
573
  for ( i = 0 ; i < buttons.length ; i++ )
507
574
  this._.buttons[ buttons[i].id ] = buttons[i];
508
-
509
- CKEDITOR.skins.load( editor, 'dialog' );
510
575
  };
511
576
 
512
577
  // Focusable interface. Use it via dialog.addFocusable.
@@ -543,6 +608,12 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
543
608
 
544
609
  CKEDITOR.dialog.prototype =
545
610
  {
611
+ destroy : function()
612
+ {
613
+ this.hide();
614
+ this._.element.remove();
615
+ },
616
+
546
617
  /**
547
618
  * Resizes the dialog.
548
619
  * @param {Number} width The width of the dialog in pixels.
@@ -566,8 +637,19 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
566
637
  height : height
567
638
  }, this._.editor );
568
639
 
640
+ this.fire( 'resize',
641
+ {
642
+ skin : this._.editor.skinName,
643
+ width : width,
644
+ height : height
645
+ }, this._.editor );
646
+
647
+ // Update dialog position when dimension get changed in RTL.
648
+ if ( this._.editor.lang.dir == 'rtl' && this._.position )
649
+ this._.position.x = CKEDITOR.document.getWindow().getViewPaneSize().width -
650
+ this._.contentSize.width - parseInt( this._.element.getFirst().getStyle( 'right' ), 10 );
651
+
569
652
  this._.contentSize = { width : width, height : height };
570
- this._.updateSize = true;
571
653
  };
572
654
  })(),
573
655
 
@@ -579,15 +661,8 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
579
661
  */
580
662
  getSize : function()
581
663
  {
582
- if ( !this._.updateSize )
583
- return this._.size;
584
664
  var element = this._.element.getFirst();
585
- var size = this._.size = { width : element.$.offsetWidth || 0, height : element.$.offsetHeight || 0};
586
-
587
- // If either the offsetWidth or offsetHeight is 0, the element isn't visible.
588
- this._.updateSize = !size.width || !size.height;
589
-
590
- return size;
665
+ return { width : element.$.offsetWidth || 0, height : element.$.offsetHeight || 0};
591
666
  },
592
667
 
593
668
  /**
@@ -595,17 +670,20 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
595
670
  * @function
596
671
  * @param {Number} x The target x-coordinate.
597
672
  * @param {Number} y The target y-coordinate.
673
+ * @param {Boolean} save Flag indicate whether the dialog position should be remembered on next open up.
598
674
  * @example
599
675
  * dialogObj.move( 10, 40 );
600
676
  */
601
677
  move : (function()
602
678
  {
603
679
  var isFixed;
604
- return function( x, y )
680
+ return function( x, y, save )
605
681
  {
606
682
  // The dialog may be fixed positioned or absolute positioned. Ask the
607
683
  // browser what is the current situation first.
608
- var element = this._.element.getFirst();
684
+ var element = this._.element.getFirst(),
685
+ rtl = this._.editor.lang.dir == 'rtl';
686
+
609
687
  if ( isFixed === undefined )
610
688
  isFixed = element.getComputedStyle( 'position' ) == 'fixed';
611
689
 
@@ -623,11 +701,20 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
623
701
  y += scrollPosition.y;
624
702
  }
625
703
 
626
- element.setStyles(
627
- {
628
- 'left' : ( x > 0 ? x : 0 ) + 'px',
629
- 'top' : ( y > 0 ? y : 0 ) + 'px'
630
- });
704
+ // Translate coordinate for RTL.
705
+ if ( rtl )
706
+ {
707
+ var dialogSize = this.getSize(),
708
+ viewPaneSize = CKEDITOR.document.getWindow().getViewPaneSize();
709
+ x = viewPaneSize.width - dialogSize.width - x;
710
+ }
711
+
712
+ var styles = { 'top' : ( y > 0 ? y : 0 ) + 'px' };
713
+ styles[ rtl ? 'right' : 'left' ] = ( x > 0 ? x : 0 ) + 'px';
714
+
715
+ element.setStyles( styles );
716
+
717
+ save && ( this._.moved = 1 );
631
718
  };
632
719
  })(),
633
720
 
@@ -646,20 +733,13 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
646
733
  */
647
734
  show : function()
648
735
  {
649
- var editor = this._.editor;
650
- if ( editor.mode == 'wysiwyg' && CKEDITOR.env.ie )
651
- {
652
- var selection = editor.getSelection();
653
- selection && selection.lock();
654
- }
655
-
656
736
  // Insert the dialog's element to the root document.
657
737
  var element = this._.element;
658
738
  var definition = this.definition;
659
739
  if ( !( element.getParent() && element.getParent().equals( CKEDITOR.document.getBody() ) ) )
660
740
  element.appendTo( CKEDITOR.document.getBody() );
661
741
  else
662
- return;
742
+ element.setStyle( 'display', 'block' );
663
743
 
664
744
  // FIREFOX BUG: Fix vanishing caret for Firefox 2 or Gecko 1.8.
665
745
  if ( CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 )
@@ -674,14 +754,15 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
674
754
 
675
755
 
676
756
  // First, set the dialog to an appropriate size.
677
- this.resize( definition.minWidth, definition.minHeight );
678
-
679
- // Select the first tab by default.
680
- this.selectPage( this.definition.contents[0].id );
757
+ this.resize( this._.contentSize && this._.contentSize.width || definition.width || definition.minWidth,
758
+ this._.contentSize && this._.contentSize.height || definition.height || definition.minHeight );
681
759
 
682
760
  // Reset all inputs back to their default value.
683
761
  this.reset();
684
762
 
763
+ // Select the first tab by default.
764
+ this.selectPage( this.definition.contents[0].id );
765
+
685
766
  // Set z-index.
686
767
  if ( CKEDITOR.dialog._.currentZIndex === null )
687
768
  CKEDITOR.dialog._.currentZIndex = this._.editor.config.baseFloatZIndex;
@@ -693,7 +774,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
693
774
  {
694
775
  CKEDITOR.dialog._.currentTop = this;
695
776
  this._.parentDialog = null;
696
- addCover( this._.editor );
777
+ showCover( this._.editor );
697
778
 
698
779
  element.on( 'keydown', accessKeyDownHandler );
699
780
  element.on( CKEDITOR.env.opera ? 'keypress' : 'keyup', accessKeyUpHandler );
@@ -719,20 +800,15 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
719
800
  // Reset the hasFocus state.
720
801
  this._.hasFocus = false;
721
802
 
722
- // Rearrange the dialog to the middle of the window.
723
803
  CKEDITOR.tools.setTimeout( function()
724
804
  {
725
- var viewSize = CKEDITOR.document.getWindow().getViewPaneSize();
726
- var dialogSize = this.getSize();
727
-
728
- // We're using definition size for initial position because of
729
- // offten corrupted data in offsetWidth at this point. (#4084)
730
- this.move( ( viewSize.width - definition.minWidth ) / 2, ( viewSize.height - dialogSize.height ) / 2 );
731
-
805
+ this.layout();
732
806
  this.parts.dialog.setStyle( 'visibility', '' );
733
807
 
734
808
  // Execute onLoad for the first show.
735
809
  this.fireOnce( 'load', {} );
810
+ CKEDITOR.ui.fire( 'ready', this );
811
+
736
812
  this.fire( 'show', {} );
737
813
  this._.editor.fire( 'dialogShow', this );
738
814
 
@@ -743,6 +819,19 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
743
819
  100, this );
744
820
  },
745
821
 
822
+ /**
823
+ * Rearrange the dialog to its previous position or the middle of the window.
824
+ * @since 3.5
825
+ */
826
+ layout : function()
827
+ {
828
+ var viewSize = CKEDITOR.document.getWindow().getViewPaneSize(),
829
+ dialogSize = this.getSize();
830
+
831
+ this.move( this._.moved ? this._.position.x : ( viewSize.width - dialogSize.width ) / 2,
832
+ this._.moved ? this._.position.y : ( viewSize.height - dialogSize.height ) / 2 );
833
+ },
834
+
746
835
  /**
747
836
  * Executes a function for each UI element.
748
837
  * @param {Function} fn Function to execute for each UI element.
@@ -753,7 +842,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
753
842
  for ( var i in this._.contents )
754
843
  {
755
844
  for ( var j in this._.contents[i] )
756
- fn( this._.contents[i][j]);
845
+ fn( this._.contents[i][j] );
757
846
  }
758
847
  return this;
759
848
  },
@@ -766,10 +855,20 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
766
855
  */
767
856
  reset : (function()
768
857
  {
769
- var fn = function( widget ){ if ( widget.reset ) widget.reset(); };
858
+ var fn = function( widget ){ if ( widget.reset ) widget.reset( 1 ); };
770
859
  return function(){ this.foreach( fn ); return this; };
771
860
  })(),
772
861
 
862
+
863
+ /**
864
+ * Calls the {@link CKEDITOR.dialog.definition.uiElement#setup} method of each of the UI elements, with the arguments passed through it.
865
+ * It is usually being called when the dialog is opened, to put the initial value inside the field.
866
+ * @example
867
+ * dialogObj.setupContent();
868
+ * @example
869
+ * var timestamp = ( new Date() ).valueOf();
870
+ * dialogObj.setupContent( timestamp );
871
+ */
773
872
  setupContent : function()
774
873
  {
775
874
  var args = arguments;
@@ -780,6 +879,15 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
780
879
  });
781
880
  },
782
881
 
882
+ /**
883
+ * Calls the {@link CKEDITOR.dialog.definition.uiElement#commit} method of each of the UI elements, with the arguments passed through it.
884
+ * It is usually being called when the user confirms the dialog, to process the values.
885
+ * @example
886
+ * dialogObj.commitContent();
887
+ * @example
888
+ * var timestamp = ( new Date() ).valueOf();
889
+ * dialogObj.commitContent( timestamp );
890
+ */
783
891
  commitContent : function()
784
892
  {
785
893
  var args = arguments;
@@ -797,23 +905,24 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
797
905
  */
798
906
  hide : function()
799
907
  {
908
+ if ( !this.parts.dialog.isVisible() )
909
+ return;
910
+
800
911
  this.fire( 'hide', {} );
801
912
  this._.editor.fire( 'dialogHide', this );
802
-
803
- // Remove the dialog's element from the root document.
804
913
  var element = this._.element;
805
- if ( !element.getParent() )
806
- return;
807
-
808
- element.remove();
914
+ element.setStyle( 'display', 'none' );
809
915
  this.parts.dialog.setStyle( 'visibility', 'hidden' );
810
-
811
916
  // Unregister all access keys associated with this dialog.
812
917
  unregisterAccessKey( this );
813
918
 
919
+ // Close any child(top) dialogs first.
920
+ while( CKEDITOR.dialog._.currentTop != this )
921
+ CKEDITOR.dialog._.currentTop.hide();
922
+
814
923
  // Maintain dialog ordering and remove cover if needed.
815
924
  if ( !this._.parentDialog )
816
- removeCover();
925
+ hideCover();
817
926
  else
818
927
  {
819
928
  var parentElement = this._.parentDialog.getElement().getFirst();
@@ -846,7 +955,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
846
955
  else
847
956
  CKEDITOR.dialog._.currentZIndex -= 10;
848
957
 
849
-
958
+ delete this._.parentDialog;
850
959
  // Reset the initial values of the dialog.
851
960
  this.foreach( function( contentObj ) { contentObj.resetInitValue && contentObj.resetInitValue(); } );
852
961
  },
@@ -868,7 +977,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
868
977
  children : contents.elements,
869
978
  expand : !!contents.expand,
870
979
  padding : contents.padding,
871
- style : contents.style || 'width: 100%;' + ( CKEDITOR.env.ie6Compat ? '' : 'height: 100%;' )
980
+ style : contents.style || 'width: 100%;height:100%'
872
981
  }, pageHtml );
873
982
 
874
983
  // Create the HTML for the tab and the content block.
@@ -876,7 +985,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
876
985
  page.setAttribute( 'role', 'tabpanel' );
877
986
 
878
987
  var env = CKEDITOR.env;
879
- var tabId = contents.id + '_' + CKEDITOR.tools.getNextNumber(),
988
+ var tabId = 'cke_' + contents.id + '_' + CKEDITOR.tools.getNextNumber(),
880
989
  tab = CKEDITOR.dom.element.createFromHtml( [
881
990
  '<a class="cke_dialog_tab"',
882
991
  ( this._.pageCount > 0 ? ' cke_last' : 'cke_first' ),
@@ -893,17 +1002,12 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
893
1002
 
894
1003
  page.setAttribute( 'aria-labelledby', tabId );
895
1004
 
896
- // If only a single page exist, a different style is used in the central pane.
897
- if ( this._.pageCount === 0 )
898
- this.parts.dialog.addClass( 'cke_single_page' );
899
- else
900
- this.parts.dialog.removeClass( 'cke_single_page' );
901
-
902
1005
  // Take records for the tabs and elements created.
903
1006
  this._.tabs[ contents.id ] = [ tab, page ];
904
1007
  this._.tabIdList.push( contents.id );
905
- this._.pageCount++;
1008
+ !contents.hidden && this._.pageCount++;
906
1009
  this._.lastTab = tab;
1010
+ this.updateStyle();
907
1011
 
908
1012
  var contentMap = this._.contents[ contents.id ] = {},
909
1013
  cursor,
@@ -941,6 +1045,13 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
941
1045
  */
942
1046
  selectPage : function( id )
943
1047
  {
1048
+ if ( this._.currentTabId == id )
1049
+ return;
1050
+
1051
+ // Returning true means that the event has been canceled
1052
+ if ( this.fire( 'selectPage', { page : id, currentPage : this._.currentTabId } ) === true )
1053
+ return;
1054
+
944
1055
  // Hide the non-selected tabs and pages.
945
1056
  for ( var i in this._.tabs )
946
1057
  {
@@ -954,13 +1065,35 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
954
1065
  page.setAttribute( 'aria-hidden', i != id );
955
1066
  }
956
1067
 
957
- var selected = this._.tabs[id];
958
- selected[0].addClass( 'cke_dialog_tab_selected' );
959
- selected[1].show();
1068
+ var selected = this._.tabs[ id ];
1069
+ selected[ 0 ].addClass( 'cke_dialog_tab_selected' );
1070
+
1071
+ // [IE] an invisible input[type='text'] will enlarge it's width
1072
+ // if it's value is long when it shows, so we clear it's value
1073
+ // before it shows and then recover it (#5649)
1074
+ if ( CKEDITOR.env.ie6Compat || CKEDITOR.env.ie7Compat )
1075
+ {
1076
+ clearOrRecoverTextInputValue( selected[ 1 ] );
1077
+ selected[ 1 ].show();
1078
+ setTimeout( function()
1079
+ {
1080
+ clearOrRecoverTextInputValue( selected[ 1 ], 1 );
1081
+ }, 0 );
1082
+ }
1083
+ else
1084
+ selected[ 1 ].show();
1085
+
960
1086
  this._.currentTabId = id;
961
1087
  this._.currentTabIndex = CKEDITOR.tools.indexOf( this._.tabIdList, id );
962
1088
  },
963
1089
 
1090
+ // Dialog state-specific style updates.
1091
+ updateStyle : function()
1092
+ {
1093
+ // If only a single page shown, a different style is used in the central pane.
1094
+ this.parts.dialog[ ( this._.pageCount === 1 ? 'add' : 'remove' ) + 'Class' ]( 'cke_single_page' );
1095
+ },
1096
+
964
1097
  /**
965
1098
  * Hides a page's tab away from the dialog.
966
1099
  * @param {String} id The page's Id.
@@ -970,9 +1103,15 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
970
1103
  hidePage : function( id )
971
1104
  {
972
1105
  var tab = this._.tabs[id] && this._.tabs[id][0];
973
- if ( !tab )
1106
+ if ( !tab || this._.pageCount == 1 || !tab.isVisible() )
974
1107
  return;
1108
+ // Switch to other tab first when we're hiding the active tab.
1109
+ else if ( id == this._.currentTabId )
1110
+ this.selectPage( getPreviousVisibleTab.call( this ) );
1111
+
975
1112
  tab.hide();
1113
+ this._.pageCount--;
1114
+ this.updateStyle();
976
1115
  },
977
1116
 
978
1117
  /**
@@ -987,6 +1126,8 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
987
1126
  if ( !tab )
988
1127
  return;
989
1128
  tab.show();
1129
+ this._.pageCount++;
1130
+ this.updateStyle();
990
1131
  },
991
1132
 
992
1133
  /**
@@ -1017,6 +1158,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1017
1158
  * @param {String} pageId id of dialog page.
1018
1159
  * @param {String} elementId id of UI element.
1019
1160
  * @example
1161
+ * dialogObj.getContentElement( 'tabId', 'elementId' ).setValue( 'Example' );
1020
1162
  * @returns {CKEDITOR.ui.dialog.uiElement} The dialog UI element.
1021
1163
  */
1022
1164
  getContentElement : function( pageId, elementId )
@@ -1030,6 +1172,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1030
1172
  * @param {String} pageId id of dialog page.
1031
1173
  * @param {String} elementId id of UI element.
1032
1174
  * @example
1175
+ * alert( dialogObj.getValueOf( 'tabId', 'elementId' ) );
1033
1176
  * @returns {Object} The value of the UI element.
1034
1177
  */
1035
1178
  getValueOf : function( pageId, elementId )
@@ -1043,6 +1186,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1043
1186
  * @param {String} elementId id of the UI element.
1044
1187
  * @param {Object} value The new value of the UI element.
1045
1188
  * @example
1189
+ * dialogObj.setValueOf( 'tabId', 'elementId', 'Example' );
1046
1190
  */
1047
1191
  setValueOf : function( pageId, elementId, value )
1048
1192
  {
@@ -1150,9 +1294,77 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1150
1294
  * @param {Function|String} dialogDefinition
1151
1295
  * A function returning the dialog's definition, or the URL to the .js file holding the function.
1152
1296
  * The function should accept an argument "editor" which is the current editor instance, and
1153
- * return an object conforming to {@link CKEDITOR.dialog.dialogDefinition}.
1297
+ * return an object conforming to {@link CKEDITOR.dialog.definition}.
1298
+ * @see CKEDITOR.dialog.definition
1154
1299
  * @example
1155
- * @see CKEDITOR.dialog.dialogDefinition
1300
+ * // Full sample plugin, which does not only register a dialog window but also adds an item to the context menu.
1301
+ * // To open the dialog window, choose "Open dialog" in the context menu.
1302
+ * CKEDITOR.plugins.add( 'myplugin',
1303
+ * {
1304
+ * init: function( editor )
1305
+ * {
1306
+ * editor.addCommand( 'mydialog',new CKEDITOR.dialogCommand( 'mydialog' ) );
1307
+ *
1308
+ * if ( editor.contextMenu )
1309
+ * {
1310
+ * editor.addMenuGroup( 'mygroup', 10 );
1311
+ * editor.addMenuItem( 'My Dialog',
1312
+ * {
1313
+ * label : 'Open dialog',
1314
+ * command : 'mydialog',
1315
+ * group : 'mygroup'
1316
+ * });
1317
+ * editor.contextMenu.addListener( function( element )
1318
+ * {
1319
+ * return { 'My Dialog' : CKEDITOR.TRISTATE_OFF };
1320
+ * });
1321
+ * }
1322
+ *
1323
+ * <strong>CKEDITOR.dialog.add</strong>( 'mydialog', function( api )
1324
+ * {
1325
+ * // CKEDITOR.dialog.definition
1326
+ * var <strong>dialogDefinition</strong> =
1327
+ * {
1328
+ * title : 'Sample dialog',
1329
+ * minWidth : 390,
1330
+ * minHeight : 130,
1331
+ * contents : [
1332
+ * {
1333
+ * id : 'tab1',
1334
+ * label : 'Label',
1335
+ * title : 'Title',
1336
+ * expand : true,
1337
+ * padding : 0,
1338
+ * elements :
1339
+ * [
1340
+ * {
1341
+ * type : 'html',
1342
+ * html : '&lt;p&gt;This is some sample HTML content.&lt;/p&gt;'
1343
+ * },
1344
+ * {
1345
+ * type : 'textarea',
1346
+ * id : 'textareaId',
1347
+ * rows : 4,
1348
+ * cols : 40
1349
+ * }
1350
+ * ]
1351
+ * }
1352
+ * ],
1353
+ * buttons : [ CKEDITOR.dialog.okButton, CKEDITOR.dialog.cancelButton ],
1354
+ * onOk : function() {
1355
+ * // "this" is now a CKEDITOR.dialog object.
1356
+ * // Accessing dialog elements:
1357
+ * var textareaObj = this.<strong>getContentElement</strong>( 'tab1', 'textareaId' );
1358
+ * alert( "You have entered: " + textareaObj.getValue() );
1359
+ * }
1360
+ * };
1361
+ *
1362
+ * return dialogDefinition;
1363
+ * } );
1364
+ * }
1365
+ * } );
1366
+ *
1367
+ * CKEDITOR.replace( 'editor1', { extraPlugins : 'myplugin' } );
1156
1368
  */
1157
1369
  add : function( name, dialogDefinition )
1158
1370
  {
@@ -1269,7 +1481,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1269
1481
 
1270
1482
  var defaultDialogDefinition =
1271
1483
  {
1272
- resizable : CKEDITOR.DIALOG_RESIZE_NONE,
1484
+ resizable : CKEDITOR.DIALOG_RESIZE_BOTH,
1273
1485
  minWidth : 600,
1274
1486
  minHeight : 400,
1275
1487
  buttons : [ CKEDITOR.dialog.okButton, CKEDITOR.dialog.cancelButton ]
@@ -1343,8 +1555,8 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1343
1555
  * This class is not really part of the API. It is the "definition" property value
1344
1556
  * passed to "dialogDefinition" event handlers.
1345
1557
  * @constructor
1346
- * @name CKEDITOR.dialog.dialogDefinitionObject
1347
- * @extends CKEDITOR.dialog.dialogDefinition
1558
+ * @name CKEDITOR.dialog.definitionObject
1559
+ * @extends CKEDITOR.dialog.definition
1348
1560
  * @example
1349
1561
  * CKEDITOR.on( 'dialogDefinition', function( evt )
1350
1562
  * {
@@ -1361,18 +1573,18 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1361
1573
  // Transform the contents entries in contentObjects.
1362
1574
  var contents = dialogDefinition.contents;
1363
1575
  for ( var i = 0, content ; ( content = contents[i] ) ; i++ )
1364
- contents[ i ] = new contentObject( dialog, content );
1576
+ contents[ i ] = content && new contentObject( dialog, content );
1365
1577
 
1366
1578
  CKEDITOR.tools.extend( this, dialogDefinition );
1367
1579
  };
1368
1580
 
1369
1581
  definitionObject.prototype =
1370
- /** @lends CKEDITOR.dialog.dialogDefinitionObject.prototype */
1582
+ /** @lends CKEDITOR.dialog.definitionObject.prototype */
1371
1583
  {
1372
1584
  /**
1373
1585
  * Gets a content definition.
1374
1586
  * @param {String} id The id of the content definition.
1375
- * @returns {CKEDITOR.dialog.contentDefinition} The content definition
1587
+ * @returns {CKEDITOR.dialog.definition.content} The content definition
1376
1588
  * matching id.
1377
1589
  */
1378
1590
  getContents : function( id )
@@ -1383,7 +1595,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1383
1595
  /**
1384
1596
  * Gets a button definition.
1385
1597
  * @param {String} id The id of the button definition.
1386
- * @returns {CKEDITOR.dialog.buttonDefinition} The button definition
1598
+ * @returns {CKEDITOR.dialog.definition.button} The button definition
1387
1599
  * matching id.
1388
1600
  */
1389
1601
  getButton : function( id )
@@ -1393,13 +1605,13 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1393
1605
 
1394
1606
  /**
1395
1607
  * Adds a content definition object under this dialog definition.
1396
- * @param {CKEDITOR.dialog.contentDefinition} contentDefinition The
1608
+ * @param {CKEDITOR.dialog.definition.content} contentDefinition The
1397
1609
  * content definition.
1398
1610
  * @param {String} [nextSiblingId] The id of an existing content
1399
1611
  * definition which the new content definition will be inserted
1400
1612
  * before. Omit if the new content definition is to be inserted as
1401
1613
  * the last item.
1402
- * @returns {CKEDITOR.dialog.contentDefinition} The inserted content
1614
+ * @returns {CKEDITOR.dialog.definition.content} The inserted content
1403
1615
  * definition.
1404
1616
  */
1405
1617
  addContents : function( contentDefinition, nextSiblingId )
@@ -1409,13 +1621,13 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1409
1621
 
1410
1622
  /**
1411
1623
  * Adds a button definition object under this dialog definition.
1412
- * @param {CKEDITOR.dialog.buttonDefinition} buttonDefinition The
1624
+ * @param {CKEDITOR.dialog.definition.button} buttonDefinition The
1413
1625
  * button definition.
1414
1626
  * @param {String} [nextSiblingId] The id of an existing button
1415
1627
  * definition which the new button definition will be inserted
1416
1628
  * before. Omit if the new button definition is to be inserted as
1417
1629
  * the last item.
1418
- * @returns {CKEDITOR.dialog.buttonDefinition} The inserted button
1630
+ * @returns {CKEDITOR.dialog.definition.button} The inserted button
1419
1631
  * definition.
1420
1632
  */
1421
1633
  addButton : function( buttonDefinition, nextSiblingId )
@@ -1426,7 +1638,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1426
1638
  /**
1427
1639
  * Removes a content definition from this dialog definition.
1428
1640
  * @param {String} id The id of the content definition to be removed.
1429
- * @returns {CKEDITOR.dialog.contentDefinition} The removed content
1641
+ * @returns {CKEDITOR.dialog.definition.content} The removed content
1430
1642
  * definition.
1431
1643
  */
1432
1644
  removeContents : function( id )
@@ -1437,7 +1649,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1437
1649
  /**
1438
1650
  * Removes a button definition from the dialog definition.
1439
1651
  * @param {String} id The id of the button definition to be removed.
1440
- * @returns {CKEDITOR.dialog.buttonDefinition} The removed button
1652
+ * @returns {CKEDITOR.dialog.definition.button} The removed button
1441
1653
  * definition.
1442
1654
  */
1443
1655
  removeButton : function( id )
@@ -1449,9 +1661,9 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1449
1661
  /**
1450
1662
  * This class is not really part of the API. It is the template of the
1451
1663
  * objects representing content pages inside the
1452
- * CKEDITOR.dialog.dialogDefinitionObject.
1664
+ * CKEDITOR.dialog.definitionObject.
1453
1665
  * @constructor
1454
- * @name CKEDITOR.dialog.contentDefinitionObject
1666
+ * @name CKEDITOR.dialog.definition.contentObject
1455
1667
  * @example
1456
1668
  * CKEDITOR.on( 'dialogDefinition', function( evt )
1457
1669
  * {
@@ -1472,12 +1684,12 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1472
1684
  }
1473
1685
 
1474
1686
  contentObject.prototype =
1475
- /** @lends CKEDITOR.dialog.contentDefinitionObject.prototype */
1687
+ /** @lends CKEDITOR.dialog.definition.contentObject.prototype */
1476
1688
  {
1477
1689
  /**
1478
1690
  * Gets a UI element definition under the content definition.
1479
1691
  * @param {String} id The id of the UI element definition.
1480
- * @returns {CKEDITOR.dialog.uiElementDefinition}
1692
+ * @returns {CKEDITOR.dialog.definition.uiElement}
1481
1693
  */
1482
1694
  get : function( id )
1483
1695
  {
@@ -1486,13 +1698,13 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1486
1698
 
1487
1699
  /**
1488
1700
  * Adds a UI element definition to the content definition.
1489
- * @param {CKEDITOR.dialog.uiElementDefinition} elementDefinition The
1701
+ * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition The
1490
1702
  * UI elemnet definition to be added.
1491
1703
  * @param {String} nextSiblingId The id of an existing UI element
1492
1704
  * definition which the new UI element definition will be inserted
1493
1705
  * before. Omit if the new button definition is to be inserted as
1494
1706
  * the last item.
1495
- * @returns {CKEDITOR.dialog.uiElementDefinition} The element
1707
+ * @returns {CKEDITOR.dialog.definition.uiElement} The element
1496
1708
  * definition inserted.
1497
1709
  */
1498
1710
  add : function( elementDefinition, nextSiblingId )
@@ -1504,7 +1716,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1504
1716
  * Removes a UI element definition from the content definition.
1505
1717
  * @param {String} id The id of the UI element definition to be
1506
1718
  * removed.
1507
- * @returns {CKEDITOR.dialog.uiElementDefinition} The element
1719
+ * @returns {CKEDITOR.dialog.definition.uiElement} The element
1508
1720
  * definition removed.
1509
1721
  * @example
1510
1722
  */
@@ -1543,7 +1755,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1543
1755
  if ( abstractDialogCoords.x + margins[3] < magnetDistance )
1544
1756
  realX = - margins[3];
1545
1757
  else if ( abstractDialogCoords.x - margins[1] > viewPaneSize.width - dialogSize.width - magnetDistance )
1546
- realX = viewPaneSize.width - dialogSize.width + margins[1];
1758
+ realX = viewPaneSize.width - dialogSize.width + ( editor.lang.dir == 'rtl' ? 0 : margins[1] );
1547
1759
  else
1548
1760
  realX = abstractDialogCoords.x;
1549
1761
 
@@ -1554,7 +1766,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1554
1766
  else
1555
1767
  realY = abstractDialogCoords.y;
1556
1768
 
1557
- dialog.move( realX, realY );
1769
+ dialog.move( realX, realY, 1 );
1558
1770
 
1559
1771
  evt.data.preventDefault();
1560
1772
  }
@@ -1566,7 +1778,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1566
1778
 
1567
1779
  if ( CKEDITOR.env.ie6Compat )
1568
1780
  {
1569
- var coverDoc = coverElement.getChild( 0 ).getFrameDocument();
1781
+ var coverDoc = currentCover.getChild( 0 ).getFrameDocument();
1570
1782
  coverDoc.removeListener( 'mousemove', mouseMoveHandler );
1571
1783
  coverDoc.removeListener( 'mouseup', mouseUpHandler );
1572
1784
  }
@@ -1574,8 +1786,6 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1574
1786
 
1575
1787
  dialog.parts.title.on( 'mousedown', function( evt )
1576
1788
  {
1577
- dialog._.updateSize = true;
1578
-
1579
1789
  lastCoords = { x : evt.data.$.screenX, y : evt.data.$.screenY };
1580
1790
 
1581
1791
  CKEDITOR.document.on( 'mousemove', mouseMoveHandler );
@@ -1584,7 +1794,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1584
1794
 
1585
1795
  if ( CKEDITOR.env.ie6Compat )
1586
1796
  {
1587
- var coverDoc = coverElement.getChild( 0 ).getFrameDocument();
1797
+ var coverDoc = currentCover.getChild( 0 ).getFrameDocument();
1588
1798
  coverDoc.on( 'mousemove', mouseMoveHandler );
1589
1799
  coverDoc.on( 'mouseup', mouseUpHandler );
1590
1800
  }
@@ -1595,167 +1805,156 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1595
1805
 
1596
1806
  function initResizeHandles( dialog )
1597
1807
  {
1598
- var definition = dialog.definition,
1599
- minWidth = definition.minWidth || 0,
1600
- minHeight = definition.minHeight || 0,
1601
- resizable = definition.resizable,
1602
- margins = dialog.getParentEditor().skin.margins || [ 0, 0, 0, 0 ];
1808
+ var def = dialog.definition,
1809
+ resizable = def.resizable;
1603
1810
 
1604
- function topSizer( coords, dy )
1605
- {
1606
- coords.y += dy;
1607
- }
1811
+ if ( resizable == CKEDITOR.DIALOG_RESIZE_NONE )
1812
+ return;
1608
1813
 
1609
- function rightSizer( coords, dx )
1610
- {
1611
- coords.x2 += dx;
1612
- }
1814
+ var editor = dialog.getParentEditor();
1815
+ var wrapperWidth, wrapperHeight,
1816
+ viewSize, origin, startSize,
1817
+ dialogCover;
1613
1818
 
1614
- function bottomSizer( coords, dy )
1819
+ var mouseDownFn = CKEDITOR.tools.addFunction( function( $event )
1615
1820
  {
1616
- coords.y2 += dy;
1617
- }
1821
+ startSize = dialog.getSize();
1618
1822
 
1619
- function leftSizer( coords, dx )
1620
- {
1621
- coords.x += dx;
1622
- }
1823
+ var content = dialog.parts.contents,
1824
+ iframeDialog = content.$.getElementsByTagName( 'iframe' ).length;
1623
1825
 
1624
- var lastCoords = null,
1625
- abstractDialogCoords = null,
1626
- magnetDistance = dialog._.editor.config.magnetDistance,
1627
- parts = [ 'tl', 't', 'tr', 'l', 'r', 'bl', 'b', 'br' ];
1826
+ // Shim to help capturing "mousemove" over iframe.
1827
+ if ( iframeDialog )
1828
+ {
1829
+ dialogCover = CKEDITOR.dom.element.createFromHtml( '<div class="cke_dialog_resize_cover" style="height: 100%; position: absolute; width: 100%;"></div>' );
1830
+ content.append( dialogCover );
1831
+ }
1628
1832
 
1629
- function mouseDownHandler( evt )
1630
- {
1631
- var partName = evt.listenerData.part, size = dialog.getSize();
1632
- abstractDialogCoords = dialog.getPosition();
1633
- CKEDITOR.tools.extend( abstractDialogCoords,
1634
- {
1635
- x2 : abstractDialogCoords.x + size.width,
1636
- y2 : abstractDialogCoords.y + size.height
1637
- } );
1638
- lastCoords = { x : evt.data.$.screenX, y : evt.data.$.screenY };
1833
+ // Calculate the offset between content and chrome size.
1834
+ wrapperHeight = startSize.height - dialog.parts.contents.getSize( 'height', ! ( CKEDITOR.env.gecko || CKEDITOR.env.opera || CKEDITOR.env.ie && CKEDITOR.env.quirks ) );
1835
+ wrapperWidth = startSize.width - dialog.parts.contents.getSize( 'width', 1 );
1836
+
1837
+ origin = { x : $event.screenX, y : $event.screenY };
1838
+
1839
+ viewSize = CKEDITOR.document.getWindow().getViewPaneSize();
1639
1840
 
1640
- CKEDITOR.document.on( 'mousemove', mouseMoveHandler, dialog, { part : partName } );
1641
- CKEDITOR.document.on( 'mouseup', mouseUpHandler, dialog, { part : partName } );
1841
+ CKEDITOR.document.on( 'mousemove', mouseMoveHandler );
1842
+ CKEDITOR.document.on( 'mouseup', mouseUpHandler );
1642
1843
 
1643
1844
  if ( CKEDITOR.env.ie6Compat )
1644
1845
  {
1645
- var coverDoc = coverElement.getChild( 0 ).getFrameDocument();
1646
- coverDoc.on( 'mousemove', mouseMoveHandler, dialog, { part : partName } );
1647
- coverDoc.on( 'mouseup', mouseUpHandler, dialog, { part : partName } );
1846
+ var coverDoc = currentCover.getChild( 0 ).getFrameDocument();
1847
+ coverDoc.on( 'mousemove', mouseMoveHandler );
1848
+ coverDoc.on( 'mouseup', mouseUpHandler );
1648
1849
  }
1649
1850
 
1650
- evt.data.preventDefault();
1651
- }
1851
+ $event.preventDefault && $event.preventDefault();
1852
+ });
1853
+
1854
+ // Prepend the grip to the dialog.
1855
+ dialog.on( 'load', function()
1856
+ {
1857
+ var direction = '';
1858
+ if ( resizable == CKEDITOR.DIALOG_RESIZE_WIDTH )
1859
+ direction = ' cke_resizer_horizontal';
1860
+ else if ( resizable == CKEDITOR.DIALOG_RESIZE_HEIGHT )
1861
+ direction = ' cke_resizer_vertical';
1862
+ var resizer = CKEDITOR.dom.element.createFromHtml( '<div' +
1863
+ ' class="cke_resizer' + direction + ' cke_resizer_' + editor.lang.dir + '"' +
1864
+ ' title="' + CKEDITOR.tools.htmlEncode( editor.lang.resize ) + '"' +
1865
+ ' onmousedown="CKEDITOR.tools.callFunction(' + mouseDownFn + ', event )"></div>' );
1866
+ dialog.parts.footer.append( resizer, 1 );
1867
+ });
1868
+ editor.on( 'destroy', function() { CKEDITOR.tools.removeFunction( mouseDownFn ); } );
1652
1869
 
1653
1870
  function mouseMoveHandler( evt )
1654
1871
  {
1655
- var x = evt.data.$.screenX,
1656
- y = evt.data.$.screenY,
1657
- dx = x - lastCoords.x,
1658
- dy = y - lastCoords.y,
1659
- viewPaneSize = CKEDITOR.document.getWindow().getViewPaneSize(),
1660
- partName = evt.listenerData.part;
1872
+ var rtl = editor.lang.dir == 'rtl',
1873
+ dx = ( evt.data.$.screenX - origin.x ) * ( rtl ? -1 : 1 ),
1874
+ dy = evt.data.$.screenY - origin.y,
1875
+ width = startSize.width,
1876
+ height = startSize.height,
1877
+ internalWidth = width + dx * ( dialog._.moved ? 1 : 2 ),
1878
+ internalHeight = height + dy * ( dialog._.moved ? 1 : 2 ),
1879
+ element = dialog._.element.getFirst(),
1880
+ right = rtl && element.getComputedStyle( 'right' ),
1881
+ position = dialog.getPosition();
1661
1882
 
1662
- if ( partName.search( 't' ) != -1 )
1663
- topSizer( abstractDialogCoords, dy );
1664
- if ( partName.search( 'l' ) != -1 )
1665
- leftSizer( abstractDialogCoords, dx );
1666
- if ( partName.search( 'b' ) != -1 )
1667
- bottomSizer( abstractDialogCoords, dy );
1668
- if ( partName.search( 'r' ) != -1 )
1669
- rightSizer( abstractDialogCoords, dx );
1883
+ if ( position.y + internalHeight > viewSize.height )
1884
+ internalHeight = viewSize.height - position.y;
1670
1885
 
1671
- lastCoords = { x : x, y : y };
1672
-
1673
- var realX, realY, realX2, realY2;
1674
-
1675
- if ( abstractDialogCoords.x + margins[3] < magnetDistance )
1676
- realX = - margins[3];
1677
- else if ( partName.search( 'l' ) != -1 && abstractDialogCoords.x2 - abstractDialogCoords.x < minWidth + magnetDistance )
1678
- realX = abstractDialogCoords.x2 - minWidth;
1679
- else
1680
- realX = abstractDialogCoords.x;
1886
+ if ( ( rtl ? right : position.x ) + internalWidth > viewSize.width )
1887
+ internalWidth = viewSize.width - ( rtl ? right : position.x );
1681
1888
 
1682
- if ( abstractDialogCoords.y + margins[0] < magnetDistance )
1683
- realY = - margins[0];
1684
- else if ( partName.search( 't' ) != -1 && abstractDialogCoords.y2 - abstractDialogCoords.y < minHeight + magnetDistance )
1685
- realY = abstractDialogCoords.y2 - minHeight;
1686
- else
1687
- realY = abstractDialogCoords.y;
1889
+ // Make sure the dialog will not be resized to the wrong side when it's in the leftmost position for RTL.
1890
+ if ( ( resizable == CKEDITOR.DIALOG_RESIZE_WIDTH || resizable == CKEDITOR.DIALOG_RESIZE_BOTH ) )
1891
+ width = Math.max( def.minWidth || 0, internalWidth - wrapperWidth );
1688
1892
 
1689
- if ( abstractDialogCoords.x2 - margins[1] > viewPaneSize.width - magnetDistance )
1690
- realX2 = viewPaneSize.width + margins[1] ;
1691
- else if ( partName.search( 'r' ) != -1 && abstractDialogCoords.x2 - abstractDialogCoords.x < minWidth + magnetDistance )
1692
- realX2 = abstractDialogCoords.x + minWidth;
1693
- else
1694
- realX2 = abstractDialogCoords.x2;
1893
+ if ( resizable == CKEDITOR.DIALOG_RESIZE_HEIGHT || resizable == CKEDITOR.DIALOG_RESIZE_BOTH )
1894
+ height = Math.max( def.minHeight || 0, internalHeight - wrapperHeight );
1695
1895
 
1696
- if ( abstractDialogCoords.y2 - margins[2] > viewPaneSize.height - magnetDistance )
1697
- realY2= viewPaneSize.height + margins[2] ;
1698
- else if ( partName.search( 'b' ) != -1 && abstractDialogCoords.y2 - abstractDialogCoords.y < minHeight + magnetDistance )
1699
- realY2 = abstractDialogCoords.y + minHeight;
1700
- else
1701
- realY2 = abstractDialogCoords.y2 ;
1896
+ dialog.resize( width, height );
1702
1897
 
1703
- dialog.move( realX, realY );
1704
- dialog.resize( realX2 - realX, realY2 - realY );
1898
+ if ( !dialog._.moved )
1899
+ dialog.layout();
1705
1900
 
1706
1901
  evt.data.preventDefault();
1707
1902
  }
1708
1903
 
1709
- function mouseUpHandler( evt )
1904
+ function mouseUpHandler()
1710
1905
  {
1711
1906
  CKEDITOR.document.removeListener( 'mouseup', mouseUpHandler );
1712
1907
  CKEDITOR.document.removeListener( 'mousemove', mouseMoveHandler );
1713
1908
 
1909
+ if ( dialogCover )
1910
+ {
1911
+ dialogCover.remove();
1912
+ dialogCover = null;
1913
+ }
1914
+
1714
1915
  if ( CKEDITOR.env.ie6Compat )
1715
1916
  {
1716
- var coverDoc = coverElement.getChild( 0 ).getFrameDocument();
1917
+ var coverDoc = currentCover.getChild( 0 ).getFrameDocument();
1717
1918
  coverDoc.removeListener( 'mouseup', mouseUpHandler );
1718
1919
  coverDoc.removeListener( 'mousemove', mouseMoveHandler );
1719
1920
  }
1720
1921
  }
1721
-
1722
- // TODO : Simplify the resize logic, having just a single resize grip <div>.
1723
- // var widthTest = /[lr]/,
1724
- // heightTest = /[tb]/;
1725
- // for ( var i = 0 ; i < parts.length ; i++ )
1726
- // {
1727
- // var element = dialog.parts[ parts[i] + '_resize' ];
1728
- // if ( resizable == CKEDITOR.DIALOG_RESIZE_NONE ||
1729
- // resizable == CKEDITOR.DIALOG_RESIZE_HEIGHT && widthTest.test( parts[i] ) ||
1730
- // resizable == CKEDITOR.DIALOG_RESIZE_WIDTH && heightTest.test( parts[i] ) )
1731
- // {
1732
- // element.hide();
1733
- // continue;
1734
- // }
1735
- // element.on( 'mousedown', mouseDownHandler, dialog, { part : parts[i] } );
1736
- // }
1737
1922
  }
1738
1923
 
1739
1924
  var resizeCover;
1740
- var coverElement;
1925
+ // Caching resuable covers and allowing only one cover
1926
+ // on screen.
1927
+ var covers = {},
1928
+ currentCover;
1929
+
1930
+ function cancelEvent( ev )
1931
+ {
1932
+ ev.data.preventDefault(1);
1933
+ }
1741
1934
 
1742
- var addCover = function( editor )
1935
+ function showCover( editor )
1743
1936
  {
1744
1937
  var win = CKEDITOR.document.getWindow();
1938
+ var config = editor.config,
1939
+ backgroundColorStyle = config.dialog_backgroundCoverColor || 'white',
1940
+ backgroundCoverOpacity = config.dialog_backgroundCoverOpacity,
1941
+ baseFloatZIndex = config.baseFloatZIndex,
1942
+ coverKey = CKEDITOR.tools.genKey(
1943
+ backgroundColorStyle,
1944
+ backgroundCoverOpacity,
1945
+ baseFloatZIndex ),
1946
+ coverElement = covers[ coverKey ];
1745
1947
 
1746
1948
  if ( !coverElement )
1747
1949
  {
1748
- var backgroundColorStyle = editor.config.dialog_backgroundCoverColor || 'white';
1749
-
1750
1950
  var html = [
1751
- '<div style="position: ', ( CKEDITOR.env.ie6Compat ? 'absolute' : 'fixed' ),
1752
- '; z-index: ', editor.config.baseFloatZIndex,
1951
+ '<div tabIndex="-1" style="position: ', ( CKEDITOR.env.ie6Compat ? 'absolute' : 'fixed' ),
1952
+ '; z-index: ', baseFloatZIndex,
1753
1953
  '; top: 0px; left: 0px; ',
1754
1954
  ( !CKEDITOR.env.ie6Compat ? 'background-color: ' + backgroundColorStyle : '' ),
1755
- '" id="cke_dialog_background_cover">'
1955
+ '" class="cke_dialog_background_cover">'
1756
1956
  ];
1757
1957
 
1758
-
1759
1958
  if ( CKEDITOR.env.ie6Compat )
1760
1959
  {
1761
1960
  // Support for custom document.domain in IE.
@@ -1791,14 +1990,23 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1791
1990
  html.push( '</div>' );
1792
1991
 
1793
1992
  coverElement = CKEDITOR.dom.element.createFromHtml( html.join( '' ) );
1794
- }
1993
+ coverElement.setOpacity( backgroundCoverOpacity != undefined ? backgroundCoverOpacity : 0.5 );
1795
1994
 
1796
- var element = coverElement;
1995
+ coverElement.on( 'keydown', cancelEvent );
1996
+ coverElement.on( 'keypress', cancelEvent );
1997
+ coverElement.on( 'keyup', cancelEvent );
1797
1998
 
1999
+ coverElement.appendTo( CKEDITOR.document.getBody() );
2000
+ covers[ coverKey ] = coverElement;
2001
+ }
2002
+ else
2003
+ coverElement. show();
2004
+
2005
+ currentCover = coverElement;
1798
2006
  var resizeFunc = function()
1799
2007
  {
1800
2008
  var size = win.getViewPaneSize();
1801
- element.setStyles(
2009
+ coverElement.setStyles(
1802
2010
  {
1803
2011
  width : size.width + 'px',
1804
2012
  height : size.height + 'px'
@@ -1809,22 +2017,29 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1809
2017
  {
1810
2018
  var pos = win.getScrollPosition(),
1811
2019
  cursor = CKEDITOR.dialog._.currentTop;
1812
- element.setStyles(
2020
+ coverElement.setStyles(
1813
2021
  {
1814
2022
  left : pos.x + 'px',
1815
2023
  top : pos.y + 'px'
1816
2024
  });
1817
2025
 
1818
- do
2026
+ if ( cursor )
1819
2027
  {
1820
- var dialogPos = cursor.getPosition();
1821
- cursor.move( dialogPos.x, dialogPos.y );
1822
- } while ( ( cursor = cursor._.parentDialog ) );
2028
+ do
2029
+ {
2030
+ var dialogPos = cursor.getPosition();
2031
+ cursor.move( dialogPos.x, dialogPos.y );
2032
+ } while ( ( cursor = cursor._.parentDialog ) );
2033
+ }
1823
2034
  };
1824
2035
 
1825
2036
  resizeCover = resizeFunc;
1826
2037
  win.on( 'resize', resizeFunc );
1827
2038
  resizeFunc();
2039
+ // Using Safari/Mac, focus must be kept where it is (#7027)
2040
+ if ( !( CKEDITOR.env.mac && CKEDITOR.env.webkit ) )
2041
+ coverElement.focus();
2042
+
1828
2043
  if ( CKEDITOR.env.ie6Compat )
1829
2044
  {
1830
2045
  // IE BUG: win.$.onscroll assignment doesn't work.. it must be window.onscroll.
@@ -1841,20 +2056,15 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1841
2056
  }, 0 );
1842
2057
  scrollFunc();
1843
2058
  }
2059
+ }
1844
2060
 
1845
- var opacity = editor.config.dialog_backgroundCoverOpacity;
1846
- element.setOpacity( typeof opacity != 'undefined' ? opacity : 0.5 );
1847
-
1848
- element.appendTo( CKEDITOR.document.getBody() );
1849
- };
1850
-
1851
- var removeCover = function()
2061
+ function hideCover()
1852
2062
  {
1853
- if ( !coverElement )
2063
+ if ( !currentCover )
1854
2064
  return;
1855
2065
 
1856
2066
  var win = CKEDITOR.document.getWindow();
1857
- coverElement.remove();
2067
+ currentCover.hide();
1858
2068
  win.removeListener( 'resize', resizeCover );
1859
2069
 
1860
2070
  if ( CKEDITOR.env.ie6Compat )
@@ -1866,7 +2076,14 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1866
2076
  }, 0 );
1867
2077
  }
1868
2078
  resizeCover = null;
1869
- };
2079
+ }
2080
+
2081
+ function removeCovers()
2082
+ {
2083
+ for ( var coverId in covers )
2084
+ covers[ coverId ].remove();
2085
+ covers = {};
2086
+ }
1870
2087
 
1871
2088
  var accessKeyProcessors = {};
1872
2089
 
@@ -1958,7 +2175,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
1958
2175
  * The base class of all dialog UI elements.
1959
2176
  * @constructor
1960
2177
  * @param {CKEDITOR.dialog} dialog Parent dialog object.
1961
- * @param {CKEDITOR.dialog.uiElementDefinition} elementDefinition Element
2178
+ * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition Element
1962
2179
  * definition. Accepted fields:
1963
2180
  * <ul>
1964
2181
  * <li><strong>id</strong> (Required) The id of the UI element. See {@link
@@ -2011,7 +2228,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
2011
2228
  styles = ( stylesArg && stylesArg.call ? stylesArg( elementDefinition ) : stylesArg ) || {},
2012
2229
  attributes = ( attributesArg && attributesArg.call ? attributesArg( elementDefinition ) : attributesArg ) || {},
2013
2230
  innerHTML = ( contentsArg && contentsArg.call ? contentsArg.call( this, dialog, elementDefinition ) : contentsArg ) || '',
2014
- domId = this.domId = attributes.id || CKEDITOR.tools.getNextNumber() + '_uiElement',
2231
+ domId = this.domId = attributes.id || CKEDITOR.tools.getNextId() + '_uiElement',
2015
2232
  id = this.id = elementDefinition.id,
2016
2233
  i;
2017
2234
 
@@ -2024,6 +2241,9 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
2024
2241
  classes[ 'cke_dialog_ui_' + elementDefinition.type ] = 1;
2025
2242
  if ( elementDefinition.className )
2026
2243
  classes[ elementDefinition.className ] = 1;
2244
+ if ( elementDefinition.disabled )
2245
+ classes[ 'cke_disabled' ] = 1;
2246
+
2027
2247
  var attributeClasses = ( attributes['class'] && attributes['class'].split ) ? attributes['class'].split( ' ' ) : [];
2028
2248
  for ( i = 0 ; i < attributeClasses.length ; i++ )
2029
2249
  {
@@ -2123,7 +2343,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
2123
2343
  * objects in childObjList.
2124
2344
  * @param {Array} htmlList
2125
2345
  * Array of HTML code that this element will output to.
2126
- * @param {CKEDITOR.dialog.uiElementDefinition} elementDefinition
2346
+ * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition
2127
2347
  * The element definition. Accepted fields:
2128
2348
  * <ul>
2129
2349
  * <li><strong>widths</strong> (Optional) The widths of child cells.</li>
@@ -2163,14 +2383,14 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
2163
2383
  if ( widths )
2164
2384
  {
2165
2385
  if ( widths[i] )
2166
- styles.push( 'width:' + CKEDITOR.tools.cssLength( widths[i] ) );
2386
+ styles.push( 'width:' + cssLength( widths[i] ) );
2167
2387
  }
2168
2388
  else
2169
2389
  styles.push( 'width:' + Math.floor( 100 / childHtmlList.length ) + '%' );
2170
2390
  if ( height )
2171
- styles.push( 'height:' + CKEDITOR.tools.cssLength( height ) );
2391
+ styles.push( 'height:' + cssLength( height ) );
2172
2392
  if ( elementDefinition && elementDefinition.padding != undefined )
2173
- styles.push( 'padding:' + CKEDITOR.tools.cssLength( elementDefinition.padding ) );
2393
+ styles.push( 'padding:' + cssLength( elementDefinition.padding ) );
2174
2394
  if ( styles.length > 0 )
2175
2395
  html.push( 'style="' + styles.join('; ') + '" ' );
2176
2396
  html.push( '>', childHtmlList[i], '</td>' );
@@ -2207,7 +2427,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
2207
2427
  * objects in childObjList.
2208
2428
  * @param {Array} htmlList
2209
2429
  * Array of HTML code that this element will output to.
2210
- * @param {CKEDITOR.dialog.uiElementDefinition} elementDefinition
2430
+ * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition
2211
2431
  * The element definition. Accepted fields:
2212
2432
  * <ul>
2213
2433
  * <li><strong>width</strong> (Optional) The width of the layout.</li>
@@ -2223,7 +2443,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
2223
2443
  */
2224
2444
  vbox : function( dialog, childObjList, childHtmlList, htmlList, elementDefinition )
2225
2445
  {
2226
- if (arguments.length < 3 )
2446
+ if ( arguments.length < 3 )
2227
2447
  return;
2228
2448
 
2229
2449
  this._ || ( this._ = {} );
@@ -2238,7 +2458,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
2238
2458
  html.push( 'style="' );
2239
2459
  if ( elementDefinition && elementDefinition.expand )
2240
2460
  html.push( 'height:100%;' );
2241
- html.push( 'width:' + CKEDITOR.tools.cssLength( width || '100%' ), ';' );
2461
+ html.push( 'width:' + cssLength( width || '100%' ), ';' );
2242
2462
  html.push( '"' );
2243
2463
  html.push( 'align="', CKEDITOR.tools.htmlEncode(
2244
2464
  ( elementDefinition && elementDefinition.align ) || ( dialog.getParentEditor().lang.dir == 'ltr' ? 'left' : 'right' ) ), '" ' );
@@ -2249,13 +2469,13 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
2249
2469
  var styles = [];
2250
2470
  html.push( '<tr><td role="presentation" ' );
2251
2471
  if ( width )
2252
- styles.push( 'width:' + CKEDITOR.tools.cssLength( width || '100%' ) );
2472
+ styles.push( 'width:' + cssLength( width || '100%' ) );
2253
2473
  if ( heights )
2254
- styles.push( 'height:' + CKEDITOR.tools.cssLength( heights[i] ) );
2474
+ styles.push( 'height:' + cssLength( heights[i] ) );
2255
2475
  else if ( elementDefinition && elementDefinition.expand )
2256
2476
  styles.push( 'height:' + Math.floor( 100 / childHtmlList.length ) + '%' );
2257
2477
  if ( elementDefinition && elementDefinition.padding != undefined )
2258
- styles.push( 'padding:' + CKEDITOR.tools.cssLength( elementDefinition.padding ) );
2478
+ styles.push( 'padding:' + cssLength( elementDefinition.padding ) );
2259
2479
  if ( styles.length > 0 )
2260
2480
  html.push( 'style="', styles.join( '; ' ), '" ' );
2261
2481
  html.push( ' class="cke_dialog_ui_vbox_child">', childHtmlList[i], '</td></tr>' );
@@ -2309,14 +2529,15 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
2309
2529
  /**
2310
2530
  * Sets the value of this dialog UI object.
2311
2531
  * @param {Object} value The new value.
2532
+ * @param {Boolean} noChangeEvent Internal commit, to supress 'change' event on this element.
2312
2533
  * @returns {CKEDITOR.dialog.uiElement} The current UI element.
2313
2534
  * @example
2314
2535
  * uiElement.setValue( 'Dingo' );
2315
2536
  */
2316
- setValue : function( value )
2537
+ setValue : function( value, noChangeEvent )
2317
2538
  {
2318
2539
  this.getInputElement().setValue( value );
2319
- this.fire( 'change', { value : value } );
2540
+ !noChangeEvent && this.fire( 'change', { value : value } );
2320
2541
  return this;
2321
2542
  },
2322
2543
 
@@ -2403,7 +2624,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
2403
2624
  * </ol>
2404
2625
  * This function is only called at UI element instantiation, but can
2405
2626
  * be overridded in child classes if they require more flexibility.
2406
- * @param {CKEDITOR.dialog.uiElementDefinition} definition The UI element
2627
+ * @param {CKEDITOR.dialog.definition.uiElement} definition The UI element
2407
2628
  * definition.
2408
2629
  * @returns {CKEDITOR.dialog.uiElement} The current UI element.
2409
2630
  * @example
@@ -2507,7 +2728,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
2507
2728
  */
2508
2729
  disable : function()
2509
2730
  {
2510
- var element = this.getInputElement();
2731
+ var element = this.getElement();
2511
2732
  element.setAttribute( 'disabled', 'true' );
2512
2733
  element.addClass( 'cke_disabled' );
2513
2734
  },
@@ -2518,7 +2739,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
2518
2739
  */
2519
2740
  enable : function()
2520
2741
  {
2521
- var element = this.getInputElement();
2742
+ var element = this.getElement();
2522
2743
  element.removeAttribute( 'disabled' );
2523
2744
  element.removeClass( 'cke_disabled' );
2524
2745
  },
@@ -2646,7 +2867,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
2646
2867
  // undo support should dedicate to specific dialog implementation.
2647
2868
  canUndo: false,
2648
2869
 
2649
- editorFocus : CKEDITOR.env.ie
2870
+ editorFocus : CKEDITOR.env.ie || CKEDITOR.env.webkit
2650
2871
  };
2651
2872
 
2652
2873
  (function()
@@ -2766,61 +2987,103 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
2766
2987
  return this.functions( function( val ){ return val != value; }, msg );
2767
2988
  }
2768
2989
  };
2769
- })();
2770
- })();
2771
2990
 
2772
- // Extend the CKEDITOR.editor class with dialog specific functions.
2773
- CKEDITOR.tools.extend( CKEDITOR.editor.prototype,
2774
- /** @lends CKEDITOR.editor.prototype */
2991
+ CKEDITOR.on( 'instanceDestroyed', function( evt )
2775
2992
  {
2776
- /**
2777
- * Loads and opens a registered dialog.
2778
- * @param {String} dialogName The registered name of the dialog.
2779
- * @param {Function} callback The function to be invoked after dialog instance created.
2780
- * @see CKEDITOR.dialog.add
2781
- * @example
2782
- * CKEDITOR.instances.editor1.openDialog( 'smiley' );
2783
- * @returns {CKEDITOR.dialog} The dialog object corresponding to the dialog displayed. null if the dialog name is not registered.
2784
- */
2785
- openDialog : function( dialogName, callback )
2993
+ // Remove dialog cover on last instance destroy.
2994
+ if ( CKEDITOR.tools.isEmpty( CKEDITOR.instances ) )
2786
2995
  {
2787
- var dialogDefinitions = CKEDITOR.dialog._.dialogDefinitions[ dialogName ];
2996
+ var currentTopDialog;
2997
+ while ( ( currentTopDialog = CKEDITOR.dialog._.currentTop ) )
2998
+ currentTopDialog.hide();
2999
+ removeCovers();
3000
+ }
3001
+
3002
+ var dialogs = evt.editor._.storedDialogs;
3003
+ for ( var name in dialogs )
3004
+ dialogs[ name ].destroy();
3005
+
3006
+ });
3007
+
3008
+ })();
2788
3009
 
2789
- // If the dialogDefinition is already loaded, open it immediately.
2790
- if ( typeof dialogDefinitions == 'function' )
3010
+ // Extend the CKEDITOR.editor class with dialog specific functions.
3011
+ CKEDITOR.tools.extend( CKEDITOR.editor.prototype,
3012
+ /** @lends CKEDITOR.editor.prototype */
3013
+ {
3014
+ /**
3015
+ * Loads and opens a registered dialog.
3016
+ * @param {String} dialogName The registered name of the dialog.
3017
+ * @param {Function} callback The function to be invoked after dialog instance created.
3018
+ * @see CKEDITOR.dialog.add
3019
+ * @example
3020
+ * CKEDITOR.instances.editor1.openDialog( 'smiley' );
3021
+ * @returns {CKEDITOR.dialog} The dialog object corresponding to the dialog displayed. null if the dialog name is not registered.
3022
+ */
3023
+ openDialog : function( dialogName, callback )
2791
3024
  {
2792
- var storedDialogs = this._.storedDialogs ||
2793
- ( this._.storedDialogs = {} );
3025
+ if ( this.mode == 'wysiwyg' && CKEDITOR.env.ie )
3026
+ {
3027
+ var selection = this.getSelection();
3028
+ selection && selection.lock();
3029
+ }
2794
3030
 
2795
- var dialog = storedDialogs[ dialogName ] ||
2796
- ( storedDialogs[ dialogName ] = new CKEDITOR.dialog( this, dialogName ) );
3031
+ var dialogDefinitions = CKEDITOR.dialog._.dialogDefinitions[ dialogName ],
3032
+ dialogSkin = this.skin.dialog;
2797
3033
 
2798
- callback && callback.call( dialog, dialog );
2799
- dialog.show();
3034
+ if ( CKEDITOR.dialog._.currentTop === null )
3035
+ showCover( this );
2800
3036
 
2801
- return dialog;
2802
- }
2803
- else if ( dialogDefinitions == 'failed' )
2804
- throw new Error( '[CKEDITOR.dialog.openDialog] Dialog "' + dialogName + '" failed when loading definition.' );
3037
+ // If the dialogDefinition is already loaded, open it immediately.
3038
+ if ( typeof dialogDefinitions == 'function' && dialogSkin._isLoaded )
3039
+ {
3040
+ var storedDialogs = this._.storedDialogs ||
3041
+ ( this._.storedDialogs = {} );
3042
+
3043
+ var dialog = storedDialogs[ dialogName ] ||
3044
+ ( storedDialogs[ dialogName ] = new CKEDITOR.dialog( this, dialogName ) );
2805
3045
 
2806
- // Not loaded? Load the .js file first.
2807
- var body = CKEDITOR.document.getBody(),
2808
- cursor = body.$.style.cursor,
2809
- me = this;
3046
+ callback && callback.call( dialog, dialog );
3047
+ dialog.show();
2810
3048
 
2811
- body.setStyle( 'cursor', 'wait' );
2812
- CKEDITOR.scriptLoader.load( CKEDITOR.getUrl( dialogDefinitions ), function()
3049
+ return dialog;
3050
+ }
3051
+ else if ( dialogDefinitions == 'failed' )
2813
3052
  {
3053
+ hideCover();
3054
+ throw new Error( '[CKEDITOR.dialog.openDialog] Dialog "' + dialogName + '" failed when loading definition.' );
3055
+ }
3056
+
3057
+ var me = this;
3058
+
3059
+ function onDialogFileLoaded( success )
3060
+ {
3061
+ var dialogDefinition = CKEDITOR.dialog._.dialogDefinitions[ dialogName ],
3062
+ skin = me.skin.dialog;
3063
+
3064
+ // Check if both skin part and definition is loaded.
3065
+ if ( !skin._isLoaded || loadDefinition && typeof success == 'undefined' )
3066
+ return;
3067
+
2814
3068
  // In case of plugin error, mark it as loading failed.
2815
- if ( typeof CKEDITOR.dialog._.dialogDefinitions[ dialogName ] != 'function' )
2816
- CKEDITOR.dialog._.dialogDefinitions[ dialogName ] = 'failed';
3069
+ if ( typeof dialogDefinition != 'function' )
3070
+ CKEDITOR.dialog._.dialogDefinitions[ dialogName ] = 'failed';
3071
+
2817
3072
  me.openDialog( dialogName, callback );
2818
- body.setStyle( 'cursor', cursor );
2819
- } );
3073
+ }
2820
3074
 
2821
- return null;
2822
- }
2823
- });
3075
+ if ( typeof dialogDefinitions == 'string' )
3076
+ {
3077
+ var loadDefinition = 1;
3078
+ CKEDITOR.scriptLoader.load( CKEDITOR.getUrl( dialogDefinitions ), onDialogFileLoaded, null, 0, 1 );
3079
+ }
3080
+
3081
+ CKEDITOR.skins.load( this, 'dialog', onDialogFileLoaded );
3082
+
3083
+ return null;
3084
+ }
3085
+ });
3086
+ })();
2824
3087
 
2825
3088
  CKEDITOR.plugins.add( 'dialog',
2826
3089
  {
@@ -2868,6 +3131,34 @@ CKEDITOR.plugins.add( 'dialog',
2868
3131
  * config.dialog_magnetDistance = 30;
2869
3132
  */
2870
3133
 
3134
+ /**
3135
+ * The guideline to follow when generating the dialog buttons. There are 3 possible options:
3136
+ * <ul>
3137
+ * <li>'OS' - the buttons will be displayed in the default order of the user's OS;</li>
3138
+ * <li>'ltr' - for Left-To-Right order;</li>
3139
+ * <li>'rtl' - for Right-To-Left order.</li>
3140
+ * </ul>
3141
+ * @name CKEDITOR.config.dialog_buttonsOrder
3142
+ * @type String
3143
+ * @default 'OS'
3144
+ * @since 3.5
3145
+ * @example
3146
+ * config.dialog_buttonsOrder = 'rtl';
3147
+ */
3148
+
3149
+ /**
3150
+ * The dialog contents to removed. It's a string composed by dialog name and tab name with a colon between them.
3151
+ * Separate each pair with semicolon (see example).
3152
+ * <b>Note: All names are case-sensitive.</b>
3153
+ * <b>Note: Be cautious when specifying dialog tabs that are mandatory, like "info", dialog functionality might be broken because of this!</b>
3154
+ * @name CKEDITOR.config.removeDialogTabs
3155
+ * @type String
3156
+ * @since 3.5
3157
+ * @default ''
3158
+ * @example
3159
+ * config.removeDialogTabs = 'flash:advanced;image:Link';
3160
+ */
3161
+
2871
3162
  /**
2872
3163
  * Fired when a dialog definition is about to be used to create a dialog into
2873
3164
  * an editor instance. This event makes it possible to customize the definition
@@ -2877,8 +3168,68 @@ CKEDITOR.plugins.add( 'dialog',
2877
3168
  * not get fired.</p>
2878
3169
  * @name CKEDITOR#dialogDefinition
2879
3170
  * @event
2880
- * @param {CKEDITOR.dialog.dialogDefinition} data The dialog defination that
3171
+ * @param {CKEDITOR.dialog.definition} data The dialog defination that
2881
3172
  * is being loaded.
2882
3173
  * @param {CKEDITOR.editor} editor The editor instance that will use the
2883
3174
  * dialog.
2884
3175
  */
3176
+
3177
+ /**
3178
+ * Fired when a tab is going to be selected in a dialog
3179
+ * @name CKEDITOR.dialog#selectPage
3180
+ * @event
3181
+ * @param {String} page The id of the page that it's gonna be selected.
3182
+ * @param {String} currentPage The id of the current page.
3183
+ */
3184
+
3185
+ /**
3186
+ * Fired when the user tries to dismiss a dialog
3187
+ * @name CKEDITOR.dialog#cancel
3188
+ * @event
3189
+ * @param {Boolean} hide Whether the event should proceed or not.
3190
+ */
3191
+
3192
+ /**
3193
+ * Fired when the user tries to confirm a dialog
3194
+ * @name CKEDITOR.dialog#ok
3195
+ * @event
3196
+ * @param {Boolean} hide Whether the event should proceed or not.
3197
+ */
3198
+
3199
+ /**
3200
+ * Fired when a dialog is shown
3201
+ * @name CKEDITOR.dialog#show
3202
+ * @event
3203
+ */
3204
+
3205
+ /**
3206
+ * Fired when a dialog is shown
3207
+ * @name CKEDITOR.editor#dialogShow
3208
+ * @event
3209
+ */
3210
+
3211
+ /**
3212
+ * Fired when a dialog is hidden
3213
+ * @name CKEDITOR.dialog#hide
3214
+ * @event
3215
+ */
3216
+
3217
+ /**
3218
+ * Fired when a dialog is hidden
3219
+ * @name CKEDITOR.editor#dialogHide
3220
+ * @event
3221
+ */
3222
+
3223
+ /**
3224
+ * Fired when a dialog is being resized. The event is fired on
3225
+ * both the 'CKEDITOR.dialog' object and the dialog instance
3226
+ * since 3.5.3, previously it's available only in the global object.
3227
+ * @name CKEDITOR.dialog#resize
3228
+ * @since 3.5
3229
+ * @event
3230
+ * @param {CKEDITOR.dialog} dialog The dialog being resized (if
3231
+ * it's fired on the dialog itself, this parameter isn't sent).
3232
+ * @param {String} skin The skin name.
3233
+ * @param {Number} width The new width.
3234
+ * @param {Number} height The new height.
3235
+ */