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,5 +1,7 @@
1
1
  <% @page_heading = _('Create Text Filter') %>
2
- <% subtabs_for(:sidebar) %>
2
+ <% content_for('tasks') do %>
3
+ <%= task_overview %>
4
+ <% end %>
3
5
  <% form_tag({ :action => "new" }, :id => "textfilter_form") do %>
4
6
 
5
7
  <div class="admin">
@@ -1,7 +1,7 @@
1
1
  <% @page_heading = _("Trackbacks for") + " #{ link_to h(@article.title), :controller => '/admin/content', :action => 'show', :id => @article }" %>
2
2
 
3
3
  <% content_for('tasks') do %>
4
- <%= task_edit _('Edit this trackback'), @trackback.id %>
4
+ <%= task_overview %>
5
5
  <% end %>
6
6
 
7
7
  <div class="form">
@@ -1,7 +1,7 @@
1
1
  <% @page_heading = _('Users') %>
2
2
 
3
3
  <% content_for('tasks') do %>
4
- <%= task_show _('Show this user'), @user.id %>
4
+ <%= task_overview %>
5
5
  <% end %>
6
6
 
7
7
  <h3><%= _("Really delete user")%> "<%= @user.name || @user.login %>" ?</h3>
@@ -1,9 +1,5 @@
1
1
  <% @page_heading = _('Edit User') %>
2
- <% content_for('tasks') do %>
3
- <%= task_overview %>
4
- <%= tab _("New User"), :controller=>"users", :action=>"new"%>
5
- <% end%>
6
-
2
+ <% subtabs_for(:users) %>
7
3
  <% form_tag :action=>"edit", :id => @user.id do %>
8
4
 
9
5
  <div class="admin">
@@ -1,4 +1,4 @@
1
- <% @page_heading = _('Users') + ' <span> &raquo; '+ link_to('add new', :action=>'new') +'</span>'%>
1
+ <% @page_heading = _('Users') + ' <span> &raquo; '+ link_to('add new', :action=>'new') +'</span>' %>
2
2
  <% subtabs_for(:users) %>
3
3
 
4
4
  <div class="list">
@@ -0,0 +1,3 @@
1
+ <li>
2
+ <%= _("Opps, something wrong happened, the comment could not be saved")%>
3
+ </li>
@@ -65,8 +65,8 @@ AccessControl.map :require => [ :admin, :publisher ] do |map|
65
65
  end
66
66
 
67
67
  map.project_module :feedback, nil do |project|
68
- project.menu _("Feedback"), { :controller => "admin/feedback", :action => "index" }
69
- project.submenu _("Unapproved comments"), { :controller => "admin/feedback", :action => "index" }
68
+ project.menu _("Feedback"), { :controller => "admin/feedback", :confirmed => "f" }
69
+ project.submenu _("Unapproved comments"), { :controller => "admin/feedback", :confirmed => "f" }
70
70
  project.submenu _("Limit to spam"), { :controller => "admin/feedback", :published => "f" }
71
71
  project.submenu _("Blacklist"), { :controller => "admin/blacklist", :action => "index" }
72
72
  project.submenu _(""), { :controller => "admin/comments", :action => "show" }
@@ -88,7 +88,6 @@ AccessControl.map :require => [ :admin, :publisher ] do |map|
88
88
 
89
89
  map.project_module :sidebar, "admin/sidebar" do |project|
90
90
  project.menu _("Sidebar"), { :action => "index" }
91
- project.submenu _("Text Filters"), { :controller => "textfilters", :action => "index" }
92
91
  end
93
92
 
94
93
  map.project_module :users, "admin/users" do |project|
@@ -104,6 +103,7 @@ AccessControl.map :require => [ :admin, :publisher ] do |map|
104
103
  project.submenu _("Feedback"), { :controller => "admin/settings", :action => "feedback" }
105
104
  project.submenu _("Spam"), { :controller => "admin/settings", :action => "spam" }
106
105
  project.submenu _("Podcasts"), { :controller => "admin/settings", :action => "podcast" }
106
+ project.submenu _("Text Filters"), { :controller => "admin/textfilters", :action => "index" }
107
107
  project.submenu _("Empty Fragment Cache"), { :controller => "admin/cache", :action => "sweep" }
