typo 5.0.3.98.1 → 5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (453) hide show
  1. data/CHANGES-5.1 +54 -0
  2. data/app/apis/meta_weblog_service.rb +7 -6
  3. data/app/controllers/accounts_controller.rb +2 -1
  4. data/app/controllers/admin/content_controller.rb +45 -3
  5. data/app/controllers/admin/pages_controller.rb +1 -1
  6. data/app/controllers/admin/textfilters_controller.rb +4 -4
  7. data/app/controllers/admin/users_controller.rb +14 -2
  8. data/app/controllers/application.rb +4 -1
  9. data/app/controllers/articles_controller.rb +1 -3
  10. data/app/controllers/backend_controller.rb +2 -0
  11. data/app/controllers/comments_controller.rb +6 -0
  12. data/app/helpers/admin/base_helper.rb +24 -26
  13. data/app/helpers/admin/feedback_helper.rb +0 -20
  14. data/app/helpers/application_helper.rb +1 -0
  15. data/app/models/article.rb +2 -0
  16. data/app/models/blog.rb +1 -0
  17. data/app/models/blog_sweeper.rb +8 -9
  18. data/app/models/page_cache.rb +1 -0
  19. data/app/models/tag.rb +2 -2
  20. data/app/models/user.rb +5 -1
  21. data/app/views/admin/blacklist/destroy.html.erb +1 -1
  22. data/app/views/admin/categories/destroy.html.erb +1 -1
  23. data/app/views/admin/comments/destroy.html.erb +1 -1
  24. data/app/views/admin/content/_articles.html.erb +4 -4
  25. data/app/views/admin/content/_attachment.html.erb +6 -7
  26. data/app/views/admin/content/_drafts.html.erb +6 -0
  27. data/app/views/admin/content/_form.html.erb +47 -34
  28. data/app/views/admin/content/destroy.html.erb +1 -1
  29. data/app/views/admin/content/edit.html.erb +1 -1
  30. data/app/views/admin/content/index.html.erb +1 -6
  31. data/app/views/admin/content/new.html.erb +1 -1
  32. data/app/views/admin/pages/_form.html.erb +4 -3
  33. data/app/views/admin/pages/_pages.html.erb +3 -3
  34. data/app/views/admin/pages/destroy.html.erb +1 -1
  35. data/app/views/admin/resources/destroy.html.erb +1 -1
  36. data/app/views/admin/settings/index.html.erb +10 -0
  37. data/app/views/admin/shared/_edit.html.erb +1 -6
  38. data/app/views/admin/textfilters/destroy.html.erb +3 -0
  39. data/app/views/admin/textfilters/edit.html.erb +3 -1
  40. data/app/views/admin/textfilters/index.html.erb +1 -1
  41. data/app/views/admin/textfilters/new.html.erb +3 -1
  42. data/app/views/admin/trackbacks/show.html.erb +1 -1
  43. data/app/views/admin/users/destroy.html.erb +1 -1
  44. data/app/views/admin/users/edit.html.erb +1 -5
  45. data/app/views/admin/users/index.html.erb +1 -1
  46. data/app/views/articles/_comment_failed.html.erb +3 -0
  47. data/config/initializers/access_rules.rb +3 -3
  48. data/db/migrate/070_add_users_to_non_admins.rb +17 -0
  49. data/installer/rails_installer_defaults.yml +1 -1
  50. data/lib/tasks/release.rake +3 -3
  51. data/lib/typo_version.rb +1 -1
  52. data/public/images/admin/cancel.png +0 -0
  53. data/public/images/admin/checked.png +0 -0
  54. data/public/images/admin/delete.png +0 -0
  55. data/public/images/admin/edit.png +0 -0
  56. data/public/images/admin/show.png +0 -0
  57. data/public/javascripts/controls.js +2 -0
  58. data/public/javascripts/dragdrop.js +2 -0
  59. data/public/javascripts/effects.js +6 -4
  60. data/public/javascripts/fckeditor/editor/_source/classes/fckcontextmenu.js +13 -8
  61. data/public/javascripts/fckeditor/editor/_source/classes/fckdataprocessor.js +2 -2
  62. data/public/javascripts/fckeditor/editor/_source/classes/fckdocumentfragment_gecko.js +2 -2
  63. data/public/javascripts/fckeditor/editor/_source/classes/fckdocumentfragment_ie.js +2 -2
  64. data/public/javascripts/fckeditor/editor/_source/classes/fckdomrange.js +189 -79
  65. data/public/javascripts/fckeditor/editor/_source/classes/fckdomrange_gecko.js +4 -3
  66. data/public/javascripts/fckeditor/editor/_source/classes/fckdomrange_ie.js +16 -15
  67. data/public/javascripts/fckeditor/editor/_source/classes/fckdomrangeiterator.js +30 -9
  68. data/public/javascripts/fckeditor/editor/_source/classes/fckeditingarea.js +108 -90
  69. data/public/javascripts/fckeditor/editor/_source/classes/fckelementpath.js +22 -3
  70. data/public/javascripts/fckeditor/editor/_source/classes/fckenterkey.js +76 -38
  71. data/public/javascripts/fckeditor/editor/_source/classes/fckevents.js +7 -2
  72. data/public/javascripts/fckeditor/editor/_source/classes/fckhtmliterator.js +142 -0
  73. data/public/javascripts/fckeditor/editor/_source/classes/fckicon.js +2 -2
  74. data/public/javascripts/fckeditor/editor/_source/classes/fckiecleanup.js +1 -1
  75. data/public/javascripts/fckeditor/editor/_source/classes/fckimagepreloader.js +2 -2
  76. data/public/javascripts/fckeditor/editor/_source/classes/fckkeystrokehandler.js +3 -3
  77. data/public/javascripts/fckeditor/editor/_source/classes/fckmenublock.js +8 -5
  78. data/public/javascripts/fckeditor/editor/_source/classes/fckmenublockpanel.js +3 -3
  79. data/public/javascripts/fckeditor/editor/_source/classes/fckmenuitem.js +6 -5
  80. data/public/javascripts/fckeditor/editor/_source/classes/fckpanel.js +85 -38
  81. data/public/javascripts/fckeditor/editor/_source/classes/fckplugin.js +2 -2
  82. data/public/javascripts/fckeditor/editor/_source/classes/fckspecialcombo.js +7 -8
  83. data/public/javascripts/fckeditor/editor/_source/classes/fckstyle.js +180 -17
  84. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbar.js +2 -2
  85. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbreak_gecko.js +2 -2
  86. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbreak_ie.js +1 -1
  87. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbutton.js +9 -4
  88. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbuttonui.js +5 -1
  89. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarfontformatcombo.js +3 -3
  90. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarfontscombo.js +1 -1
  91. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarfontsizecombo.js +1 -1
  92. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarpanelbutton.js +15 -4
  93. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarspecialcombo.js +5 -2
  94. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarstylecombo.js +13 -13
  95. data/public/javascripts/fckeditor/editor/_source/classes/fckw3crange.js +17 -13
  96. data/public/javascripts/fckeditor/editor/_source/classes/fckxml.js +2 -2
  97. data/public/javascripts/fckeditor/editor/_source/classes/fckxml_gecko.js +28 -13
  98. data/public/javascripts/fckeditor/editor/_source/classes/fckxml_ie.js +2 -2
  99. data/public/javascripts/fckeditor/editor/_source/commandclasses/fck_othercommands.js +75 -19
  100. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckblockquotecommand.js +64 -8
  101. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckcorestylecommand.js +3 -1
  102. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckfitwindow.js +2 -2
  103. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckindentcommands.js +5 -3
  104. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckjustifycommands.js +6 -6
  105. data/public/javascripts/fckeditor/editor/_source/commandclasses/fcklistcommands.js +4 -4
  106. data/public/javascripts/fckeditor/editor/_source/commandclasses/fcknamedcommand.js +3 -1
  107. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckpasteplaintextcommand.js +3 -1
  108. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckpastewordcommand.js +2 -2
  109. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckremoveformatcommand.js +2 -2
  110. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckshowblocks.js +7 -9
  111. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckspellcheckcommand_gecko.js +4 -2
  112. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckspellcheckcommand_ie.js +4 -2
  113. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckstylecommand.js +3 -3
  114. data/public/javascripts/fckeditor/editor/_source/commandclasses/fcktablecommand.js +4 -4
  115. data/public/javascripts/fckeditor/editor/_source/commandclasses/fcktextcolorcommand.js +28 -10
  116. data/public/javascripts/fckeditor/editor/_source/fckconstants.js +1 -1
  117. data/public/javascripts/fckeditor/editor/_source/fckeditorapi.js +21 -13
  118. data/public/javascripts/fckeditor/editor/_source/fckjscoreextensions.js +5 -5
  119. data/public/javascripts/fckeditor/editor/_source/fckscriptloader.js +4 -4
  120. data/public/javascripts/fckeditor/editor/_source/internals/fck.js +148 -38
  121. data/public/javascripts/fckeditor/editor/_source/internals/fck_contextmenu.js +4 -4
  122. data/public/javascripts/fckeditor/editor/_source/internals/fck_gecko.js +45 -47
  123. data/public/javascripts/fckeditor/editor/_source/internals/fck_ie.js +50 -17
  124. data/public/javascripts/fckeditor/editor/_source/internals/fckbrowserinfo.js +4 -2
  125. data/public/javascripts/fckeditor/editor/_source/internals/fckcodeformatter.js +2 -2
  126. data/public/javascripts/fckeditor/editor/_source/internals/fckcommands.js +28 -28
  127. data/public/javascripts/fckeditor/editor/_source/internals/fckconfig.js +12 -13
  128. data/public/javascripts/fckeditor/editor/_source/internals/fckdebug.js +2 -2
  129. data/public/javascripts/fckeditor/editor/_source/internals/fckdialog.js +211 -15
  130. data/public/javascripts/fckeditor/editor/_source/internals/fckdocumentprocessor.js +63 -39
  131. data/public/javascripts/fckeditor/editor/_source/internals/fckdomtools.js +177 -37
  132. data/public/javascripts/fckeditor/editor/_source/internals/fcklanguagemanager.js +2 -1
  133. data/public/javascripts/fckeditor/editor/_source/internals/fcklisthandler.js +2 -2
  134. data/public/javascripts/fckeditor/editor/_source/internals/fcklistslib.js +5 -2
  135. data/public/javascripts/fckeditor/editor/_source/internals/fckplugins.js +2 -2
  136. data/public/javascripts/fckeditor/editor/_source/internals/fckregexlib.js +5 -2
  137. data/public/javascripts/fckeditor/editor/_source/internals/fckselection.js +3 -3
  138. data/public/javascripts/fckeditor/editor/_source/internals/fckselection_gecko.js +36 -27
  139. data/public/javascripts/fckeditor/editor/_source/internals/fckselection_ie.js +91 -17
  140. data/public/javascripts/fckeditor/editor/_source/internals/fckstyles.js +22 -13
  141. data/public/javascripts/fckeditor/editor/_source/internals/fcktablehandler.js +15 -15
  142. data/public/javascripts/fckeditor/editor/_source/internals/fcktablehandler_gecko.js +2 -2
  143. data/public/javascripts/fckeditor/editor/_source/internals/fcktablehandler_ie.js +2 -2
  144. data/public/javascripts/fckeditor/editor/_source/internals/fcktoolbaritems.js +1 -1
  145. data/public/javascripts/fckeditor/editor/_source/internals/fcktoolbarset.js +32 -6
  146. data/public/javascripts/fckeditor/editor/_source/internals/fcktools.js +181 -22
  147. data/public/javascripts/fckeditor/editor/_source/internals/fcktools_gecko.js +19 -7
  148. data/public/javascripts/fckeditor/editor/_source/internals/fcktools_ie.js +8 -2
  149. data/public/javascripts/fckeditor/editor/_source/internals/fckundo.js +8 -5
  150. data/public/javascripts/fckeditor/editor/_source/internals/fckurlparams.js +2 -2
  151. data/public/javascripts/fckeditor/editor/_source/internals/fckxhtml.js +116 -61
  152. data/public/javascripts/fckeditor/editor/_source/internals/fckxhtml_gecko.js +6 -10
  153. data/public/javascripts/fckeditor/editor/_source/internals/fckxhtml_ie.js +51 -56
  154. data/public/javascripts/fckeditor/editor/_source/internals/fckxhtmlentities.js +1 -1
  155. data/public/javascripts/fckeditor/editor/css/fck_editorarea.css +3 -2
  156. data/public/javascripts/fckeditor/editor/css/fck_internal.css +19 -2
  157. data/public/javascripts/fckeditor/editor/css/fck_showtableborders_gecko.css +8 -1
  158. data/public/javascripts/fckeditor/editor/css/images/fck_plugin.gif +0 -0
  159. data/public/javascripts/fckeditor/editor/dialog/common/fck_dialog_common.css +8 -1
  160. data/public/javascripts/fckeditor/editor/dialog/common/fck_dialog_common.js +199 -26
  161. data/public/javascripts/fckeditor/editor/dialog/fck_about.html +20 -14
  162. data/public/javascripts/fckeditor/editor/dialog/fck_about/sponsors/spellchecker_net.gif +0 -0
  163. data/public/javascripts/fckeditor/editor/dialog/fck_anchor.html +15 -10
  164. data/public/javascripts/fckeditor/editor/dialog/fck_button.html +9 -14
  165. data/public/javascripts/fckeditor/editor/dialog/fck_checkbox.html +8 -13
  166. data/public/javascripts/fckeditor/editor/dialog/fck_colorselector.html +4 -3
  167. data/public/javascripts/fckeditor/editor/dialog/fck_docprops.html +6 -6
  168. data/public/javascripts/fckeditor/editor/dialog/fck_docprops/fck_document_preview.html +1 -1
  169. data/public/javascripts/fckeditor/editor/dialog/fck_flash.html +9 -3
  170. data/public/javascripts/fckeditor/editor/dialog/fck_flash/fck_flash.js +18 -11
  171. data/public/javascripts/fckeditor/editor/dialog/fck_flash/fck_flash_preview.html +7 -3
  172. data/public/javascripts/fckeditor/editor/dialog/fck_form.html +7 -4
  173. data/public/javascripts/fckeditor/editor/dialog/fck_hiddenfield.html +12 -15
  174. data/public/javascripts/fckeditor/editor/dialog/fck_image.html +9 -3
  175. data/public/javascripts/fckeditor/editor/dialog/fck_image/fck_image.js +24 -12
  176. data/public/javascripts/fckeditor/editor/dialog/fck_image/fck_image_preview.html +24 -18
  177. data/public/javascripts/fckeditor/editor/dialog/fck_link.html +1 -1
  178. data/public/javascripts/fckeditor/editor/dialog/fck_link/fck_link.js +41 -20
  179. data/public/javascripts/fckeditor/editor/dialog/fck_listprop.html +8 -4
  180. data/public/javascripts/fckeditor/editor/dialog/fck_paste.html +53 -54
  181. data/public/javascripts/fckeditor/editor/dialog/fck_radiobutton.html +8 -13
  182. data/public/javascripts/fckeditor/editor/dialog/fck_replace.html +157 -79
  183. data/public/javascripts/fckeditor/editor/dialog/fck_select.html +14 -11
  184. data/public/javascripts/fckeditor/editor/dialog/fck_select/fck_select.js +2 -2
  185. data/public/javascripts/fckeditor/editor/dialog/fck_smiley.html +9 -4
  186. data/public/javascripts/fckeditor/editor/dialog/fck_source.html +5 -2
  187. data/public/javascripts/fckeditor/editor/dialog/fck_specialchar.html +9 -6
  188. data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages.html +2 -1
  189. data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.cfm +3 -1
  190. data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php +5 -2
  191. data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.pl +2 -1
  192. data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellChecker.js +0 -1
  193. data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellerStyle.css +1 -1
  194. data/public/javascripts/fckeditor/editor/dialog/fck_table.html +10 -5
  195. data/public/javascripts/fckeditor/editor/dialog/fck_tablecell.html +8 -6
  196. data/public/javascripts/fckeditor/editor/dialog/fck_template.html +1 -1
  197. data/public/javascripts/fckeditor/editor/dialog/fck_textarea.html +10 -11
  198. data/public/javascripts/fckeditor/editor/dialog/fck_textfield.html +10 -14
  199. data/public/javascripts/fckeditor/editor/dtd/fck_dtd_test.html +0 -2
  200. data/public/javascripts/fckeditor/editor/dtd/fck_xhtml10strict.js +2 -2
  201. data/public/javascripts/fckeditor/editor/dtd/fck_xhtml10transitional.js +3 -3
  202. data/public/javascripts/fckeditor/editor/fckdebug.html +1 -1
  203. data/public/javascripts/fckeditor/editor/fckdialog.html +660 -213
  204. data/public/javascripts/fckeditor/editor/fckeditor.html +66 -16
  205. data/public/javascripts/fckeditor/editor/fckeditor.original.html +70 -16
  206. data/public/javascripts/fckeditor/editor/filemanager/browser/default/browser.css +2 -2
  207. data/public/javascripts/fckeditor/editor/filemanager/browser/default/browser.html +37 -2
  208. data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmactualfolder.html +33 -1
  209. data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmcreatefolder.html +1 -1
  210. data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmfolders.html +2 -1
  211. data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmresourceslist.html +3 -2
  212. data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmresourcetype.html +1 -1
  213. data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmupload.html +2 -1
  214. data/public/javascripts/fckeditor/editor/filemanager/browser/default/js/common.js +34 -2
  215. data/public/javascripts/fckeditor/editor/filemanager/browser/default/js/fckxml.js +3 -3
  216. data/public/javascripts/fckeditor/editor/filemanager/connectors/aspx/connector.aspx +5 -3
  217. data/public/javascripts/fckeditor/editor/filemanager/connectors/aspx/upload.aspx +5 -3
  218. data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/basexml.pl +1 -1
  219. data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/commands.pl +50 -4
  220. data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/connector.cgi +2 -3
  221. data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/io.pl +14 -4
  222. data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/upload.cgi +2 -3
  223. data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/upload_fck.pl +23 -4
  224. data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/util.pl +1 -1
  225. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/config.py +43 -32
  226. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/connector.py +16 -16
  227. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckcommands.py +26 -9
  228. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckconnector.py +2 -2
  229. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckoutput.py +40 -9
  230. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckutil.py +20 -21
  231. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/htaccess.txt +2 -2
  232. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/upload.py +13 -13
  233. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/wsgi.py +3 -3
  234. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/zope.py +4 -5
  235. data/public/javascripts/fckeditor/editor/filemanager/connectors/test.html +34 -1
  236. data/public/javascripts/fckeditor/editor/filemanager/connectors/uploadtest.html +47 -4
  237. data/public/javascripts/fckeditor/editor/js/fckadobeair.js +176 -0
  238. data/public/javascripts/fckeditor/editor/js/fckeditorcode_gecko.js +77 -77
  239. data/public/javascripts/fckeditor/editor/js/fckeditorcode_ie.js +74 -74
  240. data/public/javascripts/fckeditor/editor/lang/_translationstatus.txt +55 -54
  241. data/public/javascripts/fckeditor/editor/lang/af.js +1 -2
  242. data/public/javascripts/fckeditor/editor/lang/ar.js +16 -17
  243. data/public/javascripts/fckeditor/editor/lang/bg.js +1 -2
  244. data/public/javascripts/fckeditor/editor/lang/bn.js +1 -2
  245. data/public/javascripts/fckeditor/editor/lang/bs.js +1 -2
  246. data/public/javascripts/fckeditor/editor/lang/ca.js +27 -28
  247. data/public/javascripts/fckeditor/editor/lang/cs.js +18 -19
  248. data/public/javascripts/fckeditor/editor/lang/da.js +1 -2
  249. data/public/javascripts/fckeditor/editor/lang/de.js +1 -2
  250. data/public/javascripts/fckeditor/editor/lang/el.js +1 -2
  251. data/public/javascripts/fckeditor/editor/lang/en-au.js +1 -2
  252. data/public/javascripts/fckeditor/editor/lang/en-ca.js +1 -2
  253. data/public/javascripts/fckeditor/editor/lang/en-uk.js +1 -2
  254. data/public/javascripts/fckeditor/editor/lang/en.js +1 -2
  255. data/public/javascripts/fckeditor/editor/lang/eo.js +1 -2
  256. data/public/javascripts/fckeditor/editor/lang/es.js +34 -35
  257. data/public/javascripts/fckeditor/editor/lang/et.js +32 -33
  258. data/public/javascripts/fckeditor/editor/lang/eu.js +32 -33
  259. data/public/javascripts/fckeditor/editor/lang/fa.js +1 -2
  260. data/public/javascripts/fckeditor/editor/lang/fi.js +15 -16
  261. data/public/javascripts/fckeditor/editor/lang/fo.js +1 -2
  262. data/public/javascripts/fckeditor/editor/lang/fr-ca.js +515 -0
  263. data/public/javascripts/fckeditor/editor/lang/fr.js +5 -6
  264. data/public/javascripts/fckeditor/editor/lang/gl.js +1 -2
  265. data/public/javascripts/fckeditor/editor/lang/he.js +15 -16
  266. data/public/javascripts/fckeditor/editor/lang/hi.js +1 -2
  267. data/public/javascripts/fckeditor/editor/lang/hr.js +1 -2
  268. data/public/javascripts/fckeditor/editor/lang/hu.js +1 -2
  269. data/public/javascripts/fckeditor/editor/lang/it.js +1 -2
  270. data/public/javascripts/fckeditor/editor/lang/ja.js +1 -2
  271. data/public/javascripts/fckeditor/editor/lang/km.js +1 -2
  272. data/public/javascripts/fckeditor/editor/lang/ko.js +25 -26
  273. data/public/javascripts/fckeditor/editor/lang/lt.js +1 -2
  274. data/public/javascripts/fckeditor/editor/lang/lv.js +1 -2
  275. data/public/javascripts/fckeditor/editor/lang/mn.js +199 -200
  276. data/public/javascripts/fckeditor/editor/lang/ms.js +1 -2
  277. data/public/javascripts/fckeditor/editor/lang/nb.js +1 -2
  278. data/public/javascripts/fckeditor/editor/lang/nl.js +1 -2
  279. data/public/javascripts/fckeditor/editor/lang/no.js +1 -2
  280. data/public/javascripts/fckeditor/editor/lang/pl.js +51 -52
  281. data/public/javascripts/fckeditor/editor/lang/pt-br.js +16 -17
  282. data/public/javascripts/fckeditor/editor/lang/pt.js +1 -2
  283. data/public/javascripts/fckeditor/editor/lang/ro.js +1 -2
  284. data/public/javascripts/fckeditor/editor/lang/ru.js +31 -32
  285. data/public/javascripts/fckeditor/editor/lang/sk.js +1 -2
  286. data/public/javascripts/fckeditor/editor/lang/sl.js +39 -40
  287. data/public/javascripts/fckeditor/editor/lang/sr-latn.js +1 -2
  288. data/public/javascripts/fckeditor/editor/lang/sr.js +1 -2
  289. data/public/javascripts/fckeditor/editor/lang/sv.js +1 -2
  290. data/public/javascripts/fckeditor/editor/lang/th.js +1 -2
  291. data/public/javascripts/fckeditor/editor/lang/tr.js +1 -2
  292. data/public/javascripts/fckeditor/editor/lang/uk.js +1 -2
  293. data/public/javascripts/fckeditor/editor/lang/vi.js +1 -2
  294. data/public/javascripts/fckeditor/editor/lang/zh-cn.js +2 -3
  295. data/public/javascripts/fckeditor/editor/lang/zh.js +1 -2
  296. data/public/javascripts/fckeditor/editor/plugins/autogrow/fckplugin.js +9 -2
  297. data/public/javascripts/fckeditor/editor/plugins/bbcode/_sample/sample.config.js +1 -1
  298. data/public/javascripts/fckeditor/editor/plugins/bbcode/_sample/sample.html +1 -1
  299. data/public/javascripts/fckeditor/editor/plugins/bbcode/fckplugin.js +2 -2
  300. data/public/javascripts/fckeditor/editor/plugins/dragresizetable/fckplugin.js +35 -11
  301. data/public/javascripts/fckeditor/editor/plugins/placeholder/fck_placeholder.html +10 -5
  302. data/public/javascripts/fckeditor/editor/plugins/placeholder/fckplugin.js +3 -3
  303. data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/de.js +2 -2
  304. data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/en.js +2 -2
  305. data/public/javascripts/fckeditor/editor/{filemanager/connectors/cfm/upload.cfm → plugins/placeholder/lang/es.js} +9 -13
  306. data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/fr.js +1 -1
  307. data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/it.js +1 -1
  308. data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/pl.js +2 -2
  309. data/public/javascripts/fckeditor/editor/plugins/simplecommands/fckplugin.js +1 -1
  310. data/public/javascripts/fckeditor/editor/plugins/tablecommands/fckplugin.js +1 -1
  311. data/public/javascripts/fckeditor/editor/skins/_fckviewstrips.html +1 -1
  312. data/public/javascripts/fckeditor/editor/skins/default/fck_dialog.css +271 -8
  313. data/public/javascripts/fckeditor/editor/skins/default/fck_editor.css +2 -2
  314. data/public/javascripts/fckeditor/editor/skins/office2003/fck_dialog.css +270 -8
  315. data/public/javascripts/fckeditor/editor/skins/office2003/fck_editor.css +2 -2
  316. data/public/javascripts/fckeditor/editor/skins/silver/fck_dialog.css +270 -11
  317. data/public/javascripts/fckeditor/editor/skins/silver/fck_editor.css +2 -2
  318. data/public/javascripts/fckeditor/fckconfig.js +58 -55
  319. data/public/javascripts/fckeditor/fckeditor.js +99 -8
  320. data/public/javascripts/fckeditor/fckeditor.py +2 -4
  321. data/public/javascripts/fckeditor/fckpackager.xml +12 -12
  322. data/public/javascripts/fckeditor/fckstyles.xml +2 -5
  323. data/public/javascripts/fckeditor/fcktemplates.xml +1 -1
  324. data/public/javascripts/fckeditor/license.txt +1 -2
  325. data/public/javascripts/prototype.js +46 -101
  326. data/public/javascripts/scriptaculous.js +28 -17
  327. data/public/stylesheets/administration.css +5 -1
  328. data/themes/dirtylicious/about.markdown +3 -0
  329. data/themes/dirtylicious/images/body.jpg +0 -0
  330. data/themes/dirtylicious/images/container.jpg +0 -0
  331. data/themes/dirtylicious/images/gravatar.gif +0 -0
  332. data/themes/dirtylicious/images/header.jpg +0 -0
  333. data/themes/dirtylicious/images/li.gif +0 -0
  334. data/themes/dirtylicious/images/main.gif +0 -0
  335. data/themes/dirtylicious/images/nav.gif +0 -0
  336. data/themes/dirtylicious/images/quote.gif +0 -0
  337. data/themes/dirtylicious/images/spinner.gif +0 -0
  338. data/themes/dirtylicious/layouts/default.html.erb +60 -0
  339. data/themes/dirtylicious/preview.png +0 -0
  340. data/themes/dirtylicious/stylesheets/application.css +327 -0
  341. data/themes/dirtylicious/views/articles/_article.html.erb +33 -0
  342. data/themes/dirtylicious/views/articles/_comment.html.erb +14 -0
  343. data/themes/dirtylicious/views/articles/_comment_form.html.erb +37 -0
  344. data/themes/dirtylicious/views/articles/_comment_list.html.erb +7 -0
  345. data/themes/dirtylicious/views/articles/_trackback.html.erb +9 -0
  346. data/themes/dirtylicious/views/articles/comment_preview.html.erb +10 -0
  347. data/themes/dirtylicious/views/articles/index.html.erb +5 -0
  348. data/themes/dirtylicious/views/articles/read.html.erb +42 -0
  349. data/themes/dirtylicious/views/shared/_search.html.erb +16 -0
  350. data/themes/standard_issue/about.markdown +5 -0
  351. data/themes/standard_issue/images/img01.gif +0 -0
  352. data/themes/standard_issue/images/img02.gif +0 -0
  353. data/themes/standard_issue/images/img03.gif +0 -0
  354. data/themes/standard_issue/images/img04.jpg +0 -0
  355. data/themes/standard_issue/images/img05.gif +0 -0
  356. data/themes/standard_issue/images/img06.gif +0 -0
  357. data/themes/standard_issue/images/img07.gif +0 -0
  358. data/themes/standard_issue/images/img08.gif +0 -0
  359. data/themes/standard_issue/images/img09.gif +0 -0
  360. data/themes/standard_issue/images/img10.gif +0 -0
  361. data/themes/standard_issue/images/spacer.gif +0 -0
  362. data/themes/standard_issue/images/spinner.gif +0 -0
  363. data/themes/standard_issue/layouts/default.html.erb +59 -0
  364. data/themes/standard_issue/preview.png +0 -0
  365. data/themes/standard_issue/stylesheets/application.css +461 -0
  366. data/themes/standard_issue/views/articles/_article.html.erb +37 -0
  367. data/themes/standard_issue/views/articles/_comment.html.erb +12 -0
  368. data/themes/standard_issue/views/articles/_comment_form.html.erb +48 -0
  369. data/themes/standard_issue/views/articles/_comment_list.html.erb +7 -0
  370. data/themes/standard_issue/views/articles/_trackback.html.erb +9 -0
  371. data/themes/standard_issue/views/articles/comment_preview.html.erb +10 -0
  372. data/themes/standard_issue/views/articles/index.html.erb +5 -0
  373. data/themes/standard_issue/views/articles/read.html.erb +42 -0
  374. data/themes/standard_issue/views/shared/_search.html.erb +17 -0
  375. data/themes/standard_issue/views/theme/static_view_test.html.erb +1 -0
  376. data/themes/typographic/images/accept.gif +0 -0
  377. data/themes/typographic/images/accept50.gif +0 -0
  378. data/themes/typographic/images/bg_white.gif +0 -0
  379. data/themes/typographic/images/bg_wrapper.gif +0 -0
  380. data/themes/typographic/images/bullet_bottom.gif +0 -0
  381. data/themes/typographic/images/bullet_right.gif +0 -0
  382. data/themes/typographic/images/email_open.gif +0 -0
  383. data/themes/typographic/images/email_open50.gif +0 -0
  384. data/themes/typographic/images/meta.gif +0 -0
  385. data/themes/typographic/images/page_edit.gif +0 -0
  386. data/themes/typographic/images/page_edit50.gif +0 -0
  387. data/themes/typographic/images/spinner.gif +0 -0
  388. data/themes/typographic/images/tag.gif +0 -0
  389. data/themes/typographic/images/user.gif +0 -0
  390. data/themes/typographic/images/user50.gif +0 -0
  391. data/themes/typographic/images/world_link.gif +0 -0
  392. data/themes/typographic/images/world_link50.gif +0 -0
  393. data/themes/typographic/layouts/default.html.erb +5 -2
  394. data/themes/typographic/stylesheets/ie6.css +86 -0
  395. data/themes/typographic/views/articles/_article.html.erb +2 -2
  396. data/vendor/plugins/fckeditor/README +0 -7
  397. data/vendor/plugins/fckeditor/app/helpers/fckeditor_helper.rb +1 -3
  398. data/vendor/plugins/fckeditor/lib/fckeditor_version.rb +2 -2
  399. data/vendor/plugins/fckeditor/tasks/fckeditor_tasks.rake +1 -1
  400. data/vendor/plugins/fckeditor/test/fckeditor_test.rb +8 -0
  401. metadata +98 -66
  402. data/CHANGES-5.0.4 +0 -33
  403. data/SIDEBARS +0 -39
  404. data/app/views/admin/content/_quick_post.html.erb +0 -20
  405. data/db/schema.rb +0 -224
  406. data/public/.DS_Store +0 -0
  407. data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/basexml.asp +0 -62
  408. data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/class_upload.asp +0 -353
  409. data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/commands.asp +0 -198
  410. data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/config.asp +0 -128
  411. data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/connector.asp +0 -88
  412. data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/io.asp +0 -222
  413. data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/upload.asp +0 -61
  414. data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/util.asp +0 -55
  415. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/ImageObject.cfc +0 -273
  416. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf5_connector.cfm +0 -315
  417. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf5_upload.cfm +0 -296
  418. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_basexml.cfm +0 -68
  419. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_commands.cfm +0 -225
  420. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_connector.cfm +0 -89
  421. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_io.cfm +0 -288
  422. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_upload.cfm +0 -68
  423. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_util.cfm +0 -132
  424. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/config.cfm +0 -183
  425. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/connector.cfm +0 -31
  426. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/image.cfc +0 -1325
  427. data/public/javascripts/fckeditor/editor/filemanager/connectors/lasso/config.lasso +0 -65
  428. data/public/javascripts/fckeditor/editor/filemanager/connectors/lasso/connector.lasso +0 -257
  429. data/public/javascripts/fckeditor/editor/filemanager/connectors/lasso/upload.lasso +0 -157
  430. data/public/javascripts/fckeditor/editor/filemanager/connectors/php/basexml.php +0 -93
  431. data/public/javascripts/fckeditor/editor/filemanager/connectors/php/commands.php +0 -245
  432. data/public/javascripts/fckeditor/editor/filemanager/connectors/php/config.php +0 -140
  433. data/public/javascripts/fckeditor/editor/filemanager/connectors/php/connector.php +0 -87
  434. data/public/javascripts/fckeditor/editor/filemanager/connectors/php/io.php +0 -272
  435. data/public/javascripts/fckeditor/editor/filemanager/connectors/php/phpcompat.php +0 -17
  436. data/public/javascripts/fckeditor/editor/filemanager/connectors/php/upload.php +0 -59
  437. data/public/javascripts/fckeditor/editor/filemanager/connectors/php/util.php +0 -185
  438. data/public/javascripts/fckeditor/fckeditor.afp +0 -161
  439. data/public/javascripts/fckeditor/fckeditor.asp +0 -235
  440. data/public/javascripts/fckeditor/fckeditor.cfc +0 -273
  441. data/public/javascripts/fckeditor/fckeditor.cfm +0 -210
  442. data/public/javascripts/fckeditor/fckeditor.lasso +0 -112
  443. data/test/mocks/themes/typographic/.DS_Store +0 -0
  444. data/themes/typographic/.DS_Store +0 -0
  445. data/vendor/plugins/audioscrobbler_sidebar/MAINTAINERS +0 -26
  446. data/vendor/plugins/audioscrobbler_sidebar/MIT-LICENSE +0 -21
  447. data/vendor/plugins/audioscrobbler_sidebar/README +0 -27
  448. data/vendor/plugins/audioscrobbler_sidebar/Rakefile +0 -22
  449. data/vendor/plugins/audioscrobbler_sidebar/init.rb +0 -5
  450. data/vendor/plugins/audioscrobbler_sidebar/lib/audioscrobbler.rb +0 -54
  451. data/vendor/plugins/audioscrobbler_sidebar/lib/audioscrobbler_sidebar.rb +0 -13
  452. data/vendor/plugins/audioscrobbler_sidebar/test/audioscrobbler_sidebar_test.rb +0 -8
  453. data/vendor/plugins/audioscrobbler_sidebar/views/content.rhtml +0 -10
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * FCKeditor - The text editor for Internet - http://www.fckeditor.net
3
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
3
+ * Copyright (C) 2003-2008 Frederico Caldeira Knabben
4
4
  *
