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,22 +1,19 @@
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
 
6
6
  CKEDITOR.dialog.add( 'cellProperties', function( editor )
7
7
  {
8
- var langTable = editor.lang.table;
9
- var langCell = langTable.cell;
10
- var langCommon = editor.lang.common;
11
- var validate = CKEDITOR.dialog.validate;
12
- var widthPattern = /^(\d+(?:\.\d+)?)(px|%)$/,
13
- heightPattern = /^(\d+(?:\.\d+)?)px$/;
14
- var bind = CKEDITOR.tools.bind;
15
-
16
- function spacer()
17
- {
18
- return { type : 'html', html : ' ' };
19
- }
8
+ var langTable = editor.lang.table,
9
+ langCell = langTable.cell,
10
+ langCommon = editor.lang.common,
11
+ validate = CKEDITOR.dialog.validate,
12
+ widthPattern = /^(\d+(?:\.\d+)?)(px|%)$/,
13
+ heightPattern = /^(\d+(?:\.\d+)?)px$/,
14
+ bind = CKEDITOR.tools.bind,
15
+ spacer = { type : 'html', html : ' ' },
16
+ rtl = editor.lang.dir == 'rtl';
20
17
 
21
18
  /**
22
19
  *
@@ -28,22 +25,24 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor )
28
25
  var onOk = function()
29
26
  {
30
27
  releaseHandlers( this );
31
- callback( this );
28
+ callback( this, this._.parentDialog );
29
+ this._.parentDialog.changeFocus( true );
32
30
  };
33
31
  var onCancel = function()
34
32
  {
35
33
  releaseHandlers( this );
36
- };
37
- var bindToDialog = function( dialog )
38
- {
39
- dialog.on( 'ok', onOk );
40
- dialog.on( 'cancel', onCancel );
34
+ this._.parentDialog.changeFocus();
41
35
  };
42
36
  var releaseHandlers = function( dialog )
43
37
  {
44
38
  dialog.removeListener( 'ok', onOk );
45
39
  dialog.removeListener( 'cancel', onCancel );
46
40
  };
41
+ var bindToDialog = function( dialog )
42
+ {
43
+ dialog.on( 'ok', onOk );
44
+ dialog.on( 'cancel', onCancel );
45
+ };
47
46
  editor.execCommand( dialogName );
48
47
  if ( editor._.storedDialogs.colordialog )
49
48
  bindToDialog( editor._.storedDialogs.colordialog );
@@ -73,8 +72,8 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor )
73
72
 
74
73
  return {
75
74
  title : langCell.title,
76
- minWidth : CKEDITOR.env.ie && CKEDITOR.env.quirks ? 550 : 480,
77
- minHeight : CKEDITOR.env.ie ? ( CKEDITOR.env.quirks ? 180 : 150 ) : 140,
75
+ minWidth : CKEDITOR.env.ie && CKEDITOR.env.quirks? 450 : 410,
76
+ minHeight : CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks )? 230 : 200,
78
77
  contents : [
79
78
  {
80
79
  id : 'info',
@@ -100,9 +99,8 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor )
100
99
  {
101
100
  type : 'text',
102
101
  id : 'width',
103
- label : langTable.width,
104
- widths : [ '71%', '29%' ],
105
- labelLayout : 'horizontal',
102
+ width: '100px',
103
+ label : langCommon.width,
106
104
  validate : validate[ 'number' ]( langCell.invalidWidth ),
107
105
 
108
106
  // Extra labelling of width unit type.
@@ -141,10 +139,8 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor )
141
139
  {
142
140
  type : 'select',
143
141
  id : 'widthType',
144
- labelLayout : 'horizontal',
145
- widths : [ '0%', '100%' ],
146
142
  label : editor.lang.table.widthUnit,
147
- labelStyle: 'display:none',
143
+ labelStyle: 'visibility:hidden',
148
144
  'default' : 'px',
149
145
  items :
150
146
  [
@@ -153,7 +149,7 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor )
153
149
  ],
154
150
  setup : function( selectedCell )
155
151
  {
156
- var widthMatch = widthPattern.exec( selectedCell.$.style.width );
152
+ var widthMatch = widthPattern.exec( selectedCell.getStyle( 'width' ) || selectedCell.getAttribute( 'width' ) );
157
153
  if ( widthMatch )
158
154
  this.setValue( widthMatch[2] );
159
155
  }
@@ -168,10 +164,9 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor )
168
164
  {
169
165
  type : 'text',
170
166
  id : 'height',
171
- label : langTable.height,
167
+ label : langCommon.height,
168
+ width: '100px',
172
169
  'default' : '',
173
- widths : [ '71%', '29%' ],
174
- labelLayout : 'horizontal',
175
170
  validate : validate[ 'number' ]( langCell.invalidHeight ),
176
171
 
177
172
  // Extra labelling of height unit type.
@@ -208,17 +203,15 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor )
208
203
  {
209
204
  id : 'htmlHeightType',
210
205
  type : 'html',
211
- html : langTable.widthPx
206
+ html : '<br />'+ langTable.widthPx
212
207
  }
213
208
  ]
214
209
  },
215
- spacer(),
210
+ spacer,
216
211
  {
217
212
  type : 'select',
218
213
  id : 'wordWrap',
219
- labelLayout : 'horizontal',
220
214
  label : langCell.wordWrap,
221
- widths : [ '50%', '50%' ],
222
215
  'default' : 'yes',
223
216
  items :
224
217
  [
@@ -243,20 +236,18 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor )
243
236
  element.removeAttribute( 'noWrap' );
244
237
  }
245
238
  },
246
- spacer(),
239
+ spacer,
247
240
  {
248
241
  type : 'select',
249
242
  id : 'hAlign',
250
- labelLayout : 'horizontal',
251
243
  label : langCell.hAlign,
252
- widths : [ '50%', '50%' ],
253
244
  'default' : '',
254
245
  items :
255
246
  [
256
247
  [ langCommon.notSet, '' ],
257
- [ langTable.alignLeft, 'left' ],
258
- [ langTable.alignCenter, 'center' ],
259
- [ langTable.alignRight, 'right' ]
248
+ [ langCommon.alignLeft, 'left' ],
249
+ [ langCommon.alignCenter, 'center' ],
250
+ [ langCommon.alignRight, 'right' ]
260
251
  ],
261
252
  setup : function( element )
262
253
  {
@@ -280,16 +271,14 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor )
280
271
  {
281
272
  type : 'select',
282
273
  id : 'vAlign',
283
- labelLayout : 'horizontal',
284
274
  label : langCell.vAlign,
285
- widths : [ '50%', '50%' ],
286
275
  'default' : '',
287
276
  items :
288
277
  [
289
278
  [ langCommon.notSet, '' ],
290
- [ langCell.alignTop, 'top' ],
291
- [ langCell.alignMiddle, 'middle' ],
292
- [ langCell.alignBottom, 'bottom' ],
279
+ [ langCommon.alignTop, 'top' ],
280
+ [ langCommon.alignMiddle, 'middle' ],
281
+ [ langCommon.alignBottom, 'bottom' ],
293
282
  [ langCell.alignBaseline, 'baseline' ]
294
283
  ],
295
284
  setup : function( element )
@@ -325,7 +314,7 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor )
325
314
  }
326
315
  ]
327
316
  },
328
- spacer(),
317
+ spacer,
329
318
  {
330
319
  type : 'vbox',
331
320
  padding : 0,
@@ -335,8 +324,6 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor )
335
324
  type : 'select',
336
325
  id : 'cellType',
337
326
  label : langCell.cellType,
338
- labelLayout : 'horizontal',
339
- widths : [ '50%', '50%' ],
340
327
  'default' : 'td',
341
328
  items :
342
329
  [
@@ -352,13 +339,11 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor )
352
339
  selectedCell.renameNode( this.getValue() );
353
340
  }
354
341
  },
355
- spacer(),
342
+ spacer,
356
343
  {
357
344
  type : 'text',
358
345
  id : 'rowSpan',
359
346
  label : langCell.rowSpan,
360
- labelLayout : 'horizontal',
361
- widths : [ '50%', '50%' ],
362
347
  'default' : '',
363
348
  validate : validate.integer( langCell.invalidRowSpan ),
364
349
  setup : function( selectedCell )
@@ -380,8 +365,6 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor )
380
365
  type : 'text',
381
366
  id : 'colSpan',
382
367
  label : langCell.colSpan,
383
- labelLayout : 'horizontal',
384
- widths : [ '50%', '50%' ],
385
368
  'default' : '',
386
369
  validate : validate.integer( langCell.invalidColSpan ),
387
370
  setup : function( element )
@@ -399,19 +382,17 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor )
399
382
  selectedCell.removeAttribute( 'colSpan' );
400
383
  }
401
384
  },
402
- spacer(),
385
+ spacer,
403
386
  {
404
387
  type : 'hbox',
405
388
  padding : 0,
406
- widths : [ '80%', '20%' ],
389
+ widths : [ '60%', '40%' ],
407
390
  children :
408
391
  [
409
392
  {
410
393
  type : 'text',
411
394
  id : 'bgColor',
412
395
  label : langCell.bgColor,
413
- labelLayout : 'horizontal',
414
- widths : [ '70%', '30%' ],
415
396
  'default' : '',
416
397
  setup : function( element )
417
398
  {
@@ -435,8 +416,13 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor )
435
416
  {
436
417
  type : 'button',
437
418
  id : 'bgColorChoose',
419
+ "class" : 'colorChooser',
438
420
  label : langCell.chooseColor,
439
- style : 'margin-left: 10px',
421
+ onLoad : function()
422
+ {
423
+ // Stick the element to the bottom (#5587)
424
+ this.getElement().getParent().setStyle( 'vertical-align', 'bottom' );
425
+ },
440
426
  onClick : function()
441
427
  {
442
428
  var self = this;
@@ -450,19 +436,17 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor )
450
436
  }
451
437
  ]
452
438
  },
453
- spacer(),
439
+ spacer,
454
440
  {
455
441
  type : 'hbox',
456
442
  padding : 0,
457
- widths : [ '80%', '20%' ],
443
+ widths : [ '60%', '40%' ],
458
444
  children :
459
445
  [
460
446
  {
461
447
  type : 'text',
462
448
  id : 'borderColor',
463
449
  label : langCell.borderColor,
464
- labelLayout : 'horizontal',
465
- widths : [ '70%', '30%' ],
466
450
  'default' : '',
467
451
  setup : function( element )
468
452
  {
@@ -485,8 +469,14 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor )
485
469
  {
486
470
  type : 'button',
487
471
  id : 'borderColorChoose',
472
+ "class" : 'colorChooser',
488
473
  label : langCell.chooseColor,
489
- style : 'margin-left: 10px',
474
+ style : ( rtl ? 'margin-right' : 'margin-left' ) + ': 10px',
475
+ onLoad : function()
476
+ {
477
+ // Stick the element to the bottom (#5587)
478
+ this.getElement().getParent().setStyle( 'vertical-align', 'bottom' );
479
+ },
490
480
  onClick : function()
491
481
  {
492
482
  var self = this;
@@ -515,9 +505,21 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor )
515
505
  },
516
506
  onOk : function()
517
507
  {
508
+ var selection = this._.editor.getSelection(),
509
+ bookmarks = selection.createBookmarks();
510
+
518
511
  var cells = this.cells;
519
512
  for ( var i = 0 ; i < cells.length ; i++ )
520
513
  this.commitContent( cells[ i ] );
514
+
515
+ selection.selectBookmarks( bookmarks );
516
+
517
+ // Force selectionChange event because of alignment style.
518
+ var firstElement = selection.getStartElement();
519
+ var currentPath = new CKEDITOR.dom.elementPath( firstElement );
520
+
521
+ this._.editor._.selectionPreviousPath = currentPath;
522
+ this._.editor.fire( 'selectionChange', { selection : selection, path : currentPath, element : firstElement } );
521
523
  }
522
524
  };
523
525
  } );
@@ -1,18 +1,10 @@
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
 
6
6
  (function()
7
7
  {
8
- function removeRawAttribute( $node, attr )
9
- {
10
- if ( CKEDITOR.env.ie )
11
- $node.removeAttribute( attr );
12
- else
13
- delete $node[ attr ];
14
- }
15
-
16
8
  var cellNodeRegex = /^(?:td|th)$/;
17
9
 
18
10
  function getSelectedCells( selection )
@@ -86,37 +78,87 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
86
78
  return retval;
87
79
  }
88
80
 
89
- function clearRow( $tr )
90
- {
91
- // Get the array of row's cells.
92
- var $cells = $tr.cells;
81
+ function getFocusElementAfterDelCells( cellsToDelete ) {
82
+ var i = 0,
83
+ last = cellsToDelete.length - 1,
84
+ database = {},
85
+ cell,focusedCell,
86
+ tr;
93
87
 
94
- // Empty all cells.
95
- for ( var i = 0 ; i < $cells.length ; i++ )
96
- {
97
- $cells[ i ].innerHTML = '';
88
+ while ( ( cell = cellsToDelete[ i++ ] ) )
89
+ CKEDITOR.dom.element.setMarker( database, cell, 'delete_cell', true );
98
90
 
99
- if ( !CKEDITOR.env.ie )
100
- ( new CKEDITOR.dom.element( $cells[ i ] ) ).appendBogus();
91
+ // 1.first we check left or right side focusable cell row by row;
92
+ i = 0;
93
+ while ( ( cell = cellsToDelete[ i++ ] ) )
94
+ {
95
+ if ( ( focusedCell = cell.getPrevious() ) && !focusedCell.getCustomData( 'delete_cell' )
96
+ || ( focusedCell = cell.getNext() ) && !focusedCell.getCustomData( 'delete_cell' ) )
97
+ {
98
+ CKEDITOR.dom.element.clearAllMarkers( database );
99
+ return focusedCell;
100
+ }
101
101
  }
102
+
103
+ CKEDITOR.dom.element.clearAllMarkers( database );
104
+
105
+ // 2. then we check the toppest row (outside the selection area square) focusable cell
106
+ tr = cellsToDelete[ 0 ].getParent();
107
+ if ( ( tr = tr.getPrevious() ) )
108
+ return tr.getLast();
109
+
110
+ // 3. last we check the lowerest row focusable cell
111
+ tr = cellsToDelete[ last ].getParent();
112
+ if ( ( tr = tr.getNext() ) )
113
+ return tr.getChild( 0 );
114
+
115
+ return null;
102
116
  }
103
117
 
104
118
  function insertRow( selection, insertBefore )
105
119
  {
106
- // Get the row where the selection is placed in.
107
- var row = selection.getStartElement().getAscendant( 'tr' );
108
- if ( !row )
109
- return;
110
-
111
- // Create a clone of the row.
112
- var newRow = row.clone( true );
120
+ var cells = getSelectedCells( selection ),
121
+ firstCell = cells[ 0 ],
122
+ table = firstCell.getAscendant( 'table' ),
123
+ doc = firstCell.getDocument(),
124
+ startRow = cells[ 0 ].getParent(),
125
+ startRowIndex = startRow.$.rowIndex,
126
+ lastCell = cells[ cells.length - 1 ],
127
+ endRowIndex = lastCell.getParent().$.rowIndex + lastCell.$.rowSpan - 1,
128
+ endRow = new CKEDITOR.dom.element( table.$.rows[ endRowIndex ] ),
129
+ rowIndex = insertBefore ? startRowIndex : endRowIndex,
130
+ row = insertBefore ? startRow : endRow;
131
+
132
+ var map = CKEDITOR.tools.buildTableMap( table ),
133
+ cloneRow = map[ rowIndex ],
134
+ nextRow = insertBefore ? map[ rowIndex - 1 ] : map[ rowIndex + 1 ],
135
+ width = map[0].length;
136
+
137
+ var newRow = doc.createElement( 'tr' );
138
+ for ( var i = 0; i < width; i++ )
139
+ {
140
+ var cell;
141
+ // Check whether there's a spanning row here, do not break it.
142
+ if ( cloneRow[ i ].rowSpan > 1 && nextRow && cloneRow[ i ] == nextRow[ i ] )
143
+ {
144
+ cell = cloneRow[ i ];
145
+ cell.rowSpan += 1;
146
+ }
147
+ else
148
+ {
149
+ cell = new CKEDITOR.dom.element( cloneRow[ i ] ).clone();
150
+ cell.removeAttribute( 'rowSpan' );
151
+ !CKEDITOR.env.ie && cell.appendBogus();
152
+ newRow.append( cell );
153
+ cell = cell.$;
154
+ }
113
155
 
114
- // Insert the new row before of it.
115
- newRow.insertBefore( row );
156
+ i += cell.colSpan - 1;
157
+ }
116
158
 
117
- // Clean one of the rows to produce the illusion of inserting an empty row
118
- // before or after.
119
- clearRow( insertBefore ? newRow.$ : row.$ );
159
+ insertBefore ?
160
+ newRow.insertBefore( row ) :
161
+ newRow.insertAfter( row );
120
162
  }
121
163
 
122
164
  function deleteRows( selectionOrRow )
@@ -124,41 +166,59 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
124
166
  if ( selectionOrRow instanceof CKEDITOR.dom.selection )
125
167
  {
126
168
  var cells = getSelectedCells( selectionOrRow ),
127
- cellsCount = cells.length,
128
- rowsToDelete = [],
129
- cursorPosition,
130
- previousRowIndex,
131
- nextRowIndex;
132
-
133
- // Queue up the rows - it's possible and likely that we have duplicates.
134
- for ( var i = 0 ; i < cellsCount ; i++ )
169
+ firstCell = cells[ 0 ],
170
+ table = firstCell.getAscendant( 'table' ),
171
+ map = CKEDITOR.tools.buildTableMap( table ),
172
+ startRow = cells[ 0 ].getParent(),
173
+ startRowIndex = startRow.$.rowIndex,
174
+ lastCell = cells[ cells.length - 1 ],
175
+ endRowIndex = lastCell.getParent().$.rowIndex + lastCell.$.rowSpan - 1,
176
+ rowsToDelete = [];
177
+
178
+ // Delete cell or reduce cell spans by checking through the table map.
179
+ for ( var i = startRowIndex; i <= endRowIndex; i++ )
135
180
  {
136
- var row = cells[ i ].getParent(),
137
- rowIndex = row.$.rowIndex;
181
+ var mapRow = map[ i ],
182
+ row = new CKEDITOR.dom.element( table.$.rows[ i ] );
183
+
184
+ for ( var j = 0; j < mapRow.length; j++ )
185
+ {
186
+ var cell = new CKEDITOR.dom.element( mapRow[ j ] ),
187
+ cellRowIndex = cell.getParent().$.rowIndex;
138
188
 
139
- !i && ( previousRowIndex = rowIndex - 1 );
140
- rowsToDelete[ rowIndex ] = row;
141
- i == cellsCount - 1 && ( nextRowIndex = rowIndex + 1 );
189
+ if ( cell.$.rowSpan == 1 )
190
+ cell.remove();
191
+ // Row spanned cell.
192
+ else
193
+ {
194
+ // Span row of the cell, reduce spanning.
195
+ cell.$.rowSpan -= 1;
196
+ // Root row of the cell, root cell to next row.
197
+ if ( cellRowIndex == i )
198
+ {
199
+ var nextMapRow = map[ i + 1 ];
200
+ nextMapRow[ j - 1 ] ?
201
+ cell.insertAfter( new CKEDITOR.dom.element( nextMapRow[ j - 1 ] ) )
202
+ : new CKEDITOR.dom.element( table.$.rows[ i + 1 ] ).append( cell, 1 );
203
+ }
204
+ }
205
+
206
+ j += cell.$.colSpan - 1;
207
+ }
208
+
209
+ rowsToDelete.push( row );
142
210
  }
143
211
 
144
- var table = row.getAscendant( 'table' ),
145
- rows = table.$.rows,
146
- rowCount = rows.length;
212
+ var rows = table.$.rows;
147
213
 
148
214
  // Where to put the cursor after rows been deleted?
149
215
  // 1. Into next sibling row if any;
150
216
  // 2. Into previous sibling row if any;
151
217
  // 3. Into table's parent element if it's the very last row.
152
- cursorPosition = new CKEDITOR.dom.element(
153
- nextRowIndex < rowCount && table.$.rows[ nextRowIndex ] ||
154
- previousRowIndex > 0 && table.$.rows[ previousRowIndex ] ||
155
- table.$.parentNode );
218
+ var cursorPosition = new CKEDITOR.dom.element( rows[ startRowIndex ] || rows[ startRowIndex - 1 ] || table.$.parentNode );
156
219
 
157
220
  for ( i = rowsToDelete.length ; i >= 0 ; i-- )
158
- {
159
- if ( rowsToDelete[ i ] )
160
- deleteRows( rowsToDelete[ i ] );
161
- }
221
+ deleteRows( rowsToDelete[ i ] );
162
222
 
163
223
  return cursorPosition;
164
224
  }
@@ -172,91 +232,185 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
172
232
  selectionOrRow.remove();
173
233
  }
174
234
 
175
- return 0;
235
+ return null;
176
236
  }
177
237
 
178
- function insertColumn( selection, insertBefore )
238
+ function getCellColIndex( cell, isStart )
179
239
  {
180
- // Get the cell where the selection is placed in.
181
- var startElement = selection.getStartElement();
182
- var cell = startElement.getAscendant( 'td', true ) || startElement.getAscendant( 'th', true );
240
+ var row = cell.getParent(),
241
+ rowCells = row.$.cells;
183
242
 
184
- if ( !cell )
185
- return;
243
+ var colIndex = 0;
244
+ for ( var i = 0; i < rowCells.length; i++ )
245
+ {
246
+ var mapCell = rowCells[ i ];
247
+ colIndex += isStart ? 1 : mapCell.colSpan;
248
+ if ( mapCell == cell.$ )
249
+ break;
250
+ }
186
251
 
187
- // Get the cell's table.
188
- var table = cell.getAscendant( 'table' );
189
- var cellIndex = cell.$.cellIndex;
252
+ return colIndex -1;
253
+ }
190
254
 
191
- // Loop through all rows available in the table.
192
- for ( var i = 0 ; i < table.$.rows.length ; i++ )
255
+ function getColumnsIndices( cells, isStart )
256
+ {
257
+ var retval = isStart ? Infinity : 0;
258
+ for ( var i = 0; i < cells.length; i++ )
193
259
  {
194
- var $row = table.$.rows[ i ];
260
+ var colIndex = getCellColIndex( cells[ i ], isStart );
261
+ if ( isStart ? colIndex < retval : colIndex > retval )
262
+ retval = colIndex;
263
+ }
264
+ return retval;
265
+ }
195
266
 
196
- // If the row doesn't have enough cells, ignore it.
197
- if ( $row.cells.length < ( cellIndex + 1 ) )
198
- continue;
267
+ function insertColumn( selection, insertBefore )
268
+ {
269
+ var cells = getSelectedCells( selection ),
270
+ firstCell = cells[ 0 ],
271
+ table = firstCell.getAscendant( 'table' ),
272
+ startCol = getColumnsIndices( cells, 1 ),
273
+ lastCol = getColumnsIndices( cells ),
274
+ colIndex = insertBefore? startCol : lastCol;
199
275
 
200
- cell = new CKEDITOR.dom.element( $row.cells[ cellIndex ].cloneNode( false ) );
276
+ var map = CKEDITOR.tools.buildTableMap( table ),
277
+ cloneCol = [],
278
+ nextCol = [],
279
+ height = map.length;
201
280
 
202
- if ( !CKEDITOR.env.ie )
203
- cell.appendBogus();
281
+ for ( var i = 0; i < height; i++ )
282
+ {
283
+ cloneCol.push( map[ i ][ colIndex ] );
284
+ var nextCell = insertBefore ? map[ i ][ colIndex - 1 ] : map[ i ][ colIndex + 1 ];
285
+ nextCell && nextCol.push( nextCell );
286
+ }
204
287
 
205
- // Get back the currently selected cell.
206
- var baseCell = new CKEDITOR.dom.element( $row.cells[ cellIndex ] );
207
- if ( insertBefore )
208
- cell.insertBefore( baseCell );
288
+ for ( i = 0; i < height; i++ )
289
+ {
290
+ var cell;
291
+ // Check whether there's a spanning column here, do not break it.
292
+ if ( cloneCol[ i ].colSpan > 1
293
+ && nextCol.length
294
+ && nextCol[ i ] == cloneCol[ i ] )
295
+ {
296
+ cell = cloneCol[ i ];
297
+ cell.colSpan += 1;
298
+ }
209
299
  else
210
- cell.insertAfter( baseCell );
300
+ {
301
+ cell = new CKEDITOR.dom.element( cloneCol[ i ] ).clone();
302
+ cell.removeAttribute( 'colSpan' );
303
+ !CKEDITOR.env.ie && cell.appendBogus();
304
+ cell[ insertBefore? 'insertBefore' : 'insertAfter' ].call( cell, new CKEDITOR.dom.element ( cloneCol[ i ] ) );
305
+ cell = cell.$;
306
+ }
307
+
308
+ i += cell.rowSpan - 1;
211
309
  }
212
310
  }
213
311
 
214
312
  function deleteColumns( selectionOrCell )
215
313
  {
216
- if ( selectionOrCell instanceof CKEDITOR.dom.selection )
314
+ var cells = getSelectedCells( selectionOrCell ),
315
+ firstCell = cells[ 0 ],
316
+ lastCell = cells[ cells.length - 1 ],
317
+ table = firstCell.getAscendant( 'table' ),
318
+ map = CKEDITOR.tools.buildTableMap( table ),
319
+ startColIndex,
320
+ endColIndex,
321
+ rowsToDelete = [];
322
+
323
+ // Figure out selected cells' column indices.
324
+ for ( var i = 0, rows = map.length; i < rows; i++ )
217
325
  {
218
- var colsToDelete = getSelectedCells( selectionOrCell );
219
- for ( var i = colsToDelete.length ; i >= 0 ; i-- )
326
+ for ( var j = 0, cols = map[ i ].length; j < cols; j++ )
220
327
  {
221
- if ( colsToDelete[ i ] )
222
- deleteColumns( colsToDelete[ i ] );
328
+ if ( map[ i ][ j ] == firstCell.$ )
329
+ startColIndex = j;
330
+ if ( map[ i ][ j ] == lastCell.$ )
331
+ endColIndex = j;
223
332
  }
224
333
  }
225
- else if ( selectionOrCell instanceof CKEDITOR.dom.element )
334
+
335
+ // Delete cell or reduce cell spans by checking through the table map.
336
+ for ( i = startColIndex; i <= endColIndex; i++ )
226
337
  {
227
- // Get the cell's table.
228
- var table = selectionOrCell.getAscendant( 'table' );
338
+ for ( j = 0; j < map.length; j++ )
339
+ {
340
+ var mapRow = map[ j ],
341
+ row = new CKEDITOR.dom.element( table.$.rows[ j ] ),
342
+ cell = new CKEDITOR.dom.element( mapRow[ i ] );
229
343
 
230
- // Get the cell index.
231
- var cellIndex = selectionOrCell.$.cellIndex;
344
+ if ( cell.$.colSpan == 1 )
345
+ cell.remove();
346
+ // Reduce the col spans.
347
+ else
348
+ cell.$.colSpan -= 1;
232
349
 
233
- /*
234
- * Loop through all rows from down to up, coz it's possible that some rows
235
- * will be deleted.
236
- */
237
- for ( i = table.$.rows.length - 1 ; i >= 0 ; i-- )
238
- {
239
- // Get the row.
240
- var row = new CKEDITOR.dom.element( table.$.rows[ i ] );
350
+ j += cell.$.rowSpan - 1;
241
351
 
242
- // If the cell to be removed is the first one and the row has just one cell.
243
- if ( !cellIndex && row.$.cells.length == 1 )
244
- {
245
- deleteRows( row );
246
- continue;
247
- }
352
+ if ( !row.$.cells.length )
353
+ rowsToDelete.push( row );
354
+ }
355
+ }
356
+
357
+ var firstRowCells = table.$.rows[ 0 ] && table.$.rows[ 0 ].cells;
358
+
359
+ // Where to put the cursor after columns been deleted?
360
+ // 1. Into next cell of the first row if any;
361
+ // 2. Into previous cell of the first row if any;
362
+ // 3. Into table's parent element;
363
+ var cursorPosition = new CKEDITOR.dom.element( firstRowCells[ startColIndex ] || ( startColIndex ? firstRowCells[ startColIndex - 1 ] : table.$.parentNode ) );
364
+
365
+ // Delete table rows only if all columns are gone (do not remove empty row).
366
+ if ( rowsToDelete.length == rows )
367
+ table.remove();
368
+
369
+ return cursorPosition;
370
+ }
248
371
 
