radiant-ck_editor_filter-extension 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (577) hide show
  1. data/LICENSE +21 -0
  2. data/README.markdown +55 -0
  3. data/Rakefile +138 -0
  4. data/VERSION +1 -0
  5. data/app/models/ckeditor_interface.rb +15 -0
  6. data/app/views/admin/assets/_asset.html.haml +19 -0
  7. data/app/views/admin/pages/_editor_control.html.haml +1 -0
  8. data/ck_editor_filter_extension.rb +25 -0
  9. data/ckeditor.html +0 -0
  10. data/cucumber.yml +1 -0
  11. data/features/support/env.rb +16 -0
  12. data/features/support/paths.rb +14 -0
  13. data/lib/ck_editor_filter.rb +7 -0
  14. data/lib/tasks/ck_editor_filter_extension_tasks.rake +28 -0
  15. data/public/images/admin/tmp_thumbnail_icon.png +0 -0
  16. data/public/javascripts/extensions/ck_editor_filter/ckeditor/.htaccess +24 -0
  17. data/public/javascripts/extensions/ck_editor_filter/ckeditor/CHANGES.html +538 -0
  18. data/public/javascripts/extensions/ck_editor_filter/ckeditor/INSTALL.html +92 -0
  19. data/public/javascripts/extensions/ck_editor_filter/ckeditor/LICENSE.html +1334 -0
  20. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/ajax.html +100 -0
  21. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/api.html +152 -0
  22. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/api_dialog.html +181 -0
  23. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/api_dialog/my_dialog.js +28 -0
  24. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/divreplace.html +137 -0
  25. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/enterkey.html +88 -0
  26. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/fullpage.html +62 -0
  27. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/index.html +53 -0
  28. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/jqueryadapter.html +73 -0
  29. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/advanced.php +93 -0
  30. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/events.php +130 -0
  31. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/replace.php +63 -0
  32. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/replaceall.php +68 -0
  33. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/standalone.php +64 -0
  34. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/replacebyclass.html +49 -0
  35. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/replacebycode.html +80 -0
  36. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/sample.css +81 -0
  37. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/sample.js +65 -0
  38. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/sample_posteddata.php +59 -0
  39. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/sharedspaces.html +131 -0
  40. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/skins.html +83 -0
  41. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/ui_color.html +87 -0
  42. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/ui_languages.html +104 -0
  43. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/adapters/jquery.js +297 -0
  44. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/_bootstrap.js +84 -0
  45. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ajax.js +143 -0
  46. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ckeditor.js +103 -0
  47. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ckeditor_base.js +190 -0
  48. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ckeditor_basic.js +241 -0
  49. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/command.js +73 -0
  50. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/commanddefinition.js +86 -0
  51. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/config.js +307 -0
  52. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dataprocessor.js +66 -0
  53. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom.js +21 -0
  54. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/comment.js +32 -0
  55. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/document.js +224 -0
  56. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/documentfragment.js +49 -0
  57. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/domobject.js +210 -0
  58. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/element.js +1441 -0
  59. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/elementpath.js +104 -0
  60. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/event.js +142 -0
  61. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/node.js +662 -0
  62. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/nodelist.js +23 -0
  63. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/range.js +1735 -0
  64. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/text.js +123 -0
  65. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/walker.js +451 -0
  66. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/window.js +96 -0
  67. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dtd.js +233 -0
  68. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/editor.js +720 -0
  69. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/editor_basic.js +179 -0
  70. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/env.js +219 -0
  71. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/event.js +336 -0
  72. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/eventInfo.js +120 -0
  73. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/focusmanager.js +137 -0
  74. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser.js +212 -0
  75. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/basicwriter.js +145 -0
  76. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/cdata.js +43 -0
  77. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/comment.js +60 -0
  78. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/element.js +240 -0
  79. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/filter.js +262 -0
  80. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/fragment.js +495 -0
  81. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/text.js +55 -0
  82. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/imagecacher.js +58 -0
  83. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/lang.js +152 -0
  84. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/loader.js +242 -0
  85. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/plugindefinition.js +66 -0
  86. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/plugins.js +85 -0
  87. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/resourcemanager.js +238 -0
  88. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/scriptloader.js +198 -0
  89. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/skins.js +204 -0
  90. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/themes.js +19 -0
  91. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/tools.js +685 -0
  92. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ui.js +116 -0
  93. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/xml.js +165 -0
  94. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/_languages.js +83 -0
  95. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/_translationstatus.txt +60 -0
  96. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/af.js +699 -0
  97. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ar.js +699 -0
  98. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/bg.js +699 -0
  99. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/bn.js +699 -0
  100. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/bs.js +699 -0
  101. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ca.js +699 -0
  102. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/cs.js +699 -0
  103. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/cy.js +699 -0
  104. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/da.js +699 -0
  105. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/de.js +699 -0
  106. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/el.js +699 -0
  107. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/en-au.js +699 -0
  108. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/en-ca.js +699 -0
  109. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/en-gb.js +699 -0
  110. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/en.js +699 -0
  111. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/eo.js +699 -0
  112. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/es.js +699 -0
  113. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/et.js +699 -0
  114. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/eu.js +699 -0
  115. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fa.js +699 -0
  116. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fi.js +699 -0
  117. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fo.js +699 -0
  118. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fr-ca.js +699 -0
  119. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fr.js +699 -0
  120. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/gl.js +699 -0
  121. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/gu.js +699 -0
  122. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/he.js +699 -0
  123. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/hi.js +699 -0
  124. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/hr.js +699 -0
  125. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/hu.js +699 -0
  126. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/is.js +699 -0
  127. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/it.js +699 -0
  128. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ja.js +699 -0
  129. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/km.js +699 -0
  130. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ko.js +699 -0
  131. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/lt.js +699 -0
  132. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/lv.js +699 -0
  133. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/mn.js +699 -0
  134. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ms.js +699 -0
  135. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/nb.js +699 -0
  136. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/nl.js +699 -0
  137. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/no.js +699 -0
  138. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/pl.js +699 -0
  139. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/pt-br.js +699 -0
  140. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/pt.js +699 -0
  141. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ro.js +699 -0
  142. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ru.js +699 -0
  143. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sk.js +699 -0
  144. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sl.js +699 -0
  145. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sr-latn.js +699 -0
  146. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sr.js +699 -0
  147. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sv.js +699 -0
  148. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/th.js +699 -0
  149. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/tr.js +699 -0
  150. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/uk.js +699 -0
  151. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/vi.js +699 -0
  152. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/zh-cn.js +699 -0
  153. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/zh.js +699 -0
  154. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/a11yhelp/dialogs/a11yhelp.js +211 -0
  155. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/a11yhelp/lang/en.js +108 -0
  156. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/a11yhelp/plugin.js +46 -0
  157. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/about/dialogs/about.js +73 -0
  158. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/about/dialogs/logo_ckeditor.png +0 -0
  159. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/about/plugin.js +23 -0
  160. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/basicstyles/plugin.js +93 -0
  161. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/blockquote/plugin.js +301 -0
  162. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/button/plugin.js +270 -0
  163. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/clipboard/dialogs/paste.js +186 -0
  164. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/clipboard/plugin.js +382 -0
  165. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/colorbutton/plugin.js +227 -0
  166. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/colordialog/dialogs/colordialog.js +191 -0
  167. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/colordialog/plugin.js +13 -0
  168. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/contextmenu/plugin.js +274 -0
  169. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/dialog/dialogDefinition.js +315 -0
  170. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/dialog/plugin.js +2884 -0
  171. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/dialogui/plugin.js +1408 -0
  172. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/div/dialogs/div.js +535 -0
  173. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/div/plugin.js +121 -0
  174. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/domiterator/plugin.js +355 -0
  175. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/editingblock/plugin.js +224 -0
  176. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/elementspath/plugin.js +189 -0
  177. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/enterkey/plugin.js +329 -0
  178. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/entities/plugin.js +200 -0
  179. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/fakeobjects/plugin.js +120 -0
  180. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/filebrowser/plugin.js +479 -0
  181. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/find/dialogs/find.js +853 -0
  182. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/find/plugin.js +46 -0
  183. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/flash/dialogs/flash.js +690 -0
  184. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/flash/images/placeholder.png +0 -0
  185. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/flash/plugin.js +165 -0
  186. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/floatpanel/plugin.js +376 -0
  187. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/font/plugin.js +233 -0
  188. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/format/plugin.js +193 -0
  189. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/button.js +135 -0
  190. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/checkbox.js +143 -0
  191. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/form.js +177 -0
  192. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/hiddenfield.js +91 -0
  193. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/radio.js +135 -0
  194. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/select.js +556 -0
  195. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/textarea.js +114 -0
  196. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/textfield.js +193 -0
  197. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/plugin.js +217 -0
  198. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/horizontalrule/plugin.js +36 -0
  199. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/htmldataprocessor/plugin.js +458 -0
  200. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/htmlwriter/plugin.js +314 -0
  201. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/iframedialog/plugin.js +136 -0
  202. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/image/dialogs/image.js +1378 -0
  203. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/image/plugin.js +64 -0
  204. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/indent/plugin.js +349 -0
  205. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/justify/plugin.js +168 -0
  206. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/keystrokes/plugin.js +229 -0
  207. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/link/dialogs/anchor.js +99 -0
  208. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/link/dialogs/link.js +1421 -0
  209. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/link/images/anchor.gif +0 -0
  210. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/link/plugin.js +188 -0
  211. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/list/plugin.js +643 -0
  212. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/listblock/plugin.js +252 -0
  213. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/maximize/plugin.js +283 -0
  214. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/menu/plugin.js +406 -0
  215. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/menubutton/plugin.js +93 -0
  216. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/newpage/plugin.js +54 -0
  217. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pagebreak/images/pagebreak.gif +0 -0
  218. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pagebreak/plugin.js +98 -0
  219. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/panel/plugin.js +379 -0
  220. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/panelbutton/plugin.js +147 -0
  221. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pastefromword/filter/default.js +1179 -0
  222. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pastefromword/plugin.js +120 -0
  223. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pastetext/dialogs/pastetext.js +77 -0
  224. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pastetext/plugin.js +162 -0
  225. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/popup/plugin.js +62 -0
  226. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/preview/plugin.js +108 -0
  227. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/print/plugin.js +41 -0
  228. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/removeformat/plugin.js +132 -0
  229. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/resize/plugin.js +115 -0
  230. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/richcombo/plugin.js +367 -0
  231. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/save/plugin.js +55 -0
  232. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/scayt/dialogs/options.js +533 -0
  233. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/scayt/dialogs/toolbar.css +71 -0
  234. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/scayt/plugin.js +603 -0
  235. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/selection/plugin.js +1103 -0
  236. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_address.png +0 -0
  237. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_blockquote.png +0 -0
  238. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_div.png +0 -0
  239. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h1.png +0 -0
  240. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h2.png +0 -0
  241. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h3.png +0 -0
  242. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h4.png +0 -0
  243. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h5.png +0 -0
  244. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h6.png +0 -0
  245. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_p.png +0 -0
  246. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_pre.png +0 -0
  247. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/plugin.js +154 -0
  248. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showborders/plugin.js +170 -0
  249. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/dialogs/smiley.js +215 -0
  250. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/angel_smile.gif +0 -0
  251. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/angry_smile.gif +0 -0
  252. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/broken_heart.gif +0 -0
  253. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/confused_smile.gif +0 -0
  254. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/cry_smile.gif +0 -0
  255. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/devil_smile.gif +0 -0
  256. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/embaressed_smile.gif +0 -0
  257. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/envelope.gif +0 -0
  258. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/heart.gif +0 -0
  259. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/kiss.gif +0 -0
  260. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/lightbulb.gif +0 -0
  261. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/omg_smile.gif +0 -0
  262. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/regular_smile.gif +0 -0
  263. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/sad_smile.gif +0 -0
  264. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/shades_smile.gif +0 -0
  265. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/teeth_smile.gif +0 -0
  266. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/thumbs_down.gif +0 -0
  267. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/thumbs_up.gif +0 -0
  268. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/tounge_smile.gif +0 -0
  269. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
  270. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/wink_smile.gif +0 -0
  271. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/plugin.js +85 -0
  272. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/sourcearea/plugin.js +205 -0
  273. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/specialchar/dialogs/specialchar.js +373 -0
  274. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/specialchar/plugin.js +29 -0
  275. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/styles/plugin.js +1258 -0
  276. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/stylescombo/plugin.js +282 -0
  277. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/stylescombo/styles/default.js +85 -0
  278. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/tab/plugin.js +261 -0
  279. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/table/dialogs/table.js +589 -0
  280. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/table/plugin.js +70 -0
  281. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/tabletools/dialogs/tableCell.js +523 -0
  282. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/tabletools/plugin.js +1022 -0
  283. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/dialogs/templates.js +229 -0
  284. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/plugin.js +100 -0
  285. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/templates/default.js +94 -0
  286. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/templates/images/template1.gif +0 -0
  287. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/templates/images/template2.gif +0 -0
  288. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/templates/images/template3.gif +0 -0
  289. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/toolbar/plugin.js +474 -0
  290. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/dialogs/uicolor.js +204 -0
  291. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/lang/en.js +15 -0
  292. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/plugin.js +37 -0
  293. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/uicolor.gif +0 -0
  294. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/yui/assets/hue_bg.png +0 -0
  295. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
  296. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/yui/assets/picker_mask.png +0 -0
  297. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
  298. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/yui/assets/yui.css +15 -0
  299. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/yui/yui.js +71 -0
  300. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/undo/plugin.js +519 -0
  301. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/dialogs/ciframe.html +49 -0
  302. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/dialogs/tmpFrameset.html +52 -0
  303. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/dialogs/wsc.css +83 -0
  304. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/dialogs/wsc.js +176 -0
  305. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/plugin.js +33 -0
  306. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wysiwygarea/plugin.js +851 -0
  307. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/dialog.css +822 -0
  308. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/editor.css +25 -0
  309. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/elementspath.css +72 -0
  310. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/icons.css +326 -0
  311. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/icons.png +0 -0
  312. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/images/dialog_sides.gif +0 -0
  313. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/images/dialog_sides.png +0 -0
  314. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/images/dialog_sides_rtl.png +0 -0
  315. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/images/mini.gif +0 -0
  316. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/images/noimage.png +0 -0
  317. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/images/sprites.png +0 -0
  318. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/images/sprites_ie6.png +0 -0
  319. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/images/toolbar_start.gif +0 -0
  320. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/mainui.css +183 -0
  321. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/menu.css +211 -0
  322. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/panel.css +216 -0
  323. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/presets.css +49 -0
  324. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/reset.css +78 -0
  325. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/richcombo.css +270 -0
  326. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/skin.js +268 -0
  327. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/templates.css +84 -0
  328. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/toolbar.css +421 -0
  329. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/dialog.css +728 -0
  330. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/editor.css +25 -0
  331. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/elementspath.css +73 -0
  332. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/icons.css +324 -0
  333. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/icons.png +0 -0
  334. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/images/dialog_sides.gif +0 -0
  335. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/images/dialog_sides.png +0 -0
  336. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/images/dialog_sides_rtl.png +0 -0
  337. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/images/mini.gif +0 -0
  338. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/images/noimage.png +0 -0
  339. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/images/sprites.png +0 -0
  340. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/images/sprites_ie6.png +0 -0
  341. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/mainui.css +127 -0
  342. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/menu.css +207 -0
  343. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/panel.css +211 -0
  344. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/presets.css +49 -0
  345. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/reset.css +78 -0
  346. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/richcombo.css +289 -0
  347. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/skin.js +81 -0
  348. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/templates.css +81 -0
  349. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/toolbar.css +475 -0
  350. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/dialog.css +743 -0
  351. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/editor.css +25 -0
  352. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/elementspath.css +73 -0
  353. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/icons.css +324 -0
  354. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/icons.png +0 -0
  355. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/images/dialog_sides.gif +0 -0
  356. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/images/dialog_sides.png +0 -0
  357. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/images/dialog_sides_rtl.png +0 -0
  358. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/images/mini.gif +0 -0
  359. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/images/noimage.png +0 -0
  360. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/images/sprites.png +0 -0
  361. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/images/sprites_ie6.png +0 -0
  362. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/images/toolbar_start.gif +0 -0
  363. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/mainui.css +142 -0
  364. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/menu.css +210 -0
  365. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/panel.css +211 -0
  366. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/presets.css +50 -0
  367. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/reset.css +78 -0
  368. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/richcombo.css +289 -0
  369. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/skin.js +77 -0
  370. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/templates.css +81 -0
  371. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/toolbar.css +425 -0
  372. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/themes/default/theme.js +334 -0
  373. data/public/javascripts/extensions/ck_editor_filter/ckeditor/adapters/jquery.js +6 -0
  374. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor.js +121 -0
  375. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor.pack +205 -0
  376. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor.php +29 -0
  377. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_basic.js +8 -0
  378. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_basic_source.js +20 -0
  379. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_php4.php +593 -0
  380. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_php5.php +583 -0
  381. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_source.js +25 -0
  382. data/public/javascripts/extensions/ck_editor_filter/ckeditor/config.js +11 -0
  383. data/public/javascripts/extensions/ck_editor_filter/ckeditor/contents.css +35 -0
  384. data/public/javascripts/extensions/ck_editor_filter/ckeditor/images/spacer.gif +0 -0
  385. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/_languages.js +6 -0
  386. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/_translationstatus.txt +60 -0
  387. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/af.js +6 -0
  388. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ar.js +6 -0
  389. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/bg.js +6 -0
  390. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/bn.js +6 -0
  391. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/bs.js +6 -0
  392. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ca.js +6 -0
  393. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/cs.js +6 -0
  394. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/cy.js +6 -0
  395. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/da.js +6 -0
  396. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/de.js +6 -0
  397. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/el.js +6 -0
  398. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en-au.js +6 -0
  399. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en-ca.js +6 -0
  400. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en-gb.js +6 -0
  401. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en.js +6 -0
  402. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/eo.js +6 -0
  403. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/es.js +6 -0
  404. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/et.js +6 -0
  405. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/eu.js +6 -0
  406. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fa.js +6 -0
  407. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fi.js +6 -0
  408. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fo.js +6 -0
  409. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fr-ca.js +6 -0
  410. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fr.js +6 -0
  411. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/gl.js +6 -0
  412. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/gu.js +6 -0
  413. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/he.js +6 -0
  414. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/hi.js +6 -0
  415. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/hr.js +6 -0
  416. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/hu.js +6 -0
  417. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/is.js +6 -0
  418. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/it.js +6 -0
  419. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ja.js +6 -0
  420. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/km.js +6 -0
  421. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ko.js +6 -0
  422. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/lt.js +6 -0
  423. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/lv.js +6 -0
  424. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/mn.js +6 -0
  425. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ms.js +6 -0
  426. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/nb.js +6 -0
  427. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/nl.js +6 -0
  428. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/no.js +6 -0
  429. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/pl.js +6 -0
  430. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/pt-br.js +6 -0
  431. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/pt.js +6 -0
  432. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ro.js +6 -0
  433. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ru.js +6 -0
  434. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sk.js +6 -0
  435. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sl.js +6 -0
  436. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sr-latn.js +6 -0
  437. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sr.js +6 -0
  438. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sv.js +6 -0
  439. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/th.js +6 -0
  440. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/tr.js +6 -0
  441. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/uk.js +6 -0
  442. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/vi.js +6 -0
  443. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/zh-cn.js +6 -0
  444. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/zh.js +6 -0
  445. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/MediaEmbed/dialogs/mediaembed.html +14 -0
  446. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/MediaEmbed/images/icon.gif +0 -0
  447. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/MediaEmbed/plugin.js +61 -0
  448. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +7 -0
  449. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/lang/en.js +6 -0
  450. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/about/dialogs/about.js +6 -0
  451. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  452. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/clipboard/dialogs/paste.js +7 -0
  453. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/colordialog/dialogs/colordialog.js +6 -0
  454. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
  455. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/div/dialogs/div.js +7 -0
  456. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/find/dialogs/find.js +9 -0
  457. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/flash/dialogs/flash.js +9 -0
  458. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/flash/images/placeholder.png +0 -0
  459. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/button.js +6 -0
  460. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/checkbox.js +6 -0
  461. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/form.js +6 -0
  462. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/hiddenfield.js +6 -0
  463. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/radio.js +6 -0
  464. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/select.js +9 -0
  465. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/textarea.js +6 -0
  466. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/textfield.js +6 -0
  467. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/iframedialog/plugin.js +6 -0
  468. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image/dialogs/image.js +13 -0
  469. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/link/dialogs/anchor.js +6 -0
  470. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/link/dialogs/link.js +11 -0
  471. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/link/images/anchor.gif +0 -0
  472. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
  473. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/paperclipped/images/icon.png +0 -0
  474. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/paperclipped/plugin.js +21 -0
  475. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/pastefromword/filter/default.js +10 -0
  476. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/pastetext/dialogs/pastetext.js +6 -0
  477. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/scayt/dialogs/options.js +8 -0
  478. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/scayt/dialogs/toolbar.css +6 -0
  479. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_address.png +0 -0
  480. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
  481. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_div.png +0 -0
  482. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
  483. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
  484. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
  485. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
  486. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
  487. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
  488. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_p.png +0 -0
  489. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
  490. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/dialogs/smiley.js +7 -0
  491. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
  492. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
  493. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
  494. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
  495. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
  496. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
  497. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
  498. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/envelope.gif +0 -0
  499. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/heart.gif +0 -0
  500. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/kiss.gif +0 -0
  501. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
  502. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
  503. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
  504. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
  505. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
  506. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
  507. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
  508. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
  509. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
  510. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
  511. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
  512. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/specialchar.js +7 -0
  513. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/stylescombo/styles/default.js +6 -0
  514. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/table/dialogs/table.js +9 -0
  515. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/tabletools/dialogs/tableCell.js +8 -0
  516. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/dialogs/templates.js +7 -0
  517. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/templates/default.js +6 -0
  518. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
  519. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
  520. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
  521. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/dialogs/uicolor.js +7 -0
  522. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/lang/en.js +6 -0
  523. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/plugin.js +6 -0
  524. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/uicolor.gif +0 -0
  525. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/assets/hue_bg.png +0 -0
  526. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
  527. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/assets/picker_mask.png +0 -0
  528. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
  529. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/assets/yui.css +6 -0
  530. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/yui.js +76 -0
  531. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/ciframe.html +49 -0
  532. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
  533. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/wsc.css +6 -0
  534. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/wsc.js +7 -0
  535. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/dialog.css +9 -0
  536. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/editor.css +12 -0
  537. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/icons.png +0 -0
  538. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/dialog_sides.gif +0 -0
  539. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/dialog_sides.png +0 -0
  540. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/dialog_sides_rtl.png +0 -0
  541. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/mini.gif +0 -0
  542. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/noimage.png +0 -0
  543. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/sprites.png +0 -0
  544. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/sprites_ie6.png +0 -0
  545. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/toolbar_start.gif +0 -0
  546. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/skin.js +7 -0
  547. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/templates.css +6 -0
  548. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/dialog.css +9 -0
  549. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/editor.css +13 -0
  550. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/icons.png +0 -0
  551. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/dialog_sides.gif +0 -0
  552. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/dialog_sides.png +0 -0
  553. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/dialog_sides_rtl.png +0 -0
  554. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/mini.gif +0 -0
  555. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/noimage.png +0 -0
  556. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/sprites.png +0 -0
  557. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/sprites_ie6.png +0 -0
  558. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/skin.js +6 -0
  559. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/templates.css +6 -0
  560. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/dialog.css +8 -0
  561. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/editor.css +12 -0
  562. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/icons.png +0 -0
  563. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/dialog_sides.gif +0 -0
  564. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/dialog_sides.png +0 -0
  565. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/dialog_sides_rtl.png +0 -0
  566. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/mini.gif +0 -0
  567. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/noimage.png +0 -0
  568. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/sprites.png +0 -0
  569. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/sprites_ie6.png +0 -0
  570. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/toolbar_start.gif +0 -0
  571. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/skin.js +6 -0
  572. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/templates.css +6 -0
  573. data/public/javascripts/extensions/ck_editor_filter/ckeditor/themes/default/theme.js +8 -0
  574. data/public/javascripts/extensions/ck_editor_filter/radiant.ckeditor.js +83 -0
  575. data/spec/spec.opts +6 -0
  576. data/spec/spec_helper.rb +36 -0
  577. metadata +658 -0