108
108
  project.submenu _("Rebuild cached HTML"), { :controller => "admin/cache", :action => "sweep_html" }
109
109
  end
@@ -0,0 +1,17 @@
1
+ class AddUsersToNonAdmins < ActiveRecord::Migration
2
+ class Profile < ActiveRecord::Base
3
+ include BareMigration
4
+
5
+ serialize :profiles
6
+ end
7
+
8
+ def self.up
9
+ Profile.find_by_label("publisher").update_attributes(:modules => [:dashboard, :write, :content, :feedback, :users ])
10
+ Profile.find_by_label("contributor").update_attributes(:modules => [:dashboard, :users ])
11
+ end
12
+
13
+ def self.down
14
+ Profile.find_by_label("publisher").update_attributes(:modules => [:dashboard, :write, :content, :feedback ])
15
+ Profile.find_by_label("contributor").update_attributes(:modules => [])
16
+ end
17
+ end
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  rails-environment: production
3
- database: sqlite
3
+ database: mysql
4
4
  web-server: mongrel
5
5
  threads: 2
@@ -1,7 +1,7 @@
1
1
  require 'rake/gempackagetask'
2
2
  require 'rake/contrib/rubyforgepublisher'
3
3
 
4
- PKG_VERSION = "5.0.3.98.1"
4
+ PKG_VERSION = "5.1"
5
5
  PKG_NAME = "typo"
6
6
  PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
7
7
  RUBY_FORGE_PROJECT = 'typo'
@@ -33,14 +33,14 @@ spec = Gem::Specification.new do |s|
33
33
  s.add_dependency("rails", "= 2.0.2")
34
34
  s.add_dependency("mongrel", ">= 1.1.3")
35
35
  s.add_dependency("mongrel_cluster", ">= 0.2.0")
36
- s.add_dependency("sqlite3-ruby", ">= 1.1.0")
36
+ s.add_dependency("mysql", ">= 2.7")
37
37
  s.add_dependency("rails-app-installer", ">= 0.2.0")
38
38
  s.add_dependency("ruby-debug", ">= 0.10.1")
39
39
  s.add_dependency("flexmock", ">= 0.8.2")
40
40
  end
41
41
 
42
42
  Rake::GemPackageTask.new(spec) do |p|
43
- # p.gem_spec = spec
43
+ p.gem_spec = spec
44
44
  p.need_tar = true
45
45
  p.need_zip = true
46
46
  end
@@ -1 +1 @@
1
- TYPO_VERSION = '5.0.3.98.1'
1
+ TYPO_VERSION = '5.1'
Binary file
Binary file
@@ -1,3 +1,5 @@
1
+ // script.aculo.us controls.js v1.8.1, Thu Jan 03 22:07:12 -0500 2008
2
+
1
3
  // Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
2
4
  // (c) 2005-2007 Ivan Krstic (http://blogs.law.harvard.edu/ivan)
3
5
  // (c) 2005-2007 Jon Tirsen (http://www.tirsen.com)
@@ -1,3 +1,5 @@
1
+ // script.aculo.us dragdrop.js v1.8.1, Thu Jan 03 22:07:12 -0500 2008
2
+
1
3
  // Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
2
4
  // (c) 2005-2007 Sammi Williams (http://www.oriontransfer.co.nz, sammi@oriontransfer.co.nz)
3
5
  //
@@ -1,3 +1,5 @@
1
+ // script.aculo.us effects.js v1.8.1, Thu Jan 03 22:07:12 -0500 2008
2
+
1
3
  // Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
2
4
  // Contributors:
3
5
  // Justin Palmer (http://encytemedia.com/)