5
5
  * == BEGIN LICENSE ==
6
6
  *
@@ -35,7 +35,8 @@ FCKDomRange.prototype.MoveToSelection = function()
35
35
  this._UpdateElementInfo() ;
36
36
  }
37
37
  else
38
- this.MoveToElementStart( this.Window.document.body ) ;
38
+ if ( this.Window.document )
39
+ this.MoveToElementStart( this.Window.document.body ) ;
39
40
  }
40
41
 
41
42
  FCKDomRange.prototype.Select = function()
@@ -100,4 +101,4 @@ FCKDomRange.prototype.SelectBookmark = function( bookmark )
100
101
  var selection = this.Window.getSelection() ;
101
102
  selection.removeAllRanges() ;
102
103
  selection.addRange( domRange ) ;
103
- }
104
+ }
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * FCKeditor - The text editor for Internet - http://www.fckeditor.net
3
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
3
+ * Copyright (C) 2003-2008 Frederico Caldeira Knabben
4
4
  *
5
5
  * == BEGIN LICENSE ==
6
6
  *
@@ -66,15 +66,15 @@ FCKDomRange.prototype.MoveToSelection = function()
66
66
  }
67
67
  }
68
68
 
69
- FCKDomRange.prototype.Select = function()
69
+ FCKDomRange.prototype.Select = function( forceExpand )
70
70
  {
71
71
  if ( this._Range )
72
- this.SelectBookmark( this.CreateBookmark( true ) ) ;
72
+ this.SelectBookmark( this.CreateBookmark( true ), forceExpand ) ;
73
73
  }