@@ -0,0 +1,1378 @@
1
+ /*
2
+ Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.html or http://ckeditor.com/license
4
+ */
5
+
6
+ (function()
7
+ {
8
+ // Load image preview.
9
+ var IMAGE = 1,
10
+ LINK = 2,
11
+ PREVIEW = 4,
12
+ CLEANUP = 8,
13
+ regexGetSize = /^\s*(\d+)((px)|\%)?\s*$/i,
14
+ regexGetSizeOrEmpty = /(^\s*(\d+)((px)|\%)?\s*$)|^$/i,
15
+ pxLengthRegex = /^\d+px$/;
16
+
17
+ var onSizeChange = function()
18
+ {
19
+ var value = this.getValue(), // This = input element.
20
+ dialog = this.getDialog(),
21
+ aMatch = value.match( regexGetSize ); // Check value
22
+ if ( aMatch )
23
+ {
24
+ if ( aMatch[2] == '%' ) // % is allowed - > unlock ratio.
25
+ switchLockRatio( dialog, false ); // Unlock.
26
+ value = aMatch[1];
27
+ }
28
+
29
+ // Only if ratio is locked
30
+ if ( dialog.lockRatio )
31
+ {
32
+ var oImageOriginal = dialog.originalElement;
33
+ if ( oImageOriginal.getCustomData( 'isReady' ) == 'true' )
34
+ {
35
+ if ( this.id == 'txtHeight' )
36
+ {
37
+ if ( value && value != '0' )
38
+ value = Math.round( oImageOriginal.$.width * ( value / oImageOriginal.$.height ) );
39
+ if ( !isNaN( value ) )
40
+ dialog.setValueOf( 'info', 'txtWidth', value );
41
+ }
42
+ else //this.id = txtWidth.
43
+ {
44
+ if ( value && value != '0' )
45
+ value = Math.round( oImageOriginal.$.height * ( value / oImageOriginal.$.width ) );
46
+ if ( !isNaN( value ) )
47
+ dialog.setValueOf( 'info', 'txtHeight', value );
48
+ }
49
+ }
50
+ }
51
+ updatePreview( dialog );
52
+ };
53
+
54
+ var updatePreview = function( dialog )
55
+ {
56
+ //Don't load before onShow.
57
+ if ( !dialog.originalElement || !dialog.preview )
58
+ return 1;
59
+
60
+ // Read attributes and update imagePreview;
61
+ dialog.commitContent( PREVIEW, dialog.preview );
62
+ return 0;
63
+ };
64
+
65
+ // Custom commit dialog logic, where we're intended to give inline style
66
+ // field (txtdlgGenStyle) higher priority to avoid overwriting styles contribute
67
+ // by other fields.
68
+ function commitContent()
69
+ {
70
+ var args = arguments;
71
+ var inlineStyleField = this.getContentElement( 'advanced', 'txtdlgGenStyle' );
72
+ inlineStyleField && inlineStyleField.commit.apply( inlineStyleField, args );
73
+
74
+ this.foreach( function( widget )
75
+ {
76
+ if ( widget.commit && widget.id != 'txtdlgGenStyle' )
77
+ widget.commit.apply( widget, args );
78
+ });
79
+ }
80
+
81
+ // Avoid recursions.
82
+ var incommit;
83
+
84
+ // Synchronous field values to other impacted fields is required, e.g. border
85
+ // size change should alter inline-style text as well.
86
+ function commitInternally( targetFields )
87
+ {
88
+ if ( incommit )
89
+ return;
90
+
91
+ incommit = 1;
92
+
93
+ var dialog = this.getDialog(),
94
+ element = dialog.imageElement;
95
+ if ( element )
96
+ {
97
+ // Commit this field and broadcast to target fields.
98
+ this.commit( IMAGE, element );
99
+
100
+ targetFields = [].concat( targetFields );
101
+ var length = targetFields.length,
102
+ field;
103
+ for ( var i = 0; i < length; i++ )
104
+ {
105
+ field = dialog.getContentElement.apply( dialog, targetFields[ i ].split( ':' ) );
106
+ // May cause recursion.
107
+ field && field.setup( IMAGE, element );
108
+ }
109
+ }
110
+
111
+ incommit = 0;
112
+ }
113
+
114
+ var switchLockRatio = function( dialog, value )
115
+ {
116
+ var oImageOriginal = dialog.originalElement,
117
+ ratioButton = CKEDITOR.document.getById( 'btnLockSizes' );
118
+
119
+ if ( oImageOriginal.getCustomData( 'isReady' ) == 'true' )
120
+ {
121
+ if ( value == 'check' ) // Check image ratio and original image ratio.
122
+ {
123
+ var width = dialog.getValueOf( 'info', 'txtWidth' ),
124
+ height = dialog.getValueOf( 'info', 'txtHeight' ),
125
+ originalRatio = oImageOriginal.$.width * 1000 / oImageOriginal.$.height,
126
+ thisRatio = width * 1000 / height;
127
+ dialog.lockRatio = false; // Default: unlock ratio
128
+
129
+ if ( !width && !height )
130
+ dialog.lockRatio = true;
131
+ else if ( !isNaN( originalRatio ) && !isNaN( thisRatio ) )
132
+ {
133
+ if ( Math.round( originalRatio ) == Math.round( thisRatio ) )
134
+ dialog.lockRatio = true;
135
+ }
136
+ }
137
+ else if ( value != undefined )
138
+ dialog.lockRatio = value;
139
+ else
140
+ dialog.lockRatio = !dialog.lockRatio;
141
+ }
142
+ else if ( value != 'check' ) // I can't lock ratio if ratio is unknown.
143
+ dialog.lockRatio = false;
144
+
145
+ if ( dialog.lockRatio )
146
+ ratioButton.removeClass( 'cke_btn_unlocked' );
147
+ else
148
+ ratioButton.addClass( 'cke_btn_unlocked' );
149
+
150
+ var lang = dialog._.editor.lang.image,
151
+ label = lang[ dialog.lockRatio ? 'unlockRatio' : 'lockRatio' ];
152
+
153
+ ratioButton.setAttribute( 'title', label );
154
+ ratioButton.getFirst().setText( label );
155
+
156
+ return dialog.lockRatio;
157
+ };
158
+
159
+ var resetSize = function( dialog )
160
+ {
161
+ var oImageOriginal = dialog.originalElement;
162
+ if ( oImageOriginal.getCustomData( 'isReady' ) == 'true' )
163
+ {
164
+ dialog.setValueOf( 'info', 'txtWidth', oImageOriginal.$.width );
165
+ dialog.setValueOf( 'info', 'txtHeight', oImageOriginal.$.height );
166
+ }
167
+ updatePreview( dialog );
168
+ };
169
+
170
+ var setupDimension = function( type, element )
171
+ {
172
+ if ( type != IMAGE )
173
+ return;
174
+
175
+ function checkDimension( size, defaultValue )
176
+ {
177
+ var aMatch = size.match( regexGetSize );
178
+ if ( aMatch )
179
+ {
180
+ if ( aMatch[2] == '%' ) // % is allowed.
181
+ {
182
+ aMatch[1] += '%';
183
+ switchLockRatio( dialog, false ); // Unlock ratio
184
+ }
185
+ return aMatch[1];
186
+ }
187
+ return defaultValue;
188
+ }
189
+
190
+ var dialog = this.getDialog(),
191
+ value = '',
192
+ dimension = (( this.id == 'txtWidth' )? 'width' : 'height' ),
193
+ size = element.getAttribute( dimension );
194
+
195
+ if ( size )
196
+ value = checkDimension( size, value );
197
+ value = checkDimension( element.getStyle( dimension ), value );
198
+
199
+ this.setValue( value );
200
+ };
201
+
202
+ var imageDialog = function( editor, dialogType )
203
+ {
204
+ var previewPreloader;
205
+
206
+ var onImgLoadEvent = function()
207
+ {
208
+ // Image is ready.
209
+ var original = this.originalElement;
210
+ original.setCustomData( 'isReady', 'true' );
211
+ original.removeListener( 'load', onImgLoadEvent );
212
+ original.removeListener( 'error', onImgLoadErrorEvent );
213
+ original.removeListener( 'abort', onImgLoadErrorEvent );
214
+
215
+ // Hide loader
216
+ CKEDITOR.document.getById( 'ImagePreviewLoader' ).setStyle( 'display', 'none' );
217
+
218
+ // New image -> new domensions
219
+ if ( !this.dontResetSize )
220
+ resetSize( this );
221
+
222
+ if ( this.firstLoad )
223
+ CKEDITOR.tools.setTimeout( function(){ switchLockRatio( this, 'check' ); }, 0, this );
224
+
225
+ this.firstLoad = false;
226
+ this.dontResetSize = false;
227
+ };
228
+
229
+ var onImgLoadErrorEvent = function()
230
+ {
231
+ // Error. Image is not loaded.
232
+ var original = this.originalElement;
233
+ original.removeListener( 'load', onImgLoadEvent );
234
+ original.removeListener( 'error', onImgLoadErrorEvent );
235
+ original.removeListener( 'abort', onImgLoadErrorEvent );
236
+
237
+ // Set Error image.
238
+ var noimage = CKEDITOR.getUrl( editor.skinPath + 'images/noimage.png' );
239
+
240
+ if ( this.preview )
241
+ this.preview.setAttribute( 'src', noimage );
242
+
243
+ // Hide loader
244
+ CKEDITOR.document.getById( 'ImagePreviewLoader' ).setStyle( 'display', 'none' );
245
+ switchLockRatio( this, false ); // Unlock.
246
+ };
247
+ return {
248
+ title : ( dialogType == 'image' ) ? editor.lang.image.title : editor.lang.image.titleButton,
249
+ minWidth : 420,
250
+ minHeight : 310,
251
+ onShow : function()
252
+ {
253
+ this.imageElement = false;
254
+ this.linkElement = false;
255
+
256
+ // Default: create a new element.
257
+ this.imageEditMode = false;
258
+ this.linkEditMode = false;
259
+
260
+ this.lockRatio = true;
261
+ this.dontResetSize = false;
262
+ this.firstLoad = true;
263
+ this.addLink = false;
264
+
265
+ var editor = this.getParentEditor(),
266
+ sel = this.getParentEditor().getSelection(),
267
+ element = sel.getSelectedElement(),
268
+ link = element && element.getAscendant( 'a' );
269
+
270
+ //Hide loader.
271
+ CKEDITOR.document.getById( 'ImagePreviewLoader' ).setStyle( 'display', 'none' );
272
+ // Create the preview before setup the dialog contents.
273
+ previewPreloader = new CKEDITOR.dom.element( 'img', editor.document );
274
+ this.preview = CKEDITOR.document.getById( 'previewImage' );
275
+
276
+ // Copy of the image
277
+ this.originalElement = editor.document.createElement( 'img' );
278
+ this.originalElement.setAttribute( 'alt', '' );
279
+ this.originalElement.setCustomData( 'isReady', 'false' );
280
+
281
+ if ( link )
282
+ {
283
+ this.linkElement = link;
284
+ this.linkEditMode = true;
285
+
286
+ // Look for Image element.
287
+ var linkChildren = link.getChildren();
288
+ if ( linkChildren.count() == 1 ) // 1 child.
289
+ {
290
+ var childTagName = linkChildren.getItem( 0 ).getName();
291
+ if ( childTagName == 'img' || childTagName == 'input' )
292
+ {
293
+ this.imageElement = linkChildren.getItem( 0 );
294
+ if ( this.imageElement.getName() == 'img' )
295
+ this.imageEditMode = 'img';
296
+ else if ( this.imageElement.getName() == 'input' )
297
+ this.imageEditMode = 'input';
298
+ }
299
+ }
300
+ // Fill out all fields.
301
+ if ( dialogType == 'image' )
302
+ this.setupContent( LINK, link );
303
+ }
304
+
305
+ if ( element && element.getName() == 'img' && !element.getAttribute( '_cke_realelement' )
306
+ || element && element.getName() == 'input' && element.getAttribute( 'type' ) == 'image' )
307
+ {
308
+ this.imageEditMode = element.getName();
309
+ this.imageElement = element;
310
+ }
311
+
312
+ if ( this.imageEditMode )
313
+ {
314
+ // Use the original element as a buffer from since we don't want
315
+ // temporary changes to be committed, e.g. if the dialog is canceled.
316
+ this.cleanImageElement = this.imageElement;
317
+ this.imageElement = this.cleanImageElement.clone( true, true );
318
+
319
+ // Fill out all fields.
320
+ this.setupContent( IMAGE, this.imageElement );
321
+
322
+ // Refresh LockRatio button
323
+ switchLockRatio ( this, true );
324
+ }
325
+ else
326
+ this.imageElement = editor.document.createElement( 'img' );
327
+
328
+ // Dont show preview if no URL given.
329
+ if ( !CKEDITOR.tools.trim( this.getValueOf( 'info', 'txtUrl' ) ) )
330
+ {
331
+ this.preview.removeAttribute( 'src' );
332
+ this.preview.setStyle( 'display', 'none' );
333
+ }
334
+ },
335
+ onOk : function()
336
+ {
337
+ // Edit existing Image.
338
+ if ( this.imageEditMode )
339
+ {
340
+ var imgTagName = this.imageEditMode;
341
+
342
+ // Image dialog and Input element.
343
+ if ( dialogType == 'image' && imgTagName == 'input' && confirm( editor.lang.image.button2Img ) )
344
+ {
345
+ // Replace INPUT-> IMG
346
+ imgTagName = 'img';
347
+ this.imageElement = editor.document.createElement( 'img' );
348
+ this.imageElement.setAttribute( 'alt', '' );
349
+ editor.insertElement( this.imageElement );
350
+ }
351
+ // ImageButton dialog and Image element.
352
+ else if ( dialogType != 'image' && imgTagName == 'img' && confirm( editor.lang.image.img2Button ))
353
+ {
354
+ // Replace IMG -> INPUT
355
+ imgTagName = 'input';
356
+ this.imageElement = editor.document.createElement( 'input' );
357
+ this.imageElement.setAttributes(
358
+ {
359
+ type : 'image',
360
+ alt : ''
361
+ }
362
+ );
363
+ editor.insertElement( this.imageElement );
364
+ }
365
+ else
366
+ {
367
+ // Restore the original element before all commits.
368
+ this.imageElement = this.cleanImageElement;
369
+ delete this.cleanImageElement;
370
+ }
371
+ }
372
+ else // Create a new image.
373
+ {
374
+ // Image dialog -> create IMG element.
375
+ if ( dialogType == 'image' )
376
+ this.imageElement = editor.document.createElement( 'img' );
377
+ else
378
+ {
379
+ this.imageElement = editor.document.createElement( 'input' );
380
+ this.imageElement.setAttribute ( 'type' ,'image' );
381
+ }
382
+ this.imageElement.setAttribute( 'alt', '' );
383
+ }
384
+
385
+ // Create a new link.
386
+ if ( !this.linkEditMode )
387
+ this.linkElement = editor.document.createElement( 'a' );
388
+
389
+ // Set attributes.
390
+ this.commitContent( IMAGE, this.imageElement );
391
+ this.commitContent( LINK, this.linkElement );
392
+
393
+ // Remove empty style attribute.
394
+ if ( !this.imageElement.getAttribute( 'style' ) )
395
+ this.imageElement.removeAttribute( 'style' );
396
+
397
+ // Insert a new Image.
398
+ if ( !this.imageEditMode )
399
+ {
400
+ if ( this.addLink )
401
+ {
402
+ //Insert a new Link.
403
+ if ( !this.linkEditMode )
404
+ {
405
+ editor.insertElement(this.linkElement);
406
+ this.linkElement.append(this.imageElement, false);
407
+ }
408
+ else //Link already exists, image not.
409
+ editor.insertElement(this.imageElement );
410
+ }
411
+ else
412
+ editor.insertElement( this.imageElement );
413
+ }
414
+ else // Image already exists.
415
+ {
416
+ //Add a new link element.
417
+ if ( !this.linkEditMode && this.addLink )
418
+ {
419
+ editor.insertElement( this.linkElement );
420
+ this.imageElement.appendTo( this.linkElement );
421
+ }
422
+ //Remove Link, Image exists.
423
+ else if ( this.linkEditMode && !this.addLink )
424
+ {
425
+ editor.getSelection().selectElement( this.linkElement );
426
+ editor.insertElement( this.imageElement );
427
+ }
428
+ }
429
+ },
430
+ onLoad : function()
431
+ {
432
+ if ( dialogType != 'image' )
433
+ this.hidePage( 'Link' ); //Hide Link tab.
434
+ var doc = this._.element.getDocument();
435
+ this.addFocusable( doc.getById( 'btnResetSize' ), 5 );
436
+ this.addFocusable( doc.getById( 'btnLockSizes' ), 5 );
437
+
438
+ this.commitContent = commitContent;
439
+ },
440
+ onHide : function()
441
+ {
442
+ if ( this.preview )
443
+ this.commitContent( CLEANUP, this.preview );
444
+
445
+ if ( this.originalElement )
446
+ {
447
+ this.originalElement.removeListener( 'load', onImgLoadEvent );
448
+ this.originalElement.removeListener( 'error', onImgLoadErrorEvent );
449
+ this.originalElement.removeListener( 'abort', onImgLoadErrorEvent );
450
+ this.originalElement.remove();
451
+ this.originalElement = false; // Dialog is closed.
452
+ }
453
+
454
+ delete this.imageElement;
455
+ },
456
+ contents : [
457
+ {
458
+ id : 'info',
459
+ label : editor.lang.image.infoTab,
460
+ accessKey : 'I',
461
+ elements :
462
+ [
463
+ {
464
+ type : 'vbox',
465
+ padding : 0,
466
+ children :
467
+ [
468
+ {
469
+ type : 'hbox',
470
+ widths : [ '280px', '110px' ],
471
+ align : 'right',
472
+ children :
473
+ [
474
+ {
475
+ id : 'txtUrl',
476
+ type : 'text',
477
+ label : editor.lang.common.url,
478
+ required: true,
479
+ onChange : function()
480
+ {
481
+ var dialog = this.getDialog(),
482
+ newUrl = this.getValue();
483
+
484
+ //Update original image
485
+ if ( newUrl.length > 0 ) //Prevent from load before onShow
486
+ {
487
+ dialog = this.getDialog();
488
+ var original = dialog.originalElement;
489
+
490
+ dialog.preview.removeStyle( 'display' );
491
+
492
+ original.setCustomData( 'isReady', 'false' );
493
+ // Show loader
494
+ var loader = CKEDITOR.document.getById( 'ImagePreviewLoader' );
495
+ if ( loader )
496
+ loader.setStyle( 'display', '' );
497
+
498
+ original.on( 'load', onImgLoadEvent, dialog );
499
+ original.on( 'error', onImgLoadErrorEvent, dialog );
500
+ original.on( 'abort', onImgLoadErrorEvent, dialog );
501
+ original.setAttribute( 'src', newUrl );
502
+
503
+ // Query the preloader to figure out the url impacted by based href.
504
+ previewPreloader.setAttribute( 'src', newUrl );
505
+ dialog.preview.setAttribute( 'src', previewPreloader.$.src );
506
+ updatePreview( dialog );
507
+ }
508
+ // Dont show preview if no URL given.
509
+ else if ( dialog.preview )
510
+ {
511
+ dialog.preview.removeAttribute( 'src' );
512
+ dialog.preview.setStyle( 'display', 'none' );
513
+ }
514
+ },
515
+ setup : function( type, element )
516
+ {
517
+ if ( type == IMAGE )
518
+ {
519
+ var url = element.getAttribute( '_cke_saved_src' ) || element.getAttribute( 'src' );
520
+ var field = this;
521
+
522
+ this.getDialog().dontResetSize = true;
523
+
524
+ field.setValue( url ); // And call this.onChange()
525
+ // Manually set the initial value.(#4191)
526
+ field.setInitValue();
527
+ field.focus();
528
+ }
529
+ },
530
+ commit : function( type, element )
531
+ {
532
+ if ( type == IMAGE && ( this.getValue() || this.isChanged() ) )
533
+ {
534
+ element.setAttribute( '_cke_saved_src', decodeURI( this.getValue() ) );
535
+ element.setAttribute( 'src', decodeURI( this.getValue() ) );
536
+ }
537
+ else if ( type == CLEANUP )
538
+ {
539
+ element.setAttribute( 'src', '' ); // If removeAttribute doesn't work.
540
+ element.removeAttribute( 'src' );
541
+ }
542
+ },
543
+ validate : CKEDITOR.dialog.validate.notEmpty( editor.lang.image.urlMissing )
544
+ },
545
+ {
546
+ type : 'button',
547
+ id : 'browse',
548
+ // v-align with the 'txtUrl' field.
549
+ // TODO: We need something better than a fixed size here.
550
+ style : 'display:inline-block;margin-top:10px;',
551
+ align : 'center',
552
+ label : editor.lang.common.browseServer,
553
+ hidden : true,
554
+ filebrowser : 'info:txtUrl'
555
+ }
556
+ ]
557
+ }
558
+ ]
559
+ },
560
+ {
561
+ id : 'txtAlt',
562
+ type : 'text',
563
+ label : editor.lang.image.alt,
564
+ accessKey : 'A',
565
+ 'default' : '',
566
+ onChange : function()
567
+ {
568
+ updatePreview( this.getDialog() );
569
+ },
570
+ setup : function( type, element )
571
+ {
572
+ if ( type == IMAGE )
573
+ this.setValue( element.getAttribute( 'alt' ) );
574
+ },
575
+ commit : function( type, element )
576
+ {
577
+ if ( type == IMAGE )
578
+ {
579
+ if ( this.getValue() || this.isChanged() )
580
+ element.setAttribute( 'alt', this.getValue() );
581
+ }
582
+ else if ( type == PREVIEW )
583
+ {
584
+ element.setAttribute( 'alt', this.getValue() );
585
+ }
586
+ else if ( type == CLEANUP )
587
+ {
588
+ element.removeAttribute( 'alt' );
589
+ }
590
+ }
591
+ },
592
+ {
593
+ type : 'hbox',
594
+ widths : [ '140px', '240px' ],
595
+ children :
596
+ [
597
+ {
598
+ type : 'vbox',
599
+ padding : 10,
600
+ children :
601
+ [
602
+ {
603
+ type : 'hbox',
604
+ widths : [ '70%', '30%' ],
605
+ children :
606
+ [
607
+ {
608
+ type : 'vbox',
609
+ padding : 1,
610
+ children :
611
+ [
612
+ {
613
+ type : 'text',
614
+ width: '40px',
615
+ id : 'txtWidth',
616
+ labelLayout : 'horizontal',
617
+ label : editor.lang.image.width,
618
+ onKeyUp : onSizeChange,
619
+ onChange : function()
620
+ {
621
+ commitInternally.call( this, 'advanced:txtdlgGenStyle' );
622
+ },
623
+ validate : function()
624
+ {
625
+ var aMatch = this.getValue().match( regexGetSizeOrEmpty );
626
+ if ( !aMatch )
627
+ alert( editor.lang.image.validateWidth );
628
+ return !!aMatch;
629
+ },
630
+ setup : setupDimension,
631
+ commit : function( type, element, internalCommit )
632
+ {
633
+ var value = this.getValue();
634
+ if ( type == IMAGE )
635
+ {
636
+ if ( value )
637
+ element.setStyle( 'width', CKEDITOR.tools.cssLength( value ) );
638
+ else if ( !value && this.isChanged( ) )
639
+ element.removeStyle( 'width' );
640
+
641
+ !internalCommit && element.removeAttribute( 'width' );
642
+ }
643
+ else if ( type == PREVIEW )
644
+ {
645
+ var aMatch = value.match( regexGetSize );
646
+ if ( !aMatch )
647
+ {
648
+ var oImageOriginal = this.getDialog().originalElement;
649
+ if ( oImageOriginal.getCustomData( 'isReady' ) == 'true' )
650
+ element.setStyle( 'width', oImageOriginal.$.width + 'px');
651
+ }
652
+ else
653
+ element.setStyle( 'width', value + 'px');
654
+ }
655
+ else if ( type == CLEANUP )
656
+ {
657
+ element.removeAttribute( 'width' );
658
+ element.removeStyle( 'width' );
659
+ }
660
+ }
661
+ },
662
+ {
663
+ type : 'text',
664
+ id : 'txtHeight',
665
+ width: '40px',
666
+ labelLayout : 'horizontal',
667
+ label : editor.lang.image.height,
668
+ onKeyUp : onSizeChange,
669
+ onChange : function()
670
+ {
671
+ commitInternally.call( this, 'advanced:txtdlgGenStyle' );
672
+ },
673
+ validate : function()
674
+ {
675
+ var aMatch = this.getValue().match( regexGetSizeOrEmpty );
676
+ if ( !aMatch )
677
+ alert( editor.lang.image.validateHeight );
678
+ return !!aMatch;
679
+ },
680
+ setup : setupDimension,
681
+ commit : function( type, element, internalCommit )
682
+ {
683
+ var value = this.getValue();
684
+ if ( type == IMAGE )
685
+ {
686
+ if ( value )
687
+ element.setStyle( 'height', CKEDITOR.tools.cssLength( value ) );
688
+ else if ( !value && this.isChanged( ) )
689
+ element.removeStyle( 'height' );
690
+
691
+ if ( !internalCommit && type == IMAGE )
692
+ element.removeAttribute( 'height' );
693
+ }
694
+ else if ( type == PREVIEW )
695
+ {
696
+ var aMatch = value.match( regexGetSize );
697
+ if ( !aMatch )
698
+ {
699
+ var oImageOriginal = this.getDialog().originalElement;
700
+ if ( oImageOriginal.getCustomData( 'isReady' ) == 'true' )
701
+ element.setStyle( 'height', oImageOriginal.$.height + 'px' );
702
+ }
703
+ else
704
+ element.setStyle( 'height', value + 'px' );
705
+ }
706
+ else if ( type == CLEANUP )
707
+ {
708
+ element.removeAttribute( 'height' );
709
+ element.removeStyle( 'height' );
710
+ }
711
+ }
712
+ }
713
+ ]
714
+ },
715
+ {
716
+ type : 'html',
717
+ style : 'margin-top:10px;width:40px;height:40px;',
718
+ onLoad : function()
719
+ {
720
+ // Activate Reset button
721
+ var resetButton = CKEDITOR.document.getById( 'btnResetSize' ),
722
+ ratioButton = CKEDITOR.document.getById( 'btnLockSizes' );
723
+ if ( resetButton )
724
+ {
725
+ resetButton.on( 'click', function(evt)
726
+ {
727
+ resetSize( this );
728
+ evt.data.preventDefault();
729
+ }, this.getDialog() );
730
+ resetButton.on( 'mouseover', function()
731
+ {
732
+ this.addClass( 'cke_btn_over' );
733
+ }, resetButton );
734
+ resetButton.on( 'mouseout', function()
735
+ {
736
+ this.removeClass( 'cke_btn_over' );
737
+ }, resetButton );
738
+ }
739
+ // Activate (Un)LockRatio button
740
+ if ( ratioButton )
741
+ {
742
+ ratioButton.on( 'click', function(evt)
743
+ {
744
+ var locked = switchLockRatio( this ),
745
+ oImageOriginal = this.originalElement,
746
+ width = this.getValueOf( 'info', 'txtWidth' );
747
+
748
+ if ( oImageOriginal.getCustomData( 'isReady' ) == 'true' && width )
749
+ {
750
+ var height = oImageOriginal.$.height / oImageOriginal.$.width * width;
751
+ if ( !isNaN( height ) )
752
+ {
753
+ this.setValueOf( 'info', 'txtHeight', Math.round( height ) );
754
+ updatePreview( this );
755
+ }
756
+ }
757
+ evt.data.preventDefault();
758
+ }, this.getDialog() );
759
+ ratioButton.on( 'mouseover', function()
760
+ {
761
+ this.addClass( 'cke_btn_over' );
762
+ }, ratioButton );
763
+ ratioButton.on( 'mouseout', function()
764
+ {
765
+ this.removeClass( 'cke_btn_over' );
766
+ }, ratioButton );
767
+ }
768
+ },
769
+ html : '<div>'+
770
+ '<a href="javascript:void(0)" tabindex="-1" title="' + editor.lang.image.unlockRatio +
771
+ '" class="cke_btn_locked" id="btnLockSizes" role="button"><span class="cke_label">' + editor.lang.image.unlockRatio + '</span></a>' +
772
+ '<a href="javascript:void(0)" tabindex="-1" title="' + editor.lang.image.resetSize +
773
+ '" class="cke_btn_reset" id="btnResetSize" role="button"><span class="cke_label">' + editor.lang.image.resetSize + '</span></a>'+
774
+ '</div>'
775
+ }
776
+ ]
777
+ },
778
+ {
779
+ type : 'vbox',
780
+ padding : 1,
781
+ children :
782
+ [
783
+ {
784
+ type : 'text',
785
+ id : 'txtBorder',
786
+ width: '60px',
787
+ labelLayout : 'horizontal',
788
+ label : editor.lang.image.border,
789
+ 'default' : '',
790
+ onKeyUp : function()
791
+ {
792
+ updatePreview( this.getDialog() );
793
+ },
794
+ onChange : function()
795
+ {
796
+ commitInternally.call( this, 'advanced:txtdlgGenStyle' );
797
+ },
798
+ validate : CKEDITOR.dialog.validate.integer( editor.lang.image.validateBorder ),
799
+ setup : function( type, element )
800
+ {
801
+ if ( type == IMAGE )
802
+ {
803
+ var value,
804
+ borderStyle = element.getStyle( 'border-width' );
805
+ borderStyle = borderStyle && borderStyle.match( /^(\d+px)(?: \1 \1 \1)?$/ );
806
+ value = borderStyle && parseInt( borderStyle[ 1 ], 10 );
807
+ isNaN ( parseInt( value, 10 ) ) && ( value = element.getAttribute( 'border' ) );
808
+ this.setValue( value );
809
+ }
810
+ },
811
+ commit : function( type, element, internalCommit )
812
+ {
813
+ var value = parseInt( this.getValue(), 10 );
814
+ if ( type == IMAGE || type == PREVIEW )
815
+ {
816
+ if ( !isNaN( value ) )
817
+ {
818
+ element.setStyle( 'border-width', CKEDITOR.tools.cssLength( value ) );
819
+ element.setStyle( 'border-style', 'solid' );
820
+ }
821
+ else if ( !value && this.isChanged() )
822
+ {
823
+ element.removeStyle( 'border-width' );
824
+ element.removeStyle( 'border-style' );
825
+ element.removeStyle( 'border-color' );
826
+ }
827
+
828
+ if ( !internalCommit && type == IMAGE )
829
+ element.removeAttribute( 'border' );
830
+ }
831
+ else if ( type == CLEANUP )
832
+ {
833
+ element.removeAttribute( 'border' );
834
+ element.removeStyle( 'border-width' );
835
+ element.removeStyle( 'border-style' );
836
+ element.removeStyle( 'border-color' );
837
+ }
838
+ }
839
+ },
840
+ {
841
+ type : 'text',
842
+ id : 'txtHSpace',
843
+ width: '60px',
844
+ labelLayout : 'horizontal',
845
+ label : editor.lang.image.hSpace,
846
+ 'default' : '',
847
+ onKeyUp : function()
848
+ {
849
+ updatePreview( this.getDialog() );
850
+ },
851
+ onChange : function()
852
+ {
853
+ commitInternally.call( this, 'advanced:txtdlgGenStyle' );
854
+ },
855
+ validate : CKEDITOR.dialog.validate.integer( editor.lang.image.validateHSpace ),
856
+ setup : function( type, element )
857
+ {
858
+ if ( type == IMAGE )
859
+ {
860
+ var value,
861
+ marginLeftPx,
862
+ marginRightPx,
863
+ marginLeftStyle = element.getStyle( 'margin-left' ),
864
+ marginRightStyle = element.getStyle( 'margin-right' );
865
+
866
+ marginLeftStyle = marginLeftStyle && marginLeftStyle.match( pxLengthRegex );
867
+ marginRightStyle = marginRightStyle && marginRightStyle.match( pxLengthRegex );
868
+ marginLeftPx = parseInt( marginLeftStyle, 10 );
869
+ marginRightPx = parseInt( marginRightStyle, 10 );
870
+
871
+ value = ( marginLeftPx == marginRightPx ) && marginLeftPx;
872
+ isNaN( parseInt( value, 10 ) ) && ( value = element.getAttribute( 'hspace' ) );
873
+
874
+ this.setValue( value );
875
+ }
876
+ },
877
+ commit : function( type, element, internalCommit )
878
+ {
879
+ var value = parseInt( this.getValue(), 10 );
880
+ if ( type == IMAGE || type == PREVIEW )
881
+ {
882
+ if ( !isNaN( value ) )
883
+ {
884
+ element.setStyle( 'margin-left', CKEDITOR.tools.cssLength( value ) );
885
+ element.setStyle( 'margin-right', CKEDITOR.tools.cssLength( value ) );
886
+ }
887
+ else if ( !value && this.isChanged( ) )
888
+ {
889
+ element.removeStyle( 'margin-left' );
890
+ element.removeStyle( 'margin-right' );
891
+ }
892
+
893
+ if ( !internalCommit && type == IMAGE )
894
+ element.removeAttribute( 'hspace' );
895
+ }
896
+ else if ( type == CLEANUP )
897
+ {
898
+ element.removeAttribute( 'hspace' );
899
+ element.removeStyle( 'margin-left' );
900
+ element.removeStyle( 'margin-right' );
901
+ }
902
+ }
903
+ },
904
+ {
905
+ type : 'text',
906
+ id : 'txtVSpace',
907
+ width : '60px',
908
+ labelLayout : 'horizontal',
909
+ label : editor.lang.image.vSpace,
910
+ 'default' : '',
911
+ onKeyUp : function()
912
+ {
913
+ updatePreview( this.getDialog() );
914
+ },
915
+ onChange : function()
916
+ {
917
+ commitInternally.call( this, 'advanced:txtdlgGenStyle' );
918
+ },
919
+ validate : CKEDITOR.dialog.validate.integer( editor.lang.image.validateVSpace ),
920
+ setup : function( type, element )
921
+ {
922
+ if ( type == IMAGE )
923
+ {
924
+ var value,
925
+ marginTopPx,
926
+ marginBottomPx,
927
+ marginTopStyle = element.getStyle( 'margin-top' ),
928
+ marginBottomStyle = element.getStyle( 'margin-bottom' );
929
+
930
+ marginTopStyle = marginTopStyle && marginTopStyle.match( pxLengthRegex );
931
+ marginBottomStyle = marginBottomStyle && marginBottomStyle.match( pxLengthRegex );
932
+ marginTopPx = parseInt( marginTopStyle, 10 );
933
+ marginBottomPx = parseInt( marginBottomStyle, 10 );
934
+
935
+ value = ( marginTopPx == marginBottomPx ) && marginTopPx;
936
+ isNaN ( parseInt( value, 10 ) ) && ( value = element.getAttribute( 'vspace' ) );
937
+ this.setValue( value );
938
+ }
939
+ },
940
+ commit : function( type, element, internalCommit )
941
+ {
942
+ var value = parseInt( this.getValue(), 10 );
943
+ if ( type == IMAGE || type == PREVIEW )
944
+ {
945
+ if ( !isNaN( value ) )
946
+ {
947
+ element.setStyle( 'margin-top', CKEDITOR.tools.cssLength( value ) );
948
+ element.setStyle( 'margin-bottom', CKEDITOR.tools.cssLength( value ) );
949
+ }
950
+ else if ( !value && this.isChanged( ) )
951
+ {
952
+ element.removeStyle( 'margin-top' );
953
+ element.removeStyle( 'margin-bottom' );
954
+ }
955
+
956
+ if ( !internalCommit && type == IMAGE )
957
+ element.removeAttribute( 'vspace' );
958
+ }
959
+ else if ( type == CLEANUP )
960
+ {
961
+ element.removeAttribute( 'vspace' );
962
+ element.removeStyle( 'margin-top' );
963
+ element.removeStyle( 'margin-bottom' );
964
+ }
965
+ }
966
+ },
967
+ {
968
+ id : 'cmbAlign',
969
+ type : 'select',
970
+ labelLayout : 'horizontal',
971
+ widths : [ '35%','65%' ],
972
+ style : 'width:90px',
973
+ label : editor.lang.image.align,
974
+ 'default' : '',
975
+ items :
976
+ [
977
+ [ editor.lang.common.notSet , ''],
978
+ [ editor.lang.image.alignLeft , 'left'],
979
+ [ editor.lang.image.alignRight , 'right']
980
+ // Backward compatible with v2 on setup when specified as attribute value,
981
+ // while these values are no more available as select options.
982
+ // [ editor.lang.image.alignAbsBottom , 'absBottom'],
983
+ // [ editor.lang.image.alignAbsMiddle , 'absMiddle'],
984
+ // [ editor.lang.image.alignBaseline , 'baseline'],
985
+ // [ editor.lang.image.alignTextTop , 'text-top'],
986
+ // [ editor.lang.image.alignBottom , 'bottom'],
987
+ // [ editor.lang.image.alignMiddle , 'middle'],
988
+ // [ editor.lang.image.alignTop , 'top']
989
+ ],
990
+ onChange : function()
991
+ {
992
+ updatePreview( this.getDialog() );
993
+ commitInternally.call( this, 'advanced:txtdlgGenStyle' );
994
+ },
995
+ setup : function( type, element )
996
+ {
997
+ if ( type == IMAGE )
998
+ {
999
+ var value = element.getStyle( 'float' );
1000
+ switch( value )
1001
+ {
1002
+ // Ignore those unrelated values.
1003
+ case 'inherit':
1004
+ case 'none':
1005
+ value = '';
1006
+ }
1007
+
1008
+ !value && ( value = ( element.getAttribute( 'align' ) || '' ).toLowerCase() );
1009
+ this.setValue( value );
1010
+ }
1011
+ },
1012
+ commit : function( type, element, internalCommit )
1013
+ {
1014
+ var value = this.getValue();
1015
+ if ( type == IMAGE || type == PREVIEW )
1016
+ {
1017
+ if ( value )
1018
+ element.setStyle( 'float', value );
1019
+ else
1020
+ element.removeStyle( 'float' );
1021
+
1022
+ if ( !internalCommit && type == IMAGE )
1023
+ {
1024
+ value = ( element.getAttribute( 'align' ) || '' ).toLowerCase();
1025
+ switch( value )
1026
+ {
1027
+ // we should remove it only if it matches "left" or "right",
1028
+ // otherwise leave it intact.
1029
+ case 'left':
1030
+ case 'right':
1031
+ element.removeAttribute( 'align' );
1032
+ }
1033
+ }
1034
+ }
1035
+ else if ( type == CLEANUP )
1036
+ element.removeStyle( 'float' );
1037
+
1038
+ }
1039
+ }
1040
+ ]
1041
+ }
1042
+ ]
1043
+ },
1044
+ {
1045
+ type : 'vbox',
1046
+ height : '250px',
1047
+ children :
1048
+ [
1049
+ {
1050
+ type : 'html',
1051
+ style : 'width:95%;',
1052
+ html : '<div>' + CKEDITOR.tools.htmlEncode( editor.lang.common.preview ) +'<br>'+
1053
+ '<div id="ImagePreviewLoader" style="display:none"><div class="loading">&nbsp;</div></div>'+
1054
+ '<div id="ImagePreviewBox">'+
1055
+ '<a href="javascript:void(0)" target="_blank" onclick="return false;" id="previewLink">'+
1056
+ '<img id="previewImage" alt="" /></a>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. '+
1057
+ 'Maecenas feugiat consequat diam. Maecenas metus. Vivamus diam purus, cursus a, commodo non, facilisis vitae, '+
1058
+ 'nulla. Aenean dictum lacinia tortor. Nunc iaculis, nibh non iaculis aliquam, orci felis euismod neque, sed ornare massa mauris sed velit. Nulla pretium mi et risus. Fusce mi pede, tempor id, cursus ac, ullamcorper nec, enim. Sed tortor. Curabitur molestie. Duis velit augue, condimentum at, ultrices a, luctus ut, orci. Donec pellentesque egestas eros. Integer cursus, augue in cursus faucibus, eros pede bibendum sem, in tempus tellus justo quis ligula. Etiam eget tortor. Vestibulum rutrum, est ut placerat elementum, lectus nisl aliquam velit, tempor aliquam eros nunc nonummy metus. In eros metus, gravida a, gravida sed, lobortis id, turpis. Ut ultrices, ipsum at venenatis fringilla, sem nulla lacinia tellus, eget aliquet turpis mauris non enim. Nam turpis. Suspendisse lacinia. Curabitur ac tortor ut ipsum egestas elementum. Nunc imperdiet gravida mauris.' +
1059
+ '</div>'+'</div>'
1060
+ }
1061
+ ]
1062
+ }
1063
+ ]
1064
+ }
1065
+ ]
1066
+ },
1067
+ {
1068
+ id : 'Link',
1069
+ label : editor.lang.link.title,
1070
+ padding : 0,
1071
+ elements :
1072
+ [
1073
+ {
1074
+ id : 'txtUrl',
1075
+ type : 'text',
1076
+ label : editor.lang.common.url,
1077
+ style : 'width: 100%',
1078
+ 'default' : '',
1079
+ setup : function( type, element )
1080
+ {
1081
+ if ( type == LINK )
1082
+ {
1083
+ var href = element.getAttribute( '_cke_saved_href' );
1084
+ if ( !href )
1085
+ href = element.getAttribute( 'href' );
1086
+ this.setValue( href );
1087
+ }
1088
+ },
1089
+ commit : function( type, element )
1090
+ {
1091
+ if ( type == LINK )
1092
+ {
1093
+ if ( this.getValue() || this.isChanged() )
1094
+ {
1095
+ element.setAttribute( '_cke_saved_href', decodeURI( this.getValue() ) );
1096
+ element.setAttribute( 'href', 'javascript:void(0)/*' +
1097
+ CKEDITOR.tools.getNextNumber() + '*/' );
1098
+
1099
+ if ( this.getValue() || !editor.config.image_removeLinkByEmptyURL )
1100
+ this.getDialog().addLink = true;
1101
+ }
1102
+ }
1103
+ }
1104
+ },
1105
+ {
1106
+ type : 'button',
1107
+ id : 'browse',
1108
+ filebrowser :
1109
+ {
1110
+ action : 'Browse',
1111
+ target: 'Link:txtUrl',
1112
+ url: editor.config.filebrowserImageBrowseLinkUrl || editor.config.filebrowserBrowseUrl
1113
+ },
1114
+ style : 'float:right',
1115
+ hidden : true,
1116
+ label : editor.lang.common.browseServer
1117
+ },
1118
+ {
1119
+ id : 'cmbTarget',
1120
+ type : 'select',
1121
+ label : editor.lang.common.target,
1122
+ 'default' : '',
1123
+ items :
1124
+ [
1125
+ [ editor.lang.common.notSet , ''],
1126
+ [ editor.lang.common.targetNew , '_blank'],
1127
+ [ editor.lang.common.targetTop , '_top'],
1128
+ [ editor.lang.common.targetSelf , '_self'],
1129
+ [ editor.lang.common.targetParent , '_parent']
1130
+ ],
1131
+ setup : function( type, element )
1132
+ {
1133
+ if ( type == LINK )
1134
+ this.setValue( element.getAttribute( 'target' ) );
1135
+ },
1136
+ commit : function( type, element )
1137
+ {
1138
+ if ( type == LINK )
1139
+ {
1140
+ if ( this.getValue() || this.isChanged() )
1141
+ element.setAttribute( 'target', this.getValue() );
1142
+ }
1143
+ }
1144
+ }
1145
+ ]
1146
+ },
1147
+ {
1148
+ id : 'Upload',
1149
+ hidden : true,
1150
+ filebrowser : 'uploadButton',
1151
+ label : editor.lang.image.upload,
1152
+ elements :
1153
+ [
1154
+ {
1155
+ type : 'file',
1156
+ id : 'upload',
1157
+ label : editor.lang.image.btnUpload,
1158
+ style: 'height:40px',
1159
+ size : 38
1160
+ },
1161
+ {
1162
+ type : 'fileButton',
1163
+ id : 'uploadButton',
1164
+ filebrowser : 'info:txtUrl',
1165
+ label : editor.lang.image.btnUpload,
1166
+ 'for' : [ 'Upload', 'upload' ]
1167
+ }
1168
+ ]
1169
+ },
1170
+ {
1171
+ id : 'advanced',
1172
+ label : editor.lang.common.advancedTab,
1173
+ elements :
1174
+ [
1175
+ {
1176
+ type : 'hbox',
1177
+ widths : [ '50%', '25%', '25%' ],
1178
+ children :
1179
+ [
1180
+ {
1181
+ type : 'text',
1182
+ id : 'linkId',
1183
+ label : editor.lang.common.id,
1184
+ setup : function( type, element )
1185
+ {
1186
+ if ( type == IMAGE )
1187
+ this.setValue( element.getAttribute( 'id' ) );
1188
+ },
1189
+ commit : function( type, element )
1190
+ {
1191
+ if ( type == IMAGE )
1192
+ {
1193
+ if ( this.getValue() || this.isChanged() )
1194
+ element.setAttribute( 'id', this.getValue() );
1195
+ }
1196
+ }
1197
+ },
1198
+ {
1199
+ id : 'cmbLangDir',
1200
+ type : 'select',
1201
+ style : 'width : 100px;',
1202
+ label : editor.lang.common.langDir,
1203
+ 'default' : '',
1204
+ items :
1205
+ [
1206
+ [ editor.lang.common.notSet, '' ],
1207
+ [ editor.lang.common.langDirLtr, 'ltr' ],
1208
+ [ editor.lang.common.langDirRtl, 'rtl' ]
1209
+ ],
1210
+ setup : function( type, element )
1211
+ {
1212
+ if ( type == IMAGE )
1213
+ this.setValue( element.getAttribute( 'dir' ) );
1214
+ },
1215
+ commit : function( type, element )
1216
+ {
1217
+ if ( type == IMAGE )
1218
+ {
1219
+ if ( this.getValue() || this.isChanged() )
1220
+ element.setAttribute( 'dir', this.getValue() );
1221
+ }
1222
+ }
1223
+ },
1224
+ {
1225
+ type : 'text',
1226
+ id : 'txtLangCode',
1227
+ label : editor.lang.common.langCode,
1228
+ 'default' : '',
1229
+ setup : function( type, element )
1230
+ {
1231
+ if ( type == IMAGE )
1232
+ this.setValue( element.getAttribute( 'lang' ) );
1233
+ },
1234
+ commit : function( type, element )
1235
+ {
1236
+ if ( type == IMAGE )
1237
+ {
1238
+ if ( this.getValue() || this.isChanged() )
1239
+ element.setAttribute( 'lang', this.getValue() );
1240
+ }
1241
+ }
1242
+ }
1243
+ ]
1244
+ },
1245
+ {
1246
+ type : 'text',
1247
+ id : 'txtGenLongDescr',
1248
+ label : editor.lang.common.longDescr,
1249
+ setup : function( type, element )
1250
+ {
1251
+ if ( type == IMAGE )
1252
+ this.setValue( element.getAttribute( 'longDesc' ) );
1253
+ },
1254
+ commit : function( type, element )
1255
+ {
1256
+ if ( type == IMAGE )
1257
+ {
1258
+ if ( this.getValue() || this.isChanged() )
1259
+ element.setAttribute( 'longDesc', this.getValue() );
1260
+ }
1261
+ }
1262
+ },
1263
+ {
1264
+ type : 'hbox',
1265
+ widths : [ '50%', '50%' ],
1266
+ children :
1267
+ [
1268
+ {
1269
+ type : 'text',
1270
+ id : 'txtGenClass',
1271
+ label : editor.lang.common.cssClass,
1272
+ 'default' : '',
1273
+ setup : function( type, element )
1274
+ {
1275
+ if ( type == IMAGE )
1276
+ this.setValue( element.getAttribute( 'class' ) );
1277
+ },
1278
+ commit : function( type, element )
1279
+ {
1280
+ if ( type == IMAGE )
1281
+ {
1282
+ if ( this.getValue() || this.isChanged() )
1283
+ element.setAttribute( 'class', this.getValue() );
1284
+ }
1285
+ }
1286
+ },
1287
+ {
1288
+ type : 'text',
1289
+ id : 'txtGenTitle',
1290
+ label : editor.lang.common.advisoryTitle,
1291
+ 'default' : '',
1292
+ onChange : function()
1293
+ {
1294
+ updatePreview( this.getDialog() );
1295
+ },
1296
+ setup : function( type, element )
1297
+ {
1298
+ if ( type == IMAGE )
1299
+ this.setValue( element.getAttribute( 'title' ) );
1300
+ },
1301
+ commit : function( type, element )
1302
+ {
1303
+ if ( type == IMAGE )
1304
+ {
1305
+ if ( this.getValue() || this.isChanged() )
1306
+ element.setAttribute( 'title', this.getValue() );
1307
+ }
1308
+ else if ( type == PREVIEW )
1309
+ {
1310
+ element.setAttribute( 'title', this.getValue() );
1311
+ }
1312
+ else if ( type == CLEANUP )
1313
+ {
1314
+ element.removeAttribute( 'title' );
1315
+ }
1316
+ }
1317
+ }
1318
+ ]
1319
+ },
1320
+ {
1321
+ type : 'text',
1322
+ id : 'txtdlgGenStyle',
1323
+ label : editor.lang.common.cssStyle,
1324
+ 'default' : '',
1325
+ setup : function( type, element )
1326
+ {
1327
+ if ( type == IMAGE )
1328
+ {
1329
+ var genStyle = element.getAttribute( 'style' );
1330
+ if ( !genStyle && element.$.style.cssText )
1331
+ genStyle = element.$.style.cssText;
1332
+ this.setValue( genStyle );
1333
+
1334
+ var height = element.$.style.height,
1335
+ width = element.$.style.width,
1336
+ aMatchH = ( height ? height : '' ).match( regexGetSize ),
1337
+ aMatchW = ( width ? width : '').match( regexGetSize );
1338
+
1339
+ this.attributesInStyle =
1340
+ {
1341
+ height : !!aMatchH,
1342
+ width : !!aMatchW
1343
+ };
1344
+ }
1345
+ },
1346
+ onChange : function ()
1347
+ {
1348
+ commitInternally.call( this,
1349
+ [ 'info:cmbFloat', 'info:cmbAlign',
1350
+ 'info:txtVSpace', 'info:txtHSpace',
1351
+ 'info:txtBorder',
1352
+ 'info:txtWidth', 'info:txtHeight' ] );
1353
+ updatePreview( this );
1354
+ },
1355
+ commit : function( type, element )
1356
+ {
1357
+ if ( type == IMAGE && ( this.getValue() || this.isChanged() ) )
1358
+ {
1359
+ element.setAttribute( 'style', this.getValue() );
1360
+ }
1361
+ }
1362
+ }
1363
+ ]
1364
+ }
1365
+ ]
1366
+ };
1367
+ };
1368
+
1369
+ CKEDITOR.dialog.add( 'image', function( editor )
1370
+ {
1371
+ return imageDialog( editor, 'image' );
1372
+ });
1373
+
1374
+ CKEDITOR.dialog.add( 'imagebutton', function( editor )
1375
+ {
1376
+ return imageDialog( editor, 'imagebutton' );
1377
+ });
1378
+ })();