249
- // Else, just delete the cell.
250
- if ( row.$.cells[ cellIndex ] )
251
- row.$.removeChild( row.$.cells[ cellIndex ] );
372
+ function getFocusElementAfterDelCols( cells )
373
+ {
374
+ var cellIndexList = [],
375
+ table = cells[ 0 ] && cells[ 0 ].getAscendant( 'table' ),
376
+ i, length,
377
+ targetIndex, targetCell;
378
+
379
+ // get the cellIndex list of delete cells
380
+ for ( i = 0, length = cells.length; i < length; i++ )
381
+ cellIndexList.push( cells[i].$.cellIndex );
382
+
383
+ // get the focusable column index
384
+ cellIndexList.sort();
385
+ for ( i = 1, length = cellIndexList.length; i < length; i++ )
386
+ {
387
+ if ( cellIndexList[ i ] - cellIndexList[ i - 1 ] > 1 )
388
+ {
389
+ targetIndex = cellIndexList[ i - 1 ] + 1;
390
+ break;
252
391
  }
253
392
  }
393
+
394
+ if ( !targetIndex )
395
+ targetIndex = cellIndexList[ 0 ] > 0 ? ( cellIndexList[ 0 ] - 1 )
396
+ : ( cellIndexList[ cellIndexList.length - 1 ] + 1 );
397
+
398
+ // scan row by row to get the target cell
399
+ var rows = table.$.rows;
400
+ for ( i = 0, length = rows.length; i < length ; i++ )
401
+ {
402
+ targetCell = rows[ i ].cells[ targetIndex ];
403
+ if ( targetCell )
404
+ break;
405
+ }
406
+
407
+ return targetCell ? new CKEDITOR.dom.element( targetCell ) : table.getPrevious();
254
408
  }
