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,229 @@
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
+ // Register a plugin named "sample".
7
+ CKEDITOR.plugins.add( 'keystrokes',
8
+ {
9
+ beforeInit : function( editor )
10
+ {
11
+ /**
12
+ * Controls keystrokes typing in this editor instance.
13
+ * @name CKEDITOR.editor.prototype.keystrokeHandler
14
+ * @type CKEDITOR.keystrokeHandler
15
+ * @example
16
+ */
17
+ editor.keystrokeHandler = new CKEDITOR.keystrokeHandler( editor );
18
+
19
+ editor.specialKeys = {};
20
+ },
21
+
22
+ init : function( editor )
23
+ {
24
+ var keystrokesConfig = editor.config.keystrokes,
25
+ blockedConfig = editor.config.blockedKeystrokes;
26
+
27
+ var keystrokes = editor.keystrokeHandler.keystrokes,
28
+ blockedKeystrokes = editor.keystrokeHandler.blockedKeystrokes;
29
+
30
+ for ( var i = 0 ; i < keystrokesConfig.length ; i++ )
31
+ {
32
+ keystrokes[ keystrokesConfig[i][0] ] = keystrokesConfig[i][1];
33
+ }
34
+
35
+ for ( i = 0 ; i < blockedConfig.length ; i++ )
36
+ {
37
+ blockedKeystrokes[ blockedConfig[i] ] = 1;
38
+ }
39
+ }
40
+ });
41
+
42
+ /**
43
+ * Controls keystrokes typing in an editor instance.
44
+ * @constructor
45
+ * @param {CKEDITOR.editor} editor The editor instance.
46
+ * @example
47
+ */
48
+ CKEDITOR.keystrokeHandler = function( editor )
49
+ {
50
+ if ( editor.keystrokeHandler )
51
+ return editor.keystrokeHandler;
52
+
53
+ /**
54
+ * List of keystrokes associated to commands. Each entry points to the
55
+ * command to be executed.
56
+ * @type Object
57
+ * @example
58
+ */
59
+ this.keystrokes = {};
60
+
61
+ /**
62
+ * List of keystrokes that should be blocked if not defined at
63
+ * {@link keystrokes}. In this way it is possible to block the default
64
+ * browser behavior for those keystrokes.
65
+ * @type Object
66
+ * @example
67
+ */
68
+ this.blockedKeystrokes = {};
69
+
70
+ this._ =
71
+ {
72
+ editor : editor
73
+ };
74
+
75
+ return this;
76
+ };
77
+
78
+ (function()
79
+ {
80
+ var cancel;
81
+
82
+ var onKeyDown = function( event )
83
+ {
84
+ // The DOM event object is passed by the "data" property.
85
+ event = event.data;
86
+
87
+ var keyCombination = event.getKeystroke();
88
+ var command = this.keystrokes[ keyCombination ];
89
+ var editor = this._.editor;
90
+
91
+ cancel = ( editor.fire( 'key', { keyCode : keyCombination } ) === true );
92
+
93
+ if ( !cancel )
94
+ {
95
+ if ( command )
96
+ {
97
+ var data = { from : 'keystrokeHandler' };
98
+ cancel = ( editor.execCommand( command, data ) !== false );
99
+ }
100
+
101
+ if ( !cancel )
102
+ {
103
+ var handler = editor.specialKeys[ keyCombination ];
104
+ cancel = ( handler && handler( editor ) === true );
105
+
106
+ if ( !cancel )
107
+ cancel = !!this.blockedKeystrokes[ keyCombination ];
108
+ }
109
+ }
110
+
111
+ if ( cancel )
112
+ event.preventDefault( true );
113
+
114
+ return !cancel;
115
+ };
116
+
117
+ var onKeyPress = function( event )
118
+ {
119
+ if ( cancel )
120
+ {
121
+ cancel = false;
122
+ event.data.preventDefault( true );
123
+ }
124
+ };
125
+
126
+ CKEDITOR.keystrokeHandler.prototype =
127
+ {
128
+ /**
129
+ * Attaches this keystroke handle to a DOM object. Keystrokes typed
130
+ ** over this object will get handled by this keystrokeHandler.
131
+ * @param {CKEDITOR.dom.domObject} domObject The DOM object to attach
132
+ * to.
133
+ * @example
134
+ */
135
+ attach : function( domObject )
136
+ {
137
+ // For most browsers, it is enough to listen to the keydown event
138
+ // only.
139
+ domObject.on( 'keydown', onKeyDown, this );
140
+
141
+ // Some browsers instead, don't cancel key events in the keydown, but in the
142
+ // keypress. So we must do a longer trip in those cases.
143
+ if ( CKEDITOR.env.opera || ( CKEDITOR.env.gecko && CKEDITOR.env.mac ) )
144
+ domObject.on( 'keypress', onKeyPress, this );
145
+ }
146
+ };
147
+ })();
148
+
149
+ /**
150
+ * A list of keystrokes to be blocked if not defined in the {@link CKEDITOR.config.keystrokes}
151
+ * setting. In this way it is possible to block the default browser behavior
152
+ * for those keystrokes.
153
+ * @type Array
154
+ * @default (see example)
155
+ * @example
156
+ * // This is actually the default value.
157
+ * config.blockedKeystrokes =
158
+ * [
159
+ * CKEDITOR.CTRL + 66 &#47;*B*&#47;,
160
+ * CKEDITOR.CTRL + 73 &#47;*I*&#47;,
161
+ * CKEDITOR.CTRL + 85 &#47;*U*&#47;
162
+ * ];
163
+ */
164
+ CKEDITOR.config.blockedKeystrokes =
165
+ [
166
+ CKEDITOR.CTRL + 66 /*B*/,
167
+ CKEDITOR.CTRL + 73 /*I*/,
168
+ CKEDITOR.CTRL + 85 /*U*/
169
+ ];
170
+
171
+ /**
172
+ * A list associating keystrokes to editor commands. Each element in the list
173
+ * is an array where the first item is the keystroke, and the second is the
174
+ * name of the command to be executed.
175
+ * @type Array
176
+ * @default (see example)
177
+ * @example
178
+ * // This is actually the default value.
179
+ * config.keystrokes =
180
+ * [
181
+ * [ CKEDITOR.ALT + 121 &#47;*F10*&#47;, 'toolbarFocus' ],
182
+ * [ CKEDITOR.ALT + 122 &#47;*F11*&#47;, 'elementsPathFocus' ],
183
+ *
184
+ * [ CKEDITOR.SHIFT + 121 &#47;*F10*&#47;, 'contextMenu' ],
185
+ *
186
+ * [ CKEDITOR.CTRL + 90 &#47;*Z*&#47;, 'undo' ],
187
+ * [ CKEDITOR.CTRL + 89 &#47;*Y*&#47;, 'redo' ],
188
+ * [ CKEDITOR.CTRL + CKEDITOR.SHIFT + 90 &#47;*Z*&#47;, 'redo' ],
189
+ *
190
+ * [ CKEDITOR.CTRL + 76 &#47;*L*&#47;, 'link' ],
191
+ *
192
+ * [ CKEDITOR.CTRL + 66 &#47;*B*&#47;, 'bold' ],
193
+ * [ CKEDITOR.CTRL + 73 &#47;*I*&#47;, 'italic' ],
194
+ * [ CKEDITOR.CTRL + 85 &#47;*U*&#47;, 'underline' ],
195
+ *
196
+ * [ CKEDITOR.ALT + 109 &#47;*-*&#47;, 'toolbarCollapse' ]
197
+ * ];
198
+ */
199
+ CKEDITOR.config.keystrokes =
200
+ [
201
+ [ CKEDITOR.ALT + 121 /*F10*/, 'toolbarFocus' ],
202
+ [ CKEDITOR.ALT + 122 /*F11*/, 'elementsPathFocus' ],
203
+
204
+ [ CKEDITOR.SHIFT + 121 /*F10*/, 'contextMenu' ],
205
+ [ CKEDITOR.CTRL + CKEDITOR.SHIFT + 121 /*F10*/, 'contextMenu' ],
206
+
207
+ [ CKEDITOR.CTRL + 90 /*Z*/, 'undo' ],
208
+ [ CKEDITOR.CTRL + 89 /*Y*/, 'redo' ],
209
+ [ CKEDITOR.CTRL + CKEDITOR.SHIFT + 90 /*Z*/, 'redo' ],
210
+
211
+ [ CKEDITOR.CTRL + 76 /*L*/, 'link' ],
212
+
213
+ [ CKEDITOR.CTRL + 66 /*B*/, 'bold' ],
214
+ [ CKEDITOR.CTRL + 73 /*I*/, 'italic' ],
215
+ [ CKEDITOR.CTRL + 85 /*U*/, 'underline' ],
216
+
217
+ [ CKEDITOR.ALT + 109 /*-*/, 'toolbarCollapse' ],
218
+ [ CKEDITOR.ALT + 48 /*0*/, 'a11yHelp' ]
219
+ ];
220
+
221
+ /**
222
+ * Fired when any keyboard key (or combination) is pressed into the editing area.
223
+ * @name CKEDITOR#key
224
+ * @event
225
+ * @param {Number} data.keyCode A number representing the key code (or
226
+ * combination). It is the sum of the current key code and the
227
+ * {@link CKEDITOR.CTRL}, {@link CKEDITOR.SHIFT} and {@link CKEDITOR.ALT}
228
+ * constants, if those are pressed.
229
+ */
@@ -0,0 +1,99 @@
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
+ CKEDITOR.dialog.add( 'anchor', function( editor )
7
+ {
8
+ // Function called in onShow to load selected element.
9
+ var loadElements = function( editor, selection, element )
10
+ {
11
+ this.editMode = true;
12
+ this.editObj = element;
13
+
14
+ var attributeValue = this.editObj.getAttribute( 'name' );
15
+ if ( attributeValue )
16
+ this.setValueOf( 'info','txtName', attributeValue );
17
+ else
18
+ this.setValueOf( 'info','txtName', "" );
19
+ };
20
+
21
+ return {
22
+ title : editor.lang.anchor.title,
23
+ minWidth : 300,
24
+ minHeight : 60,
25
+ onOk : function()
26
+ {
27
+ // Always create a new anchor, because of IE BUG.
28
+ var name = this.getValueOf( 'info', 'txtName' ),
29
+ element = CKEDITOR.env.ie ?
30
+ editor.document.createElement( '<a name="' + CKEDITOR.tools.htmlEncode( name ) + '">' ) :
31
+ editor.document.createElement( 'a' );
32
+
33
+ // Move contents and attributes of old anchor to new anchor.
34
+ if ( this.editMode )
35
+ {
36
+ this.editObj.copyAttributes( element, { name : 1 } );
37
+ this.editObj.moveChildren( element );
38
+ }
39
+
40
+ // Set name.
41
+ element.removeAttribute( '_cke_saved_name' );
42
+ element.setAttribute( 'name', name );
43
+
44
+ // Insert a new anchor.
45
+ var fakeElement = editor.createFakeElement( element, 'cke_anchor', 'anchor' );
46
+ if ( !this.editMode )
47
+ editor.insertElement( fakeElement );
48
+ else
49
+ {
50
+ fakeElement.replace( this.fakeObj );
51
+ editor.getSelection().selectElement( fakeElement );
52
+ }
53
+
54
+ return true;
55
+ },
56
+ onShow : function()
57
+ {
58
+ this.editObj = false;
59
+ this.fakeObj = false;
60
+ this.editMode = false;
61
+
62
+ var selection = editor.getSelection();
63
+ var element = selection.getSelectedElement();
64
+ if ( element && element.getAttribute( '_cke_real_element_type' ) && element.getAttribute( '_cke_real_element_type' ) == 'anchor' )
65
+ {
66
+ this.fakeObj = element;
67
+ element = editor.restoreRealElement( this.fakeObj );
68
+ loadElements.apply( this, [ editor, selection, element ] );
69
+ selection.selectElement( this.fakeObj );
70
+ }
71
+ this.getContentElement( 'info', 'txtName' ).focus();
72
+ },
73
+ contents : [
74
+ {
75
+ id : 'info',
76
+ label : editor.lang.anchor.title,
77
+ accessKey : 'I',
78
+ elements :
79
+ [
80
+ {
81
+ type : 'text',
82
+ id : 'txtName',
83
+ label : editor.lang.anchor.name,
84
+ required: true,
85
+ validate : function()
86
+ {
87
+ if ( !this.getValue() )
88
+ {
89
+ alert( editor.lang.anchor.errorName );
90
+ return false;
91
+ }
92
+ return true;
93
+ }
94
+ }
95
+ ]
96
+ }
97
+ ]
98
+ };
99
+ } );
@@ -0,0 +1,1421 @@
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
+ CKEDITOR.dialog.add( 'link', function( editor )
7
+ {
8
+ // Handles the event when the "Target" selection box is changed.
9
+ var targetChanged = function()
10
+ {
11
+ var dialog = this.getDialog(),
12
+ popupFeatures = dialog.getContentElement( 'target', 'popupFeatures' ),
13
+ targetName = dialog.getContentElement( 'target', 'linkTargetName' ),
14
+ value = this.getValue();
15
+
16
+ if ( !popupFeatures || !targetName )
17
+ return;
18
+
19
+ popupFeatures = popupFeatures.getElement();
20
+ popupFeatures.hide();
21
+ targetName.setValue( '' );
22
+
23
+ switch ( value )
24
+ {
25
+ case 'frame' :
26
+ targetName.setLabel( editor.lang.link.targetFrameName );
27
+ targetName.getElement().show();
28
+ break;
29
+ case 'popup' :
30
+ popupFeatures.show();
31
+ targetName.setLabel( editor.lang.link.targetPopupName );
32
+ targetName.getElement().show();
33
+ break;
34
+ default :
35
+ targetName.setValue( value );
36
+ targetName.getElement().hide();
37
+ break;
38
+ }
39
+
40
+ };
41
+
42
+ // Handles the event when the "Type" selection box is changed.
43
+ var linkTypeChanged = function()
44
+ {
45
+ var dialog = this.getDialog(),
46
+ partIds = [ 'urlOptions', 'anchorOptions', 'emailOptions' ],
47
+ typeValue = this.getValue(),
48
+ uploadTab = dialog.definition.getContents( 'upload' ),
49
+ uploadInitiallyHidden = uploadTab && uploadTab.hidden;
50
+
51
+ if ( typeValue == 'url' )
52
+ {
53
+ if ( editor.config.linkShowTargetTab )
54
+ dialog.showPage( 'target' );
55
+ if ( !uploadInitiallyHidden )
56
+ dialog.showPage( 'upload' );
57
+ }
58
+ else
59
+ {
60
+ dialog.hidePage( 'target' );
61
+ if ( !uploadInitiallyHidden )
62
+ dialog.hidePage( 'upload' );
63
+ }
64
+
65
+ for ( var i = 0 ; i < partIds.length ; i++ )
66
+ {
67
+ var element = dialog.getContentElement( 'info', partIds[i] );
68
+ if ( !element )
69
+ continue;
70
+
71
+ element = element.getElement().getParent().getParent();
72
+ if ( partIds[i] == typeValue + 'Options' )
73
+ element.show();
74
+ else
75
+ element.hide();
76
+ }
77
+ };
78
+
79
+ // Loads the parameters in a selected link to the link dialog fields.
80
+ var javascriptProtocolRegex = /^javascript:/,
81
+ emailRegex = /^mailto:([^?]+)(?:\?(.+))?$/,
82
+ emailSubjectRegex = /subject=([^;?:@&=$,\/]*)/,
83
+ emailBodyRegex = /body=([^;?:@&=$,\/]*)/,
84
+ anchorRegex = /^#(.*)$/,
85
+ urlRegex = /^((?:http|https|ftp|news):\/\/)?(.*)$/,
86
+ selectableTargets = /^(_(?:self|top|parent|blank))$/,
87
+ encodedEmailLinkRegex = /^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/,
88
+ functionCallProtectedEmailLinkRegex = /^javascript:([^(]+)\(([^)]+)\)$/;
89
+
90
+ var popupRegex =
91
+ /\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*/;
92
+ var popupFeaturesRegex = /(?:^|,)([^=]+)=(\d+|yes|no)/gi;
93
+
94
+ var parseLink = function( editor, element )
95
+ {
96
+ var href = element ? ( element.getAttribute( '_cke_saved_href' ) || element.getAttribute( 'href' ) ) : '',
97
+ javascriptMatch,
98
+ emailMatch,
99
+ anchorMatch,
100
+ urlMatch,
101
+ retval = {};
102
+
103
+ if ( ( javascriptMatch = href.match( javascriptProtocolRegex ) ) )
104
+ {
105
+ if ( emailProtection == 'encode' )
106
+ {
107
+ href = href.replace( encodedEmailLinkRegex,
108
+ function ( match, protectedAddress, rest )
109
+ {
110
+ return 'mailto:' +
111
+ String.fromCharCode.apply( String, protectedAddress.split( ',' ) ) +
112
+ ( rest && unescapeSingleQuote( rest ) );
113
+ });
114
+ }
115
+ // Protected email link as function call.
116
+ else if ( emailProtection )
117
+ {
118
+ href.replace( functionCallProtectedEmailLinkRegex, function( match, funcName, funcArgs )
119
+ {
120
+ if ( funcName == compiledProtectionFunction.name )
121
+ {
122
+ retval.type = 'email';
123
+ var email = retval.email = {};
124
+
125
+ var paramRegex = /[^,\s]+/g,
126
+ paramQuoteRegex = /(^')|('$)/g,
127
+ paramsMatch = funcArgs.match( paramRegex ),
128
+ paramsMatchLength = paramsMatch.length,
129
+ paramName,
130
+ paramVal;
131
+
132
+ for ( var i = 0; i < paramsMatchLength; i++ )
133
+ {
134
+ paramVal = decodeURIComponent( unescapeSingleQuote( paramsMatch[ i ].replace( paramQuoteRegex, '' ) ) );
135
+ paramName = compiledProtectionFunction.params[ i ].toLowerCase();
136
+ email[ paramName ] = paramVal;
137
+ }
138
+ email.address = [ email.name, email.domain ].join( '@' );
139
+ }
140
+ } );
141
+ }
142
+ }
143
+
144
+ if ( !retval.type )
145
+ {
146
+ if ( ( anchorMatch = href.match( anchorRegex ) ) )
147
+ {
148
+ retval.type = 'anchor';
149
+ retval.anchor = {};
150
+ retval.anchor.name = retval.anchor.id = anchorMatch[1];
151
+ }
152
+ // Protected email link as encoded string.
153
+ else if ( ( emailMatch = href.match( emailRegex ) ) )
154
+ {
155
+ var subjectMatch = href.match( emailSubjectRegex ),
156
+ bodyMatch = href.match( emailBodyRegex );
157
+
158
+ retval.type = 'email';
159
+ var email = ( retval.email = {} );
160
+ email.address = emailMatch[ 1 ];
161
+ subjectMatch && ( email.subject = decodeURIComponent( subjectMatch[ 1 ] ) );
162
+ bodyMatch && ( email.body = decodeURIComponent( bodyMatch[ 1 ] ) );
163
+ }
164
+ // urlRegex matches empty strings, so need to check for href as well.
165
+ else if ( href && ( urlMatch = href.match( urlRegex ) ) )
166
+ {
167
+ retval.type = 'url';
168
+ retval.url = {};
169
+ retval.url.protocol = urlMatch[1];
170
+ retval.url.url = urlMatch[2];
171
+ }
172
+ else
173
+ retval.type = 'url';
174
+ }
175
+
176
+ // Load target and popup settings.
177
+ if ( element )
178
+ {
179
+ var target = element.getAttribute( 'target' );
180
+ retval.target = {};
181
+ retval.adv = {};
182
+
183
+ // IE BUG: target attribute is an empty string instead of null in IE if it's not set.
184
+ if ( !target )
185
+ {
186
+ var onclick = element.getAttribute( '_cke_pa_onclick' ) || element.getAttribute( 'onclick' ),
187
+ onclickMatch = onclick && onclick.match( popupRegex );
188
+ if ( onclickMatch )
189
+ {
190
+ retval.target.type = 'popup';
191
+ retval.target.name = onclickMatch[1];
192
+
193
+ var featureMatch;
194
+ while ( ( featureMatch = popupFeaturesRegex.exec( onclickMatch[2] ) ) )
195
+ {
196
+ if ( featureMatch[2] == 'yes' || featureMatch[2] == '1' )
197
+ retval.target[ featureMatch[1] ] = true;
198
+ else if ( isFinite( featureMatch[2] ) )
199
+ retval.target[ featureMatch[1] ] = featureMatch[2];
200
+ }
201
+ }
202
+ }
203
+ else
204
+ {
205
+ var targetMatch = target.match( selectableTargets );
206
+ if ( targetMatch )
207
+ retval.target.type = retval.target.name = target;
208
+ else
209
+ {
210
+ retval.target.type = 'frame';
211
+ retval.target.name = target;
212
+ }
213
+ }
214
+
215
+ var me = this;
216
+ var advAttr = function( inputName, attrName )
217
+ {
218
+ var value = element.getAttribute( attrName );
219
+ if ( value !== null )
220
+ retval.adv[ inputName ] = value || '';
221
+ };
222
+ advAttr( 'advId', 'id' );
223
+ advAttr( 'advLangDir', 'dir' );
224
+ advAttr( 'advAccessKey', 'accessKey' );
225
+ advAttr( 'advName', 'name' );
226
+ advAttr( 'advLangCode', 'lang' );
227
+ advAttr( 'advTabIndex', 'tabindex' );
228
+ advAttr( 'advTitle', 'title' );
229
+ advAttr( 'advContentType', 'type' );
230
+ advAttr( 'advCSSClasses', 'class' );
231
+ advAttr( 'advCharset', 'charset' );
232
+ advAttr( 'advStyles', 'style' );
233
+ }
234
+
235
+ // Find out whether we have any anchors in the editor.
236
+ // Get all IMG elements in CK document.
237
+ var elements = editor.document.getElementsByTag( 'img' ),
238
+ realAnchors = new CKEDITOR.dom.nodeList( editor.document.$.anchors ),
239
+ anchors = retval.anchors = [];
240
+
241
+ for ( var i = 0; i < elements.count() ; i++ )
242
+ {
243
+ var item = elements.getItem( i );
244
+ if ( item.getAttribute( '_cke_realelement' ) && item.getAttribute( '_cke_real_element_type' ) == 'anchor' )
245
+ {
246
+ anchors.push( editor.restoreRealElement( item ) );
247
+ }
248
+ }
249
+
250
+ for ( i = 0 ; i < realAnchors.count() ; i++ )
251
+ anchors.push( realAnchors.getItem( i ) );
252
+
253
+ for ( i = 0 ; i < anchors.length ; i++ )
254
+ {
255
+ item = anchors[ i ];
256
+ anchors[ i ] = { name : item.getAttribute( 'name' ), id : item.getAttribute( 'id' ) };
257
+ }
258
+
259
+ // Record down the selected element in the dialog.
260
+ this._.selectedElement = element;
261
+
262
+ return retval;
263
+ };
264
+
265
+ var setupParams = function( page, data )
266
+ {
267
+ if ( data[page] )
268
+ this.setValue( data[page][this.id] || '' );
269
+ };
270
+
271
+ var setupPopupParams = function( data )
272
+ {
273
+ return setupParams.call( this, 'target', data );
274
+ };
275
+
276
+ var setupAdvParams = function( data )
277
+ {
278
+ return setupParams.call( this, 'adv', data );
279
+ };
280
+
281
+ var commitParams = function( page, data )
282
+ {
283
+ if ( !data[page] )
284
+ data[page] = {};
285
+
286
+ data[page][this.id] = this.getValue() || '';
287
+ };
288
+
289
+ var commitPopupParams = function( data )
290
+ {
291
+ return commitParams.call( this, 'target', data );
292
+ };
293
+
294
+ var commitAdvParams = function( data )
295
+ {
296
+ return commitParams.call( this, 'adv', data );
297
+ };
298
+
299
+ function unescapeSingleQuote( str )
300
+ {
301
+ return str.replace( /\\'/g, '\'' );
302
+ }
303
+
304
+ function escapeSingleQuote( str )
305
+ {
306
+ return str.replace( /'/g, '\\$&' );
307
+ }
308
+
309
+ var emailProtection = editor.config.emailProtection || '';
310
+
311
+ // Compile the protection function pattern.
312
+ if ( emailProtection && emailProtection != 'encode' )
313
+ {
314
+ var compiledProtectionFunction = {};
315
+
316
+ emailProtection.replace( /^([^(]+)\(([^)]+)\)$/, function( match, funcName, params )
317
+ {
318
+ compiledProtectionFunction.name = funcName;
319
+ compiledProtectionFunction.params = [];
320
+ params.replace( /[^,\s]+/g, function( param )
321
+ {
322
+ compiledProtectionFunction.params.push( param );
323
+ } );
324
+ } );
325
+ }
326
+
327
+ function protectEmailLinkAsFunction( email )
328
+ {
329
+ var retval,
330
+ name = compiledProtectionFunction.name,
331
+ params = compiledProtectionFunction.params,
332
+ paramName,
333
+ paramValue;
334
+
335
+ retval = [ name, '(' ];
336
+ for ( var i = 0; i < params.length; i++ )
337
+ {
338
+ paramName = params[ i ].toLowerCase();
339
+ paramValue = email[ paramName ];
340
+
341
+ i > 0 && retval.push( ',' );
342
+ retval.push( '\'',
343
+ paramValue ?
344
+ escapeSingleQuote( encodeURIComponent( email[ paramName ] ) )
345
+ : '',
346
+ '\'');
347
+ }
348
+ retval.push( ')' );
349
+ return retval.join( '' );
350
+ }
351
+
352
+ function protectEmailAddressAsEncodedString( address )
353
+ {
354
+ var charCode,
355
+ length = address.length,
356
+ encodedChars = [];
357
+ for ( var i = 0; i < length; i++ )
358
+ {
359
+ charCode = address.charCodeAt( i );
360
+ encodedChars.push( charCode );
361
+ }
362
+ return 'String.fromCharCode(' + encodedChars.join( ',' ) + ')';
363
+ }
364
+
365
+ return {
366
+ title : editor.lang.link.title,
367
+ minWidth : 350,
368
+ minHeight : 230,
369
+ contents : [
370
+ {
371
+ id : 'info',
372
+ label : editor.lang.link.info,
373
+ title : editor.lang.link.info,
374
+ elements :
375
+ [
376
+ {
377
+ id : 'linkType',
378
+ type : 'select',
379
+ label : editor.lang.link.type,
380
+ 'default' : 'url',
381
+ items :
382
+ [
383
+ [ editor.lang.link.toUrl, 'url' ],
384
+ [ editor.lang.link.toAnchor, 'anchor' ],
385
+ [ editor.lang.link.toEmail, 'email' ]
386
+ ],
387
+ onChange : linkTypeChanged,
388
+ setup : function( data )
389
+ {
390
+ if ( data.type )
391
+ this.setValue( data.type );
392
+ },
393
+ commit : function( data )
394
+ {
395
+ data.type = this.getValue();
396
+ }
397
+ },
398
+ {
399
+ type : 'vbox',
400
+ id : 'urlOptions',
401
+ children :
402
+ [
403
+ {
404
+ type : 'hbox',
405
+ widths : [ '25%', '75%' ],
406
+ children :
407
+ [
408
+ {
409
+ id : 'protocol',
410
+ type : 'select',
411
+ label : editor.lang.common.protocol,
412
+ 'default' : 'http://',
413
+ style : 'width : 100%;',
414
+ items :
415
+ [
416
+ [ 'http://' ],
417
+ [ 'https://' ],
418
+ [ 'ftp://' ],
419
+ [ 'news://' ],
420
+ [ '<other>', '' ]
421
+ ],
422
+ setup : function( data )
423
+ {
424
+ if ( data.url )
425
+ this.setValue( data.url.protocol || '' );
426
+ },
427
+ commit : function( data )
428
+ {
429
+ if ( !data.url )
430
+ data.url = {};
431
+
432
+ data.url.protocol = this.getValue();
433
+ }
434
+ },
435
+ {
436
+ type : 'text',
437
+ id : 'url',
438
+ label : editor.lang.common.url,
439
+ required: true,
440
+ onLoad : function ()
441
+ {
442
+ this.allowOnChange = true;
443
+ },
444
+ onKeyUp : function()
445
+ {
446
+ this.allowOnChange = false;
447
+ var protocolCmb = this.getDialog().getContentElement( 'info', 'protocol' ),
448
+ url = this.getValue(),
449
+ urlOnChangeProtocol = /^(http|https|ftp|news):\/\/(?=.)/gi,
450
+ urlOnChangeTestOther = /^((javascript:)|[#\/\.])/gi;
451
+
452
+ var protocol = urlOnChangeProtocol.exec( url );
453
+ if ( protocol )
454
+ {
455
+ this.setValue( url.substr( protocol[ 0 ].length ) );
456
+ protocolCmb.setValue( protocol[ 0 ].toLowerCase() );
457
+ }
458
+ else if ( urlOnChangeTestOther.test( url ) )
459
+ protocolCmb.setValue( '' );
460
+
461
+ this.allowOnChange = true;
462
+ },
463
+ onChange : function()
464
+ {
465
+ if ( this.allowOnChange ) // Dont't call on dialog load.
466
+ this.onKeyUp();
467
+ },
468
+ validate : function()
469
+ {
470
+ var dialog = this.getDialog();
471
+
472
+ if ( dialog.getContentElement( 'info', 'linkType' ) &&
473
+ dialog.getValueOf( 'info', 'linkType' ) != 'url' )
474
+ return true;
475
+
476
+ if ( this.getDialog().fakeObj ) // Edit Anchor.
477
+ return true;
478
+
479
+ var func = CKEDITOR.dialog.validate.notEmpty( editor.lang.link.noUrl );
480
+ return func.apply( this );
481
+ },
482
+ setup : function( data )
483
+ {
484
+ this.allowOnChange = false;
485
+ if ( data.url )
486
+ this.setValue( data.url.url );
487
+ this.allowOnChange = true;
488
+
489
+ },
490
+ commit : function( data )
491
+ {
492
+ // IE will not trigger the onChange event if the mouse has been used
493
+ // to carry all the operations #4724
494
+ this.onChange();
495
+
496
+ if ( !data.url )
497
+ data.url = {};
498
+
499
+ data.url.url = this.getValue();
500
+ this.allowOnChange = false;
501
+ }
502
+ }
503
+ ],
504
+ setup : function( data )
505
+ {
506
+ if ( !this.getDialog().getContentElement( 'info', 'linkType' ) )
507
+ this.getElement().show();
508
+ }
509
+ },
510
+ {
511
+ type : 'button',
512
+ id : 'browse',
513
+ hidden : 'true',
514
+ filebrowser : 'info:url',
515
+ label : editor.lang.common.browseServer
516
+ }
517
+ ]
518
+ },
519
+ {
520
+ type : 'vbox',
521
+ id : 'anchorOptions',
522
+ width : 260,
523
+ align : 'center',
524
+ padding : 0,
525
+ children :
526
+ [
527
+ {
528
+ type : 'fieldset',
529
+ id : 'selectAnchorText',
530
+ label : editor.lang.link.selectAnchor,
531
+ setup : function( data )
532
+ {
533
+ if ( data.anchors.length > 0 )
534
+ this.getElement().show();
535
+ else
536
+ this.getElement().hide();
537
+ },
538
+ children :
539
+ [
540
+ {
541
+ type : 'hbox',
542
+ id : 'selectAnchor',
543
+ children :
544
+ [
545
+ {
546
+ type : 'select',
547
+ id : 'anchorName',
548
+ 'default' : '',
549
+ label : editor.lang.link.anchorName,
550
+ style : 'width: 100%;',
551
+ items :
552
+ [
553
+ [ '' ]
554
+ ],
555
+ setup : function( data )
556
+ {
557
+ this.clear();
558
+ this.add( '' );
559
+ for ( var i = 0 ; i < data.anchors.length ; i++ )
560
+ {
561
+ if ( data.anchors[i].name )
562
+ this.add( data.anchors[i].name );
563
+ }
564
+
565
+ if ( data.anchor )
566
+ this.setValue( data.anchor.name );
567
+
568
+ var linkType = this.getDialog().getContentElement( 'info', 'linkType' );
569
+ if ( linkType && linkType.getValue() == 'email' )
570
+ this.focus();
571
+ },
572
+ commit : function( data )
573
+ {
574
+ if ( !data.anchor )
575
+ data.anchor = {};
576
+
577
+ data.anchor.name = this.getValue();
578
+ }
579
+ },
580
+ {
581
+ type : 'select',
582
+ id : 'anchorId',
583
+ 'default' : '',
584
+ label : editor.lang.link.anchorId,
585
+ style : 'width: 100%;',
586
+ items :
587
+ [
588
+ [ '' ]
589
+ ],
590
+ setup : function( data )
591
+ {
592
+ this.clear();
593
+ this.add( '' );
594
+ for ( var i = 0 ; i < data.anchors.length ; i++ )
595
+ {
596
+ if ( data.anchors[i].id )
597
+ this.add( data.anchors[i].id );
598
+ }
599
+
600
+ if ( data.anchor )
601
+ this.setValue( data.anchor.id );
602
+ },
603
+ commit : function( data )
604
+ {
605
+ if ( !data.anchor )
606
+ data.anchor = {};
607
+
608
+ data.anchor.id = this.getValue();
609
+ }
610
+ }
611
+ ],
612
+ setup : function( data )
613
+ {
614
+ if ( data.anchors.length > 0 )
615
+ this.getElement().show();
616
+ else
617
+ this.getElement().hide();
618
+ }
619
+ }
620
+ ]
621
+ },
622
+ {
623
+ type : 'html',
624
+ id : 'noAnchors',
625
+ style : 'text-align: center;',
626
+ html : '<div role="label" tabIndex="-1">' + CKEDITOR.tools.htmlEncode( editor.lang.link.noAnchors ) + '</div>',
627
+ // Focus the first element defined in above html.
628
+ focus : true,
629
+ setup : function( data )
630
+ {
631
+ if ( data.anchors.length < 1 )
632
+ this.getElement().show();
633
+ else
634
+ this.getElement().hide();
635
+ }
636
+ }
637
+ ],
638
+ setup : function( data )
639
+ {
640
+ if ( !this.getDialog().getContentElement( 'info', 'linkType' ) )
641
+ this.getElement().hide();
642
+ }
643
+ },
644
+ {
645
+ type : 'vbox',
646
+ id : 'emailOptions',
647
+ padding : 1,
648
+ children :
649
+ [
650
+ {
651
+ type : 'text',
652
+ id : 'emailAddress',
653
+ label : editor.lang.link.emailAddress,
654
+ required : true,
655
+ validate : function()
656
+ {
657
+ var dialog = this.getDialog();
658
+
659
+ if ( !dialog.getContentElement( 'info', 'linkType' ) ||
660
+ dialog.getValueOf( 'info', 'linkType' ) != 'email' )
661
+ return true;
662
+
663
+ var func = CKEDITOR.dialog.validate.notEmpty( editor.lang.link.noEmail );
664
+ return func.apply( this );
665
+ },
666
+ setup : function( data )
667
+ {
668
+ if ( data.email )
669
+ this.setValue( data.email.address );
670
+
671
+ var linkType = this.getDialog().getContentElement( 'info', 'linkType' );
672
+ if ( linkType && linkType.getValue() == 'email' )
673
+ this.select();
674
+ },
675
+ commit : function( data )
676
+ {
677
+ if ( !data.email )
678
+ data.email = {};
679
+
680
+ data.email.address = this.getValue();
681
+ }
682
+ },
683
+ {
684
+ type : 'text',
685
+ id : 'emailSubject',
686
+ label : editor.lang.link.emailSubject,
687
+ setup : function( data )
688
+ {
689
+ if ( data.email )
690
+ this.setValue( data.email.subject );
691
+ },
692
+ commit : function( data )
693
+ {
694
+ if ( !data.email )
695
+ data.email = {};
696
+
697
+ data.email.subject = this.getValue();
698
+ }
699
+ },
700
+ {
701
+ type : 'textarea',
702
+ id : 'emailBody',
703
+ label : editor.lang.link.emailBody,
704
+ rows : 3,
705
+ 'default' : '',
706
+ setup : function( data )
707
+ {
708
+ if ( data.email )
709
+ this.setValue( data.email.body );
710
+ },
711
+ commit : function( data )
712
+ {
713
+ if ( !data.email )
714
+ data.email = {};
715
+
716
+ data.email.body = this.getValue();
717
+ }
718
+ }
719
+ ],
720
+ setup : function( data )
721
+ {
722
+ if ( !this.getDialog().getContentElement( 'info', 'linkType' ) )
723
+ this.getElement().hide();
724
+ }
725
+ }
726
+ ]
727
+ },
728
+ {
729
+ id : 'target',
730
+ label : editor.lang.link.target,
731
+ title : editor.lang.link.target,
732
+ elements :
733
+ [
734
+ {
735
+ type : 'hbox',
736
+ widths : [ '50%', '50%' ],
737
+ children :
738
+ [
739
+ {
740
+ type : 'select',
741
+ id : 'linkTargetType',
742
+ label : editor.lang.common.target,
743
+ 'default' : 'notSet',
744
+ style : 'width : 100%;',
745
+ 'items' :
746
+ [
747
+ [ editor.lang.common.notSet, 'notSet' ],
748
+ [ editor.lang.link.targetFrame, 'frame' ],
749
+ [ editor.lang.link.targetPopup, 'popup' ],
750
+ [ editor.lang.common.targetNew, '_blank' ],
751
+ [ editor.lang.common.targetTop, '_top' ],
752
+ [ editor.lang.common.targetSelf, '_self' ],
753
+ [ editor.lang.common.targetParent, '_parent' ]
754
+ ],
755
+ onChange : targetChanged,
756
+ setup : function( data )
757
+ {
758
+ if ( data.target )
759
+ this.setValue( data.target.type );
760
+ },
761
+ commit : function( data )
762
+ {
763
+ if ( !data.target )
764
+ data.target = {};
765
+
766
+ data.target.type = this.getValue();
767
+ }
768
+ },
769
+ {
770
+ type : 'text',
771
+ id : 'linkTargetName',
772
+ label : editor.lang.link.targetFrameName,
773
+ 'default' : '',
774
+ setup : function( data )
775
+ {
776
+ if ( data.target )
777
+ this.setValue( data.target.name );
778
+ },
779
+ commit : function( data )
780
+ {
781
+ if ( !data.target )
782
+ data.target = {};
783
+
784
+ data.target.name = this.getValue();
785
+ }
786
+ }
787
+ ]
788
+ },
789
+ {
790
+ type : 'vbox',
791
+ width : 260,
792
+ align : 'center',
793
+ padding : 2,
794
+ id : 'popupFeatures',
795
+ children :
796
+ [
797
+ {
798
+ type : 'fieldset',
799
+ label : editor.lang.link.popupFeatures,
800
+ children :
801
+ [
802
+ {
803
+ type : 'hbox',
804
+ children :
805
+ [
806
+ {
807
+ type : 'checkbox',
808
+ id : 'resizable',
809
+ label : editor.lang.link.popupResizable,
810
+ setup : setupPopupParams,
811
+ commit : commitPopupParams
812
+ },
813
+ {
814
+ type : 'checkbox',
815
+ id : 'status',
816
+ label : editor.lang.link.popupStatusBar,
817
+ setup : setupPopupParams,
818
+ commit : commitPopupParams
819
+
820
+ }
821
+ ]
822
+ },
823
+ {
824
+ type : 'hbox',
825
+ children :
826
+ [
827
+ {
828
+ type : 'checkbox',
829
+ id : 'location',
830
+ label : editor.lang.link.popupLocationBar,
831
+ setup : setupPopupParams,
832
+ commit : commitPopupParams
833
+
834
+ },
835
+ {
836
+ type : 'checkbox',
837
+ id : 'toolbar',
838
+ label : editor.lang.link.popupToolbar,
839
+ setup : setupPopupParams,
840
+ commit : commitPopupParams
841
+
842
+ }
843
+ ]
844
+ },
845
+ {
846
+ type : 'hbox',
847
+ children :
848
+ [
849
+ {
850
+ type : 'checkbox',
851
+ id : 'menubar',
852
+ label : editor.lang.link.popupMenuBar,
853
+ setup : setupPopupParams,
854
+ commit : commitPopupParams
855
+
856
+ },
857
+ {
858
+ type : 'checkbox',
859
+ id : 'fullscreen',
860
+ label : editor.lang.link.popupFullScreen,
861
+ setup : setupPopupParams,
862
+ commit : commitPopupParams
863
+
864
+ }
865
+ ]
866
+ },
867
+ {
868
+ type : 'hbox',
869
+ children :
870
+ [
871
+ {
872
+ type : 'checkbox',
873
+ id : 'scrollbars',
874
+ label : editor.lang.link.popupScrollBars,
875
+ setup : setupPopupParams,
876
+ commit : commitPopupParams
877
+
878
+ },
879
+ {
880
+ type : 'checkbox',
881
+ id : 'dependent',
882
+ label : editor.lang.link.popupDependent,
883
+ setup : setupPopupParams,
884
+ commit : commitPopupParams
885
+
886
+ }
887
+ ]
888
+ },
889
+ {
890
+ type : 'hbox',
891
+ children :
892
+ [
893
+ {
894
+ type : 'text',
895
+ widths : [ '30%', '70%' ],
896
+ labelLayout : 'horizontal',
897
+ label : editor.lang.link.popupWidth,
898
+ id : 'width',
899
+ setup : setupPopupParams,
900
+ commit : commitPopupParams
901
+
902
+ },
903
+ {
904
+ type : 'text',
905
+ labelLayout : 'horizontal',
906
+ widths : [ '55%', '45%' ],
907
+ label : editor.lang.link.popupLeft,
908
+ id : 'left',
909
+ setup : setupPopupParams,
910
+ commit : commitPopupParams
911
+
912
+ }
913
+ ]
914
+ },
915
+ {
916
+ type : 'hbox',
917
+ children :
918
+ [
919
+ {
920
+ type : 'text',
921
+ labelLayout : 'horizontal',
922
+ widths : [ '30%', '70%' ],
923
+ label : editor.lang.link.popupHeight,
924
+ id : 'height',
925
+ setup : setupPopupParams,
926
+ commit : commitPopupParams
927
+
928
+ },
929
+ {
930
+ type : 'text',
931
+ labelLayout : 'horizontal',
932
+ label : editor.lang.link.popupTop,
933
+ widths : [ '55%', '45%' ],
934
+ id : 'top',
935
+ setup : setupPopupParams,
936
+ commit : commitPopupParams
937
+
938
+ }
939
+ ]
940
+ }
941
+ ]
942
+ }
943
+ ]
944
+ }
945
+ ]
946
+ },
947
+ {
948
+ id : 'upload',
949
+ label : editor.lang.link.upload,
950
+ title : editor.lang.link.upload,
951
+ hidden : true,
952
+ filebrowser : 'uploadButton',
953
+ elements :
954
+ [
955
+ {
956
+ type : 'file',
957
+ id : 'upload',
958
+ label : editor.lang.common.upload,
959
+ style: 'height:40px',
960
+ size : 29
961
+ },
962
+ {
963
+ type : 'fileButton',
964
+ id : 'uploadButton',
965
+ label : editor.lang.common.uploadSubmit,
966
+ filebrowser : 'info:url',
967
+ 'for' : [ 'upload', 'upload' ]
968
+ }
969
+ ]
970
+ },
971
+ {
972
+ id : 'advanced',
973
+ label : editor.lang.link.advanced,
974
+ title : editor.lang.link.advanced,
975
+ elements :
976
+ [
977
+ {
978
+ type : 'vbox',
979
+ padding : 1,
980
+ children :
981
+ [
982
+ {
983
+ type : 'hbox',
984
+ widths : [ '45%', '35%', '20%' ],
985
+ children :
986
+ [
987
+ {
988
+ type : 'text',
989
+ id : 'advId',
990
+ label : editor.lang.link.id,
991
+ setup : setupAdvParams,
992
+ commit : commitAdvParams
993
+ },
994
+ {
995
+ type : 'select',
996
+ id : 'advLangDir',
997
+ label : editor.lang.link.langDir,
998
+ 'default' : '',
999
+ style : 'width:110px',
1000
+ items :
1001
+ [
1002
+ [ editor.lang.common.notSet, '' ],
1003
+ [ editor.lang.link.langDirLTR, 'ltr' ],
1004
+ [ editor.lang.link.langDirRTL, 'rtl' ]
1005
+ ],
1006
+ setup : setupAdvParams,
1007
+ commit : commitAdvParams
1008
+ },
1009
+ {
1010
+ type : 'text',
1011
+ id : 'advAccessKey',
1012
+ width : '80px',
1013
+ label : editor.lang.link.acccessKey,
1014
+ maxLength : 1,
1015
+ setup : setupAdvParams,
1016
+ commit : commitAdvParams
1017
+
1018
+ }
1019
+ ]
1020
+ },
1021
+ {
1022
+ type : 'hbox',
1023
+ widths : [ '45%', '35%', '20%' ],
1024
+ children :
1025
+ [
1026
+ {
1027
+ type : 'text',
1028
+ label : editor.lang.link.name,
1029
+ id : 'advName',
1030
+ setup : setupAdvParams,
1031
+ commit : commitAdvParams
1032
+
1033
+ },
1034
+ {
1035
+ type : 'text',
1036
+ label : editor.lang.link.langCode,
1037
+ id : 'advLangCode',
1038
+ width : '110px',
1039
+ 'default' : '',
1040
+ setup : setupAdvParams,
1041
+ commit : commitAdvParams
1042
+
1043
+ },
1044
+ {
1045
+ type : 'text',
1046
+ label : editor.lang.link.tabIndex,
1047
+ id : 'advTabIndex',
1048
+ width : '80px',
1049
+ maxLength : 5,
1050
+ setup : setupAdvParams,
1051
+ commit : commitAdvParams
1052
+
1053
+ }
1054
+ ]
1055
+ }
1056
+ ]
1057
+ },
1058
+ {
1059
+ type : 'vbox',
1060
+ padding : 1,
1061
+ children :
1062
+ [
1063
+ {
1064
+ type : 'hbox',
1065
+ widths : [ '45%', '55%' ],
1066
+ children :
1067
+ [
1068
+ {
1069
+ type : 'text',
1070
+ label : editor.lang.link.advisoryTitle,
1071
+ 'default' : '',
1072
+ id : 'advTitle',
1073
+ setup : setupAdvParams,
1074
+ commit : commitAdvParams
1075
+
1076
+ },
1077
+ {
1078
+ type : 'text',
1079
+ label : editor.lang.link.advisoryContentType,
1080
+ 'default' : '',
1081
+ id : 'advContentType',
1082
+ setup : setupAdvParams,
1083
+ commit : commitAdvParams
1084
+
1085
+ }
1086
+ ]
1087
+ },
1088
+ {
1089
+ type : 'hbox',
1090
+ widths : [ '45%', '55%' ],
1091
+ children :
1092
+ [
1093
+ {
1094
+ type : 'text',
1095
+ label : editor.lang.link.cssClasses,
1096
+ 'default' : '',
1097
+ id : 'advCSSClasses',
1098
+ setup : setupAdvParams,
1099
+ commit : commitAdvParams
1100
+
1101
+ },
1102
+ {
1103
+ type : 'text',
1104
+ label : editor.lang.link.charset,
1105
+ 'default' : '',
1106
+ id : 'advCharset',
1107
+ setup : setupAdvParams,
1108
+ commit : commitAdvParams
1109
+
1110
+ }
1111
+ ]
1112
+ },
1113
+ {
1114
+ type : 'hbox',
1115
+ children :
1116
+ [
1117
+ {
1118
+ type : 'text',
1119
+ label : editor.lang.link.styles,
1120
+ 'default' : '',
1121
+ id : 'advStyles',
1122
+ setup : setupAdvParams,
1123
+ commit : commitAdvParams
1124
+
1125
+ }
1126
+ ]
1127
+ }
1128
+ ]
1129
+ }
1130
+ ]
1131
+ }
1132
+ ],
1133
+ onShow : function()
1134
+ {
1135
+ this.fakeObj = false;
1136
+
1137
+ var editor = this.getParentEditor(),
1138
+ selection = editor.getSelection(),
1139
+ ranges = selection.getRanges(),
1140
+ element = null,
1141
+ me = this;
1142
+ // Fill in all the relevant fields if there's already one link selected.
1143
+ if ( ranges.length == 1 )
1144
+ {
1145
+
1146
+ var rangeRoot = ranges[0].getCommonAncestor( true );
1147
+ element = rangeRoot.getAscendant( 'a', true );
1148
+ if ( element && element.getAttribute( 'href' ) )
1149
+ {
1150
+ selection.selectElement( element );
1151
+ }
1152
+ else if ( ( element = rangeRoot.getAscendant( 'img', true ) ) &&
1153
+ element.getAttribute( '_cke_real_element_type' ) &&
1154
+ element.getAttribute( '_cke_real_element_type' ) == 'anchor' )
1155
+ {
1156
+ this.fakeObj = element;
1157
+ element = editor.restoreRealElement( this.fakeObj );
1158
+ selection.selectElement( this.fakeObj );
1159
+ }
1160
+ else
1161
+ element = null;
1162
+ }
1163
+
1164
+ this.setupContent( parseLink.apply( this, [ editor, element ] ) );
1165
+ },
1166
+ onOk : function()
1167
+ {
1168
+ var attributes = { href : 'javascript:void(0)/*' + CKEDITOR.tools.getNextNumber() + '*/' },
1169
+ removeAttributes = [],
1170
+ data = { href : attributes.href },
1171
+ me = this,
1172
+ editor = this.getParentEditor();
1173
+
1174
+ this.commitContent( data );
1175
+
1176
+ // Compose the URL.
1177
+ switch ( data.type || 'url' )
1178
+ {
1179
+ case 'url':
1180
+ var protocol = ( data.url && data.url.protocol != undefined ) ? data.url.protocol : 'http://',
1181
+ url = ( data.url && data.url.url ) || '';
1182
+ attributes._cke_saved_href = ( url.indexOf( '/' ) === 0 ) ? url : protocol + url;
1183
+ break;
1184
+ case 'anchor':
1185
+ var name = ( data.anchor && data.anchor.name ),
1186
+ id = ( data.anchor && data.anchor.id );
1187
+ attributes._cke_saved_href = '#' + ( name || id || '' );
1188
+ break;
1189
+ case 'email':
1190
+
1191
+ var linkHref,
1192
+ email = data.email,
1193
+ address = email.address;
1194
+
1195
+ switch( emailProtection )
1196
+ {
1197
+ case '' :
1198
+ case 'encode' :
1199
+ {
1200
+ var subject = encodeURIComponent( email.subject || '' ),
1201
+ body = encodeURIComponent( email.body || '' );
1202
+
1203
+ // Build the e-mail parameters first.
1204
+ var argList = [];
1205
+ subject && argList.push( 'subject=' + subject );
1206
+ body && argList.push( 'body=' + body );
1207
+ argList = argList.length ? '?' + argList.join( '&' ) : '';
1208
+
1209
+ if ( emailProtection == 'encode' )
1210
+ {
1211
+ linkHref = [ 'javascript:void(location.href=\'mailto:\'+',
1212
+ protectEmailAddressAsEncodedString( address ) ];
1213
+ // parameters are optional.
1214
+ argList && linkHref.push( '+\'', escapeSingleQuote( argList ), '\'' );
1215
+
1216
+ linkHref.push( ')' );
1217
+ }
1218
+ else
1219
+ linkHref = [ 'mailto:', address, argList ];
1220
+
1221
+ break;
1222
+ }
1223
+ default :
1224
+ {
1225
+ // Separating name and domain.
1226
+ var nameAndDomain = address.split( '@', 2 );
1227
+ email.name = nameAndDomain[ 0 ];
1228
+ email.domain = nameAndDomain[ 1 ];
1229
+
1230
+ linkHref = [ 'javascript:', protectEmailLinkAsFunction( email ) ];
1231
+ }
1232
+ }
1233
+
1234
+ attributes._cke_saved_href = linkHref.join( '' );
1235
+ break;
1236
+ }
1237
+
1238
+ // Popups and target.
1239
+ if ( data.target )
1240
+ {
1241
+ if ( data.target.type == 'popup' )
1242
+ {
1243
+ var onclickList = [ 'window.open(this.href, \'',
1244
+ data.target.name || '', '\', \'' ];
1245
+ var featureList = [ 'resizable', 'status', 'location', 'toolbar', 'menubar', 'fullscreen',
1246
+ 'scrollbars', 'dependent' ];
1247
+ var featureLength = featureList.length;
1248
+ var addFeature = function( featureName )
1249
+ {
1250
+ if ( data.target[ featureName ] )
1251
+ featureList.push( featureName + '=' + data.target[ featureName ] );
1252
+ };
1253
+
1254
+ for ( var i = 0 ; i < featureLength ; i++ )
1255
+ featureList[i] = featureList[i] + ( data.target[ featureList[i] ] ? '=yes' : '=no' ) ;
1256
+ addFeature( 'width' );
1257
+ addFeature( 'left' );
1258
+ addFeature( 'height' );
1259
+ addFeature( 'top' );
1260
+
1261
+ onclickList.push( featureList.join( ',' ), '\'); return false;' );
1262
+ attributes[ '_cke_pa_onclick' ] = onclickList.join( '' );
1263
+ }
1264
+ else
1265
+ {
1266
+ if ( data.target.type != 'notSet' && data.target.name )
1267
+ attributes.target = data.target.name;
1268
+ else
1269
+ removeAttributes.push( 'target' );
1270
+
1271
+ removeAttributes.push( '_cke_pa_onclick', 'onclick' );
1272
+ }
1273
+ }
1274
+
1275
+ // Advanced attributes.
1276
+ if ( data.adv )
1277
+ {
1278
+ var advAttr = function( inputName, attrName )
1279
+ {
1280
+ var value = data.adv[ inputName ];
1281
+ if ( value )
1282
+ attributes[attrName] = value;
1283
+ else
1284
+ removeAttributes.push( attrName );
1285
+ };
1286
+
1287
+ if ( this._.selectedElement )
1288
+ advAttr( 'advId', 'id' );
1289
+ advAttr( 'advLangDir', 'dir' );
1290
+ advAttr( 'advAccessKey', 'accessKey' );
1291
+ advAttr( 'advName', 'name' );
1292
+ advAttr( 'advLangCode', 'lang' );
1293
+ advAttr( 'advTabIndex', 'tabindex' );
1294
+ advAttr( 'advTitle', 'title' );
1295
+ advAttr( 'advContentType', 'type' );
1296
+ advAttr( 'advCSSClasses', 'class' );
1297
+ advAttr( 'advCharset', 'charset' );
1298
+ advAttr( 'advStyles', 'style' );
1299
+ }
1300
+
1301
+ if ( !this._.selectedElement )
1302
+ {
1303
+ // Create element if current selection is collapsed.
1304
+ var selection = editor.getSelection(),
1305
+ ranges = selection.getRanges();
1306
+ if ( ranges.length == 1 && ranges[0].collapsed )
1307
+ {
1308
+ var text = new CKEDITOR.dom.text( attributes._cke_saved_href, editor.document );
1309
+ ranges[0].insertNode( text );
1310
+ ranges[0].selectNodeContents( text );
1311
+ selection.selectRanges( ranges );
1312
+ }
1313
+
1314
+ // Apply style.
1315
+ var style = new CKEDITOR.style( { element : 'a', attributes : attributes } );
1316
+ style.type = CKEDITOR.STYLE_INLINE; // need to override... dunno why.
1317
+ style.apply( editor.document );
1318
+
1319
+ // Id. Apply only to the first link.
1320
+ if ( data.adv && data.adv.advId )
1321
+ {
1322
+ var links = this.getParentEditor().document.$.getElementsByTagName( 'a' );
1323
+ for ( i = 0 ; i < links.length ; i++ )
1324
+ {
1325
+ if ( links[i].href == attributes.href )
1326
+ {
1327
+ links[i].id = data.adv.advId;
1328
+ break;
1329
+ }
1330
+ }
1331
+ }
1332
+ }
1333
+ else
1334
+ {
1335
+ // We're only editing an existing link, so just overwrite the attributes.
1336
+ var element = this._.selectedElement,
1337
+ href = element.getAttribute( '_cke_saved_href' ),
1338
+ textView = element.getHtml();
1339
+
1340
+ // IE BUG: Setting the name attribute to an existing link doesn't work.
1341
+ // Must re-create the link from weired syntax to workaround.
1342
+ if ( CKEDITOR.env.ie && attributes.name != element.getAttribute( 'name' ) )
1343
+ {
1344
+ var newElement = new CKEDITOR.dom.element( '<a name="' + CKEDITOR.tools.htmlEncode( attributes.name ) + '">',
1345
+ editor.document );
1346
+
1347
+ selection = editor.getSelection();
1348
+
1349
+ element.moveChildren( newElement );
1350
+ element.copyAttributes( newElement, { name : 1 } );
1351
+ newElement.replace( element );
1352
+ element = newElement;
1353
+
1354
+ selection.selectElement( element );
1355
+ }
1356
+
1357
+ element.setAttributes( attributes );
1358
+ element.removeAttributes( removeAttributes );
1359
+ // Update text view when user changes protocol #4612.
1360
+ if (href == textView)
1361
+ element.setHtml( attributes._cke_saved_href );
1362
+ // Make the element display as an anchor if a name has been set.
1363
+ if ( element.getAttribute( 'name' ) )
1364
+ element.addClass( 'cke_anchor' );
1365
+ else
1366
+ element.removeClass( 'cke_anchor' );
1367
+
1368
+ if ( this.fakeObj )
1369
+ editor.createFakeElement( element, 'cke_anchor', 'anchor' ).replace( this.fakeObj );
1370
+
1371
+ delete this._.selectedElement;
1372
+ }
1373
+ },
1374
+ onLoad : function()
1375
+ {
1376
+ if ( !editor.config.linkShowAdvancedTab )
1377
+ this.hidePage( 'advanced' ); //Hide Advanded tab.
1378
+
1379
+ if ( !editor.config.linkShowTargetTab )
1380
+ this.hidePage( 'target' ); //Hide Target tab.
1381
+
1382
+ },
1383
+ // Inital focus on 'url' field if link is of type URL.
1384
+ onFocus : function()
1385
+ {
1386
+ var linkType = this.getContentElement( 'info', 'linkType' ),
1387
+ urlField;
1388
+ if ( linkType && linkType.getValue( ) == 'url' )
1389
+ {
1390
+ urlField = this.getContentElement( 'info', 'url' );
1391
+ urlField.select();
1392
+ }
1393
+ }
1394
+ };
1395
+ });
1396
+
1397
+ /**
1398
+ * The e-mail address anti-spam protection option. The protection will be
1399
+ * applied when creating or modifying e-mail links through the editor interface.<br>
1400
+ * Two methods of protection can be choosed:
1401
+ * <ol> <li>The e-mail parts (name, domain and any other query string) are
1402
+ * assembled into a function call pattern. Such function must be
1403
+ * provided by the developer in the pages that will use the contents.
1404
+ * <li>Only the e-mail address is obfuscated into a special string that
1405
+ * has no meaning for humans or spam bots, but which is properly
1406
+ * rendered and accepted by the browser.</li></ol>
1407
+ * Both approaches require JavaScript to be enabled.
1408
+ * @name CKEDITOR.config.emailProtection
1409
+ * @since 3.1
1410
+ * @type String
1411
+ * @default '' (empty string = disabled)
1412
+ * @example
1413
+ * // href="mailto:tester@ckeditor.com?subject=subject&body=body"
1414
+ * config.emailProtection = '';
1415
+ * @example
1416
+ * // href="<a href=\"javascript:void(location.href=\'mailto:\'+String.fromCharCode(116,101,115,116,101,114,64,99,107,101,100,105,116,111,114,46,99,111,109)+\'?subject=subject&body=body\')\">e-mail</a>"
1417
+ * config.emailProtection = 'encode';
1418
+ * @example
1419
+ * // href="javascript:mt('tester','ckeditor.com','subject','body')"
1420
+ * config.emailProtection = 'mt(NAME,DOMAIN,SUBJECT,BODY)';
1421
+ */