@@ -1074,11 +1076,11 @@ if (document.defaultView && document.defaultView.getComputedStyle) {
1074
1076
  Element.getStyles = function(element) {
1075
1077
  element = $(element);
1076
1078
  var css = element.currentStyle, styles;
1077
- styles = Element.CSS_PROPERTIES.inject({ }, function(hash, property) {
1078
- hash.set(property, css[property]);
1079
- return hash;
1079
+ styles = Element.CSS_PROPERTIES.inject({ }, function(results, property) {
1080
+ results[property] = css[property];
1081
+ return results;
1080
1082
  });
1081
- if (!styles.opacity) styles.set('opacity', element.getOpacity());
1083
+ if (!styles.opacity) styles.opacity = element.getOpacity();
1082
1084
  return styles;
1083
1085
  };
1084
1086
  };
@@ -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
  *
@@ -26,7 +26,7 @@ var FCKContextMenu = function( parentWindow, langDir )
26
26
  this.CtrlDisable = false ;
27
27
 
28
28
  var oPanel = this._Panel = new FCKPanel( parentWindow ) ;
29
- oPanel.AppendStyleSheet( FCKConfig.SkinPath + 'fck_editor.css' ) ;
29
+ oPanel.AppendStyleSheet( FCKConfig.SkinEditorCSS ) ;
30
30
  oPanel.IsContextMenu = true ;
31
31
 
32
32
  // The FCKTools.DisableSelection doesn't seems to work to avoid dragging of the icons in Mozilla
@@ -56,9 +56,13 @@ FCKContextMenu.prototype.SetMouseClickWindow = function( mouseClickWindow )
56
56
  }
57
57
  }
58
58
 
59
- FCKContextMenu.prototype.AddItem = function( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled )
59
+ /**
60
+ The customData parameter is just a value that will be send to the command that is executed,
61
+ so it's possible to reuse the same command for several items just by assigning different data for each one.
62
+ */
63
+ FCKContextMenu.prototype.AddItem = function( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData )
60
64
  {
61
- var oItem = this._MenuBlock.AddItem( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled) ;
65
+ var oItem = this._MenuBlock.AddItem( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData ) ;
62
66
  this._Redraw = true ;
63
67
  return oItem ;
64
68
  }
@@ -122,7 +126,7 @@ function FCKContextMenu_Document_OnMouseDown( e )
122
126
  var overrideButton = FCKContextMenu_OverrideButton ;
123
127
  if( !overrideButton )
124
128
  {
125
- var doc = e.target.ownerDocument ;
129
+ var doc = FCKTools.GetElementDocument( e.target ) ;
126
130
  overrideButton = FCKContextMenu_OverrideButton = doc.createElement('input') ;
127
131
  overrideButton.type = 'button' ;
128
132
  var buttonHolder = doc.createElement('p') ;
@@ -130,8 +134,8 @@ function FCKContextMenu_Document_OnMouseDown( e )
130
134
  buttonHolder.appendChild( overrideButton ) ;
131
135
  }
132
136
 
133
- overrideButton.style.cssText = 'position:absolute;top:' + ( e.clientY - 2 ) +
134
- 'px;left:' + ( e.clientX - 2 ) +
137
+ overrideButton.style.cssText = 'position:absolute;top:' + ( e.clientY - 2 ) +
138
+ 'px;left:' + ( e.clientX - 2 ) +
135
139
  'px;width:5px;height:5px;opacity:0.01' ;
136
140
  }
137
141
  el = el.parentNode ;
@@ -155,6 +159,7 @@ function FCKContextMenu_Document_OnMouseUp( e )
155
159
  return false ;
156
160
  }
157
161
  }
162
+ return true ;
158
163
  }
159
164
 
160
165
  function FCKContextMenu_AttachedElement_OnContextMenu( ev, fckContextMenu, el )
@@ -175,7 +180,7 @@ function FCKContextMenu_AttachedElement_OnContextMenu( ev, fckContextMenu, el )
175
180
  fckContextMenu._MenuBlock.Create( fckContextMenu._Panel.MainNode ) ;
176
181
  fckContextMenu._Redraw = false ;
177
182
  }
178
-
183
+
179
184
  // This will avoid that the content of the context menu can be dragged in IE
180
185
  // as the content of the panel is recreated we need to do it every time
181
186
  FCKTools.DisableSelection( fckContextMenu._Panel.Document.body ) ;
@@ -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
  *
@@ -116,4 +116,4 @@ FCKDataProcessor.prototype =
116
116
  {
117
117
  return html ;
118
118
  }
