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
  *
@@ -131,17 +131,19 @@ function FCKConfig_PreProcess()
131
131
  if ( !oConfig.PluginsPath.EndsWith('/') )
132
132
  oConfig.PluginsPath += '/' ;
133
133
 
134
- // EditorAreaCSS accepts a single path string, a list of paths separated by
135
- // a comma or and array of paths.
136
- // In the string cases, transform it in an array.
137
- if ( typeof( oConfig.EditorAreaCSS ) == 'string' )
138
- oConfig.EditorAreaCSS = oConfig.EditorAreaCSS.split(',') ;
139
-
134
+ // If no ToolbarComboPreviewCSS, point it to EditorAreaCSS.
140
135
  var sComboPreviewCSS = oConfig.ToolbarComboPreviewCSS ;
141
136
  if ( !sComboPreviewCSS || sComboPreviewCSS.length == 0 )
142
137
  oConfig.ToolbarComboPreviewCSS = oConfig.EditorAreaCSS ;
143
- else if ( typeof( sComboPreviewCSS ) == 'string' )
144
- oConfig.ToolbarComboPreviewCSS = [ sComboPreviewCSS ] ;
138
+
139
+ // Turn the attributes that will be removed in the RemoveFormat from a string to an array
140
+ oConfig.RemoveAttributesArray = (oConfig.RemoveAttributes || '').split( ',' );
141
+
142
+ if ( !FCKConfig.SkinEditorCSS || FCKConfig.SkinEditorCSS.length == 0 )
143
+ FCKConfig.SkinEditorCSS = FCKConfig.SkinPath + 'fck_editor.css' ;
144
+
145
+ if ( !FCKConfig.SkinDialogCSS || FCKConfig.SkinDialogCSS.length == 0 )
146
+ FCKConfig.SkinDialogCSS = FCKConfig.SkinPath + 'fck_dialog.css' ;
145
147
  }
146
148
 
147
149
  // Define toolbar sets collection.
@@ -174,10 +176,7 @@ FCKConfig.ProtectedSource.RegexEntries = [
174
176
  /<script[\s\S]*?<\/script>/gi,
175
177
 
176
178
  // <noscript> tags (get lost in IE and messed up in FF).
177
- /<noscript[\s\S]*?<\/noscript>/gi,
178
-
179
- // Protect <object> tags. See #359.
180
- /<object[\s\S]+?<\/object>/gi
179
+ /<noscript[\s\S]*?<\/noscript>/gi
181
180
  ] ;
182
181
 
183
182
  FCKConfig.ProtectedSource.Add = function( regexPattern )
@@ -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,4 +53,4 @@ FCKDebug.OutputObject = function( anyObject, color )
53
53
  this._GetWindow().OutputObject( anyObject, color ) ;
54
54
  }
55
55
  catch ( e ) {} // Ignore errors
56
- }
56
+ }
@@ -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,18 +21,214 @@
21
21
  * Dialog windows operations.
22
22
  */
23
23
 
