ppc_logic 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (665) hide show
  1. data/Gemfile +1 -4
  2. data/VERSION +1 -1
  3. data/app/models/landing_page.rb +13 -50
  4. data/app/views/admin/landing_pages/_form.html.erb +1 -1
  5. data/app/views/layouts/application.html.erb +2 -8
  6. data/config/environments/development.rb +1 -0
  7. data/config/environments/production.rb +2 -0
  8. data/config/environments/test.rb +2 -3
  9. data/features/manage_landing_pages.feature +1 -1
  10. data/features/manage_local_offers.feature +1 -1
  11. data/features/support/env.rb +38 -20
  12. data/lib/tasks/cucumber.rake +12 -0
  13. data/ppc_logic.gemspec +5 -659
  14. metadata +22 -686
  15. data/public/404.html +0 -26
  16. data/public/422.html +0 -26
  17. data/public/500.html +0 -26
  18. data/public/favicon.ico +0 -0
  19. data/public/javascripts/application.js +0 -2
  20. data/public/javascripts/ckeditor/.htaccess +0 -24
  21. data/public/javascripts/ckeditor/CHANGES.html +0 -993
  22. data/public/javascripts/ckeditor/INSTALL.html +0 -92
  23. data/public/javascripts/ckeditor/LICENSE.html +0 -1334
  24. data/public/javascripts/ckeditor/_samples/ajax.html +0 -87
  25. data/public/javascripts/ckeditor/_samples/api.html +0 -152
  26. data/public/javascripts/ckeditor/_samples/api_dialog.html +0 -188
  27. data/public/javascripts/ckeditor/_samples/api_dialog/my_dialog.js +0 -28
  28. data/public/javascripts/ckeditor/_samples/asp/advanced.asp +0 -105
  29. data/public/javascripts/ckeditor/_samples/asp/events.asp +0 -136
  30. data/public/javascripts/ckeditor/_samples/asp/index.html +0 -103
  31. data/public/javascripts/ckeditor/_samples/asp/replace.asp +0 -72
  32. data/public/javascripts/ckeditor/_samples/asp/replaceall.asp +0 -77
  33. data/public/javascripts/ckeditor/_samples/asp/sample_posteddata.asp +0 -46
  34. data/public/javascripts/ckeditor/_samples/asp/standalone.asp +0 -72
  35. data/public/javascripts/ckeditor/_samples/assets/output_for_flash.fla +0 -0
  36. data/public/javascripts/ckeditor/_samples/assets/output_for_flash.swf +0 -0
  37. data/public/javascripts/ckeditor/_samples/assets/output_xhtml.css +0 -204
  38. data/public/javascripts/ckeditor/_samples/assets/swfobject.js +0 -18
  39. data/public/javascripts/ckeditor/_samples/autogrow.html +0 -75
  40. data/public/javascripts/ckeditor/_samples/divreplace.html +0 -137
  41. data/public/javascripts/ckeditor/_samples/enterkey.html +0 -88
  42. data/public/javascripts/ckeditor/_samples/fullpage.html +0 -62
  43. data/public/javascripts/ckeditor/_samples/index.html +0 -57
  44. data/public/javascripts/ckeditor/_samples/jqueryadapter.html +0 -73
  45. data/public/javascripts/ckeditor/_samples/output_for_flash.html +0 -257
  46. data/public/javascripts/ckeditor/_samples/output_html.html +0 -259
  47. data/public/javascripts/ckeditor/_samples/output_xhtml.html +0 -159
  48. data/public/javascripts/ckeditor/_samples/php/advanced.php +0 -93
  49. data/public/javascripts/ckeditor/_samples/php/events.php +0 -130
  50. data/public/javascripts/ckeditor/_samples/php/replace.php +0 -63
  51. data/public/javascripts/ckeditor/_samples/php/replaceall.php +0 -68
  52. data/public/javascripts/ckeditor/_samples/php/standalone.php +0 -64
  53. data/public/javascripts/ckeditor/_samples/replacebyclass.html +0 -49
  54. data/public/javascripts/ckeditor/_samples/replacebycode.html +0 -80
  55. data/public/javascripts/ckeditor/_samples/sample.css +0 -81
  56. data/public/javascripts/ckeditor/_samples/sample.js +0 -65
  57. data/public/javascripts/ckeditor/_samples/sample_posteddata.php +0 -59
  58. data/public/javascripts/ckeditor/_samples/sharedspaces.html +0 -131
  59. data/public/javascripts/ckeditor/_samples/skins.html +0 -83
  60. data/public/javascripts/ckeditor/_samples/ui_color.html +0 -87
  61. data/public/javascripts/ckeditor/_samples/ui_languages.html +0 -103
  62. data/public/javascripts/ckeditor/_source/adapters/jquery.js +0 -297
  63. data/public/javascripts/ckeditor/_source/core/_bootstrap.js +0 -96
  64. data/public/javascripts/ckeditor/_source/core/ajax.js +0 -142
  65. data/public/javascripts/ckeditor/_source/core/ckeditor.js +0 -133
  66. data/public/javascripts/ckeditor/_source/core/ckeditor_base.js +0 -196
  67. data/public/javascripts/ckeditor/_source/core/ckeditor_basic.js +0 -239
  68. data/public/javascripts/ckeditor/_source/core/command.js +0 -209
  69. data/public/javascripts/ckeditor/_source/core/commanddefinition.js +0 -129
  70. data/public/javascripts/ckeditor/_source/core/config.js +0 -430
  71. data/public/javascripts/ckeditor/_source/core/dataprocessor.js +0 -65
  72. data/public/javascripts/ckeditor/_source/core/dom.js +0 -20
  73. data/public/javascripts/ckeditor/_source/core/dom/comment.js +0 -32
  74. data/public/javascripts/ckeditor/_source/core/dom/document.js +0 -224
  75. data/public/javascripts/ckeditor/_source/core/dom/documentfragment.js +0 -49
  76. data/public/javascripts/ckeditor/_source/core/dom/domobject.js +0 -255
  77. data/public/javascripts/ckeditor/_source/core/dom/element.js +0 -1564
  78. data/public/javascripts/ckeditor/_source/core/dom/elementpath.js +0 -119
  79. data/public/javascripts/ckeditor/_source/core/dom/event.js +0 -142
  80. data/public/javascripts/ckeditor/_source/core/dom/node.js +0 -683
  81. data/public/javascripts/ckeditor/_source/core/dom/nodelist.js +0 -26
  82. data/public/javascripts/ckeditor/_source/core/dom/range.js +0 -1883
  83. data/public/javascripts/ckeditor/_source/core/dom/rangelist.js +0 -214
  84. data/public/javascripts/ckeditor/_source/core/dom/text.js +0 -123
  85. data/public/javascripts/ckeditor/_source/core/dom/walker.js +0 -445
  86. data/public/javascripts/ckeditor/_source/core/dom/window.js +0 -96
  87. data/public/javascripts/ckeditor/_source/core/dtd.js +0 -238
  88. data/public/javascripts/ckeditor/_source/core/editor.js +0 -924
  89. data/public/javascripts/ckeditor/_source/core/editor_basic.js +0 -182
  90. data/public/javascripts/ckeditor/_source/core/env.js +0 -270
  91. data/public/javascripts/ckeditor/_source/core/event.js +0 -342
  92. data/public/javascripts/ckeditor/_source/core/eventInfo.js +0 -120
  93. data/public/javascripts/ckeditor/_source/core/focusmanager.js +0 -152
  94. data/public/javascripts/ckeditor/_source/core/htmlparser.js +0 -224
  95. data/public/javascripts/ckeditor/_source/core/htmlparser/basicwriter.js +0 -145
  96. data/public/javascripts/ckeditor/_source/core/htmlparser/cdata.js +0 -43
  97. data/public/javascripts/ckeditor/_source/core/htmlparser/comment.js +0 -60
  98. data/public/javascripts/ckeditor/_source/core/htmlparser/element.js +0 -240
  99. data/public/javascripts/ckeditor/_source/core/htmlparser/filter.js +0 -288
  100. data/public/javascripts/ckeditor/_source/core/htmlparser/fragment.js +0 -504
  101. data/public/javascripts/ckeditor/_source/core/htmlparser/text.js +0 -55
  102. data/public/javascripts/ckeditor/_source/core/imagecacher.js +0 -80
  103. data/public/javascripts/ckeditor/_source/core/lang.js +0 -156
  104. data/public/javascripts/ckeditor/_source/core/loader.js +0 -243
  105. data/public/javascripts/ckeditor/_source/core/plugindefinition.js +0 -66
  106. data/public/javascripts/ckeditor/_source/core/plugins.js +0 -85
  107. data/public/javascripts/ckeditor/_source/core/resourcemanager.js +0 -238
  108. data/public/javascripts/ckeditor/_source/core/scriptloader.js +0 -200
  109. data/public/javascripts/ckeditor/_source/core/skins.js +0 -212
  110. data/public/javascripts/ckeditor/_source/core/themes.js +0 -19
  111. data/public/javascripts/ckeditor/_source/core/tools.js +0 -734
  112. data/public/javascripts/ckeditor/_source/core/ui.js +0 -116
  113. data/public/javascripts/ckeditor/_source/core/xml.js +0 -165
  114. data/public/javascripts/ckeditor/_source/lang/_languages.js +0 -83
  115. data/public/javascripts/ckeditor/_source/lang/_translationstatus.txt +0 -60
  116. data/public/javascripts/ckeditor/_source/lang/af.js +0 -758
  117. data/public/javascripts/ckeditor/_source/lang/ar.js +0 -758
  118. data/public/javascripts/ckeditor/_source/lang/bg.js +0 -758
  119. data/public/javascripts/ckeditor/_source/lang/bn.js +0 -758
  120. data/public/javascripts/ckeditor/_source/lang/bs.js +0 -758
  121. data/public/javascripts/ckeditor/_source/lang/ca.js +0 -758
  122. data/public/javascripts/ckeditor/_source/lang/cs.js +0 -758
  123. data/public/javascripts/ckeditor/_source/lang/cy.js +0 -758
  124. data/public/javascripts/ckeditor/_source/lang/da.js +0 -758
  125. data/public/javascripts/ckeditor/_source/lang/de.js +0 -758
  126. data/public/javascripts/ckeditor/_source/lang/el.js +0 -758
  127. data/public/javascripts/ckeditor/_source/lang/en-au.js +0 -758
  128. data/public/javascripts/ckeditor/_source/lang/en-ca.js +0 -758
  129. data/public/javascripts/ckeditor/_source/lang/en-gb.js +0 -758
  130. data/public/javascripts/ckeditor/_source/lang/en.js +0 -758
  131. data/public/javascripts/ckeditor/_source/lang/eo.js +0 -758
  132. data/public/javascripts/ckeditor/_source/lang/es.js +0 -758
  133. data/public/javascripts/ckeditor/_source/lang/et.js +0 -758
  134. data/public/javascripts/ckeditor/_source/lang/eu.js +0 -758
  135. data/public/javascripts/ckeditor/_source/lang/fa.js +0 -758
  136. data/public/javascripts/ckeditor/_source/lang/fi.js +0 -758
  137. data/public/javascripts/ckeditor/_source/lang/fo.js +0 -758
  138. data/public/javascripts/ckeditor/_source/lang/fr-ca.js +0 -758
  139. data/public/javascripts/ckeditor/_source/lang/fr.js +0 -758
  140. data/public/javascripts/ckeditor/_source/lang/gl.js +0 -758
  141. data/public/javascripts/ckeditor/_source/lang/gu.js +0 -758
  142. data/public/javascripts/ckeditor/_source/lang/he.js +0 -758
  143. data/public/javascripts/ckeditor/_source/lang/hi.js +0 -758
  144. data/public/javascripts/ckeditor/_source/lang/hr.js +0 -758
  145. data/public/javascripts/ckeditor/_source/lang/hu.js +0 -758
  146. data/public/javascripts/ckeditor/_source/lang/is.js +0 -758
  147. data/public/javascripts/ckeditor/_source/lang/it.js +0 -758
  148. data/public/javascripts/ckeditor/_source/lang/ja.js +0 -758
  149. data/public/javascripts/ckeditor/_source/lang/km.js +0 -758
  150. data/public/javascripts/ckeditor/_source/lang/ko.js +0 -758
  151. data/public/javascripts/ckeditor/_source/lang/lt.js +0 -758
  152. data/public/javascripts/ckeditor/_source/lang/lv.js +0 -758
  153. data/public/javascripts/ckeditor/_source/lang/mn.js +0 -758
  154. data/public/javascripts/ckeditor/_source/lang/ms.js +0 -758
  155. data/public/javascripts/ckeditor/_source/lang/nb.js +0 -758
  156. data/public/javascripts/ckeditor/_source/lang/nl.js +0 -758
  157. data/public/javascripts/ckeditor/_source/lang/no.js +0 -758
  158. data/public/javascripts/ckeditor/_source/lang/pl.js +0 -758
  159. data/public/javascripts/ckeditor/_source/lang/pt-br.js +0 -757
  160. data/public/javascripts/ckeditor/_source/lang/pt.js +0 -758
  161. data/public/javascripts/ckeditor/_source/lang/ro.js +0 -758
  162. data/public/javascripts/ckeditor/_source/lang/ru.js +0 -758
  163. data/public/javascripts/ckeditor/_source/lang/sk.js +0 -758
  164. data/public/javascripts/ckeditor/_source/lang/sl.js +0 -758
  165. data/public/javascripts/ckeditor/_source/lang/sr-latn.js +0 -758
  166. data/public/javascripts/ckeditor/_source/lang/sr.js +0 -758
  167. data/public/javascripts/ckeditor/_source/lang/sv.js +0 -758
  168. data/public/javascripts/ckeditor/_source/lang/th.js +0 -758
  169. data/public/javascripts/ckeditor/_source/lang/tr.js +0 -757
  170. data/public/javascripts/ckeditor/_source/lang/uk.js +0 -758
  171. data/public/javascripts/ckeditor/_source/lang/vi.js +0 -758
  172. data/public/javascripts/ckeditor/_source/lang/zh-cn.js +0 -758
  173. data/public/javascripts/ckeditor/_source/lang/zh.js +0 -758
  174. data/public/javascripts/ckeditor/_source/plugins/a11yhelp/dialogs/a11yhelp.js +0 -211
  175. data/public/javascripts/ckeditor/_source/plugins/a11yhelp/lang/en.js +0 -108
  176. data/public/javascripts/ckeditor/_source/plugins/a11yhelp/lang/he.js +0 -216
  177. data/public/javascripts/ckeditor/_source/plugins/a11yhelp/plugin.js +0 -46
  178. data/public/javascripts/ckeditor/_source/plugins/about/dialogs/about.js +0 -73
  179. data/public/javascripts/ckeditor/_source/plugins/about/dialogs/logo_ckeditor.png +0 -0
  180. data/public/javascripts/ckeditor/_source/plugins/about/plugin.js +0 -23
  181. data/public/javascripts/ckeditor/_source/plugins/ajax_save/plugin.js +0 -44
  182. data/public/javascripts/ckeditor/_source/plugins/attachment/dialogs/attachment.js +0 -384
  183. data/public/javascripts/ckeditor/_source/plugins/attachment/images/attachment.png +0 -0
  184. data/public/javascripts/ckeditor/_source/plugins/attachment/lang/en.js +0 -10
  185. data/public/javascripts/ckeditor/_source/plugins/attachment/lang/ru.js +0 -10
  186. data/public/javascripts/ckeditor/_source/plugins/attachment/lang/uk.js +0 -10
  187. data/public/javascripts/ckeditor/_source/plugins/attachment/plugin.js +0 -44
  188. data/public/javascripts/ckeditor/_source/plugins/autogrow/plugin.js +0 -86
  189. data/public/javascripts/ckeditor/_source/plugins/basicstyles/plugin.js +0 -101
  190. data/public/javascripts/ckeditor/_source/plugins/bidi/plugin.js +0 -259
  191. data/public/javascripts/ckeditor/_source/plugins/blockquote/plugin.js +0 -301
  192. data/public/javascripts/ckeditor/_source/plugins/button/plugin.js +0 -277
  193. data/public/javascripts/ckeditor/_source/plugins/clipboard/dialogs/paste.js +0 -205
  194. data/public/javascripts/ckeditor/_source/plugins/clipboard/plugin.js +0 -412
  195. data/public/javascripts/ckeditor/_source/plugins/colorbutton/plugin.js +0 -250
  196. data/public/javascripts/ckeditor/_source/plugins/colordialog/dialogs/colordialog.js +0 -336
  197. data/public/javascripts/ckeditor/_source/plugins/colordialog/plugin.js +0 -13
  198. data/public/javascripts/ckeditor/_source/plugins/contextmenu/plugin.js +0 -290
  199. data/public/javascripts/ckeditor/_source/plugins/dialog/dialogDefinition.js +0 -315
  200. data/public/javascripts/ckeditor/_source/plugins/dialog/plugin.js +0 -3015
  201. data/public/javascripts/ckeditor/_source/plugins/dialogadvtab/plugin.js +0 -213
  202. data/public/javascripts/ckeditor/_source/plugins/dialogui/plugin.js +0 -1523
  203. data/public/javascripts/ckeditor/_source/plugins/div/dialogs/div.js +0 -535
  204. data/public/javascripts/ckeditor/_source/plugins/div/plugin.js +0 -121
  205. data/public/javascripts/ckeditor/_source/plugins/domiterator/plugin.js +0 -356
  206. data/public/javascripts/ckeditor/_source/plugins/editingblock/plugin.js +0 -229
  207. data/public/javascripts/ckeditor/_source/plugins/elementspath/plugin.js +0 -206
  208. data/public/javascripts/ckeditor/_source/plugins/embed/dialogs/embed.js +0 -65
  209. data/public/javascripts/ckeditor/_source/plugins/embed/images/embed.png +0 -0
  210. data/public/javascripts/ckeditor/_source/plugins/embed/lang/en.js +0 -9
  211. data/public/javascripts/ckeditor/_source/plugins/embed/lang/ru.js +0 -9
  212. data/public/javascripts/ckeditor/_source/plugins/embed/lang/uk.js +0 -9
  213. data/public/javascripts/ckeditor/_source/plugins/embed/plugin.js +0 -44
  214. data/public/javascripts/ckeditor/_source/plugins/enterkey/plugin.js +0 -363
  215. data/public/javascripts/ckeditor/_source/plugins/entities/plugin.js +0 -226
  216. data/public/javascripts/ckeditor/_source/plugins/fakeobjects/plugin.js +0 -122
  217. data/public/javascripts/ckeditor/_source/plugins/filebrowser/plugin.js +0 -501
  218. data/public/javascripts/ckeditor/_source/plugins/find/dialogs/find.js +0 -890
  219. data/public/javascripts/ckeditor/_source/plugins/find/plugin.js +0 -46
  220. data/public/javascripts/ckeditor/_source/plugins/flash/dialogs/flash.js +0 -698
  221. data/public/javascripts/ckeditor/_source/plugins/flash/images/placeholder.png +0 -0
  222. data/public/javascripts/ckeditor/_source/plugins/flash/plugin.js +0 -168
  223. data/public/javascripts/ckeditor/_source/plugins/floatpanel/plugin.js +0 -402
  224. data/public/javascripts/ckeditor/_source/plugins/font/plugin.js +0 -234
  225. data/public/javascripts/ckeditor/_source/plugins/format/plugin.js +0 -194
  226. data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/button.js +0 -135
  227. data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/checkbox.js +0 -153
  228. data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/form.js +0 -177
  229. data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/hiddenfield.js +0 -98
  230. data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/radio.js +0 -135
  231. data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/select.js +0 -556
  232. data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/textarea.js +0 -114
  233. data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/textfield.js +0 -199
  234. data/public/javascripts/ckeditor/_source/plugins/forms/images/hiddenfield.gif +0 -0
  235. data/public/javascripts/ckeditor/_source/plugins/forms/plugin.js +0 -284
  236. data/public/javascripts/ckeditor/_source/plugins/horizontalrule/plugin.js +0 -36
  237. data/public/javascripts/ckeditor/_source/plugins/htmldataprocessor/plugin.js +0 -502
  238. data/public/javascripts/ckeditor/_source/plugins/htmlwriter/plugin.js +0 -319
  239. data/public/javascripts/ckeditor/_source/plugins/iframedialog/plugin.js +0 -136
  240. data/public/javascripts/ckeditor/_source/plugins/image/dialogs/image.js +0 -1396
  241. data/public/javascripts/ckeditor/_source/plugins/image/plugin.js +0 -81
  242. data/public/javascripts/ckeditor/_source/plugins/indent/plugin.js +0 -455
  243. data/public/javascripts/ckeditor/_source/plugins/justify/plugin.js +0 -221
  244. data/public/javascripts/ckeditor/_source/plugins/keystrokes/plugin.js +0 -225
  245. data/public/javascripts/ckeditor/_source/plugins/link/dialogs/anchor.js +0 -99
  246. data/public/javascripts/ckeditor/_source/plugins/link/dialogs/link.js +0 -1424
  247. data/public/javascripts/ckeditor/_source/plugins/link/images/anchor.gif +0 -0
  248. data/public/javascripts/ckeditor/_source/plugins/link/plugin.js +0 -238
  249. data/public/javascripts/ckeditor/_source/plugins/list/plugin.js +0 -710
  250. data/public/javascripts/ckeditor/_source/plugins/listblock/plugin.js +0 -257
  251. data/public/javascripts/ckeditor/_source/plugins/liststyle/dialogs/liststyle.js +0 -204
  252. data/public/javascripts/ckeditor/_source/plugins/liststyle/plugin.js +0 -66
  253. data/public/javascripts/ckeditor/_source/plugins/maximize/plugin.js +0 -350
  254. data/public/javascripts/ckeditor/_source/plugins/menu/plugin.js +0 -408
  255. data/public/javascripts/ckeditor/_source/plugins/menubutton/plugin.js +0 -94
  256. data/public/javascripts/ckeditor/_source/plugins/newpage/plugin.js +0 -53
  257. data/public/javascripts/ckeditor/_source/plugins/pagebreak/images/pagebreak.gif +0 -0
  258. data/public/javascripts/ckeditor/_source/plugins/pagebreak/plugin.js +0 -121
  259. data/public/javascripts/ckeditor/_source/plugins/panel/plugin.js +0 -399
  260. data/public/javascripts/ckeditor/_source/plugins/panelbutton/plugin.js +0 -147
  261. data/public/javascripts/ckeditor/_source/plugins/pastefromword/filter/default.js +0 -1170
  262. data/public/javascripts/ckeditor/_source/plugins/pastefromword/plugin.js +0 -122
  263. data/public/javascripts/ckeditor/_source/plugins/pastetext/dialogs/pastetext.js +0 -70
  264. data/public/javascripts/ckeditor/_source/plugins/pastetext/plugin.js +0 -145
  265. data/public/javascripts/ckeditor/_source/plugins/popup/plugin.js +0 -64
  266. data/public/javascripts/ckeditor/_source/plugins/preview/plugin.js +0 -108
  267. data/public/javascripts/ckeditor/_source/plugins/print/plugin.js +0 -41
  268. data/public/javascripts/ckeditor/_source/plugins/removeformat/plugin.js +0 -184
  269. data/public/javascripts/ckeditor/_source/plugins/resize/plugin.js +0 -157
  270. data/public/javascripts/ckeditor/_source/plugins/richcombo/plugin.js +0 -370
  271. data/public/javascripts/ckeditor/_source/plugins/save/plugin.js +0 -55
  272. data/public/javascripts/ckeditor/_source/plugins/scayt/dialogs/options.js +0 -534
  273. data/public/javascripts/ckeditor/_source/plugins/scayt/dialogs/toolbar.css +0 -71
  274. data/public/javascripts/ckeditor/_source/plugins/scayt/plugin.js +0 -945
  275. data/public/javascripts/ckeditor/_source/plugins/selection/plugin.js +0 -1375
  276. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_address.png +0 -0
  277. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_blockquote.png +0 -0
  278. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_div.png +0 -0
  279. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_h1.png +0 -0
  280. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_h2.png +0 -0
  281. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_h3.png +0 -0
  282. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_h4.png +0 -0
  283. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_h5.png +0 -0
  284. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_h6.png +0 -0
  285. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_p.png +0 -0
  286. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_pre.png +0 -0
  287. data/public/javascripts/ckeditor/_source/plugins/showblocks/plugin.js +0 -155
  288. data/public/javascripts/ckeditor/_source/plugins/showborders/plugin.js +0 -201
  289. data/public/javascripts/ckeditor/_source/plugins/smiley/dialogs/smiley.js +0 -218
  290. data/public/javascripts/ckeditor/_source/plugins/smiley/images/angel_smile.gif +0 -0
  291. data/public/javascripts/ckeditor/_source/plugins/smiley/images/angry_smile.gif +0 -0
  292. data/public/javascripts/ckeditor/_source/plugins/smiley/images/broken_heart.gif +0 -0
  293. data/public/javascripts/ckeditor/_source/plugins/smiley/images/confused_smile.gif +0 -0
  294. data/public/javascripts/ckeditor/_source/plugins/smiley/images/cry_smile.gif +0 -0
  295. data/public/javascripts/ckeditor/_source/plugins/smiley/images/devil_smile.gif +0 -0
  296. data/public/javascripts/ckeditor/_source/plugins/smiley/images/embaressed_smile.gif +0 -0
  297. data/public/javascripts/ckeditor/_source/plugins/smiley/images/envelope.gif +0 -0
  298. data/public/javascripts/ckeditor/_source/plugins/smiley/images/heart.gif +0 -0
  299. data/public/javascripts/ckeditor/_source/plugins/smiley/images/kiss.gif +0 -0
  300. data/public/javascripts/ckeditor/_source/plugins/smiley/images/lightbulb.gif +0 -0
  301. data/public/javascripts/ckeditor/_source/plugins/smiley/images/omg_smile.gif +0 -0
  302. data/public/javascripts/ckeditor/_source/plugins/smiley/images/regular_smile.gif +0 -0
  303. data/public/javascripts/ckeditor/_source/plugins/smiley/images/sad_smile.gif +0 -0
  304. data/public/javascripts/ckeditor/_source/plugins/smiley/images/shades_smile.gif +0 -0
  305. data/public/javascripts/ckeditor/_source/plugins/smiley/images/teeth_smile.gif +0 -0
  306. data/public/javascripts/ckeditor/_source/plugins/smiley/images/thumbs_down.gif +0 -0
  307. data/public/javascripts/ckeditor/_source/plugins/smiley/images/thumbs_up.gif +0 -0
  308. data/public/javascripts/ckeditor/_source/plugins/smiley/images/tounge_smile.gif +0 -0
  309. data/public/javascripts/ckeditor/_source/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
  310. data/public/javascripts/ckeditor/_source/plugins/smiley/images/wink_smile.gif +0 -0
  311. data/public/javascripts/ckeditor/_source/plugins/smiley/plugin.js +0 -94
  312. data/public/javascripts/ckeditor/_source/plugins/sourcearea/plugin.js +0 -207
  313. data/public/javascripts/ckeditor/_source/plugins/specialchar/dialogs/specialchar.js +0 -409
  314. data/public/javascripts/ckeditor/_source/plugins/specialchar/plugin.js +0 -29
  315. data/public/javascripts/ckeditor/_source/plugins/styles/plugin.js +0 -1479
  316. data/public/javascripts/ckeditor/_source/plugins/styles/styles/default.js +0 -88
  317. data/public/javascripts/ckeditor/_source/plugins/stylescombo/plugin.js +0 -206
  318. data/public/javascripts/ckeditor/_source/plugins/tab/plugin.js +0 -367
  319. data/public/javascripts/ckeditor/_source/plugins/table/dialogs/table.js +0 -672
  320. data/public/javascripts/ckeditor/_source/plugins/table/plugin.js +0 -78
  321. data/public/javascripts/ckeditor/_source/plugins/tableresize/plugin.js +0 -450
  322. data/public/javascripts/ckeditor/_source/plugins/tabletools/dialogs/tableCell.js +0 -533
  323. data/public/javascripts/ckeditor/_source/plugins/tabletools/plugin.js +0 -1120
  324. data/public/javascripts/ckeditor/_source/plugins/templates/dialogs/templates.js +0 -233
  325. data/public/javascripts/ckeditor/_source/plugins/templates/plugin.js +0 -99
  326. data/public/javascripts/ckeditor/_source/plugins/templates/templates/default.js +0 -94
  327. data/public/javascripts/ckeditor/_source/plugins/templates/templates/images/template1.gif +0 -0
  328. data/public/javascripts/ckeditor/_source/plugins/templates/templates/images/template2.gif +0 -0
  329. data/public/javascripts/ckeditor/_source/plugins/templates/templates/images/template3.gif +0 -0
  330. data/public/javascripts/ckeditor/_source/plugins/toolbar/plugin.js +0 -481
  331. data/public/javascripts/ckeditor/_source/plugins/uicolor/dialogs/uicolor.js +0 -205
  332. data/public/javascripts/ckeditor/_source/plugins/uicolor/lang/en.js +0 -15
  333. data/public/javascripts/ckeditor/_source/plugins/uicolor/lang/he.js +0 -15
  334. data/public/javascripts/ckeditor/_source/plugins/uicolor/plugin.js +0 -37
  335. data/public/javascripts/ckeditor/_source/plugins/uicolor/uicolor.gif +0 -0
  336. data/public/javascripts/ckeditor/_source/plugins/uicolor/yui/assets/hue_bg.png +0 -0
  337. data/public/javascripts/ckeditor/_source/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
  338. data/public/javascripts/ckeditor/_source/plugins/uicolor/yui/assets/picker_mask.png +0 -0
  339. data/public/javascripts/ckeditor/_source/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
  340. data/public/javascripts/ckeditor/_source/plugins/uicolor/yui/assets/yui.css +0 -15
  341. data/public/javascripts/ckeditor/_source/plugins/uicolor/yui/yui.js +0 -71
  342. data/public/javascripts/ckeditor/_source/plugins/undo/plugin.js +0 -554
  343. data/public/javascripts/ckeditor/_source/plugins/wsc/dialogs/ciframe.html +0 -49
  344. data/public/javascripts/ckeditor/_source/plugins/wsc/dialogs/tmpFrameset.html +0 -52
  345. data/public/javascripts/ckeditor/_source/plugins/wsc/dialogs/wsc.css +0 -82
  346. data/public/javascripts/ckeditor/_source/plugins/wsc/dialogs/wsc.js +0 -176
  347. data/public/javascripts/ckeditor/_source/plugins/wsc/plugin.js +0 -33
  348. data/public/javascripts/ckeditor/_source/plugins/wysiwygarea/plugin.js +0 -1146
  349. data/public/javascripts/ckeditor/_source/skins/kama/dialog.css +0 -882
  350. data/public/javascripts/ckeditor/_source/skins/kama/editor.css +0 -25
  351. data/public/javascripts/ckeditor/_source/skins/kama/elementspath.css +0 -73
  352. data/public/javascripts/ckeditor/_source/skins/kama/icons.css +0 -357
  353. data/public/javascripts/ckeditor/_source/skins/kama/icons.png +0 -0
  354. data/public/javascripts/ckeditor/_source/skins/kama/icons_rtl.png +0 -0
  355. data/public/javascripts/ckeditor/_source/skins/kama/images/dialog_sides.gif +0 -0
  356. data/public/javascripts/ckeditor/_source/skins/kama/images/dialog_sides.png +0 -0
  357. data/public/javascripts/ckeditor/_source/skins/kama/images/dialog_sides_rtl.png +0 -0
  358. data/public/javascripts/ckeditor/_source/skins/kama/images/mini.gif +0 -0
  359. data/public/javascripts/ckeditor/_source/skins/kama/images/noimage.png +0 -0
  360. data/public/javascripts/ckeditor/_source/skins/kama/images/sprites.png +0 -0
  361. data/public/javascripts/ckeditor/_source/skins/kama/images/sprites_ie6.png +0 -0
  362. data/public/javascripts/ckeditor/_source/skins/kama/images/toolbar_start.gif +0 -0
  363. data/public/javascripts/ckeditor/_source/skins/kama/mainui.css +0 -195
  364. data/public/javascripts/ckeditor/_source/skins/kama/menu.css +0 -216
  365. data/public/javascripts/ckeditor/_source/skins/kama/panel.css +0 -217
  366. data/public/javascripts/ckeditor/_source/skins/kama/presets.css +0 -49
  367. data/public/javascripts/ckeditor/_source/skins/kama/reset.css +0 -84
  368. data/public/javascripts/ckeditor/_source/skins/kama/richcombo.css +0 -277
  369. data/public/javascripts/ckeditor/_source/skins/kama/skin.js +0 -268
  370. data/public/javascripts/ckeditor/_source/skins/kama/templates.css +0 -88
  371. data/public/javascripts/ckeditor/_source/skins/kama/toolbar.css +0 -409
  372. data/public/javascripts/ckeditor/_source/skins/office2003/dialog.css +0 -785
  373. data/public/javascripts/ckeditor/_source/skins/office2003/editor.css +0 -25
  374. data/public/javascripts/ckeditor/_source/skins/office2003/elementspath.css +0 -74
  375. data/public/javascripts/ckeditor/_source/skins/office2003/icons.css +0 -354
  376. data/public/javascripts/ckeditor/_source/skins/office2003/icons.png +0 -0
  377. data/public/javascripts/ckeditor/_source/skins/office2003/icons_rtl.png +0 -0
  378. data/public/javascripts/ckeditor/_source/skins/office2003/images/dialog_sides.gif +0 -0
  379. data/public/javascripts/ckeditor/_source/skins/office2003/images/dialog_sides.png +0 -0
  380. data/public/javascripts/ckeditor/_source/skins/office2003/images/dialog_sides_rtl.png +0 -0
  381. data/public/javascripts/ckeditor/_source/skins/office2003/images/mini.gif +0 -0
  382. data/public/javascripts/ckeditor/_source/skins/office2003/images/noimage.png +0 -0
  383. data/public/javascripts/ckeditor/_source/skins/office2003/images/sprites.png +0 -0
  384. data/public/javascripts/ckeditor/_source/skins/office2003/images/sprites_ie6.png +0 -0
  385. data/public/javascripts/ckeditor/_source/skins/office2003/mainui.css +0 -145
  386. data/public/javascripts/ckeditor/_source/skins/office2003/menu.css +0 -213
  387. data/public/javascripts/ckeditor/_source/skins/office2003/panel.css +0 -212
  388. data/public/javascripts/ckeditor/_source/skins/office2003/presets.css +0 -49
  389. data/public/javascripts/ckeditor/_source/skins/office2003/reset.css +0 -84
  390. data/public/javascripts/ckeditor/_source/skins/office2003/richcombo.css +0 -297
  391. data/public/javascripts/ckeditor/_source/skins/office2003/skin.js +0 -81
  392. data/public/javascripts/ckeditor/_source/skins/office2003/templates.css +0 -87
  393. data/public/javascripts/ckeditor/_source/skins/office2003/toolbar.css +0 -470
  394. data/public/javascripts/ckeditor/_source/skins/v2/dialog.css +0 -800
  395. data/public/javascripts/ckeditor/_source/skins/v2/editor.css +0 -25
  396. data/public/javascripts/ckeditor/_source/skins/v2/elementspath.css +0 -74
  397. data/public/javascripts/ckeditor/_source/skins/v2/icons.css +0 -354
  398. data/public/javascripts/ckeditor/_source/skins/v2/icons.png +0 -0
  399. data/public/javascripts/ckeditor/_source/skins/v2/icons_rtl.png +0 -0
  400. data/public/javascripts/ckeditor/_source/skins/v2/images/dialog_sides.gif +0 -0
  401. data/public/javascripts/ckeditor/_source/skins/v2/images/dialog_sides.png +0 -0
  402. data/public/javascripts/ckeditor/_source/skins/v2/images/dialog_sides_rtl.png +0 -0
  403. data/public/javascripts/ckeditor/_source/skins/v2/images/mini.gif +0 -0
  404. data/public/javascripts/ckeditor/_source/skins/v2/images/noimage.png +0 -0
  405. data/public/javascripts/ckeditor/_source/skins/v2/images/sprites.png +0 -0
  406. data/public/javascripts/ckeditor/_source/skins/v2/images/sprites_ie6.png +0 -0
  407. data/public/javascripts/ckeditor/_source/skins/v2/images/toolbar_start.gif +0 -0
  408. data/public/javascripts/ckeditor/_source/skins/v2/mainui.css +0 -154
  409. data/public/javascripts/ckeditor/_source/skins/v2/menu.css +0 -215
  410. data/public/javascripts/ckeditor/_source/skins/v2/panel.css +0 -212
  411. data/public/javascripts/ckeditor/_source/skins/v2/presets.css +0 -50
  412. data/public/javascripts/ckeditor/_source/skins/v2/reset.css +0 -84
  413. data/public/javascripts/ckeditor/_source/skins/v2/richcombo.css +0 -297
  414. data/public/javascripts/ckeditor/_source/skins/v2/skin.js +0 -77
  415. data/public/javascripts/ckeditor/_source/skins/v2/templates.css +0 -87
  416. data/public/javascripts/ckeditor/_source/skins/v2/toolbar.css +0 -423
  417. data/public/javascripts/ckeditor/_source/themes/default/theme.js +0 -361
  418. data/public/javascripts/ckeditor/adapters/jquery.js +0 -6
  419. data/public/javascripts/ckeditor/ckeditor.js +0 -137
  420. data/public/javascripts/ckeditor/ckeditor.pack +0 -211
  421. data/public/javascripts/ckeditor/ckeditor_basic.js +0 -8
  422. data/public/javascripts/ckeditor/ckeditor_basic_source.js +0 -20
  423. data/public/javascripts/ckeditor/ckeditor_source.js +0 -25
  424. data/public/javascripts/ckeditor/config.js +0 -43
  425. data/public/javascripts/ckeditor/contents.css +0 -39
  426. data/public/javascripts/ckeditor/css/ckfinder.css +0 -299
  427. data/public/javascripts/ckeditor/css/fck_dialog.css +0 -119
  428. data/public/javascripts/ckeditor/css/fck_editor.css +0 -448
  429. data/public/javascripts/ckeditor/css/swfupload.css +0 -94
  430. data/public/javascripts/ckeditor/images/add.gif +0 -0
  431. data/public/javascripts/ckeditor/images/cancelbutton.gif +0 -0
  432. data/public/javascripts/ckeditor/images/ckfnothumb.gif +0 -0
  433. data/public/javascripts/ckeditor/images/doc.gif +0 -0
  434. data/public/javascripts/ckeditor/images/mp3.gif +0 -0
  435. data/public/javascripts/ckeditor/images/pdf.gif +0 -0
  436. data/public/javascripts/ckeditor/images/rar.gif +0 -0
  437. data/public/javascripts/ckeditor/images/refresh.gif +0 -0
  438. data/public/javascripts/ckeditor/images/select_files.png +0 -0
  439. data/public/javascripts/ckeditor/images/spacer.gif +0 -0
  440. data/public/javascripts/ckeditor/images/swf.gif +0 -0
  441. data/public/javascripts/ckeditor/images/toolbar.start.gif +0 -0
  442. data/public/javascripts/ckeditor/images/xls.gif +0 -0
  443. data/public/javascripts/ckeditor/lang/_languages.js +0 -6
  444. data/public/javascripts/ckeditor/lang/_translationstatus.txt +0 -60
  445. data/public/javascripts/ckeditor/lang/af.js +0 -6
  446. data/public/javascripts/ckeditor/lang/ar.js +0 -6
  447. data/public/javascripts/ckeditor/lang/bg.js +0 -6
  448. data/public/javascripts/ckeditor/lang/bn.js +0 -6
  449. data/public/javascripts/ckeditor/lang/bs.js +0 -6
  450. data/public/javascripts/ckeditor/lang/ca.js +0 -6
  451. data/public/javascripts/ckeditor/lang/cs.js +0 -6
  452. data/public/javascripts/ckeditor/lang/cy.js +0 -6
  453. data/public/javascripts/ckeditor/lang/da.js +0 -6
  454. data/public/javascripts/ckeditor/lang/de.js +0 -6
  455. data/public/javascripts/ckeditor/lang/el.js +0 -6
  456. data/public/javascripts/ckeditor/lang/en-au.js +0 -6
  457. data/public/javascripts/ckeditor/lang/en-ca.js +0 -6
  458. data/public/javascripts/ckeditor/lang/en-gb.js +0 -6
  459. data/public/javascripts/ckeditor/lang/en.js +0 -6
  460. data/public/javascripts/ckeditor/lang/eo.js +0 -6
  461. data/public/javascripts/ckeditor/lang/es.js +0 -6
  462. data/public/javascripts/ckeditor/lang/et.js +0 -6
  463. data/public/javascripts/ckeditor/lang/eu.js +0 -6
  464. data/public/javascripts/ckeditor/lang/fa.js +0 -6
  465. data/public/javascripts/ckeditor/lang/fi.js +0 -6
  466. data/public/javascripts/ckeditor/lang/fo.js +0 -6
  467. data/public/javascripts/ckeditor/lang/fr-ca.js +0 -6
  468. data/public/javascripts/ckeditor/lang/fr.js +0 -6
  469. data/public/javascripts/ckeditor/lang/gl.js +0 -6
  470. data/public/javascripts/ckeditor/lang/gu.js +0 -6
  471. data/public/javascripts/ckeditor/lang/he.js +0 -6
  472. data/public/javascripts/ckeditor/lang/hi.js +0 -6
  473. data/public/javascripts/ckeditor/lang/hr.js +0 -6
  474. data/public/javascripts/ckeditor/lang/hu.js +0 -6
  475. data/public/javascripts/ckeditor/lang/is.js +0 -6
  476. data/public/javascripts/ckeditor/lang/it.js +0 -6
  477. data/public/javascripts/ckeditor/lang/ja.js +0 -6
  478. data/public/javascripts/ckeditor/lang/km.js +0 -6
  479. data/public/javascripts/ckeditor/lang/ko.js +0 -6
  480. data/public/javascripts/ckeditor/lang/lt.js +0 -6
  481. data/public/javascripts/ckeditor/lang/lv.js +0 -6
  482. data/public/javascripts/ckeditor/lang/mn.js +0 -6
  483. data/public/javascripts/ckeditor/lang/ms.js +0 -6
  484. data/public/javascripts/ckeditor/lang/nb.js +0 -6
  485. data/public/javascripts/ckeditor/lang/nl.js +0 -6
  486. data/public/javascripts/ckeditor/lang/no.js +0 -6
  487. data/public/javascripts/ckeditor/lang/pl.js +0 -6
  488. data/public/javascripts/ckeditor/lang/pt-br.js +0 -6
  489. data/public/javascripts/ckeditor/lang/pt.js +0 -6
  490. data/public/javascripts/ckeditor/lang/ro.js +0 -6
  491. data/public/javascripts/ckeditor/lang/ru.js +0 -6
  492. data/public/javascripts/ckeditor/lang/sk.js +0 -6
  493. data/public/javascripts/ckeditor/lang/sl.js +0 -6
  494. data/public/javascripts/ckeditor/lang/sr-latn.js +0 -6
  495. data/public/javascripts/ckeditor/lang/sr.js +0 -6
  496. data/public/javascripts/ckeditor/lang/sv.js +0 -6
  497. data/public/javascripts/ckeditor/lang/th.js +0 -6
  498. data/public/javascripts/ckeditor/lang/tr.js +0 -6
  499. data/public/javascripts/ckeditor/lang/uk.js +0 -6
  500. data/public/javascripts/ckeditor/lang/vi.js +0 -6
  501. data/public/javascripts/ckeditor/lang/zh-cn.js +0 -6
  502. data/public/javascripts/ckeditor/lang/zh.js +0 -6
  503. data/public/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +0 -7
  504. data/public/javascripts/ckeditor/plugins/a11yhelp/lang/en.js +0 -6
  505. data/public/javascripts/ckeditor/plugins/a11yhelp/lang/he.js +0 -6
  506. data/public/javascripts/ckeditor/plugins/about/dialogs/about.js +0 -6
  507. data/public/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  508. data/public/javascripts/ckeditor/plugins/ajax_save/plugin.js +0 -1
  509. data/public/javascripts/ckeditor/plugins/attachment/dialogs/attachment.js +0 -1
  510. data/public/javascripts/ckeditor/plugins/attachment/images/attachment.png +0 -0
  511. data/public/javascripts/ckeditor/plugins/attachment/lang/en.js +0 -10
  512. data/public/javascripts/ckeditor/plugins/attachment/lang/ru.js +0 -10
  513. data/public/javascripts/ckeditor/plugins/attachment/lang/uk.js +0 -10
  514. data/public/javascripts/ckeditor/plugins/attachment/plugin.js +0 -1
  515. data/public/javascripts/ckeditor/plugins/autogrow/plugin.js +0 -6
  516. data/public/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +0 -7
  517. data/public/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +0 -7
  518. data/public/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +0 -4
  519. data/public/javascripts/ckeditor/plugins/div/dialogs/div.js +0 -8
  520. data/public/javascripts/ckeditor/plugins/embed/dialogs/embed.js +0 -1
  521. data/public/javascripts/ckeditor/plugins/embed/images/embed.png +0 -0
  522. data/public/javascripts/ckeditor/plugins/embed/lang/en.js +0 -9
  523. data/public/javascripts/ckeditor/plugins/embed/lang/ru.js +0 -9
  524. data/public/javascripts/ckeditor/plugins/embed/lang/uk.js +0 -9
  525. data/public/javascripts/ckeditor/plugins/embed/plugin.js +0 -1
  526. data/public/javascripts/ckeditor/plugins/find/dialogs/find.js +0 -9
  527. data/public/javascripts/ckeditor/plugins/flash/dialogs/flash.js +0 -9
  528. data/public/javascripts/ckeditor/plugins/flash/images/placeholder.png +0 -0
  529. data/public/javascripts/ckeditor/plugins/forms/dialogs/button.js +0 -6
  530. data/public/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +0 -6
  531. data/public/javascripts/ckeditor/plugins/forms/dialogs/form.js +0 -6
  532. data/public/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +0 -6
  533. data/public/javascripts/ckeditor/plugins/forms/dialogs/radio.js +0 -6
  534. data/public/javascripts/ckeditor/plugins/forms/dialogs/select.js +0 -9
  535. data/public/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +0 -6
  536. data/public/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +0 -7
  537. data/public/javascripts/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
  538. data/public/javascripts/ckeditor/plugins/iframedialog/plugin.js +0 -6
  539. data/public/javascripts/ckeditor/plugins/image/dialogs/image.js +0 -13
  540. data/public/javascripts/ckeditor/plugins/link/dialogs/anchor.js +0 -6
  541. data/public/javascripts/ckeditor/plugins/link/dialogs/link.js +0 -11
  542. data/public/javascripts/ckeditor/plugins/link/images/anchor.gif +0 -0
  543. data/public/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +0 -6
  544. data/public/javascripts/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
  545. data/public/javascripts/ckeditor/plugins/pastefromword/filter/default.js +0 -10
  546. data/public/javascripts/ckeditor/plugins/pastetext/dialogs/pastetext.js +0 -6
  547. data/public/javascripts/ckeditor/plugins/scayt/dialogs/options.js +0 -8
  548. data/public/javascripts/ckeditor/plugins/scayt/dialogs/toolbar.css +0 -6
  549. data/public/javascripts/ckeditor/plugins/showblocks/images/block_address.png +0 -0
  550. data/public/javascripts/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
  551. data/public/javascripts/ckeditor/plugins/showblocks/images/block_div.png +0 -0
  552. data/public/javascripts/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
  553. data/public/javascripts/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
  554. data/public/javascripts/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
  555. data/public/javascripts/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
  556. data/public/javascripts/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
  557. data/public/javascripts/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
  558. data/public/javascripts/ckeditor/plugins/showblocks/images/block_p.png +0 -0
  559. data/public/javascripts/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
  560. data/public/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +0 -7
  561. data/public/javascripts/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
  562. data/public/javascripts/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
  563. data/public/javascripts/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
  564. data/public/javascripts/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
  565. data/public/javascripts/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
  566. data/public/javascripts/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
  567. data/public/javascripts/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
  568. data/public/javascripts/ckeditor/plugins/smiley/images/envelope.gif +0 -0
  569. data/public/javascripts/ckeditor/plugins/smiley/images/heart.gif +0 -0
  570. data/public/javascripts/ckeditor/plugins/smiley/images/kiss.gif +0 -0
  571. data/public/javascripts/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
  572. data/public/javascripts/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
  573. data/public/javascripts/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
  574. data/public/javascripts/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
  575. data/public/javascripts/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
  576. data/public/javascripts/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
  577. data/public/javascripts/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
  578. data/public/javascripts/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
  579. data/public/javascripts/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
  580. data/public/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
  581. data/public/javascripts/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
  582. data/public/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +0 -7
  583. data/public/javascripts/ckeditor/plugins/styles/styles/default.js +0 -6
  584. data/public/javascripts/ckeditor/plugins/table/dialogs/table.js +0 -9
  585. data/public/javascripts/ckeditor/plugins/tableresize/plugin.js +0 -7
  586. data/public/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +0 -8
  587. data/public/javascripts/ckeditor/plugins/templates/dialogs/templates.js +0 -7
  588. data/public/javascripts/ckeditor/plugins/templates/templates/default.js +0 -6
  589. data/public/javascripts/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
  590. data/public/javascripts/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
  591. data/public/javascripts/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
  592. data/public/javascripts/ckeditor/plugins/uicolor/dialogs/uicolor.js +0 -7
  593. data/public/javascripts/ckeditor/plugins/uicolor/lang/en.js +0 -6
  594. data/public/javascripts/ckeditor/plugins/uicolor/lang/he.js +0 -6
  595. data/public/javascripts/ckeditor/plugins/uicolor/plugin.js +0 -6
  596. data/public/javascripts/ckeditor/plugins/uicolor/uicolor.gif +0 -0
  597. data/public/javascripts/ckeditor/plugins/uicolor/yui/assets/hue_bg.png +0 -0
  598. data/public/javascripts/ckeditor/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
  599. data/public/javascripts/ckeditor/plugins/uicolor/yui/assets/picker_mask.png +0 -0
  600. data/public/javascripts/ckeditor/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
  601. data/public/javascripts/ckeditor/plugins/uicolor/yui/assets/yui.css +0 -6
  602. data/public/javascripts/ckeditor/plugins/uicolor/yui/yui.js +0 -76
  603. data/public/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +0 -49
  604. data/public/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +0 -52
  605. data/public/javascripts/ckeditor/plugins/wsc/dialogs/wsc.css +0 -6
  606. data/public/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +0 -7
  607. data/public/javascripts/ckeditor/skins/kama/dialog.css +0 -9
  608. data/public/javascripts/ckeditor/skins/kama/editor.css +0 -12
  609. data/public/javascripts/ckeditor/skins/kama/icons.png +0 -0
  610. data/public/javascripts/ckeditor/skins/kama/icons_rtl.png +0 -0
  611. data/public/javascripts/ckeditor/skins/kama/images/dialog_sides.gif +0 -0
  612. data/public/javascripts/ckeditor/skins/kama/images/dialog_sides.png +0 -0
  613. data/public/javascripts/ckeditor/skins/kama/images/dialog_sides_rtl.png +0 -0
  614. data/public/javascripts/ckeditor/skins/kama/images/mini.gif +0 -0
  615. data/public/javascripts/ckeditor/skins/kama/images/noimage.png +0 -0
  616. data/public/javascripts/ckeditor/skins/kama/images/sprites.png +0 -0
  617. data/public/javascripts/ckeditor/skins/kama/images/sprites_ie6.png +0 -0
  618. data/public/javascripts/ckeditor/skins/kama/images/toolbar_start.gif +0 -0
  619. data/public/javascripts/ckeditor/skins/kama/skin.js +0 -7
  620. data/public/javascripts/ckeditor/skins/kama/templates.css +0 -6
  621. data/public/javascripts/ckeditor/skins/office2003/dialog.css +0 -9
  622. data/public/javascripts/ckeditor/skins/office2003/editor.css +0 -13
  623. data/public/javascripts/ckeditor/skins/office2003/icons.png +0 -0
  624. data/public/javascripts/ckeditor/skins/office2003/icons_rtl.png +0 -0
  625. data/public/javascripts/ckeditor/skins/office2003/images/dialog_sides.gif +0 -0
  626. data/public/javascripts/ckeditor/skins/office2003/images/dialog_sides.png +0 -0
  627. data/public/javascripts/ckeditor/skins/office2003/images/dialog_sides_rtl.png +0 -0
  628. data/public/javascripts/ckeditor/skins/office2003/images/mini.gif +0 -0
  629. data/public/javascripts/ckeditor/skins/office2003/images/noimage.png +0 -0
  630. data/public/javascripts/ckeditor/skins/office2003/images/sprites.png +0 -0
  631. data/public/javascripts/ckeditor/skins/office2003/images/sprites_ie6.png +0 -0
  632. data/public/javascripts/ckeditor/skins/office2003/skin.js +0 -6
  633. data/public/javascripts/ckeditor/skins/office2003/templates.css +0 -6
  634. data/public/javascripts/ckeditor/skins/v2/dialog.css +0 -9
  635. data/public/javascripts/ckeditor/skins/v2/editor.css +0 -12
  636. data/public/javascripts/ckeditor/skins/v2/icons.png +0 -0
  637. data/public/javascripts/ckeditor/skins/v2/icons_rtl.png +0 -0
  638. data/public/javascripts/ckeditor/skins/v2/images/dialog_sides.gif +0 -0
  639. data/public/javascripts/ckeditor/skins/v2/images/dialog_sides.png +0 -0
  640. data/public/javascripts/ckeditor/skins/v2/images/dialog_sides_rtl.png +0 -0
  641. data/public/javascripts/ckeditor/skins/v2/images/mini.gif +0 -0
  642. data/public/javascripts/ckeditor/skins/v2/images/noimage.png +0 -0
  643. data/public/javascripts/ckeditor/skins/v2/images/sprites.png +0 -0
  644. data/public/javascripts/ckeditor/skins/v2/images/sprites_ie6.png +0 -0
  645. data/public/javascripts/ckeditor/skins/v2/images/toolbar_start.gif +0 -0
  646. data/public/javascripts/ckeditor/skins/v2/skin.js +0 -6
  647. data/public/javascripts/ckeditor/skins/v2/templates.css +0 -6
  648. data/public/javascripts/ckeditor/swfupload/fileprogress.js +0 -275
  649. data/public/javascripts/ckeditor/swfupload/handlers.js +0 -170
  650. data/public/javascripts/ckeditor/swfupload/mootools-1.2.3-core-yc.js +0 -356
  651. data/public/javascripts/ckeditor/swfupload/querystring.js +0 -40
  652. data/public/javascripts/ckeditor/swfupload/swfupload.js +0 -1
  653. data/public/javascripts/ckeditor/swfupload/swfupload.queue.js +0 -1
  654. data/public/javascripts/ckeditor/swfupload/swfupload.swf +0 -0
  655. data/public/javascripts/ckeditor/swfupload/swfupload.swfobject.js +0 -111
  656. data/public/javascripts/ckeditor/themes/default/theme.js +0 -8
  657. data/public/javascripts/controls.js +0 -965
  658. data/public/javascripts/dragdrop.js +0 -974
  659. data/public/javascripts/effects.js +0 -1123
  660. data/public/javascripts/link_obfuscator.js +0 -31
  661. data/public/javascripts/prototype.js +0 -6001
  662. data/public/javascripts/rails.js +0 -175
  663. data/public/robots.txt +0 -5
  664. data/public/stylesheets/core_ie.css +0 -52
  665. data/public/stylesheets/csshover3.htc +0 -14