119
- } ;
119
+ } ;
@@ -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 @@ FCKDocumentFragment.prototype =
43
43
  {
44
44
  FCKDomTools.InsertAfterNode( existingNode, this.RootNode ) ;
45
45
  }
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
  *
@@ -55,4 +55,4 @@ FCKDocumentFragment.prototype =
55
55
  while( ( eLast = eRoot.lastChild ) )
56
56
  FCKDomTools.InsertAfterNode( existingNode, eRoot.removeChild( eLast ) ) ;
57
57
  }
58
- } ;
58
+ } ;
@@ -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
  *
@@ -98,12 +98,15 @@ FCKDomRange.prototype =
98
98
  this._UpdateElementInfo() ;
99
99
  return docFrag ;
100
100
  }
101
+ return null ;
101
102
  },
102
103
 
103
104
  CheckIsCollapsed : function()
104
105
  {
105
106
  if ( this._Range )
106
107
  return this._Range.collapsed ;
108
+
109
+ return false ;
107
110
  },
108
111
 
109
112
  Collapse : function( toStart )
@@ -145,12 +148,20 @@ FCKDomRange.prototype =
145
148
  // is "<p><b><i>^</i></b> Text</p>" (inside <i>).
146
149
  MoveToElementEditStart : function( targetElement )
147
150
  {
148
- var child ;
151
+ var editableElement ;
152
+
153
+ while ( targetElement && targetElement.nodeType == 1 )
154
+ {
155
+ if ( FCKDomTools.CheckIsEditable( targetElement ) )
156
+ editableElement = targetElement ;
157
+ else if ( editableElement )
158
+ break ; // If we already found an editable element, stop the loop.
149
159
 
150
- while ( ( child = targetElement.firstChild ) && child.nodeType == 1 && FCKListsLib.EmptyElements[ child.nodeName.toLowerCase() ] == null )
151
- targetElement = child ;
160
+ targetElement = targetElement.firstChild ;
161
+ }
152
162
 
153
- this.MoveToElementStart( targetElement ) ;
163
+ if ( editableElement )
164
+ this.MoveToElementStart( editableElement ) ;
154
165
  },
155
166
 
156
167
  InsertNode : function( node )
@@ -173,93 +184,150 @@ FCKDomRange.prototype =
173
184
  return ( eToolDiv.innerHTML.length == 0 ) ;
174
185
  },
175
186
 
187
+ /**
188
+ * Checks if the start boundary of the current range is "visually" (like a
189
+ * selection caret) at the beginning of the block. It means that some
190
+ * things could be brefore the range, like spaces or empty inline elements,
191
+ * but it would still be considered at the beginning of the block.
192
+ */
176
193
  CheckStartOfBlock : function()
