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
  *
@@ -30,9 +30,11 @@ FCKTools.CancelEvent = function( e )
30
30
  FCKTools.DisableSelection = function( element )
31
31
  {
32
32
  if ( FCKBrowserInfo.IsGecko )
33
- element.style.MozUserSelect = 'none' ; // Gecko only.
33
+ element.style.MozUserSelect = 'none' ; // Gecko only.
34
+ else if ( FCKBrowserInfo.IsSafari )
35
+ element.style.KhtmlUserSelect = 'none' ; // WebKit only.
34
36
  else
35
- element.style.userSelect = 'none' ; // CSS3 (not supported yet).
37
+ element.style.userSelect = 'none' ; // CSS3 (not supported yet).
36
38
  }
37
39
 
38
40
  // Appends a CSS file to a document.
@@ -47,8 +49,11 @@ FCKTools._AppendStyleSheet = function( documentElement, cssFileUrl )
47
49
  }
48
50
 
49
51
  // Appends a CSS style string to a document.
50
- FCKTools._AppendStyleString = function( documentElement, cssStyles )
52
+ FCKTools.AppendStyleString = function( documentElement, cssStyles )
51
53
  {
54
+ if ( !cssStyles )
55
+ return null ;
56
+
52
57
  var e = documentElement.createElement( "STYLE" ) ;
53
58
  e.appendChild( documentElement.createTextNode( cssStyles ) ) ;
54
59
  documentElement.getElementsByTagName( "HEAD" )[0].appendChild( e ) ;
@@ -111,8 +116,15 @@ FCKTools.CreateXmlObject = function( object )
111
116
  {
112
117
  case 'XmlHttp' :
113
118
  return new XMLHttpRequest() ;
119
+
114
120
  case 'DOMDocument' :
115
- return document.implementation.createDocument( '', '', null ) ;
121
+ // Originaly, we were had the following here:
122
+ // return document.implementation.createDocument( '', '', null ) ;
123
+ // But that doesn't work if we're running under domain relaxation mode, so we need a workaround.
124
+ // See http://ajaxian.com/archives/xml-messages-with-cross-domain-json about the trick we're using.
125
+ var doc = ( new DOMParser() ).parseFromString( '<tmp></tmp>', 'text/xml' ) ;
126
+ FCKDomTools.RemoveNode( doc.firstChild ) ;
127
+ return doc ;
116
128
  }
117
129
  return null ;
118
130
  }
@@ -191,7 +203,7 @@ FCKTools.RegisterDollarFunction = function( targetWindow )
191
203
  {
192
204
  targetWindow.$ = function( id )
193
205
  {
194
- return this.document.getElementById( id ) ;
206
+ return targetWindow.document.getElementById( id ) ;
195
207
  } ;
196
208
  }
197
209
 
@@ -224,7 +236,7 @@ FCKTools.GetElementPosition = function( el, relativeWindow )
224
236
  break ;
225
237
 
226
238
  /*
227
- FCKDebug.Output( el.tagName + ":" + "offset=" + el.offsetLeft + "," + el.offsetTop + " "
239
+ FCKDebug.Output( el.tagName + ":" + "offset=" + el.offsetLeft + "," + el.offsetTop + " "
228
240
  + "scroll=" + el.scrollLeft + "," + el.scrollTop ) ;
229
241
  */
230
242
 
@@ -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
  *
@@ -33,8 +33,11 @@ FCKTools._AppendStyleSheet = function( documentElement, cssFileUrl )
33
33
  }
34
34
 
35
35
  // Appends a CSS style string to a document.