24
- var FCKDialog = new Object() ;
25
-
26
- // This method opens a dialog window using the standard dialog template.
27
- FCKDialog.OpenDialog = function( dialogName, dialogTitle, dialogPage, width, height, customValue, parentWindow, resizable )
24
+ var FCKDialog = ( function()
28
25
  {
29
- // Setup the dialog info.
30
- var oDialogInfo = new Object() ;
31
- oDialogInfo.Title = dialogTitle ;
32
- oDialogInfo.Page = dialogPage ;
33
- oDialogInfo.Editor = window ;
34
- oDialogInfo.CustomValue = customValue ; // Optional
35
-
36
- var sUrl = FCKConfig.BasePath + 'fckdialog.html' ;
37
- this.Show( oDialogInfo, dialogName, sUrl, width, height, parentWindow, resizable ) ;
38
- }
26
+ var topDialog ;
27
+ var baseZIndex ;
28
+ var cover ;
29
+
30
+ // The document that holds the dialog.
31
+ var topWindow = window.parent ;
32
+
33
+ while ( topWindow.parent && topWindow.parent != topWindow )
34
+ {
35
+ try
36
+ {
37
+ if ( topWindow.parent.document.domain != document.domain )
38
+ break ;
39
+ if ( topWindow.parent.document.getElementsByTagName( 'frameset' ).length > 0 )
40
+ break ;
41
+ }
42
+ catch ( e )
43
+ {
44
+ break ;
45
+ }
46
+ topWindow = topWindow.parent ;
47
+ }
48
+
49
+ var topDocument = topWindow.document ;
50
+
51
+ var getZIndex = function()
52
+ {
53
+ if ( !baseZIndex )
54
+ baseZIndex = FCKConfig.FloatingPanelsZIndex + 999 ;
55
+ return ++baseZIndex ;
56
+ }
57
+
58
+ // TODO : This logic is not actually working when reducing the window, only
59
+ // when enlarging it.
60
+ var resizeHandler = function()
61
+ {
62
+ if ( !cover )
63
+ return ;
64
+
65
+ var relElement = FCKTools.IsStrictMode( topDocument ) ? topDocument.documentElement : topDocument.body ;
66
+
67
+ FCKDomTools.SetElementStyles( cover,
68
+ {
69
+ 'width' : Math.max( relElement.scrollWidth,
70
+ relElement.clientWidth,
71
+ topDocument.scrollWidth || 0 ) - 1 + 'px',
72
+ 'height' : Math.max( relElement.scrollHeight,
73
+ relElement.clientHeight,
74
+ topDocument.scrollHeight || 0 ) - 1 + 'px'
75
+ } ) ;
76
+ }
77
+
78
+ var resetStyles = function( element )
79
+ {
80
+ element.style.cssText = 'margin:0;' +
81
+ 'padding:0;' +
82
+ 'border:0;' +
83
+ 'background-color:transparent;' +
84
+ 'background-image:none;' ;
85
+ }
86
+
87
+ return {
88
+ /**
89
+ * Opens a dialog window using the standard dialog template.
90
+ */
91
+ OpenDialog : function( dialogName, dialogTitle, dialogPage, width, height, customValue, parentWindow, resizable )
92
+ {
93
+ if ( !topDialog )
94
+ this.DisplayMainCover() ;
95
+
96
+ // Setup the dialog info to be passed to the dialog.
97
+ var dialogInfo =
98
+ {
99
+ Title : dialogTitle,
100
+ Page : dialogPage,
101
+ Editor : window,
102
+ CustomValue : customValue, // Optional
103
+ TopWindow : topWindow
104
+ }
105
+
106
+ FCK.ToolbarSet.CurrentInstance.Selection.Save() ;
107
+
108
+ // Calculate the dialog position, centering it on the screen.
109
+ var viewSize = FCKTools.GetViewPaneSize( topWindow ) ;
110
+ var scrollPosition = FCKTools.GetScrollPosition( topWindow ) ;
111
+ var iTop = Math.max( scrollPosition.Y + ( viewSize.Height - height - 20 ) / 2, 0 ) ;
112
+ var iLeft = Math.max( scrollPosition.X + ( viewSize.Width - width - 20 ) / 2, 0 ) ;
113
+
114
+ // Setup the IFRAME that will hold the dialog.
115
+ var dialog = topDocument.createElement( 'iframe' ) ;
116
+ resetStyles( dialog ) ;
117
+ dialog.src = FCKConfig.BasePath + 'fckdialog.html' ;
118
+
119
+ // Dummy URL for testing whether the code in fckdialog.js alone leaks memory.
120
+ // dialog.src = 'about:blank';
121
+
122
+ dialog.frameBorder = 0 ;
123
+ dialog.allowTransparency = true ;
124
+ FCKDomTools.SetElementStyles( dialog,
125
+ {
126
+ 'position' : 'absolute',
127
+ 'top' : iTop + 'px',
128
+ 'left' : iLeft + 'px',
129
+ 'width' : width + 'px',
130
+ 'height' : height + 'px',
131
+ 'zIndex' : getZIndex()
132
+ } ) ;
133
+
134
+ // Save the dialog info to be used by the dialog page once loaded.
135
+ dialog._DialogArguments = dialogInfo ;
136
+
137
+ // Append the IFRAME to the target document.
138
+ topDocument.body.appendChild( dialog ) ;
139
+
140
+ // Keep record of the dialog's parent/child relationships.
141
+ dialog._ParentDialog = topDialog ;
142
+ topDialog = dialog ;
143
+ },
144
+
145
+ /**
146
+ * (For internal use)
147
+ * Called when the top dialog is closed.
148
+ */
149
+ OnDialogClose : function( dialogWindow )
150
+ {
151
+ var dialog = dialogWindow.frameElement ;
152
+ FCKDomTools.RemoveNode( dialog ) ;
153
+
154
+ if ( dialog._ParentDialog ) // Nested Dialog.
155
+ {
156
+ topDialog = dialog._ParentDialog ;
157
+ dialog._ParentDialog.contentWindow.SetEnabled( true ) ;
158
+ }
159
+ else // First Dialog.
160
+ {
161
+ // Set the Focus in the browser, so the "OnBlur" event is not
162
+ // fired. In IE, there is no need to do that because the dialog
163
+ // already moved the selection to the editing area before
164
+ // closing (EnsureSelection). Also, the Focus() call here
165
+ // causes memory leak on IE7 (weird).
166
+ if ( !FCKBrowserInfo.IsIE )
167
+ FCK.Focus() ;
168
+
169
+ this.HideMainCover() ;
170
+ // Bug #1918: Assigning topDialog = null directly causes IE6 to crash.
171
+ setTimeout( function(){ topDialog = null ; }, 0 ) ;
172
+
173
+ // Release the previously saved selection.
174
+ FCK.ToolbarSet.CurrentInstance.Selection.Release() ;
175
+ }
176
+ },
177
+
178
+ DisplayMainCover : function()
179
+ {
180
+ // Setup the DIV that will be used to cover.
181
+ cover = topDocument.createElement( 'div' ) ;
182
+ resetStyles( cover ) ;
183
+ FCKDomTools.SetElementStyles( cover,
184
+ {
185
+ 'position' : 'absolute',
186
+ 'zIndex' : getZIndex(),
187
+ 'top' : '0px',
188
+ 'left' : '0px',
189
+ 'backgroundColor' : FCKConfig.BackgroundBlockerColor
190
+ } ) ;
191
+ FCKDomTools.SetOpacity( cover, FCKConfig.BackgroundBlockerOpacity ) ;
192
+
193
+ // For IE6-, we need to fill the cover with a transparent IFRAME,
194
+ // to properly block <select> fields.
195
+ if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 )
196
+ {
197
+ var iframe = topDocument.createElement( 'iframe' ) ;
198
+ resetStyles( iframe ) ;
199
+ iframe.hideFocus = true ;
200
+ iframe.frameBorder = 0 ;
201
+ iframe.src = FCKTools.GetVoidUrl() ;
202
+ FCKDomTools.SetElementStyles( iframe,
203
+ {
204
+ 'width' : '100%',
205
+ 'height' : '100%',
206
+ 'position' : 'absolute',
207
+ 'left' : '0px',
208
+ 'top' : '0px',
209
+ 'filter' : 'progid:DXImageTransform.Microsoft.Alpha(opacity=0)'
210
+ } ) ;
211
+ cover.appendChild( iframe ) ;
212
+ }
213
+
214
+ // We need to manually adjust the cover size on resize.
215
+ FCKTools.AddEventListener( topWindow, 'resize', resizeHandler ) ;
216
+ resizeHandler() ;
217
+
218
+ topDocument.body.appendChild( cover ) ;
219
+
220
+ FCKFocusManager.Lock() ;
221
+ },
222
+
223
+ HideMainCover : function()
224
+ {
225
+ FCKDomTools.RemoveNode( cover ) ;
226
+ FCKFocusManager.Unlock() ;
227
+ },
228
+
229
+ GetCover : function()
230
+ {
231
+ return cover ;
232
+ }
233
+ } ;
234
+ } )() ;
@@ -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,14 +33,17 @@ FCKDocumentProcessor.AppendNew = function()
33
33
 