255
409
 
256
410
  function insertCell( selection, insertBefore )
257
411
  {
258
412
  var startElement = selection.getStartElement();
259
- var cell = startElement.getAscendant( 'td', true ) || startElement.getAscendant( 'th', true );
413
+ var cell = startElement.getAscendant( 'td', 1 ) || startElement.getAscendant( 'th', 1 );
260
414
 
261
415
  if ( !cell )
262
416
  return;
@@ -277,13 +431,22 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
277
431
  if ( selectionOrCell instanceof CKEDITOR.dom.selection )
278
432
  {
279
433
  var cellsToDelete = getSelectedCells( selectionOrCell );
434
+ var table = cellsToDelete[ 0 ] && cellsToDelete[ 0 ].getAscendant( 'table' );
435
+ var cellToFocus = getFocusElementAfterDelCells( cellsToDelete );
436
+
280
437
  for ( var i = cellsToDelete.length - 1 ; i >= 0 ; i-- )
281
438
  deleteCells( cellsToDelete[ i ] );
439
+
440
+ if ( cellToFocus )
441
+ placeCursorInCell( cellToFocus, true );
442
+ else if ( table )
443
+ table.remove();
282
444
  }
283
445
  else if ( selectionOrCell instanceof CKEDITOR.dom.element )
284
446
  {
285
- if ( selectionOrCell.getParent().getChildCount() == 1 )
286
- selectionOrCell.getParent().remove();
447
+ var tr = selectionOrCell.getParent();
448
+ if ( tr.getChildCount() == 1 )
449
+ tr.remove();
287
450
  else
288
451
  selectionOrCell.remove();
289
452
  }
@@ -308,51 +471,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
308
471
  range.select( true );
309
472
  }