36
- FCKTools._AppendStyleString = function( documentElement, cssStyles )
36
+ FCKTools.AppendStyleString = function( documentElement, cssStyles )
37
37
  {
38
+ if ( !cssStyles )
39
+ return null ;
40
+
38
41
  var s = documentElement.createStyleSheet( "" ) ;
39
42
  s.cssText = cssStyles ;
40
43
  return s ;
@@ -71,6 +74,9 @@ FCKTools.CreateXmlObject = function( object )
71
74
  switch ( object )
72
75
  {
73
76
  case 'XmlHttp' :
77
+ // Try the native XMLHttpRequest introduced with IE7.
78
+ try { return new XMLHttpRequest() ; } catch (e) {}
79
+
74
80
  aObjs = [ 'MSXML2.XmlHttp', 'Microsoft.XmlHttp' ] ;
75
81
  break ;
76
82
 
@@ -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
  *
@@ -27,9 +27,12 @@ FCKUndo.TypesCount = 0 ;
27
27
  FCKUndo.Changed = false ; // Is the document changed in respect to its initial image?
28
28
  FCKUndo.MaxTypes = 25 ;
29
29
  FCKUndo.Typing = false ;
30
+ FCKUndo.SaveLocked = false ;
30
31
 
31
32
  FCKUndo._GetBookmark = function()
32
33
  {
34
+ FCKSelection.Restore() ;
35
+
33
36
  var range = new FCKDomRange( FCK.EditorWindow ) ;
34
37
  try
35
38
  {
@@ -107,14 +110,14 @@ FCKUndo._CheckIsBookmarksEqual = function( bookmark1, bookmark2 )
107
110
  }
108
111
  else
109
112
  {
110
- return this._CompareCursors( bookmark1.Start, bookmark2.Start ) == 0
113
+ return this._CompareCursors( bookmark1.Start, bookmark2.Start ) == 0
111
114
  && this._CompareCursors( bookmark1.End, bookmark2.End ) == 0 ;
112
115
  }
113
116
  }
114
117
 
115
118
  FCKUndo.SaveUndoStep = function()
116
119
  {
117
- if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
120
+ if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG || this.SaveLocked )
118
121
  return ;
119
122
 
120
123
  // Assume the editor content is changed when SaveUndoStep() is called after the first time.
@@ -130,8 +133,8 @@ FCKUndo.SaveUndoStep = function()
130
133
  this.SavedData = this.SavedData.slice( 0, this.CurrentIndex + 1 ) ;
131
134
 
132
135
  // Cancel operation if the new step is identical to the previous one.
133
- if ( this.CurrentIndex > 0
134
- && sHtml == this.SavedData[ this.CurrentIndex ][0]
136
+ if ( this.CurrentIndex > 0
137
+ && sHtml == this.SavedData[ this.CurrentIndex ][0]
135
138
  && this._CheckIsBookmarksEqual( bookmark, this.SavedData[ this.CurrentIndex ][1] ) )
136
139
  return ;
137
140
  // Save the selection and caret position in the first undo level for the first change.
@@ -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
  *
@@ -36,4 +36,4 @@ var FCKURLParams = new Object() ;
36
36
 
37
37
  FCKURLParams[ sParamName ] = sParamValue ;
38
38
  }
39
- })();
39
+ })();
@@ -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
  *
@@ -27,7 +27,7 @@ FCKXHtml.CurrentJobNum = 0 ;
27
27
 
28
28
  FCKXHtml.GetXHTML = function( node, includeNode, format )
29
29
  {
30
- FCKDomTools.CheckAndRemovePaddingNode( node.ownerDocument, FCKConfig.EnterMode ) ;
30
+ FCKDomTools.CheckAndRemovePaddingNode( FCKTools.GetElementDocument( node ), FCKConfig.EnterMode ) ;
31
31
  FCKXHtmlEntities.Initialize() ;
32
32
 
33
33
  // Set the correct entity to use for empty blocks.
@@ -146,7 +146,7 @@ FCKXHtml._AppendChildNodes = function( xmlNode, htmlNode, isBlockElement )
146
146
  this._AppendEntity( xmlNode, this._NbspEntity ) ;
147
147
  }
148
148
  }
149
-
149
+
150
150
  // If the resulting node is empty.
151
151
  if ( xmlNode.childNodes.length == 0 )