74
74
 
75
75
  // Not compatible with bookmark created with CreateBookmark2.
76
76
  // The bookmark nodes will be deleted from the document.
77
- FCKDomRange.prototype.SelectBookmark = function( bookmark )
77
+ FCKDomRange.prototype.SelectBookmark = function( bookmark, forceExpand )
78
78
  {
79
79
  var bIsCollapsed = this.CheckIsCollapsed() ;
80
80
  var bIsStartMakerAlone ;
@@ -82,7 +82,7 @@ FCKDomRange.prototype.SelectBookmark = function( bookmark )
82
82
 
83
83
  // Create marker tags for the start and end boundaries.
84
84
  var eStartMarker = this.GetBookmarkNode( bookmark, true ) ;
85
-
85
+
86
86
  if ( !eStartMarker )
87
87
  return ;
88
88
 
@@ -111,26 +111,27 @@ FCKDomRange.prototype.SelectBookmark = function( bookmark )
111
111
  }
112
112
  else
113
113
  {
114
- bIsStartMakerAlone = ( !eStartMarker.previousSibling || eStartMarker.previousSibling.nodeName.toLowerCase() == 'br' ) && !eStartMarker.nextSibing ;
115
-
116
- // Append a temporary <span>&nbsp;</span> before the selection.
114
+ bIsStartMakerAlone = ( forceExpand || !eStartMarker.previousSibling || eStartMarker.previousSibling.nodeName.toLowerCase() == 'br' ) && !eStartMarker.nextSibing ;
115
+
116
+ // Append a temporary <span>&#65279;</span> before the selection.
117
117
  // This is needed to avoid IE destroying selections inside empty
118
118
  // inline elements, like <b></b> (#253).
119
119
  // It is also needed when placing the selection right after an inline
120
120
  // element to avoid the selection moving inside of it.
121
121
  dummySpan = this.Window.document.createElement( 'span' ) ;
122
- dummySpan.innerHTML = '&nbsp;' ;
122
+ dummySpan.innerHTML = '&#65279;' ; // Zero Width No-Break Space (U+FEFF). See #1359.
123
123
  eStartMarker.parentNode.insertBefore( dummySpan, eStartMarker ) ;
124
-
124
+
125
125
  if ( bIsStartMakerAlone )
126
126
  {
127
127
  // To expand empty blocks or line spaces after <br>, we need
128
- // instead to have a &nbsp;, which will be later deleted using the
128
+ // instead to have any char, which will be later deleted using the
129
129
  // selection.
130
- eStartMarker.parentNode.insertBefore( this.Window.document.createTextNode( '\u00a0' ), eStartMarker ) ;
130
+ // \ufeff = Zero Width No-Break Space (U+FEFF). See #1359.
131
+ eStartMarker.parentNode.insertBefore( this.Window.document.createTextNode( '\ufeff' ), eStartMarker ) ;
131
132
  }
132
133
  }