@@ -1,26 +0,0 @@
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
- /**
7
- * @class
8
- */
9
- CKEDITOR.dom.nodeList = function( nativeList )
10
- {
11
- this.$ = nativeList;
12
- };
13
-
14
- CKEDITOR.dom.nodeList.prototype =
15
- {
16
- count : function()
17
- {
18
- return this.$.length;
19
- },
20
-
21
- getItem : function( index )
22
- {
23
- var $node = this.$[ index ];
24
- return $node ? new CKEDITOR.dom.node( $node ) : null;
25
- }
26
- };
@@ -1,1883 +0,0 @@
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
- /**
7
- * @class
8
- */
9
- CKEDITOR.dom.range = function( document )
10
- {
11
- this.startContainer = null;
12
- this.startOffset = null;
13
- this.endContainer = null;
14
- this.endOffset = null;
15
- this.collapsed = true;
16
-
17
- this.document = document;
18
- };
19
-
20
- (function()
21
- {
22
- // Updates the "collapsed" property for the given range object.
23
- var updateCollapsed = function( range )
24
- {
25
- range.collapsed = (
26
- range.startContainer &&
27
- range.endContainer &&
28
- range.startContainer.equals( range.endContainer ) &&
29
- range.startOffset == range.endOffset );
30
- };
31
-
32
- // This is a shared function used to delete, extract and clone the range
33
- // contents.
34
- // V2
35
- var execContentsAction = function( range, action, docFrag )
36
- {
37
- range.optimizeBookmark();
38
-
39
- var startNode = range.startContainer;
40
- var endNode = range.endContainer;
41
-
42
- var startOffset = range.startOffset;
43
- var endOffset = range.endOffset;
44
-
45
- var removeStartNode;
46
- var removeEndNode;
47
-
48
- // For text containers, we must simply split the node and point to the
49
- // second part. The removal will be handled by the rest of the code .
50
- if ( endNode.type == CKEDITOR.NODE_TEXT )
51
- endNode = endNode.split( endOffset );
52
- else
53
- {
54
- // If the end container has children and the offset is pointing
55
- // to a child, then we should start from it.
56
- if ( endNode.getChildCount() > 0 )
57
- {
58
- // If the offset points after the last node.
59
- if ( endOffset >= endNode.getChildCount() )
60
- {
61
- // Let's create a temporary node and mark it for removal.
62
- endNode = endNode.append( range.document.createText( '' ) );
63
- removeEndNode = true;
64
- }
65
- else
66
- endNode = endNode.getChild( endOffset );
67
- }
68
- }
69
-
70
- // For text containers, we must simply split the node. The removal will
71
- // be handled by the rest of the code .
72
- if ( startNode.type == CKEDITOR.NODE_TEXT )
73
- {
74
- startNode.split( startOffset );
75
-
76
- // In cases the end node is the same as the start node, the above
77
- // splitting will also split the end, so me must move the end to
78
- // the second part of the split.
79
- if ( startNode.equals( endNode ) )
80
- endNode = startNode.getNext();
81
- }
82
- else
83
- {
84
- // If the start container has children and the offset is pointing
85
- // to a child, then we should start from its previous sibling.
86
-
87
- // If the offset points to the first node, we don't have a
88
- // sibling, so let's use the first one, but mark it for removal.
89
- if ( !startOffset )
90
- {
91
- // Let's create a temporary node and mark it for removal.
92
- startNode = startNode.getFirst().insertBeforeMe( range.document.createText( '' ) );
93
- removeStartNode = true;
94
- }
95
- else if ( startOffset >= startNode.getChildCount() )
96
- {
97
- // Let's create a temporary node and mark it for removal.
98
- startNode = startNode.append( range.document.createText( '' ) );
99
- removeStartNode = true;
100
- }
101
- else
102
- startNode = startNode.getChild( startOffset ).getPrevious();
103
- }
104
-
105
- // Get the parent nodes tree for the start and end boundaries.
106
- var startParents = startNode.getParents();
107
- var endParents = endNode.getParents();
108
-
109
- // Compare them, to find the top most siblings.
110
- var i, topStart, topEnd;
111
-
112
- for ( i = 0 ; i < startParents.length ; i++ )
113
- {
114
- topStart = startParents[ i ];
115
- topEnd = endParents[ i ];
116
-
117
- // The compared nodes will match until we find the top most
118
- // siblings (different nodes that have the same parent).
119
- // "i" will hold the index in the parents array for the top
120
- // most element.
121
- if ( !topStart.equals( topEnd ) )
122
- break;
123
- }
124
-
125
- var clone = docFrag, levelStartNode, levelClone, currentNode, currentSibling;
126
-
127
- // Remove all successive sibling nodes for every node in the
128
- // startParents tree.
129
- for ( var j = i ; j < startParents.length ; j++ )
130
- {
131
- levelStartNode = startParents[j];
132
-
133
- // For Extract and Clone, we must clone this level.
134
- if ( clone && !levelStartNode.equals( startNode ) ) // action = 0 = Delete
135
- levelClone = clone.append( levelStartNode.clone() );
136
-
137
- currentNode = levelStartNode.getNext();
138
-
139
- while ( currentNode )
140
- {
141
- // Stop processing when the current node matches a node in the
142
- // endParents tree or if it is the endNode.
143
- if ( currentNode.equals( endParents[ j ] ) || currentNode.equals( endNode ) )
144
- break;
145
-
146
- // Cache the next sibling.
147
- currentSibling = currentNode.getNext();
148
-
149
- // If cloning, just clone it.
150
- if ( action == 2 ) // 2 = Clone
151
- clone.append( currentNode.clone( true ) );
152
- else
153
- {
154
- // Both Delete and Extract will remove the node.
155
- currentNode.remove();
156
-
157
- // When Extracting, move the removed node to the docFrag.
158
- if ( action == 1 ) // 1 = Extract
159
- clone.append( currentNode );
160
- }
161
-
162
- currentNode = currentSibling;
163
- }
164
-
165
- if ( clone )
166
- clone = levelClone;
167
- }
168
-
169
- clone = docFrag;
170
-
171
- // Remove all previous sibling nodes for every node in the
172
- // endParents tree.
173
- for ( var k = i ; k < endParents.length ; k++ )
174
- {
175
- levelStartNode = endParents[ k ];
176
-
177
- // For Extract and Clone, we must clone this level.
178
- if ( action > 0 && !levelStartNode.equals( endNode ) ) // action = 0 = Delete
179
- levelClone = clone.append( levelStartNode.clone() );
180
-
181
- // The processing of siblings may have already been done by the parent.
182
- if ( !startParents[ k ] || levelStartNode.$.parentNode != startParents[ k ].$.parentNode )
183
- {
184
- currentNode = levelStartNode.getPrevious();
185
-
186
- while ( currentNode )
187
- {
188
- // Stop processing when the current node matches a node in the
189
- // startParents tree or if it is the startNode.
190
- if ( currentNode.equals( startParents[ k ] ) || currentNode.equals( startNode ) )
191
- break;
192
-
193
- // Cache the next sibling.
194
- currentSibling = currentNode.getPrevious();
195
-
196
- // If cloning, just clone it.
197
- if ( action == 2 ) // 2 = Clone
198
- clone.$.insertBefore( currentNode.$.cloneNode( true ), clone.$.firstChild ) ;
199
- else
200
- {
201
- // Both Delete and Extract will remove the node.
202
- currentNode.remove();
203
-
204
- // When Extracting, mode the removed node to the docFrag.
205
- if ( action == 1 ) // 1 = Extract
206
- clone.$.insertBefore( currentNode.$, clone.$.firstChild );
207
- }
208
-
209
- currentNode = currentSibling;
210
- }
211
- }
212
-
213
- if ( clone )
214
- clone = levelClone;
215
- }
216
-
217
- if ( action == 2 ) // 2 = Clone.
218
- {
219
- // No changes in the DOM should be done, so fix the split text (if any).
220
-
221
- var startTextNode = range.startContainer;
222
- if ( startTextNode.type == CKEDITOR.NODE_TEXT )
223
- {
224
- startTextNode.$.data += startTextNode.$.nextSibling.data;
225
- startTextNode.$.parentNode.removeChild( startTextNode.$.nextSibling );
226
- }
227
-
228
- var endTextNode = range.endContainer;
229
- if ( endTextNode.type == CKEDITOR.NODE_TEXT && endTextNode.$.nextSibling )
230
- {
231
- endTextNode.$.data += endTextNode.$.nextSibling.data;
232
- endTextNode.$.parentNode.removeChild( endTextNode.$.nextSibling );
233
- }
234
- }
235
- else
236
- {
237
- // Collapse the range.
238
-
239
- // If a node has been partially selected, collapse the range between
240
- // topStart and topEnd. Otherwise, simply collapse it to the start. (W3C specs).
241
- if ( topStart && topEnd && ( startNode.$.parentNode != topStart.$.parentNode || endNode.$.parentNode != topEnd.$.parentNode ) )
242
- {
243
- var endIndex = topEnd.getIndex();
244
-
245
- // If the start node is to be removed, we must correct the
246
- // index to reflect the removal.
247
- if ( removeStartNode && topEnd.$.parentNode == startNode.$.parentNode )
248
- endIndex--;
249
-
250
- range.setStart( topEnd.getParent(), endIndex );
251
- }
252
-
253
- // Collapse it to the start.
254
- range.collapse( true );
255
- }
256
-
257
- // Cleanup any marked node.
258
- if ( removeStartNode )
259
- startNode.remove();
260
-
261
- if ( removeEndNode && endNode.$.parentNode )
262
- endNode.remove();
263
- };
264
-
265
- var inlineChildReqElements = { abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1 };
266
-
267
- // Creates the appropriate node evaluator for the dom walker used inside
268
- // check(Start|End)OfBlock.
269
- function getCheckStartEndBlockEvalFunction( isStart )
270
- {
271
- var hadBr = false, bookmarkEvaluator = CKEDITOR.dom.walker.bookmark( true );
272
- return function( node )
273
- {
274
- // First ignore bookmark nodes.
275
- if ( bookmarkEvaluator( node ) )
276
- return true;
277
-
278
- if ( node.type == CKEDITOR.NODE_TEXT )
279
- {
280
- // If there's any visible text, then we're not at the start.
281
- if ( CKEDITOR.tools.trim( node.getText() ).length )
282
- return false;
283
- }
284
- else if ( node.type == CKEDITOR.NODE_ELEMENT )
285
- {
286
- // If there are non-empty inline elements (e.g. <img />), then we're not
287
- // at the start.
288
- if ( !inlineChildReqElements[ node.getName() ] )
289
- {
290
- // If we're working at the end-of-block, forgive the first <br /> in non-IE
291
- // browsers.
292
- if ( !isStart && !CKEDITOR.env.ie && node.getName() == 'br' && !hadBr )
293
- hadBr = true;
294
- else
295
- return false;
296
- }
297
- }
298
- return true;
299
- };
300
- }
301
-
302
- // Evaluator for CKEDITOR.dom.element::checkBoundaryOfElement, reject any
303
- // text node and non-empty elements unless it's being bookmark text.
304
- function elementBoundaryEval( node )
305
- {
306
- // Reject any text node unless it's being bookmark
307
- // OR it's spaces. (#3883)
308
- return node.type != CKEDITOR.NODE_TEXT
309
- && node.getName() in CKEDITOR.dtd.$removeEmpty
310
- || !CKEDITOR.tools.trim( node.getText() )
311
- || node.getParent().hasAttribute( '_cke_bookmark' );
312
- }
313
-
314
- var whitespaceEval = new CKEDITOR.dom.walker.whitespaces(),
315
- bookmarkEval = new CKEDITOR.dom.walker.bookmark();
316
-
317
- function nonWhitespaceOrBookmarkEval( node )
318
- {
319
- // Whitespaces and bookmark nodes are to be ignored.
320
- return !whitespaceEval( node ) && !bookmarkEval( node );
321
- }
322
-
323
- CKEDITOR.dom.range.prototype =
324
- {
325
- clone : function()
326
- {
327
- var clone = new CKEDITOR.dom.range( this.document );
328
-
329
- clone.startContainer = this.startContainer;
330
- clone.startOffset = this.startOffset;
331
- clone.endContainer = this.endContainer;
332
- clone.endOffset = this.endOffset;
333
- clone.collapsed = this.collapsed;
334
-
335
- return clone;
336
- },
337
-
338
- collapse : function( toStart )
339
- {
340
- if ( toStart )
341
- {
342
- this.endContainer = this.startContainer;
343
- this.endOffset = this.startOffset;
344
- }
345
- else
346
- {
347
- this.startContainer = this.endContainer;
348
- this.startOffset = this.endOffset;
349
- }
350
-
351
- this.collapsed = true;
352
- },
353
-
354
- // The selection may be lost when cloning (due to the splitText() call).
355
- cloneContents : function()
356
- {
357
- var docFrag = new CKEDITOR.dom.documentFragment( this.document );
358
-
359
- if ( !this.collapsed )
360
- execContentsAction( this, 2, docFrag );
361
-
362
- return docFrag;
363
- },
364
-
365
- deleteContents : function()
366
- {
367
- if ( this.collapsed )
368
- return;
369
-
370
- execContentsAction( this, 0 );
371
- },
372
-
373
- extractContents : function()
374
- {
375
- var docFrag = new CKEDITOR.dom.documentFragment( this.document );
376
-
377
- if ( !this.collapsed )
378
- execContentsAction( this, 1, docFrag );
379
-
380
- return docFrag;
381
- },
382
-
383
- /**
384
- * Creates a bookmark object, which can be later used to restore the
385
- * range by using the moveToBookmark function.
386
- * This is an "intrusive" way to create a bookmark. It includes <span> tags
387
- * in the range boundaries. The advantage of it is that it is possible to
388
- * handle DOM mutations when moving back to the bookmark.
389
- * Attention: the inclusion of nodes in the DOM is a design choice and
390
- * should not be changed as there are other points in the code that may be
391
- * using those nodes to perform operations. See GetBookmarkNode.
392
- * @param {Boolean} [serializable] Indicates that the bookmark nodes
393
- * must contain ids, which can be used to restore the range even
394
- * when these nodes suffer mutations (like a clonation or innerHTML
395
- * change).
396
- * @returns {Object} And object representing a bookmark.
397
- */
398
- createBookmark : function( serializable )
399
- {
400
- var startNode, endNode;
401
- var baseId;
402
- var clone;
403
- var collapsed = this.collapsed;
404
-
405
- startNode = this.document.createElement( 'span' );
406
- startNode.setAttribute( '_cke_bookmark', 1 );
407
- startNode.setStyle( 'display', 'none' );
408
-
409
- // For IE, it must have something inside, otherwise it may be
410
- // removed during DOM operations.
411
- startNode.setHtml( '&nbsp;' );
412
-
413
- if ( serializable )
414
- {
415
- baseId = 'cke_bm_' + CKEDITOR.tools.getNextNumber();
416
- startNode.setAttribute( 'id', baseId + 'S' );
417
- }
418
-
419
- // If collapsed, the endNode will not be created.
420
- if ( !collapsed )
421
- {
422
- endNode = startNode.clone();
423
- endNode.setHtml( '&nbsp;' );
424
-
425
- if ( serializable )
426
- endNode.setAttribute( 'id', baseId + 'E' );
427
-
428
- clone = this.clone();
429
- clone.collapse();
430
- clone.insertNode( endNode );
431
- }
432
-
433
- clone = this.clone();
434
- clone.collapse( true );
435
- clone.insertNode( startNode );
436
-
437
- // Update the range position.
438
- if ( endNode )
439
- {
440
- this.setStartAfter( startNode );
441
- this.setEndBefore( endNode );
442
- }
443
- else
444
- this.moveToPosition( startNode, CKEDITOR.POSITION_AFTER_END );
445
-
446
- return {
447
- startNode : serializable ? baseId + 'S' : startNode,
448
- endNode : serializable ? baseId + 'E' : endNode,
449
- serializable : serializable,
450
- collapsed : collapsed
451
- };
452
- },
453
-
454
- /**
455
- * Creates a "non intrusive" and "mutation sensible" bookmark. This
456
- * kind of bookmark should be used only when the DOM is supposed to
457
- * remain stable after its creation.
458
- * @param {Boolean} [normalized] Indicates that the bookmark must
459
- * normalized. When normalized, the successive text nodes are
460
- * considered a single node. To sucessful load a normalized
461
- * bookmark, the DOM tree must be also normalized before calling
462
- * moveToBookmark.
463
- * @returns {Object} An object representing the bookmark.
464
- */
465
- createBookmark2 : function( normalized )
466
- {
467
- var startContainer = this.startContainer,
468
- endContainer = this.endContainer;
469
-
470
- var startOffset = this.startOffset,
471
- endOffset = this.endOffset;
472
-
473
- var collapsed = this.collapsed;
474
-
475
- var child, previous;
476
-
477
- // If there is no range then get out of here.
478
- // It happens on initial load in Safari #962 and if the editor it's
479
- // hidden also in Firefox
480
- if ( !startContainer || !endContainer )
481
- return { start : 0, end : 0 };
482
-
483
- if ( normalized )
484
- {
485
- // Find out if the start is pointing to a text node that will
486
- // be normalized.
487
- if ( startContainer.type == CKEDITOR.NODE_ELEMENT )
488
- {
489
- child = startContainer.getChild( startOffset );
490
-
491
- // In this case, move the start information to that text
492
- // node.
493
- if ( child && child.type == CKEDITOR.NODE_TEXT
494
- && startOffset > 0 && child.getPrevious().type == CKEDITOR.NODE_TEXT )
495
- {
496
- startContainer = child;
497
- startOffset = 0;
498
- }
499
- }
500
-
501
- // Normalize the start.
502
- while ( startContainer.type == CKEDITOR.NODE_TEXT
503
- && ( previous = startContainer.getPrevious() )
504
- && previous.type == CKEDITOR.NODE_TEXT )
505
- {
506
- startContainer = previous;
507
- startOffset += previous.getLength();
508
- }
509
-
510
- // Process the end only if not normalized.
511
- if ( !collapsed )
512
- {
513
- // Find out if the start is pointing to a text node that
514
- // will be normalized.
515
- if ( endContainer.type == CKEDITOR.NODE_ELEMENT )
516
- {
517
- child = endContainer.getChild( endOffset );
518
-
519
- // In this case, move the start information to that
520
- // text node.
521
- if ( child && child.type == CKEDITOR.NODE_TEXT
522
- && endOffset > 0 && child.getPrevious().type == CKEDITOR.NODE_TEXT )
523
- {
524
- endContainer = child;
525
- endOffset = 0;
526
- }
527
- }
528
-
529
- // Normalize the end.
530
- while ( endContainer.type == CKEDITOR.NODE_TEXT
531
- && ( previous = endContainer.getPrevious() )
532
- && previous.type == CKEDITOR.NODE_TEXT )
533
- {
534
- endContainer = previous;
535
- endOffset += previous.getLength();
536
- }
537
- }
538
- }
539
-
540
- return {
541
- start : startContainer.getAddress( normalized ),
542
- end : collapsed ? null : endContainer.getAddress( normalized ),
543
- startOffset : startOffset,
544
- endOffset : endOffset,
545
- normalized : normalized,
546
- collapsed : collapsed,
547
- is2 : true // It's a createBookmark2 bookmark.
548
- };
549
- },
550
-
551
- moveToBookmark : function( bookmark )
552
- {
553
- if ( bookmark.is2 ) // Created with createBookmark2().
554
- {
555
- // Get the start information.
556
- var startContainer = this.document.getByAddress( bookmark.start, bookmark.normalized ),
557
- startOffset = bookmark.startOffset;
558
-
559
- // Get the end information.
560
- var endContainer = bookmark.end && this.document.getByAddress( bookmark.end, bookmark.normalized ),
561
- endOffset = bookmark.endOffset;
562
-
563
- // Set the start boundary.
564
- this.setStart( startContainer, startOffset );
565
-
566
- // Set the end boundary. If not available, collapse it.
567
- if ( endContainer )
568
- this.setEnd( endContainer, endOffset );
569
- else
570
- this.collapse( true );
571
- }
572
- else // Created with createBookmark().
573
- {
574
- var serializable = bookmark.serializable,
575
- startNode = serializable ? this.document.getById( bookmark.startNode ) : bookmark.startNode,
576
- endNode = serializable ? this.document.getById( bookmark.endNode ) : bookmark.endNode;
577
-
578
- // Set the range start at the bookmark start node position.
579
- this.setStartBefore( startNode );
580
-
581
- // Remove it, because it may interfere in the setEndBefore call.
582
- startNode.remove();
583
-
584
- // Set the range end at the bookmark end node position, or simply
585
- // collapse it if it is not available.
586
- if ( endNode )
587
- {
588
- this.setEndBefore( endNode );
589
- endNode.remove();
590
- }
591
- else
592
- this.collapse( true );
593
- }
594
- },
595
-
596
- getBoundaryNodes : function()
597
- {
598
- var startNode = this.startContainer,
599
- endNode = this.endContainer,
600
- startOffset = this.startOffset,
601
- endOffset = this.endOffset,
602
- childCount;
603
-
604
- if ( startNode.type == CKEDITOR.NODE_ELEMENT )
605
- {
606
- childCount = startNode.getChildCount();
607
- if ( childCount > startOffset )
608
- startNode = startNode.getChild( startOffset );
609
- else if ( childCount < 1 )
610
- startNode = startNode.getPreviousSourceNode();
611
- else // startOffset > childCount but childCount is not 0
612
- {
613
- // Try to take the node just after the current position.
614
- startNode = startNode.$;
615
- while ( startNode.lastChild )
616
- startNode = startNode.lastChild;
617
- startNode = new CKEDITOR.dom.node( startNode );
618
-
619
- // Normally we should take the next node in DFS order. But it
620
- // is also possible that we've already reached the end of
621
- // document.
622
- startNode = startNode.getNextSourceNode() || startNode;
623
- }
624
- }
625
- if ( endNode.type == CKEDITOR.NODE_ELEMENT )
626
- {
627
- childCount = endNode.getChildCount();
628
- if ( childCount > endOffset )
629
- endNode = endNode.getChild( endOffset ).getPreviousSourceNode( true );
630
- else if ( childCount < 1 )
631
- endNode = endNode.getPreviousSourceNode();
632
- else // endOffset > childCount but childCount is not 0
633
- {
634
- // Try to take the node just before the current position.
635
- endNode = endNode.$;
636
- while ( endNode.lastChild )
637
- endNode = endNode.lastChild;
638
- endNode = new CKEDITOR.dom.node( endNode );
639
- }
640
- }
641
-
642
- // Sometimes the endNode will come right before startNode for collapsed
643
- // ranges. Fix it. (#3780)
644
- if ( startNode.getPosition( endNode ) & CKEDITOR.POSITION_FOLLOWING )
645
- startNode = endNode;
646
-
647
- return { startNode : startNode, endNode : endNode };
648
- },
649
-
650
- /**
651
- * Find the node which fully contains the range.
652
- * @param includeSelf
653
- * @param {Boolean} ignoreTextNode Whether ignore CKEDITOR.NODE_TEXT type.
654
- */
655
- getCommonAncestor : function( includeSelf , ignoreTextNode )
656
- {
657
- var start = this.startContainer,
658
- end = this.endContainer,
659
- ancestor;
660
-
661
- if ( start.equals( end ) )
662
- {
663
- if ( includeSelf
664
- && start.type == CKEDITOR.NODE_ELEMENT
665
- && this.startOffset == this.endOffset - 1 )
666
- ancestor = start.getChild( this.startOffset );
667
- else
668
- ancestor = start;
669
- }
670
- else
671
- ancestor = start.getCommonAncestor( end );
672
-
673
- return ignoreTextNode && !ancestor.is ? ancestor.getParent() : ancestor;
674
- },
675
-
676
- /**
677
- * Transforms the startContainer and endContainer properties from text
678
- * nodes to element nodes, whenever possible. This is actually possible
679
- * if either of the boundary containers point to a text node, and its
680
- * offset is set to zero, or after the last char in the node.
681
- */
682
- optimize : function()
683
- {
684
- var container = this.startContainer;
685
- var offset = this.startOffset;
686
-
687
- if ( container.type != CKEDITOR.NODE_ELEMENT )
688
- {
689
- if ( !offset )
690
- this.setStartBefore( container );
691
- else if ( offset >= container.getLength() )
692
- this.setStartAfter( container );
693
- }
694
-
695
- container = this.endContainer;
696
- offset = this.endOffset;
697
-
698
- if ( container.type != CKEDITOR.NODE_ELEMENT )
699
- {
700
- if ( !offset )
701
- this.setEndBefore( container );
702
- else if ( offset >= container.getLength() )
703
- this.setEndAfter( container );
704
- }
705
- },
706
-
707
- /**
708
- * Move the range out of bookmark nodes if they'd been the container.
709
- */
710
- optimizeBookmark: function()
711
- {
712
- var startNode = this.startContainer,
713
- endNode = this.endContainer;
714
-
715
- if ( startNode.is && startNode.is( 'span' )
716
- && startNode.hasAttribute( '_cke_bookmark' ) )
717
- this.setStartAt( startNode, CKEDITOR.POSITION_BEFORE_START );
718
- if ( endNode && endNode.is && endNode.is( 'span' )
719
- && endNode.hasAttribute( '_cke_bookmark' ) )
720
- this.setEndAt( endNode, CKEDITOR.POSITION_AFTER_END );
721
- },
722
-
723
- trim : function( ignoreStart, ignoreEnd )
724
- {
725
- var startContainer = this.startContainer,
726
- startOffset = this.startOffset,
727
- collapsed = this.collapsed;
728
- if ( ( !ignoreStart || collapsed )
729
- && startContainer && startContainer.type == CKEDITOR.NODE_TEXT )
730
- {
731
- // If the offset is zero, we just insert the new node before
732
- // the start.
733
- if ( !startOffset )
734
- {
735
- startOffset = startContainer.getIndex();
736
- startContainer = startContainer.getParent();
737
- }
738
- // If the offset is at the end, we'll insert it after the text
739
- // node.
740
- else if ( startOffset >= startContainer.getLength() )
741
- {
742
- startOffset = startContainer.getIndex() + 1;
743
- startContainer = startContainer.getParent();
744
- }
745
- // In other case, we split the text node and insert the new
746
- // node at the split point.
747
- else
748
- {
749
- var nextText = startContainer.split( startOffset );
750
-
751
- startOffset = startContainer.getIndex() + 1;
752
- startContainer = startContainer.getParent();
753
-
754
- // Check all necessity of updating the end boundary.
755
- if ( this.startContainer.equals( this.endContainer ) )
756
- this.setEnd( nextText, this.endOffset - this.startOffset );
757
- else if ( startContainer.equals( this.endContainer ) )
758
- this.endOffset += 1;
759
- }
760
-
761
- this.setStart( startContainer, startOffset );
762
-
763
- if ( collapsed )
764
- {
765
- this.collapse( true );
766
- return;
767
- }
768
- }
769
-
770
- var endContainer = this.endContainer;
771
- var endOffset = this.endOffset;
772
-
773
- if ( !( ignoreEnd || collapsed )
774
- && endContainer && endContainer.type == CKEDITOR.NODE_TEXT )
775
- {
776
- // If the offset is zero, we just insert the new node before
777
- // the start.
778
- if ( !endOffset )
779
- {
780
- endOffset = endContainer.getIndex();
781
- endContainer = endContainer.getParent();
782
- }
783
- // If the offset is at the end, we'll insert it after the text
784
- // node.
785
- else if ( endOffset >= endContainer.getLength() )
786
- {
787
- endOffset = endContainer.getIndex() + 1;
788
- endContainer = endContainer.getParent();
789
- }
790
- // In other case, we split the text node and insert the new
791
- // node at the split point.
792
- else
793
- {
794
- endContainer.split( endOffset );
795
-
796
- endOffset = endContainer.getIndex() + 1;
797
- endContainer = endContainer.getParent();
798
- }
799
-
800
- this.setEnd( endContainer, endOffset );
801
- }
802
- },
803
-
804
- enlarge : function( unit )
805
- {
806
- switch ( unit )
807
- {
808
- case CKEDITOR.ENLARGE_ELEMENT :
809
-
810
- if ( this.collapsed )
811
- return;
812
-
813
- // Get the common ancestor.
814
- var commonAncestor = this.getCommonAncestor();
815
-
816
- var body = this.document.getBody();
817
-
818
- // For each boundary
819
- // a. Depending on its position, find out the first node to be checked (a sibling) or, if not available, to be enlarge.
820
- // b. Go ahead checking siblings and enlarging the boundary as much as possible until the common ancestor is not reached. After reaching the common ancestor, just save the enlargeable node to be used later.
821
-
822
- var startTop, endTop;
823
-
824
- var enlargeable, sibling, commonReached;
825
-
826
- // Indicates that the node can be added only if whitespace
827
- // is available before it.
828
- var needsWhiteSpace = false;
829
- var isWhiteSpace;
830
- var siblingText;
831
-
832
- // Process the start boundary.
833
-
834
- var container = this.startContainer;
835
- var offset = this.startOffset;
836
-
837
- if ( container.type == CKEDITOR.NODE_TEXT )
838
- {
839
- if ( offset )
840
- {
841
- // Check if there is any non-space text before the
842
- // offset. Otherwise, container is null.
843
- container = !CKEDITOR.tools.trim( container.substring( 0, offset ) ).length && container;
844
-
845
- // If we found only whitespace in the node, it
846
- // means that we'll need more whitespace to be able
847
- // to expand. For example, <i> can be expanded in
848
- // "A <i> [B]</i>", but not in "A<i> [B]</i>".
849
- needsWhiteSpace = !!container;
850
- }
851
-
852
- if ( container )
853
- {
854
- if ( !( sibling = container.getPrevious() ) )
855
- enlargeable = container.getParent();
856
- }
857
- }
858
- else
859
- {
860
- // If we have offset, get the node preceeding it as the
861
- // first sibling to be checked.
862
- if ( offset )
863
- sibling = container.getChild( offset - 1 ) || container.getLast();
864
-
865
- // If there is no sibling, mark the container to be
866
- // enlarged.
867
- if ( !sibling )
868
- enlargeable = container;
869
- }
870
-
871
- while ( enlargeable || sibling )
872
- {
873
- if ( enlargeable && !sibling )
874
- {
875
- // If we reached the common ancestor, mark the flag
876
- // for it.
877
- if ( !commonReached && enlargeable.equals( commonAncestor ) )
878
- commonReached = true;
879
-
880
- if ( !body.contains( enlargeable ) )
881
- break;
882
-
883
- // If we don't need space or this element breaks
884
- // the line, then enlarge it.
885
- if ( !needsWhiteSpace || enlargeable.getComputedStyle( 'display' ) != 'inline' )
886
- {
887
- needsWhiteSpace = false;
888
-
889
- // If the common ancestor has been reached,
890
- // we'll not enlarge it immediately, but just
891
- // mark it to be enlarged later if the end
892
- // boundary also enlarges it.
893
- if ( commonReached )
894
- startTop = enlargeable;
895
- else
896
- this.setStartBefore( enlargeable );
897
- }
898
-
899
- sibling = enlargeable.getPrevious();
900
- }
901
-
902
- // Check all sibling nodes preceeding the enlargeable
903
- // node. The node wil lbe enlarged only if none of them
904
- // blocks it.
905
- while ( sibling )
906
- {
907
- // This flag indicates that this node has
908
- // whitespaces at the end.
909
- isWhiteSpace = false;
910
-
911
- if ( sibling.type == CKEDITOR.NODE_TEXT )
912
- {
913
- siblingText = sibling.getText();
914
-
915
- if ( /[^\s\ufeff]/.test( siblingText ) )
916
- sibling = null;
917
-
918
- isWhiteSpace = /[\s\ufeff]$/.test( siblingText );
919
- }
920
- else
921
- {
922
- // If this is a visible element.
923
- // We need to check for the bookmark attribute because IE insists on
924
- // rendering the display:none nodes we use for bookmarks. (#3363)
925
- if ( sibling.$.offsetWidth > 0 && !sibling.getAttribute( '_cke_bookmark' ) )
926
- {
927
- // We'll accept it only if we need
928
- // whitespace, and this is an inline
929
- // element with whitespace only.
930
- if ( needsWhiteSpace && CKEDITOR.dtd.$removeEmpty[ sibling.getName() ] )
931
- {
932
- // It must contains spaces and inline elements only.
933
-
934
- siblingText = sibling.getText();
935
-
936
- if ( (/[^\s\ufeff]/).test( siblingText ) ) // Spaces + Zero Width No-Break Space (U+FEFF)
937
- sibling = null;
938
- else
939
- {
940
- var allChildren = sibling.$.all || sibling.$.getElementsByTagName( '*' );
941
- for ( var i = 0, child ; child = allChildren[ i++ ] ; )
942
- {
943
- if ( !CKEDITOR.dtd.$removeEmpty[ child.nodeName.toLowerCase() ] )
944
- {
945
- sibling = null;
946
- break;
947
- }
948
- }
949
- }
950
-
951
- if ( sibling )
952
- isWhiteSpace = !!siblingText.length;
953
- }
954
- else
955
- sibling = null;
956
- }
957
- }
958
-
959
- // A node with whitespaces has been found.
960
- if ( isWhiteSpace )
961
- {
962
- // Enlarge the last enlargeable node, if we
963
- // were waiting for spaces.
964
- if ( needsWhiteSpace )
965
- {
966
- if ( commonReached )
967
- startTop = enlargeable;
968
- else if ( enlargeable )
969
- this.setStartBefore( enlargeable );
970
- }
971
- else
972
- needsWhiteSpace = true;
973
- }
974
-
975
- if ( sibling )
976
- {
977
- var next = sibling.getPrevious();
978
-
979
- if ( !enlargeable && !next )
980
- {
981
- // Set the sibling as enlargeable, so it's
982
- // parent will be get later outside this while.
983
- enlargeable = sibling;
984
- sibling = null;
985
- break;
986
- }
987
-
988
- sibling = next;
989
- }
990
- else
991
- {
992
- // If sibling has been set to null, then we
993
- // need to stop enlarging.
994
- enlargeable = null;
995
- }
996
- }
997
-
998
- if ( enlargeable )
999
- enlargeable = enlargeable.getParent();
1000
- }
1001
-
1002
- // Process the end boundary. This is basically the same
1003
- // code used for the start boundary, with small changes to
1004
- // make it work in the oposite side (to the right). This
1005
- // makes it difficult to reuse the code here. So, fixes to
1006
- // the above code are likely to be replicated here.
1007
-
1008
- container = this.endContainer;
1009
- offset = this.endOffset;
1010
-
1011
- // Reset the common variables.
1012
- enlargeable = sibling = null;
1013
- commonReached = needsWhiteSpace = false;
1014
-
1015
- if ( container.type == CKEDITOR.NODE_TEXT )
1016
- {
1017
- // Check if there is any non-space text after the
1018
- // offset. Otherwise, container is null.
1019
- container = !CKEDITOR.tools.trim( container.substring( offset ) ).length && container;
1020
-
1021
- // If we found only whitespace in the node, it
1022
- // means that we'll need more whitespace to be able
1023
- // to expand. For example, <i> can be expanded in
1024
- // "A <i> [B]</i>", but not in "A<i> [B]</i>".
1025
- needsWhiteSpace = !( container && container.getLength() );
1026
-
1027
- if ( container )
1028
- {
1029
- if ( !( sibling = container.getNext() ) )
1030
- enlargeable = container.getParent();
1031
- }
1032
- }
1033
- else
1034
- {
1035
- // Get the node right after the boudary to be checked
1036
- // first.
1037
- sibling = container.getChild( offset );
1038
-
1039
- if ( !sibling )
1040
- enlargeable = container;
1041
- }
1042
-
1043
- while ( enlargeable || sibling )
1044
- {
1045
- if ( enlargeable && !sibling )
1046
- {
1047
- if ( !commonReached && enlargeable.equals( commonAncestor ) )
1048
- commonReached = true;
1049
-
1050
- if ( !body.contains( enlargeable ) )
1051
- break;
1052
-
1053
- if ( !needsWhiteSpace || enlargeable.getComputedStyle( 'display' ) != 'inline' )
1054
- {
1055
- needsWhiteSpace = false;
1056
-
1057
- if ( commonReached )
1058
- endTop = enlargeable;
1059
- else if ( enlargeable )
1060
- this.setEndAfter( enlargeable );
1061
- }
1062
-
1063
- sibling = enlargeable.getNext();
1064
- }
1065
-
1066
- while ( sibling )
1067
- {
1068
- isWhiteSpace = false;
1069
-
1070
- if ( sibling.type == CKEDITOR.NODE_TEXT )
1071
- {
1072
- siblingText = sibling.getText();
1073
-
1074
- if ( /[^\s\ufeff]/.test( siblingText ) )
1075
- sibling = null;
1076
-
1077
- isWhiteSpace = /^[\s\ufeff]/.test( siblingText );
1078
- }
1079
- else
1080
- {
1081
- // If this is a visible element.
1082
- // We need to check for the bookmark attribute because IE insists on
1083
- // rendering the display:none nodes we use for bookmarks. (#3363)
1084
- if ( sibling.$.offsetWidth > 0 && !sibling.getAttribute( '_cke_bookmark' ) )
1085
- {
1086
- // We'll accept it only if we need
1087
- // whitespace, and this is an inline
1088
- // element with whitespace only.
1089
- if ( needsWhiteSpace && CKEDITOR.dtd.$removeEmpty[ sibling.getName() ] )
1090
- {
1091
- // It must contains spaces and inline elements only.
1092
-
1093
- siblingText = sibling.getText();
1094
-
1095
- if ( (/[^\s\ufeff]/).test( siblingText ) )
1096
- sibling = null;
1097
- else
1098
- {
1099
- allChildren = sibling.$.all || sibling.$.getElementsByTagName( '*' );
1100
- for ( i = 0 ; child = allChildren[ i++ ] ; )
1101
- {
1102
- if ( !CKEDITOR.dtd.$removeEmpty[ child.nodeName.toLowerCase() ] )
1103
- {
1104
- sibling = null;
1105
- break;
1106
- }
1107
- }
1108
- }
1109
-
1110
- if ( sibling )
1111
- isWhiteSpace = !!siblingText.length;
1112
- }
1113
- else
1114
- sibling = null;
1115
- }
1116
- }
1117
-
1118
- if ( isWhiteSpace )
1119
- {
1120
- if ( needsWhiteSpace )
1121
- {
1122
- if ( commonReached )
1123
- endTop = enlargeable;
1124
- else
1125
- this.setEndAfter( enlargeable );
1126
- }
1127
- }
1128
-
1129
- if ( sibling )
1130
- {
1131
- next = sibling.getNext();
1132
-
1133
- if ( !enlargeable && !next )
1134
- {
1135
- enlargeable = sibling;
1136
- sibling = null;
1137
- break;
1138
- }
1139
-
1140
- sibling = next;
1141
- }
1142
- else
1143
- {
1144
- // If sibling has been set to null, then we
1145
- // need to stop enlarging.
1146
- enlargeable = null;
1147
- }
1148
- }
1149
-
1150
- if ( enlargeable )
1151
- enlargeable = enlargeable.getParent();
1152
- }
1153
-
1154
- // If the common ancestor can be enlarged by both boundaries, then include it also.
1155
- if ( startTop && endTop )
1156
- {
1157
- commonAncestor = startTop.contains( endTop ) ? endTop : startTop;
1158
-
1159
- this.setStartBefore( commonAncestor );
1160
- this.setEndAfter( commonAncestor );
1161
- }
1162
- break;
1163
-
1164
- case CKEDITOR.ENLARGE_BLOCK_CONTENTS:
1165
- case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:
1166
-
1167
- // Enlarging the start boundary.
1168
- var walkerRange = new CKEDITOR.dom.range( this.document );
1169
-
1170
- body = this.document.getBody();
1171
-
1172
- walkerRange.setStartAt( body, CKEDITOR.POSITION_AFTER_START );
1173
- walkerRange.setEnd( this.startContainer, this.startOffset );
1174
-
1175
- var walker = new CKEDITOR.dom.walker( walkerRange ),
1176
- blockBoundary, // The node on which the enlarging should stop.
1177
- tailBr, // In case BR as block boundary.
1178
- notBlockBoundary = CKEDITOR.dom.walker.blockBoundary(
1179
- ( unit == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS ) ? { br : 1 } : null ),
1180
- // Record the encountered 'blockBoundary' for later use.
1181
- boundaryGuard = function( node )
1182
- {
1183
- var retval = notBlockBoundary( node );
1184
- if ( !retval )
1185
- blockBoundary = node;
1186
- return retval;
1187
- },
1188
- // Record the encounted 'tailBr' for later use.
1189
- tailBrGuard = function( node )
1190
- {
1191
- var retval = boundaryGuard( node );
1192
- if ( !retval && node.is && node.is( 'br' ) )
1193
- tailBr = node;
1194
- return retval;
1195
- };
1196
-
1197
- walker.guard = boundaryGuard;
1198
-
1199
- enlargeable = walker.lastBackward();
1200
-
1201
- // It's the body which stop the enlarging if no block boundary found.
1202
- blockBoundary = blockBoundary || body;
1203
-
1204
- // Start the range either after the end of found block (<p>...</p>[text)
1205
- // or at the start of block (<p>[text...), by comparing the document position
1206
- // with 'enlargeable' node.
1207
- this.setStartAt(
1208
- blockBoundary,
1209
- !blockBoundary.is( 'br' ) &&
1210
- ( !enlargeable && this.checkStartOfBlock()
1211
- || enlargeable && blockBoundary.contains( enlargeable ) ) ?
1212
- CKEDITOR.POSITION_AFTER_START :
1213
- CKEDITOR.POSITION_AFTER_END );
1214
-
1215
- // Enlarging the end boundary.
1216
- walkerRange = this.clone();
1217
- walkerRange.collapse();
1218
- walkerRange.setEndAt( body, CKEDITOR.POSITION_BEFORE_END );
1219
- walker = new CKEDITOR.dom.walker( walkerRange );
1220
-
1221
- // tailBrGuard only used for on range end.
1222
- walker.guard = ( unit == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS ) ?
1223
- tailBrGuard : boundaryGuard;
1224
- blockBoundary = null;
1225
- // End the range right before the block boundary node.
1226
-
1227
- enlargeable = walker.lastForward();
1228
-
1229
- // It's the body which stop the enlarging if no block boundary found.
1230
- blockBoundary = blockBoundary || body;
1231
-
1232
- // Close the range either before the found block start (text]<p>...</p>) or at the block end (...text]</p>)
1233
- // by comparing the document position with 'enlargeable' node.
1234
- this.setEndAt(
1235
- blockBoundary,
1236
- ( !enlargeable && this.checkEndOfBlock()
1237
- || enlargeable && blockBoundary.contains( enlargeable ) ) ?
1238
- CKEDITOR.POSITION_BEFORE_END :
1239
- CKEDITOR.POSITION_BEFORE_START );
1240
- // We must include the <br> at the end of range if there's
1241
- // one and we're expanding list item contents
1242
- if ( tailBr )
1243
- this.setEndAfter( tailBr );
1244
- }
1245
- },
1246
-
1247
- /**
1248
- * Descrease the range to make sure that boundaries
1249
- * always anchor beside text nodes or innermost element.
1250
- * @param {Number} mode ( CKEDITOR.SHRINK_ELEMENT | CKEDITOR.SHRINK_TEXT ) The shrinking mode.
1251
- * <dl>
1252
- * <dt>CKEDITOR.SHRINK_ELEMENT</dt>
1253
- * <dd>Shrink the range boundaries to the edge of the innermost element.</dd>
1254
- * <dt>CKEDITOR.SHRINK_TEXT</dt>
1255
- * <dd>Shrink the range boudaries to anchor by the side of enclosed text node, range remains if there's no text nodes on boundaries at all.</dd>
1256
- * </dl>
1257
- * @param {Boolean} selectContents Whether result range anchors at the inner OR outer boundary of the node.
1258
- */
1259
- shrink : function( mode, selectContents )
1260
- {
1261
- // Unable to shrink a collapsed range.
1262
- if ( !this.collapsed )
1263
- {
1264
- mode = mode || CKEDITOR.SHRINK_TEXT;
1265
-
1266
- var walkerRange = this.clone();
1267
-
1268
- var startContainer = this.startContainer,
1269
- endContainer = this.endContainer,
1270
- startOffset = this.startOffset,
1271
- endOffset = this.endOffset,
1272
- collapsed = this.collapsed;
1273
-
1274
- // Whether the start/end boundary is moveable.
1275
- var moveStart = 1,
1276
- moveEnd = 1;
1277
-
1278
- if ( startContainer && startContainer.type == CKEDITOR.NODE_TEXT )
1279
- {
1280
- if ( !startOffset )
1281
- walkerRange.setStartBefore( startContainer );
1282
- else if ( startOffset >= startContainer.getLength( ) )
1283
- walkerRange.setStartAfter( startContainer );
1284
- else
1285
- {
1286
- // Enlarge the range properly to avoid walker making
1287
- // DOM changes caused by triming the text nodes later.
1288
- walkerRange.setStartBefore( startContainer );
1289
- moveStart = 0;
1290
- }
1291
- }
1292
-
1293
- if ( endContainer && endContainer.type == CKEDITOR.NODE_TEXT )
1294
- {
1295
- if ( !endOffset )
1296
- walkerRange.setEndBefore( endContainer );
1297
- else if ( endOffset >= endContainer.getLength( ) )
1298
- walkerRange.setEndAfter( endContainer );
1299
- else
1300
- {
1301
- walkerRange.setEndAfter( endContainer );
1302
- moveEnd = 0;
1303
- }
1304
- }
1305
-
1306
- var walker = new CKEDITOR.dom.walker( walkerRange ),
1307
- isBookmark = CKEDITOR.dom.walker.bookmark();
1308
-
1309
- walker.evaluator = function( node )
1310
- {
1311
- return node.type == ( mode == CKEDITOR.SHRINK_ELEMENT ?
1312
- CKEDITOR.NODE_ELEMENT : CKEDITOR.NODE_TEXT );
1313
- };
1314
-
1315
- var currentElement;
1316
- walker.guard = function( node, movingOut )
1317
- {
1318
- if ( isBookmark( node ) )
1319
- return true;
1320
-
1321
- // Stop when we're shrink in element mode while encountering a text node.
1322
- if ( mode == CKEDITOR.SHRINK_ELEMENT && node.type == CKEDITOR.NODE_TEXT )
1323
- return false;
1324
-
1325
- // Stop when we've already walked "through" an element.
1326
- if ( movingOut && node.equals( currentElement ) )
1327
- return false;
1328
-
1329
- if ( !movingOut && node.type == CKEDITOR.NODE_ELEMENT )
1330
- currentElement = node;
1331
-
1332
- return true;
1333
- };
1334
-
1335
- if ( moveStart )
1336
- {
1337
- var textStart = walker[ mode == CKEDITOR.SHRINK_ELEMENT ? 'lastForward' : 'next']();
1338
- textStart && this.setStartAt( textStart, selectContents ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_BEFORE_START );
1339
- }
1340
-
1341
- if ( moveEnd )
1342
- {
1343
- walker.reset();
1344
- var textEnd = walker[ mode == CKEDITOR.SHRINK_ELEMENT ? 'lastBackward' : 'previous']();
1345
- textEnd && this.setEndAt( textEnd, selectContents ? CKEDITOR.POSITION_BEFORE_END : CKEDITOR.POSITION_AFTER_END );
1346
- }
1347
-
1348
- return !!( moveStart || moveEnd );
1349
- }
1350
- },
1351
-
1352
- /**
1353
- * Inserts a node at the start of the range. The range will be expanded
1354
- * the contain the node.
1355
- */
1356
- insertNode : function( node )
1357
- {
1358
- this.optimizeBookmark();
1359
- this.trim( false, true );
1360
-
1361
- var startContainer = this.startContainer;
1362
- var startOffset = this.startOffset;
1363
-
1364
- var nextNode = startContainer.getChild( startOffset );
1365
-
1366
- if ( nextNode )
1367
- node.insertBefore( nextNode );
1368
- else
1369
- startContainer.append( node );
1370
-
1371
- // Check if we need to update the end boundary.
1372
- if ( node.getParent().equals( this.endContainer ) )
1373
- this.endOffset++;
1374
-
1375
- // Expand the range to embrace the new node.
1376
- this.setStartBefore( node );
1377
- },
1378
-
1379
- moveToPosition : function( node, position )
1380
- {
1381
- this.setStartAt( node, position );
1382
- this.collapse( true );
1383
- },
1384
-
1385
- selectNodeContents : function( node )
1386
- {
1387
- this.setStart( node, 0 );
1388
- this.setEnd( node, node.type == CKEDITOR.NODE_TEXT ? node.getLength() : node.getChildCount() );
1389
- },
1390
-
1391
- /**
1392
- * Sets the start position of a Range.
1393
- * @param {CKEDITOR.dom.node} startNode The node to start the range.
1394
- * @param {Number} startOffset An integer greater than or equal to zero
1395
- * representing the offset for the start of the range from the start
1396
- * of startNode.
1397
- */
1398
- setStart : function( startNode, startOffset )
1399
- {
1400
- // W3C requires a check for the new position. If it is after the end
1401
- // boundary, the range should be collapsed to the new start. It seams
1402
- // we will not need this check for our use of this class so we can
1403
- // ignore it for now.
1404
-
1405
- // Fixing invalid range start inside dtd empty elements.
1406
- if( startNode.type == CKEDITOR.NODE_ELEMENT
1407
- && CKEDITOR.dtd.$empty[ startNode.getName() ] )
1408
- startNode = startNode.getParent(), startOffset = startNode.getIndex();
1409
-
1410
- this.startContainer = startNode;
1411
- this.startOffset = startOffset;
1412
-
1413
- if ( !this.endContainer )
1414
- {
1415
- this.endContainer = startNode;
1416
- this.endOffset = startOffset;
1417
- }
1418
-
1419
- updateCollapsed( this );
1420
- },
1421
-
1422
- /**
1423
- * Sets the end position of a Range.
1424
- * @param {CKEDITOR.dom.node} endNode The node to end the range.
1425
- * @param {Number} endOffset An integer greater than or equal to zero
1426
- * representing the offset for the end of the range from the start
1427
- * of endNode.
1428
- */
1429
- setEnd : function( endNode, endOffset )
1430
- {
1431
- // W3C requires a check for the new position. If it is before the start
1432
- // boundary, the range should be collapsed to the new end. It seams we
1433
- // will not need this check for our use of this class so we can ignore
1434
- // it for now.
1435
-
1436
- // Fixing invalid range end inside dtd empty elements.
1437
- if( endNode.type == CKEDITOR.NODE_ELEMENT
1438
- && CKEDITOR.dtd.$empty[ endNode.getName() ] )
1439
- endOffset = endNode.getIndex() + 1, endNode = endNode.getParent();
1440
-
1441
- this.endContainer = endNode;
1442
- this.endOffset = endOffset;
1443
-
1444
- if ( !this.startContainer )
1445
- {
1446
- this.startContainer = endNode;
1447
- this.startOffset = endOffset;
1448
- }
1449
-
1450
- updateCollapsed( this );
1451
- },
1452
-
1453
- setStartAfter : function( node )
1454
- {
1455
- this.setStart( node.getParent(), node.getIndex() + 1 );
1456
- },
1457
-
1458
- setStartBefore : function( node )
1459
- {
1460
- this.setStart( node.getParent(), node.getIndex() );
1461
- },
1462
-
1463
- setEndAfter : function( node )
1464
- {
1465
- this.setEnd( node.getParent(), node.getIndex() + 1 );
1466
- },
1467
-
1468
- setEndBefore : function( node )
1469
- {
1470
- this.setEnd( node.getParent(), node.getIndex() );
1471
- },
1472
-
1473
- setStartAt : function( node, position )
1474
- {
1475
- switch( position )
1476
- {
1477
- case CKEDITOR.POSITION_AFTER_START :
1478
- this.setStart( node, 0 );
1479
- break;
1480
-
1481
- case CKEDITOR.POSITION_BEFORE_END :
1482
- if ( node.type == CKEDITOR.NODE_TEXT )
1483
- this.setStart( node, node.getLength() );
1484
- else
1485
- this.setStart( node, node.getChildCount() );
1486
- break;
1487
-
1488
- case CKEDITOR.POSITION_BEFORE_START :
1489
- this.setStartBefore( node );
1490
- break;
1491
-
1492
- case CKEDITOR.POSITION_AFTER_END :
1493
- this.setStartAfter( node );
1494
- }
1495
-
1496
- updateCollapsed( this );
1497
- },
1498
-
1499
- setEndAt : function( node, position )
1500
- {
1501
- switch( position )
1502
- {
1503
- case CKEDITOR.POSITION_AFTER_START :
1504
- this.setEnd( node, 0 );
1505
- break;
1506
-
1507
- case CKEDITOR.POSITION_BEFORE_END :
1508
- if ( node.type == CKEDITOR.NODE_TEXT )
1509
- this.setEnd( node, node.getLength() );
1510
- else
1511
- this.setEnd( node, node.getChildCount() );
1512
- break;
1513
-
1514
- case CKEDITOR.POSITION_BEFORE_START :
1515
- this.setEndBefore( node );
1516
- break;
1517
-
1518
- case CKEDITOR.POSITION_AFTER_END :
1519
- this.setEndAfter( node );
1520
- }
1521
-
1522
- updateCollapsed( this );
1523
- },
1524
-
1525
- fixBlock : function( isStart, blockTag )
1526
- {
1527
- var bookmark = this.createBookmark(),
1528
- fixedBlock = this.document.createElement( blockTag );
1529
-
1530
- this.collapse( isStart );
1531
-
1532
- this.enlarge( CKEDITOR.ENLARGE_BLOCK_CONTENTS );
1533
-
1534
- this.extractContents().appendTo( fixedBlock );
1535
- fixedBlock.trim();
1536
-
1537
- if ( !CKEDITOR.env.ie )
1538
- fixedBlock.appendBogus();
1539
-
1540
- this.insertNode( fixedBlock );
1541
-
1542
- this.moveToBookmark( bookmark );
1543
-
1544
- return fixedBlock;
1545
- },
1546
-
1547
- splitBlock : function( blockTag )
1548
- {
1549
- var startPath = new CKEDITOR.dom.elementPath( this.startContainer ),
1550
- endPath = new CKEDITOR.dom.elementPath( this.endContainer );
1551
-
1552
- var startBlockLimit = startPath.blockLimit,
1553
- endBlockLimit = endPath.blockLimit;
1554
-
1555
- var startBlock = startPath.block,
1556
- endBlock = endPath.block;
1557
-
1558
- var elementPath = null;
1559
- // Do nothing if the boundaries are in different block limits.
1560
- if ( !startBlockLimit.equals( endBlockLimit ) )
1561
- return null;
1562
-
1563
- // Get or fix current blocks.
1564
- if ( blockTag != 'br' )
1565
- {
1566
- if ( !startBlock )
1567
- {
1568
- startBlock = this.fixBlock( true, blockTag );
1569
- endBlock = new CKEDITOR.dom.elementPath( this.endContainer ).block;
1570
- }
1571
-
1572
- if ( !endBlock )
1573
- endBlock = this.fixBlock( false, blockTag );
1574
- }
1575
-
1576
- // Get the range position.
1577
- var isStartOfBlock = startBlock && this.checkStartOfBlock(),
1578
- isEndOfBlock = endBlock && this.checkEndOfBlock();
1579
-
1580
- // Delete the current contents.
1581
- // TODO: Why is 2.x doing CheckIsEmpty()?
1582
- this.deleteContents();
1583
-
1584
- if ( startBlock && startBlock.equals( endBlock ) )
1585
- {
1586
- if ( isEndOfBlock )
1587
- {
1588
- elementPath = new CKEDITOR.dom.elementPath( this.startContainer );
1589
- this.moveToPosition( endBlock, CKEDITOR.POSITION_AFTER_END );
1590
- endBlock = null;
1591
- }
1592
- else if ( isStartOfBlock )
1593
- {
1594
- elementPath = new CKEDITOR.dom.elementPath( this.startContainer );
1595
- this.moveToPosition( startBlock, CKEDITOR.POSITION_BEFORE_START );
1596
- startBlock = null;
1597
- }
1598
- else
1599
- {
1600
- endBlock = this.splitElement( startBlock );
1601
-
1602
- // In Gecko, the last child node must be a bogus <br>.
1603
- // Note: bogus <br> added under <ul> or <ol> would cause
1604
- // lists to be incorrectly rendered.
1605
- if ( !CKEDITOR.env.ie && !startBlock.is( 'ul', 'ol') )
1606
- startBlock.appendBogus() ;
1607
- }
1608
- }
1609
-
1610
- return {
1611
- previousBlock : startBlock,
1612
- nextBlock : endBlock,
1613
- wasStartOfBlock : isStartOfBlock,
1614
- wasEndOfBlock : isEndOfBlock,
1615
- elementPath : elementPath
1616
- };
1617
- },
1618
-
1619
- /**
1620
- * Branch the specified element from the collapsed range position and
1621
- * place the caret between the two result branches.
1622
- * Note: The range must be collapsed and been enclosed by this element.
1623
- * @param {CKEDITOR.dom.element} element
1624
- * @return {CKEDITOR.dom.element} Root element of the new branch after the split.
1625
- */
1626
- splitElement : function( toSplit )
1627
- {
1628
- if ( !this.collapsed )
1629
- return null;
1630
-
1631
- // Extract the contents of the block from the selection point to the end
1632
- // of its contents.
1633
- this.setEndAt( toSplit, CKEDITOR.POSITION_BEFORE_END );
1634
- var documentFragment = this.extractContents();
1635
-
1636
- // Duplicate the element after it.
1637
- var clone = toSplit.clone( false );
1638
-
1639
- // Place the extracted contents into the duplicated element.
1640
- documentFragment.appendTo( clone );
1641
- clone.insertAfter( toSplit );
1642
- this.moveToPosition( toSplit, CKEDITOR.POSITION_AFTER_END );
1643
- return clone;
1644
- },
1645
-
1646
- /**
1647
- * Check whether a range boundary is at the inner boundary of a given
1648
- * element.
1649
- * @param {CKEDITOR.dom.element} element The target element to check.
1650
- * @param {Number} checkType The boundary to check for both the range
1651
- * and the element. It can be CKEDITOR.START or CKEDITOR.END.
1652
- * @returns {Boolean} "true" if the range boundary is at the inner
1653
- * boundary of the element.
1654
- */
1655
- checkBoundaryOfElement : function( element, checkType )
1656
- {
1657
- var checkStart = ( checkType == CKEDITOR.START );
1658
-
1659
- // Create a copy of this range, so we can manipulate it for our checks.
1660
- var walkerRange = this.clone();
1661
-
1662
- // Collapse the range at the proper size.
1663
- walkerRange.collapse( checkStart );
1664
-
1665
- // Expand the range to element boundary.
1666
- walkerRange[ checkStart ? 'setStartAt' : 'setEndAt' ]
1667
- ( element, checkStart ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_BEFORE_END );
1668
-
1669
- // Create the walker, which will check if we have anything useful
1670
- // in the range.
1671
- var walker = new CKEDITOR.dom.walker( walkerRange );
1672
- walker.evaluator = elementBoundaryEval;
1673
-
1674
- return walker[ checkStart ? 'checkBackward' : 'checkForward' ]();
1675
- },
1676
-
1677
- // Calls to this function may produce changes to the DOM. The range may
1678
- // be updated to reflect such changes.
1679
- checkStartOfBlock : function()
1680
- {
1681
- var startContainer = this.startContainer,
1682
- startOffset = this.startOffset;
1683
-
1684
- // If the starting node is a text node, and non-empty before the offset,
1685
- // then we're surely not at the start of block.
1686
- if ( startOffset && startContainer.type == CKEDITOR.NODE_TEXT )
1687
- {
1688
- var textBefore = CKEDITOR.tools.ltrim( startContainer.substring( 0, startOffset ) );
1689
- if ( textBefore.length )
1690
- return false;
1691
- }
1692
-
1693
- // Antecipate the trim() call here, so the walker will not make
1694
- // changes to the DOM, which would not get reflected into this
1695
- // range otherwise.
1696
- this.trim();
1697
-
1698
- // We need to grab the block element holding the start boundary, so
1699
- // let's use an element path for it.
1700
- var path = new CKEDITOR.dom.elementPath( this.startContainer );
1701
-
1702
- // Creates a range starting at the block start until the range start.
1703
- var walkerRange = this.clone();
1704
- walkerRange.collapse( true );
1705
- walkerRange.setStartAt( path.block || path.blockLimit, CKEDITOR.POSITION_AFTER_START );
1706
-
1707
- var walker = new CKEDITOR.dom.walker( walkerRange );
1708
- walker.evaluator = getCheckStartEndBlockEvalFunction( true );
1709
-
1710
- return walker.checkBackward();
1711
- },
1712
-
1713
- checkEndOfBlock : function()
1714
- {
1715
- var endContainer = this.endContainer,
1716
- endOffset = this.endOffset;
1717
-
1718
- // If the ending node is a text node, and non-empty after the offset,
1719
- // then we're surely not at the end of block.
1720
- if ( endContainer.type == CKEDITOR.NODE_TEXT )
1721
- {
1722
- var textAfter = CKEDITOR.tools.rtrim( endContainer.substring( endOffset ) );
1723
- if ( textAfter.length )
1724
- return false;
1725
- }
1726
-
1727
- // Antecipate the trim() call here, so the walker will not make
1728
- // changes to the DOM, which would not get reflected into this
1729
- // range otherwise.
1730
- this.trim();
1731
-
1732
- // We need to grab the block element holding the start boundary, so
1733
- // let's use an element path for it.
1734
- var path = new CKEDITOR.dom.elementPath( this.endContainer );
1735
-
1736
- // Creates a range starting at the block start until the range start.
1737
- var walkerRange = this.clone();
1738
- walkerRange.collapse( false );
1739
- walkerRange.setEndAt( path.block || path.blockLimit, CKEDITOR.POSITION_BEFORE_END );
1740
-
1741
- var walker = new CKEDITOR.dom.walker( walkerRange );
1742
- walker.evaluator = getCheckStartEndBlockEvalFunction( false );
1743
-
1744
- return walker.checkForward();
1745
- },
1746
-
1747
- /**
1748
- * Moves the range boundaries to the first/end editing point inside an
1749
- * element. For example, in an element tree like
1750
- * "&lt;p&gt;&lt;b&gt;&lt;i&gt;&lt;/i&gt;&lt;/b&gt; Text&lt;/p&gt;", the start editing point is
1751
- * "&lt;p&gt;&lt;b&gt;&lt;i&gt;^&lt;/i&gt;&lt;/b&gt; Text&lt;/p&gt;" (inside &lt;i&gt;).
1752
- * @param {CKEDITOR.dom.element} el The element into which look for the
1753
- * editing spot.
1754
- * @param {Boolean} isMoveToEnd Whether move to the end editable position.
1755
- */
1756
- moveToElementEditablePosition : function( el, isMoveToEnd )
1757
- {
1758
- var isEditable;
1759
-
1760
- // Empty elements are rejected.
1761
- if ( CKEDITOR.dtd.$empty[ el.getName() ] )
1762
- return false;
1763
-
1764
- while ( el && el.type == CKEDITOR.NODE_ELEMENT )
1765
- {
1766
- isEditable = el.isEditable();
1767
-
1768
- // If an editable element is found, move inside it.
1769
- if ( isEditable )
1770
- this.moveToPosition( el, isMoveToEnd ?
1771
- CKEDITOR.POSITION_BEFORE_END :
1772
- CKEDITOR.POSITION_AFTER_START );
1773
- // Stop immediately if we've found a non editable inline element (e.g <img>).
1774
- else if ( CKEDITOR.dtd.$inline[ el.getName() ] )
1775
- {
1776
- this.moveToPosition( el, isMoveToEnd ?
1777
- CKEDITOR.POSITION_AFTER_END :
1778
- CKEDITOR.POSITION_BEFORE_START );
1779
- return true;
1780
- }
1781
-
1782
- // Non-editable non-inline elements are to be bypassed, getting the next one.
1783
- if ( CKEDITOR.dtd.$empty[ el.getName() ] )
1784
- el = el[ isMoveToEnd ? 'getPrevious' : 'getNext' ]( nonWhitespaceOrBookmarkEval );
1785
- else
1786
- el = el[ isMoveToEnd ? 'getLast' : 'getFirst' ]( nonWhitespaceOrBookmarkEval );
1787
-
1788
- // Stop immediately if we've found a text node.
1789
- if ( el && el.type == CKEDITOR.NODE_TEXT )
1790
- {
1791
- this.moveToPosition( el, isMoveToEnd ?
1792
- CKEDITOR.POSITION_AFTER_END :
1793
- CKEDITOR.POSITION_BEFORE_START );
1794
- return true;
1795
- }
1796
- }
1797
-
1798
- return isEditable;
1799
- },
1800
-
1801
- /**
1802
- *@see {CKEDITOR.dom.range.moveToElementEditablePosition}
1803
- */
1804
- moveToElementEditStart : function( target )
1805
- {
1806
- return this.moveToElementEditablePosition( target );
1807
- },
1808
-
1809
- /**
1810
- *@see {CKEDITOR.dom.range.moveToElementEditablePosition}
1811
- */
1812
- moveToElementEditEnd : function( target )
1813
- {
1814
- return this.moveToElementEditablePosition( target, true );
1815
- },
1816
-
1817
- /**
1818
- * Get the single node enclosed within the range if there's one.
1819
- */
1820
- getEnclosedNode : function()
1821
- {
1822
- var walkerRange = this.clone();
1823
-
1824
- // Optimize and analyze the range to avoid DOM destructive nature of walker. (#5780)
1825
- walkerRange.optimize();
1826
- if ( walkerRange.startContainer.type != CKEDITOR.NODE_ELEMENT
1827
- || walkerRange.endContainer.type != CKEDITOR.NODE_ELEMENT )
1828
- return null;
1829
-
1830
- var walker = new CKEDITOR.dom.walker( walkerRange ),
1831
- isNotBookmarks = CKEDITOR.dom.walker.bookmark( true ),
1832
- isNotWhitespaces = CKEDITOR.dom.walker.whitespaces( true ),
1833
- evaluator = function( node )
1834
- {
1835
- return isNotWhitespaces( node ) && isNotBookmarks( node );
1836
- };
1837
- walkerRange.evaluator = evaluator;
1838
- var node = walker.next();
1839
- walker.reset();
1840
- return node && node.equals( walker.previous() ) ? node : null;
1841
- },
1842
-
1843
- getTouchedStartNode : function()
1844
- {
1845
- var container = this.startContainer ;
1846
-
1847
- if ( this.collapsed || container.type != CKEDITOR.NODE_ELEMENT )
1848
- return container ;
1849
-
1850
- return container.getChild( this.startOffset ) || container ;
1851
- },
1852
-
1853
- getTouchedEndNode : function()
1854
- {
1855
- var container = this.endContainer ;
1856
-
1857
- if ( this.collapsed || container.type != CKEDITOR.NODE_ELEMENT )
1858
- return container ;
1859
-
1860
- return container.getChild( this.endOffset - 1 ) || container ;
1861
- }
1862
- };
1863
- })();
1864
-
1865
- CKEDITOR.POSITION_AFTER_START = 1; // <element>^contents</element> "^text"
1866
- CKEDITOR.POSITION_BEFORE_END = 2; // <element>contents^</element> "text^"
1867
- CKEDITOR.POSITION_BEFORE_START = 3; // ^<element>contents</element> ^"text"
1868
- CKEDITOR.POSITION_AFTER_END = 4; // <element>contents</element>^ "text"
1869
-
1870
- CKEDITOR.ENLARGE_ELEMENT = 1;
1871
- CKEDITOR.ENLARGE_BLOCK_CONTENTS = 2;
1872
- CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS = 3;
1873
-
1874
- // Check boundary types.
1875
- // @see CKEDITOR.dom.range.prototype.checkBoundaryOfElement
1876
- CKEDITOR.START = 1;
1877
- CKEDITOR.END = 2;
1878
- CKEDITOR.STARTEND = 3;
1879
-
1880
- // Shrink range types.
1881
- // @see CKEDITOR.dom.range.prototype.shrink
1882
- CKEDITOR.SHRINK_ELEMENT = 1;
1883
- CKEDITOR.SHRINK_TEXT = 2;