310
473
 
311
- function buildTableMap( table )
312
- {
313
-
314
- var aRows = table.$.rows ;
315
-
316
- // Row and Column counters.
317
- var r = -1 ;
318
-
319
- var aMap = [];
320
-
321
- for ( var i = 0 ; i < aRows.length ; i++ )
322
- {
323
- r++ ;
324
- !aMap[r] && ( aMap[r] = [] );
325
-
326
- var c = -1 ;
327
-
328
- for ( var j = 0 ; j < aRows[i].cells.length ; j++ )
329
- {
330
- var oCell = aRows[i].cells[j] ;
331
-
332
- c++ ;
333
- while ( aMap[r][c] )
334
- c++ ;
335
-
336
- var iColSpan = isNaN( oCell.colSpan ) ? 1 : oCell.colSpan ;
337
- var iRowSpan = isNaN( oCell.rowSpan ) ? 1 : oCell.rowSpan ;
338
-
339
- for ( var rs = 0 ; rs < iRowSpan ; rs++ )
340
- {
341
- if ( !aMap[r + rs] )
342
- aMap[r + rs] = new Array() ;
343
-
344
- for ( var cs = 0 ; cs < iColSpan ; cs++ )
345
- {
346
- aMap[r + rs][c + cs] = aRows[i].cells[j] ;
347
- }
348
- }
349
-
350
- c += iColSpan - 1 ;
351
- }
352
- }
353
- return aMap ;
354
- }
355
-
356
474
  function cellInRow( tableMap, rowIndex, cell )
