typo 5.0.2 → 5.0.3.98

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1342) hide show
  1. data/CHANGES-5.0.4 +33 -0
  2. data/MAINTAINERS +4 -8
  3. data/README +10 -8
  4. data/{README.SIDEBARS → SIDEBARS} +0 -0
  5. data/app/apis/blogger_service.rb +2 -3
  6. data/app/apis/meta_weblog_service.rb +6 -7
  7. data/app/apis/movable_type_service.rb +6 -6
  8. data/app/controllers/accounts_controller.rb +9 -9
  9. data/app/controllers/admin/base_controller.rb +3 -22
  10. data/app/controllers/admin/blacklist_controller.rb +4 -4
  11. data/app/controllers/admin/cache_controller.rb +0 -9
  12. data/app/controllers/admin/categories_controller.rb +4 -8
  13. data/app/controllers/admin/comments_controller.rb +4 -4
  14. data/app/controllers/admin/content_controller.rb +44 -44
  15. data/app/controllers/admin/dashboard_controller.rb +8 -0
  16. data/app/controllers/admin/feedback_controller.rb +1 -2
  17. data/app/controllers/admin/pages_controller.rb +49 -24
  18. data/app/controllers/admin/resources_controller.rb +5 -5
  19. data/app/controllers/admin/settings_controller.rb +7 -0
  20. data/app/controllers/admin/sidebar_controller.rb +5 -8
  21. data/app/controllers/admin/tags_controller.rb +43 -0
  22. data/app/controllers/admin/themes_controller.rb +1 -0
  23. data/app/controllers/admin/trackbacks_controller.rb +4 -13
  24. data/app/controllers/admin/users_controller.rb +7 -13
  25. data/app/controllers/application.rb +2 -24
  26. data/app/controllers/articles_controller.rb +28 -23
  27. data/app/controllers/comments_controller.rb +4 -6
  28. data/app/controllers/content_controller.rb +1 -4
  29. data/app/controllers/feedback_controller.rb +12 -2
  30. data/app/controllers/grouping_controller.rb +7 -1
  31. data/app/controllers/redirect_controller.rb +6 -0
  32. data/app/controllers/theme_controller.rb +2 -3
  33. data/app/controllers/trackbacks_controller.rb +4 -6
  34. data/app/controllers/xml_controller.rb +1 -1
  35. data/app/helpers/admin/base_helper.rb +58 -9
  36. data/app/helpers/admin/content_helper.rb +7 -0
  37. data/app/helpers/admin/pages_helper.rb +21 -0
  38. data/app/helpers/admin/settings_helper.rb +1 -1
  39. data/app/helpers/application_helper.rb +11 -9
  40. data/app/helpers/content_helper.rb +5 -14
  41. data/app/helpers/sidebar_helper.rb +1 -1
  42. data/app/models/article.rb +81 -68
  43. data/app/models/blog.rb +14 -44
  44. data/app/models/blog_sweeper.rb +30 -10
  45. data/app/models/category.rb +1 -1
  46. data/app/models/comment.rb +0 -7
  47. data/app/models/content.rb +40 -18
  48. data/app/models/feedback.rb +8 -0
  49. data/app/models/notification_mailer.rb +8 -1
  50. data/app/models/page.rb +5 -0
  51. data/app/models/page_cache.rb +22 -7
  52. data/app/models/profile.rb +10 -0
  53. data/app/models/right.rb +4 -0
  54. data/app/models/sidebar.rb +10 -3
  55. data/app/models/tag.rb +20 -8
  56. data/app/models/trackback.rb +1 -1
  57. data/app/models/url_policy.rb +179 -0
  58. data/app/models/user.rb +30 -0
  59. data/app/views/accounts/login.html.erb +1 -1
  60. data/app/views/accounts/logout.html.erb +1 -1
  61. data/app/views/accounts/signup.html.erb +1 -1
  62. data/app/views/admin/blacklist/_blacklist_patterns.html.erb +2 -2
  63. data/app/views/admin/blacklist/_form.html.erb +13 -14
  64. data/app/views/admin/blacklist/_quick_post.html.erb +4 -13
  65. data/app/views/admin/blacklist/edit.html.erb +8 -11
  66. data/app/views/admin/blacklist/index.html.erb +10 -0
  67. data/app/views/admin/categories/_categories.html.erb +8 -8
  68. data/app/views/admin/categories/_form.html.erb +8 -3
  69. data/app/views/admin/categories/_quick_post.html.erb +1 -1
  70. data/app/views/admin/categories/edit.html.erb +3 -7
  71. data/app/views/admin/categories/index.html.erb +15 -0
  72. data/app/views/admin/comments/_form.html.erb +19 -18
  73. data/app/views/admin/comments/edit.html.erb +3 -7
  74. data/app/views/admin/comments/index.html.erb +30 -0
  75. data/app/views/admin/comments/show.html.erb +24 -8
  76. data/app/views/admin/content/_articles.html.erb +31 -10
  77. data/app/views/admin/content/_attachment.html.erb +18 -2
  78. data/app/views/admin/content/_form.html.erb +76 -86
  79. data/app/views/admin/content/_pages.html.erb +3 -3
  80. data/app/views/admin/content/edit.html.erb +2 -9
  81. data/app/views/admin/content/index.html.erb +17 -0
  82. data/app/views/admin/content/new.html.erb +1 -4
  83. data/app/views/admin/content/show.html.erb +2 -23
  84. data/app/views/admin/dashboard/_comments.html.erb +17 -0
  85. data/app/views/admin/dashboard/_overview.html.erb +4 -0
  86. data/app/views/admin/dashboard/_popular.html.erb +12 -0
  87. data/app/views/admin/dashboard/_posts.html.erb +15 -0
  88. data/app/views/admin/dashboard/_sysinfo.html.erb +13 -0
  89. data/app/views/admin/dashboard/_welcome.html.erb +3 -0
  90. data/app/views/admin/dashboard/index.html.erb +13 -57
  91. data/app/views/admin/feedback/index.html.erb +41 -0
  92. data/app/views/admin/pages/_form.html.erb +31 -35
  93. data/app/views/admin/pages/_pages.html.erb +48 -23
  94. data/app/views/admin/pages/edit.html.erb +3 -8
  95. data/app/views/admin/pages/index.html.erb +6 -0
  96. data/app/views/admin/pages/new.html.erb +2 -5
  97. data/app/views/admin/pages/show.html.erb +2 -12
  98. data/app/views/admin/resources/_resources.html.erb +6 -5
  99. data/app/views/admin/resources/index.html.erb +12 -0
  100. data/app/views/admin/settings/feedback.html.erb +1 -19
  101. data/app/views/admin/settings/index.html.erb +3 -23
  102. data/app/views/admin/settings/podcast.html.erb +1 -10
  103. data/app/views/admin/settings/read.html.erb +1 -10
  104. data/app/views/admin/settings/spam.html.erb +1 -10
  105. data/app/views/admin/settings/write.html.erb +2 -14
  106. data/app/views/admin/shared/_edit.html.erb +1 -4
  107. data/app/views/admin/sidebar/index.html.erb +11 -8
  108. data/app/views/admin/tags/_form.html.erb +4 -0
  109. data/app/views/admin/tags/_tags.html.erb +19 -0
  110. data/app/views/admin/tags/destroy.html.erb +11 -0
  111. data/app/views/admin/tags/edit.html.erb +13 -0
  112. data/app/views/admin/tags/index.html.erb +12 -0
  113. data/app/views/admin/textfilters/edit.html.erb +3 -5
  114. data/app/views/admin/textfilters/index.html.erb +12 -0
  115. data/app/views/admin/textfilters/macro_help.html.erb +1 -1
  116. data/app/views/admin/textfilters/new.html.erb +2 -8
  117. data/app/views/admin/textfilters/show.html.erb +1 -6
  118. data/app/views/admin/textfilters/show_help.html.erb +1 -5
  119. data/app/views/admin/themes/index.html.erb +19 -15
  120. data/app/views/admin/trackbacks/edit.html.erb +1 -4
  121. data/app/views/admin/trackbacks/index.html.erb +22 -0
  122. data/app/views/admin/users/_form.html.erb +0 -10
  123. data/app/views/admin/users/edit.html.erb +3 -6
  124. data/app/views/admin/users/index.html.erb +29 -0
  125. data/app/views/admin/users/new.html.erb +1 -4
  126. data/app/views/articles/_atom_feed.atom.builder +1 -1
  127. data/app/views/articles/archives.html.erb +2 -2
  128. data/app/views/articles/groupings.html.erb +1 -1
  129. data/app/views/layouts/administration.html.erb +44 -51
  130. data/app/views/notification_mailer/_mail_footer.html.erb +1 -1
  131. data/app/views/notification_mailer/article.html.erb +1 -1
  132. data/app/views/notification_mailer/comment.html.erb +1 -1
  133. data/app/views/notification_mailer/notif_user.html.erb +12 -0
  134. data/app/views/xml/_googlesitemap_item_category.googlesitemap.builder +1 -1
  135. data/config/environment.rb +0 -1
  136. data/config/environments/development.rb +5 -0
  137. data/config/initializers/access_rules.rb +110 -0
  138. data/config/initializers/active_record_hacks.rb +17 -0
  139. data/config/initializers/benchmark_hacks.rb +9 -0
  140. data/config/routes.rb +36 -15
  141. data/db/converters/README +2 -2
  142. data/db/migrate/004_add_sidebars.rb +8 -9
  143. data/db/migrate/067_remove_blog_ids.rb +22 -0
  144. data/db/migrate/068_fix_grants.rb +113 -0
  145. data/db/migrate/069_add_modules_to_profile.rb +18 -0
  146. data/db/schema.mysql-v3.sql +3 -217
  147. data/db/schema.mysql.sql +3 -217
  148. data/db/schema.postgresql.sql +3 -217
  149. data/db/schema.rb +32 -29
  150. data/db/schema.sqlite.sql +3 -217
  151. data/db/schema.sqlserver.sql +3 -231
  152. data/db/schema_version +1 -1
  153. data/lang/de_DE.rb +6 -9
  154. data/lang/en_US.rb +3 -0
  155. data/lang/es_MX.rb +556 -0
  156. data/lang/fr_FR.rb +171 -45
  157. data/lang/it_IT.rb +566 -0
  158. data/lang/ja_JP.rb +553 -0
  159. data/lang/pl_PL.rb +553 -0
  160. data/lang/ro_RO.rb +6 -10
  161. data/lib/sidebars/plugin.rb +1 -3
  162. data/lib/stateful.rb +6 -2
  163. data/lib/tasks/release.rake +3 -8
  164. data/lib/typo_version.rb +1 -1
  165. data/public/.DS_Store +0 -0
  166. data/public/.htaccess +1 -1
  167. data/public/images/admin/arrow_comment_group.gif +0 -0
  168. data/public/images/admin/typologo.gif +0 -0
  169. data/public/javascripts/controls.js +484 -354
  170. data/public/javascripts/dragdrop.js +88 -58
  171. data/public/javascripts/effects.js +396 -364
  172. data/public/javascripts/fckcustom.js +27 -0
  173. data/public/javascripts/fckeditor/editor/_source/classes/fckcontextmenu.js +209 -0
  174. data/public/javascripts/fckeditor/editor/_source/classes/fckdataprocessor.js +119 -0
  175. data/public/javascripts/fckeditor/editor/_source/classes/fckdocumentfragment_gecko.js +46 -0
  176. data/public/javascripts/fckeditor/editor/_source/classes/fckdocumentfragment_ie.js +58 -0
  177. data/public/javascripts/fckeditor/editor/_source/classes/fckdomrange.js +808 -0
  178. data/public/javascripts/fckeditor/editor/_source/classes/fckdomrange_gecko.js +103 -0
  179. data/public/javascripts/fckeditor/editor/_source/classes/fckdomrange_ie.js +198 -0
  180. data/public/javascripts/fckeditor/editor/_source/classes/fckdomrangeiterator.js +306 -0
  181. data/public/javascripts/fckeditor/editor/_source/classes/fckeditingarea.js +344 -0
  182. data/public/javascripts/fckeditor/editor/_source/classes/fckelementpath.js +70 -0
  183. data/public/javascripts/fckeditor/editor/_source/classes/fckenterkey.js +629 -0
  184. data/public/javascripts/fckeditor/editor/_source/classes/fckevents.js +66 -0
  185. data/public/javascripts/fckeditor/editor/_source/classes/fckicon.js +103 -0
  186. data/public/javascripts/fckeditor/editor/_source/classes/fckiecleanup.js +68 -0
  187. data/public/javascripts/fckeditor/editor/_source/classes/fckimagepreloader.js +64 -0
  188. data/public/javascripts/fckeditor/editor/_source/classes/fckkeystrokehandler.js +141 -0
  189. data/public/javascripts/fckeditor/editor/_source/classes/fckmenublock.js +150 -0
  190. data/public/javascripts/fckeditor/editor/_source/classes/fckmenublockpanel.js +54 -0
  191. data/public/javascripts/fckeditor/editor/_source/classes/fckmenuitem.js +160 -0
  192. data/public/javascripts/fckeditor/editor/_source/classes/fckpanel.js +338 -0
  193. data/public/javascripts/fckeditor/editor/_source/classes/fckplugin.js +56 -0
  194. data/public/javascripts/fckeditor/editor/_source/classes/fckspecialcombo.js +377 -0
  195. data/public/javascripts/fckeditor/editor/_source/classes/fckstyle.js +1280 -0
  196. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbar.js +103 -0
  197. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbreak_gecko.js +36 -0
  198. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbreak_ie.js +38 -0
  199. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbutton.js +76 -0
  200. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbuttonui.js +194 -0
  201. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarfontformatcombo.js +139 -0
  202. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarfontscombo.js +98 -0
  203. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarfontsizecombo.js +76 -0
  204. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarpanelbutton.js +92 -0
  205. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarspecialcombo.js +143 -0
  206. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarstylecombo.js +200 -0
  207. data/public/javascripts/fckeditor/editor/_source/classes/fckw3crange.js +447 -0
  208. data/public/javascripts/fckeditor/editor/_source/classes/fckxml.js +108 -0
  209. data/public/javascripts/fckeditor/editor/_source/classes/fckxml_gecko.js +87 -0
  210. data/public/javascripts/fckeditor/editor/_source/classes/fckxml_ie.js +88 -0
  211. data/public/javascripts/fckeditor/editor/_source/commandclasses/fck_othercommands.js +462 -0
  212. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckblockquotecommand.js +194 -0
  213. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckcorestylecommand.js +59 -0
  214. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckfitwindow.js +180 -0
  215. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckindentcommands.js +280 -0
  216. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckjustifycommands.js +173 -0
  217. data/public/javascripts/fckeditor/editor/_source/commandclasses/fcklistcommands.js +382 -0
  218. data/public/javascripts/fckeditor/editor/_source/commandclasses/fcknamedcommand.js +37 -0
  219. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckpasteplaintextcommand.js +38 -0
  220. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckpastewordcommand.js +40 -0
  221. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckremoveformatcommand.js +45 -0
  222. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckshowblocks.js +76 -0
  223. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckspellcheckcommand_gecko.js +39 -0
  224. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckspellcheckcommand_ie.js +67 -0
  225. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckstylecommand.js +60 -0
  226. data/public/javascripts/fckeditor/editor/_source/commandclasses/fcktablecommand.js +106 -0
  227. data/public/javascripts/fckeditor/editor/_source/commandclasses/fcktextcolorcommand.js +183 -0
  228. data/public/javascripts/fckeditor/editor/_source/fckconstants.js +56 -0
  229. data/public/javascripts/fckeditor/editor/_source/fckeditorapi.js +168 -0
  230. data/public/javascripts/fckeditor/editor/_source/fckjscoreextensions.js +166 -0
  231. data/public/javascripts/fckeditor/editor/_source/fckscriptloader.js +122 -0
  232. data/public/javascripts/fckeditor/editor/_source/internals/fck.js +1065 -0
  233. data/public/javascripts/fckeditor/editor/_source/internals/fck_contextmenu.js +325 -0
  234. data/public/javascripts/fckeditor/editor/_source/internals/fck_gecko.js +458 -0
  235. data/public/javascripts/fckeditor/editor/_source/internals/fck_ie.js +420 -0
  236. data/public/javascripts/fckeditor/editor/_source/internals/fckbrowserinfo.js +59 -0
  237. data/public/javascripts/fckeditor/editor/_source/internals/fckcodeformatter.js +100 -0
  238. data/public/javascripts/fckeditor/editor/_source/internals/fckcommands.js +167 -0
  239. data/public/javascripts/fckeditor/editor/_source/internals/fckconfig.js +239 -0
  240. data/public/javascripts/fckeditor/editor/_source/internals/fckdebug.js +56 -0
  241. data/public/javascripts/fckeditor/editor/_source/internals/fckdialog.js +38 -0
  242. data/public/javascripts/fckeditor/editor/_source/internals/fckdialog_gecko.js +103 -0
  243. data/public/javascripts/fckeditor/editor/_source/internals/fckdialog_ie.js +48 -0
  244. data/public/javascripts/fckeditor/editor/_source/internals/fckdocumentprocessor.js +225 -0
  245. data/public/javascripts/fckeditor/editor/_source/internals/fckdomtools.js +884 -0
  246. data/public/javascripts/fckeditor/editor/_source/internals/fcklanguagemanager.js +162 -0
  247. data/public/javascripts/fckeditor/editor/_source/internals/fcklisthandler.js +152 -0
  248. data/public/javascripts/fckeditor/editor/_source/internals/fcklistslib.js +60 -0
  249. data/public/javascripts/fckeditor/editor/_source/internals/fckplugins.js +46 -0
  250. data/public/javascripts/fckeditor/editor/_source/internals/fckregexlib.js +96 -0
  251. data/public/javascripts/fckeditor/editor/_source/internals/fckselection.js +42 -0
  252. data/public/javascripts/fckeditor/editor/_source/internals/fckselection_gecko.js +211 -0
  253. data/public/javascripts/fckeditor/editor/_source/internals/fckselection_ie.js +201 -0
  254. data/public/javascripts/fckeditor/editor/_source/internals/fckstyles.js +372 -0
  255. data/public/javascripts/fckeditor/editor/_source/internals/fcktablehandler.js +858 -0
  256. data/public/javascripts/fckeditor/editor/_source/internals/fcktablehandler_gecko.js +56 -0
  257. data/public/javascripts/fckeditor/editor/_source/internals/fcktablehandler_ie.js +64 -0
  258. data/public/javascripts/fckeditor/editor/_source/internals/fcktoolbaritems.js +123 -0
  259. data/public/javascripts/fckeditor/editor/_source/internals/fcktoolbarset.js +373 -0
  260. data/public/javascripts/fckeditor/editor/_source/internals/fcktools.js +581 -0
  261. data/public/javascripts/fckeditor/editor/_source/internals/fcktools_gecko.js +270 -0
  262. data/public/javascripts/fckeditor/editor/_source/internals/fcktools_ie.js +227 -0
  263. data/public/javascripts/fckeditor/editor/_source/internals/fckundo.js +220 -0
  264. data/public/javascripts/fckeditor/editor/_source/internals/fckurlparams.js +39 -0
  265. data/public/javascripts/fckeditor/editor/_source/internals/fckxhtml.js +460 -0
  266. data/public/javascripts/fckeditor/editor/_source/internals/fckxhtml_gecko.js +105 -0
  267. data/public/javascripts/fckeditor/editor/_source/internals/fckxhtml_ie.js +208 -0
  268. data/public/javascripts/fckeditor/editor/_source/internals/fckxhtmlentities.js +354 -0
  269. data/public/javascripts/fckeditor/editor/css/behaviors/disablehandles.htc +15 -0
  270. data/public/javascripts/fckeditor/editor/css/behaviors/showtableborders.htc +36 -0
  271. data/public/javascripts/fckeditor/editor/css/fck_editorarea.css +91 -0
  272. data/public/javascripts/fckeditor/editor/css/fck_internal.css +182 -0
  273. data/public/javascripts/fckeditor/editor/css/fck_showtableborders_gecko.css +42 -0
  274. data/public/javascripts/fckeditor/editor/css/images/block_address.png +0 -0
  275. data/public/javascripts/fckeditor/editor/css/images/block_blockquote.png +0 -0
  276. data/public/javascripts/fckeditor/editor/css/images/block_div.png +0 -0
  277. data/public/javascripts/fckeditor/editor/css/images/block_h1.png +0 -0
  278. data/public/javascripts/fckeditor/editor/css/images/block_h2.png +0 -0
  279. data/public/javascripts/fckeditor/editor/css/images/block_h3.png +0 -0
  280. data/public/javascripts/fckeditor/editor/css/images/block_h4.png +0 -0
  281. data/public/javascripts/fckeditor/editor/css/images/block_h5.png +0 -0
  282. data/public/javascripts/fckeditor/editor/css/images/block_h6.png +0 -0
  283. data/public/javascripts/fckeditor/editor/css/images/block_p.png +0 -0
  284. data/public/javascripts/fckeditor/editor/css/images/block_pre.png +0 -0
  285. data/public/javascripts/fckeditor/editor/css/images/fck_anchor.gif +0 -0
  286. data/public/javascripts/fckeditor/editor/css/images/fck_flashlogo.gif +0 -0
  287. data/public/javascripts/fckeditor/editor/css/images/fck_hiddenfield.gif +0 -0
  288. data/public/javascripts/fckeditor/editor/css/images/fck_pagebreak.gif +0 -0
  289. data/public/javascripts/fckeditor/editor/dialog/common/fck_dialog_common.css +78 -0
  290. data/public/javascripts/fckeditor/editor/dialog/common/fck_dialog_common.js +165 -0
  291. data/public/javascripts/fckeditor/editor/dialog/common/images/locked.gif +0 -0
  292. data/public/javascripts/fckeditor/editor/dialog/common/images/reset.gif +0 -0
  293. data/public/javascripts/fckeditor/editor/dialog/common/images/unlocked.gif +0 -0
  294. data/public/javascripts/fckeditor/editor/dialog/fck_about.html +155 -0
  295. data/public/javascripts/fckeditor/editor/dialog/fck_about/logo_fckeditor.gif +0 -0
  296. data/public/javascripts/fckeditor/editor/dialog/fck_about/logo_fredck.gif +0 -0
  297. data/public/javascripts/fckeditor/editor/dialog/fck_anchor.html +207 -0
  298. data/public/javascripts/fckeditor/editor/dialog/fck_button.html +109 -0
  299. data/public/javascripts/fckeditor/editor/dialog/fck_checkbox.html +109 -0
  300. data/public/javascripts/fckeditor/editor/dialog/fck_colorselector.html +171 -0
  301. data/public/javascripts/fckeditor/editor/dialog/fck_docprops.html +600 -0
  302. data/public/javascripts/fckeditor/editor/dialog/fck_docprops/fck_document_preview.html +113 -0
  303. data/public/javascripts/fckeditor/editor/dialog/fck_find.html +173 -0
  304. data/public/javascripts/fckeditor/editor/dialog/fck_flash.html +146 -0
  305. data/public/javascripts/fckeditor/editor/dialog/fck_flash/fck_flash.js +285 -0
  306. data/public/javascripts/fckeditor/editor/dialog/fck_flash/fck_flash_preview.html +46 -0
  307. data/public/javascripts/fckeditor/editor/dialog/fck_form.html +106 -0
  308. data/public/javascripts/fckeditor/editor/dialog/fck_hiddenfield.html +118 -0
  309. data/public/javascripts/fckeditor/editor/dialog/fck_image.html +252 -0
  310. data/public/javascripts/fckeditor/editor/dialog/fck_image/fck_image.js +492 -0
  311. data/public/javascripts/fckeditor/editor/dialog/fck_image/fck_image_preview.html +66 -0
  312. data/public/javascripts/fckeditor/editor/dialog/fck_link.html +293 -0
  313. data/public/javascripts/fckeditor/editor/dialog/fck_link/fck_link.js +715 -0
  314. data/public/javascripts/fckeditor/editor/dialog/fck_listprop.html +116 -0
  315. data/public/javascripts/fckeditor/editor/dialog/fck_paste.html +340 -0
  316. data/public/javascripts/fckeditor/editor/dialog/fck_radiobutton.html +109 -0
  317. data/public/javascripts/fckeditor/editor/dialog/fck_replace.html +452 -0
  318. data/public/javascripts/fckeditor/editor/dialog/fck_select.html +177 -0
  319. data/public/javascripts/fckeditor/editor/dialog/fck_select/fck_select.js +194 -0
  320. data/public/javascripts/fckeditor/editor/dialog/fck_smiley.html +106 -0
  321. data/public/javascripts/fckeditor/editor/dialog/fck_source.html +65 -0
  322. data/public/javascripts/fckeditor/editor/dialog/fck_specialchar.html +118 -0
  323. data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages.html +64 -0
  324. data/{spec/fixtures/notifications.yml → public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/blank.html} +0 -0
  325. data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controlWindow.js +87 -0
  326. data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controls.html +153 -0
  327. data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.cfm +146 -0
  328. data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php +196 -0
  329. data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.pl +180 -0
  330. data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellChecker.js +462 -0
  331. data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellchecker.html +71 -0
  332. data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellerStyle.css +49 -0
  333. data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/wordWindow.js +272 -0
  334. data/public/javascripts/fckeditor/editor/dialog/fck_table.html +293 -0
  335. data/public/javascripts/fckeditor/editor/dialog/fck_tablecell.html +255 -0
  336. data/public/javascripts/fckeditor/editor/dialog/fck_template.html +242 -0
  337. data/public/javascripts/fckeditor/editor/dialog/fck_template/images/template1.gif +0 -0
  338. data/public/javascripts/fckeditor/editor/dialog/fck_template/images/template2.gif +0 -0
  339. data/public/javascripts/fckeditor/editor/dialog/fck_template/images/template3.gif +0 -0
  340. data/public/javascripts/fckeditor/editor/dialog/fck_textarea.html +95 -0
  341. data/public/javascripts/fckeditor/editor/dialog/fck_textfield.html +140 -0
  342. data/public/javascripts/fckeditor/editor/dtd/fck_dtd_test.html +43 -0
  343. data/public/javascripts/fckeditor/editor/dtd/fck_xhtml10strict.js +116 -0
  344. data/public/javascripts/fckeditor/editor/dtd/fck_xhtml10transitional.js +140 -0
  345. data/public/javascripts/fckeditor/editor/fckdebug.html +153 -0
  346. data/public/javascripts/fckeditor/editor/fckdialog.html +336 -0
  347. data/public/javascripts/fckeditor/editor/fckeditor.html +228 -0
  348. data/public/javascripts/fckeditor/editor/fckeditor.original.html +331 -0
  349. data/public/javascripts/fckeditor/editor/filemanager/browser/default/browser.css +89 -0
  350. data/public/javascripts/fckeditor/editor/filemanager/browser/default/browser.html +163 -0
  351. data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmactualfolder.html +67 -0
  352. data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmcreatefolder.html +113 -0
  353. data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmfolders.html +196 -0
  354. data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmresourceslist.html +167 -0
  355. data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmresourcetype.html +65 -0
  356. data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmupload.html +114 -0
  357. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/ButtonArrow.gif +0 -0
  358. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/Folder.gif +0 -0
  359. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/Folder32.gif +0 -0
  360. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/FolderOpened.gif +0 -0
  361. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/FolderOpened32.gif +0 -0
  362. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/FolderUp.gif +0 -0
  363. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/ai.gif +0 -0
  364. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/avi.gif +0 -0
  365. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/bmp.gif +0 -0
  366. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/cs.gif +0 -0
  367. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/default.icon.gif +0 -0
  368. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/dll.gif +0 -0
  369. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/doc.gif +0 -0
  370. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/exe.gif +0 -0
  371. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/fla.gif +0 -0
  372. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/gif.gif +0 -0
  373. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/htm.gif +0 -0
  374. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/html.gif +0 -0
  375. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/jpg.gif +0 -0
  376. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/js.gif +0 -0
  377. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/mdb.gif +0 -0
  378. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/mp3.gif +0 -0
  379. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/pdf.gif +0 -0
  380. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/png.gif +0 -0
  381. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/ppt.gif +0 -0
  382. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/rdp.gif +0 -0
  383. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/swf.gif +0 -0
  384. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/swt.gif +0 -0
  385. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/txt.gif +0 -0
  386. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/vsd.gif +0 -0
  387. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/xls.gif +0 -0
  388. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/xml.gif +0 -0
  389. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/zip.gif +0 -0
  390. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/ai.gif +0 -0
  391. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/avi.gif +0 -0
  392. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/bmp.gif +0 -0
  393. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/cs.gif +0 -0
  394. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/default.icon.gif +0 -0
  395. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/dll.gif +0 -0
  396. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/doc.gif +0 -0
  397. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/exe.gif +0 -0
  398. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/fla.gif +0 -0
  399. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/gif.gif +0 -0
  400. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/htm.gif +0 -0
  401. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/html.gif +0 -0
  402. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/jpg.gif +0 -0
  403. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/js.gif +0 -0
  404. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/mdb.gif +0 -0
  405. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/mp3.gif +0 -0
  406. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/pdf.gif +0 -0
  407. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/png.gif +0 -0
  408. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/ppt.gif +0 -0
  409. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/rdp.gif +0 -0
  410. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/swf.gif +0 -0
  411. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/swt.gif +0 -0
  412. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/txt.gif +0 -0
  413. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/vsd.gif +0 -0
  414. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/xls.gif +0 -0
  415. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/xml.gif +0 -0
  416. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/zip.gif +0 -0
  417. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/spacer.gif +0 -0
  418. data/public/javascripts/fckeditor/editor/filemanager/browser/default/js/common.js +55 -0
  419. data/public/javascripts/fckeditor/editor/filemanager/browser/default/js/fckxml.js +129 -0
  420. data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/basexml.asp +62 -0
  421. data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/class_upload.asp +353 -0
  422. data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/commands.asp +198 -0
  423. data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/config.asp +128 -0
  424. data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/connector.asp +88 -0
  425. data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/io.asp +222 -0
  426. data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/upload.asp +61 -0
  427. data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/util.asp +55 -0
  428. data/public/javascripts/fckeditor/editor/filemanager/connectors/aspx/connector.aspx +30 -0
  429. data/public/javascripts/fckeditor/editor/filemanager/connectors/aspx/upload.aspx +30 -0
  430. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/ImageObject.cfc +273 -0
  431. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf5_connector.cfm +315 -0
  432. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf5_upload.cfm +296 -0
  433. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_basexml.cfm +68 -0
  434. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_commands.cfm +225 -0
  435. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_connector.cfm +89 -0
  436. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_io.cfm +288 -0
  437. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_upload.cfm +68 -0
  438. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_util.cfm +132 -0
  439. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/config.cfm +183 -0
  440. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/connector.cfm +31 -0
  441. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/image.cfc +1325 -0
  442. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/upload.cfm +31 -0
  443. data/public/javascripts/fckeditor/editor/filemanager/connectors/lasso/config.lasso +65 -0
  444. data/public/javascripts/fckeditor/editor/filemanager/connectors/lasso/connector.lasso +257 -0
  445. data/public/javascripts/fckeditor/editor/filemanager/connectors/lasso/upload.lasso +157 -0
  446. data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/basexml.pl +63 -0
  447. data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/commands.pl +168 -0
  448. data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/connector.cgi +137 -0
  449. data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/io.pl +131 -0
  450. data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/upload.cgi +118 -0
  451. data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/upload_fck.pl +667 -0
  452. data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/util.pl +68 -0
  453. data/public/javascripts/fckeditor/editor/filemanager/connectors/php/basexml.php +93 -0
  454. data/public/javascripts/fckeditor/editor/filemanager/connectors/php/commands.php +245 -0
  455. data/public/javascripts/fckeditor/editor/filemanager/connectors/php/config.php +140 -0
  456. data/public/javascripts/fckeditor/editor/filemanager/connectors/php/connector.php +87 -0
  457. data/public/javascripts/fckeditor/editor/filemanager/connectors/php/io.php +272 -0
  458. data/public/javascripts/fckeditor/editor/filemanager/connectors/php/phpcompat.php +17 -0
  459. data/public/javascripts/fckeditor/editor/filemanager/connectors/php/upload.php +59 -0
  460. data/public/javascripts/fckeditor/editor/filemanager/connectors/php/util.php +185 -0
  461. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/config.py +135 -0
  462. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/connector.py +118 -0
  463. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckcommands.py +181 -0
  464. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckconnector.py +90 -0
  465. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckoutput.py +111 -0
  466. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckutil.py +127 -0
  467. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/htaccess.txt +23 -0
  468. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/upload.py +88 -0
  469. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/wsgi.py +58 -0
  470. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/zope.py +189 -0
  471. data/public/javascripts/fckeditor/editor/filemanager/connectors/test.html +177 -0
  472. data/public/javascripts/fckeditor/editor/filemanager/connectors/uploadtest.html +149 -0
  473. data/public/javascripts/fckeditor/editor/images/anchor.gif +0 -0
  474. data/public/javascripts/fckeditor/editor/images/arrow_ltr.gif +0 -0
  475. data/public/javascripts/fckeditor/editor/images/arrow_rtl.gif +0 -0
  476. data/public/javascripts/fckeditor/editor/images/smiley/msn/angel_smile.gif +0 -0
  477. data/public/javascripts/fckeditor/editor/images/smiley/msn/angry_smile.gif +0 -0
  478. data/public/javascripts/fckeditor/editor/images/smiley/msn/broken_heart.gif +0 -0
  479. data/public/javascripts/fckeditor/editor/images/smiley/msn/cake.gif +0 -0
  480. data/public/javascripts/fckeditor/editor/images/smiley/msn/confused_smile.gif +0 -0
  481. data/public/javascripts/fckeditor/editor/images/smiley/msn/cry_smile.gif +0 -0
  482. data/public/javascripts/fckeditor/editor/images/smiley/msn/devil_smile.gif +0 -0
  483. data/public/javascripts/fckeditor/editor/images/smiley/msn/embaressed_smile.gif +0 -0
  484. data/public/javascripts/fckeditor/editor/images/smiley/msn/envelope.gif +0 -0
  485. data/public/javascripts/fckeditor/editor/images/smiley/msn/heart.gif +0 -0
  486. data/public/javascripts/fckeditor/editor/images/smiley/msn/kiss.gif +0 -0
  487. data/public/javascripts/fckeditor/editor/images/smiley/msn/lightbulb.gif +0 -0
  488. data/public/javascripts/fckeditor/editor/images/smiley/msn/omg_smile.gif +0 -0
  489. data/public/javascripts/fckeditor/editor/images/smiley/msn/regular_smile.gif +0 -0
  490. data/public/javascripts/fckeditor/editor/images/smiley/msn/sad_smile.gif +0 -0
  491. data/public/javascripts/fckeditor/editor/images/smiley/msn/shades_smile.gif +0 -0
  492. data/public/javascripts/fckeditor/editor/images/smiley/msn/teeth_smile.gif +0 -0
  493. data/public/javascripts/fckeditor/editor/images/smiley/msn/thumbs_down.gif +0 -0
  494. data/public/javascripts/fckeditor/editor/images/smiley/msn/thumbs_up.gif +0 -0
  495. data/public/javascripts/fckeditor/editor/images/smiley/msn/tounge_smile.gif +0 -0
  496. data/public/javascripts/fckeditor/editor/images/smiley/msn/whatchutalkingabout_smile.gif +0 -0
  497. data/public/javascripts/fckeditor/editor/images/smiley/msn/wink_smile.gif +0 -0
  498. data/{test/mocks/themes/standard_issue → public/javascripts/fckeditor/editor}/images/spacer.gif +0 -0
  499. data/public/javascripts/fckeditor/editor/js/fckeditorcode_gecko.js +108 -0
  500. data/public/javascripts/fckeditor/editor/js/fckeditorcode_ie.js +109 -0
  501. data/public/javascripts/fckeditor/editor/lang/_translationstatus.txt +76 -0
  502. data/public/javascripts/fckeditor/editor/lang/af.js +516 -0
  503. data/public/javascripts/fckeditor/editor/lang/ar.js +516 -0
  504. data/public/javascripts/fckeditor/editor/lang/bg.js +516 -0
  505. data/public/javascripts/fckeditor/editor/lang/bn.js +516 -0
  506. data/public/javascripts/fckeditor/editor/lang/bs.js +516 -0
  507. data/public/javascripts/fckeditor/editor/lang/ca.js +516 -0
  508. data/public/javascripts/fckeditor/editor/lang/cs.js +516 -0
  509. data/public/javascripts/fckeditor/editor/lang/da.js +516 -0
  510. data/public/javascripts/fckeditor/editor/lang/de.js +516 -0
  511. data/public/javascripts/fckeditor/editor/lang/el.js +516 -0
  512. data/public/javascripts/fckeditor/editor/lang/en-au.js +516 -0
  513. data/public/javascripts/fckeditor/editor/lang/en-ca.js +516 -0
  514. data/public/javascripts/fckeditor/editor/lang/en-uk.js +516 -0
  515. data/public/javascripts/fckeditor/editor/lang/en.js +516 -0
  516. data/public/javascripts/fckeditor/editor/lang/eo.js +516 -0
  517. data/public/javascripts/fckeditor/editor/lang/es.js +516 -0
  518. data/public/javascripts/fckeditor/editor/lang/et.js +516 -0
  519. data/public/javascripts/fckeditor/editor/lang/eu.js +517 -0
  520. data/public/javascripts/fckeditor/editor/lang/fa.js +516 -0
  521. data/public/javascripts/fckeditor/editor/lang/fi.js +516 -0
  522. data/public/javascripts/fckeditor/editor/lang/fo.js +516 -0
  523. data/public/javascripts/fckeditor/editor/lang/fr.js +516 -0
  524. data/public/javascripts/fckeditor/editor/lang/gl.js +516 -0
  525. data/public/javascripts/fckeditor/editor/lang/he.js +516 -0
  526. data/public/javascripts/fckeditor/editor/lang/hi.js +516 -0
  527. data/public/javascripts/fckeditor/editor/lang/hr.js +516 -0
  528. data/public/javascripts/fckeditor/editor/lang/hu.js +516 -0
  529. data/public/javascripts/fckeditor/editor/lang/it.js +516 -0
  530. data/public/javascripts/fckeditor/editor/lang/ja.js +516 -0
  531. data/public/javascripts/fckeditor/editor/lang/km.js +516 -0
  532. data/public/javascripts/fckeditor/editor/lang/ko.js +516 -0
  533. data/public/javascripts/fckeditor/editor/lang/lt.js +516 -0
  534. data/public/javascripts/fckeditor/editor/lang/lv.js +516 -0
  535. data/public/javascripts/fckeditor/editor/lang/mn.js +516 -0
  536. data/public/javascripts/fckeditor/editor/lang/ms.js +516 -0
  537. data/public/javascripts/fckeditor/editor/lang/nb.js +516 -0
  538. data/public/javascripts/fckeditor/editor/lang/nl.js +516 -0
  539. data/public/javascripts/fckeditor/editor/lang/no.js +516 -0
  540. data/public/javascripts/fckeditor/editor/lang/pl.js +516 -0
  541. data/public/javascripts/fckeditor/editor/lang/pt-br.js +516 -0
  542. data/public/javascripts/fckeditor/editor/lang/pt.js +516 -0
  543. data/public/javascripts/fckeditor/editor/lang/ro.js +516 -0
  544. data/public/javascripts/fckeditor/editor/lang/ru.js +516 -0
  545. data/public/javascripts/fckeditor/editor/lang/sk.js +516 -0
  546. data/public/javascripts/fckeditor/editor/lang/sl.js +516 -0
  547. data/public/javascripts/fckeditor/editor/lang/sr-latn.js +516 -0
  548. data/public/javascripts/fckeditor/editor/lang/sr.js +516 -0
  549. data/public/javascripts/fckeditor/editor/lang/sv.js +516 -0
  550. data/public/javascripts/fckeditor/editor/lang/th.js +516 -0
  551. data/public/javascripts/fckeditor/editor/lang/tr.js +516 -0
  552. data/public/javascripts/fckeditor/editor/lang/uk.js +516 -0
  553. data/public/javascripts/fckeditor/editor/lang/vi.js +516 -0
  554. data/public/javascripts/fckeditor/editor/lang/zh-cn.js +516 -0
  555. data/public/javascripts/fckeditor/editor/lang/zh.js +516 -0
  556. data/public/javascripts/fckeditor/editor/plugins/autogrow/fckplugin.js +92 -0
  557. data/public/javascripts/fckeditor/editor/plugins/bbcode/_sample/sample.config.js +26 -0
  558. data/public/javascripts/fckeditor/editor/plugins/bbcode/_sample/sample.html +67 -0
  559. data/public/javascripts/fckeditor/editor/plugins/bbcode/fckplugin.js +123 -0
  560. data/public/javascripts/fckeditor/editor/plugins/dragresizetable/fckplugin.js +503 -0
  561. data/public/javascripts/fckeditor/editor/plugins/placeholder/fck_placeholder.html +100 -0
  562. data/public/javascripts/fckeditor/editor/plugins/placeholder/fckplugin.js +187 -0
  563. data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/de.js +27 -0
  564. data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/en.js +27 -0
  565. data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/fr.js +27 -0
  566. data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/it.js +27 -0
  567. data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/pl.js +27 -0
  568. data/public/javascripts/fckeditor/editor/plugins/placeholder/placeholder.gif +0 -0
  569. data/public/javascripts/fckeditor/editor/plugins/simplecommands/fckplugin.js +29 -0
  570. data/public/javascripts/fckeditor/editor/plugins/tablecommands/fckplugin.js +33 -0
  571. data/public/javascripts/fckeditor/editor/skins/_fckviewstrips.html +121 -0
  572. data/public/javascripts/fckeditor/editor/skins/default/fck_dialog.css +139 -0
  573. data/public/javascripts/fckeditor/editor/skins/default/fck_editor.css +464 -0
  574. data/public/javascripts/fckeditor/editor/skins/default/fck_strip.gif +0 -0
  575. data/public/javascripts/fckeditor/editor/skins/default/images/toolbar.arrowright.gif +0 -0
  576. data/public/javascripts/fckeditor/editor/skins/default/images/toolbar.buttonarrow.gif +0 -0
  577. data/public/javascripts/fckeditor/editor/skins/default/images/toolbar.collapse.gif +0 -0
  578. data/{themes/standard_issue/images/spacer.gif → public/javascripts/fckeditor/editor/skins/default/images/toolbar.end.gif} +0 -0
  579. data/public/javascripts/fckeditor/editor/skins/default/images/toolbar.expand.gif +0 -0
  580. data/public/javascripts/fckeditor/editor/skins/default/images/toolbar.separator.gif +0 -0
  581. data/public/javascripts/fckeditor/editor/skins/default/images/toolbar.start.gif +0 -0
  582. data/public/javascripts/fckeditor/editor/skins/office2003/fck_dialog.css +140 -0
  583. data/public/javascripts/fckeditor/editor/skins/office2003/fck_editor.css +476 -0
  584. data/public/javascripts/fckeditor/editor/skins/office2003/fck_strip.gif +0 -0
  585. data/public/javascripts/fckeditor/editor/skins/office2003/images/toolbar.arrowright.gif +0 -0
  586. data/public/javascripts/fckeditor/editor/skins/office2003/images/toolbar.bg.gif +0 -0
  587. data/public/javascripts/fckeditor/editor/skins/office2003/images/toolbar.buttonarrow.gif +0 -0
  588. data/public/javascripts/fckeditor/editor/skins/office2003/images/toolbar.collapse.gif +0 -0
  589. data/public/javascripts/fckeditor/editor/skins/office2003/images/toolbar.end.gif +0 -0
  590. data/public/javascripts/fckeditor/editor/skins/office2003/images/toolbar.expand.gif +0 -0
  591. data/public/javascripts/fckeditor/editor/skins/office2003/images/toolbar.separator.gif +0 -0
  592. data/public/javascripts/fckeditor/editor/skins/office2003/images/toolbar.start.gif +0 -0
  593. data/public/javascripts/fckeditor/editor/skins/silver/fck_dialog.css +143 -0
  594. data/public/javascripts/fckeditor/editor/skins/silver/fck_editor.css +473 -0
  595. data/public/javascripts/fckeditor/editor/skins/silver/fck_strip.gif +0 -0
  596. data/public/javascripts/fckeditor/editor/skins/silver/images/toolbar.arrowright.gif +0 -0
  597. data/public/javascripts/fckeditor/editor/skins/silver/images/toolbar.buttonarrow.gif +0 -0
  598. data/public/javascripts/fckeditor/editor/skins/silver/images/toolbar.buttonbg.gif +0 -0
  599. data/public/javascripts/fckeditor/editor/skins/silver/images/toolbar.collapse.gif +0 -0
  600. data/public/javascripts/fckeditor/editor/skins/silver/images/toolbar.end.gif +0 -0
  601. data/public/javascripts/fckeditor/editor/skins/silver/images/toolbar.expand.gif +0 -0
  602. data/public/javascripts/fckeditor/editor/skins/silver/images/toolbar.separator.gif +0 -0
  603. data/public/javascripts/fckeditor/editor/skins/silver/images/toolbar.start.gif +0 -0
  604. data/public/javascripts/fckeditor/fckconfig.js +306 -0
  605. data/public/javascripts/fckeditor/fckeditor.afp +161 -0
  606. data/public/javascripts/fckeditor/fckeditor.asp +235 -0
  607. data/public/javascripts/fckeditor/fckeditor.cfc +273 -0
  608. data/public/javascripts/fckeditor/fckeditor.cfm +210 -0
  609. data/public/javascripts/fckeditor/fckeditor.js +212 -0
  610. data/public/javascripts/fckeditor/fckeditor.lasso +112 -0
  611. data/public/javascripts/fckeditor/fckeditor.py +162 -0
  612. data/public/javascripts/fckeditor/fckpackager.xml +262 -0
  613. data/public/javascripts/fckeditor/fckstyles.xml +114 -0
  614. data/public/javascripts/fckeditor/fcktemplates.xml +103 -0
  615. data/public/javascripts/fckeditor/license.txt +1247 -0
  616. data/public/javascripts/lang/default.js +21 -0
  617. data/public/javascripts/lang/fr_FR.js +21 -0
  618. data/public/javascripts/lightbox.js +169 -315
  619. data/public/javascripts/prototype.js +2817 -1107
  620. data/public/javascripts/typo.js +51 -11
  621. data/public/stylesheets/administration.css +170 -94
  622. data/public/stylesheets/lightbox.css +59 -19
  623. data/public/stylesheets/typo_code.css +62 -0
  624. data/public/stylesheets/user-styles.css +16 -0
  625. data/spec/controllers/accounts_controller_spec.rb +2 -7
  626. data/spec/controllers/admin/article_preview_spec.rb +20 -0
  627. data/spec/controllers/admin/blacklist_controller_spec.rb +59 -0
  628. data/spec/controllers/admin/categories_controller_spec.rb +97 -0
  629. data/spec/controllers/admin/comments_controller_spec.rb +74 -0
  630. data/spec/controllers/admin/content_controller_spec.rb +212 -0
  631. data/spec/controllers/admin/feedback_controller_spec.rb +45 -0
  632. data/spec/controllers/admin/pages_controller_spec.rb +83 -0
  633. data/spec/controllers/admin/profiles_controller_spec.rb +13 -0
  634. data/spec/controllers/admin/resources_controller_spec.rb +46 -0
  635. data/spec/controllers/admin/settings_controller_spec.rb +22 -0
  636. data/spec/controllers/admin/textfilters_controller_spec.rb +24 -0
  637. data/spec/controllers/admin/themes_controller_spec.rb +30 -0
  638. data/spec/controllers/admin/trackbacks_controller_spec.rb +57 -0
  639. data/spec/controllers/admin/users_controller_spec.rb +65 -0
  640. data/spec/controllers/articles_controller_spec.rb +4 -8
  641. data/spec/controllers/authors_controller_spec.rb +2 -2
  642. data/spec/controllers/backend_controller_spec.rb +318 -0
  643. data/spec/controllers/categories_controller_spec.rb +2 -2
  644. data/spec/controllers/comments_controller_spec.rb +8 -20
  645. data/spec/controllers/redirect_controller_spec.rb +35 -0
  646. data/spec/controllers/tags_controller_spec.rb +2 -2
  647. data/spec/controllers/textfilter_controller_spec.rb +264 -0
  648. data/spec/controllers/theme_controller_spec.rb +43 -0
  649. data/spec/controllers/xml_controller_spec.rb +232 -0
  650. data/spec/models/article_closing_spec.rb +38 -0
  651. data/spec/models/article_spec.rb +285 -9
  652. data/spec/models/blacklist_pattern_spec.rb +12 -0
  653. data/spec/models/blog_spec.rb +10 -4
  654. data/spec/models/cache_support_spec.rb +0 -4
  655. data/spec/models/category_spec.rb +1 -5
  656. data/spec/models/comment_spec.rb +186 -0
  657. data/spec/models/configuration_spec.rb +7 -9
  658. data/spec/models/content_state/feedback_states_spec.rb +64 -0
  659. data/spec/models/notification_spec.rb +8 -0
  660. data/spec/models/page_spec.rb +2 -10
  661. data/spec/models/ping_pinger_spec.rb +33 -0
  662. data/spec/models/ping_spec.rb +2 -9
  663. data/spec/models/resource_spec.rb +0 -2
  664. data/spec/models/route_cache_spec.rb +11 -0
  665. data/spec/models/sidebar_spec.rb +7 -0
  666. data/spec/models/tag_spec.rb +19 -8
  667. data/spec/models/theme_spec.rb +6 -7
  668. data/spec/models/trackback_spec.rb +1 -1
  669. data/spec/models/trigger_spec.rb +0 -2
  670. data/spec/models/typo_deprecated_spec.rb +18 -0
  671. data/spec/models/url_policy_spec.rb +65 -0
  672. data/spec/models/user_spec.rb +9 -4
  673. data/spec/spec.opts +2 -5
  674. data/spec/spec_helper.rb +5 -2
  675. data/spec/views/comments/html_sanitization_spec.rb +0 -14
  676. data/test/fixtures/blacklist_patterns.yml +1 -3
  677. data/test/fixtures/blogs.yml +2 -44
  678. data/test/fixtures/categories.yml +0 -6
  679. data/test/fixtures/categorizations.yml +17 -17
  680. data/test/fixtures/contents.yml +15 -53
  681. data/test/fixtures/feedback.yml +11 -31
  682. data/test/fixtures/profiles.yml +9 -0
  683. data/test/fixtures/redirects.yml +0 -3
  684. data/test/fixtures/resources.yml +3 -6
  685. data/test/fixtures/sidebars.yml +0 -2
  686. data/test/fixtures/tags.yml +3 -6
  687. data/test/fixtures/text_filters.yml +1 -6
  688. data/test/fixtures/users.yml +0 -10
  689. data/test/mocks/themes/typographic/.DS_Store +0 -0
  690. data/test/mocks/themes/typographic/about.markdown +7 -0
  691. data/test/mocks/themes/typographic/images/Thumbs.db +0 -0
  692. data/test/mocks/themes/typographic/images/accept.png +0 -0
  693. data/test/mocks/themes/typographic/images/accept50.png +0 -0
  694. data/test/mocks/themes/typographic/images/bg_body.jpg +0 -0
  695. data/test/mocks/themes/typographic/images/bg_white.png +0 -0
  696. data/test/mocks/themes/typographic/images/bg_wrapper.jpg +0 -0
  697. data/test/mocks/themes/typographic/images/bullet_bottom.png +0 -0
  698. data/test/mocks/themes/typographic/images/bullet_right.png +0 -0
  699. data/test/mocks/themes/typographic/images/email_open.png +0 -0
  700. data/test/mocks/themes/typographic/images/email_open50.png +0 -0
  701. data/test/mocks/themes/typographic/images/meta.png +0 -0
  702. data/test/mocks/themes/typographic/images/page_edit.png +0 -0
  703. data/test/mocks/themes/typographic/images/page_edit50.png +0 -0
  704. data/test/mocks/themes/typographic/images/tag.png +0 -0
  705. data/test/mocks/themes/typographic/images/user.png +0 -0
  706. data/test/mocks/themes/typographic/images/user50.png +0 -0
  707. data/test/mocks/themes/typographic/images/world_link.png +0 -0
  708. data/test/mocks/themes/typographic/images/world_link50.png +0 -0
  709. data/test/mocks/themes/typographic/layouts/default.html.erb +42 -0
  710. data/test/mocks/themes/typographic/preview.png +0 -0
  711. data/test/mocks/themes/typographic/stylesheets/colors.css +51 -0
  712. data/test/mocks/themes/typographic/stylesheets/layout.css +346 -0
  713. data/test/mocks/themes/typographic/stylesheets/reset.css +5 -0
  714. data/test/mocks/themes/typographic/stylesheets/style.css +36 -0
  715. data/test/mocks/themes/typographic/views/articles/_article.html.erb +41 -0
  716. data/test/mocks/themes/typographic/views/articles/_comment.html.erb +14 -0
  717. data/test/mocks/themes/typographic/views/articles/_comment_form.html.erb +48 -0
  718. data/test/mocks/themes/typographic/views/articles/_comment_list.html.erb +7 -0
  719. data/test/mocks/themes/typographic/views/articles/_trackback.html.erb +9 -0
  720. data/test/mocks/themes/typographic/views/articles/comment_preview.html.erb +10 -0
  721. data/test/mocks/themes/typographic/views/articles/index.html.erb +5 -0
  722. data/test/mocks/themes/typographic/views/articles/read.html.erb +42 -0
  723. data/test/mocks/themes/typographic/views/shared/_search.html.erb +17 -0
  724. data/test/mocks/themes/typographic/views/theme/static_view_test.html.erb +1 -0
  725. data/test/test_helper.rb +4 -0
  726. data/themes/scribbish/layouts/default.html.erb +4 -2
  727. data/themes/scribbish/stylesheets/content.css +1 -0
  728. data/themes/scribbish/views/articles/_article.html.erb +6 -6
  729. data/themes/scribbish/views/articles/_comment.html.erb +1 -1
  730. data/themes/scribbish/views/articles/_comment_form.html.erb +10 -10
  731. data/themes/scribbish/views/articles/_comment_list.html.erb +1 -1
  732. data/themes/scribbish/views/articles/_trackback.html.erb +1 -1
  733. data/themes/scribbish/views/articles/comment_preview.html.erb +1 -1
  734. data/themes/scribbish/views/articles/index.html.erb +1 -1
  735. data/themes/scribbish/views/articles/read.html.erb +4 -4
  736. data/themes/scribbish/views/shared/_search.html.erb +1 -1
  737. data/themes/typographic/.DS_Store +0 -0
  738. data/themes/typographic/about.markdown +7 -0
  739. data/themes/typographic/images/accept.png +0 -0
  740. data/themes/typographic/images/accept50.png +0 -0
  741. data/themes/typographic/images/bg_body.jpg +0 -0
  742. data/themes/typographic/images/bg_white.png +0 -0
  743. data/themes/typographic/images/bg_wrapper.jpg +0 -0
  744. data/themes/typographic/images/bullet_bottom.png +0 -0
  745. data/themes/typographic/images/bullet_right.png +0 -0
  746. data/themes/typographic/images/email_open.png +0 -0
  747. data/themes/typographic/images/email_open50.png +0 -0
  748. data/themes/typographic/images/meta.png +0 -0
  749. data/themes/typographic/images/page_edit.png +0 -0
  750. data/themes/typographic/images/page_edit50.png +0 -0
  751. data/themes/typographic/images/tag.png +0 -0
  752. data/themes/typographic/images/user.png +0 -0
  753. data/themes/typographic/images/user50.png +0 -0
  754. data/themes/typographic/images/world_link.png +0 -0
  755. data/themes/typographic/images/world_link50.png +0 -0
  756. data/themes/typographic/layouts/default.html.erb +42 -0
  757. data/themes/typographic/preview.png +0 -0
  758. data/themes/typographic/stylesheets/colors.css +51 -0
  759. data/themes/typographic/stylesheets/layout.css +346 -0
  760. data/themes/typographic/stylesheets/reset.css +5 -0
  761. data/themes/typographic/stylesheets/style.css +36 -0
  762. data/themes/typographic/views/articles/_article.html.erb +41 -0
  763. data/themes/typographic/views/articles/_comment.html.erb +14 -0
  764. data/themes/typographic/views/articles/_comment_form.html.erb +48 -0
  765. data/themes/typographic/views/articles/_comment_list.html.erb +7 -0
  766. data/themes/typographic/views/articles/_trackback.html.erb +9 -0
  767. data/themes/typographic/views/articles/comment_preview.html.erb +10 -0
  768. data/themes/typographic/views/articles/index.html.erb +5 -0
  769. data/themes/typographic/views/articles/read.html.erb +42 -0
  770. data/themes/typographic/views/shared/_search.html.erb +17 -0
  771. data/themes/typographic/views/theme/static_view_test.html.erb +1 -0
  772. data/themes/typographic2/.DS_Store +0 -0
  773. data/themes/typographic2/about.markdown +7 -0
  774. data/themes/typographic2/images/Thumbs.db +0 -0
  775. data/themes/typographic2/images/accept.png +0 -0
  776. data/themes/typographic2/images/accept50.png +0 -0
  777. data/themes/typographic2/images/bg_body.jpg +0 -0
  778. data/themes/typographic2/images/bg_white.png +0 -0
  779. data/themes/typographic2/images/bg_wrapper.jpg +0 -0
  780. data/themes/typographic2/images/bullet_bottom.png +0 -0
  781. data/themes/typographic2/images/bullet_right.png +0 -0
  782. data/themes/typographic2/images/email_open.png +0 -0
  783. data/themes/typographic2/images/email_open50.png +0 -0
  784. data/themes/typographic2/images/meta.png +0 -0
  785. data/themes/typographic2/images/page_edit.png +0 -0
  786. data/themes/typographic2/images/page_edit50.png +0 -0
  787. data/themes/typographic2/images/tag.png +0 -0
  788. data/themes/typographic2/images/user.png +0 -0
  789. data/themes/typographic2/images/user50.png +0 -0
  790. data/themes/typographic2/images/world_link.png +0 -0
  791. data/themes/typographic2/images/world_link50.png +0 -0
  792. data/themes/typographic2/layouts/default.html.erb +42 -0
  793. data/themes/typographic2/preview.png +0 -0
  794. data/themes/typographic2/stylesheets/colors.css +51 -0
  795. data/themes/typographic2/stylesheets/layout.css +346 -0
  796. data/themes/typographic2/stylesheets/reset.css +5 -0
  797. data/themes/typographic2/stylesheets/style.css +36 -0
  798. data/themes/typographic2/views/articles/_article.html.erb +41 -0
  799. data/themes/typographic2/views/articles/_comment.html.erb +14 -0
  800. data/themes/typographic2/views/articles/_comment_form.html.erb +48 -0
  801. data/themes/typographic2/views/articles/_comment_list.html.erb +7 -0
  802. data/themes/typographic2/views/articles/_trackback.html.erb +9 -0
  803. data/themes/typographic2/views/articles/comment_preview.html.erb +10 -0
  804. data/themes/typographic2/views/articles/index.html.erb +5 -0
  805. data/themes/typographic2/views/articles/read.html.erb +42 -0
  806. data/themes/typographic2/views/shared/_search.html.erb +17 -0
  807. data/themes/{standard_issue → typographic2}/views/theme/static_view_test.html.erb +0 -0
  808. data/vendor/plugins/archives_sidebar/lib/archives_sidebar.rb +1 -1
  809. data/vendor/plugins/auto_complete/README +23 -0
  810. data/vendor/plugins/auto_complete/Rakefile +22 -0
  811. data/vendor/plugins/auto_complete/init.rb +2 -0
  812. data/vendor/plugins/auto_complete/lib/auto_complete.rb +47 -0
  813. data/vendor/plugins/auto_complete/lib/auto_complete_macros_helper.rb +143 -0
  814. data/vendor/plugins/auto_complete/test/auto_complete_test.rb +67 -0
  815. data/vendor/plugins/datestamped_resources/lib/datestamped_resources.rb +2 -1
  816. data/vendor/plugins/fckeditor/CHANGELOG +3 -0
  817. data/vendor/plugins/fckeditor/README +125 -0
  818. data/vendor/plugins/fckeditor/Rakefile +72 -0
  819. data/vendor/plugins/fckeditor/app/controllers/fckeditor_controller.rb +158 -0
  820. data/vendor/plugins/fckeditor/app/helpers/fckeditor_helper.rb +4 -0
  821. data/vendor/plugins/fckeditor/app/views/fckeditor/spell_check.rhtml +52 -0
  822. data/vendor/plugins/fckeditor/init.rb +35 -0
  823. data/vendor/plugins/fckeditor/install.rb +12 -0
  824. data/vendor/plugins/fckeditor/lib/fckeditor.rb +101 -0
  825. data/vendor/plugins/fckeditor/lib/fckeditor_file_utils.rb +81 -0
  826. data/vendor/plugins/fckeditor/lib/fckeditor_spell_check.rb +43 -0
  827. data/vendor/plugins/fckeditor/lib/fckeditor_version.rb +9 -0
  828. data/vendor/plugins/fckeditor/tasks/fckeditor_tasks.rake +97 -0
  829. data/vendor/plugins/rspec/.autotest +3 -0
  830. data/vendor/plugins/rspec/CHANGES +33 -1
  831. data/vendor/plugins/rspec/README +2 -3
  832. data/vendor/plugins/rspec/Rakefile +7 -5
  833. data/vendor/plugins/rspec/bin/spec +1 -0
  834. data/vendor/plugins/rspec/examples/pure/helper_method_example.rb +9 -6
  835. data/vendor/plugins/rspec/failing_examples/README.txt +7 -0
  836. data/vendor/plugins/rspec/failing_examples/failing_autogenerated_docstrings_example.rb +19 -0
  837. data/vendor/plugins/rspec/lib/autotest/rspec.rb +36 -56
  838. data/vendor/plugins/rspec/lib/spec.rb +0 -7
  839. data/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb +10 -4
  840. data/vendor/plugins/rspec/lib/spec/example/example_methods.rb +13 -8
  841. data/vendor/plugins/rspec/lib/spec/interop/test.rb +3 -1
  842. data/vendor/plugins/rspec/lib/spec/interop/test/unit/ui/console/testrunner.rb +1 -0
  843. data/vendor/plugins/rspec/lib/spec/matchers.rb +1 -7
  844. data/vendor/plugins/rspec/lib/spec/matchers/be.rb +3 -2
  845. data/vendor/plugins/rspec/lib/spec/matchers/have.rb +3 -0
  846. data/vendor/plugins/rspec/lib/spec/matchers/raise_error.rb +19 -15
  847. data/vendor/plugins/rspec/lib/spec/mocks/message_expectation.rb +10 -3
  848. data/vendor/plugins/rspec/lib/spec/runner.rb +14 -0
  849. data/vendor/plugins/rspec/lib/spec/runner/formatter/story/html_formatter.rb +6 -2
  850. data/vendor/plugins/rspec/lib/spec/runner/formatter/story/plain_text_formatter.rb +15 -7
  851. data/vendor/plugins/rspec/lib/spec/runner/option_parser.rb +5 -33
  852. data/vendor/plugins/rspec/lib/spec/runner/options.rb +51 -18
  853. data/vendor/plugins/rspec/lib/spec/runner/spec_parser.rb +49 -31
  854. data/vendor/plugins/rspec/lib/spec/story/extensions.rb +2 -0
  855. data/vendor/plugins/rspec/lib/spec/story/extensions/regexp.rb +9 -0
  856. data/vendor/plugins/rspec/lib/spec/story/extensions/string.rb +9 -0
  857. data/vendor/plugins/rspec/lib/spec/story/runner.rb +0 -2
  858. data/vendor/plugins/rspec/lib/spec/story/runner/story_parser.rb +8 -8
  859. data/vendor/plugins/rspec/lib/spec/story/runner/story_runner.rb +2 -1
  860. data/vendor/plugins/rspec/lib/spec/story/step.rb +18 -8
  861. data/vendor/plugins/rspec/lib/spec/story/world.rb +1 -0
  862. data/vendor/plugins/rspec/lib/spec/version.rb +22 -22
  863. data/vendor/plugins/rspec/pre_commit/lib/pre_commit.rb +4 -0
  864. data/vendor/plugins/rspec/pre_commit/lib/pre_commit/core.rb +50 -0
  865. data/vendor/plugins/rspec/pre_commit/lib/pre_commit/pre_commit.rb +54 -0
  866. data/vendor/plugins/rspec/pre_commit/lib/pre_commit/rspec.rb +111 -0
  867. data/vendor/plugins/rspec/pre_commit/lib/pre_commit/rspec_on_rails.rb +313 -0
  868. data/vendor/plugins/rspec/pre_commit/spec/pre_commit/pre_commit_spec.rb +15 -0
  869. data/vendor/plugins/rspec/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb +36 -0
  870. data/vendor/plugins/rspec/pre_commit/spec/spec_helper.rb +3 -0
  871. data/vendor/plugins/rspec/pre_commit/spec/spec_suite.rb +11 -0
  872. data/vendor/plugins/rspec/report.html +4358 -0
  873. data/vendor/plugins/rspec/spec/README.jruby +1 -0
  874. data/vendor/plugins/rspec/spec/autotest/rspec_spec.rb +15 -84
  875. data/vendor/plugins/rspec/spec/autotest_helper.rb +2 -1
  876. data/vendor/plugins/rspec/spec/autotest_matchers.rb +47 -0
  877. data/vendor/plugins/rspec/spec/rspec_suite.rb +1 -1
  878. data/vendor/plugins/rspec/{spec.opts → spec/spec.opts} +0 -0
  879. data/vendor/plugins/rspec/spec/spec/example/example_group_methods_spec.rb +11 -2
  880. data/vendor/plugins/rspec/spec/spec/example/example_methods_spec.rb +70 -41
  881. data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/spec_that_fails.rb +10 -0
  882. data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/spec_that_passes.rb +10 -0
  883. data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/spec_with_errors.rb +10 -0
  884. data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/test_case_that_fails.rb +10 -0
  885. data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/test_case_that_passes.rb +10 -0
  886. data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/test_case_with_errors.rb +10 -0
  887. data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/testsuite_adapter_spec_with_test_unit.rb +38 -0
  888. data/vendor/plugins/rspec/spec/spec/interop/test/unit/spec_spec.rb +45 -0
  889. data/vendor/plugins/rspec/spec/spec/interop/test/unit/test_unit_spec_helper.rb +1 -1
  890. data/vendor/plugins/rspec/spec/spec/interop/test/unit/testcase_spec.rb +40 -5
  891. data/vendor/plugins/rspec/spec/spec/interop/test/unit/testsuite_adapter_spec.rb +2 -2
  892. data/vendor/plugins/rspec/spec/spec/matchers/have_spec.rb +19 -0
  893. data/vendor/plugins/rspec/spec/spec/matchers/match_spec.rb +3 -3
  894. data/vendor/plugins/rspec/spec/spec/matchers/raise_error_spec.rb +7 -1
  895. data/vendor/plugins/rspec/spec/spec/mocks/bug_report_10263.rb +1 -1
  896. data/vendor/plugins/rspec/spec/spec/runner/command_line_spec.rb +3 -2
  897. data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.6-jruby.html +381 -0
  898. data/vendor/plugins/rspec/spec/spec/runner/formatter/story/html_formatter_spec.rb +5 -0
  899. data/vendor/plugins/rspec/spec/spec/runner/formatter/story/plain_text_formatter_spec.rb +97 -51
  900. data/vendor/plugins/rspec/spec/spec/runner/option_parser_spec.rb +50 -49
  901. data/vendor/plugins/rspec/spec/spec/runner/options_spec.rb +72 -2
  902. data/vendor/plugins/rspec/spec/spec/runner/resources/a_bar.rb +0 -0
  903. data/vendor/plugins/rspec/spec/spec/runner/resources/a_foo.rb +0 -0
  904. data/vendor/plugins/rspec/spec/spec/runner/resources/a_spec.rb +1 -0
  905. data/vendor/plugins/rspec/spec/spec/runner/spec_parser/spec_parser_fixture.rb +70 -0
  906. data/vendor/plugins/rspec/spec/spec/runner/spec_parser_spec.rb +31 -76
  907. data/vendor/plugins/rspec/spec/spec/spec_classes.rb +7 -0
  908. data/vendor/plugins/rspec/spec/spec/story/runner/story_runner_spec.rb +37 -0
  909. data/vendor/plugins/rspec/spec/spec/story/step_spec.rb +53 -0
  910. data/vendor/plugins/rspec/spec/spec/story/world_spec.rb +7 -0
  911. data/vendor/plugins/rspec/stories/example_groups/autogenerated_docstrings +27 -8
  912. data/vendor/plugins/rspec/stories/example_groups/output +5 -0
  913. data/vendor/plugins/rspec/stories/interop/test_case_with_should_methods +1 -1
  914. data/vendor/plugins/rspec/stories/resources/stories/failing_story.rb +15 -0
  915. data/vendor/plugins/rspec_on_rails/generators/rspec/templates/spec.opts +0 -1
  916. data/vendor/plugins/rspec_on_rails/generators/rspec_controller/rspec_controller_generator.rb +1 -2
  917. data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/rspec_scaffold_generator.rb +1 -3
  918. data/vendor/plugins/rspec_on_rails/lib/autotest/discover.rb +1 -0
  919. data/vendor/plugins/rspec_on_rails/lib/autotest/rails_rspec.rb +47 -47
  920. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/controller_example_group.rb +14 -4
  921. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/functional_example_group.rb +4 -4
  922. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/helper_example_group.rb +0 -1
  923. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/rails_example_group.rb +8 -0
  924. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/view_example_group.rb +4 -5
  925. data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/have_text.rb +2 -2
  926. data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/render_template.rb +4 -0
  927. data/vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb +23 -23
  928. data/vendor/plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb +14 -17
  929. data/vendor/plugins/rspec_on_rails/spec/rails/example/controller_spec_spec.rb +13 -0
  930. data/vendor/plugins/rspec_on_rails/spec/rails/example/view_spec_spec.rb +15 -1
  931. data/vendor/plugins/rspec_on_rails/spec/rails/extensions/action_view_base_spec.rb +37 -26
  932. data/vendor/plugins/rspec_on_rails/spec/rails/matchers/have_text_spec.rb +62 -0
  933. data/vendor/plugins/rspec_on_rails/spec/rails/matchers/render_spec.rb +73 -36
  934. data/vendor/plugins/rspec_on_rails/spec_resources/controllers/controller_spec_controller.rb +9 -1
  935. data/vendor/plugins/rspec_on_rails/spec_resources/controllers/render_spec_controller.rb +4 -0
  936. data/vendor/plugins/rspec_on_rails/stories/all.rb +4 -0
  937. data/vendor/plugins/rspec_on_rails/tasks/rspec.rake +10 -8
  938. data/vendor/plugins/static_sidebar/lib/static_sidebar.rb +4 -8
  939. data/vendor/plugins/typo_converter/README +71 -0
  940. data/vendor/plugins/typo_converter/Rakefile +22 -0
  941. data/vendor/plugins/typo_converter/init.rb +8 -0
  942. data/vendor/plugins/typo_converter/lib/converters/base.rb +249 -0
  943. data/vendor/plugins/typo_converter/lib/converters/dotclear.rb +98 -0
  944. data/vendor/plugins/typo_converter/lib/converters/dotclear/category.rb +7 -0
  945. data/vendor/plugins/typo_converter/lib/converters/dotclear/comment.rb +8 -0
  946. data/vendor/plugins/typo_converter/lib/converters/dotclear/post.rb +9 -0
  947. data/vendor/plugins/typo_converter/lib/converters/dotclear/user.rb +8 -0
  948. data/vendor/plugins/typo_converter/lib/converters/dotclear_2.rb +122 -0
  949. data/vendor/plugins/typo_converter/lib/converters/dotclear_2/category.rb +11 -0
  950. data/vendor/plugins/typo_converter/lib/converters/dotclear_2/comment.rb +13 -0
  951. data/vendor/plugins/typo_converter/lib/converters/dotclear_2/post.rb +15 -0
  952. data/vendor/plugins/typo_converter/lib/converters/dotclear_2/tag.rb +13 -0
  953. data/vendor/plugins/typo_converter/lib/converters/dotclear_2/user.rb +13 -0
  954. data/vendor/plugins/typo_converter/lib/converters/wp25.rb +128 -0
  955. data/vendor/plugins/typo_converter/lib/converters/wp25/comment.rb +12 -0
  956. data/vendor/plugins/typo_converter/lib/converters/wp25/post.rb +37 -0
  957. data/vendor/plugins/typo_converter/lib/converters/wp25/term.rb +11 -0
  958. data/vendor/plugins/typo_converter/lib/converters/wp25/term_relationship.rb +13 -0
  959. data/vendor/plugins/typo_converter/lib/converters/wp25/term_taxonomy.rb +19 -0
  960. data/vendor/plugins/typo_converter/lib/converters/wp25/user.rb +12 -0
  961. data/vendor/plugins/typo_converter/tasks/typo_converters_tasks.rake +4 -0
  962. data/vendor/plugins/typo_login_system/init.rb +2 -0
  963. data/vendor/plugins/typo_login_system/lib/access_control.rb +159 -0
  964. data/vendor/plugins/typo_login_system/lib/login_system.rb +90 -0
  965. data/vendor/plugins/xml_sidebar/lib/xml_sidebar.rb +1 -1
  966. metadata +823 -527
  967. data/CHANGES-5.0 +0 -82
  968. data/TODO.MULTIUSERS +0 -45
  969. data/app/views/admin/advanced/index.html.erb +0 -20
  970. data/app/views/admin/blacklist/list.html.erb +0 -13
  971. data/app/views/admin/cache/list.html.erb +0 -8
  972. data/app/views/admin/categories/list.html.erb +0 -18
  973. data/app/views/admin/categories/show.html.erb +0 -37
  974. data/app/views/admin/comments/comments.html.erb +0 -4
  975. data/app/views/admin/comments/list.html.erb +0 -37
  976. data/app/views/admin/comments/new.html.erb +0 -19
  977. data/app/views/admin/content/_show_categories.html.erb +0 -9
  978. data/app/views/admin/content/list.html.erb +0 -21
  979. data/app/views/admin/content/preview.html.erb +0 -10
  980. data/app/views/admin/feedback/list.html.erb +0 -48
  981. data/app/views/admin/pages/list.html.erb +0 -12
  982. data/app/views/admin/pages/preview.html.erb +0 -1
  983. data/app/views/admin/resources/list.html.erb +0 -17
  984. data/app/views/admin/textfilters/list.html.erb +0 -16
  985. data/app/views/admin/trackbacks/list.html.erb +0 -31
  986. data/app/views/admin/trackbacks/new.html.erb +0 -15
  987. data/app/views/admin/users/list.html.erb +0 -32
  988. data/app/views/admin/users/show.html.erb +0 -23
  989. data/app/views/layouts/minimal.html.erb +0 -145
  990. data/db/converters/wordpress.rb +0 -187
  991. data/db/converters/wordpress2.rb +0 -291
  992. data/lib/jabber_notify.rb +0 -37
  993. data/lib/login_system.rb +0 -85
  994. data/lib/tasks/rcov.rake +0 -38
  995. data/public/images/admin/bgdivider.gif +0 -0
  996. data/public/images/admin/bgoff2.png +0 -0
  997. data/public/images/admin/bgon.png +0 -0
  998. data/public/images/admin/foot.jpg +0 -0
  999. data/public/images/admin/table-header-last.png +0 -0
  1000. data/public/images/admin/table-header.png +0 -0
  1001. data/public/images/admin/top.gif +0 -0
  1002. data/public/images/admin/typo.gif +0 -0
  1003. data/public/images/admin/typologo.png +0 -0
  1004. data/public/images/bracket.gif +0 -0
  1005. data/public/images/header.jpg +0 -0
  1006. data/public/images/loading.gif +0 -0
  1007. data/public/javascripts/tiny_mce/langs/en.js +0 -154
  1008. data/public/javascripts/tiny_mce/license.txt +0 -504
  1009. data/public/javascripts/tiny_mce/plugins/advimage/css/advimage.css +0 -13
  1010. data/public/javascripts/tiny_mce/plugins/advimage/editor_plugin.js +0 -1
  1011. data/public/javascripts/tiny_mce/plugins/advimage/editor_plugin_src.js +0 -49
  1012. data/public/javascripts/tiny_mce/plugins/advimage/image.htm +0 -237
  1013. data/public/javascripts/tiny_mce/plugins/advimage/img/sample.gif +0 -0
  1014. data/public/javascripts/tiny_mce/plugins/advimage/js/image.js +0 -403
  1015. data/public/javascripts/tiny_mce/plugins/advimage/langs/en_dlg.js +0 -43
  1016. data/public/javascripts/tiny_mce/plugins/advlink/css/advlink.css +0 -8
  1017. data/public/javascripts/tiny_mce/plugins/advlink/editor_plugin.js +0 -1
  1018. data/public/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js +0 -58
  1019. data/public/javascripts/tiny_mce/plugins/advlink/js/advlink.js +0 -551
  1020. data/public/javascripts/tiny_mce/plugins/advlink/langs/en_dlg.js +0 -52
  1021. data/public/javascripts/tiny_mce/plugins/advlink/link.htm +0 -339
  1022. data/public/javascripts/tiny_mce/plugins/autosave/editor_plugin.js +0 -1
  1023. data/public/javascripts/tiny_mce/plugins/autosave/editor_plugin_src.js +0 -51
  1024. data/public/javascripts/tiny_mce/plugins/contextmenu/editor_plugin.js +0 -1
  1025. data/public/javascripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js +0 -84
  1026. data/public/javascripts/tiny_mce/plugins/emotions/editor_plugin.js +0 -1
  1027. data/public/javascripts/tiny_mce/plugins/emotions/editor_plugin_src.js +0 -40
  1028. data/public/javascripts/tiny_mce/plugins/emotions/emotions.htm +0 -41
  1029. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-cool.gif +0 -0
  1030. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-cry.gif +0 -0
  1031. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif +0 -0
  1032. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
  1033. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-frown.gif +0 -0
  1034. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif +0 -0
  1035. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif +0 -0
  1036. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif +0 -0
  1037. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
  1038. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif +0 -0
  1039. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-smile.gif +0 -0
  1040. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif +0 -0
  1041. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
  1042. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif +0 -0
  1043. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-wink.gif +0 -0
  1044. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-yell.gif +0 -0
  1045. data/public/javascripts/tiny_mce/plugins/emotions/js/emotions.js +0 -22
  1046. data/public/javascripts/tiny_mce/plugins/emotions/langs/en_dlg.js +0 -20
  1047. data/public/javascripts/tiny_mce/plugins/media/css/content.css +0 -6
  1048. data/public/javascripts/tiny_mce/plugins/media/css/media.css +0 -68
  1049. data/public/javascripts/tiny_mce/plugins/media/editor_plugin.js +0 -1
  1050. data/public/javascripts/tiny_mce/plugins/media/editor_plugin_src.js +0 -323
  1051. data/public/javascripts/tiny_mce/plugins/media/img/flash.gif +0 -0
  1052. data/public/javascripts/tiny_mce/plugins/media/img/flv_player.swf +0 -0
  1053. data/public/javascripts/tiny_mce/plugins/media/img/quicktime.gif +0 -0
  1054. data/public/javascripts/tiny_mce/plugins/media/img/realmedia.gif +0 -0
  1055. data/public/javascripts/tiny_mce/plugins/media/img/shockwave.gif +0 -0
  1056. data/public/javascripts/tiny_mce/plugins/media/img/trans.gif +0 -0
  1057. data/public/javascripts/tiny_mce/plugins/media/img/windowsmedia.gif +0 -0
  1058. data/public/javascripts/tiny_mce/plugins/media/js/embed.js +0 -73
  1059. data/public/javascripts/tiny_mce/plugins/media/js/media.js +0 -616
  1060. data/public/javascripts/tiny_mce/plugins/media/langs/en_dlg.js +0 -103
  1061. data/public/javascripts/tiny_mce/plugins/media/media.htm +0 -823
  1062. data/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin.js +0 -1
  1063. data/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +0 -50
  1064. data/public/javascripts/tiny_mce/plugins/paste/blank.htm +0 -22
  1065. data/public/javascripts/tiny_mce/plugins/paste/css/blank.css +0 -14
  1066. data/public/javascripts/tiny_mce/plugins/paste/css/pasteword.css +0 -3
  1067. data/public/javascripts/tiny_mce/plugins/paste/editor_plugin.js +0 -1
  1068. data/public/javascripts/tiny_mce/plugins/paste/editor_plugin_src.js +0 -382
  1069. data/public/javascripts/tiny_mce/plugins/paste/js/pastetext.js +0 -42
  1070. data/public/javascripts/tiny_mce/plugins/paste/js/pasteword.js +0 -56
  1071. data/public/javascripts/tiny_mce/plugins/paste/langs/en_dlg.js +0 -5
  1072. data/public/javascripts/tiny_mce/plugins/paste/pastetext.htm +0 -34
  1073. data/public/javascripts/tiny_mce/plugins/paste/pasteword.htm +0 -29
  1074. data/public/javascripts/tiny_mce/plugins/safari/blank.htm +0 -1
  1075. data/public/javascripts/tiny_mce/plugins/safari/editor_plugin.js +0 -1
  1076. data/public/javascripts/tiny_mce/plugins/safari/editor_plugin_src.js +0 -401
  1077. data/public/javascripts/tiny_mce/plugins/save/editor_plugin.js +0 -1
  1078. data/public/javascripts/tiny_mce/plugins/save/editor_plugin_src.js +0 -103
  1079. data/public/javascripts/tiny_mce/themes/advanced/about.htm +0 -56
  1080. data/public/javascripts/tiny_mce/themes/advanced/anchor.htm +0 -32
  1081. data/public/javascripts/tiny_mce/themes/advanced/charmap.htm +0 -53
  1082. data/public/javascripts/tiny_mce/themes/advanced/color_picker.htm +0 -74
  1083. data/public/javascripts/tiny_mce/themes/advanced/editor_template.js +0 -1
  1084. data/public/javascripts/tiny_mce/themes/advanced/editor_template_src.js +0 -990
  1085. data/public/javascripts/tiny_mce/themes/advanced/image.htm +0 -86
  1086. data/public/javascripts/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
  1087. data/public/javascripts/tiny_mce/themes/advanced/img/icons.gif +0 -0
  1088. data/public/javascripts/tiny_mce/themes/advanced/js/about.js +0 -76
  1089. data/public/javascripts/tiny_mce/themes/advanced/js/anchor.js +0 -30
  1090. data/public/javascripts/tiny_mce/themes/advanced/js/charmap.js +0 -327
  1091. data/public/javascripts/tiny_mce/themes/advanced/js/color_picker.js +0 -245
  1092. data/public/javascripts/tiny_mce/themes/advanced/js/image.js +0 -232
  1093. data/public/javascripts/tiny_mce/themes/advanced/js/link.js +0 -110
  1094. data/public/javascripts/tiny_mce/themes/advanced/js/source_editor.js +0 -62
  1095. data/public/javascripts/tiny_mce/themes/advanced/langs/en.js +0 -62
  1096. data/public/javascripts/tiny_mce/themes/advanced/langs/en_dlg.js +0 -51
  1097. data/public/javascripts/tiny_mce/themes/advanced/link.htm +0 -64
  1098. data/public/javascripts/tiny_mce/themes/advanced/skins/default/content.css +0 -18
  1099. data/public/javascripts/tiny_mce/themes/advanced/skins/default/dialog.css +0 -111
  1100. data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/buttons.png +0 -0
  1101. data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/items.gif +0 -0
  1102. data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
  1103. data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/menu_check.gif +0 -0
  1104. data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/progress.gif +0 -0
  1105. data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/tabs.gif +0 -0
  1106. data/public/javascripts/tiny_mce/themes/advanced/skins/default/ui.css +0 -193
  1107. data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/content.css +0 -18
  1108. data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/dialog.css +0 -111
  1109. data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
  1110. data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui.css +0 -193
  1111. data/public/javascripts/tiny_mce/themes/advanced/source_editor.htm +0 -32
  1112. data/public/javascripts/tiny_mce/themes/simple/editor_template.js +0 -1
  1113. data/public/javascripts/tiny_mce/themes/simple/editor_template_src.js +0 -85
  1114. data/public/javascripts/tiny_mce/themes/simple/img/icons.gif +0 -0
  1115. data/public/javascripts/tiny_mce/themes/simple/langs/en.js +0 -11
  1116. data/public/javascripts/tiny_mce/themes/simple/skins/default/content.css +0 -25
  1117. data/public/javascripts/tiny_mce/themes/simple/skins/default/ui.css +0 -32
  1118. data/public/javascripts/tiny_mce/themes/simple/skins/o2k7/content.css +0 -17
  1119. data/public/javascripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
  1120. data/public/javascripts/tiny_mce/themes/simple/skins/o2k7/ui.css +0 -35
  1121. data/public/javascripts/tiny_mce/tiny_mce.js +0 -1
  1122. data/public/javascripts/tiny_mce/tiny_mce_popup.js +0 -221
  1123. data/public/javascripts/tiny_mce/tiny_mce_src.js +0 -8803
  1124. data/public/javascripts/tiny_mce/utils/editable_selects.js +0 -61
  1125. data/public/javascripts/tiny_mce/utils/form_utils.js +0 -193
  1126. data/public/javascripts/tiny_mce/utils/mclayer.js +0 -210
  1127. data/public/javascripts/tiny_mce/utils/mctabs.js +0 -74
  1128. data/public/javascripts/tiny_mce/utils/validate.js +0 -219
  1129. data/public/stylesheets/minimal.css +0 -143
  1130. data/spec/fixtures/blacklist_patterns.yml +0 -10
  1131. data/spec/fixtures/blogs.yml +0 -77
  1132. data/spec/fixtures/categories.yml +0 -35
  1133. data/spec/fixtures/categorizations.yml +0 -31
  1134. data/spec/fixtures/contents.yml +0 -205
  1135. data/spec/fixtures/feedback.yml +0 -159
  1136. data/spec/fixtures/page_caches.yml +0 -7
  1137. data/spec/fixtures/profiles.yml +0 -11
  1138. data/spec/fixtures/redirects.yml +0 -13
  1139. data/spec/fixtures/resources.yml +0 -24
  1140. data/spec/fixtures/sidebars.yml +0 -12
  1141. data/spec/fixtures/tags.yml +0 -10
  1142. data/spec/fixtures/text_filters.yml +0 -42
  1143. data/spec/fixtures/triggers.yml +0 -1
  1144. data/spec/fixtures/users.yml +0 -56
  1145. data/spec/helpers/comments_helper_spec.rb +0 -11
  1146. data/test/fixtures/articles_tags.yml +0 -19
  1147. data/test/functional/accounts_controller_test.rb +0 -78
  1148. data/test/functional/admin/article_preview_test.rb +0 -82
  1149. data/test/functional/admin/blacklist_controller_test.rb +0 -63
  1150. data/test/functional/admin/categories_controller_test.rb +0 -106
  1151. data/test/functional/admin/comments_controller_test.rb +0 -78
  1152. data/test/functional/admin/content_controller_test.rb +0 -232
  1153. data/test/functional/admin/feedback_controller_test.rb +0 -59
  1154. data/test/functional/admin/pages_controller_test.rb +0 -88
  1155. data/test/functional/admin/profiles_controller_test.rb +0 -18
  1156. data/test/functional/admin/resources_controller_test.rb +0 -49
  1157. data/test/functional/admin/settings_controller_test.rb +0 -26
  1158. data/test/functional/admin/textfilters_controller_test.rb +0 -29
  1159. data/test/functional/admin/themes_controller_test.rb +0 -34
  1160. data/test/functional/admin/trackbacks_controller_test.rb +0 -76
  1161. data/test/functional/admin/users_controller_test.rb +0 -78
  1162. data/test/functional/articles_controller_test.rb +0 -263
  1163. data/test/functional/backend_controller_test.rb +0 -287
  1164. data/test/functional/redirect_controller_test.rb +0 -40
  1165. data/test/functional/textfilter_controller_test.rb +0 -273
  1166. data/test/functional/theme_controller_test.rb +0 -45
  1167. data/test/functional/xml_controller_test.rb +0 -235
  1168. data/test/mocks/themes/standard_issue/about.markdown +0 -5
  1169. data/test/mocks/themes/standard_issue/images/img01.gif +0 -0
  1170. data/test/mocks/themes/standard_issue/images/img02.gif +0 -0
  1171. data/test/mocks/themes/standard_issue/images/img03.gif +0 -0
  1172. data/test/mocks/themes/standard_issue/images/img04.jpg +0 -0
  1173. data/test/mocks/themes/standard_issue/images/img05.gif +0 -0
  1174. data/test/mocks/themes/standard_issue/images/img06.gif +0 -0
  1175. data/test/mocks/themes/standard_issue/images/img07.gif +0 -0
  1176. data/test/mocks/themes/standard_issue/images/img08.gif +0 -0
  1177. data/test/mocks/themes/standard_issue/images/img09.gif +0 -0
  1178. data/test/mocks/themes/standard_issue/images/img10.gif +0 -0
  1179. data/test/mocks/themes/standard_issue/images/spinner.gif +0 -0
  1180. data/test/mocks/themes/standard_issue/layouts/default.html.erb +0 -61
  1181. data/test/mocks/themes/standard_issue/preview.png +0 -0
  1182. data/test/mocks/themes/standard_issue/stylesheets/application.css +0 -461
  1183. data/test/mocks/themes/standard_issue/views/articles/_article.html.erb +0 -32
  1184. data/test/mocks/themes/standard_issue/views/articles/_comment.html.erb +0 -12
  1185. data/test/mocks/themes/standard_issue/views/articles/_comment_form.html.erb +0 -48
  1186. data/test/mocks/themes/standard_issue/views/articles/_comment_list.html.erb +0 -7
  1187. data/test/mocks/themes/standard_issue/views/articles/_trackback.html.erb +0 -9
  1188. data/test/mocks/themes/standard_issue/views/articles/comment_preview.html.erb +0 -10
  1189. data/test/mocks/themes/standard_issue/views/articles/index.html.erb +0 -5
  1190. data/test/mocks/themes/standard_issue/views/articles/read.html.erb +0 -42
  1191. data/test/mocks/themes/standard_issue/views/shared/_search.html.erb +0 -17
  1192. data/test/mocks/themes/standard_issue/views/theme/static_view_test.rhtml +0 -1
  1193. data/test/unit/amazon_sidebar_test.rb +0 -36
  1194. data/test/unit/article_closing_test.rb +0 -40
  1195. data/test/unit/article_test.rb +0 -304
  1196. data/test/unit/assumptions_tests.rb +0 -54
  1197. data/test/unit/blacklist_pattern_test.rb +0 -14
  1198. data/test/unit/blog_test.rb +0 -52
  1199. data/test/unit/cache_support_test.rb +0 -62
  1200. data/test/unit/category_test.rb +0 -42
  1201. data/test/unit/comment_test.rb +0 -188
  1202. data/test/unit/configuration_test.rb +0 -21
  1203. data/test/unit/content_state/feedback_states_test.rb +0 -67
  1204. data/test/unit/metafragment_test.rb +0 -63
  1205. data/test/unit/notification_mailer_test.rb +0 -55
  1206. data/test/unit/notification_test.rb +0 -10
  1207. data/test/unit/page_test.rb +0 -45
  1208. data/test/unit/ping_pinger_test.rb +0 -30
  1209. data/test/unit/ping_test.rb +0 -127
  1210. data/test/unit/redirect_test.rb +0 -19
  1211. data/test/unit/resource_test.rb +0 -71
  1212. data/test/unit/route_cache_test.rb +0 -11
  1213. data/test/unit/sidebar_test.rb +0 -9
  1214. data/test/unit/static_sidebar_test.rb +0 -19
  1215. data/test/unit/tag_test.rb +0 -71
  1216. data/test/unit/text_filter_test.rb +0 -126
  1217. data/test/unit/theme_test.rb +0 -44
  1218. data/test/unit/trackback_test.rb +0 -22
  1219. data/test/unit/trigger_test.rb +0 -40
  1220. data/test/unit/typo_deprecated_test.rb +0 -22
  1221. data/test/unit/user_test.rb +0 -111
  1222. data/themes/dirtylicious/about.markdown +0 -3
  1223. data/themes/dirtylicious/images/body.jpg +0 -0
  1224. data/themes/dirtylicious/images/container.jpg +0 -0
  1225. data/themes/dirtylicious/images/gravatar.gif +0 -0
  1226. data/themes/dirtylicious/images/header.jpg +0 -0
  1227. data/themes/dirtylicious/images/li.gif +0 -0
  1228. data/themes/dirtylicious/images/main.gif +0 -0
  1229. data/themes/dirtylicious/images/nav.gif +0 -0
  1230. data/themes/dirtylicious/images/quote.gif +0 -0
  1231. data/themes/dirtylicious/images/spinner.gif +0 -0
  1232. data/themes/dirtylicious/layouts/default.html.erb +0 -60
  1233. data/themes/dirtylicious/preview.png +0 -0
  1234. data/themes/dirtylicious/stylesheets/application.css +0 -327
  1235. data/themes/dirtylicious/views/articles/_article.html.erb +0 -33
  1236. data/themes/dirtylicious/views/articles/_comment.html.erb +0 -14
  1237. data/themes/dirtylicious/views/articles/_comment_form.html.erb +0 -37
  1238. data/themes/dirtylicious/views/articles/_comment_list.html.erb +0 -7
  1239. data/themes/dirtylicious/views/articles/_trackback.html.erb +0 -9
  1240. data/themes/dirtylicious/views/articles/comment_preview.html.erb +0 -10
  1241. data/themes/dirtylicious/views/articles/index.html.erb +0 -5
  1242. data/themes/dirtylicious/views/articles/read.html.erb +0 -42
  1243. data/themes/dirtylicious/views/shared/_search.html.erb +0 -16
  1244. data/themes/standard_issue/about.markdown +0 -5
  1245. data/themes/standard_issue/images/img01.gif +0 -0
  1246. data/themes/standard_issue/images/img02.gif +0 -0
  1247. data/themes/standard_issue/images/img03.gif +0 -0
  1248. data/themes/standard_issue/images/img04.jpg +0 -0
  1249. data/themes/standard_issue/images/img05.gif +0 -0
  1250. data/themes/standard_issue/images/img06.gif +0 -0
  1251. data/themes/standard_issue/images/img07.gif +0 -0
  1252. data/themes/standard_issue/images/img08.gif +0 -0
  1253. data/themes/standard_issue/images/img09.gif +0 -0
  1254. data/themes/standard_issue/images/img10.gif +0 -0
  1255. data/themes/standard_issue/images/spinner.gif +0 -0
  1256. data/themes/standard_issue/layouts/default.html.erb +0 -59
  1257. data/themes/standard_issue/preview.png +0 -0
  1258. data/themes/standard_issue/stylesheets/application.css +0 -461
  1259. data/themes/standard_issue/views/articles/_article.html.erb +0 -32
  1260. data/themes/standard_issue/views/articles/_comment.html.erb +0 -12
  1261. data/themes/standard_issue/views/articles/_comment_form.html.erb +0 -48
  1262. data/themes/standard_issue/views/articles/_comment_list.html.erb +0 -7
  1263. data/themes/standard_issue/views/articles/_trackback.html.erb +0 -9
  1264. data/themes/standard_issue/views/articles/comment_preview.html.erb +0 -10
  1265. data/themes/standard_issue/views/articles/index.html.erb +0 -5
  1266. data/themes/standard_issue/views/articles/read.html.erb +0 -42
  1267. data/themes/standard_issue/views/shared/_search.html.erb +0 -17
  1268. data/vendor/jabber4r/CHANGES +0 -8
  1269. data/vendor/jabber4r/LICENSE.txt +0 -12
  1270. data/vendor/jabber4r/README +0 -180
  1271. data/vendor/jabber4r/Rakefile.rb +0 -143
  1272. data/vendor/jabber4r/lib/jabber4r/jabber4r.rb +0 -22
  1273. data/vendor/jabber4r/lib/jabber4r/jid.rb +0 -93
  1274. data/vendor/jabber4r/lib/jabber4r/protocol.rb +0 -1384
  1275. data/vendor/jabber4r/lib/jabber4r/rexml_1.8_patch.rb +0 -16
  1276. data/vendor/jabber4r/lib/jabber4r/roster.rb +0 -322
  1277. data/vendor/jabber4r/lib/jabber4r/session.rb +0 -615
  1278. data/vendor/jabber4r/lib/jabber4r/vcard.rb +0 -42
  1279. data/vendor/plugins/haml/MIT-LICENSE +0 -20
  1280. data/vendor/plugins/haml/REFERENCE +0 -662
  1281. data/vendor/plugins/haml/Rakefile +0 -171
  1282. data/vendor/plugins/haml/VERSION +0 -1
  1283. data/vendor/plugins/haml/bin/haml +0 -18
  1284. data/vendor/plugins/haml/init.rb +0 -3
  1285. data/vendor/plugins/haml/lib/haml/buffer.rb +0 -224
  1286. data/vendor/plugins/haml/lib/haml/engine.rb +0 -557
  1287. data/vendor/plugins/haml/lib/haml/helpers.rb +0 -220
  1288. data/vendor/plugins/haml/lib/haml/helpers/action_view_mods.rb +0 -54
  1289. data/vendor/plugins/haml/lib/haml/template.rb +0 -138
  1290. data/vendor/plugins/haml/test/benchmark.rb +0 -62
  1291. data/vendor/plugins/haml/test/engine_test.rb +0 -93
  1292. data/vendor/plugins/haml/test/helper_test.rb +0 -105
  1293. data/vendor/plugins/haml/test/mocks/article.rb +0 -6
  1294. data/vendor/plugins/haml/test/profile.rb +0 -45
  1295. data/vendor/plugins/haml/test/results/content_for_layout.xhtml +0 -16
  1296. data/vendor/plugins/haml/test/results/eval_suppressed.xhtml +0 -2
  1297. data/vendor/plugins/haml/test/results/helpers.xhtml +0 -50
  1298. data/vendor/plugins/haml/test/results/helpful.xhtml +0 -5
  1299. data/vendor/plugins/haml/test/results/just_stuff.xhtml +0 -38
  1300. data/vendor/plugins/haml/test/results/list.xhtml +0 -12
  1301. data/vendor/plugins/haml/test/results/original_engine.xhtml +0 -24
  1302. data/vendor/plugins/haml/test/results/partials.xhtml +0 -20
  1303. data/vendor/plugins/haml/test/results/silent_script.xhtml +0 -74
  1304. data/vendor/plugins/haml/test/results/standard.xhtml +0 -42
  1305. data/vendor/plugins/haml/test/results/tag_parsing.xhtml +0 -28
  1306. data/vendor/plugins/haml/test/results/very_basic.xhtml +0 -7
  1307. data/vendor/plugins/haml/test/results/whitespace_handling.xhtml +0 -51
  1308. data/vendor/plugins/haml/test/rhtml/standard.rhtml +0 -51
  1309. data/vendor/plugins/haml/test/runner.rb +0 -15
  1310. data/vendor/plugins/haml/test/template_test.rb +0 -137
  1311. data/vendor/plugins/haml/test/templates/_partial.haml +0 -7
  1312. data/vendor/plugins/haml/test/templates/_text_area.haml +0 -3
  1313. data/vendor/plugins/haml/test/templates/content_for_layout.haml +0 -10
  1314. data/vendor/plugins/haml/test/templates/eval_suppressed.haml +0 -5
  1315. data/vendor/plugins/haml/test/templates/helpers.haml +0 -39
  1316. data/vendor/plugins/haml/test/templates/helpful.haml +0 -6
  1317. data/vendor/plugins/haml/test/templates/just_stuff.haml +0 -34
  1318. data/vendor/plugins/haml/test/templates/list.haml +0 -12
  1319. data/vendor/plugins/haml/test/templates/original_engine.haml +0 -17
  1320. data/vendor/plugins/haml/test/templates/partialize.haml +0 -1
  1321. data/vendor/plugins/haml/test/templates/partials.haml +0 -12
  1322. data/vendor/plugins/haml/test/templates/silent_script.haml +0 -40
  1323. data/vendor/plugins/haml/test/templates/standard.haml +0 -40
  1324. data/vendor/plugins/haml/test/templates/tag_parsing.haml +0 -24
  1325. data/vendor/plugins/haml/test/templates/very_basic.haml +0 -4
  1326. data/vendor/plugins/haml/test/templates/whitespace_handling.haml +0 -66
  1327. data/vendor/plugins/rspec/spec/spec/interop/test/unit/testcase_spec_with_test_unit.rb +0 -20
  1328. data/vendor/plugins/rspec/spec/spec/interop/test/unit/testsuite_adapter_spec_with_test_unit.rb +0 -34
  1329. data/vendor/plugins/rspec_on_rails/generators/helpers/rails_identifier.rb +0 -16
  1330. data/vendor/plugins/tiny_mce/README +0 -10
  1331. data/vendor/plugins/tiny_mce/Rakefile +0 -22
  1332. data/vendor/plugins/tiny_mce/TODO +0 -2
  1333. data/vendor/plugins/tiny_mce/changelog +0 -1017
  1334. data/vendor/plugins/tiny_mce/init.rb +0 -3
  1335. data/vendor/plugins/tiny_mce/install.rb +0 -1
  1336. data/vendor/plugins/tiny_mce/lib/tiny_mce.rb +0 -36
  1337. data/vendor/plugins/tiny_mce/lib/tiny_mce_helper.rb +0 -48
  1338. data/vendor/plugins/tiny_mce/tasks/tiny_mce.rake +0 -40
  1339. data/vendor/plugins/tiny_mce/test/helper_testcase.rb +0 -38
  1340. data/vendor/plugins/tiny_mce/test/tiny_mce_helper_test.rb +0 -67
  1341. data/vendor/plugins/tiny_mce/test/tiny_mce_test.rb +0 -85
  1342. data/vendor/plugins/tiny_mce/tiny_mce_options.yml +0 -121