177
194
  {
178
- var bIsStartOfBlock = this._Cache.IsStartOfBlock ;
195
+ var cache = this._Cache ;
196
+ var bIsStartOfBlock = cache.IsStartOfBlock ;
179
197
 
180
198
  if ( bIsStartOfBlock != undefined )
181
199
  return bIsStartOfBlock ;
182
200
 
183
- // Create a clone of the current range.
184
- var oTestRange = this.Clone() ;
201
+ // Take the block reference.
202
+ var block = this.StartBlock || this.StartBlockLimit ;
185
203
 
186
- // Collapse it to its start point.
187
- oTestRange.Collapse( true ) ;
204
+ var container = this._Range.startContainer ;
205
+ var offset = this._Range.startOffset ;
206
+ var currentNode ;
188
207
 
189
- // Move the start boundary to the start of the block.
190
- oTestRange.SetStart( oTestRange.StartBlock || oTestRange.StartBlockLimit, 1 ) ;
208
+ if ( offset > 0 )
209
+ {
210
+ // First, check the start container. If it is a text node, get the
211
+ // substring of the node value before the range offset.
212
+ if ( container.nodeType == 3 )
213
+ {
214
+ var textValue = container.nodeValue.substr( 0, offset ).Trim() ;
191
215
 
192
- if ( oTestRange.CheckIsCollapsed() )
193
- bIsStartOfBlock = true ;
194
- else
216
+ // If we have some text left in the container, we are not at
217
+ // the end for the block.
218
+ if ( textValue.length != 0 )
219
+ return cache.IsStartOfBlock = false ;
220
+ }
221
+ else
222
+ currentNode = container.childNodes[ offset - 1 ] ;
223
+ }
224
+
225
+ // We'll not have a currentNode if the container was a text node, or
226
+ // the offset is zero.
227
+ if ( !currentNode )
228
+ currentNode = FCKDomTools.GetPreviousSourceNode( container, true, null, block ) ;
229
+
230
+ while ( currentNode )
195
231
  {
196
- // Inserts the contents of the range in a div tag.
197
- var eToolDiv = oTestRange.Window.document.createElement( 'div' ) ;
198
- oTestRange._Range.cloneContents().AppendTo( eToolDiv ) ;
232
+ switch ( currentNode.nodeType )
233
+ {
234
+ case 1 :
235
+ // It's not an inline element.
236
+ if ( !FCKListsLib.InlineChildReqElements[ currentNode.nodeName.toLowerCase() ] )
237
+ return cache.IsStartOfBlock = false ;
199
238
 
200
- // This line is why we don't use CheckIsEmpty() here...
201
- // Because using RTrimNode() or TrimNode() would be incorrect -
202
- // TrimNode() and RTrimNode() would delete <br> nodes at the end of the div node,
203
- // but for checking start of block they are actually meaningful. (Bug #1350)
204
- FCKDomTools.LTrimNode( eToolDiv ) ;
239
+ break ;
205
240
 
206
- bIsStartOfBlock = ( eToolDiv.innerHTML.length == 0 ) ;
207
- }
241
+ case 3 :
242
+ // It's a text node with real text.
243
+ if ( currentNode.nodeValue.Trim().length > 0 )
244
+ return cache.IsStartOfBlock = false ;
245
+ }
208
246
 
209
- oTestRange.Release() ;
247
+ currentNode = FCKDomTools.GetPreviousSourceNode( currentNode, false, null, block ) ;
248
+ }
210
249
 
211
- return ( this._Cache.IsStartOfBlock = bIsStartOfBlock ) ;
250
+ return cache.IsStartOfBlock = true ;
212
251
  },
213
252
 
253
+ /**
254
+ * Checks if the end boundary of the current range is "visually" (like a
255
+ * selection caret) at the end of the block. It means that some things
256
+ * could be after the range, like spaces, empty inline elements, or a
257
+ * single <br>, but it would still be considered at the end of the block.
258
+ */
214
259
  CheckEndOfBlock : function( refreshSelection )