133
-
134
+
134
135
  if ( !this._Range )
135
136
  this._Range = this.CreateRange() ;
136
137
 
@@ -142,9 +143,9 @@ FCKDomRange.prototype.SelectBookmark = function( bookmark )
142
143
  {
143
144
  if ( bIsStartMakerAlone )
144
145
  {
145
- // Move the selection start to include the temporary &nbsp;.
146
+ // Move the selection start to include the temporary &#65279;.
146
147
  oIERange.moveStart( 'character', -1 ) ;
147
-
148
+
148
149
  oIERange.select() ;
149
150
 
150
151
  // Remove our temporary stuff.
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * FCKeditor - The text editor for Internet - http://www.fckeditor.net
3
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
3
+ * Copyright (C) 2003-2008 Frederico Caldeira Knabben
4
4
  *
5
5
  * == BEGIN LICENSE ==
6
6
  *
@@ -92,6 +92,8 @@ FCKDomRangeIterator.prototype =
92
92
  var currentNode = this._NextNode ;
93
93
  var lastNode = this._LastNode ;
94
94
 
95
+ this._NextNode = null ;
96
+
95
97
  while ( currentNode )
96
98
  {
97
99
  // closeRange indicates that a paragraph boundary has been found,
@@ -110,7 +112,7 @@ FCKDomRangeIterator.prototype =
110
112
  {
111
113
  var nodeName = currentNode.nodeName.toLowerCase() ;
112
114
 
113
- if ( boundarySet[ nodeName ] )
115
+ if ( boundarySet[ nodeName ] && ( !FCKBrowserInfo.IsIE || currentNode.scopeName == 'HTML' ) )
114
116
  {
115
117
  // <br> boundaries must be part of the range. It will
116
118
  // happen only if ForceBrBreak.
@@ -125,6 +127,18 @@ FCKDomRangeIterator.prototype =
125
127
  break ;
126
128
  }
127
129
 
130
+ // The range must finish right before the boundary,
131
+ // including possibly skipped empty spaces. (#1603)
132
+ if ( range )
133
+ {
134
+ range.SetEnd( currentNode, 3, true ) ;
135
+
136
+ // The found boundary must be set as the next one at this
137
+ // point. (#1717)
138
+ if ( nodeName != 'br' )
139
+ this._NextNode = currentNode ;
140
+ }
141
+
128
142
  closeRange = true ;
129
143
  }
130
144
  else
@@ -181,6 +195,7 @@ FCKDomRangeIterator.prototype =
181
195
  }
182
196
 
183
197
  currentNode = parentNode ;
198
+ includeNode = true ;
184
199
  isLast = ( currentNode == lastNode ) ;
185
200
  continueFromSibling = true ;
186
201
  }
@@ -195,15 +210,15 @@ FCKDomRangeIterator.prototype =
195
210
  if ( ( closeRange || isLast ) && range )
196
211
  {
197
212
  range._UpdateElementInfo() ;
198
-
199
- if ( range.StartNode == range.EndNode
200
- && range.StartNode.parentNode == range.StartBlockLimit
213
+
214
+ if ( range.StartNode == range.EndNode
215
+ && range.StartNode.parentNode == range.StartBlockLimit
201
216
  && range.StartNode.getAttribute && range.StartNode.getAttribute( '_fck_bookmark' ) )
202
217
  range = null ;
203
218
  else
204
219
  break ;
205
220
  }
206
-
221
+
207
222
  if ( isLast )
208
223
  break ;
209
224
 
@@ -285,8 +300,13 @@ FCKDomRangeIterator.prototype =
285
300
  if ( removePreviousBr )
286
301
  {
287
302
  var previousSibling = block.previousSibling ;
288
- if ( previousSibling && previousSibling.nodeType == 1 && previousSibling.nodeName.toLowerCase() == 'br' )
289
- previousSibling.parentNode.removeChild( previousSibling ) ;
303
+ if ( previousSibling && previousSibling.nodeType == 1 )
304
+ {
305
+ if ( previousSibling.nodeName.toLowerCase() == 'br' )
306
+ previousSibling.parentNode.removeChild( previousSibling ) ;
307
+ else if ( previousSibling.lastChild && previousSibling.lastChild.nodeName.IEquals( 'br' ) )
308
+ previousSibling.removeChild( previousSibling.lastChild ) ;
309
+ }
290
310
  }
291
311
 
292
312
  if ( removeLastBr )
@@ -299,7 +319,8 @@ FCKDomRangeIterator.prototype =
299
319
  // Get a reference for the next element. This is important because the
300
320
  // above block can be removed or changed, so we can rely on it for the
301
321
  // next interation.
302
- this._NextNode = ( isLast || block == lastNode ) ? null : FCKDomTools.GetNextSourceNode( block, true, null, lastNode ) ;
322
+ if ( !this._NextNode )
323
+ this._NextNode = ( isLast || block == lastNode ) ? null : FCKDomTools.GetNextSourceNode( block, true, null, lastNode ) ;
303
324
 
304
325
  return block ;
305
326
  }
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * FCKeditor - The text editor for Internet - http://www.fckeditor.net
3
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
3
+ * Copyright (C) 2003-2008 Frederico Caldeira Knabben
4
4
  *
5
5
  * == BEGIN LICENSE ==
6
6
  *
@@ -44,31 +44,15 @@ FCKEditingArea.prototype.Start = function( html, secondCall )
44
44
  var oTargetDocument = FCKTools.GetElementDocument( eTargetElement ) ;
45
45
 
46
46
  // Remove all child nodes from the target.
47
- var oChild ;
48
- while( ( oChild = eTargetElement.firstChild ) ) // Only one "=".
49
- {
50
- // Set innerHTML = '' to avoid memory leak.
51
- if ( oChild.contentWindow )
52
- oChild.contentWindow.document.body.innerHTML = '' ;
53
-
54
- eTargetElement.removeChild( oChild ) ;
55
- }
47
+ while( eTargetElement.firstChild )
48
+ eTargetElement.removeChild( eTargetElement.firstChild ) ;
56
49
 
57
50
  if ( this.Mode == FCK_EDITMODE_WYSIWYG )
58
51
  {
59
- // Create the editing area IFRAME.
60
- var oIFrame = this.IFrame = oTargetDocument.createElement( 'iframe' ) ;
61
-
62
- // Firefox will render the tables inside the body in Quirks mode if the
63
- // source of the iframe is set to javascript. see #515
64
- if ( !FCKBrowserInfo.IsGecko )
65
- oIFrame.src = 'javascript:void(0)' ;
66
-
67
- oIFrame.frameBorder = 0 ;
68
- oIFrame.width = oIFrame.height = '100%' ;
69
-
70
- // Append the new IFRAME to the target.
71
- eTargetElement.appendChild( oIFrame ) ;
52
+ // For FF, document.domain must be set only when different, otherwhise
53
+ // we'll strangely have "Permission denied" issues.
54
+ if ( FCK_IS_CUSTOM_DOMAIN )
55
+ html = '<script>document.domain="' + FCK_RUNTIME_DOMAIN + '";</script>' + html ;
72
56
 
73
57
  // IE has a bug with the <base> tag... it must have a </base> closer,
74
58
  // otherwise the all successive tags will be set as children nodes of the <base>.
@@ -104,6 +88,38 @@ FCKEditingArea.prototype.Start = function( html, secondCall )
104
88
  this._BodyHTML = html ; // Invalid HTML input.
105
89
  }
106
90
 
91
+ // Create the editing area IFRAME.
92
+ var oIFrame = this.IFrame = oTargetDocument.createElement( 'iframe' ) ;
93
+
94
+ // IE: Avoid JavaScript errors thrown by the editing are source (like tags events).
95
+ // See #1055.
96
+ var sOverrideError = '<script type="text/javascript" _fcktemp="true">window.onerror=function(){return true;};</script>' ;
97
+
98
+ oIFrame.frameBorder = 0 ;
99
+ oIFrame.width = oIFrame.height = '100%' ;
100
+
101
+ if ( FCK_IS_CUSTOM_DOMAIN && FCKBrowserInfo.IsIE )
102
+ {
103
+ window._FCKHtmlToLoad = sOverrideError + html ;
104
+ oIFrame.src = 'javascript:void( (function(){' +
105
+ 'document.open() ;' +
106
+ 'document.domain="' + document.domain + '" ;' +
107
+ 'document.write( window.parent._FCKHtmlToLoad );' +
108
+ 'document.close() ;' +
109
+ 'window.parent._FCKHtmlToLoad = null ;' +
110
+ '})() )' ;
111
+ }
112
+ else if ( !FCKBrowserInfo.IsGecko )
113
+ {
114
+ // Firefox will render the tables inside the body in Quirks mode if the
115
+ // source of the iframe is set to javascript. see #515
116
+ oIFrame.src = 'javascript:void(0)' ;
117
+ }
118
+
119
+ // Append the new IFRAME to the target. For IE, it must be done after
120
+ // setting the "src", to avoid the "secure/unsecure" message under HTTPS.
121
+ eTargetElement.appendChild( oIFrame ) ;
122
+
107
123
  // Get the window and document objects used to interact with the newly created IFRAME.
108
124
  this.Window = oIFrame.contentWindow ;
109
125
 
@@ -111,11 +127,17 @@ FCKEditingArea.prototype.Start = function( html, secondCall )
111
127
  // TODO: This error handler is not being fired.
112
128
  // this.Window.onerror = function() { alert( 'Error!' ) ; return true ; }
113
129
 
114
- var oDoc = this.Document = this.Window.document ;
130
+ if ( !FCK_IS_CUSTOM_DOMAIN || !FCKBrowserInfo.IsIE )
131
+ {
132
+ var oDoc = this.Window.document ;
115
133
 
116
- oDoc.open() ;
117
- oDoc.write( html ) ;
118
- oDoc.close() ;
134
+ oDoc.open() ;
135
+ oDoc.write( sOverrideError + html ) ;
136
+ oDoc.close() ;
137
+ }
138
+
139
+ if ( FCKBrowserInfo.IsAIR )
140
+ FCKAdobeAIR.EditingArea_Start( oDoc, html ) ;
119
141
 
120
142
  // Firefox 1.0.x is buggy... ohh yes... so let's do it two times and it
121
143
  // will magically work.
@@ -125,27 +147,46 @@ FCKEditingArea.prototype.Start = function( html, secondCall )
125
147
  return ;
126
148
  }