357
475
  {
358
476
  var oRow = tableMap[ rowIndex ];
@@ -406,7 +524,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
406
524
  var cell,
407
525
  firstCell = cells[ 0 ],
408
526
  table = firstCell.getAscendant( 'table' ),
409
- map = buildTableMap( table ),
527
+ map = CKEDITOR.tools.buildTableMap( table ),
410
528
  mapHeight = map.length,
411
529
  mapWidth = map[ 0 ].length,
412
530
  startRow = firstCell.getParent().$.rowIndex,
@@ -417,13 +535,16 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
417
535
  var targetCell;
418
536
  try
419
537
  {
538
+ var rowspan = parseInt( firstCell.getAttribute( 'rowspan' ), 10 ) || 1;
539
+ var colspan = parseInt( firstCell.getAttribute( 'colspan' ), 10 ) || 1;
540
+
420
541
  targetCell =
421
542
  map[ mergeDirection == 'up' ?
422
- ( startRow - 1 ):
423
- mergeDirection == 'down' ? ( startRow + 1 ) : startRow ] [
424
- mergeDirection == 'left' ?
425
- ( startColumn - 1 ):
426
- mergeDirection == 'right' ? ( startColumn + 1 ) : startColumn ];
543
+ ( startRow - rowspan ):
544
+ mergeDirection == 'down' ? ( startRow + rowspan ) : startRow ] [
545
+ mergeDirection == 'left' ?
546
+ ( startColumn - colspan ):
547
+ mergeDirection == 'right' ? ( startColumn + colspan ) : startColumn ];
427
548
 
428
549
  }
