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
  *
@@ -48,6 +48,7 @@ var FCKLanguageManager = FCK.Language =
48
48
  fi : 'Finnish',
49
49
  fo : 'Faroese',
50
50
  fr : 'French',
51
+ 'fr-ca' : 'French (Canada)',
51
52
  gl : 'Galician',
52
53
  he : 'Hebrew',
53
54
  hi : 'Hindi',
@@ -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
  *
@@ -149,4 +149,4 @@ var FCKListHandler =
149
149
 
150
150
  return false ;
151
151
  }
152
- } ;
152
+ } ;
@@ -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
  *
@@ -53,7 +53,10 @@ var FCKListsLib =
53
53
 
54
54
  // Object elements for the Styles System.
55
55
  StyleObjectElements : { img:1,hr:1,li:1,table:1,tr:1,td:1,embed:1,object:1,ol:1,ul:1 },
56
-
56
+
57
+ // Elements that accept text nodes, but are not possible to edit in the browser.
58
+ NonEditableElements : { button:1,option:1,script:1,iframe:1,textarea:1,object:1,embed:1,map:1,applet:1 },
59
+
57
60
  // Elements used to separate block contents.
58
61
  BlockBoundaries : { p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,address:1,pre:1,ol:1,ul:1,li:1,dt:1,de:1,table:1,thead:1,tbody:1,tfoot:1,tr:1,th:1,td:1,caption:1,col:1,colgroup:1,blockquote:1,body:1 },
59
62
  ListBoundaries : { p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,address:1,pre:1,ol:1,ul:1,li:1,dt:1,de:1,table:1,thead:1,tbody:1,tfoot:1,tr:1,th:1,td:1,caption:1,col:1,colgroup:1,blockquote:1,body:1,br:1 }
@@ -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
  *
@@ -43,4 +43,4 @@ FCKPlugins.Load = function()
43
43
 
44
44
  // This is a self destroyable function (must be called once).
45
45
  FCKPlugins.Load = null ;
46
- }
46
+ }
@@ -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
  *
@@ -74,6 +74,7 @@ GeckoEntitiesMarker : /#\?-\:/g ,
74
74
  // like "thumbnail.php?src=someimage.jpg" (SF-BUG 1554141).