215
260
  {
216
- var bIsEndOfBlock = this._Cache.IsEndOfBlock ;
261
+ var isEndOfBlock = this._Cache.IsEndOfBlock ;
217
262
 
218
- if ( bIsEndOfBlock != undefined )
219
- return bIsEndOfBlock ;
263
+ if ( isEndOfBlock != undefined )
264
+ return isEndOfBlock ;
220
265
 
221
- // Create a clone of the current range.
222
- var oTestRange = this.Clone() ;
266
+ // Take the block reference.
267
+ var block = this.EndBlock || this.EndBlockLimit ;
223
268
 
224
- // Collapse it to its end point.
225
- oTestRange.Collapse( false ) ;
269
+ var container = this._Range.endContainer ;
270
+ var offset = this._Range.endOffset ;
271
+ var currentNode ;
226
272
 
227
- // Move the end boundary to the end of the block.
228
- oTestRange.SetEnd( oTestRange.EndBlock || oTestRange.EndBlockLimit, 2 ) ;
273
+ // First, check the end container. If it is a text node, get the
274
+ // substring of the node value after the range offset.
275
+ if ( container.nodeType == 3 )
276
+ {
277
+ var textValue = container.nodeValue ;
278
+ if ( offset < textValue.length )
279
+ {
280
+ textValue = textValue.substr( offset ) ;
229
281
 
230
- bIsEndOfBlock = oTestRange.CheckIsCollapsed() ;
282
+ // If we have some text left in the container, we are not at
283
+ // the end for the block.
284
+ if ( textValue.Trim().length != 0 )
285
+ return this._Cache.IsEndOfBlock = false ;
286
+ }
287
+ }
288
+ else
289
+ currentNode = container.childNodes[ offset ] ;
290
+
291
+ // We'll not have a currentNode if the container was a text node, of
292
+ // the offset is out the container children limits (after it probably).
293
+ if ( !currentNode )
294
+ currentNode = FCKDomTools.GetNextSourceNode( container, true, null, block ) ;
231
295
 
232
- if ( !bIsEndOfBlock )
296
+ var hadBr = false ;
297
+
298
+ while ( currentNode )
233
299
  {
234
- // Inserts the contents of the range in a div tag.
235
- var eToolDiv = this.Window.document.createElement( 'div' ) ;
236
- oTestRange._Range.cloneContents().AppendTo( eToolDiv ) ;
237
- FCKDomTools.TrimNode( eToolDiv ) ;
238
-
239
- // Find out if we are in an empty tree of inline elements, like <b><i><span></span></i></b>
240
- bIsEndOfBlock = true ;
241
- var eLastChild = eToolDiv ;
242
- while ( ( eLastChild = eLastChild.lastChild ) )
300
+ switch ( currentNode.nodeType )
243
301
  {
244
- // Check the following:
245
- // 1. Is there more than one node in the parents children?
246
- // 2. Is the node not an element node?
247
- // 3. Is it not a inline element.
248
- if ( eLastChild.previousSibling || eLastChild.nodeType != 1 || FCKListsLib.InlineChildReqElements[ eLastChild.nodeName.toLowerCase() ] == null )
249
- {
250
- // So we are not in the end of the range.
251
- bIsEndOfBlock = false ;
252
- break ;
253
- }
302
+ case 1 :
303
+ var nodeName = currentNode.nodeName.toLowerCase() ;
304
+
305
+ // It's an inline element.
306
+ if ( FCKListsLib.InlineChildReqElements[ nodeName ] )
307
+ break ;
308
+
309
+ // It is the first <br> found.
310
+ if ( nodeName == 'br' && !hadBr )
311
+ {
312
+ hadBr = true ;
313
+ break ;
314
+ }
315
+
316
+ return this._Cache.IsEndOfBlock = false ;
317
+
318
+ case 3 :
319
+ // It's a text node with real text.
320
+ if ( currentNode.nodeValue.Trim().length > 0 )
321
+ return this._Cache.IsEndOfBlock = false ;
254
322
  }
255
- }
256
323
 
257
- oTestRange.Release() ;
324
+ currentNode = FCKDomTools.GetNextSourceNode( currentNode, false, null, block ) ;
325
+ }
258
326
 
259
327
  if ( refreshSelection )
260
328
  this.Select() ;
261
329
 
262
- return this._Cache.IsEndOfBlock = bIsEndOfBlock ;
330
+ return this._Cache.IsEndOfBlock = true ;
263
331
  },
264
332
 
265
333
  // This is an "intrusive" way to create a bookmark. It includes <span> tags
@@ -320,7 +388,7 @@ FCKDomRange.prototype =
320
388
  oBookmark.StartNode = eStartSpan ;
321
389
  oBookmark.EndNode = eEndSpan ;
322
390
  }
323
-
391
+
324
392
  // Update the range position.
325
393
  if ( eEndSpan )
326
394
  {
@@ -329,7 +397,7 @@ FCKDomRange.prototype =
329
397
  }
330
398
  else
331
399
  this.MoveToPosition( eStartSpan, 4 ) ;
332
-
400
+
333
401
  return oBookmark ;
334
402
  },
335
403
 
@@ -382,22 +450,58 @@ FCKDomRange.prototype =
382
450
  "Start" : [ this._Range.startOffset ],
383
451
  "End" : [ this._Range.endOffset ]
384
452
  } ;
453
+ // Since we're treating the document tree as normalized, we need to backtrack the text lengths
454
+ // of previous text nodes into the offset value.
385
455
  var curStart = this._Range.startContainer.previousSibling ;
386
456
  var curEnd = this._Range.endContainer.previousSibling ;