429
550
  catch( er )
@@ -480,7 +601,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
480
601
  {
481
602
  var last = frag.getLast( CKEDITOR.dom.walker.whitespaces( true ) );
482
603
  if ( last && !( last.is && last.is( 'br' ) ) )
483
- frag.append( new CKEDITOR.dom.element( 'br' ) );
604
+ frag.append( 'br' );
484
605
  }
485
606
 
486
607
  cell.moveChildren( frag );
@@ -541,7 +662,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
541
662
  var cell = cells[ 0 ],
542
663
  tr = cell.getParent(),
543
664
  table = tr.getAscendant( 'table' ),
544
- map = buildTableMap( table ),
665
+ map = CKEDITOR.tools.buildTableMap( table ),
545
666
  rowIndex = tr.$.rowIndex,
546
667
  colIndex = cellInRow( map, rowIndex, cell ),
547
668
  rowSpan = cell.$.rowSpan,
@@ -617,7 +738,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
617
738
  var cell = cells[ 0 ],
618
739
  tr = cell.getParent(),
619
740
  table = tr.getAscendant( 'table' ),
620
- map = buildTableMap( table ),
741
+ map = CKEDITOR.tools.buildTableMap( table ),
621
742
  rowIndex = tr.$.rowIndex,
622
743
  colIndex = cellInRow( map, rowIndex, cell ),