152
152
  {
@@ -182,8 +182,8 @@ FCKXHtml._AppendNode = function( xmlNode, htmlNode )
182
182
  case 1 :
183
183
  // If we detect a <br> inside a <pre> in Gecko, turn it into a line break instead.
184
184
  // This is a workaround for the Gecko bug here: https://bugzilla.mozilla.org/show_bug.cgi?id=92921
185
- if ( FCKBrowserInfo.IsGecko
186
- && htmlNode.tagName.toLowerCase() == 'br'
185
+ if ( FCKBrowserInfo.IsGecko
186
+ && htmlNode.tagName.toLowerCase() == 'br'
187
187
  && htmlNode.parentNode.tagName.toLowerCase() == 'pre' )
188
188
  {
189
189
  var val = '\r' ;
@@ -198,7 +198,8 @@ FCKXHtml._AppendNode = function( xmlNode, htmlNode )
198
198
  return FCKXHtml._AppendNode( xmlNode, FCK.GetRealElement( htmlNode ) ) ;
199
199
 
200
200
  // Ignore bogus BR nodes in the DOM.
201
- if ( FCKBrowserInfo.IsGecko &&
201
+ if ( FCKBrowserInfo.IsGecko &&
202
+ htmlNode.nextSibling &&
202
203
  ( htmlNode.hasAttribute('_moz_editor_bogus_node') || htmlNode.getAttribute( 'type' ) == '_moz' ) )
203
204
  return false ;
204
205
 
@@ -234,7 +235,7 @@ FCKXHtml._AppendNode = function( xmlNode, htmlNode )
234
235
  return false ;
235
236
 
236
237
  var oNode = this.XML.createElement( sNodeName ) ;
237
-
238
+
238
239
  // Add all attributes.
239
240
  FCKXHtml._AppendAttributes( xmlNode, htmlNode, oNode, sNodeName ) ;
240
241
 
@@ -312,19 +313,6 @@ function FCKXHtml_GetEntity( character )
312
313
  // An object that hold tag specific operations.
313
314
  FCKXHtml.TagProcessors =
314
315
  {
315
- img : function( node, htmlNode )
316
- {
317
- // The "ALT" attribute is required in XHTML.
318
- if ( ! node.attributes.getNamedItem( 'alt' ) )
319
- FCKXHtml._AppendAttribute( node, 'alt', '' ) ;
320
-
321
- var sSavedUrl = htmlNode.getAttribute( '_fcksavedurl' ) ;
322
- if ( sSavedUrl != null )
323
- FCKXHtml._AppendAttribute( node, 'src', sSavedUrl ) ;
324
-
325
- return node ;
326
- },
327
-
328
316
  a : function( node, htmlNode )
329
317
  {
330
318
  // Firefox may create empty tags when deleting the selection in some special cases (SF-BUG 1556878).
@@ -349,51 +337,99 @@ FCKXHtml.TagProcessors =
349
337
  return node ;
350
338
  },
351
339
 
352
- script : function( node, htmlNode )
340
+ area : function( node, htmlNode )
353
341
  {
354
- // The "TYPE" attribute is required in XHTML.
355
- if ( ! node.attributes.getNamedItem( 'type' ) )
356
- FCKXHtml._AppendAttribute( node, 'type', 'text/javascript' ) ;
342
+ var sSavedUrl = htmlNode.getAttribute( '_fcksavedurl' ) ;
343
+ if ( sSavedUrl != null )
344
+ FCKXHtml._AppendAttribute( node, 'href', sSavedUrl ) ;
357
345
 
358
- node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( htmlNode.text ) ) ) ;
346
+ // IE ignores the "COORDS" and "SHAPE" attribute so we must add it manually.
347
+ if ( FCKBrowserInfo.IsIE )
348
+ {
349
+ if ( ! node.attributes.getNamedItem( 'coords' ) )
350
+ {
351
+ var sCoords = htmlNode.getAttribute( 'coords', 2 ) ;
352
+ if ( sCoords && sCoords != '0,0,0' )
353
+ FCKXHtml._AppendAttribute( node, 'coords', sCoords ) ;
354
+ }
355
+
356
+ if ( ! node.attributes.getNamedItem( 'shape' ) )
357
+ {
358
+ var sShape = htmlNode.getAttribute( 'shape', 2 ) ;
359
+ if ( sShape && sShape.length > 0 )
360
+ FCKXHtml._AppendAttribute( node, 'shape', sShape.toLowerCase() ) ;
361
+ }
362
+ }
359
363
 
360
364
  return node ;
361
365
  },
362
366
 
363
- style : function( node, htmlNode )
367
+ body : function( node, htmlNode )
364
368
  {
365
- // The "TYPE" attribute is required in XHTML.
366
- if ( ! node.attributes.getNamedItem( 'type' ) )
367
- FCKXHtml._AppendAttribute( node, 'type', 'text/css' ) ;
369
+ node = FCKXHtml._AppendChildNodes( node, htmlNode, false ) ;
370
+ // Remove spellchecker attributes added for Firefox when converting to HTML code (Bug #1351).
371
+ node.removeAttribute( 'spellcheck' ) ;
372
+ return node ;
373
+ },
368
374
 
369
- var cssText = htmlNode.innerHTML ;
370
- if ( FCKBrowserInfo.IsIE ) // Bug #403 : IE always appends a \r\n to the beginning of StyleNode.innerHTML
371
- cssText = cssText.replace( /^(\r\n|\n|\r)/, '' ) ;
375
+ // IE loses contents of iframes, and Gecko does give it back HtmlEncoded
376
+ // Note: Opera does lose the content and doesn't provide it in the innerHTML string
377
+ iframe : function( node, htmlNode )
378
+ {
379
+ var sHtml = htmlNode.innerHTML ;
372
380
 
373
- node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( cssText ) ) ) ;
381
+ // Gecko does give back the encoded html
382
+ if ( FCKBrowserInfo.IsGecko )
383
+ sHtml = FCKTools.HTMLDecode( sHtml );
384
+
385
+ // Remove the saved urls here as the data won't be processed as nodes
386
+ sHtml = sHtml.replace( /\s_fcksavedurl="[^"]*"/g, '' ) ;
387
+
388
+ node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( sHtml ) ) ) ;
374
389
 