75
75
  ProtectUrlsImg : /<img(?=\s).*?\ssrc=((?:(?:\s*)("|').*?\2)|(?:[^"'][^ >]+))/gi ,
76
76
  ProtectUrlsA : /<a(?=\s).*?\shref=((?:(?:\s*)("|').*?\2)|(?:[^"'][^ >]+))/gi ,
77
+ ProtectUrlsArea : /<area(?=\s).*?\shref=((?:(?:\s*)("|').*?\2)|(?:[^"'][^ >]+))/gi ,
77
78
 
78
79
  Html4DocType : /HTML 4\.0 Transitional/i ,
79
80
  DocTypeTag : /<!DOCTYPE[^>]*>/i ,
@@ -92,5 +93,7 @@ InvalidSelfCloseTags : /(<(?!base|meta|link|hr|br|param|img|area|input)([a-zA-Z0
92
93
  // name is returned with $2.
93
94
  StyleVariableAttName : /#\(\s*("|')(.+?)\1[^\)]*\s*\)/g,
94
95
 
95
- RegExp : /^\/(.*)\/([gim]*)$/
96
+ RegExp : /^\/(.*)\/([gim]*)$/,
97
+
98
+ HtmlTag : /<[^\s<>](?:"[^"]*"|'[^']*'|[^<])*>/
96
99
  } ;
@@ -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
  *
@@ -21,7 +21,7 @@
21
21
  * Active selection functions.
22
22
  */
23
23
 
24
- var FCKSelection = FCK.Selection =
24
+ var FCKSelection = FCK.Selection =
25
25
  {
26
26
  GetParentBlock : function()
27
27
  {
@@ -34,7 +34,7 @@ var FCKSelection = FCK.Selection =
34
34
  }
35
35
  return retval ;
36
36
  },
37
-
37
+
38
38
  ApplyStyle : function( styleDefinition )
39
39
  {
40
40
  FCKStyles.ApplyStyle( new FCKStyle( styleDefinition ) ) ;
@@ -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,7 +30,7 @@ FCKSelection.GetType = function()
30
30
  // Check if the actual selection is a Control (IMG, TABLE, HR, etc...).
31
31
 
32
32
  var sel ;
33
- try { sel = FCK.EditorWindow.getSelection() ; } catch (e) {}
33
+ try { sel = this.GetSelection() ; } catch (e) {}
34
34
 
35
35
  if ( sel && sel.rangeCount == 1 )
36
36
  {
@@ -51,27 +51,19 @@ FCKSelection.GetType = function()
51
51
  // element (object like and image or a table) is selected.
52
52
  FCKSelection.GetSelectedElement = function()
53
53
  {
54
- var selectedElement = null ;
54
+ var selection = !!FCK.EditorWindow && this.GetSelection() ;
55
+ if ( !selection || selection.rangeCount < 1 )
56
+ return null ;
55
57
 
56
- var selection = !!FCK.EditorWindow && FCK.EditorWindow.getSelection() ;
58
+ var range = selection.getRangeAt( 0 ) ;
59
+ if ( range.startContainer != range.endContainer || range.startContainer.nodeType != 1 || range.startOffset != range.endOffset - 1 )
60
+ return null ;
57
61
 
58
- if ( selection && selection.anchorNode && selection.anchorNode.nodeType == 1 )
59
- {
60
- // This one is good for all browsers, expect Safari Mac.
61
- selectedElement = selection.anchorNode.childNodes[ selection.anchorOffset ] ;
62
-
63
- // For Safari (Mac only), the anchor node for a control selection is
64
- // the control itself, which seams logic. FF and Opera use the parent
65
- // as the anchor node, pointing to the control with the offset.
66
- // As FF created the selection "standard", Safari would do better by
67
- // following their steps.
68
- if ( !selectedElement )
69
- selectedElement = selection.anchorNode ;
70
- else if ( selectedElement.nodeType != 1 )
71
- return null ;
72
- }
62
+ var node = range.startContainer.childNodes[ range.startOffset ] ;
63
+ if ( node.nodeType != 1 )
64
+ return null ;
73
65
 
74
- return selectedElement ;
66
+ return node ;
75
67
  }
76
68
 
77
69
  FCKSelection.GetParentElement = function()
@@ -80,7 +72,7 @@ FCKSelection.GetParentElement = function()
80
72
  return FCKSelection.GetSelectedElement().parentNode ;
81
73
  else
82
74
  {
83
- var oSel = FCK.EditorWindow.getSelection() ;
75
+ var oSel = this.GetSelection() ;
84
76
  if ( oSel )
85
77
  {
86
78
  // make the common case fast - for collapsed/nearly collapsed selections just return anchor.parent.
@@ -125,7 +117,7 @@ FCKSelection.GetBoundaryParentElement = function( startBoundary )
125
117
  return FCKSelection.GetSelectedElement().parentNode ;
126
118
  else
127
119
  {
128
- var oSel = FCK.EditorWindow.getSelection() ;
120
+ var oSel = this.GetSelection() ;
129
121
  if ( oSel && oSel.rangeCount > 0 )
130
122
  {
131
123
  var range = oSel.getRangeAt( startBoundary ? 0 : ( oSel.rangeCount - 1 ) ) ;
@@ -143,14 +135,14 @@ FCKSelection.SelectNode = function( element )
143
135
  var oRange = FCK.EditorDocument.createRange() ;
144
136
  oRange.selectNode( element ) ;
145
137
 
146
- var oSel = FCK.EditorWindow.getSelection() ;
138
+ var oSel = this.GetSelection() ;
147
139
  oSel.removeAllRanges() ;
148
140
  oSel.addRange( oRange ) ;
149
141
  }
150
142
 
151
143
  FCKSelection.Collapse = function( toStart )
152
144
  {
153
- var oSel = FCK.EditorWindow.getSelection() ;
145
+ var oSel = this.GetSelection() ;
154
146
 
155
147
  if ( toStart == null || toStart === true )
156
148
  oSel.collapseToStart() ;
@@ -164,7 +156,7 @@ FCKSelection.HasAncestorNode = function( nodeTagName )
164
156
  var oContainer = this.GetSelectedElement() ;
165
157
  if ( ! oContainer && FCK.EditorWindow )
166
158
  {
167
- try { oContainer = FCK.EditorWindow.getSelection().getRangeAt(0).startContainer ; }
159
+ try { oContainer = this.GetSelection().getRangeAt(0).startContainer ; }
168
160
  catch(e){}
169
161
  }
170
162
 
@@ -184,7 +176,7 @@ FCKSelection.MoveToAncestorNode = function( nodeTagName )
184
176
 
185
177
  var oContainer = this.GetSelectedElement() ;
186
178
  if ( ! oContainer )
187
- oContainer = FCK.EditorWindow.getSelection().getRangeAt(0).startContainer ;
179
+ oContainer = this.GetSelection().getRangeAt(0).startContainer ;
188
180
 
189
181
  while ( oContainer )
190
182
  {
@@ -199,7 +191,7 @@ FCKSelection.MoveToAncestorNode = function( nodeTagName )
199
191
  FCKSelection.Delete = function()
200
192
  {
201
193
  // Gets the actual selection.
202
- var oSel = FCK.EditorWindow.getSelection() ;
194
+ var oSel = this.GetSelection() ;
203
195
 
204
196
  // Deletes the actual selection contents.
205
197
  for ( var i = 0 ; i < oSel.rangeCount ; i++ )
@@ -209,3 +201,20 @@ FCKSelection.Delete = function()
209
201
 
210
202
  return oSel ;
211
203
  }
204
+
205
+ /**
206
+ * Returns the native selection object.
207
+ */
208
+ FCKSelection.GetSelection = function()
209
+ {
210
+ return FCK.EditorWindow.getSelection() ;
211
+ }
212
+
213
+ // The following are IE only features (we don't need then in other browsers
214
+ // currently).
215
+ FCKSelection.Save = function()
216
+ {}
217
+ FCKSelection.Restore = function()
218
+ {}
219
+ FCKSelection.Release = function()
220
+ {}
@@ -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
  *
@@ -28,11 +28,11 @@ FCKSelection.GetType = function()
28
28
  // So we'd better check the object returned by createRange() rather than by looking at the type.
29
29
  try
30
30
  {
31
- var ieType = FCK.EditorDocument.selection.type ;
31
+ var ieType = FCKSelection.GetSelection().type ;
32
32
  if ( ieType == 'Control' || ieType == 'Text' )
33
33
  return ieType ;
34
34
 
35
- if ( FCK.EditorDocument.selection.createRange().parentElement )
35
+ if ( this.GetSelection().createRange().parentElement )
36
36
  return 'Text' ;
37
37
  }
38
38
  catch(e)
@@ -49,10 +49,10 @@ FCKSelection.GetSelectedElement = function()
49
49
  {
50
50
  if ( this.GetType() == 'Control' )
51
51
  {
52
- var oRange = FCK.EditorDocument.selection.createRange() ;
52
+ var oRange = this.GetSelection().createRange() ;
53
53
 
54
54
  if ( oRange && oRange.item )
55
- return FCK.EditorDocument.selection.createRange().item(0) ;
55
+ return this.GetSelection().createRange().item(0) ;
56
56
  }
57
57
  return null ;
58
58
  } ;
@@ -69,7 +69,7 @@ FCKSelection.GetParentElement = function()
69
69
  return null ;
70
70
 
71
71
  default :
72
- return FCK.EditorDocument.selection.createRange().parentElement() ;
72
+ return this.GetSelection().createRange().parentElement() ;
73
73
  }
74
74
  } ;
75
75
 
@@ -86,12 +86,12 @@ FCKSelection.GetBoundaryParentElement = function( startBoundary )
86
86
 
87
87
  default :
88
88
  var doc = FCK.EditorDocument ;
89
-
89
+
90
90
  var range = doc.selection.createRange() ;
91
91
  range.collapse( startBoundary !== false ) ;
92
-
92
+
93
93
  var el = range.parentElement() ;
94
-
94
+
95
95
  // It may happen that range is comming from outside "doc", so we
96
96
  // must check it (#1204).
97
97
  return FCKTools.GetElementDocument( el ) == doc ? el : null ;
@@ -101,7 +101,7 @@ FCKSelection.GetBoundaryParentElement = function( startBoundary )
101
101
  FCKSelection.SelectNode = function( node )
102
102
  {
103
103
  FCK.Focus() ;
104
- FCK.EditorDocument.selection.empty() ;
104
+ this.GetSelection().empty() ;
105
105
  var oRange ;
106
106
  try
107
107
  {
@@ -124,7 +124,7 @@ FCKSelection.Collapse = function( toStart )
124
124
  FCK.Focus() ;
125
125
  if ( this.GetType() == 'Text' )
126
126
  {
127
- var oRange = FCK.EditorDocument.selection.createRange() ;
127
+ var oRange = this.GetSelection().createRange() ;
128
128
  oRange.collapse( toStart == null || toStart === true ) ;
129
129
  oRange.select() ;
130
130
  }
@@ -135,13 +135,13 @@ FCKSelection.HasAncestorNode = function( nodeTagName )
135
135
  {
136
136
  var oContainer ;
137
137
 
138
- if ( FCK.EditorDocument.selection.type == "Control" )
138
+ if ( this.GetSelection().type == "Control" )
139
139
  {
140
140
  oContainer = this.GetSelectedElement() ;
141
141
  }
142
142
  else
143
143
  {
144
- var oRange = FCK.EditorDocument.selection.createRange() ;
144
+ var oRange = this.GetSelection().createRange() ;
145
145
  oContainer = oRange.parentElement() ;
146
146
  }
147
147
 
@@ -162,9 +162,9 @@ FCKSelection.MoveToAncestorNode = function( nodeTagName )
162
162
  if ( ! FCK.EditorDocument )
163
163
  return null ;
164
164
 
165
- if ( FCK.EditorDocument.selection.type == "Control" )
165
+ if ( this.GetSelection().type == "Control" )
166
166
  {
167
- oRange = FCK.EditorDocument.selection.createRange() ;
167
+ oRange = this.GetSelection().createRange() ;
168
168
  for ( i = 0 ; i < oRange.length ; i++ )
169
169
  {
170
170
  if (oRange(i).parentNode)
@@ -176,7 +176,7 @@ FCKSelection.MoveToAncestorNode = function( nodeTagName )
176
176
  }
177
177
  else
178
178
  {
179
- oRange = FCK.EditorDocument.selection.createRange() ;
179
+ oRange = this.GetSelection().createRange() ;
180
180
  oNode = oRange.parentElement() ;
181
181
  }
182
182
 
@@ -189,7 +189,7 @@ FCKSelection.MoveToAncestorNode = function( nodeTagName )
189
189
  FCKSelection.Delete = function()
190
190
  {
191
191
  // Gets the actual selection.
192
- var oSel = FCK.EditorDocument.selection ;
192
+ var oSel = this.GetSelection() ;
193
193
 
194
194
  // Deletes the actual selection contents.
195
195
  if ( oSel.type.toLowerCase() != "none" )
@@ -199,3 +199,77 @@ FCKSelection.Delete = function()
199
199
 
200
200
  return oSel ;
201
201
  } ;
202
+
203
+ /**
204
+ * Returns the native selection object.
205
+ */
206
+ FCKSelection.GetSelection = function()
207
+ {
208
+ this.Restore() ;
209
+ return FCK.EditorDocument.selection ;
210
+ }
211
+
212
+ FCKSelection.Save = function()
213
+ {
214
+ // Ensures the editor has the selection focus. (#1801)
215
+ FCK.Focus() ;
216
+
217
+ var editorDocument = FCK.EditorDocument ;
218
+
219
+ if ( !editorDocument )
220
+ return ;
221
+
222
+ var selection = editorDocument.selection ;
223
+ var range ;
224
+
225
+ if ( selection )
226
+ {
227
+ range = selection.createRange() ;
228
+
229
+ // Ensure that the range comes from the editor document.
230
+ if ( range )
231
+ {
232
+ if ( range.parentElement && FCKTools.GetElementDocument( range.parentElement() ) != editorDocument )
233
+ range = null ;
234
+ else if ( range.item && FCKTools.GetElementDocument( range.item(0) )!= editorDocument )
235
+ range = null ;
236
+ }
237
+ }
238
+
239
+ this.SelectionData = range ;
240
+ }
241
+
242
+ FCKSelection._GetSelectionDocument = function( selection )
243
+ {
244
+ var range = selection.createRange() ;
245
+ if ( !range )
246
+ return null;
247
+ else if ( range.item )
248
+ return FCKTools.GetElementDocument( range.item( 0 ) ) ;
249
+ else
250
+ return FCKTools.GetElementDocument( range.parentElement() ) ;
251
+ }
252
+
253
+ FCKSelection.Restore = function()
254
+ {
255
+ if ( this.SelectionData )
256
+ {
257
+ FCK.IsSelectionChangeLocked = true ;
258
+
259
+ try
260
+ {
261
+ // Don't repeat the restore process if the editor document is already selected.
262
+ if ( this._GetSelectionDocument( FCK.EditorDocument.selection ) == FCK.EditorDocument )
263
+ return ;
264
+ this.SelectionData.select() ;
265
+ }
266
+ catch ( e ) {}
267
+
268
+ FCK.IsSelectionChangeLocked = false ;
269
+ }
270
+ }
271
+
272
+ FCKSelection.Release = function()
273
+ {
274
+ delete this.SelectionData ;
275
+ }
@@ -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
  *
@@ -37,7 +37,7 @@ var FCKStyles = FCK.Styles =
37
37
  style.ApplyToObject( FCKSelection.GetSelectedElement() ) ;
38
38
  else
39
39
  style.ApplyToSelection( FCK.EditorWindow ) ;
40
-
40
+
41
41
  FCK.Events.FireEvent( 'OnSelectionChange' ) ;
42
42
  }
43
43
  },
@@ -88,7 +88,7 @@ var FCKStyles = FCK.Styles =
88
88
  var style = styles[ styleName ] ;
89
89
  var state = style.CheckActive( path ) ;
90
90
 
91
- if ( style._LastState != state )
91
+ if ( state != ( style._LastState || null ) )
92
92
  {
93
93
  style._LastState = state ;
94
94
 
@@ -210,6 +210,8 @@ var FCKStyles = FCK.Styles =
210
210
  // Remove elements nodes that match with this style rules.
211
211
  if ( tagsRegex.test( currentNode.nodeName ) )
212
212
  FCKDomTools.RemoveNode( currentNode, true ) ;
213
+ else
214
+ FCKDomTools.RemoveAttributes( currentNode, FCKConfig.RemoveAttributesArray );
213
215
 
214
216
  currentNode = nextNode ;
215
217
  }
@@ -218,7 +220,7 @@ var FCKStyles = FCK.Styles =
218
220
 
219
221
  FCK.Events.FireEvent( 'OnSelectionChange' ) ;
220
222
  },
221
-
223
+
222
224
  GetStyle : function( styleName )
223
225
  {
224
226
  return this.GetStyles()[ styleName ] ;
@@ -229,14 +231,14 @@ var FCKStyles = FCK.Styles =
229
231
  var styles = this._GetStyles ;
230
232
  if ( !styles )
231
233
  {
232
- styles = this._GetStyles = FCKTools.Merge(
234
+ styles = this._GetStyles = FCKTools.Merge(
233
235
  this._LoadStylesCore(),
234
236
  this._LoadStylesCustom(),
235
237
  this._LoadStylesXml() ) ;
236
238
  }
237
239
  return styles ;
238
240
  },
239
-
241
+
240
242
  CheckHasObjectStyle : function( elementName )
241
243
  {
242
244
  return !!this._ObjectStyles[ elementName ] ;
@@ -264,7 +266,10 @@ var FCKStyles = FCK.Styles =
264
266
  if ( styleDefs )
265
267
  {
266
268
  for ( var styleName in styleDefs )
267
- styles[ styleName ] = new FCKStyle( styleDefs[ styleName ] ) ;
269
+ {
270
+ var style = styles[ styleName ] = new FCKStyle( styleDefs[ styleName ] ) ;
271
+ style.Name = styleName ;
272
+ }
268
273
  }
269
274
 
270
275
  return styles ;
@@ -282,12 +287,16 @@ var FCKStyles = FCK.Styles =
282
287
  // Load the XML file into a FCKXml object.
283
288
  var xml = new FCKXml() ;
284
289
  xml.LoadUrl( stylesXmlPath ) ;
285
-
290
+
286
291
  var stylesXmlObj = FCKXml.TransformToObject( xml.SelectSingleNode( 'Styles' ) ) ;
287
292
 
288
293
  // Get the "Style" nodes defined in the XML file.
289
294
  var styleNodes = stylesXmlObj.$Style ;
290
295
 
296
+ // Check that it did contain some valid nodes
297
+ if ( !styleNodes )
298
+ return styles ;
299
+
291
300
  // Add each style to our "Styles" collection.
292
301
  for ( var i = 0 ; i < styleNodes.length ; i++ )
293
302
  {
@@ -325,16 +334,16 @@ var FCKStyles = FCK.Styles =
325
334
 
326
335
  // Load override definitions.
327
336
  var cssStyleOverrideNodes = styleNode.$Override ;
328
- if ( cssStyleOverrideNodes )
337
+ if ( cssStyleOverrideNodes )
329
338
  {
330
339
  for ( j = 0 ; j < cssStyleOverrideNodes.length ; j++ )
331
340
  {
332
341
  var overrideNode = cssStyleOverrideNodes[j] ;
333
- var overrideDef =
342
+ var overrideDef =
334
343
  {
335
344
  Element : overrideNode.element
336
345
  } ;
337
-
346
+
338
347
  var overrideAttNode = overrideNode.$Attribute ;
339
348
  if ( overrideAttNode )
340
349
  {
@@ -352,14 +361,14 @@ var FCKStyles = FCK.Styles =
352
361
  overrideDef.Attributes[ overrideAttNode[k].name ] = overrideAttValue ;
353
362
  }
354
363
  }
355
-
364
+
356
365
  styleDef.Overrides.push( overrideDef ) ;
357
366
  }
358
367
  }
359
368
 
360
369
  var style = new FCKStyle( styleDef ) ;
361
370
  style.Name = styleNode.name || element ;
362
-
371
+
363
372
  if ( style.GetType() == FCK_STYLE_OBJECT )
364
373
  this._ObjectStyles[ element ] = true ;
365
374