623
744
  colSpan = cell.$.colSpan,
@@ -667,24 +788,22 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
667
788
  {
668
789
  exec : function( editor )
669
790
  {
670
- var selection = editor.getSelection();
671
- var startElement = selection && selection.getStartElement();
672
- var table = startElement && startElement.getAscendant( 'table', true );
791
+ var selection = editor.getSelection(),
792
+ startElement = selection && selection.getStartElement(),
793
+ table = startElement && startElement.getAscendant( 'table', 1 );
673
794
 
674
795
  if ( !table )
675
796
  return;
676
797
 
677
- // Maintain the selection point at where the table was deleted.
678
- selection.selectElement( table );
679
- var range = selection.getRanges()[0];
680
- range.collapse();
681
- selection.selectRanges( [ range ] );
682
-
683
- // If the table's parent has only one child, remove it as well.
684
- if ( table.getParent().getChildCount() == 1 )
685
- table.getParent().remove();
686
- else
687
- table.remove();
798
+ // If the table's parent has only one child remove it as well (unless it's the body or a table cell) (#5416, #6289)
799
+ var parent = table.getParent();
800
+ if ( parent.getChildCount() == 1 && !parent.is( 'body', 'td', 'th' ) )
801
+ table = parent;
802
+
803
+ var range = new CKEDITOR.dom.range( editor.document );
804
+ range.moveToPosition( table, CKEDITOR.POSITION_BEFORE_START );
805
+ table.remove();
806
+ range.select();
688
807
  }
689
808
  } );