375
390
  return node ;
376
391
  },
377
392
 
378
- pre : function ( node, htmlNode )
393
+ img : function( node, htmlNode )
379
394
  {
380
- for ( var i = 0 ; i < htmlNode.childNodes.length ; i++ )
381
- {
382
- var item = htmlNode.childNodes[i] ;
383
- var val = item.nodeValue ;
384
- if ( item.nodeType == 3 && i == 0 )
385
- node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( '\r\n' + val ) ) ) ;
386
- else
387
- FCKXHtml._AppendNode( node, item ) ;
388
- }
395
+ // The "ALT" attribute is required in XHTML.
396
+ if ( ! node.attributes.getNamedItem( 'alt' ) )
397
+ FCKXHtml._AppendAttribute( node, 'alt', '' ) ;
398
+
399
+ var sSavedUrl = htmlNode.getAttribute( '_fcksavedurl' ) ;
400
+ if ( sSavedUrl != null )
401
+ FCKXHtml._AppendAttribute( node, 'src', sSavedUrl ) ;
402
+
389
403
  return node ;
390
404
  },
391
405
 
392
- title : function( node, htmlNode )
406
+ // Fix orphaned <li> nodes (Bug #503).
407
+ li : function( node, htmlNode, targetNode )
393
408
  {
394
- node.appendChild( FCKXHtml.XML.createTextNode( FCK.EditorDocument.title ) ) ;
409
+ // If the XML parent node is already a <ul> or <ol>, then add the <li> as usual.
410
+ if ( targetNode.nodeName.IEquals( ['ul', 'ol'] ) )
411
+ return FCKXHtml._AppendChildNodes( node, htmlNode, true ) ;
395
412
 
396
- return node ;
413
+ var newTarget = FCKXHtml.XML.createElement( 'ul' ) ;
414
+
415
+ // Reset the _fckxhtmljob so the HTML node is processed again.
416
+ htmlNode._fckxhtmljob = null ;
417
+
418
+ // Loop through all sibling LIs, adding them to the <ul>.
419
+ do
420
+ {
421
+ FCKXHtml._AppendNode( newTarget, htmlNode ) ;
422
+
423
+ // Look for the next element following this <li>.
424
+ do
425
+ {
426
+ htmlNode = FCKDomTools.GetNextSibling( htmlNode ) ;
427
+
428
+ } while ( htmlNode && htmlNode.nodeType == 3 && htmlNode.nodeValue.Trim().length == 0 )
429
+
430
+ } while ( htmlNode && htmlNode.nodeName.toLowerCase() == 'li' )
431
+
432
+ return newTarget ;
397
433
  },
398
434
 
399
435
  // Fix nested <ul> and <ol>.
@@ -419,6 +455,29 @@ FCKXHtml.TagProcessors =
419
455
  return node ;
420
456
  },
421
457
 
458
+ pre : function ( node, htmlNode )
459
+ {
460
+ var firstChild = htmlNode.firstChild ;
461
+
462
+ if ( firstChild && firstChild.nodeType == 3 )
463
+ node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( '\r\n' ) ) ) ;
464
+
465
+ FCKXHtml._AppendChildNodes( node, htmlNode, true ) ;
466
+
467
+ return node ;
468
+ },
469
+
470
+ script : function( node, htmlNode )
471
+ {
472
+ // The "TYPE" attribute is required in XHTML.
473
+ if ( ! node.attributes.getNamedItem( 'type' ) )
474
+ FCKXHtml._AppendAttribute( node, 'type', 'text/javascript' ) ;
475
+
476
+ node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( htmlNode.text ) ) ) ;
477
+
478
+ return node ;
479
+ },
480
+
422
481
  span : function( node, htmlNode )