457
+
458
+ // Also note that the node that we use for "address base" would change during backtracking.
459
+ var addrStart = this._Range.startContainer ;
460
+ var addrEnd = this._Range.endContainer ;
387
461
  while ( curStart && curStart.nodeType == 3 )
388
462
  {
389
463
  bookmark.Start[0] += curStart.length ;
464
+ addrStart = curStart ;
390
465
  curStart = curStart.previousSibling ;
391
466
  }
392
467
  while ( curEnd && curEnd.nodeType == 3 )
393
468
  {
394
469
  bookmark.End[0] += curEnd.length ;
470
+ addrEnd = curEnd ;
395
471
  curEnd = curEnd.previousSibling ;
396
472
  }
473
+
474
+ // If the object pointed to by the startOffset and endOffset are text nodes, we need
475
+ // to backtrack and add in the text offset to the bookmark addresses.
476
+ if ( addrStart.nodeType == 1 && addrStart.childNodes[bookmark.Start[0]] && addrStart.childNodes[bookmark.Start[0]].nodeType == 3 )
477
+ {
478
+ var curNode = addrStart.childNodes[bookmark.Start[0]] ;
479
+ var offset = 0 ;
480
+ while ( curNode.previousSibling && curNode.previousSibling.nodeType == 3 )
481
+ {
482
+ curNode = curNode.previousSibling ;
483
+ offset += curNode.length ;
484
+ }
485
+ addrStart = curNode ;
486
+ bookmark.Start[0] = offset ;
487
+ }
488
+ if ( addrEnd.nodeType == 1 && addrEnd.childNodes[bookmark.End[0]] && addrEnd.childNodes[bookmark.End[0]].nodeType == 3 )
489
+ {
490
+ var curNode = addrEnd.childNodes[bookmark.End[0]] ;
491
+ var offset = 0 ;
492
+ while ( curNode.previousSibling && curNode.previousSibling.nodeType == 3 )
493
+ {
494
+ curNode = curNode.previousSibling ;
495
+ offset += curNode.length ;
496
+ }
497
+ addrEnd = curNode ;
498
+ bookmark.End[0] = offset ;
499
+ }
500
+
397
501
  // Then, we record down the precise position of the container nodes
398
502
  // by walking up the DOM tree and counting their childNode index
399
- bookmark.Start = FCKDomTools.GetNodeAddress( this._Range.startContainer, true ).concat( bookmark.Start ) ;
400
- bookmark.End = FCKDomTools.GetNodeAddress( this._Range.endContainer, true ).concat( bookmark.End ) ;
503
+ bookmark.Start = FCKDomTools.GetNodeAddress( addrStart, true ).concat( bookmark.Start ) ;
504
+ bookmark.End = FCKDomTools.GetNodeAddress( addrEnd, true ).concat( bookmark.End ) ;
401
505
  return bookmark;
402
506
  },
403
507
 
@@ -530,7 +634,7 @@ FCKDomRange.prototype =
530
634
 
531
635
  if ( oNode.nodeType != 1 )
532
636
  oNode = oNode.previousSibling ? null : oNode.parentNode ;
533
-
637
+
534
638
  if ( oNode )