34
34
  FCKDocumentProcessor.Process = function( document )
35
35
  {
36
+ var bIsDirty = FCK.IsDirty() ;
36
37
  var oProcessor, i = 0 ;
37
38
  while( ( oProcessor = this._Items[i++] ) )
38
39
  oProcessor.ProcessDocument( document ) ;
40
+ if ( !bIsDirty )
41
+ FCK.ResetIsDirty() ;
39
42
  }
40
43
 
41
44
  var FCKDocumentProcessor_CreateFakeImage = function( fakeClass, realElement )
42
45
  {
43
- var oImg = FCK.EditorDocument.createElement( 'IMG' ) ;
46
+ var oImg = FCKTools.GetElementDocument( realElement ).createElement( 'IMG' ) ;
44
47
  oImg.className = fakeClass ;
45
48
  oImg.src = FCKConfig.FullBasePath + 'images/spacer.gif' ;
46
49
  oImg.setAttribute( '_fckfakelement', 'true', 0 ) ;
@@ -118,50 +121,62 @@ FCKPageBreaksProcessor.ProcessDocument = function( document )
118
121
  */
119
122
  }
120
123
 
121
- // Flash Embeds.
122
- var FCKFlashProcessor = FCKDocumentProcessor.AppendNew() ;
123
- FCKFlashProcessor.ProcessDocument = function( document )
124
+ // EMBED and OBJECT tags.
125
+ FCKEmbedAndObjectProcessor = (function()
124
126
  {
125
- /*
126
- Sample code:
127
- This is some <embed src="/UserFiles/Flash/Yellow_Runners.swf"></embed><strong>sample text</strong>. You are&nbsp;<a name="fred"></a> using <a href="http://www.fckeditor.net/">FCKeditor</a>.
128
- */
127
+ var customProcessors = [] ;
129
128
 
130
- var aEmbeds = document.getElementsByTagName( 'EMBED' ) ;
131
-
132
- var oEmbed ;
133
- var i = aEmbeds.length - 1 ;
134
- while ( i >= 0 && ( oEmbed = aEmbeds[i--] ) )
129
+ var processElement = function( el )
135
130
  {
136
- // IE doesn't return the type attribute with oEmbed.type or oEmbed.getAttribute("type")
137
- // But it turns out that after accessing it then it doesn't gets copied later
138
- var oType = oEmbed.attributes[ 'type' ] ;
139
-
140
- // Check the extension and the type. Now it should be enough with just the type
141
- // Opera doesn't return oEmbed.src so oEmbed.src.EndsWith will fail
142
- if ( (oEmbed.src && oEmbed.src.EndsWith( '.swf', true )) || ( oType && oType.nodeValue == 'application/x-shockwave-flash' ) )
143
- {
144
- var oCloned = oEmbed.cloneNode( true ) ;
131
+ var clone = el.cloneNode( true ) ;
132
+ var replaceElement ;
133
+ var fakeImg = replaceElement = FCKDocumentProcessor_CreateFakeImage( 'FCK__UnknownObject', clone ) ;
134
+ FCKEmbedAndObjectProcessor.RefreshView( fakeImg, el ) ;
145
135
 
146
- var oImg = FCKDocumentProcessor_CreateFakeImage( 'FCK__Flash', oCloned ) ;
147
- oImg.setAttribute( '_fckflash', 'true', 0 ) ;
136
+ for ( var i = 0 ; i < customProcessors.length ; i++ )
137
+ replaceElement = customProcessors[i]( el, replaceElement ) || replaceElement ;
148
138
 
149
- FCKFlashProcessor.RefreshView( oImg, oEmbed ) ;
139
+ if ( replaceElement != fakeImg )
140
+ FCKTempBin.RemoveElement( fakeImg.getAttribute( '_fckrealelement' ) ) ;
150
141
 
151
- oEmbed.parentNode.insertBefore( oImg, oEmbed ) ;
152
- oEmbed.parentNode.removeChild( oEmbed ) ;
153
- }
142
+ el.parentNode.replaceChild( replaceElement, el ) ;
154
143
  }
155
- }
156
144
 
157
- FCKFlashProcessor.RefreshView = function( placeHolderImage, originalEmbed )
158
- {
159
- if ( originalEmbed.getAttribute( 'width' ) > 0 )
160
- placeHolderImage.style.width = FCKTools.ConvertHtmlSizeToStyle( originalEmbed.getAttribute( 'width' ) ) ;
145
+ return FCKTools.Merge( FCKDocumentProcessor.AppendNew(),
146
+ {
147
+ ProcessDocument : function( doc )
148
+ {
149
+ // Firefox 3 would sometimes throw an unknown exception while accessing EMBEDs and OBJECTs
150
+ // without the setTimeout().
151
+ FCKTools.RunFunction( function()
152
+ {
153
+ // Process OBJECTs first, since EMBEDs can sometimes go inside OBJECTS (e.g. Flash).
154
+ var aObjects = doc.getElementsByTagName( 'object' );
155
+ for ( var i = aObjects.length - 1 ; i >= 0 ; i-- )
156
+ processElement( aObjects[i] ) ;
157
+
158
+ // Now process any EMBEDs left.
159
+ var aEmbeds = doc.getElementsByTagName( 'embed' ) ;
160
+ for ( var i = aEmbeds.length - 1 ; i >= 0 ; i-- )
161
+ processElement( aEmbeds[i] ) ;
162
+ } ) ;
163
+ },
164
+
165
+ RefreshView : function( placeHolder, original )
166
+ {
167
+ if ( original.getAttribute( 'width' ) > 0 )
168
+ placeHolder.style.width = FCKTools.ConvertHtmlSizeToStyle( original.getAttribute( 'width' ) ) ;
161
169
 
162
- if ( originalEmbed.getAttribute( 'height' ) > 0 )
163
- placeHolderImage.style.height = FCKTools.ConvertHtmlSizeToStyle( originalEmbed.getAttribute( 'height' ) ) ;
164
- }
170
+ if ( original.getAttribute( 'height' ) > 0 )
171
+ placeHolder.style.height = FCKTools.ConvertHtmlSizeToStyle( original.getAttribute( 'height' ) ) ;
172
+ },
173
+
174
+ AddCustomHandler : function( func )
175
+ {
176
+ customProcessors.push( func ) ;
177
+ }
178
+ } ) ;
179
+ } )() ;
165
180
 
