esp-ckeditor 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (340) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +32 -0
  3. data/Rakefile +28 -0
  4. data/app/assets/javascripts/esp-ckeditor/_source/core/_bootstrap.js +87 -0
  5. data/app/assets/javascripts/esp-ckeditor/_source/core/ckeditor.js +141 -0
  6. data/app/assets/javascripts/esp-ckeditor/_source/core/ckeditor_base.js +227 -0
  7. data/app/assets/javascripts/esp-ckeditor/_source/core/ckeditor_basic.js +238 -0
  8. data/app/assets/javascripts/esp-ckeditor/_source/core/command.js +209 -0
  9. data/app/assets/javascripts/esp-ckeditor/_source/core/commanddefinition.js +129 -0
  10. data/app/assets/javascripts/esp-ckeditor/_source/core/config.js +423 -0
  11. data/app/assets/javascripts/esp-ckeditor/_source/core/dataprocessor.js +65 -0
  12. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/comment.js +32 -0
  13. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/document.js +251 -0
  14. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/documentfragment.js +49 -0
  15. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/domobject.js +258 -0
  16. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/element.js +1691 -0
  17. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/elementpath.js +119 -0
  18. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/event.js +145 -0
  19. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/node.js +696 -0
  20. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/nodelist.js +26 -0
  21. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/range.js +2054 -0
  22. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/rangelist.js +213 -0
  23. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/text.js +128 -0
  24. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/walker.js +462 -0
  25. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/window.js +96 -0
  26. data/app/assets/javascripts/esp-ckeditor/_source/core/dom.js +20 -0
  27. data/app/assets/javascripts/esp-ckeditor/_source/core/dtd.js +266 -0
  28. data/app/assets/javascripts/esp-ckeditor/_source/core/editor.js +1060 -0
  29. data/app/assets/javascripts/esp-ckeditor/_source/core/editor_basic.js +186 -0
  30. data/app/assets/javascripts/esp-ckeditor/_source/core/env.js +305 -0
  31. data/app/assets/javascripts/esp-ckeditor/_source/core/event.js +342 -0
  32. data/app/assets/javascripts/esp-ckeditor/_source/core/eventInfo.js +120 -0
  33. data/app/assets/javascripts/esp-ckeditor/_source/core/focusmanager.js +152 -0
  34. data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/basicwriter.js +145 -0
  35. data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/cdata.js +43 -0
  36. data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/comment.js +60 -0
  37. data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/element.js +308 -0
  38. data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/filter.js +288 -0
  39. data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/fragment.js +518 -0
  40. data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/text.js +53 -0
  41. data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser.js +224 -0
  42. data/app/assets/javascripts/esp-ckeditor/_source/core/lang.js +157 -0
  43. data/app/assets/javascripts/esp-ckeditor/_source/core/loader.js +240 -0
  44. data/app/assets/javascripts/esp-ckeditor/_source/core/plugindefinition.js +83 -0
  45. data/app/assets/javascripts/esp-ckeditor/_source/core/plugins.js +103 -0
  46. data/app/assets/javascripts/esp-ckeditor/_source/core/resourcemanager.js +238 -0
  47. data/app/assets/javascripts/esp-ckeditor/_source/core/scriptloader.js +180 -0
  48. data/app/assets/javascripts/esp-ckeditor/_source/core/skins.js +184 -0
  49. data/app/assets/javascripts/esp-ckeditor/_source/core/themes.js +19 -0
  50. data/app/assets/javascripts/esp-ckeditor/_source/core/tools.js +763 -0
  51. data/app/assets/javascripts/esp-ckeditor/_source/core/ui.js +128 -0
  52. data/app/assets/javascripts/esp-ckeditor/_source/lang/_languages.js +27 -0
  53. data/app/assets/javascripts/esp-ckeditor/_source/lang/en.js +815 -0
  54. data/app/assets/javascripts/esp-ckeditor/_source/lang/ru.js +815 -0
  55. data/app/assets/javascripts/esp-ckeditor/_source/plugins/a11yhelp/dialogs/a11yhelp.js +222 -0
  56. data/app/assets/javascripts/esp-ckeditor/_source/plugins/a11yhelp/lang/en.js +108 -0
  57. data/app/assets/javascripts/esp-ckeditor/_source/plugins/a11yhelp/lang/he.js +216 -0
  58. data/app/assets/javascripts/esp-ckeditor/_source/plugins/a11yhelp/plugin.js +47 -0
  59. data/app/assets/javascripts/esp-ckeditor/_source/plugins/basicstyles/plugin.js +129 -0
  60. data/app/assets/javascripts/esp-ckeditor/_source/plugins/button/plugin.js +290 -0
  61. data/app/assets/javascripts/esp-ckeditor/_source/plugins/clipboard/dialogs/paste.js +223 -0
  62. data/app/assets/javascripts/esp-ckeditor/_source/plugins/clipboard/plugin.js +453 -0
  63. data/app/assets/javascripts/esp-ckeditor/_source/plugins/contextmenu/plugin.js +179 -0
  64. data/app/assets/javascripts/esp-ckeditor/_source/plugins/dialog/dialogDefinition.js +1166 -0
  65. data/app/assets/javascripts/esp-ckeditor/_source/plugins/dialog/plugin.js +3308 -0
  66. data/app/assets/javascripts/esp-ckeditor/_source/plugins/dialogadvtab/plugin.js +208 -0
  67. data/app/assets/javascripts/esp-ckeditor/_source/plugins/dialogui/plugin.js +1541 -0
  68. data/app/assets/javascripts/esp-ckeditor/_source/plugins/domiterator/plugin.js +361 -0
  69. data/app/assets/javascripts/esp-ckeditor/_source/plugins/editingblock/plugin.js +278 -0
  70. data/app/assets/javascripts/esp-ckeditor/_source/plugins/elementspath/plugin.js +218 -0
  71. data/app/assets/javascripts/esp-ckeditor/_source/plugins/enterkey/plugin.js +433 -0
  72. data/app/assets/javascripts/esp-ckeditor/_source/plugins/entities/plugin.js +250 -0
  73. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/dialogs/esp_attachment.js +234 -0
  74. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/images/esp_attachment.png +0 -0
  75. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/lang/en.js +22 -0
  76. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/lang/ru.js +22 -0
  77. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/lang/uk.js +22 -0
  78. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/plugin.js +23 -0
  79. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/dialogs/esp_audio.js +207 -0
  80. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/images/esp_audio.png +0 -0
  81. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/images/placeholder.png +0 -0
  82. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/lang/en.js +18 -0
  83. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/lang/ru.js +18 -0
  84. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/lang/uk.js +18 -0
  85. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/plugin.js +182 -0
  86. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_blockquote/dialogs/esp_blockquote.js +132 -0
  87. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_blockquote/plugin.js +235 -0
  88. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/dialogs/esp_image.js +1414 -0
  89. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/images/esp_image.png +0 -0
  90. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/lang/en.js +9 -0
  91. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/lang/ru.js +9 -0
  92. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/lang/uk.js +9 -0
  93. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/plugin.js +80 -0
  94. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/dialogs/esp_anchor.js +145 -0
  95. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/dialogs/esp_link.js +1396 -0
  96. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/images/anchor.png +0 -0
  97. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/images/esp_anchor.png +0 -0
  98. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/images/esp_link.png +0 -0
  99. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/images/esp_unlink.png +0 -0
  100. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/lang/en.js +8 -0
  101. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/lang/ru.js +8 -0
  102. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/lang/uk.js +8 -0
  103. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/plugin.js +379 -0
  104. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_address.png +0 -0
  105. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_blockquote.png +0 -0
  106. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_div.png +0 -0
  107. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h1.png +0 -0
  108. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h2.png +0 -0
  109. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h3.png +0 -0
  110. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h4.png +0 -0
  111. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h5.png +0 -0
  112. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h6.png +0 -0
  113. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_p.png +0 -0
  114. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_pre.png +0 -0
  115. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/esp_showblocks.png +0 -0
  116. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/plugin.js +163 -0
  117. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/dialogs/esp_video.js +277 -0
  118. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/images/esp_video.png +0 -0
  119. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/images/placeholder.png +0 -0
  120. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/lang/en.js +19 -0
  121. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/lang/ru.js +19 -0
  122. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/lang/uk.js +19 -0
  123. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/plugin.js +182 -0
  124. data/app/assets/javascripts/esp-ckeditor/_source/plugins/fakeobjects/plugin.js +175 -0
  125. data/app/assets/javascripts/esp-ckeditor/_source/plugins/filebrowser/plugin.js +534 -0
  126. data/app/assets/javascripts/esp-ckeditor/_source/plugins/find/dialogs/find.js +915 -0
  127. data/app/assets/javascripts/esp-ckeditor/_source/plugins/find/plugin.js +47 -0
  128. data/app/assets/javascripts/esp-ckeditor/_source/plugins/floatpanel/plugin.js +428 -0
  129. data/app/assets/javascripts/esp-ckeditor/_source/plugins/format/plugin.js +197 -0
  130. data/app/assets/javascripts/esp-ckeditor/_source/plugins/htmldataprocessor/plugin.js +596 -0
  131. data/app/assets/javascripts/esp-ckeditor/_source/plugins/htmlwriter/plugin.js +319 -0
  132. data/app/assets/javascripts/esp-ckeditor/_source/plugins/image/dialogs/image.js +1407 -0
  133. data/app/assets/javascripts/esp-ckeditor/_source/plugins/image/plugin.js +81 -0
  134. data/app/assets/javascripts/esp-ckeditor/_source/plugins/indent/plugin.js +461 -0
  135. data/app/assets/javascripts/esp-ckeditor/_source/plugins/justify/plugin.js +253 -0
  136. data/app/assets/javascripts/esp-ckeditor/_source/plugins/keystrokes/plugin.js +225 -0
  137. data/app/assets/javascripts/esp-ckeditor/_source/plugins/list/plugin.js +774 -0
  138. data/app/assets/javascripts/esp-ckeditor/_source/plugins/listblock/plugin.js +266 -0
  139. data/app/assets/javascripts/esp-ckeditor/_source/plugins/liststyle/dialogs/liststyle.js +225 -0
  140. data/app/assets/javascripts/esp-ckeditor/_source/plugins/liststyle/plugin.js +66 -0
  141. data/app/assets/javascripts/esp-ckeditor/_source/plugins/maximize/plugin.js +353 -0
  142. data/app/assets/javascripts/esp-ckeditor/_source/plugins/menu/plugin.js +541 -0
  143. data/app/assets/javascripts/esp-ckeditor/_source/plugins/panel/plugin.js +400 -0
  144. data/app/assets/javascripts/esp-ckeditor/_source/plugins/pastefromword/filter/default.js +1367 -0
  145. data/app/assets/javascripts/esp-ckeditor/_source/plugins/pastefromword/plugin.js +141 -0
  146. data/app/assets/javascripts/esp-ckeditor/_source/plugins/pastetext/dialogs/pastetext.js +67 -0
  147. data/app/assets/javascripts/esp-ckeditor/_source/plugins/pastetext/plugin.js +98 -0
  148. data/app/assets/javascripts/esp-ckeditor/_source/plugins/popup/plugin.js +64 -0
  149. data/app/assets/javascripts/esp-ckeditor/_source/plugins/removeformat/plugin.js +185 -0
  150. data/app/assets/javascripts/esp-ckeditor/_source/plugins/resize/plugin.js +168 -0
  151. data/app/assets/javascripts/esp-ckeditor/_source/plugins/richcombo/plugin.js +381 -0
  152. data/app/assets/javascripts/esp-ckeditor/_source/plugins/selection/plugin.js +1729 -0
  153. data/app/assets/javascripts/esp-ckeditor/_source/plugins/showborders/plugin.js +207 -0
  154. data/app/assets/javascripts/esp-ckeditor/_source/plugins/sourcearea/plugin.js +209 -0
  155. data/app/assets/javascripts/esp-ckeditor/_source/plugins/styles/plugin.js +1700 -0
  156. data/app/assets/javascripts/esp-ckeditor/_source/plugins/styles/styles/default.js +88 -0
  157. data/app/assets/javascripts/esp-ckeditor/_source/plugins/stylescombo/plugin.js +218 -0
  158. data/app/assets/javascripts/esp-ckeditor/_source/plugins/tab/plugin.js +367 -0
  159. data/app/assets/javascripts/esp-ckeditor/_source/plugins/table/dialogs/table.js +623 -0
  160. data/app/assets/javascripts/esp-ckeditor/_source/plugins/table/plugin.js +78 -0
  161. data/app/assets/javascripts/esp-ckeditor/_source/plugins/tabletools/dialogs/tableCell.js +525 -0
  162. data/app/assets/javascripts/esp-ckeditor/_source/plugins/tabletools/plugin.js +1194 -0
  163. data/app/assets/javascripts/esp-ckeditor/_source/plugins/toolbar/plugin.js +545 -0
  164. data/app/assets/javascripts/esp-ckeditor/_source/plugins/undo/plugin.js +578 -0
  165. data/app/assets/javascripts/esp-ckeditor/_source/plugins/wysiwygarea/plugin.js +1347 -0
  166. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/dialog.css +988 -0
  167. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/editor.css +25 -0
  168. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/elementspath.css +73 -0
  169. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/icons.css +367 -0
  170. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/icons.png +0 -0
  171. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/icons_rtl.png +0 -0
  172. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/dialog_sides.gif +0 -0
  173. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/dialog_sides.png +0 -0
  174. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/dialog_sides_rtl.png +0 -0
  175. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/mini.gif +0 -0
  176. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/noimage.png +0 -0
  177. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/sprites.png +0 -0
  178. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/sprites_ie6.png +0 -0
  179. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/toolbar_start.gif +0 -0
  180. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/mainui.css +209 -0
  181. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/menu.css +232 -0
  182. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/panel.css +227 -0
  183. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/presets.css +49 -0
  184. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/reset.css +85 -0
  185. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/richcombo.css +287 -0
  186. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/skin.js +236 -0
  187. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/templates.css +88 -0
  188. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/toolbar.css +412 -0
  189. data/app/assets/javascripts/esp-ckeditor/_source/themes/default/theme.js +407 -0
  190. data/app/assets/javascripts/esp-ckeditor/application.js +8 -0
  191. data/app/assets/javascripts/esp-ckeditor/ckeditor.js +137 -0
  192. data/app/assets/javascripts/esp-ckeditor/ckeditor.pack +194 -0
  193. data/app/assets/javascripts/esp-ckeditor/ckeditor_source.js +35 -0
  194. data/app/assets/javascripts/esp-ckeditor/ckpackager.jar +0 -0
  195. data/app/assets/javascripts/esp-ckeditor/ckpackager.txt +2 -0
  196. data/app/assets/javascripts/esp-ckeditor/config.js +147 -0
  197. data/app/assets/javascripts/esp-ckeditor/contents.css +38 -0
  198. data/app/assets/javascripts/esp-ckeditor/images/spacer.gif +0 -0
  199. data/app/assets/javascripts/esp-ckeditor/init_ckeditor.js +1 -0
  200. data/app/assets/javascripts/esp-ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +1 -0
  201. data/app/assets/javascripts/esp-ckeditor/plugins/a11yhelp/lang/en.js +1 -0
  202. data/app/assets/javascripts/esp-ckeditor/plugins/a11yhelp/lang/he.js +1 -0
  203. data/app/assets/javascripts/esp-ckeditor/plugins/a11yhelp/plugin.js +1 -0
  204. data/app/assets/javascripts/esp-ckeditor/plugins/basicstyles/plugin.js +1 -0
  205. data/app/assets/javascripts/esp-ckeditor/plugins/button/plugin.js +1 -0
  206. data/app/assets/javascripts/esp-ckeditor/plugins/clipboard/dialogs/paste.js +1 -0
  207. data/app/assets/javascripts/esp-ckeditor/plugins/clipboard/plugin.js +1 -0
  208. data/app/assets/javascripts/esp-ckeditor/plugins/contextmenu/plugin.js +1 -0
  209. data/app/assets/javascripts/esp-ckeditor/plugins/dialog/dialogDefinition.js +0 -0
  210. data/app/assets/javascripts/esp-ckeditor/plugins/dialog/plugin.js +1 -0
  211. data/app/assets/javascripts/esp-ckeditor/plugins/dialogadvtab/plugin.js +1 -0
  212. data/app/assets/javascripts/esp-ckeditor/plugins/dialogui/plugin.js +1 -0
  213. data/app/assets/javascripts/esp-ckeditor/plugins/domiterator/plugin.js +1 -0
  214. data/app/assets/javascripts/esp-ckeditor/plugins/editingblock/plugin.js +1 -0
  215. data/app/assets/javascripts/esp-ckeditor/plugins/elementspath/plugin.js +1 -0
  216. data/app/assets/javascripts/esp-ckeditor/plugins/enterkey/plugin.js +1 -0
  217. data/app/assets/javascripts/esp-ckeditor/plugins/entities/plugin.js +1 -0
  218. data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/dialogs/esp_attachment.js +1 -0
  219. data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/images/esp_attachment.png +0 -0
  220. data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/lang/en.js +1 -0
  221. data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/lang/ru.js +1 -0
  222. data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/lang/uk.js +1 -0
  223. data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/plugin.js +1 -0
  224. data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/dialogs/esp_audio.js +1 -0
  225. data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/images/esp_audio.png +0 -0
  226. data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/images/placeholder.png +0 -0
  227. data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/lang/en.js +1 -0
  228. data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/lang/ru.js +1 -0
  229. data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/lang/uk.js +1 -0
  230. data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/plugin.js +1 -0
  231. data/app/assets/javascripts/esp-ckeditor/plugins/esp_blockquote/dialogs/esp_blockquote.js +1 -0
  232. data/app/assets/javascripts/esp-ckeditor/plugins/esp_blockquote/plugin.js +1 -0
  233. data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/dialogs/esp_image.js +1 -0
  234. data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/images/esp_image.png +0 -0
  235. data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/lang/en.js +1 -0
  236. data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/lang/ru.js +1 -0
  237. data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/lang/uk.js +1 -0
  238. data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/plugin.js +1 -0
  239. data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/dialogs/esp_anchor.js +1 -0
  240. data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/dialogs/esp_link.js +1 -0
  241. data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/images/anchor.png +0 -0
  242. data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/images/esp_anchor.png +0 -0
  243. data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/images/esp_link.png +0 -0
  244. data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/images/esp_unlink.png +0 -0
  245. data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/lang/en.js +1 -0
  246. data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/lang/ru.js +1 -0
  247. data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/lang/uk.js +1 -0
  248. data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/plugin.js +1 -0
  249. data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_address.png +0 -0
  250. data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_blockquote.png +0 -0
  251. data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_div.png +0 -0
  252. data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h1.png +0 -0
  253. data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h2.png +0 -0
  254. data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h3.png +0 -0
  255. data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h4.png +0 -0
  256. data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h5.png +0 -0
  257. data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h6.png +0 -0
  258. data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_p.png +0 -0
  259. data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_pre.png +0 -0
  260. data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/esp_showblocks.png +0 -0
  261. data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/plugin.js +1 -0
  262. data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/dialogs/esp_video.js +1 -0
  263. data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/images/esp_video.png +0 -0
  264. data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/images/placeholder.png +0 -0
  265. data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/lang/en.js +1 -0
  266. data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/lang/ru.js +1 -0
  267. data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/lang/uk.js +1 -0
  268. data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/plugin.js +1 -0
  269. data/app/assets/javascripts/esp-ckeditor/plugins/fakeobjects/plugin.js +1 -0
  270. data/app/assets/javascripts/esp-ckeditor/plugins/filebrowser/plugin.js +1 -0
  271. data/app/assets/javascripts/esp-ckeditor/plugins/find/dialogs/find.js +1 -0
  272. data/app/assets/javascripts/esp-ckeditor/plugins/find/plugin.js +1 -0
  273. data/app/assets/javascripts/esp-ckeditor/plugins/floatpanel/plugin.js +1 -0
  274. data/app/assets/javascripts/esp-ckeditor/plugins/format/plugin.js +1 -0
  275. data/app/assets/javascripts/esp-ckeditor/plugins/htmldataprocessor/plugin.js +1 -0
  276. data/app/assets/javascripts/esp-ckeditor/plugins/htmlwriter/plugin.js +1 -0
  277. data/app/assets/javascripts/esp-ckeditor/plugins/image/dialogs/image.js +1 -0
  278. data/app/assets/javascripts/esp-ckeditor/plugins/image/plugin.js +1 -0
  279. data/app/assets/javascripts/esp-ckeditor/plugins/indent/plugin.js +1 -0
  280. data/app/assets/javascripts/esp-ckeditor/plugins/justify/plugin.js +1 -0
  281. data/app/assets/javascripts/esp-ckeditor/plugins/keystrokes/plugin.js +1 -0
  282. data/app/assets/javascripts/esp-ckeditor/plugins/list/plugin.js +1 -0
  283. data/app/assets/javascripts/esp-ckeditor/plugins/listblock/plugin.js +1 -0
  284. data/app/assets/javascripts/esp-ckeditor/plugins/liststyle/dialogs/liststyle.js +1 -0
  285. data/app/assets/javascripts/esp-ckeditor/plugins/liststyle/plugin.js +1 -0
  286. data/app/assets/javascripts/esp-ckeditor/plugins/maximize/plugin.js +1 -0
  287. data/app/assets/javascripts/esp-ckeditor/plugins/menu/plugin.js +1 -0
  288. data/app/assets/javascripts/esp-ckeditor/plugins/panel/plugin.js +1 -0
  289. data/app/assets/javascripts/esp-ckeditor/plugins/pastefromword/filter/default.js +1 -0
  290. data/app/assets/javascripts/esp-ckeditor/plugins/pastefromword/plugin.js +1 -0
  291. data/app/assets/javascripts/esp-ckeditor/plugins/pastetext/dialogs/pastetext.js +1 -0
  292. data/app/assets/javascripts/esp-ckeditor/plugins/pastetext/plugin.js +1 -0
  293. data/app/assets/javascripts/esp-ckeditor/plugins/popup/plugin.js +1 -0
  294. data/app/assets/javascripts/esp-ckeditor/plugins/removeformat/plugin.js +1 -0
  295. data/app/assets/javascripts/esp-ckeditor/plugins/resize/plugin.js +1 -0
  296. data/app/assets/javascripts/esp-ckeditor/plugins/richcombo/plugin.js +1 -0
  297. data/app/assets/javascripts/esp-ckeditor/plugins/selection/plugin.js +1 -0
  298. data/app/assets/javascripts/esp-ckeditor/plugins/showborders/plugin.js +1 -0
  299. data/app/assets/javascripts/esp-ckeditor/plugins/sourcearea/plugin.js +1 -0
  300. data/app/assets/javascripts/esp-ckeditor/plugins/styles/plugin.js +1 -0
  301. data/app/assets/javascripts/esp-ckeditor/plugins/styles/styles/default.js +1 -0
  302. data/app/assets/javascripts/esp-ckeditor/plugins/stylescombo/plugin.js +1 -0
  303. data/app/assets/javascripts/esp-ckeditor/plugins/tab/plugin.js +1 -0
  304. data/app/assets/javascripts/esp-ckeditor/plugins/table/dialogs/table.js +1 -0
  305. data/app/assets/javascripts/esp-ckeditor/plugins/table/plugin.js +1 -0
  306. data/app/assets/javascripts/esp-ckeditor/plugins/tabletools/dialogs/tableCell.js +1 -0
  307. data/app/assets/javascripts/esp-ckeditor/plugins/tabletools/plugin.js +1 -0
  308. data/app/assets/javascripts/esp-ckeditor/plugins/toolbar/plugin.js +1 -0
  309. data/app/assets/javascripts/esp-ckeditor/plugins/undo/plugin.js +1 -0
  310. data/app/assets/javascripts/esp-ckeditor/plugins/wysiwygarea/plugin.js +1 -0
  311. data/app/assets/javascripts/esp-ckeditor/skins/kama/dialog.css +988 -0
  312. data/app/assets/javascripts/esp-ckeditor/skins/kama/editor.css +25 -0
  313. data/app/assets/javascripts/esp-ckeditor/skins/kama/elementspath.css +73 -0
  314. data/app/assets/javascripts/esp-ckeditor/skins/kama/icons.css +367 -0
  315. data/app/assets/javascripts/esp-ckeditor/skins/kama/icons.png +0 -0
  316. data/app/assets/javascripts/esp-ckeditor/skins/kama/icons_rtl.png +0 -0
  317. data/app/assets/javascripts/esp-ckeditor/skins/kama/images/dialog_sides.gif +0 -0
  318. data/app/assets/javascripts/esp-ckeditor/skins/kama/images/dialog_sides.png +0 -0
  319. data/app/assets/javascripts/esp-ckeditor/skins/kama/images/dialog_sides_rtl.png +0 -0
  320. data/app/assets/javascripts/esp-ckeditor/skins/kama/images/mini.gif +0 -0
  321. data/app/assets/javascripts/esp-ckeditor/skins/kama/images/noimage.png +0 -0
  322. data/app/assets/javascripts/esp-ckeditor/skins/kama/images/sprites.png +0 -0
  323. data/app/assets/javascripts/esp-ckeditor/skins/kama/images/sprites_ie6.png +0 -0
  324. data/app/assets/javascripts/esp-ckeditor/skins/kama/images/toolbar_start.gif +0 -0
  325. data/app/assets/javascripts/esp-ckeditor/skins/kama/mainui.css +209 -0
  326. data/app/assets/javascripts/esp-ckeditor/skins/kama/menu.css +232 -0
  327. data/app/assets/javascripts/esp-ckeditor/skins/kama/panel.css +227 -0
  328. data/app/assets/javascripts/esp-ckeditor/skins/kama/presets.css +49 -0
  329. data/app/assets/javascripts/esp-ckeditor/skins/kama/reset.css +85 -0
  330. data/app/assets/javascripts/esp-ckeditor/skins/kama/richcombo.css +287 -0
  331. data/app/assets/javascripts/esp-ckeditor/skins/kama/skin.js +236 -0
  332. data/app/assets/javascripts/esp-ckeditor/skins/kama/templates.css +88 -0
  333. data/app/assets/javascripts/esp-ckeditor/skins/kama/toolbar.css +412 -0
  334. data/app/inputs/ckeditor_input.rb +42 -0
  335. data/config/routes.rb +2 -0
  336. data/lib/esp-ckeditor/engine.rb +9 -0
  337. data/lib/esp-ckeditor/version.rb +3 -0
  338. data/lib/esp-ckeditor.rb +17 -0
  339. data/lib/tasks/esp-ckeditor_tasks.rake +4 -0
  340. metadata +434 -0