535
639
  {
536
640
  while ( FCKListsLib.InlineNonEmptyElements[ oNode.nodeName.toLowerCase() ] )
@@ -643,7 +747,7 @@ FCKDomRange.prototype =
643
747
  * It returns and object with the following properties:
644
748
  * - PreviousBlock : a reference to the block element that preceeds
645
749
  * the range after the split.
646
- * - NextBlock : a reference to the block element that preceeds the
750
+ * - NextBlock : a reference to the block element that follows the
647
751
  * range after the split.
648
752
  * - WasStartOfBlock : a boolean indicating that the range was
649
753
  * originaly at the start of the block.
@@ -654,8 +758,10 @@ FCKDomRange.prototype =
654
758
  * and the PreviousBlock value will be null. The same is valid for the
655
759
  * NextBlock value if the range was at the end of the block.
656
760
  */
657
- SplitBlock : function()
761
+ SplitBlock : function( forceBlockTag )
658
762
  {
763
+ var blockTag = forceBlockTag || FCKConfig.EnterMode ;
764
+
659
765
  if ( !this._Range )
660
766
  this.MoveToSelection() ;
661
767
 
@@ -665,17 +771,18 @@ FCKDomRange.prototype =
665
771
  // Get the current blocks.
666
772
  var eStartBlock = this.StartBlock ;
667
773
  var eEndBlock = this.EndBlock ;
774
+ var oElementPath = null ;
668
775
 
669
- if ( FCKConfig.EnterMode != 'br' )
776
+ if ( blockTag != 'br' )
670
777
  {
671
778
  if ( !eStartBlock )
672
779
  {
673
- eStartBlock = this.FixBlock( true ) ;
780
+ eStartBlock = this.FixBlock( true, blockTag ) ;
674
781
  eEndBlock = this.EndBlock ; // FixBlock may have fixed the EndBlock too.
675
782
  }
676
783
 
677
784
  if ( !eEndBlock )
678
- eEndBlock = this.FixBlock( false ) ;
785
+ eEndBlock = this.FixBlock( false, blockTag ) ;
679
786
  }
680
787
 
681
788
  // Get the range position.
@@ -690,11 +797,13 @@ FCKDomRange.prototype =
690
797
  {
691
798
  if ( bIsEndOfBlock )
692
799
  {
800
+ oElementPath = new FCKElementPath( this.StartContainer ) ;
693
801
  this.MoveToPosition( eEndBlock, 4 ) ;
694
802
  eEndBlock = null ;
695
803
  }
696
804
  else if ( bIsStartOfBlock )
697
805
  {
806
+ oElementPath = new FCKElementPath( this.StartContainer ) ;
698
807
  this.MoveToPosition( eStartBlock, 3 ) ;
699
808
  eStartBlock = null ;
700
809
  }
@@ -727,7 +836,8 @@ FCKDomRange.prototype =
727
836
  PreviousBlock : eStartBlock,
728
837
  NextBlock : eEndBlock,
729
838
  WasStartOfBlock : bIsStartOfBlock,
730
- WasEndOfBlock : bIsEndOfBlock
839
+ WasEndOfBlock : bIsEndOfBlock,
840
+ ElementPath : oElementPath
731
841
  } ;
732
842
  }
733
843
 
@@ -735,7 +845,7 @@ FCKDomRange.prototype =
735
845
  },
736
846
 
737
847
  // Transform a block without a block tag in a valid block (orphan text in the body or td, usually).
738
- FixBlock : function( isStart )
848
+ FixBlock : function( isStart, blockTag )
739
849
  {
740
850
  // Bookmark the range so we can restore it later.
741
851
  var oBookmark = this.CreateBookmark() ;
@@ -747,7 +857,7 @@ FCKDomRange.prototype =
747
857
  this.Expand( 'block_contents' ) ;
748
858
 
749
859
  // Create the fixed block.
750
- var oFixedBlock = this.Window.document.createElement( FCKConfig.EnterMode ) ;
860
+ var oFixedBlock = this.Window.document.createElement( blockTag ) ;
751
861
 
752
862
  // Move the contents of the temporary range to the fixed block.
753
863
  this.ExtractContents().AppendTo( oFixedBlock ) ;
@@ -783,26 +893,26 @@ FCKDomRange.prototype =
783
893
  {
784
894
  return !!this._Range ;
785
895
  },
786
-
896
+
787
897
  GetTouchedStartNode : function()
788
898
  {
789
899
  var range = this._Range ;
790
900
  var container = range.startContainer ;
791
-
901
+
792
902
  if ( range.collapsed || container.nodeType != 1 )
793
903
  return container ;
794
-
904
+
795
905
  return container.childNodes[ range.startOffset ] || container ;
796
906
  },
797
-
907
+
798
908
  GetTouchedEndNode : function()
799
909
  {
800
910
  var range = this._Range ;
801
911
  var container = range.endContainer ;
802
-
912
+
803
913
  if ( range.collapsed || container.nodeType != 1 )
804
914
  return container ;
805
-
915
+
806
916
  return container.childNodes[ range.endOffset - 1 ] || container ;
807
917
  }
808
918
  } ;