@@ -0,0 +1,56 @@
1
+ /*
2
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
3
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
4
+ *
5
+ * == BEGIN LICENSE ==
6
+ *
7
+ * Licensed under the terms of any of the following licenses at your
8
+ * choice:
9
+ *
10
+ * - GNU General Public License Version 2 or later (the "GPL")
11
+ * http://www.gnu.org/licenses/gpl.html
12
+ *
13
+ * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
14
+ * http://www.gnu.org/licenses/lgpl.html
15
+ *
16
+ * - Mozilla Public License Version 1.1 or later (the "MPL")
17
+ * http://www.mozilla.org/MPL/MPL-1.1.html
18
+ *
19
+ * == END LICENSE ==
20
+ *
21
+ * FCKPlugin Class: Represents a single plugin.
22
+ */
23
+
24
+ var FCKPlugin = function( name, availableLangs, basePath )
25
+ {
26
+ this.Name = name ;
27
+ this.BasePath = basePath ? basePath : FCKConfig.PluginsPath ;
28
+ this.Path = this.BasePath + name + '/' ;
29
+
30
+ if ( !availableLangs || availableLangs.length == 0 )
31
+ this.AvailableLangs = new Array() ;
32
+ else
33
+ this.AvailableLangs = availableLangs.split(',') ;
34
+ }
35
+
36
+ FCKPlugin.prototype.Load = function()
37
+ {
38
+ // Load the language file, if defined.
39
+ if ( this.AvailableLangs.length > 0 )
40
+ {
41
+ var sLang ;
42
+
43
+ // Check if the plugin has the language file for the active language.
44
+ if ( this.AvailableLangs.IndexOf( FCKLanguageManager.ActiveLanguage.Code ) >= 0 )
45
+ sLang = FCKLanguageManager.ActiveLanguage.Code ;
46
+ else
47
+ // Load the default language file (first one) if the current one is not available.
48
+ sLang = this.AvailableLangs[0] ;
49
+
50
+ // Add the main plugin script.
51
+ LoadScript( this.Path + 'lang/' + sLang + '.js' ) ;
52
+ }
53
+
54
+ // Add the main plugin script.
55
+ LoadScript( this.Path + 'fckplugin.js' ) ;
56
+ }
@@ -0,0 +1,377 @@
1
+ /*
2
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
3
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
4
+ *
5
+ * == BEGIN LICENSE ==
6
+ *
7
+ * Licensed under the terms of any of the following licenses at your
8
+ * choice:
9
+ *
10
+ * - GNU General Public License Version 2 or later (the "GPL")
11
+ * http://www.gnu.org/licenses/gpl.html
12
+ *
13
+ * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
14
+ * http://www.gnu.org/licenses/lgpl.html
15
+ *
16
+ * - Mozilla Public License Version 1.1 or later (the "MPL")
17
+ * http://www.mozilla.org/MPL/MPL-1.1.html
18
+ *
19
+ * == END LICENSE ==
20
+ *
21
+ * FCKSpecialCombo Class: represents a special combo.
22
+ */
23
+
24
+ var FCKSpecialCombo = function( caption, fieldWidth, panelWidth, panelMaxHeight, parentWindow )
25
+ {
26
+ // Default properties values.
27
+ this.FieldWidth = fieldWidth || 100 ;
28
+ this.PanelWidth = panelWidth || 150 ;
29
+ this.PanelMaxHeight = panelMaxHeight || 150 ;
30
+ this.Label = ' ' ;
31
+ this.Caption = caption ;
32
+ this.Tooltip = caption ;
33
+ this.Style = FCK_TOOLBARITEM_ICONTEXT ;
34
+
35
+ this.Enabled = true ;
36
+
37
+ this.Items = new Object() ;
38
+
39
+ this._Panel = new FCKPanel( parentWindow || window ) ;
40
+ this._Panel.AppendStyleSheet( FCKConfig.SkinPath + 'fck_editor.css' ) ;
41
+ this._PanelBox = this._Panel.MainNode.appendChild( this._Panel.Document.createElement( 'DIV' ) ) ;
42
+ this._PanelBox.className = 'SC_Panel' ;
43
+ this._PanelBox.style.width = this.PanelWidth + 'px' ;
44
+
45
+ this._PanelBox.innerHTML = '<table cellpadding="0" cellspacing="0" width="100%" style="TABLE-LAYOUT: fixed"><tr><td nowrap></td></tr></table>' ;
46
+
47
+ this._ItemsHolderEl = this._PanelBox.getElementsByTagName('TD')[0] ;
48
+
49
+ if ( FCK.IECleanup )
50
+ FCK.IECleanup.AddItem( this, FCKSpecialCombo_Cleanup ) ;
51
+
52
+ // this._Panel.StyleSheet = FCKConfig.SkinPath + 'fck_contextmenu.css' ;
53
+ // this._Panel.Create() ;
54
+ // this._Panel.PanelDiv.className += ' SC_Panel' ;
55
+ // this._Panel.PanelDiv.innerHTML = '<table cellpadding="0" cellspacing="0" width="100%" style="TABLE-LAYOUT: fixed"><tr><td nowrap></td></tr></table>' ;
56
+ // this._ItemsHolderEl = this._Panel.PanelDiv.getElementsByTagName('TD')[0] ;
57
+ }
58
+
59
+ function FCKSpecialCombo_ItemOnMouseOver()
60
+ {
61
+ this.className += ' SC_ItemOver' ;
62
+ }
63
+
64
+ function FCKSpecialCombo_ItemOnMouseOut()
65
+ {
66
+ this.className = this.originalClass ;
67
+ }
68
+
69
+ function FCKSpecialCombo_ItemOnClick( ev, specialCombo, itemId )
70
+ {
71
+ this.className = this.originalClass ;
72
+
73
+ specialCombo._Panel.Hide() ;
74
+
75
+ specialCombo.SetLabel( this.FCKItemLabel ) ;
76
+
77
+ if ( typeof( specialCombo.OnSelect ) == 'function' )
78
+ specialCombo.OnSelect( itemId, this ) ;
79
+ }
80
+
81
+ FCKSpecialCombo.prototype.ClearItems = function ()
82
+ {
83
+ if ( this.Items )
84
+ {
85
+ for ( var key in this.Items )
86
+ this.Items[key] = null ;
87
+ }
88
+
89
+ var itemsholder = this._ItemsHolderEl ;
90
+ while ( itemsholder.firstChild )
91
+ itemsholder.removeChild( itemsholder.firstChild ) ;
92
+ }
93
+
94
+ FCKSpecialCombo.prototype.AddItem = function( id, html, label, bgColor )
95
+ {
96
+ // <div class="SC_Item" onmouseover="this.className='SC_Item SC_ItemOver';" onmouseout="this.className='SC_Item';"><b>Bold 1</b></div>
97
+ var oDiv = this._ItemsHolderEl.appendChild( this._Panel.Document.createElement( 'DIV' ) ) ;
98
+ oDiv.className = oDiv.originalClass = 'SC_Item' ;
99
+ oDiv.innerHTML = html ;
100
+ oDiv.FCKItemLabel = label || id ;
101
+ oDiv.Selected = false ;
102
+
103
+ // In IE, the width must be set so the borders are shown correctly when the content overflows.
104
+ if ( FCKBrowserInfo.IsIE )
105
+ oDiv.style.width = '100%' ;
106
+
107
+ if ( bgColor )
108
+ oDiv.style.backgroundColor = bgColor ;
109
+
110
+ FCKTools.AddEventListenerEx( oDiv, 'mouseover', FCKSpecialCombo_ItemOnMouseOver ) ;
111
+ FCKTools.AddEventListenerEx( oDiv, 'mouseout', FCKSpecialCombo_ItemOnMouseOut ) ;
112
+ FCKTools.AddEventListenerEx( oDiv, 'click', FCKSpecialCombo_ItemOnClick, [ this, id ] ) ;
113
+
114
+ this.Items[ id.toString().toLowerCase() ] = oDiv ;
115
+
116
+ return oDiv ;
117
+ }
118
+
119
+ FCKSpecialCombo.prototype.SelectItem = function( item )
120
+ {
121
+ if ( typeof item == 'string' )
122
+ item = this.Items[ item.toString().toLowerCase() ] ;
123
+
124
+ if ( item )
125
+ {
126
+ item.className = item.originalClass = 'SC_ItemSelected' ;
127
+ item.Selected = true ;
128
+ }
129
+ }
130
+
131
+ FCKSpecialCombo.prototype.SelectItemByLabel = function( itemLabel, setLabel )
132
+ {
133
+ for ( var id in this.Items )
134
+ {
135
+ var oDiv = this.Items[id] ;
136
+
137
+ if ( oDiv.FCKItemLabel == itemLabel )
138
+ {
139
+ oDiv.className = oDiv.originalClass = 'SC_ItemSelected' ;
140
+ oDiv.Selected = true ;
141
+
142
+ if ( setLabel )
143
+ this.SetLabel( itemLabel ) ;
144
+ }
145
+ }
146
+ }
147
+
148
+ FCKSpecialCombo.prototype.DeselectAll = function( clearLabel )
149
+ {
150
+ for ( var i in this.Items )
151
+ {
152
+ if ( !this.Items[i] ) continue;
153
+ this.Items[i].className = this.Items[i].originalClass = 'SC_Item' ;
154
+ this.Items[i].Selected = false ;
155
+ }
156
+
157
+ if ( clearLabel )
158
+ this.SetLabel( '' ) ;
159
+ }
160
+
161
+ FCKSpecialCombo.prototype.SetLabelById = function( id )
162
+ {
163
+ id = id ? id.toString().toLowerCase() : '' ;
164
+
165
+ var oDiv = this.Items[ id ] ;
166
+ this.SetLabel( oDiv ? oDiv.FCKItemLabel : '' ) ;
167
+ }
168
+
169
+ FCKSpecialCombo.prototype.SetLabel = function( text )
170
+ {
171
+ text = ( !text || text.length == 0 ) ? '&nbsp;' : text ;
172
+
173
+ if ( text == this.Label )
174
+ return ;
175
+
176
+ this.Label = text ;
177
+
178
+ var labelEl = this._LabelEl ;
179
+ if ( labelEl )
180
+ {
181
+ labelEl.innerHTML = text ;
182
+
183
+ // It may happen that the label is some HTML, including tags. This
184
+ // would be a problem because when the user click on those tags, the
185
+ // combo will get the selection from the editing area. So we must
186
+ // disable any kind of selection here.
187
+ FCKTools.DisableSelection( labelEl ) ;
188
+ }
189
+ }
190
+
191
+ FCKSpecialCombo.prototype.SetEnabled = function( isEnabled )
192
+ {
193
+ this.Enabled = isEnabled ;
194
+
195
+ this._OuterTable.className = isEnabled ? '' : 'SC_FieldDisabled' ;
196
+ }
197
+
198
+ FCKSpecialCombo.prototype.Create = function( targetElement )
199
+ {
200
+ var oDoc = FCKTools.GetElementDocument( targetElement ) ;
201
+ var eOuterTable = this._OuterTable = targetElement.appendChild( oDoc.createElement( 'TABLE' ) ) ;
202
+ eOuterTable.cellPadding = 0 ;
203
+ eOuterTable.cellSpacing = 0 ;
204
+
205
+ eOuterTable.insertRow(-1) ;
206
+
207
+ var sClass ;
208
+ var bShowLabel ;
209
+
210
+ switch ( this.Style )
211
+ {
212
+ case FCK_TOOLBARITEM_ONLYICON :
213
+ sClass = 'TB_ButtonType_Icon' ;
214
+ bShowLabel = false;
215
+ break ;
216
+ case FCK_TOOLBARITEM_ONLYTEXT :
217
+ sClass = 'TB_ButtonType_Text' ;
218
+ bShowLabel = false;
219
+ break ;
220
+ case FCK_TOOLBARITEM_ICONTEXT :
221
+ bShowLabel = true;
222
+ break ;
223
+ }
224
+
225
+ if ( this.Caption && this.Caption.length > 0 && bShowLabel )
226
+ {
227
+ var oCaptionCell = eOuterTable.rows[0].insertCell(-1) ;
228
+ oCaptionCell.innerHTML = this.Caption ;
229
+ oCaptionCell.className = 'SC_FieldCaption' ;
230
+ }
231
+
232
+ // Create the main DIV element.
233
+ var oField = FCKTools.AppendElement( eOuterTable.rows[0].insertCell(-1), 'div' ) ;
234
+ if ( bShowLabel )
235
+ {
236
+ oField.className = 'SC_Field' ;
237
+ oField.style.width = this.FieldWidth + 'px' ;
238
+ oField.innerHTML = '<table width="100%" cellpadding="0" cellspacing="0" style="TABLE-LAYOUT: fixed;"><tbody><tr><td class="SC_FieldLabel"><label>&nbsp;</label></td><td class="SC_FieldButton">&nbsp;</td></tr></tbody></table>' ;
239
+
240
+ this._LabelEl = oField.getElementsByTagName('label')[0] ; // Memory Leak
241
+ this._LabelEl.innerHTML = this.Label ;
242
+ }
243
+ else
244
+ {
245
+ oField.className = 'TB_Button_Off' ;
246
+ //oField.innerHTML = '<span className="SC_FieldCaption">' + this.Caption + '<table cellpadding="0" cellspacing="0" style="TABLE-LAYOUT: fixed;"><tbody><tr><td class="SC_FieldButton" style="border-left: none;">&nbsp;</td></tr></tbody></table>' ;
247
+ //oField.innerHTML = '<table cellpadding="0" cellspacing="0" style="TABLE-LAYOUT: fixed;"><tbody><tr><td class="SC_FieldButton" style="border-left: none;">&nbsp;</td></tr></tbody></table>' ;
248
+
249
+ // Gets the correct CSS class to use for the specified style (param).
250
+ oField.innerHTML = '<table title="' + this.Tooltip + '" class="' + sClass + '" cellspacing="0" cellpadding="0" border="0">' +
251
+ '<tr>' +
252
+ //'<td class="TB_Icon"><img src="' + FCKConfig.SkinPath + 'toolbar/' + this.Command.Name.toLowerCase() + '.gif" width="21" height="21"></td>' +
253
+ '<td><img class="TB_Button_Padding" src="' + FCK_SPACER_PATH + '" /></td>' +
254
+ '<td class="TB_Text">' + this.Caption + '</td>' +
255
+ '<td><img class="TB_Button_Padding" src="' + FCK_SPACER_PATH + '" /></td>' +
256
+ '<td class="TB_ButtonArrow"><img src="' + FCKConfig.SkinPath + 'images/toolbar.buttonarrow.gif" width="5" height="3"></td>' +
257
+ '<td><img class="TB_Button_Padding" src="' + FCK_SPACER_PATH + '" /></td>' +
258
+ '</tr>' +
259
+ '</table>' ;
260
+ }
261
+
262
+
263
+ // Events Handlers
264
+
265
+ FCKTools.AddEventListenerEx( oField, 'mouseover', FCKSpecialCombo_OnMouseOver, this ) ;
266
+ FCKTools.AddEventListenerEx( oField, 'mouseout', FCKSpecialCombo_OnMouseOut, this ) ;
267
+ FCKTools.AddEventListenerEx( oField, 'click', FCKSpecialCombo_OnClick, this ) ;
268
+
269
+ FCKTools.DisableSelection( this._Panel.Document.body ) ;
270
+ }
271
+
272
+ function FCKSpecialCombo_Cleanup()
273
+ {
274
+ this._LabelEl = null ;
275
+ this._OuterTable = null ;
276
+ this._ItemsHolderEl = null ;
277
+ this._PanelBox = null ;
278
+
279
+ if ( this.Items )
280
+ {
281
+ for ( var key in this.Items )
282
+ this.Items[key] = null ;
283
+ }
284
+ }
285
+
286
+ function FCKSpecialCombo_OnMouseOver( ev, specialCombo )
287
+ {
288
+ if ( specialCombo.Enabled )
289
+ {
290
+ switch ( specialCombo.Style )
291
+ {
292
+ case FCK_TOOLBARITEM_ONLYICON :
293
+ this.className = 'TB_Button_On_Over';
294
+ break ;
295
+ case FCK_TOOLBARITEM_ONLYTEXT :
296
+ this.className = 'TB_Button_On_Over';
297
+ break ;
298
+ case FCK_TOOLBARITEM_ICONTEXT :
299
+ this.className = 'SC_Field SC_FieldOver' ;
300
+ break ;
301
+ }
302
+ }
303
+ }
304
+
305
+ function FCKSpecialCombo_OnMouseOut( ev, specialCombo )
306
+ {
307
+ switch ( specialCombo.Style )
308
+ {
309
+ case FCK_TOOLBARITEM_ONLYICON :
310
+ this.className = 'TB_Button_Off';
311
+ break ;
312
+ case FCK_TOOLBARITEM_ONLYTEXT :
313
+ this.className = 'TB_Button_Off';
314
+ break ;
315
+ case FCK_TOOLBARITEM_ICONTEXT :
316
+ this.className='SC_Field' ;
317
+ break ;
318
+ }
319
+ }
320
+
321
+ function FCKSpecialCombo_OnClick( e, specialCombo )
322
+ {
323
+ // For Mozilla we must stop the event propagation to avoid it hiding
324
+ // the panel because of a click outside of it.
325
+ // if ( e )
326
+ // {
327
+ // e.stopPropagation() ;
328
+ // FCKPanelEventHandlers.OnDocumentClick( e ) ;
329
+ // }
330
+
331
+ if ( specialCombo.Enabled )
332
+ {
333
+ var oPanel = specialCombo._Panel ;
334
+ var oPanelBox = specialCombo._PanelBox ;
335
+ var oItemsHolder = specialCombo._ItemsHolderEl ;
336
+ var iMaxHeight = specialCombo.PanelMaxHeight ;
337
+
338
+ if ( specialCombo.OnBeforeClick )
339
+ specialCombo.OnBeforeClick( specialCombo ) ;
340
+
341
+ // This is a tricky thing. We must call the "Load" function, otherwise
342
+ // it will not be possible to retrieve "oItemsHolder.offsetHeight" (IE only).
343
+ if ( FCKBrowserInfo.IsIE )
344
+ oPanel.Preload( 0, this.offsetHeight, this ) ;
345
+
346
+ if ( oItemsHolder.offsetHeight > iMaxHeight )
347
+ // {
348
+ oPanelBox.style.height = iMaxHeight + 'px' ;
349
+
350
+ // if ( FCKBrowserInfo.IsGecko )
351
+ // oPanelBox.style.overflow = '-moz-scrollbars-vertical' ;
352
+ // }
353
+ else
354
+ oPanelBox.style.height = '' ;
355
+
356
+ // oPanel.PanelDiv.style.width = specialCombo.PanelWidth + 'px' ;
357
+
358
+ oPanel.Show( 0, this.offsetHeight, this ) ;
359
+ }
360
+
361
+ // return false ;
362
+ }
363
+
364
+ /*
365
+ Sample Combo Field HTML output:
366
+
367
+ <div class="SC_Field" style="width: 80px;">
368
+ <table width="100%" cellpadding="0" cellspacing="0" style="table-layout: fixed;">
369
+ <tbody>
370
+ <tr>
371
+ <td class="SC_FieldLabel"><label>&nbsp;</label></td>
372
+ <td class="SC_FieldButton">&nbsp;</td>
373
+ </tr>
374
+ </tbody>
375
+ </table>
376
+ </div>
377
+ */
@@ -0,0 +1,1280 @@
1
+ /*
2
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
3
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
4
+ *
5
+ * == BEGIN LICENSE ==
6
+ *
7
+ * Licensed under the terms of any of the following licenses at your
8
+ * choice:
9
+ *
10
+ * - GNU General Public License Version 2 or later (the "GPL")
11
+ * http://www.gnu.org/licenses/gpl.html
12
+ *
13
+ * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
14
+ * http://www.gnu.org/licenses/lgpl.html
15
+ *
16
+ * - Mozilla Public License Version 1.1 or later (the "MPL")
17
+ * http://www.mozilla.org/MPL/MPL-1.1.html
18
+ *
19
+ * == END LICENSE ==
20
+ *
21
+ * FCKStyle Class: contains a style definition, and all methods to work with
22
+ * the style in a document.
23
+ */
24
+
25
+ /**
26
+ * @param {Object} styleDesc A "style descriptor" object, containing the raw
27
+ * style definition in the following format:
28
+ * '<style name>' : {
29
+ * Element : '<element name>',
30
+ * Attributes : {
31
+ * '<att name>' : '<att value>',
32
+ * ...
33
+ * },
34
+ * Styles : {
35
+ * '<style name>' : '<style value>',
36
+ * ...
37
+ * },
38
+ * Overrides : '<element name>'|{
39
+ * Element : '<element name>',
40
+ * Attributes : {
41
+ * '<att name>' : '<att value>'|/<att regex>/
42
+ * },
43
+ * Styles : {
44
+ * '<style name>' : '<style value>'|/<style regex>/
45
+ * },
46
+ * }
47
+ * }
48
+ */
49
+ var FCKStyle = function( styleDesc )
50
+ {
51
+ this.Element = ( styleDesc.Element || 'span' ).toLowerCase() ;
52
+ this._StyleDesc = styleDesc ;
53
+ }
54
+
55
+ FCKStyle.prototype =
56
+ {
57
+ /**
58
+ * Get the style type, based on its element name:
59
+ * - FCK_STYLE_BLOCK (0): Block Style
60
+ * - FCK_STYLE_INLINE (1): Inline Style
61
+ * - FCK_STYLE_OBJECT (2): Object Style
62
+ */
63
+ GetType : function()
64
+ {
65
+ var type = this.GetType_$ ;
66
+
67
+ if ( type != undefined )
68
+ return type ;
69
+
70
+ var elementName = this.Element ;
71
+
72
+ if ( elementName == '#' || FCKListsLib.StyleBlockElements[ elementName ] )
73
+ type = FCK_STYLE_BLOCK ;
74
+ else if ( FCKListsLib.StyleObjectElements[ elementName ] )
75
+ type = FCK_STYLE_OBJECT ;
76
+ else
77
+ type = FCK_STYLE_INLINE ;
78
+
79
+ return ( this.GetType_$ = type ) ;
80
+ },
81
+
82
+ /**
83
+ * Apply the style to the current selection.
84
+ */
85
+ ApplyToSelection : function( targetWindow )
86
+ {
87
+ // Create a range for the current selection.
88
+ var range = new FCKDomRange( targetWindow ) ;
89
+ range.MoveToSelection() ;
90
+
91
+ this.ApplyToRange( range, true ) ;
92
+ },
93
+
94
+ /**
95
+ * Apply the style to a FCKDomRange.
96
+ */
97
+ ApplyToRange : function( range, selectIt )
98
+ {
99
+ // ApplyToRange is not valid for FCK_STYLE_OBJECT types.
100
+ // Use ApplyToObject instead.
101
+
102
+ switch ( this.GetType() )
103
+ {
104
+ case FCK_STYLE_BLOCK :
105
+ this.ApplyToRange = this._ApplyBlockStyle ;
106
+ break ;
107
+ case FCK_STYLE_INLINE :
108
+ this.ApplyToRange = this._ApplyInlineStyle ;
109
+ break ;
110
+ default :
111
+ return ;
112
+ }
113
+
114
+ this.ApplyToRange( range, selectIt ) ;
115
+ },
116
+
117
+ /**
118
+ * Apply the style to an object. Valid for FCK_STYLE_BLOCK types only.
119
+ */
120
+ ApplyToObject : function( objectElement )
121
+ {
122
+ if ( !objectElement )
123
+ return ;
124
+
125
+ this.BuildElement( null, objectElement ) ;
126
+ },
127
+
128
+ /**
129
+ * Remove the style from the current selection.
130
+ */
131
+ RemoveFromSelection : function( targetWindow )
132
+ {
133
+ // Create a range for the current selection.
134
+ var range = new FCKDomRange( targetWindow ) ;
135
+ range.MoveToSelection() ;
136
+
137
+ this.RemoveFromRange( range, true ) ;
138
+ },
139
+
140
+ /**
141
+ * Remove the style from a FCKDomRange. Block type styles will have no
142
+ * effect.
143
+ */
144
+ RemoveFromRange : function( range, selectIt )
145
+ {
146
+ var bookmark ;
147
+
148
+ // Create the attribute list to be used later for element comparisons.
149
+ var styleAttribs = this._GetAttribsForComparison() ;
150
+ var styleOverrides = this._GetOverridesForComparison() ;
151
+
152
+ // If collapsed, we are removing all conflicting styles from the range
153
+ // parent tree.
154
+ if ( range.CheckIsCollapsed() )
155
+ {
156
+ // Bookmark the range so we can re-select it after processing.
157
+ var bookmark = range.CreateBookmark( true ) ;
158
+
159
+ // Let's start from the bookmark <span> parent.
160
+ var bookmarkStart = range.GetBookmarkNode( bookmark, true ) ;
161
+
162
+ var path = new FCKElementPath( bookmarkStart.parentNode ) ;
163
+
164
+ // While looping through the path, we'll be saving references to
165
+ // parent elements if the range is in one of their boundaries. In
166
+ // this way, we are able to create a copy of those elements when
167
+ // removing a style if the range is in a boundary limit (see #1270).
168
+ var boundaryElements = [] ;
169
+
170
+ // Check if the range is in the boundary limits of an element
171
+ // (related to #1270).
172
+ var isBoundaryRight = !FCKDomTools.GetNextSibling( bookmarkStart ) ;
173
+ var isBoundary = isBoundaryRight || !FCKDomTools.GetPreviousSibling( bookmarkStart ) ;
174
+
175
+ // This is the last element to be removed in the boundary situation
176
+ // described at #1270.
177
+ var lastBoundaryElement ;
178
+ var boundaryLimitIndex = -1 ;
179
+
180
+ for ( var i = 0 ; i < path.Elements.length ; i++ )
181
+ {
182
+ var pathElement = path.Elements[i] ;
183
+ if ( this.CheckElementRemovable( pathElement ) )
184
+ {
185
+ if ( isBoundary
186
+ && !FCKDomTools.CheckIsEmptyElement( pathElement,
187
+ function( el )
188
+ {
189
+ return ( el != bookmarkStart ) ;
190
+ } )
191
+ )
192
+ {
193
+ lastBoundaryElement = pathElement ;
194
+
195
+ // We'll be continuously including elements in the
196
+ // boundaryElements array, but only those added before
197
+ // setting lastBoundaryElement must be used later, so
198
+ // let's mark the current index here.
199
+ boundaryLimitIndex = boundaryElements.length - 1 ;
200
+ }
201
+ else
202
+ {
203
+ var pathElementName = pathElement.nodeName.toLowerCase() ;
204
+
205
+ if ( pathElementName == this.Element )
206
+ {
207
+ // Remove any attribute that conflict with this style, no
208
+ // matter their values.
209
+ for ( var att in styleAttribs )
210
+ {
211
+ if ( FCKDomTools.HasAttribute( pathElement, att ) )
212
+ {
213
+ switch ( att )
214
+ {
215
+ case 'style' :
216
+ this._RemoveStylesFromElement( pathElement ) ;
217
+ break ;
218
+
219
+ case 'class' :
220
+ // The 'class' element value must match (#1318).
221
+ if ( FCKDomTools.GetAttributeValue( pathElement, att ) != this.GetFinalAttributeValue( att ) )
222
+ continue ;
223
+
224
+ default :
225
+ FCKDomTools.RemoveAttribute( pathElement, att ) ;
226
+ }
227
+ }
228
+ }
229
+ }
230
+
231
+ // Remove overrides defined to the same element name.
232
+ this._RemoveOverrides( pathElement, styleOverrides[ pathElementName ] ) ;
233
+
234
+ // Remove the element if no more attributes are available.
235
+ this._RemoveNoAttribElement( pathElement ) ;
236
+ }
237
+ }
238
+ else if ( isBoundary )
239
+ boundaryElements.push( pathElement ) ;
240
+
241
+ // Check if we are still in a boundary (at the same side).
242
+ isBoundary = isBoundary && ( ( isBoundaryRight && !FCKDomTools.GetNextSibling( pathElement ) ) || ( !isBoundaryRight && !FCKDomTools.GetPreviousSibling( pathElement ) ) ) ;
243
+
244
+ // If we are in an element that is not anymore a boundary, or
245
+ // we are at the last element, let's move things outside the
246
+ // boundary (if available).
247
+ if ( lastBoundaryElement && ( !isBoundary || ( i == path.Elements.length - 1 ) ) )
248
+ {
249
+ // Remove the bookmark node from the DOM.
250
+ var currentElement = FCKDomTools.RemoveNode( bookmarkStart ) ;
251
+
252
+ // Build the collapsed group of elements that are not
253
+ // removed by this style, but share the boundary.
254
+ // (see comment 1 and 2 at #1270)
255
+ for ( var j = 0 ; j <= boundaryLimitIndex ; j++ )
256
+ {
257
+ var newElement = FCKDomTools.CloneElement( boundaryElements[j] ) ;
258
+ newElement.appendChild( currentElement ) ;
259
+ currentElement = newElement ;
260
+ }
261
+
262
+ // Re-insert the bookmark node (and the collapsed elements)
263
+ // in the DOM, in the new position next to the styled element.
264
+ if ( isBoundaryRight )
265
+ FCKDomTools.InsertAfterNode( lastBoundaryElement, currentElement ) ;
266
+ else
267
+ lastBoundaryElement.parentNode.insertBefore( currentElement, lastBoundaryElement ) ;
268
+
269
+ isBoundary = false ;
270
+ lastBoundaryElement = null ;
271
+ }
272
+ }
273
+
274
+ // Re-select the original range.
275
+ if ( selectIt )
276
+ range.SelectBookmark( bookmark ) ;
277
+
278
+ return ;
279
+ }
280
+
281
+ // Expand the range, if inside inline element boundaries.
282
+ range.Expand( 'inline_elements' ) ;
283
+
284
+ // Bookmark the range so we can re-select it after processing.
285
+ var bookmark = range.CreateBookmark( true ) ;
286
+
287
+ // The style will be applied within the bookmark boundaries.
288
+ var startNode = range.GetBookmarkNode( bookmark, true ) ;
289
+ var endNode = range.GetBookmarkNode( bookmark, false ) ;
290
+
291
+ range.Release( true ) ;
292
+
293
+ // We need to check the selection boundaries (bookmark spans) to break
294
+ // the code in a way that we can properly remove partially selected nodes.
295
+ // For example, removing a <b> style from
296
+ // <b>This is [some text</b> to show <b>the] problem</b>
297
+ // ... where [ and ] represent the selection, must result:
298
+ // <b>This is </b>[some text to show the]<b> problem</b>
299
+ // The strategy is simple, we just break the partial nodes before the
300
+ // removal logic, having something that could be represented this way:
301
+ // <b>This is </b>[<b>some text</b> to show <b>the</b>]<b> problem</b>
302
+
303
+ // Let's start checking the start boundary.
304
+ var path = new FCKElementPath( startNode ) ;
305
+ var pathElements = path.Elements ;
306
+ var pathElement ;
307
+
308
+ for ( var i = 1 ; i < pathElements.length ; i++ )
309
+ {
310
+ pathElement = pathElements[i] ;
311
+
312
+ if ( pathElement == path.Block || pathElement == path.BlockLimit )
313
+ break ;
314
+
315
+ // If this element can be removed (even partially).
316
+ if ( this.CheckElementRemovable( pathElement ) )
317
+ FCKDomTools.BreakParent( startNode, pathElement, range ) ;
318
+ }
319
+
320
+ // Now the end boundary.
321
+ path = new FCKElementPath( endNode ) ;
322
+ pathElements = path.Elements ;
323
+
324
+ for ( var i = 1 ; i < pathElements.length ; i++ )
325
+ {
326
+ pathElement = pathElements[i] ;
327
+
328
+ if ( pathElement == path.Block || pathElement == path.BlockLimit )
329
+ break ;
330
+
331
+ elementName = pathElement.nodeName.toLowerCase() ;
332
+
333
+ // If this element can be removed (even partially).
334
+ if ( this.CheckElementRemovable( pathElement ) )
335
+ FCKDomTools.BreakParent( endNode, pathElement, range ) ;
336
+ }
337
+
338
+ // Navigate through all nodes between the bookmarks.
339
+ var currentNode = FCKDomTools.GetNextSourceNode( startNode, true ) ;
340
+
341
+ while ( currentNode )
342
+ {
343
+ // Cache the next node to be processed. Do it now, because
344
+ // currentNode may be removed.
345
+ var nextNode = FCKDomTools.GetNextSourceNode( currentNode ) ;
346
+
347
+ // Remove elements nodes that match with this style rules.
348
+ if ( currentNode.nodeType == 1 )
349
+ {
350
+ var elementName = currentNode.nodeName.toLowerCase() ;
351
+
352
+ var mayRemove = ( elementName == this.Element ) ;
353
+ if ( mayRemove )
354
+ {
355
+ // Remove any attribute that conflict with this style, no matter
356
+ // their values.
357
+ for ( var att in styleAttribs )
358
+ {
359
+ if ( FCKDomTools.HasAttribute( currentNode, att ) )
360
+ {
361
+ switch ( att )
362
+ {
363
+ case 'style' :
364
+ this._RemoveStylesFromElement( currentNode ) ;
365
+ break ;
366
+
367
+ case 'class' :
368
+ // The 'class' element value must match (#1318).
369
+ if ( FCKDomTools.GetAttributeValue( currentNode, att ) != this.GetFinalAttributeValue( att ) )
370
+ continue ;
371
+
372
+ default :
373
+ FCKDomTools.RemoveAttribute( currentNode, att ) ;
374
+ }
375
+ }
376
+ }
377
+ }
378
+ else
379
+ mayRemove = !!styleOverrides[ elementName ] ;
380
+
381
+ if ( mayRemove )
382
+ {
383
+ // Remove overrides defined to the same element name.
384
+ this._RemoveOverrides( currentNode, styleOverrides[ elementName ] ) ;
385
+
386
+ // Remove the element if no more attributes are available.
387
+ this._RemoveNoAttribElement( currentNode ) ;
388
+ }
389
+ }
390
+
391
+ // If we have reached the end of the selection, stop looping.
392
+ if ( nextNode == endNode )
393
+ break ;
394
+
395
+ currentNode = nextNode ;
396
+ }
397
+
398
+ this._FixBookmarkStart( startNode ) ;
399
+
400
+ // Re-select the original range.
401
+ if ( selectIt )
402
+ range.SelectBookmark( bookmark ) ;
403
+ },
404
+
405
+ /**
406
+ * Checks if an element, or any of its attributes, is removable by the
407
+ * current style definition.
408
+ */
409
+ CheckElementRemovable : function( element, fullMatch )
410
+ {
411
+ if ( !element )
412
+ return false ;
413
+
414
+ var elementName = element.nodeName.toLowerCase() ;
415
+
416
+ // If the element name is the same as the style name.
417
+ if ( elementName == this.Element )
418
+ {
419
+ // If no attributes are defined in the element.
420
+ if ( !fullMatch && !FCKDomTools.HasAttributes( element ) )
421
+ return true ;
422
+
423
+ // If any attribute conflicts with the style attributes.
424
+ var attribs = this._GetAttribsForComparison() ;
425
+ var allMatched = ( attribs._length == 0 ) ;
426
+ for ( var att in attribs )
427
+ {
428
+ if ( att == '_length' )
429
+ continue ;
430
+
431
+ if ( this._CompareAttributeValues( att, FCKDomTools.GetAttributeValue( element, att ), ( this.GetFinalAttributeValue( att ) || '' ) ) )
432
+ {
433
+ allMatched = true ;
434
+ if ( !fullMatch )
435
+ break ;
436
+ }
437
+ else
438
+ {
439
+ allMatched = false ;
440
+ if ( fullMatch )
441
+ return false ;
442
+ }
443
+ }
444
+ if ( allMatched )
445
+ return true ;
446
+ }
447
+
448
+ // Check if the element can be somehow overriden.
449
+ var override = this._GetOverridesForComparison()[ elementName ] ;
450
+ if ( override )
451
+ {
452
+ // If no attributes have been defined, remove the element.
453
+ if ( !( attribs = override.Attributes ) ) // Only one "="
454
+ return true ;
455
+
456
+ for ( var i = 0 ; i < attribs.length ; i++ )
457
+ {
458
+ var attName = attribs[i][0] ;
459
+ if ( FCKDomTools.HasAttribute( element, attName ) )
460
+ {
461
+ var attValue = attribs[i][1] ;
462
+
463
+ // Remove the attribute if:
464
+ // - The override definition value is null ;
465
+ // - The override definition valie is a string that
466
+ // matches the attribute value exactly.
467
+ // - The override definition value is a regex that
468
+ // has matches in the attribute value.
469
+ if ( attValue == null ||
470
+ ( typeof attValue == 'string' && FCKDomTools.GetAttributeValue( element, attName ) == attValue ) ||
471
+ attValue.test( FCKDomTools.GetAttributeValue( element, attName ) ) )
472
+ return true ;
473
+ }
474
+ }
475
+ }
476
+
477
+ return false ;
478
+ },
479
+
480
+ /**
481
+ * Get the style state for an element path. Returns "true" if the element
482
+ * is active in the path.
483
+ */
484
+ CheckActive : function( elementPath )
485
+ {
486
+ switch ( this.GetType() )
487
+ {
488
+ case FCK_STYLE_BLOCK :
489
+ return this.CheckElementRemovable( elementPath.Block || elementPath.BlockLimit ) ;
490
+
491
+ case FCK_STYLE_INLINE :
492
+
493
+ var elements = elementPath.Elements ;
494
+
495
+ for ( var i = 0 ; i < elements.length ; i++ )
496
+ {
497
+ var element = elements[i] ;
498
+
499
+ if ( element == elementPath.Block || element == elementPath.BlockLimit )
500
+ continue ;
501
+
502
+ if ( this.CheckElementRemovable( element, true ) )
503
+ return true ;
504
+ }
505
+ }
506
+ return false ;
507
+ },
508
+
509
+ /**
510
+ * Removes an inline style from inside an element tree. The element node
511
+ * itself is not checked or removed, only the child tree inside of it.
512
+ */
513
+ RemoveFromElement : function( element )
514
+ {
515
+ var attribs = this._GetAttribsForComparison() ;
516
+ var overrides = this._GetOverridesForComparison() ;
517
+
518
+ // Get all elements with the same name.
519
+ var innerElements = element.getElementsByTagName( this.Element ) ;
520
+
521
+ for ( var i = innerElements.length - 1 ; i >= 0 ; i-- )
522
+ {
523
+ var innerElement = innerElements[i] ;
524
+
525
+ // Remove any attribute that conflict with this style, no matter
526
+ // their values.
527
+ for ( var att in attribs )
528
+ {
529
+ if ( FCKDomTools.HasAttribute( innerElement, att ) )
530
+ {
531
+ switch ( att )
532
+ {
533
+ case 'style' :
534
+ this._RemoveStylesFromElement( innerElement ) ;
535
+ break ;
536
+
537
+ case 'class' :
538
+ // The 'class' element value must match (#1318).
539
+ if ( FCKDomTools.GetAttributeValue( innerElement, att ) != this.GetFinalAttributeValue( att ) )
540
+ continue ;
541
+
542
+ default :
543
+ FCKDomTools.RemoveAttribute( innerElement, att ) ;
544
+ }
545
+ }
546
+ }
547
+
548
+ // Remove overrides defined to the same element name.
549
+ this._RemoveOverrides( innerElement, overrides[ this.Element ] ) ;
550
+
551
+ // Remove the element if no more attributes are available.
552
+ this._RemoveNoAttribElement( innerElement ) ;
553
+ }
554
+
555
+ // Now remove any other element with different name that is
556
+ // defined to be overriden.
557
+ for ( var overrideElement in overrides )
558
+ {
559
+ if ( overrideElement != this.Element )
560
+ {
561
+ // Get all elements.
562
+ innerElements = element.getElementsByTagName( overrideElement ) ;
563
+
564
+ for ( var i = innerElements.length - 1 ; i >= 0 ; i-- )
565
+ {
566
+ var innerElement = innerElements[i] ;
567
+ this._RemoveOverrides( innerElement, overrides[ overrideElement ] ) ;
568
+ this._RemoveNoAttribElement( innerElement ) ;
569
+ }
570
+ }
571
+ }
572
+ },
573
+
574
+ _RemoveStylesFromElement : function( element )
575
+ {
576
+ var elementStyle = element.style.cssText ;
577
+ var pattern = this.GetFinalStyleValue() ;
578
+
579
+ if ( elementStyle.length > 0 && pattern.length == 0 )
580
+ return ;
581
+
582
+ pattern = '(^|;)\\s*(' +
583
+ pattern.replace( /\s*([^ ]+):.*?(;|$)/g, '$1|' ).replace( /\|$/, '' ) +
584
+ '):[^;]+' ;
585
+
586
+ var regex = new RegExp( pattern, 'gi' ) ;
587
+
588
+ elementStyle = elementStyle.replace( regex, '' ).Trim() ;
589
+
590
+ if ( elementStyle.length == 0 || elementStyle == ';' )
591
+ FCKDomTools.RemoveAttribute( element, 'style' ) ;
592
+ else
593
+ element.style.cssText = elementStyle.replace( regex, '' ) ;
594
+ },
595
+
596
+ /**
597
+ * Remove all attributes that are defined to be overriden,
598
+ */
599
+ _RemoveOverrides : function( element, override )
600
+ {
601
+ var attributes = override && override.Attributes ;
602
+
603
+ if ( attributes )
604
+ {
605
+ for ( var i = 0 ; i < attributes.length ; i++ )
606
+ {
607
+ var attName = attributes[i][0] ;
608
+
609
+ if ( FCKDomTools.HasAttribute( element, attName ) )
610
+ {
611
+ var attValue = attributes[i][1] ;
612
+
613
+ // Remove the attribute if:
614
+ // - The override definition value is null ;
615
+ // - The override definition valie is a string that
616
+ // matches the attribute value exactly.
617
+ // - The override definition value is a regex that
618
+ // has matches in the attribute value.
619
+ if ( attValue == null ||
620
+ ( attValue.test && attValue.test( FCKDomTools.GetAttributeValue( element, attName ) ) ) ||
621
+ ( typeof attValue == 'string' && FCKDomTools.GetAttributeValue( element, attName ) == attValue ) )
622
+ FCKDomTools.RemoveAttribute( element, attName ) ;
623
+ }
624
+ }
625
+ }
626
+ },
627
+
628
+ /**
629
+ * If the element has no more attributes, remove it.
630
+ */
631
+ _RemoveNoAttribElement : function( element )
632
+ {
633
+ // If no more attributes remained in the element, remove it,
634
+ // leaving its children.
635
+ if ( !FCKDomTools.HasAttributes( element ) )
636
+ {
637
+ // Removing elements may open points where merging is possible,
638
+ // so let's cache the first and last nodes for later checking.
639
+ var firstChild = element.firstChild ;
640
+ var lastChild = element.lastChild ;
641
+
642
+ FCKDomTools.RemoveNode( element, true ) ;
643
+
644
+ // Check the cached nodes for merging.
645
+ this._MergeSiblings( firstChild ) ;
646
+
647
+ if ( firstChild != lastChild )
648
+ this._MergeSiblings( lastChild ) ;
649
+ }
650
+ },
651
+
652
+ /**
653
+ * Creates a DOM element for this style object.
654
+ */
655
+ BuildElement : function( targetDoc, element )
656
+ {
657
+ // Create the element.
658
+ var el = element || targetDoc.createElement( this.Element ) ;
659
+
660
+ // Assign all defined attributes.
661
+ var attribs = this._StyleDesc.Attributes ;
662
+ var attValue ;
663
+ if ( attribs )
664
+ {
665
+ for ( var att in attribs )
666
+ {
667
+ attValue = this.GetFinalAttributeValue( att ) ;
668
+
669
+ if ( att.toLowerCase() == 'class' )
670
+ el.className = attValue ;
671
+ else
672
+ el.setAttribute( att, attValue ) ;
673
+ }
674
+ }
675
+
676
+ // Assign the style attribute.
677
+ if ( this._GetStyleText().length > 0 )
678
+ el.style.cssText = this.GetFinalStyleValue() ;
679
+
680
+ return el ;
681
+ },
682
+
683
+ _CompareAttributeValues : function( attName, valueA, valueB )
684
+ {
685
+ if ( attName == 'style' && valueA && valueB )
686
+ {
687
+ valueA = valueA.replace( /;$/, '' ).toLowerCase() ;
688
+ valueB = valueB.replace( /;$/, '' ).toLowerCase() ;
689
+ }
690
+
691
+ return ( valueA == valueB )
692
+ },
693
+
694
+ GetFinalAttributeValue : function( attName )
695
+ {
696
+ var attValue = this._StyleDesc.Attributes ;
697
+ var attValue = attValue ? attValue[ attName ] : null ;
698
+
699
+ if ( !attValue && attName == 'style' )
700
+ return this.GetFinalStyleValue() ;
701
+
702
+ if ( attValue && this._Variables )
703
+ // Using custom Replace() to guarantee the correct scope.
704
+ attValue = attValue.Replace( FCKRegexLib.StyleVariableAttName, this._GetVariableReplace, this ) ;
705
+
706
+ return attValue ;
707
+ },
708
+
709
+ GetFinalStyleValue : function()
710
+ {
711
+ var attValue = this._GetStyleText() ;
712
+
713
+ if ( attValue.length > 0 && this._Variables )
714
+ {
715
+ // Using custom Replace() to guarantee the correct scope.
716
+ attValue = attValue.Replace( FCKRegexLib.StyleVariableAttName, this._GetVariableReplace, this ) ;
717
+ attValue = FCKTools.NormalizeCssText( attValue ) ;
718
+ }
719
+
720
+ return attValue ;
721
+ },
722
+
723
+ _GetVariableReplace : function()
724
+ {
725
+ // The second group in the regex is the variable name.
726
+ return this._Variables[ arguments[2] ] || arguments[0] ;
727
+ },
728
+
729
+ /**
730
+ * Set the value of a variable attribute or style, to be used when
731
+ * appliying the style.
732
+ */
733
+ SetVariable : function( name, value )
734
+ {
735
+ var variables = this._Variables ;
736
+
737
+ if ( !variables )
738
+ variables = this._Variables = {} ;
739
+
740
+ this._Variables[ name ] = value ;
741
+ },
742
+
743
+ /**
744
+ * Apply an inline style to a FCKDomRange.
745
+ *
746
+ * TODO
747
+ * - Implement the "#" style handling.
748
+ * - Properly handle block containers like <div> and <blockquote>.
749
+ */
750
+ _ApplyBlockStyle : function( range, selectIt )
751
+ {
752
+ // Bookmark the range so we can re-select it after processing.
753
+ var bookmark ;
754
+
755
+ if ( selectIt )
756
+ bookmark = range.CreateBookmark( true ) ;
757
+
758
+ var iterator = new FCKDomRangeIterator( range ) ;
759
+ iterator.EnforceRealBlocks = true ;
760
+
761
+ var block ;
762
+ while( ( block = iterator.GetNextParagraph() ) ) // Only one =
763
+ {
764
+ // Create the new node right before the current one.
765
+ var newBlock = block.parentNode.insertBefore( this.BuildElement( range.Window.document ), block ) ;
766
+
767
+ // Move everything from the current node to the new one.
768
+ FCKDomTools.MoveChildren( block, newBlock ) ;
769
+
770
+ // Delete the current node.
771
+ FCKDomTools.RemoveNode( block ) ;
772
+ }
773
+
774
+ // Re-select the original range.
775
+ if ( selectIt )
776
+ range.SelectBookmark( bookmark ) ;
777
+ },
778
+
779
+ /**
780
+ * Apply an inline style to a FCKDomRange.
781
+ *
782
+ * TODO
783
+ * - Merge elements, when applying styles to similar elements that enclose
784
+ * the entire selection, outputing:
785
+ * <span style="color: #ff0000; background-color: #ffffff">XYZ</span>
786
+ * instead of:
787
+ * <span style="color: #ff0000;"><span style="background-color: #ffffff">XYZ</span></span>
788
+ */
789
+ _ApplyInlineStyle : function( range, selectIt )
790
+ {
791
+ var doc = range.Window.document ;
792
+
793
+ if ( range.CheckIsCollapsed() )
794
+ {
795
+ // Create the element to be inserted in the DOM.
796
+ var collapsedElement = this.BuildElement( doc ) ;
797
+ range.InsertNode( collapsedElement ) ;
798
+ range.MoveToPosition( collapsedElement, 2 ) ;
799
+ range.Select() ;
800
+
801
+ return ;
802
+ }
803
+
804
+ // The general idea here is navigating through all nodes inside the
805
+ // current selection, working on distinct range blocks, defined by the
806
+ // DTD compatibility between the style element and the nodes inside the
807
+ // ranges.
808
+ //
809
+ // For example, suppose we have the following selection (where [ and ]
810
+ // are the boundaries), and we apply a <b> style there:
811
+ //
812
+ // <p>Here we [have <b>some</b> text.<p>
813
+ // <p>And some here] here.</p>
814
+ //
815
+ // Two different ranges will be detected:
816
+ //
817
+ // "have <b>some</b> text."
818
+ // "And some here"
819
+ //
820
+ // Both ranges will be extracted, moved to a <b> element, and
821
+ // re-inserted, resulting in the following output:
822
+ //
823
+ // <p>Here we [<b>have some text.</b><p>
824
+ // <p><b>And some here</b>] here.</p>
825
+ //
826
+ // Note that the <b> element at <b>some</b> is also removed because it
827
+ // is not needed anymore.
828
+
829
+ var elementName = this.Element ;
830
+
831
+ // Get the DTD definition for the element. Defaults to "span".
832
+ var elementDTD = FCK.DTD[ elementName ] || FCK.DTD.span ;
833
+
834
+ // Create the attribute list to be used later for element comparisons.
835
+ var styleAttribs = this._GetAttribsForComparison() ;
836
+ var styleNode ;
837
+
838
+ // Expand the range, if inside inline element boundaries.
839
+ range.Expand( 'inline_elements' ) ;
840
+
841
+ // Bookmark the range so we can re-select it after processing.
842
+ var bookmark = range.CreateBookmark( true ) ;
843
+
844
+ // The style will be applied within the bookmark boundaries.
845
+ var startNode = range.GetBookmarkNode( bookmark, true ) ;
846
+ var endNode = range.GetBookmarkNode( bookmark, false ) ;
847
+
848
+ // We'll be reusing the range to apply the styles. So, release it here
849
+ // to indicate that it has not been initialized.
850
+ range.Release( true ) ;
851
+
852
+ // Let's start the nodes lookup from the node right after the bookmark
853
+ // span.
854
+ var currentNode = FCKDomTools.GetNextSourceNode( startNode, true ) ;
855
+
856
+ while ( currentNode )
857
+ {
858
+ var applyStyle = false ;
859
+
860
+ var nodeType = currentNode.nodeType ;
861
+ var nodeName = nodeType == 1 ? currentNode.nodeName.toLowerCase() : null ;
862
+
863
+ // Check if the current node can be a child of the style element.
864
+ if ( !nodeName || elementDTD[ nodeName ] )
865
+ {
866
+ // Check if the style element can be a child of the current
867
+ // node parent.
868
+ if ( ( FCK.DTD[ currentNode.parentNode.nodeName.toLowerCase() ] || FCK.DTD.span )[ elementName ] )
869
+ {
870
+ // This node will be part of our range, so if it has not
871
+ // been started, place its start right before the node.
872
+ if ( !range.CheckHasRange() )
873
+ range.SetStart( currentNode, 3 ) ;
874
+
875
+ // Non element nodes, or empty elements can be added
876
+ // completely to the range.
877
+ if ( nodeType != 1 || currentNode.childNodes.length == 0 )
878
+ {
879
+ var includedNode = currentNode ;
880
+ var parentNode = includedNode.parentNode ;
881
+
882
+ // This node is about to be included completelly, but,
883
+ // if this is the last node in its parent, we must also
884
+ // check if the parent itself can be added completelly
885
+ // to the range.
886
+ while ( includedNode == parentNode.lastChild
887
+ && elementDTD[ parentNode.nodeName.toLowerCase() ] )
888
+ {
889
+ includedNode = parentNode ;
890
+ }
891
+
892
+ range.SetEnd( includedNode, 4 ) ;
893
+
894
+ // If the included node is the last node in its parent
895
+ // and its parent can't be inside the style node, apply
896
+ // the style immediately.
897
+ if ( includedNode == includedNode.parentNode.lastChild && !elementDTD[ includedNode.parentNode.nodeName.toLowerCase() ] )
898
+ applyStyle = true ;
899
+ }
900
+ else
901
+ {
902
+ // Element nodes will not be added directly. We need to
903
+ // check their children because the selection could end
904
+ // inside the node, so let's place the range end right
905
+ // before the element.
906
+ range.SetEnd( currentNode, 3 ) ;
907
+ }
908
+ }
909
+ else
910
+ applyStyle = true ;
911
+ }
912
+ else
913
+ applyStyle = true ;
914
+
915
+ // Get the next node to be processed.
916
+ currentNode = FCKDomTools.GetNextSourceNode( currentNode ) ;
917
+
918
+ // If we have reached the end of the selection, just apply the
919
+ // style ot the range, and stop looping.
920
+ if ( currentNode == endNode )
921
+ {
922
+ currentNode = null ;
923
+ applyStyle = true ;
924
+ }
925
+
926
+ // Apply the style if we have something to which apply it.
927
+ if ( applyStyle && range.CheckHasRange() && !range.CheckIsCollapsed() )
928
+ {
929
+ // Build the style element, based on the style object definition.
930
+ styleNode = this.BuildElement( doc ) ;
931
+
932
+ // Move the contents of the range to the style element.
933
+ range.ExtractContents().AppendTo( styleNode ) ;
934
+
935
+ // If it is not empty.
936
+ if ( styleNode.innerHTML.RTrim().length > 0 )
937
+ {
938
+ // Insert it in the range position (it is collapsed after
939
+ // ExtractContents.
940
+ range.InsertNode( styleNode ) ;
941
+
942
+ // Here we do some cleanup, removing all duplicated
943
+ // elements from the style element.
944
+ this.RemoveFromElement( styleNode ) ;
945
+
946
+ // Let's merge our new style with its neighbors, if possible.
947
+ this._MergeSiblings( styleNode, this._GetAttribsForComparison() ) ;
948
+
949
+ // As the style system breaks text nodes constantly, let's normalize
950
+ // things for performance.
951
+ // With IE, some paragraphs get broken when calling normalize()
952
+ // repeatedly. Also, for IE, we must normalize body, not documentElement.
953
+ // IE is also known for having a "crash effect" with normalize().
954
+ // We should try to normalize with IE too in some way, somewhere.
955
+ if ( !FCKBrowserInfo.IsIE )
956
+ styleNode.normalize() ;
957
+ }
958
+
959
+ // Style applied, let's release the range, so it gets marked to
960
+ // re-initialization in the next loop.
961
+ range.Release( true ) ;
962
+ }
963
+ }
964
+
965
+ this._FixBookmarkStart( startNode ) ;
966
+
967
+ // Re-select the original range.
968
+ if ( selectIt )
969
+ range.SelectBookmark( bookmark ) ;
970
+ },
971
+
972
+ _FixBookmarkStart : function( startNode )
973
+ {
974
+ // After appliying or removing an inline style, the start boundary of
975
+ // the selection must be placed inside all inline elements it is
976
+ // bordering.
977
+ var startSibling ;
978
+ while ( ( startSibling = startNode.nextSibling ) ) // Only one "=".
979
+ {
980
+ if ( startSibling.nodeType == 1
981
+ && FCKListsLib.InlineNonEmptyElements[ startSibling.nodeName.toLowerCase() ] )
982
+ {
983
+ // If it is an empty inline element, we can safely remove it.
984
+ if ( !startSibling.firstChild )
985
+ FCKDomTools.RemoveNode( startSibling ) ;
986
+ else
987
+ FCKDomTools.MoveNode( startNode, startSibling, true ) ;
988
+ continue ;
989
+ }
990
+
991
+ // Empty text nodes can be safely removed to not disturb.
992
+ if ( startSibling.nodeType == 3 && startSibling.length == 0 )
993
+ {
994
+ FCKDomTools.RemoveNode( startSibling ) ;
995
+ continue ;
996
+ }
997
+
998
+ break ;
999
+ }
1000
+ },
1001
+
1002
+ /**
1003
+ * Merge an element with its similar siblings.
1004
+ * "attribs" is and object computed with _CreateAttribsForComparison.
1005
+ */
1006
+ _MergeSiblings : function( element, attribs )
1007
+ {
1008
+ if ( !element || element.nodeType != 1 || !FCKListsLib.InlineNonEmptyElements[ element.nodeName.toLowerCase() ] )
1009
+ return ;
1010
+
1011
+ this._MergeNextSibling( element, attribs ) ;
1012
+ this._MergePreviousSibling( element, attribs ) ;
1013
+ },
1014
+
1015
+ /**
1016
+ * Merge an element with its similar siblings after it.
1017
+ * "attribs" is and object computed with _CreateAttribsForComparison.
1018
+ */
1019
+ _MergeNextSibling : function( element, attribs )
1020
+ {
1021
+ // Check the next sibling.
1022
+ var sibling = element.nextSibling ;
1023
+
1024
+ // Check if the next sibling is a bookmark element. In this case, jump it.
1025
+ var hasBookmark = ( sibling && sibling.nodeType == 1 && sibling.getAttribute( '_fck_bookmark' ) ) ;
1026
+ if ( hasBookmark )
1027
+ sibling = sibling.nextSibling ;
1028
+
1029
+ if ( sibling && sibling.nodeType == 1 && sibling.nodeName == element.nodeName )
1030
+ {
1031
+ if ( !attribs )
1032
+ attribs = this._CreateElementAttribsForComparison( element ) ;
1033
+
1034
+ if ( this._CheckAttributesMatch( sibling, attribs ) )
1035
+ {
1036
+ // Save the last child to be checked too (to merge things like <b><i></i></b><b><i></i></b>).
1037
+ var innerSibling = element.lastChild ;
1038
+
1039
+ if ( hasBookmark )
1040
+ FCKDomTools.MoveNode( element.nextSibling, element ) ;
1041
+
1042
+ // Move contents from the sibling.
1043
+ FCKDomTools.MoveChildren( sibling, element ) ;
1044
+ FCKDomTools.RemoveNode( sibling ) ;
1045
+
1046
+ // Now check the last inner child (see two comments above).
1047
+ if ( innerSibling )
1048
+ this._MergeNextSibling( innerSibling ) ;
1049
+ }
1050
+ }
1051
+ },
1052
+
1053
+ /**
1054
+ * Merge an element with its similar siblings before it.
1055
+ * "attribs" is and object computed with _CreateAttribsForComparison.
1056
+ */
1057
+ _MergePreviousSibling : function( element, attribs )
1058
+ {
1059
+ // Check the previous sibling.
1060
+ var sibling = element.previousSibling ;
1061
+
1062
+ // Check if the previous sibling is a bookmark element. In this case, jump it.
1063
+ var hasBookmark = ( sibling && sibling.nodeType == 1 && sibling.getAttribute( '_fck_bookmark' ) ) ;
1064
+ if ( hasBookmark )
1065
+ sibling = sibling.previousSibling ;
1066
+
1067
+ if ( sibling && sibling.nodeType == 1 && sibling.nodeName == element.nodeName )
1068
+ {
1069
+ if ( !attribs )
1070
+ attribs = this._CreateElementAttribsForComparison( element ) ;
1071
+
1072
+ if ( this._CheckAttributesMatch( sibling, attribs ) )
1073
+ {
1074
+ // Save the first child to be checked too (to merge things like <b><i></i></b><b><i></i></b>).
1075
+ var innerSibling = element.firstChild ;
1076
+
1077
+ if ( hasBookmark )
1078
+ FCKDomTools.MoveNode( element.previousSibling, element, true ) ;
1079
+
1080
+ // Move contents to the sibling.
1081
+ FCKDomTools.MoveChildren( sibling, element, true ) ;
1082
+ FCKDomTools.RemoveNode( sibling ) ;
1083
+
1084
+ // Now check the first inner child (see two comments above).
1085
+ if ( innerSibling )
1086
+ this._MergePreviousSibling( innerSibling ) ;
1087
+ }
1088
+ }
1089
+ },
1090
+
1091
+ /**
1092
+ * Build the cssText based on the styles definition.
1093
+ */
1094
+ _GetStyleText : function()
1095
+ {
1096
+ var stylesDef = this._StyleDesc.Styles ;
1097
+
1098
+ // Builds the StyleText.
1099
+ var stylesText = ( this._StyleDesc.Attributes ? this._StyleDesc.Attributes['style'] || '' : '' ) ;
1100
+
1101
+ if ( stylesText.length > 0 )
1102
+ stylesText += ';' ;
1103
+
1104
+ for ( var style in stylesDef )
1105
+ stylesText += style + ':' + stylesDef[style] + ';' ;
1106
+
1107
+ // Browsers make some changes to the style when applying them. So, here
1108
+ // we normalize it to the browser format. We'll not do that if there
1109
+ // are variables inside the style.
1110
+ if ( stylesText.length > 0 && !( /#\(/.test( stylesText ) ) )
1111
+ {
1112
+ stylesText = FCKTools.NormalizeCssText( stylesText ) ;
1113
+ }
1114
+
1115
+ return (this._GetStyleText = function() { return stylesText ; })() ;
1116
+ },
1117
+
1118
+ /**
1119
+ * Get the the collection used to compare the attributes defined in this
1120
+ * style with attributes in an element. All information in it is lowercased.
1121
+ */
1122
+ _GetAttribsForComparison : function()
1123
+ {
1124
+ // If we have already computed it, just return it.
1125
+ var attribs = this._GetAttribsForComparison_$ ;
1126
+ if ( attribs )
1127
+ return attribs ;
1128
+
1129
+ attribs = new Object() ;
1130
+
1131
+ // Loop through all defined attributes.
1132
+ var styleAttribs = this._StyleDesc.Attributes ;
1133
+ if ( styleAttribs )
1134
+ {
1135
+ for ( var styleAtt in styleAttribs )
1136
+ {
1137
+ attribs[ styleAtt.toLowerCase() ] = styleAttribs[ styleAtt ].toLowerCase() ;
1138
+ }
1139
+ }
1140
+
1141
+ // Includes the style definitions.
1142
+ if ( this._GetStyleText().length > 0 )
1143
+ {
1144
+ attribs['style'] = this._GetStyleText().toLowerCase() ;
1145
+ }
1146
+
1147
+ // Appends the "length" information to the object.
1148
+ FCKTools.AppendLengthProperty( attribs, '_length' ) ;
1149
+
1150
+ // Return it, saving it to the next request.
1151
+ return ( this._GetAttribsForComparison_$ = attribs ) ;
1152
+ },
1153
+
1154
+ /**
1155
+ * Get the the collection used to compare the elements and attributes,
1156
+ * defined in this style overrides, with other element. All information in
1157
+ * it is lowercased.
1158
+ */
1159
+ _GetOverridesForComparison : function()
1160
+ {
1161
+ // If we have already computed it, just return it.
1162
+ var overrides = this._GetOverridesForComparison_$ ;
1163
+ if ( overrides )
1164
+ return overrides ;
1165
+
1166
+ overrides = new Object() ;
1167
+
1168
+ var overridesDesc = this._StyleDesc.Overrides ;
1169
+
1170
+ if ( overridesDesc )
1171
+ {
1172
+ // The override description can be a string, object or array.
1173
+ // Internally, well handle arrays only, so transform it if needed.
1174
+ if ( !FCKTools.IsArray( overridesDesc ) )
1175
+ overridesDesc = [ overridesDesc ] ;
1176
+
1177
+ // Loop through all override definitions.
1178
+ for ( var i = 0 ; i < overridesDesc.length ; i++ )
1179
+ {
1180
+ var override = overridesDesc[i] ;
1181
+ var elementName ;
1182
+ var overrideEl ;
1183
+ var attrs ;
1184
+
1185
+ // If can be a string with the element name.
1186
+ if ( typeof override == 'string' )
1187
+ elementName = override.toLowerCase() ;
1188
+ // Or an object.
1189
+ else
1190
+ {
1191
+ elementName = override.Element ? override.Element.toLowerCase() : this.Element ;
1192
+ attrs = override.Attributes ;
1193
+ }
1194
+
1195
+ // We can have more than one override definition for the same
1196
+ // element name, so we attempt to simply append information to
1197
+ // it if it already exists.
1198
+ overrideEl = overrides[ elementName ] || ( overrides[ elementName ] = {} ) ;
1199
+
1200
+ if ( attrs )
1201
+ {
1202
+ // The returning attributes list is an array, because we
1203
+ // could have different override definitions for the same
1204
+ // attribute name.
1205
+ var overrideAttrs = ( overrideEl.Attributes = overrideEl.Attributes || new Array() ) ;
1206
+ for ( var attName in attrs )
1207
+ {
1208
+ // Each item in the attributes array is also an array,
1209
+ // where [0] is the attribute name and [1] is the
1210
+ // override value.
1211
+ overrideAttrs.push( [ attName.toLowerCase(), attrs[ attName ] ] ) ;
1212
+ }
1213
+ }
1214
+ }
1215
+ }
1216
+
1217
+ return ( this._GetOverridesForComparison_$ = overrides ) ;
1218
+ },
1219
+
1220
+ /*
1221
+ * Create and object containing all attributes specified in an element,
1222
+ * added by a "_length" property. All values are lowercased.
1223
+ */
1224
+ _CreateElementAttribsForComparison : function( element )
1225
+ {
1226
+ var attribs = new Object() ;
1227
+ var attribsCount = 0 ;
1228
+
1229
+ for ( var i = 0 ; i < element.attributes.length ; i++ )
1230
+ {
1231
+ var att = element.attributes[i] ;
1232
+
1233
+ if ( att.specified )
1234
+ {
1235
+ attribs[ att.nodeName.toLowerCase() ] = FCKDomTools.GetAttributeValue( element, att ).toLowerCase() ;
1236
+ attribsCount++ ;
1237
+ }
1238
+ }
1239
+
1240
+ attribs._length = attribsCount ;
1241
+
1242
+ return attribs ;
1243
+ },
1244
+
1245
+ /**
1246
+ * Checks is the element attributes have a perfect match with the style
1247
+ * attributes.
1248
+ */
1249
+ _CheckAttributesMatch : function( element, styleAttribs )
1250
+ {
1251
+ // Loop through all specified attributes. The same number of
1252
+ // attributes must be found and their values must match to
1253
+ // declare them as equal.
1254
+
1255
+ var elementAttrbs = element.attributes ;
1256
+ var matchCount = 0 ;
1257
+
1258
+ for ( var i = 0 ; i < elementAttrbs.length ; i++ )
1259
+ {
1260
+ var att = elementAttrbs[i] ;
1261
+ if ( att.specified )
1262
+ {
1263
+ var attName = att.nodeName.toLowerCase() ;
1264
+ var styleAtt = styleAttribs[ attName ] ;
1265
+
1266
+ // The attribute is not defined in the style.
1267
+ if ( !styleAtt )
1268
+ break ;
1269
+
1270
+ // The values are different.
1271
+ if ( styleAtt != FCKDomTools.GetAttributeValue( element, att ).toLowerCase() )
1272
+ break ;
1273
+
1274
+ matchCount++ ;
1275
+ }
1276
+ }
1277
+
1278
+ return ( matchCount == styleAttribs._length ) ;
1279
+ }
1280
+ } ;