@@ -0,0 +1,78 @@
1
+ /*
2
+ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.html or http://ckeditor.com/license
4
+ */
5
+
6
+ CKEDITOR.plugins.add( 'table',
7
+ {
8
+ init : function( editor )
9
+ {
10
+ var table = CKEDITOR.plugins.table,
11
+ lang = editor.lang.table;
12
+
13
+ editor.addCommand( 'table', new CKEDITOR.dialogCommand( 'table' ) );
14
+ editor.addCommand( 'tableProperties', new CKEDITOR.dialogCommand( 'tableProperties' ) );
15
+
16
+ editor.ui.addButton( 'Table',
17
+ {
18
+ label : lang.toolbar,
19
+ command : 'table'
20
+ });
21
+
22
+ CKEDITOR.dialog.add( 'table', this.path + 'dialogs/table.js' );
23
+ CKEDITOR.dialog.add( 'tableProperties', this.path + 'dialogs/table.js' );
24
+
25
+ // If the "menu" plugin is loaded, register the menu items.
26
+ if ( editor.addMenuItems )
27
+ {
28
+ editor.addMenuItems(
29
+ {
30
+ table :
31
+ {
32
+ label : lang.menu,
33
+ command : 'tableProperties',
34
+ group : 'table',
35
+ order : 5
36
+ },
37
+
38
+ tabledelete :
39
+ {
40
+ label : lang.deleteTable,
41
+ command : 'tableDelete',
42
+ group : 'table',
43
+ order : 1
44
+ }
45
+ } );
46
+ }
47
+
48
+ editor.on( 'doubleclick', function( evt )
49
+ {
50
+ var element = evt.data.element;
51
+
52
+ if ( element.is( 'table' ) )
53
+ evt.data.dialog = 'tableProperties';
54
+ });
55
+
56
+ // If the "contextmenu" plugin is loaded, register the listeners.
57
+ if ( editor.contextMenu )
58
+ {
59
+ editor.contextMenu.addListener( function( element, selection )
60
+ {
61
+ if ( !element || element.isReadOnly() )
62
+ return null;
63
+
64
+ var isTable = element.hasAscendant( 'table', 1 );
65
+
66
+ if ( isTable )
67
+ {
68
+ return {
69
+ tabledelete : CKEDITOR.TRISTATE_OFF,
70
+ table : CKEDITOR.TRISTATE_OFF
71
+ };
72
+ }
73
+
74
+ return null;
75
+ } );
76
+ }
77
+ }
78
+ } );
@@ -0,0 +1,525 @@
1
+ /*
2
+ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.html or http://ckeditor.com/license
4
+ */
5
+
6
+ CKEDITOR.dialog.add( 'cellProperties', function( editor )
7
+ {
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';
17
+
18
+ /**
19
+ *
20
+ * @param dialogName
21
+ * @param callback [ childDialog ]
22
+ */
23
+ function getDialogValue( dialogName, callback )
24
+ {
25
+ var onOk = function()
26
+ {
27
+ releaseHandlers( this );
28
+ callback( this, this._.parentDialog );
29
+ this._.parentDialog.changeFocus( true );
30
+ };
31
+ var onCancel = function()
32
+ {
33
+ releaseHandlers( this );
34
+ this._.parentDialog.changeFocus();
35
+ };
36
+ var releaseHandlers = function( dialog )
37
+ {
38
+ dialog.removeListener( 'ok', onOk );
39
+ dialog.removeListener( 'cancel', onCancel );
40
+ };
41
+ var bindToDialog = function( dialog )
42
+ {
43
+ dialog.on( 'ok', onOk );
44
+ dialog.on( 'cancel', onCancel );
45
+ };
46
+ editor.execCommand( dialogName );
47
+ if ( editor._.storedDialogs.colordialog )
48
+ bindToDialog( editor._.storedDialogs.colordialog );
49
+ else
50
+ {
51
+ CKEDITOR.on( 'dialogDefinition', function( e )
52
+ {
53
+ if ( e.data.name != dialogName )
54
+ return;
55
+
56
+ var definition = e.data.definition;
57
+
58
+ e.removeListener();
59
+ definition.onLoad = CKEDITOR.tools.override( definition.onLoad, function( orginal )
60
+ {
61
+ return function()
62
+ {
63
+ bindToDialog( this );
64
+ definition.onLoad = orginal;
65
+ if ( typeof orginal == 'function' )
66
+ orginal.call( this );
67
+ };
68
+ } );
69
+ });
70
+ }
71
+ }
72
+
73
+ return {
74
+ title : langCell.title,
75
+ minWidth : CKEDITOR.env.ie && CKEDITOR.env.quirks? 450 : 410,
76
+ minHeight : CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks )? 230 : 200,
77
+ contents : [
78
+ {
79
+ id : 'info',
80
+ label : langCell.title,
81
+ accessKey : 'I',
82
+ elements :
83
+ [
84
+ {
85
+ type : 'hbox',
86
+ widths : [ '40%', '5%', '40%' ],
87
+ children :
88
+ [
89
+ {
90
+ type : 'vbox',
91
+ padding : 0,
92
+ children :
93
+ [
94
+ {
95
+ type : 'hbox',
96
+ widths : [ '70%', '30%' ],
97
+ children :
98
+ [
99
+ {
100
+ type : 'text',
101
+ id : 'width',
102
+ width: '100px',
103
+ label : langCommon.width,
104
+ validate : validate[ 'number' ]( langCell.invalidWidth ),
105
+
106
+ // Extra labelling of width unit type.
107
+ onLoad : function()
108
+ {
109
+ var widthType = this.getDialog().getContentElement( 'info', 'widthType' ),
110
+ labelElement = widthType.getElement(),
111
+ inputElement = this.getInputElement(),
112
+ ariaLabelledByAttr = inputElement.getAttribute( 'aria-labelledby' );
113
+
114
+ inputElement.setAttribute( 'aria-labelledby', [ ariaLabelledByAttr, labelElement.$.id ].join( ' ' ) );
115
+ },
116
+
117
+ setup : function( element )
118
+ {
119
+ var widthAttr = parseInt( element.getAttribute( 'width' ), 10 ),
120
+ widthStyle = parseInt( element.getStyle( 'width' ), 10 );
121
+
122
+ !isNaN( widthAttr ) && this.setValue( widthAttr );
123
+ !isNaN( widthStyle ) && this.setValue( widthStyle );
124
+ },
125
+ commit : function( element )
126
+ {
127
+ var value = parseInt( this.getValue(), 10 ),
128
+ unit = this.getDialog().getValueOf( 'info', 'widthType' );
129
+
130
+ if ( !isNaN( value ) )
131
+ element.setStyle( 'width', value + unit );
132
+ else
133
+ element.removeStyle( 'width' );
134
+
135
+ element.removeAttribute( 'width' );
136
+ },
137
+ 'default' : ''
138
+ },
139
+ {
140
+ type : 'select',
141
+ id : 'widthType',
142
+ label : editor.lang.table.widthUnit,
143
+ labelStyle: 'visibility:hidden',
144
+ 'default' : 'px',
145
+ items :
146
+ [
147
+ [ langTable.widthPx, 'px' ],
148
+ [ langTable.widthPc, '%' ]
149
+ ],
150
+ setup : function( selectedCell )
151
+ {
152
+ var widthMatch = widthPattern.exec( selectedCell.getStyle( 'width' ) || selectedCell.getAttribute( 'width' ) );
153
+ if ( widthMatch )
154
+ this.setValue( widthMatch[2] );
155
+ }
156
+ }
157
+ ]
158
+ },
159
+ {
160
+ type : 'hbox',
161
+ widths : [ '70%', '30%' ],
162
+ children :
163
+ [
164
+ {
165
+ type : 'text',
166
+ id : 'height',
167
+ label : langCommon.height,
168
+ width: '100px',
169
+ 'default' : '',
170
+ validate : validate[ 'number' ]( langCell.invalidHeight ),
171
+
172
+ // Extra labelling of height unit type.
173
+ onLoad : function()
174
+ {
175
+ var heightType = this.getDialog().getContentElement( 'info', 'htmlHeightType' ),
176
+ labelElement = heightType.getElement(),
177
+ inputElement = this.getInputElement(),
178
+ ariaLabelledByAttr = inputElement.getAttribute( 'aria-labelledby' );
179
+
180
+ inputElement.setAttribute( 'aria-labelledby', [ ariaLabelledByAttr, labelElement.$.id ].join( ' ' ) );
181
+ },
182
+
183
+ setup : function( element )
184
+ {
185
+ var heightAttr = parseInt( element.getAttribute( 'height' ), 10 ),
186
+ heightStyle = parseInt( element.getStyle( 'height' ), 10 );
187
+
188
+ !isNaN( heightAttr ) && this.setValue( heightAttr );
189
+ !isNaN( heightStyle ) && this.setValue( heightStyle );
190
+ },
191
+ commit : function( element )
192
+ {
193
+ var value = parseInt( this.getValue(), 10 );
194
+
195
+ if ( !isNaN( value ) )
196
+ element.setStyle( 'height', CKEDITOR.tools.cssLength( value ) );
197
+ else
198
+ element.removeStyle( 'height' );
199
+
200
+ element.removeAttribute( 'height' );
201
+ }
202
+ },
203
+ {
204
+ id : 'htmlHeightType',
205
+ type : 'html',
206
+ html : '<br />'+ langTable.widthPx
207
+ }
208
+ ]
209
+ },
210
+ spacer,
211
+ {
212
+ type : 'select',
213
+ id : 'wordWrap',
214
+ label : langCell.wordWrap,
215
+ 'default' : 'yes',
216
+ items :
217
+ [
218
+ [ langCell.yes, 'yes' ],
219
+ [ langCell.no, 'no' ]
220
+ ],
221
+ setup : function( element )
222
+ {
223
+ var wordWrapAttr = element.getAttribute( 'noWrap' ),
224
+ wordWrapStyle = element.getStyle( 'white-space' );
225
+
226
+ if ( wordWrapStyle == 'nowrap' || wordWrapAttr )
227
+ this.setValue( 'no' );
228
+ },
229
+ commit : function( element )
230
+ {
231
+ if ( this.getValue() == 'no' )
232
+ element.setStyle( 'white-space', 'nowrap' );
233
+ else
234
+ element.removeStyle( 'white-space' );
235
+
236
+ element.removeAttribute( 'noWrap' );
237
+ }
238
+ },
239
+ spacer,
240
+ {
241
+ type : 'select',
242
+ id : 'hAlign',
243
+ label : langCell.hAlign,
244
+ 'default' : '',
245
+ items :
246
+ [
247
+ [ langCommon.notSet, '' ],
248
+ [ langCommon.alignLeft, 'left' ],
249
+ [ langCommon.alignCenter, 'center' ],
250
+ [ langCommon.alignRight, 'right' ]
251
+ ],
252
+ setup : function( element )
253
+ {
254
+ var alignAttr = element.getAttribute( 'align' ),
255
+ textAlignStyle = element.getStyle( 'text-align');
256
+
257
+ this.setValue( textAlignStyle || alignAttr || '' );
258
+ },
259
+ commit : function( selectedCell )
260
+ {
261
+ var value = this.getValue();
262
+
263
+ if ( value )
264
+ selectedCell.setStyle( 'text-align', value );
265
+ else
266
+ selectedCell.removeStyle( 'text-align' );
267
+
268
+ selectedCell.removeAttribute( 'align' );
269
+ }
270
+ },
271
+ {
272
+ type : 'select',
273
+ id : 'vAlign',
274
+ label : langCell.vAlign,
275
+ 'default' : '',
276
+ items :
277
+ [
278
+ [ langCommon.notSet, '' ],
279
+ [ langCommon.alignTop, 'top' ],
280
+ [ langCommon.alignMiddle, 'middle' ],
281
+ [ langCommon.alignBottom, 'bottom' ],
282
+ [ langCell.alignBaseline, 'baseline' ]
283
+ ],
284
+ setup : function( element )
285
+ {
286
+ var vAlignAttr = element.getAttribute( 'vAlign' ),
287
+ vAlignStyle = element.getStyle( 'vertical-align' );
288
+
289
+ switch( vAlignStyle )
290
+ {
291
+ // Ignore all other unrelated style values..
292
+ case 'top':
293
+ case 'middle':
294
+ case 'bottom':
295
+ case 'baseline':
296
+ break;
297
+ default:
298
+ vAlignStyle = '';
299
+ }
300
+
301
+ this.setValue( vAlignStyle || vAlignAttr || '' );
302
+ },
303
+ commit : function( element )
304
+ {
305
+ var value = this.getValue();
306
+
307
+ if ( value )
308
+ element.setStyle( 'vertical-align', value );
309
+ else
310
+ element.removeStyle( 'vertical-align' );
311
+
312
+ element.removeAttribute( 'vAlign' );
313
+ }
314
+ }
315
+ ]
316
+ },
317
+ spacer,
318
+ {
319
+ type : 'vbox',
320
+ padding : 0,
321
+ children :
322
+ [
323
+ {
324
+ type : 'select',
325
+ id : 'cellType',
326
+ label : langCell.cellType,
327
+ 'default' : 'td',
328
+ items :
329
+ [
330
+ [ langCell.data, 'td' ],
331
+ [ langCell.header, 'th' ]
332
+ ],
333
+ setup : function( selectedCell )
334
+ {
335
+ this.setValue( selectedCell.getName() );
336
+ },
337
+ commit : function( selectedCell )
338
+ {
339
+ selectedCell.renameNode( this.getValue() );
340
+ }
341
+ },
342
+ spacer,
343
+ {
344
+ type : 'text',
345
+ id : 'rowSpan',
346
+ label : langCell.rowSpan,
347
+ 'default' : '',
348
+ validate : validate.integer( langCell.invalidRowSpan ),
349
+ setup : function( selectedCell )
350
+ {
351
+ var attrVal = parseInt( selectedCell.getAttribute( 'rowSpan' ), 10 );
352
+ if ( attrVal && attrVal != 1 )
353
+ this.setValue( attrVal );
354
+ },
355
+ commit : function( selectedCell )
356
+ {
357
+ var value = parseInt( this.getValue(), 10 );
358
+ if ( value && value != 1 )
359
+ selectedCell.setAttribute( 'rowSpan', this.getValue() );
360
+ else
361
+ selectedCell.removeAttribute( 'rowSpan' );
362
+ }
363
+ },
364
+ {
365
+ type : 'text',
366
+ id : 'colSpan',
367
+ label : langCell.colSpan,
368
+ 'default' : '',
369
+ validate : validate.integer( langCell.invalidColSpan ),
370
+ setup : function( element )
371
+ {
372
+ var attrVal = parseInt( element.getAttribute( 'colSpan' ), 10 );
373
+ if ( attrVal && attrVal != 1 )
374
+ this.setValue( attrVal );
375
+ },
376
+ commit : function( selectedCell )
377
+ {
378
+ var value = parseInt( this.getValue(), 10 );
379
+ if ( value && value != 1 )
380
+ selectedCell.setAttribute( 'colSpan', this.getValue() );
381
+ else
382
+ selectedCell.removeAttribute( 'colSpan' );
383
+ }
384
+ },
385
+ spacer,
386
+ {
387
+ type : 'hbox',
388
+ padding : 0,
389
+ widths : [ '60%', '40%' ],
390
+ children :
391
+ [
392
+ {
393
+ type : 'text',
394
+ id : 'bgColor',
395
+ label : langCell.bgColor,
396
+ 'default' : '',
397
+ setup : function( element )
398
+ {
399
+ var bgColorAttr = element.getAttribute( 'bgColor' ),
400
+ bgColorStyle = element.getStyle( 'background-color' );
401
+
402
+ this.setValue( bgColorStyle || bgColorAttr );
403
+ },
404
+ commit : function( selectedCell )
405
+ {
406
+ var value = this.getValue();
407
+
408
+ if ( value )
409
+ selectedCell.setStyle( 'background-color', this.getValue() );
410
+ else
411
+ selectedCell.removeStyle( 'background-color' );
412
+
413
+ selectedCell.removeAttribute( 'bgColor');
414
+ }
415
+ },
416
+ {
417
+ type : 'button',
418
+ id : 'bgColorChoose',
419
+ "class" : 'colorChooser',
420
+ label : langCell.chooseColor,
421
+ onLoad : function()
422
+ {
423
+ // Stick the element to the bottom (#5587)
424
+ this.getElement().getParent().setStyle( 'vertical-align', 'bottom' );
425
+ },
426
+ onClick : function()
427
+ {
428
+ var self = this;
429
+ getDialogValue( 'colordialog', function( colorDialog )
430
+ {
431
+ self.getDialog().getContentElement( 'info', 'bgColor' ).setValue(
432
+ colorDialog.getContentElement( 'picker', 'selectedColor' ).getValue()
433
+ );
434
+ } );
435
+ }
436
+ }
437
+ ]
438
+ },
439
+ spacer,
440
+ {
441
+ type : 'hbox',
442
+ padding : 0,
443
+ widths : [ '60%', '40%' ],
444
+ children :
445
+ [
446
+ {
447
+ type : 'text',
448
+ id : 'borderColor',
449
+ label : langCell.borderColor,
450
+ 'default' : '',
451
+ setup : function( element )
452
+ {
453
+ var borderColorAttr = element.getAttribute( 'borderColor' ),
454
+ borderColorStyle = element.getStyle( 'border-color' );
455
+
456
+ this.setValue( borderColorStyle || borderColorAttr );
457
+ },
458
+ commit : function( selectedCell )
459
+ {
460
+ var value = this.getValue();
461
+ if ( value )
462
+ selectedCell.setStyle( 'border-color', this.getValue() );
463
+ else
464
+ selectedCell.removeStyle( 'border-color' );
465
+
466
+ selectedCell.removeAttribute( 'borderColor');
467
+ }
468
+ },
469
+ {
470
+ type : 'button',
471
+ id : 'borderColorChoose',
472
+ "class" : 'colorChooser',
473
+ label : langCell.chooseColor,
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
+ },
480
+ onClick : function()
481
+ {
482
+ var self = this;
483
+ getDialogValue( 'colordialog', function( colorDialog )
484
+ {
485
+ self.getDialog().getContentElement( 'info', 'borderColor' ).setValue(
486
+ colorDialog.getContentElement( 'picker', 'selectedColor' ).getValue()
487
+ );
488
+ } );
489
+ }
490
+ }
491
+ ]
492
+ }
493
+ ]
494
+ }
495
+ ]
496
+ }
497
+ ]
498
+ }
499
+ ],
500
+ onShow : function()
501
+ {
502
+ this.cells = CKEDITOR.plugins.tabletools.getSelectedCells(
503
+ this._.editor.getSelection() );
504
+ this.setupContent( this.cells[ 0 ] );
505
+ },
506
+ onOk : function()
507
+ {
508
+ var selection = this._.editor.getSelection(),
509
+ bookmarks = selection.createBookmarks();
510
+
511
+ var cells = this.cells;
512
+ for ( var i = 0 ; i < cells.length ; i++ )
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 } );
523
+ }
524
+ };
525
+ } );