423
482
  {
424
483
  // Firefox may create empty tags when deleting the selection in some special cases (SF-BUG 1084404).
@@ -430,29 +489,25 @@ FCKXHtml.TagProcessors =
430
489
  return node ;
431
490
  },
432
491
 
433
- // IE loses contents of iframes, and Gecko does give it back HtmlEncoded
434
- // Note: Opera does lose the content and doesn't provide it in the innerHTML string
435
- iframe : function( node, htmlNode )
492
+ style : function( node, htmlNode )
436
493
  {
437
- var sHtml = htmlNode.innerHTML ;
438
-
439
- // Gecko does give back the encoded html
440
- if ( FCKBrowserInfo.IsGecko )
441
- sHtml = FCKTools.HTMLDecode( sHtml );
494
+ // The "TYPE" attribute is required in XHTML.
495
+ if ( ! node.attributes.getNamedItem( 'type' ) )
496
+ FCKXHtml._AppendAttribute( node, 'type', 'text/css' ) ;
442
497
 
443
- // Remove the saved urls here as the data won't be processed as nodes
444
- sHtml = sHtml.replace( /\s_fcksavedurl="[^"]*"/g, '' ) ;
498
+ var cssText = htmlNode.innerHTML ;
499
+ if ( FCKBrowserInfo.IsIE ) // Bug #403 : IE always appends a \r\n to the beginning of StyleNode.innerHTML
500
+ cssText = cssText.replace( /^(\r\n|\n|\r)/, '' ) ;
445
501
 
446
- node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( sHtml ) ) ) ;
502
+ node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( cssText ) ) ) ;
447
503
 
448
504
  return node ;
449
505
  },
450
506
 
451
- body : function( node, htmlNode )
507
+ title : function( node, htmlNode )
452
508
  {
453
- node = FCKXHtml._AppendChildNodes( node, htmlNode, false ) ;
454
- // Remove spellchecker attributes added for Firefox when converting to HTML code (Bug #1351).
455
- node.removeAttribute( 'spellcheck' ) ;
509
+ node.appendChild( FCKXHtml.XML.createTextNode( FCK.EditorDocument.title ) ) ;
510
+
456
511
  return node ;
457
512
  }
458
513
  } ;
@@ -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
  *
@@ -24,11 +24,7 @@
24
24
 
25
25
  FCKXHtml._GetMainXmlString = function()
26
26
  {
27
- // Create the XMLSerializer.
28
- var oSerializer = new XMLSerializer() ;
29
-
30
- // Return the serialized XML as a string.
31
- return oSerializer.serializeToString( this.MainNode ) ;
27
+ return ( new XMLSerializer() ).serializeToString( this.MainNode ) ;
32
28
  }
33
29
 
34
30
  FCKXHtml._AppendAttributes = function( xmlNode, htmlNode, node )
@@ -72,13 +68,13 @@ FCKXHtml._AppendAttributes = function( xmlNode, htmlNode, node )
72
68
  if ( FCKBrowserInfo.IsOpera )
73
69
  {
74
70
  // Opera moves the <FCK:meta> element outside head (#1166).
75
-
71
+
76
72
  // Save a reference to the XML <head> node, so we can use it for
77
73
  // orphan <meta>s.
78
74
  FCKXHtml.TagProcessors['head'] = function( node, htmlNode )
79
75
  {
80
76
  FCKXHtml.XML._HeadElement = node ;
81
-
77
+
82
78
  node = FCKXHtml._AppendChildNodes( node, htmlNode, true ) ;
83
79
 
84
80
  return node ;
@@ -91,7 +87,7 @@ if ( FCKBrowserInfo.IsOpera )
91
87
  if ( htmlNode.parentNode.nodeName.toLowerCase() != 'head' )
92
88
  {
93
89
  var headElement = FCKXHtml.XML._HeadElement ;
94
-
90
+
95
91
  if ( headElement && xmlNode != headElement )
96
92
  {
97
93
  delete htmlNode._fckxhtmljob ;
@@ -102,4 +98,4 @@ if ( FCKBrowserInfo.IsOpera )
102
98
 
103
99
  return node ;
104
100
  }
105
- }
101
+ }