127
149
 
128
- this.Window._FCKEditingArea = this ;
129
-
130
- // FF 1.0.x is buggy... we must wait a lot to enable editing because
131
- // sometimes the content simply disappears, for example when pasting
132
- // "bla1!<img src='some_url'>!bla2" in the source and then switching
133
- // back to design.
134
- if ( FCKBrowserInfo.IsGecko10 )
135
- this.Window.setTimeout( FCKEditingArea_CompleteStart, 500 ) ;
150
+ if ( oIFrame.readyState && oIFrame.readyState != 'completed' )
151
+ {
152
+ var editArea = this ;
153
+ ( oIFrame.onreadystatechange = function()
154
+ {
155
+ if ( oIFrame.readyState == 'complete' )
156
+ {
157
+ oIFrame.onreadystatechange = null ;
158
+ editArea.Window._FCKEditingArea = editArea ;
159
+ FCKEditingArea_CompleteStart.call( editArea.Window ) ;
160
+ }
161
+ // It happened that IE changed the state to "complete" after the
162
+ // "if" and before the "onreadystatechange" assignement, making we
163
+ // lost the event call, so we do a manual call just to be sure.
164
+ } )() ;
165
+ }
136
166
  else
137
- FCKEditingArea_CompleteStart.call( this.Window ) ;
167
+ {
168
+ this.Window._FCKEditingArea = this ;
169
+
170
+ // FF 1.0.x is buggy... we must wait a lot to enable editing because
171
+ // sometimes the content simply disappears, for example when pasting
172
+ // "bla1!<img src='some_url'>!bla2" in the source and then switching
173
+ // back to design.
174
+ if ( FCKBrowserInfo.IsGecko10 )
175
+ this.Window.setTimeout( FCKEditingArea_CompleteStart, 500 ) ;
176
+ else
177
+ FCKEditingArea_CompleteStart.call( this.Window ) ;
178
+ }
138
179
  }