690
809
 
@@ -720,7 +839,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
720
839
  exec : function( editor )
721
840
  {
722
841
  var selection = editor.getSelection();
723
- deleteColumns( selection );
842
+ var element = deleteColumns( selection );
843
+ element && placeCursorInCell( element, true );
724
844
  }
725
845
  } );
726
846
 
@@ -994,7 +1114,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
994
1114
  {
995
1115
  editor.contextMenu.addListener( function( element, selection )
996
1116
  {
997
- if ( !element )
1117
+ if ( !element || element.isReadOnly() )
998
1118
  return null;
999
1119
 
1000
1120
  while ( element )
@@ -1020,3 +1140,52 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
1020
1140
  };
1021
1141
  CKEDITOR.plugins.add( 'tabletools', CKEDITOR.plugins.tabletools );
1022
1142
  })();
1143
+
1144
+ /**
1145
+ * Create a two-dimension array that reflects the actual layout of table cells,
1146
+ * with cell spans, with mappings to the original td elements.
1147
+ * @param table {CKEDITOR.dom.element}
1148
+ */
1149
+ CKEDITOR.tools.buildTableMap = function ( table )
1150
+ {
1151
+ var aRows = table.$.rows ;
1152
+
1153
+ // Row and Column counters.
1154
+ var r = -1 ;
1155
+
1156
+ var aMap = [];
1157
+
1158
+ for ( var i = 0 ; i < aRows.length ; i++ )
1159
+ {
1160
+ r++ ;
1161
+ !aMap[r] && ( aMap[r] = [] );
1162
+
1163
+ var c = -1 ;
1164
+
1165
+ for ( var j = 0 ; j < aRows[i].cells.length ; j++ )
1166
+ {
1167
+ var oCell = aRows[i].cells[j] ;
1168
+
1169
+ c++ ;
1170
+ while ( aMap[r][c] )
1171
+ c++ ;
1172
+
1173
+ var iColSpan = isNaN( oCell.colSpan ) ? 1 : oCell.colSpan ;
1174
+ var iRowSpan = isNaN( oCell.rowSpan ) ? 1 : oCell.rowSpan ;
1175
+
1176
+ for ( var rs = 0 ; rs < iRowSpan ; rs++ )
1177
+ {
1178
+ if ( !aMap[r + rs] )
1179
+ aMap[r + rs] = [];
1180
+
1181
+ for ( var cs = 0 ; cs < iColSpan ; cs++ )
1182
+ {
1183
+ aMap[r + rs][c + cs] = aRows[i].cells[j] ;
1184
+ }
1185
+ }
1186
+
1187
+ c += iColSpan - 1 ;
1188
+ }
1189
+ }
1190
+ return aMap ;
1191
+ };