166
181
  FCK.GetRealElement = function( fakeElement )
167
182
  {
@@ -195,7 +210,7 @@ if ( FCKBrowserInfo.IsIE )
195
210
  // Create the replacement HR.
196
211
  var newHR = document.createElement( 'hr' ) ;
197
212
  newHR.mergeAttributes( eHR, true ) ;
198
-
213
+
199
214
  // We must insert the new one after it. insertBefore will not work in all cases.
200
215
  FCKDomTools.InsertAfterNode( eHR, newHR ) ;
201
216
 
@@ -222,4 +237,13 @@ FCKDocumentProcessor.AppendNew().ProcessDocument = function( document )
222
237
  oInput.parentNode.removeChild( oInput ) ;
223
238
  }
224
239
  }
225
- }
240
+ }
241
+
242
+ // Flash handler.
243
+ FCKEmbedAndObjectProcessor.AddCustomHandler( function( el, fakeImg )
244
+ {
245
+ if ( ! ( el.nodeName.IEquals( 'embed' ) && ( el.type == 'application/x-shockwave-flash' || /\.swf($|#|\?)/i.test( el.src ) ) ) )
246
+ return ;
247
+ fakeImg.className = 'FCK__Flash' ;
248
+ fakeImg.setAttribute( '_fckflash', 'true', 0 );
249
+ } ) ;
@@ -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
  *
@@ -23,6 +23,9 @@
23
23
 
24
24
  var FCKDomTools =
25
25
  {
26
+ /**
27
+ * Move all child nodes from one node to another.
28
+ */
26
29
  MoveChildren : function( source, target, toTargetStart )
27
30
  {
28
31
  if ( source == target )
@@ -116,7 +119,7 @@ var FCKDomTools =
116
119
  break ;
117
120
  }
118
121
 
119
- if ( !FCKBrowserInfo.IsIE )
122
+ if ( !FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsOpera )
120
123
  {
121
124
  eChildNode = node.lastChild ;
122
125
 
@@ -242,17 +245,19 @@ var FCKDomTools =
242
245
  * @param {string[]} ignoreElements An array of element names that
243
246
  * must be ignored during the search.
244
247
  */
245
- GetNextSourceElement : function( currentNode, ignoreSpaceTextOnly, stopSearchElements, ignoreElements )
248
+ GetNextSourceElement : function( currentNode, ignoreSpaceTextOnly, stopSearchElements, ignoreElements, startFromSibling )
246
249
  {
247
- while( ( currentNode = this.GetNextSourceNode( currentNode, true ) ) ) // Only one "=".
250
+ while( ( currentNode = this.GetNextSourceNode( currentNode, startFromSibling ) ) ) // Only one "=".
248
251
  {
249
252
  if ( currentNode.nodeType == 1 )
250
253
  {
251
254
  if ( stopSearchElements && currentNode.nodeName.IEquals( stopSearchElements ) )
252
255
  break ;
253
256
 
254
- if ( !ignoreElements || !currentNode.nodeName.IEquals( ignoreElements ) )
255
- return currentNode ;
257
+ if ( ignoreElements && currentNode.nodeName.IEquals( ignoreElements ) )
258
+ return this.GetNextSourceElement( currentNode, ignoreSpaceTextOnly, stopSearchElements, ignoreElements ) ;
259
+
260
+ return currentNode ;
256
261
  }
257
262
  else if ( ignoreSpaceTextOnly && currentNode.nodeType == 3 && currentNode.nodeValue.RTrim().length > 0 )
258
263
  break ;
@@ -264,7 +269,7 @@ var FCKDomTools =
264
269
  /*
265
270
  * Get the next DOM node available in source order.
266
271
  */
267
- GetNextSourceNode : function( currentNode, startFromSibling, nodeType, stopSearchElement )
272
+ GetNextSourceNode : function( currentNode, startFromSibling, nodeType, stopSearchNode )
268
273
  {
269
274
  if ( !currentNode )
270
275
  return null ;
@@ -275,14 +280,17 @@ var FCKDomTools =
275
280
  node = currentNode.firstChild ;
276
281
  else
277
282
  {
283
+ if ( stopSearchNode && currentNode == stopSearchNode )
284
+ return null ;
285
+
278
286
  node = currentNode.nextSibling ;
279
-
280
- if ( !node && ( !stopSearchElement || stopSearchElement != currentNode.parentNode ) )
281
- return this.GetNextSourceNode( currentNode.parentNode, true, nodeType, stopSearchElement ) ;
287
+
288
+ if ( !node && ( !stopSearchNode || stopSearchNode != currentNode.parentNode ) )
289
+ return this.GetNextSourceNode( currentNode.parentNode, true, nodeType, stopSearchNode ) ;
282
290
  }
283
291
 
284
292
  if ( nodeType && node && node.nodeType != nodeType )
285
- return this.GetNextSourceNode( node, false, nodeType, stopSearchElement ) ;
293
+ return this.GetNextSourceNode( node, false, nodeType, stopSearchNode ) ;
286
294
 
287
295
  return node ;
288
296
  },
@@ -290,7 +298,7 @@ var FCKDomTools =
290
298
  /*
291
299
  * Get the next DOM node available in source order.
292
300
  */
293
- GetPreviousSourceNode : function( currentNode, startFromSibling, nodeType )
301
+ GetPreviousSourceNode : function( currentNode, startFromSibling, nodeType, stopSearchNode )
294
302
  {
295
303
  if ( !currentNode )
296
304
  return null ;
@@ -300,10 +308,18 @@ var FCKDomTools =
300
308
  if ( !startFromSibling && currentNode.lastChild )
301
309
  node = currentNode.lastChild ;
302
310
  else
303
- node = ( currentNode.previousSibling || this.GetPreviousSourceNode( currentNode.parentNode, true, nodeType ) ) ;
311
+ {
312
+ if ( stopSearchNode && currentNode == stopSearchNode )
313
+ return null ;
314
+
315
+ node = currentNode.previousSibling ;
316
+
317
+ if ( !node && ( !stopSearchNode || stopSearchNode != currentNode.parentNode ) )
318
+ return this.GetPreviousSourceNode( currentNode.parentNode, true, nodeType, stopSearchNode ) ;
319
+ }
304
320
 
305
321
  if ( nodeType && node && node.nodeType != nodeType )
306
- return this.GetPreviousSourceNode( node, false, nodeType ) ;
322
+ return this.GetPreviousSourceNode( node, false, nodeType, stopSearchNode ) ;
307
323
 
308
324
  return node ;
309
325
  },
@@ -380,10 +396,29 @@ var FCKDomTools =
380
396
 
381
397
  EnforcePaddingNode : function( doc, tagName )
382
398
  {
399
+ // In IE it can happen when the page is reloaded that doc or doc.body is null, so exit here
400
+ try
401
+ {
402
+ if ( !doc || !doc.body )
403
+ return ;
404
+ }
405
+ catch (e)
406
+ {
407
+ return ;
408
+ }
409
+
383
410
  this.CheckAndRemovePaddingNode( doc, tagName, true ) ;
384
- if ( doc.body.lastChild && ( doc.body.lastChild.nodeType != 1
385
- || doc.body.lastChild.tagName.toLowerCase() == tagName.toLowerCase() ) )
411
+ try
412
+ {
413
+ if ( doc.body.lastChild && ( doc.body.lastChild.nodeType != 1
414
+ || doc.body.lastChild.tagName.toLowerCase() == tagName.toLowerCase() ) )
415
+ return ;
416
+ }
417
+ catch (e)
418
+ {
386
419
  return ;
420
+ }
421
+
387
422
  var node = doc.createElement( tagName ) ;
388
423
  if ( FCKBrowserInfo.IsGecko && FCKListsLib.NonEmptyBlockElements[ tagName ] )
389
424
  FCKTools.AppendBogusBr( node ) ;
@@ -405,14 +440,22 @@ var FCKDomTools =
405
440
  return ;
406
441
 
407
442
  // If the padding node is changed, remove its status as a padding node.
408
- if ( paddingNode.parentNode != doc.body
409
- || paddingNode.tagName.toLowerCase() != tagName
410
- || ( paddingNode.childNodes.length > 1 )
411
- || ( paddingNode.firstChild && paddingNode.firstChild.nodeValue != '\xa0'
412
- && String(paddingNode.firstChild.tagName).toLowerCase() != 'br' ) )
443
+ try
413
444
  {
414
- this.PaddingNode = null ;
415
- return ;
445
+ if ( paddingNode.parentNode != doc.body
446
+ || paddingNode.tagName.toLowerCase() != tagName
447
+ || ( paddingNode.childNodes.length > 1 )
448
+ || ( paddingNode.firstChild && paddingNode.firstChild.nodeValue != '\xa0'
449
+ && String(paddingNode.firstChild.tagName).toLowerCase() != 'br' ) )
450
+ {
451
+ this.PaddingNode = null ;
452
+ return ;
453
+ }
454
+ }
455
+ catch (e)
456
+ {
457
+ this.PaddingNode = null ;
458
+ return ;
416
459
  }
417
460
 
418
461
  // Now we're sure the padding node exists, and it is unchanged, and it
@@ -447,7 +490,7 @@ var FCKDomTools =
447
490
  {
448
491
  if ( FCKBrowserInfo.IsIE && attributes[i].nodeName == 'class' )
449
492
  {
450
- // IE has a strange bug. If calling removeAttribute('className'),
493
+ // IE has a strange bug. If calling removeAttribute('className'),
451
494
  // the attributes collection will still contain the "class"
452
495
  // attribute, which will be marked as "specified", even if the
453
496
  // outerHTML of the element is not displaying the class attribute.
@@ -474,6 +517,15 @@ var FCKDomTools =
474
517
  return element.removeAttribute( attributeName, 0 ) ;
475
518
  },
476
519
 
520
+ /**
521
+ * Removes an array of attributes from an element
522
+ */
523
+ RemoveAttributes : function (element, aAttributes )
524
+ {
525
+ for ( var i = 0 ; i < aAttributes.length ; i++ )
526
+ this.RemoveAttribute( element, aAttributes[i] );
527
+ },
528
+
477
529
  GetAttributeValue : function( element, att )
478
530
  {
479
531
  var attName = att ;
@@ -526,7 +578,7 @@ var FCKDomTools =
526
578
  * <b>This <i>is some<span /> sample</i> test text</b>
527
579
  * If element = <span />, we have these results:
528
580
  * <b>This <i>is some</i><span /><i> sample</i> test text</b> (If parent = <i>)
529
- * <b>This <i>is some</i></b><span /><b<i> sample</i> test text</b> (If parent = <b>)
581
+ * <b>This <i>is some</i></b><span /><b><i> sample</i> test text</b> (If parent = <b>)
530
582
  */
531
583
  BreakParent : function( element, parent, reusableRange )
532
584
  {
@@ -566,16 +618,16 @@ var FCKDomTools =
566
618
  GetNodeAddress : function( node, normalized )
567
619
  {
568
620
  var retval = [] ;
569
- while ( node && node != node.ownerDocument.documentElement )
621
+ while ( node && node != FCKTools.GetElementDocument( node ).documentElement )
570
622
  {
571
623
  var parentNode = node.parentNode ;
572
624
  var currentIndex = -1 ;
573
625
  for( var i = 0 ; i < parentNode.childNodes.length ; i++ )
574
626
  {
575
627
  var candidate = parentNode.childNodes[i] ;
576
- if ( normalized === true &&
577
- candidate.nodeType == 3 &&
578
- candidate.previousSibling &&
628
+ if ( normalized === true &&
629
+ candidate.nodeType == 3 &&
630
+ candidate.previousSibling &&
579
631
  candidate.previousSibling.nodeType == 3 )
580
632
  continue;
581
633
  currentIndex++ ;
@@ -724,7 +776,7 @@ var FCKDomTools =
724
776
  baseIndex = 0 ;
725
777
  if ( ! listArray || listArray.length < baseIndex + 1 )
726
778
  return null ;
727
- var doc = listArray[baseIndex].parent.ownerDocument ;
779
+ var doc = FCKTools.GetElementDocument( listArray[baseIndex].parent ) ;
728
780
  var retval = doc.createDocumentFragment() ;
729
781
  var rootNode = null ;
730
782
  var currentIndex = baseIndex ;
@@ -768,7 +820,7 @@ var FCKDomTools =
768
820
  currentListItem.appendChild( item.contents[i].cloneNode( true ) ) ;
769
821
  if ( currentListItem.nodeType == 11 )
770
822
  {
771
- if ( currentListItem.lastChild &&
823
+ if ( currentListItem.lastChild &&
772
824
  currentListItem.lastChild.getAttribute &&
773
825
  currentListItem.lastChild.getAttribute( 'type' ) == '_moz' )
774
826
  currentListItem.removeChild( currentListItem.lastChild );
@@ -842,7 +894,7 @@ var FCKDomTools =
842
894
 
843
895
  return node ;
844
896
  },
845
-
897
+
846
898
  /**
847
899
  * Checks if an element has no "useful" content inside of it
848
900
  * node tree. No "useful" content means empty text node or a signle empty
@@ -854,23 +906,23 @@ var FCKDomTools =
854
906
  {
855
907
  var child = element.firstChild ;
856
908
  var elementChild ;
857
-
909
+
858
910
  while ( child )
859
911
  {
860
912
  if ( child.nodeType == 1 )
861
913
  {
862
914
  if ( elementChild || !FCKListsLib.InlineNonEmptyElements[ child.nodeName.toLowerCase() ] )
863
915
  return false ;
864
-
916
+
865
917
  if ( !elementCheckCallback || elementCheckCallback( child ) === true )
866
918
  elementChild = child ;
867
919
  }
868
920
  else if ( child.nodeType == 3 && child.nodeValue.length > 0 )
869
921
  return false ;
870
-
922
+
871
923
  child = child.nextSibling ;
872
924
  }
873
-
925
+
874
926
  return elementChild ? this.CheckIsEmptyElement( elementChild, elementCheckCallback ) : true ;
875
927
  },
876
928
 
@@ -879,6 +931,94 @@ var FCKDomTools =
879
931
  var style = element.style ;
880
932
  for ( var styleName in styleDict )
881
933
  style[ styleName ] = styleDict[ styleName ] ;
934
+ },
935
+
936
+ SetOpacity : function( element, opacity )
937
+ {
938
+ if ( FCKBrowserInfo.IsIE )
939
+ {
940
+ opacity = Math.round( opacity * 100 ) ;
941
+ element.style.filter = ( opacity > 100 ? '' : 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + opacity + ')' ) ;
942
+ }
943
+ else
944
+ element.style.opacity = opacity ;
945
+ },
946
+
947
+ GetCurrentElementStyle : function( element, propertyName )
948
+ {
949
+ if ( FCKBrowserInfo.IsIE )
950
+ return element.currentStyle[ propertyName ] ;
951
+ else
952
+ return element.ownerDocument.defaultView.getComputedStyle( element, '' ).getPropertyValue( propertyName ) ;
953
+ },
954
+
955
+ GetPositionedAncestor : function( element )
956
+ {
957
+ var currentElement = element ;
958
+
959
+ while ( currentElement != FCKTools.GetElementDocument( currentElement ).documentElement )
960
+ {
961
+ if ( this.GetCurrentElementStyle( currentElement, 'position' ) != 'static' )
962
+ return currentElement ;
963
+
964
+ if ( currentElement == FCKTools.GetElementDocument( currentElement ).documentElement
965
+ && currentWindow != w )
966
+ currentElement = currentWindow.frameElement ;
967
+ else
968
+ currentElement = currentElement.parentNode ;
969
+ }
970
+
971
+ return null ;
972
+ },
973
+
974
+ /**
975
+ * Current implementation for ScrollIntoView (due to #1462). We don't have
976
+ * a complete implementation here, just the things that fit our needs.
977
+ */
978
+ ScrollIntoView : function( element, alignTop )
979
+ {
980
+ // Get the element window.
981
+ var window = FCKTools.GetElementWindow( element ) ;
982
+ var windowHeight = FCKTools.GetViewPaneSize( window ).Height ;
983
+
984
+ // Starts the offset that will be scrolled with the negative value of
985
+ // the visible window height.
986
+ var offset = windowHeight * -1 ;
987
+
988
+ // Appends the height it we are about to align the bottoms.
989
+ if ( alignTop === false )
990
+ {
991
+ offset += element.offsetHeight ;
992
+
993
+ // Consider the margin in the scroll, which is ok for our current
994
+ // needs, but needs investigation if we will be using this function
995
+ // in other places.
996
+ offset += parseInt( this.GetCurrentElementStyle( element, 'marginBottom' ) || 0, 10 ) ;
997
+ }
998
+
999
+ // Appends the offsets for the entire element hierarchy.
1000
+ offset += element.offsetTop ;
1001
+ while ( ( element = element.offsetParent ) )
1002
+ offset += element.offsetTop || 0 ;
1003
+
1004
+ // Scroll the window to the desired position, if not already visible.
1005
+ var currentScroll = FCKTools.GetScrollPosition( window ).Y ;
1006
+ if ( offset > 0 && offset > currentScroll )
1007
+ window.scrollTo( 0, offset ) ;
1008
+ },
1009
+
1010
+ /**
1011
+ * Check if the element can be edited inside the browser.
1012
+ */
1013
+ CheckIsEditable : function( element )
1014
+ {
1015
+ // Get the element name.
1016
+ var nodeName = element.nodeName.toLowerCase() ;
1017
+
1018
+ // Get the element DTD (defaults to span for unknown elements).
1019
+ var childDTD = FCK.DTD[ nodeName ] || FCK.DTD.span ;
1020
+
1021
+ // In the DTD # == text node.
1022
+ return ( childDTD['#'] && !FCKListsLib.NonEditableElements[ nodeName ] ) ;
882
1023
  }
883
1024
  } ;
884
-