139
180
  else
140
181
  {
141
182
  var eTextarea = this.Textarea = oTargetDocument.createElement( 'textarea' ) ;
142
183
  eTextarea.className = 'SourceField' ;
143
184
  eTextarea.dir = 'ltr' ;
144
- FCKDomTools.SetElementStyles( eTextarea,
145
- {
146
- width : '100%',
147
- height : '100%',
148
- border : 'none',
185
+ FCKDomTools.SetElementStyles( eTextarea,
186
+ {
187
+ width : '100%',
188
+ height : '100%',
189
+ border : 'none',
149
190
  resize : 'none',
150
191
  outline : 'none'
151
192
  } ) ;
@@ -169,7 +210,10 @@ function FCKEditingArea_CompleteStart()
169
210
  }
170
211
 
171
212
  var oEditorArea = this._FCKEditingArea ;
172
-
213
+
214
+ // Save this reference to be re-used later.
215
+ oEditorArea.Document = oEditorArea.Window.document ;
216
+
173
217
  oEditorArea.MakeEditable() ;
174
218
 
175
219
  // Fire the "OnLoad" event.
@@ -207,31 +251,13 @@ FCKEditingArea.prototype.MakeEditable = function()
207
251
 
208
252
  oDoc.designMode = 'on' ;
209
253
 
210
- // Tell Gecko to use or not the <SPAN> tag for the bold, italic and underline.
211
- try
212
- {
213
- oDoc.execCommand( 'styleWithCSS', false, FCKConfig.GeckoUseSPAN ) ;
214
- }
215
- catch (e)
216
- {
217
- // As evidenced here, useCSS is deprecated in favor of styleWithCSS:
218
- // http://www.mozilla.org/editor/midas-spec.html
219
- oDoc.execCommand( 'useCSS', false, !FCKConfig.GeckoUseSPAN ) ;
220
- }
221
-
222
- // Analyzing Firefox 1.5 source code, it seams that there is support for a
223
- // "insertBrOnReturn" command. Applying it gives no error, but it doesn't
224
- // gives the same behavior that you have with IE. It works only if you are
225
- // already inside a paragraph and it doesn't render correctly in the first enter.
226
- // oDoc.execCommand( 'insertBrOnReturn', false, false ) ;
227
-
228
254
  // Tell Gecko (Firefox 1.5+) to enable or not live resizing of objects (by Alfonso Martinez)
229
255
  oDoc.execCommand( 'enableObjectResizing', false, !FCKConfig.DisableObjectResizing ) ;
230
256
 
231
257
  // Disable the standard table editing features of Firefox.
232
258
  oDoc.execCommand( 'enableInlineTableEditing', false, !FCKConfig.DisableFFTableHandles ) ;
233
259
  }
234
- catch (e)
260
+ catch (e)
235
261
  {
236
262
  // In Firefox if the iframe is initially hidden it can't be set to designMode and it raises an exception
237
263
  // So we set up a DOM Mutation event Listener on the HTML, as it will raise several events when the document is visible again
@@ -246,12 +272,12 @@ FCKEditingArea.prototype.MakeEditable = function()
246
272
  function FCKEditingArea_Document_AttributeNodeModified( evt )
247
273
  {
248
274
  var editingArea = evt.currentTarget.contentWindow._FCKEditingArea ;
249
-
275
+
250
276
  // We want to run our function after the events no longer fire, so we can know that it's a stable situation
251
277
  if ( editingArea._timer )
252
278
  window.clearTimeout( editingArea._timer ) ;
253
279
 
254
- editingArea._timer = FCKTools.SetTimeout( FCKEditingArea_MakeEditableByMutation, 1000, editingArea ) ;
280
+ editingArea._timer = FCKTools.SetTimeout( FCKEditingArea_MakeEditableByMutation, 1000, editingArea ) ;
255
281
  }
256
282
 
257
283
  // This function ideally should be called after the document is visible, it does clean up of the
@@ -273,21 +299,10 @@ FCKEditingArea.prototype.Focus = function()
273
299
  {
274
300
  if ( this.Mode == FCK_EDITMODE_WYSIWYG )
275
301
  {
276
- // The following check is important to avoid IE entering in a focus loop. Ref:
277
- // http://sourceforge.net/tracker/index.php?func=detail&aid=1567060&group_id=75348&atid=543653
278
- if ( FCKBrowserInfo.IsIE && this.Document.hasFocus() )
279
- this._EnsureFocusIE() ;
280
-
281
- if ( FCKBrowserInfo.IsSafari )
282
- this.IFrame.focus() ;
302
+ if ( FCKBrowserInfo.IsIE )
303
+ this._FocusIE() ;
283
304
  else
284
- {
285
305
  this.Window.focus() ;
286
-
287
- // In IE it can happen that the document is in theory focused but the active element is outside it
288
- if ( FCKBrowserInfo.IsIE )
289
- this._EnsureFocusIE() ;
290
- }
291
306
  }
292
307
  else
293
308
  {
@@ -301,30 +316,33 @@ FCKEditingArea.prototype.Focus = function()
301
316
  catch(e) {}
302
317
  }
303
318
 
304
- FCKEditingArea.prototype._EnsureFocusIE = function()
319
+ FCKEditingArea.prototype._FocusIE = function()
305
320
  {
306
- // In IE it can happen that the document is in theory focused but the active element is outside it
321
+ // In IE it can happen that the document is in theory focused but the
322
+ // active element is outside of it.
307
323
  this.Document.body.setActive() ;
308
324
 
325
+ this.Window.focus() ;
326
+
309
327
  // Kludge for #141... yet more code to workaround IE bugs
310
328
  var range = this.Document.selection.createRange() ;
311
329
 
312
- // Only apply the fix when in a block and the block is empty.
313
330
  var parentNode = range.parentElement() ;
331
+ var parentTag = parentNode.nodeName.toLowerCase() ;
314
332
 
315
- if ( ! ( parentNode.childNodes.length == 0 && (
316
- FCKListsLib.BlockElements[parentNode.nodeName.toLowerCase()] ||
317
- FCKListsLib.NonEmptyBlockElements[parentNode.nodeName.toLowerCase()] ) ) )
318
- return ;
319
-
320
- var oldLength = range.text.length ;
321
- range.moveEnd( "character", 1 ) ;
322
- range.select() ;
323
- if ( range.text.length > oldLength )
333
+ // Only apply the fix when in a block, and the block is empty.
334
+ if ( parentNode.childNodes.length > 0 ||
335
+ !( FCKListsLib.BlockElements[parentTag] ||
336
+ FCKListsLib.NonEmptyBlockElements[parentTag] ) )
324
337
  {
325
- range.moveEnd( "character", -1 ) ;
326
- range.select() ;
338
+ return ;
327
339
  }
340
+
341
+ // Force the selection to happen, in this way we guarantee the focus will
342
+ // be there.
343
+ range = new FCKDomRange( this.Window ) ;
344
+ range.MoveToElementEditStart( parentNode ) ;
345
+ range.Select() ;
328
346
  }
329
347
 
330
348
  function FCKEditingArea_Cleanup()