typo 4.1.1 → 5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1545) hide show
  1. data/app/apis/meta_weblog_service.rb +7 -14
  2. data/app/apis/movable_type_service.rb +1 -7
  3. data/app/controllers/accounts_controller.rb +5 -4
  4. data/app/controllers/admin/advanced_controller.rb +20 -0
  5. data/app/controllers/admin/base_controller.rb +16 -6
  6. data/app/controllers/admin/blacklist_controller.rb +1 -1
  7. data/app/controllers/admin/cache_controller.rb +5 -4
  8. data/app/controllers/admin/categories_controller.rb +4 -4
  9. data/app/controllers/admin/comments_controller.rb +3 -3
  10. data/app/controllers/admin/content_controller.rb +25 -6
  11. data/app/controllers/admin/dashboard_controller.rb +33 -0
  12. data/app/controllers/admin/feedback_controller.rb +28 -16
  13. data/app/controllers/admin/general_controller.rb +2 -16
  14. data/app/controllers/admin/pages_controller.rb +13 -3
  15. data/app/controllers/admin/profiles_controller.rb +36 -0
  16. data/app/controllers/admin/resources_controller.rb +9 -9
  17. data/app/controllers/admin/textfilters_controller.rb +1 -1
  18. data/app/controllers/admin/themes_controller.rb +49 -0
  19. data/app/controllers/admin/trackbacks_controller.rb +1 -1
  20. data/app/controllers/admin/users_controller.rb +8 -2
  21. data/app/controllers/application.rb +46 -14
  22. data/app/controllers/articles_controller.rb +67 -144
  23. data/app/controllers/authors_controller.rb +5 -0
  24. data/app/controllers/categories_controller.rb +4 -0
  25. data/app/controllers/comments_controller.rb +72 -0
  26. data/app/controllers/content_controller.rb +13 -30
  27. data/app/controllers/feedback_controller.rb +60 -0
  28. data/app/controllers/grouping_controller.rb +83 -0
  29. data/app/controllers/redirect_controller.rb +1 -3
  30. data/app/controllers/tags_controller.rb +3 -0
  31. data/app/controllers/theme_controller.rb +15 -5
  32. data/app/controllers/trackbacks_controller.rb +43 -0
  33. data/app/controllers/xml_controller.rb +52 -34
  34. data/app/helpers/admin/base_helper.rb +69 -7
  35. data/app/helpers/admin/feedback_helper.rb +44 -3
  36. data/app/helpers/admin/general_helper.rb +16 -0
  37. data/app/helpers/admin/themes_helper.rb +23 -0
  38. data/app/helpers/application_helper.rb +92 -20
  39. data/app/helpers/articles_helper.rb +0 -163
  40. data/app/helpers/authors_helper.rb +5 -0
  41. data/app/helpers/categories_helper.rb +5 -0
  42. data/app/helpers/comments_helper.rb +2 -0
  43. data/app/helpers/content_helper.rb +90 -0
  44. data/app/helpers/groupings_helper.rb +5 -0
  45. data/app/helpers/tags_helper.rb +5 -0
  46. data/app/helpers/theme_helper.rb +14 -14
  47. data/app/models/article.rb +226 -52
  48. data/app/models/article/states.rb +191 -0
  49. data/app/models/blog.rb +52 -15
  50. data/app/models/blog_sweeper.rb +33 -10
  51. data/app/models/category.rb +53 -26
  52. data/app/models/comment.rb +17 -3
  53. data/app/models/content.rb +60 -60
  54. data/app/models/feedback.rb +29 -54
  55. data/app/models/feedback/states.rb +201 -0
  56. data/app/models/page.rb +1 -4
  57. data/app/models/page_cache.rb +9 -20
  58. data/app/models/ping.rb +4 -7
  59. data/app/models/profile.rb +3 -0
  60. data/app/models/resource.rb +1 -1
  61. data/app/models/tag.rb +17 -6
  62. data/app/models/text_filter.rb +6 -0
  63. data/app/models/trackback.rb +20 -0
  64. data/app/models/trigger.rb +3 -2
  65. data/app/models/user.rb +13 -1
  66. data/app/views/accounts/login.html.erb +11 -0
  67. data/app/views/accounts/logout.html.erb +12 -0
  68. data/app/views/accounts/signup.html.erb +36 -0
  69. data/app/views/accounts/{welcome.rhtml → welcome.html.erb} +0 -0
  70. data/app/views/admin/advanced/index.html.erb +182 -0
  71. data/app/views/admin/base/{_recent_comments.rhtml → _recent_comments.html.erb} +0 -0
  72. data/app/views/admin/base/{_recent_trackbacks.rhtml → _recent_trackbacks.html.erb} +0 -0
  73. data/app/views/admin/blacklist/{_blacklist_patterns.rhtml → _blacklist_patterns.html.erb} +0 -0
  74. data/app/views/admin/blacklist/{_form.rhtml → _form.html.erb} +0 -0
  75. data/app/views/admin/blacklist/{_quick_post.rhtml → _quick_post.html.erb} +0 -0
  76. data/app/views/admin/blacklist/{destroy.rhtml → destroy.html.erb} +0 -0
  77. data/app/views/admin/blacklist/{edit.rhtml → edit.html.erb} +0 -0
  78. data/app/views/admin/blacklist/{list.rhtml → list.html.erb} +0 -0
  79. data/app/views/admin/cache/{list.rhtml → list.html.erb} +0 -0
  80. data/app/views/admin/categories/_categories.html.erb +20 -0
  81. data/app/views/admin/categories/{_form.rhtml → _form.html.erb} +0 -0
  82. data/app/views/admin/categories/{_quick_post.rhtml → _quick_post.html.erb} +0 -0
  83. data/app/views/admin/categories/{destroy.rhtml → destroy.html.erb} +0 -0
  84. data/app/views/admin/categories/{edit.rhtml → edit.html.erb} +0 -0
  85. data/app/views/admin/categories/list.html.erb +18 -0
  86. data/app/views/admin/categories/{reorder.rhtml → reorder.html.erb} +0 -0
  87. data/app/views/admin/categories/show.html.erb +37 -0
  88. data/app/views/admin/comments/_form.html.erb +19 -0
  89. data/app/views/admin/comments/{comments.rhtml → comments.html.erb} +0 -0
  90. data/app/views/admin/comments/{destroy.rhtml → destroy.html.erb} +0 -0
  91. data/app/views/admin/comments/{edit.rhtml → edit.html.erb} +0 -0
  92. data/app/views/admin/comments/list.html.erb +37 -0
  93. data/app/views/admin/comments/new.html.erb +19 -0
  94. data/app/views/admin/comments/{show.rhtml → show.html.erb} +0 -0
  95. data/app/views/admin/content/_articles.html.erb +26 -0
  96. data/app/views/admin/content/{_attachment.rhtml → _attachment.html.erb} +0 -0
  97. data/app/views/admin/content/_form.html.erb +89 -0
  98. data/app/views/admin/content/{_pages.rhtml → _pages.html.erb} +0 -0
  99. data/app/views/admin/content/{_quick_post.rhtml → _quick_post.html.erb} +0 -0
  100. data/app/views/admin/content/{_show_categories.rhtml → _show_categories.html.erb} +0 -0
  101. data/app/views/admin/content/{_show_resources.rhtml → _show_resources.html.erb} +0 -0
  102. data/app/views/admin/content/{destroy.rhtml → destroy.html.erb} +0 -0
  103. data/app/views/admin/content/edit.html.erb +10 -0
  104. data/app/views/admin/content/list.html.erb +21 -0
  105. data/app/views/admin/content/new.html.erb +6 -0
  106. data/app/views/admin/content/preview.html.erb +10 -0
  107. data/app/views/admin/content/show.html.erb +23 -0
  108. data/app/views/admin/dashboard/index.html.erb +61 -0
  109. data/app/views/admin/feedback/_button.html.erb +8 -0
  110. data/app/views/admin/feedback/_item.html.erb +14 -0
  111. data/app/views/admin/feedback/list.html.erb +48 -0
  112. data/app/views/admin/general/index.html.erb +141 -0
  113. data/app/views/admin/general/{update_database.rhtml → update_database.html.erb} +0 -0
  114. data/app/views/admin/pages/_form.html.erb +41 -0
  115. data/app/views/admin/pages/_pages.html.erb +24 -0
  116. data/app/views/admin/pages/{_quick_post.rhtml → _quick_post.html.erb} +0 -0
  117. data/app/views/admin/pages/{destroy.rhtml → destroy.html.erb} +0 -0
  118. data/app/views/admin/pages/{edit.rhtml → edit.html.erb} +0 -0
  119. data/app/views/admin/pages/list.html.erb +12 -0
  120. data/app/views/admin/pages/new.html.erb +6 -0
  121. data/app/views/admin/pages/{preview.rhtml → preview.html.erb} +0 -0
  122. data/app/views/admin/pages/show.html.erb +12 -0
  123. data/app/views/admin/resources/{_itunes_category_add.rhtml → _itunes_category_add.html.erb} +0 -0
  124. data/app/views/admin/resources/{_itunes_category_edit.rhtml → _itunes_category_edit.html.erb} +0 -0
  125. data/app/views/admin/resources/{_metadata_add.rhtml → _metadata_add.html.erb} +0 -0
  126. data/app/views/admin/resources/{_metadata_edit.rhtml → _metadata_edit.html.erb} +0 -0
  127. data/app/views/admin/resources/{_mime_edit.rhtml → _mime_edit.html.erb} +0 -0
  128. data/app/views/admin/resources/{_pages.rhtml → _pages.html.erb} +0 -0
  129. data/app/views/admin/resources/_resources.html.erb +40 -0
  130. data/app/views/admin/resources/{destroy.rhtml → destroy.html.erb} +0 -0
  131. data/app/views/admin/resources/list.html.erb +17 -0
  132. data/app/views/admin/resources/new.html.erb +16 -0
  133. data/app/views/admin/shared/_edit.html.erb +13 -0
  134. data/app/views/admin/sidebar/{_active.rhtml → _active.html.erb} +0 -0
  135. data/app/views/admin/sidebar/{_actives.rhtml → _actives.html.erb} +0 -0
  136. data/app/views/admin/sidebar/{_available.rhtml → _available.html.erb} +0 -0
  137. data/app/views/admin/sidebar/{_availables.rhtml → _availables.html.erb} +0 -0
  138. data/app/views/admin/sidebar/{_publish.rhtml → _publish.html.erb} +0 -0
  139. data/app/views/admin/sidebar/{_target.rhtml → _target.html.erb} +0 -0
  140. data/app/views/admin/sidebar/index.html.erb +43 -0
  141. data/app/views/admin/textfilters/_form.html.erb +60 -0
  142. data/app/views/admin/textfilters/_macros.html.erb +16 -0
  143. data/app/views/admin/textfilters/_textfilters.html.erb +20 -0
  144. data/app/views/admin/textfilters/{destroy.rhtml → destroy.html.erb} +0 -0
  145. data/app/views/admin/textfilters/edit.html.erb +14 -0
  146. data/app/views/admin/textfilters/list.html.erb +18 -0
  147. data/app/views/admin/textfilters/macro_help.html.erb +3 -0
  148. data/app/views/admin/textfilters/new.html.erb +16 -0
  149. data/app/views/admin/textfilters/{preview.rhtml → preview.html.erb} +0 -0
  150. data/app/views/admin/textfilters/{show.rhtml → show.html.erb} +0 -0
  151. data/app/views/admin/textfilters/{show_help.rhtml → show_help.html.erb} +0 -0
  152. data/app/views/admin/themes/editor.html.erb +31 -0
  153. data/app/views/admin/themes/index.html.erb +30 -0
  154. data/app/views/admin/trackbacks/{_form.rhtml → _form.html.erb} +0 -0
  155. data/app/views/admin/trackbacks/{destroy.rhtml → destroy.html.erb} +0 -0
  156. data/app/views/admin/trackbacks/{edit.rhtml → edit.html.erb} +0 -0
  157. data/app/views/admin/trackbacks/{list.rhtml → list.html.erb} +0 -0
  158. data/app/views/admin/trackbacks/{new.rhtml → new.html.erb} +0 -0
  159. data/app/views/admin/trackbacks/{show.rhtml → show.html.erb} +0 -0
  160. data/app/views/admin/users/_form.html.erb +55 -0
  161. data/app/views/admin/users/_user.html.erb +20 -0
  162. data/app/views/admin/users/{destroy.rhtml → destroy.html.erb} +0 -0
  163. data/app/views/admin/users/edit.html.erb +17 -0
  164. data/app/views/admin/users/list.html.erb +32 -0
  165. data/app/views/admin/users/new.html.erb +15 -0
  166. data/app/views/admin/users/show.html.erb +23 -0
  167. data/app/views/articles/{_article.rhtml → _article.html.erb} +0 -0
  168. data/app/views/articles/_atom_feed.atom.builder +12 -0
  169. data/app/views/articles/{_comment.rhtml → _comment.html.erb} +0 -0
  170. data/app/views/articles/_comment_box.html.erb +45 -0
  171. data/app/views/articles/{_comment_error.rhtml → _comment_error.html.erb} +0 -0
  172. data/app/views/articles/_rss20_feed.rss.builder +17 -0
  173. data/app/views/articles/{_trackback.rhtml → _trackback.html.erb} +0 -0
  174. data/app/views/articles/{archives.rhtml → archives.html.erb} +0 -0
  175. data/app/views/articles/{comment_preview.rhtml → comment_preview.html.erb} +0 -0
  176. data/app/views/articles/{error.rhtml → error.html.erb} +0 -0
  177. data/app/views/articles/{groupings.rhtml → groupings.html.erb} +0 -0
  178. data/app/views/articles/index.html.erb +11 -0
  179. data/app/views/articles/read.html.erb +69 -0
  180. data/app/views/articles/{trackback.rxml → trackback.xml.builder} +0 -0
  181. data/app/views/articles/{view_page.rhtml → view_page.html.erb} +0 -0
  182. data/app/views/comments/index.html.erb +1 -0
  183. data/app/views/comments/show.html.erb +13 -0
  184. data/app/views/layouts/{accounts.rhtml → accounts.html.erb} +0 -0
  185. data/app/views/layouts/administration.html.erb +58 -0
  186. data/app/views/layouts/{minimal.rhtml → minimal.html.erb} +0 -0
  187. data/app/views/layouts/{sidebar.rhtml → sidebar.html.erb} +0 -0
  188. data/app/views/live/{search.rhtml → search.html.erb} +0 -0
  189. data/app/views/notification_mailer/{_mail_footer.rhtml → _mail_footer.html.erb} +0 -0
  190. data/app/views/notification_mailer/{_mail_header.rhtml → _mail_header.html.erb} +0 -0
  191. data/app/views/notification_mailer/article.html.erb +6 -0
  192. data/app/views/notification_mailer/comment.html.erb +11 -0
  193. data/app/views/notification_mailer/{trackback.rhtml → trackback.html.erb} +0 -0
  194. data/app/views/settings/{done.rhtml → done.html.erb} +0 -0
  195. data/app/views/settings/{install.rhtml → install.html.erb} +0 -0
  196. data/app/views/shared/_loginform.html.erb +14 -0
  197. data/app/views/shared/_search.html.erb +10 -0
  198. data/app/views/sidebar/{_row.rhtml → _row.html.erb} +0 -0
  199. data/app/views/sidebar/{_sidebar.rhtml → _sidebar.html.erb} +0 -0
  200. data/app/views/sidebar/{display_plugins.rhtml → display_plugins.html.erb} +0 -0
  201. data/app/views/sidebar/{show.rhtml → show.html.erb} +0 -0
  202. data/app/views/theme/{static_view_test.rhtml → static_view_test.html.erb} +0 -0
  203. data/app/views/xml/{_atom10_item_article.rxml → _atom10_item_article.atom.builder} +0 -0
  204. data/app/views/xml/{_atom10_item_comment.rxml → _atom10_item_comment.atom.builder} +0 -0
  205. data/app/views/xml/{_atom10_item_trackback.rxml → _atom10_item_trackback.atom.builder} +0 -0
  206. data/app/views/xml/{_googlesitemap_item_article.rxml → _googlesitemap_item_article.googlesitemap.builder} +0 -0
  207. data/app/views/xml/{_googlesitemap_item_category.rxml → _googlesitemap_item_category.googlesitemap.builder} +0 -0
  208. data/app/views/xml/{_googlesitemap_item_page.rxml → _googlesitemap_item_page.googlesitemap.builder} +0 -0
  209. data/app/views/xml/{_googlesitemap_item_tag.rxml → _googlesitemap_item_tag.googlesitemap.builder} +0 -0
  210. data/app/views/xml/{_itunes_item_resource.rxml → _itunes_item_resource.xml.builder} +0 -0
  211. data/app/views/xml/{_rss20_item_article.rxml → _rss20_item_article.rss.builder} +0 -0
  212. data/app/views/xml/{_rss20_item_comment.rxml → _rss20_item_comment.rss.builder} +0 -0
  213. data/app/views/xml/{_rss20_item_trackback.rxml → _rss20_item_trackback.rss.builder} +0 -0
  214. data/app/views/xml/feed.atom.builder +18 -0
  215. data/app/views/xml/{googlesitemap_feed.rxml → feed.googlesitemap.builder} +0 -0
  216. data/app/views/xml/feed.rss.builder +18 -0
  217. data/app/views/xml/itunes_feed.rss.builder +29 -0
  218. data/app/views/xml/rsd.rsd.builder +19 -0
  219. data/bin/typo +55 -0
  220. data/config/boot.rb +1 -1
  221. data/config/environment.rb +26 -17
  222. data/config/environments/development.rb +0 -3
  223. data/config/environments/test.rb +1 -0
  224. data/config/initializers/mime_types.rb +3 -0
  225. data/config/routes.rb +118 -59
  226. data/db/migrate/001_initial_schema.rb +20 -5
  227. data/db/migrate/004_add_sidebars.rb +11 -5
  228. data/db/migrate/008_add_page_title.rb +11 -0
  229. data/db/migrate/016_fix_is_primary_postgres.rb +4 -7
  230. data/db/migrate/036_add_tag_display_name.rb +1 -3
  231. data/db/migrate/056_create_notifications.rb +1 -0
  232. data/db/migrate/057_add_categorization_model.rb +2 -2
  233. data/db/migrate/058_separate_entries_and_feedback.rb +13 -0
  234. data/db/migrate/060_cleanup_contents_table.rb +2 -2
  235. data/db/migrate/063_rejig_state_field.rb +40 -0
  236. data/db/migrate/064_add_users_profile.rb +32 -0
  237. data/db/migrate/065_add_users_rights.rb +116 -0
  238. data/db/schema.mysql.sql +107 -165
  239. data/db/schema.postgresql.sql +107 -165
  240. data/db/schema.rb +143 -120
  241. data/db/schema.sqlite.sql +107 -165
  242. data/db/schema.sqlserver.sql +108 -170
  243. data/db/schema_version +1 -1
  244. data/lang/de_DE.rb +4 -2
  245. data/lang/fr_FR.rb +65 -3
  246. data/lang/ro_RO.rb +4 -2
  247. data/lib/bare_migration.rb +3 -0
  248. data/lib/generators/sidebar/templates/{content.rhtml → content.html.erb} +0 -0
  249. data/lib/login_system.rb +2 -2
  250. data/lib/route_cache.rb +1 -1
  251. data/lib/stateful.rb +107 -0
  252. data/lib/tasks/rcov.rake +38 -0
  253. data/lib/tasks/release.rake +21 -10
  254. data/lib/text_filter_plugin.rb +11 -5
  255. data/lib/transforms.rb +1 -1
  256. data/lib/typo_deprecated.rb +11 -0
  257. data/public/.htaccess +3 -2
  258. data/public/images/admin/bc-bg.gif +0 -0
  259. data/public/images/admin/bgdivider.gif +0 -0
  260. data/public/images/admin/bgdivider.png +0 -0
  261. data/public/images/admin/bgoff.png +0 -0
  262. data/public/images/admin/bgoff2.png +0 -0
  263. data/public/images/admin/bgon.png +0 -0
  264. data/public/images/admin/bgover.png +0 -0
  265. data/public/images/admin/bgselected.png +0 -0
  266. data/public/images/admin/cancel.png +0 -0
  267. data/public/images/admin/checked.png +0 -0
  268. data/public/images/admin/delete.png +0 -0
  269. data/public/images/admin/edit.png +0 -0
  270. data/public/images/admin/foot.jpg +0 -0
  271. data/public/images/{help.png → admin/help.png} +0 -0
  272. data/public/images/admin/loginformbg.png +0 -0
  273. data/public/images/admin/show.png +0 -0
  274. data/public/images/admin/table-header-first.png +0 -0
  275. data/public/images/admin/table-header-last.png +0 -0
  276. data/public/images/admin/table-header.png +0 -0
  277. data/public/images/admin/top.gif +0 -0
  278. data/public/images/admin/typo.gif +0 -0
  279. data/public/images/admin/typologo.png +0 -0
  280. data/public/javascripts/lightbox.js +1 -1
  281. data/public/javascripts/tiny_mce/langs/en.js +154 -41
  282. data/public/javascripts/tiny_mce/plugins/advimage/css/advimage.css +13 -0
  283. data/public/javascripts/tiny_mce/plugins/advimage/editor_plugin.js +1 -0
  284. data/public/javascripts/tiny_mce/plugins/advimage/editor_plugin_src.js +49 -0
  285. data/public/javascripts/tiny_mce/plugins/advimage/image.htm +237 -0
  286. data/public/javascripts/tiny_mce/plugins/advimage/img/sample.gif +0 -0
  287. data/public/javascripts/tiny_mce/plugins/advimage/js/image.js +403 -0
  288. data/public/javascripts/tiny_mce/plugins/advimage/langs/en_dlg.js +43 -0
  289. data/public/javascripts/tiny_mce/plugins/advlink/css/advlink.css +8 -0
  290. data/public/javascripts/tiny_mce/plugins/advlink/editor_plugin.js +1 -0
  291. data/public/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js +58 -0
  292. data/public/javascripts/tiny_mce/plugins/advlink/js/advlink.js +551 -0
  293. data/public/javascripts/tiny_mce/plugins/advlink/langs/en_dlg.js +52 -0
  294. data/public/javascripts/tiny_mce/plugins/advlink/link.htm +339 -0
  295. data/public/javascripts/tiny_mce/plugins/autosave/editor_plugin.js +1 -0
  296. data/public/javascripts/tiny_mce/plugins/autosave/editor_plugin_src.js +51 -0
  297. data/public/javascripts/tiny_mce/plugins/contextmenu/editor_plugin.js +1 -0
  298. data/public/javascripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js +84 -0
  299. data/public/javascripts/tiny_mce/plugins/emotions/editor_plugin.js +1 -0
  300. data/public/javascripts/tiny_mce/plugins/emotions/editor_plugin_src.js +40 -0
  301. data/public/javascripts/tiny_mce/plugins/emotions/emotions.htm +41 -0
  302. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-cool.gif +0 -0
  303. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-cry.gif +0 -0
  304. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif +0 -0
  305. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
  306. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-frown.gif +0 -0
  307. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif +0 -0
  308. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif +0 -0
  309. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif +0 -0
  310. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
  311. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif +0 -0
  312. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-smile.gif +0 -0
  313. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif +0 -0
  314. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
  315. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif +0 -0
  316. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-wink.gif +0 -0
  317. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-yell.gif +0 -0
  318. data/public/javascripts/tiny_mce/plugins/emotions/js/emotions.js +22 -0
  319. data/public/javascripts/tiny_mce/plugins/emotions/langs/en_dlg.js +20 -0
  320. data/public/javascripts/tiny_mce/plugins/media/css/content.css +6 -0
  321. data/public/javascripts/tiny_mce/plugins/media/css/media.css +68 -0
  322. data/public/javascripts/tiny_mce/plugins/media/editor_plugin.js +1 -0
  323. data/public/javascripts/tiny_mce/plugins/media/editor_plugin_src.js +323 -0
  324. data/public/javascripts/tiny_mce/plugins/media/img/flash.gif +0 -0
  325. data/public/javascripts/tiny_mce/plugins/media/img/flv_player.swf +0 -0
  326. data/public/javascripts/tiny_mce/plugins/media/img/quicktime.gif +0 -0
  327. data/public/javascripts/tiny_mce/plugins/media/img/realmedia.gif +0 -0
  328. data/public/javascripts/tiny_mce/plugins/media/img/shockwave.gif +0 -0
  329. data/public/javascripts/tiny_mce/{themes/advanced/images/spacer.gif → plugins/media/img/trans.gif} +0 -0
  330. data/public/javascripts/tiny_mce/plugins/media/img/windowsmedia.gif +0 -0
  331. data/public/javascripts/tiny_mce/plugins/media/js/embed.js +73 -0
  332. data/public/javascripts/tiny_mce/plugins/media/js/media.js +616 -0
  333. data/public/javascripts/tiny_mce/plugins/media/langs/en_dlg.js +103 -0
  334. data/public/javascripts/tiny_mce/plugins/media/media.htm +823 -0
  335. data/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin.js +1 -0
  336. data/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +50 -0
  337. data/public/javascripts/tiny_mce/plugins/paste/blank.htm +22 -0
  338. data/public/javascripts/tiny_mce/plugins/paste/css/blank.css +14 -0
  339. data/public/javascripts/tiny_mce/plugins/paste/css/pasteword.css +3 -0
  340. data/public/javascripts/tiny_mce/plugins/paste/editor_plugin.js +1 -0
  341. data/public/javascripts/tiny_mce/plugins/paste/editor_plugin_src.js +382 -0
  342. data/public/javascripts/tiny_mce/plugins/paste/js/pastetext.js +42 -0
  343. data/public/javascripts/tiny_mce/plugins/paste/js/pasteword.js +56 -0
  344. data/public/javascripts/tiny_mce/plugins/paste/langs/en_dlg.js +5 -0
  345. data/public/javascripts/tiny_mce/plugins/paste/pastetext.htm +34 -0
  346. data/public/javascripts/tiny_mce/plugins/paste/pasteword.htm +29 -0
  347. data/public/javascripts/tiny_mce/plugins/safari/blank.htm +1 -0
  348. data/public/javascripts/tiny_mce/plugins/safari/editor_plugin.js +1 -0
  349. data/public/javascripts/tiny_mce/plugins/safari/editor_plugin_src.js +401 -0
  350. data/public/javascripts/tiny_mce/plugins/save/editor_plugin.js +1 -0
  351. data/public/javascripts/tiny_mce/plugins/save/editor_plugin_src.js +103 -0
  352. data/public/javascripts/tiny_mce/themes/advanced/about.htm +19 -15
  353. data/public/javascripts/tiny_mce/themes/advanced/anchor.htm +10 -11
  354. data/public/javascripts/tiny_mce/themes/advanced/charmap.htm +7 -7
  355. data/public/javascripts/tiny_mce/themes/advanced/color_picker.htm +67 -6
  356. data/public/javascripts/tiny_mce/themes/advanced/editor_template.js +1 -1
  357. data/public/javascripts/tiny_mce/themes/advanced/editor_template_src.js +808 -1352
  358. data/public/javascripts/tiny_mce/themes/advanced/image.htm +39 -53
  359. data/public/javascripts/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
  360. data/public/javascripts/tiny_mce/themes/advanced/img/icons.gif +0 -0
  361. data/public/javascripts/tiny_mce/themes/advanced/js/about.js +76 -0
  362. data/public/javascripts/tiny_mce/themes/advanced/js/anchor.js +30 -0
  363. data/public/javascripts/tiny_mce/themes/advanced/js/charmap.js +327 -0
  364. data/public/javascripts/tiny_mce/themes/advanced/js/color_picker.js +245 -0
  365. data/public/javascripts/tiny_mce/themes/advanced/js/image.js +232 -0
  366. data/public/javascripts/tiny_mce/themes/advanced/js/link.js +110 -0
  367. data/public/javascripts/tiny_mce/themes/advanced/js/source_editor.js +62 -0
  368. data/public/javascripts/tiny_mce/themes/advanced/langs/en.js +62 -82
  369. data/public/javascripts/tiny_mce/themes/advanced/langs/en_dlg.js +51 -0
  370. data/public/javascripts/tiny_mce/themes/advanced/link.htm +28 -64
  371. data/public/javascripts/tiny_mce/themes/advanced/skins/default/content.css +18 -0
  372. data/public/javascripts/tiny_mce/themes/advanced/skins/default/dialog.css +111 -0
  373. data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/buttons.png +0 -0
  374. data/public/javascripts/tiny_mce/themes/advanced/{images/anchor_symbol.gif → skins/default/img/items.gif} +0 -0
  375. data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
  376. data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/menu_check.gif +0 -0
  377. data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/progress.gif +0 -0
  378. data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/tabs.gif +0 -0
  379. data/public/javascripts/tiny_mce/themes/advanced/skins/default/ui.css +193 -0
  380. data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/content.css +18 -0
  381. data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/dialog.css +111 -0
  382. data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
  383. data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui.css +193 -0
  384. data/public/javascripts/tiny_mce/themes/advanced/source_editor.htm +9 -9
  385. data/public/javascripts/tiny_mce/themes/simple/editor_template.js +1 -0
  386. data/public/javascripts/tiny_mce/themes/simple/editor_template_src.js +85 -0
  387. data/public/javascripts/tiny_mce/themes/simple/img/icons.gif +0 -0
  388. data/public/javascripts/tiny_mce/themes/simple/langs/en.js +11 -0
  389. data/public/javascripts/tiny_mce/themes/simple/skins/default/content.css +25 -0
  390. data/public/javascripts/tiny_mce/themes/simple/skins/default/ui.css +32 -0
  391. data/public/javascripts/tiny_mce/themes/simple/skins/o2k7/content.css +17 -0
  392. data/public/javascripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
  393. data/public/javascripts/tiny_mce/themes/simple/skins/o2k7/ui.css +35 -0
  394. data/public/javascripts/tiny_mce/tiny_mce.js +1 -1
  395. data/public/javascripts/tiny_mce/tiny_mce_popup.js +168 -235
  396. data/public/javascripts/tiny_mce/tiny_mce_src.js +7173 -5654
  397. data/public/javascripts/tiny_mce/utils/editable_selects.js +6 -6
  398. data/public/javascripts/tiny_mce/utils/form_utils.js +23 -40
  399. data/public/javascripts/tiny_mce/utils/mclayer.js +2 -2
  400. data/public/javascripts/tiny_mce/utils/mctabs.js +2 -2
  401. data/public/javascripts/tiny_mce/utils/validate.js +2 -2
  402. data/public/javascripts/typo.js +11 -18
  403. data/public/stylesheets/administration.css +449 -232
  404. data/public/stylesheets/lightbox.css +2 -2
  405. data/script/spec +4 -0
  406. data/script/spec_server +102 -0
  407. data/spec/controllers/accounts_controller_spec.rb +86 -60
  408. data/spec/controllers/articles_controller_spec.rb +50 -20
  409. data/spec/controllers/authors_controller_spec.rb +111 -0
  410. data/spec/controllers/categories_controller_spec.rb +128 -0
  411. data/spec/controllers/comments_controller_spec.rb +216 -0
  412. data/spec/controllers/tags_controller_spec.rb +128 -0
  413. data/spec/fixtures/contents.yml +12 -12
  414. data/spec/fixtures/feedback.yml +10 -10
  415. data/spec/helpers/admin_base_helper_spec.rb +3 -3
  416. data/spec/helpers/comments_helper_spec.rb +11 -0
  417. data/spec/helpers/content_helper_spec.rb +26 -0
  418. data/spec/models/amazon_sidebar_spec.rb +11 -11
  419. data/spec/models/article_spec.rb +17 -0
  420. data/spec/models/blog_spec.rb +7 -7
  421. data/spec/models/cache_support_spec.rb +20 -20
  422. data/spec/models/category_spec.rb +9 -9
  423. data/spec/models/configuration_spec.rb +41 -41
  424. data/spec/models/metafragment_spec.rb +8 -8
  425. data/spec/models/page_spec.rb +38 -30
  426. data/spec/models/ping_spec.rb +40 -38
  427. data/spec/models/redirect_spec.rb +5 -5
  428. data/spec/models/resource_spec.rb +18 -21
  429. data/spec/models/static_sidebar_spec.rb +5 -5
  430. data/spec/models/tag_spec.rb +12 -12
  431. data/spec/models/text_filter_spec.rb +18 -18
  432. data/spec/models/theme_spec.rb +15 -14
  433. data/spec/models/trackback_spec.rb +23 -18
  434. data/spec/models/trigger_spec.rb +6 -6
  435. data/spec/models/user_spec.rb +40 -40
  436. data/spec/spec.opts +7 -0
  437. data/spec/spec_helper.rb +28 -0
  438. data/spec/views/comments/html_sanitization_spec.rb +118 -0
  439. data/test/fixtures/blogs.yml +2 -2
  440. data/test/fixtures/contents.yml +18 -18
  441. data/test/fixtures/feedback.yml +10 -10
  442. data/test/fixtures/profiles.yml +16 -0
  443. data/test/fixtures/users.yml +9 -4
  444. data/test/functional/accounts_controller_test.rb +6 -6
  445. data/test/functional/admin/advanced_controller_test.rb +21 -0
  446. data/test/functional/admin/article_preview_test.rb +1 -1
  447. data/test/functional/admin/blacklist_controller_test.rb +1 -1
  448. data/test/functional/admin/categories_controller_test.rb +4 -10
  449. data/test/functional/admin/comments_controller_test.rb +2 -2
  450. data/test/functional/admin/content_controller_test.rb +8 -2
  451. data/test/functional/admin/feedback_controller_test.rb +2 -2
  452. data/test/functional/admin/general_controller_test.rb +1 -1
  453. data/test/functional/admin/pages_controller_test.rb +1 -1
  454. data/test/functional/admin/profiles_controller_test.rb +18 -0
  455. data/test/functional/admin/resources_controller_test.rb +1 -1
  456. data/test/functional/admin/textfilters_controller_test.rb +1 -1
  457. data/test/functional/admin/themes_controller_test.rb +3 -3
  458. data/test/functional/admin/trackbacks_controller_test.rb +1 -1
  459. data/test/functional/admin/users_controller_test.rb +2 -2
  460. data/test/functional/articles_controller_test.rb +56 -358
  461. data/test/functional/backend_controller_test.rb +23 -9
  462. data/test/functional/theme_controller_test.rb +8 -8
  463. data/test/functional/xml_controller_test.rb +20 -180
  464. data/test/mocks/themes/standard_issue/about.markdown +5 -0
  465. data/test/mocks/themes/standard_issue/images/img01.gif +0 -0
  466. data/test/mocks/themes/standard_issue/images/img02.gif +0 -0
  467. data/test/mocks/themes/standard_issue/images/img03.gif +0 -0
  468. data/test/mocks/themes/standard_issue/images/img04.jpg +0 -0
  469. data/test/mocks/themes/standard_issue/images/img05.gif +0 -0
  470. data/test/mocks/themes/standard_issue/images/img06.gif +0 -0
  471. data/test/mocks/themes/standard_issue/images/img07.gif +0 -0
  472. data/test/mocks/themes/standard_issue/images/img08.gif +0 -0
  473. data/test/mocks/themes/standard_issue/images/img09.gif +0 -0
  474. data/test/mocks/themes/standard_issue/images/img10.gif +0 -0
  475. data/test/mocks/themes/standard_issue/images/spacer.gif +0 -0
  476. data/{themes/azure → test/mocks/themes/standard_issue}/images/spinner.gif +0 -0
  477. data/test/mocks/themes/standard_issue/layouts/default.html.erb +61 -0
  478. data/test/mocks/themes/standard_issue/preview.png +0 -0
  479. data/test/mocks/themes/standard_issue/stylesheets/application.css +461 -0
  480. data/test/mocks/themes/standard_issue/views/articles/_article.html.erb +32 -0
  481. data/test/mocks/themes/standard_issue/views/articles/_comment.html.erb +12 -0
  482. data/test/mocks/themes/standard_issue/views/articles/_comment_form.html.erb +48 -0
  483. data/{themes/scribbish/views/articles/_comment_list.rhtml → test/mocks/themes/standard_issue/views/articles/_comment_list.html.erb} +0 -0
  484. data/{themes/scribbish/views/articles/_trackback.rhtml → test/mocks/themes/standard_issue/views/articles/_trackback.html.erb} +0 -0
  485. data/{themes/scribbish/views/articles/comment_preview.rhtml → test/mocks/themes/standard_issue/views/articles/comment_preview.html.erb} +0 -0
  486. data/test/mocks/themes/standard_issue/views/articles/index.html.erb +5 -0
  487. data/test/mocks/themes/standard_issue/views/articles/read.html.erb +42 -0
  488. data/test/mocks/themes/standard_issue/views/shared/_search.html.erb +17 -0
  489. data/test/mocks/themes/standard_issue/views/theme/static_view_test.rhtml +1 -0
  490. data/test/test_helper.rb +4 -2
  491. data/test/unit/article_closing_test.rb +40 -0
  492. data/test/unit/article_test.rb +23 -15
  493. data/test/unit/blog_test.rb +2 -2
  494. data/test/unit/cache_support_test.rb +1 -1
  495. data/test/unit/configuration_test.rb +2 -2
  496. data/test/unit/content_state/feedback_states_test.rb +7 -11
  497. data/test/unit/ping_pinger_test.rb +30 -0
  498. data/test/unit/ping_test.rb +4 -2
  499. data/test/unit/route_cache_test.rb +11 -0
  500. data/test/unit/sidebar_test.rb +1 -1
  501. data/test/unit/theme_test.rb +3 -3
  502. data/test/unit/trackback_test.rb +0 -37
  503. data/test/unit/typo_deprecated_test.rb +22 -0
  504. data/test/unit/user_test.rb +1 -1
  505. data/themes/dirtylicious/about.markdown +3 -0
  506. data/themes/dirtylicious/images/body.jpg +0 -0
  507. data/themes/dirtylicious/images/container.jpg +0 -0
  508. data/themes/dirtylicious/images/gravatar.gif +0 -0
  509. data/themes/dirtylicious/images/header.jpg +0 -0
  510. data/themes/dirtylicious/images/li.gif +0 -0
  511. data/themes/dirtylicious/images/main.gif +0 -0
  512. data/themes/dirtylicious/images/nav.gif +0 -0
  513. data/themes/dirtylicious/images/quote.gif +0 -0
  514. data/themes/dirtylicious/images/spinner.gif +0 -0
  515. data/themes/dirtylicious/layouts/default.html.erb +60 -0
  516. data/themes/dirtylicious/preview.png +0 -0
  517. data/themes/dirtylicious/stylesheets/application.css +327 -0
  518. data/themes/dirtylicious/views/articles/_article.html.erb +33 -0
  519. data/themes/dirtylicious/views/articles/_comment.html.erb +14 -0
  520. data/themes/dirtylicious/views/articles/_comment_form.html.erb +37 -0
  521. data/themes/dirtylicious/views/articles/_comment_list.html.erb +7 -0
  522. data/themes/dirtylicious/views/articles/_trackback.html.erb +9 -0
  523. data/themes/dirtylicious/views/articles/comment_preview.html.erb +10 -0
  524. data/themes/dirtylicious/views/articles/index.html.erb +5 -0
  525. data/themes/dirtylicious/views/articles/read.html.erb +42 -0
  526. data/themes/dirtylicious/views/shared/_search.html.erb +16 -0
  527. data/themes/scribbish/layouts/default.html.erb +42 -0
  528. data/themes/scribbish/stylesheets/application.css +1 -1
  529. data/themes/scribbish/stylesheets/content.css +3 -3
  530. data/themes/scribbish/views/articles/{_article.rhtml → _article.html.erb} +0 -0
  531. data/themes/scribbish/views/articles/{_comment.rhtml → _comment.html.erb} +0 -0
  532. data/themes/scribbish/views/articles/_comment_form.html.erb +53 -0
  533. data/themes/scribbish/views/articles/_comment_list.html.erb +7 -0
  534. data/themes/scribbish/views/articles/_trackback.html.erb +9 -0
  535. data/themes/scribbish/views/articles/comment_preview.html.erb +10 -0
  536. data/themes/scribbish/views/articles/index.html.erb +5 -0
  537. data/themes/scribbish/views/articles/{read.rhtml → read.html.erb} +0 -0
  538. data/themes/scribbish/views/shared/_search.html.erb +16 -0
  539. data/themes/standard_issue/about.markdown +5 -0
  540. data/themes/standard_issue/images/img01.gif +0 -0
  541. data/themes/standard_issue/images/img02.gif +0 -0
  542. data/themes/standard_issue/images/img03.gif +0 -0
  543. data/themes/standard_issue/images/img04.jpg +0 -0
  544. data/themes/standard_issue/images/img05.gif +0 -0
  545. data/themes/standard_issue/images/img06.gif +0 -0
  546. data/themes/standard_issue/images/img07.gif +0 -0
  547. data/themes/standard_issue/images/img08.gif +0 -0
  548. data/themes/standard_issue/images/img09.gif +0 -0
  549. data/themes/standard_issue/images/img10.gif +0 -0
  550. data/themes/standard_issue/images/spacer.gif +0 -0
  551. data/themes/standard_issue/images/spinner.gif +0 -0
  552. data/themes/standard_issue/layouts/default.html.erb +59 -0
  553. data/themes/standard_issue/preview.png +0 -0
  554. data/themes/standard_issue/stylesheets/application.css +461 -0
  555. data/themes/standard_issue/views/articles/_article.html.erb +32 -0
  556. data/themes/standard_issue/views/articles/_comment.html.erb +12 -0
  557. data/themes/standard_issue/views/articles/_comment_form.html.erb +48 -0
  558. data/themes/standard_issue/views/articles/_comment_list.html.erb +7 -0
  559. data/themes/standard_issue/views/articles/_trackback.html.erb +9 -0
  560. data/themes/standard_issue/views/articles/comment_preview.html.erb +10 -0
  561. data/themes/standard_issue/views/articles/index.html.erb +5 -0
  562. data/themes/standard_issue/views/articles/read.html.erb +42 -0
  563. data/themes/standard_issue/views/shared/_search.html.erb +17 -0
  564. data/themes/standard_issue/views/theme/static_view_test.html.erb +1 -0
  565. data/vendor/actionwebservice/CHANGELOG +265 -0
  566. data/vendor/actionwebservice/MIT-LICENSE +21 -0
  567. data/vendor/actionwebservice/README +364 -0
  568. data/vendor/actionwebservice/Rakefile +172 -0
  569. data/vendor/actionwebservice/TODO +32 -0
  570. data/vendor/actionwebservice/examples/googlesearch/README +143 -0
  571. data/vendor/actionwebservice/examples/googlesearch/autoloading/google_search_api.rb +50 -0
  572. data/vendor/actionwebservice/examples/googlesearch/autoloading/google_search_controller.rb +57 -0
  573. data/vendor/actionwebservice/examples/googlesearch/delegated/google_search_service.rb +108 -0
  574. data/vendor/actionwebservice/examples/googlesearch/delegated/search_controller.rb +7 -0
  575. data/vendor/actionwebservice/examples/googlesearch/direct/google_search_api.rb +50 -0
  576. data/vendor/actionwebservice/examples/googlesearch/direct/search_controller.rb +58 -0
  577. data/vendor/actionwebservice/examples/metaWeblog/README +17 -0
  578. data/vendor/actionwebservice/examples/metaWeblog/apis/blogger_api.rb +60 -0
  579. data/vendor/actionwebservice/examples/metaWeblog/apis/blogger_service.rb +34 -0
  580. data/vendor/actionwebservice/examples/metaWeblog/apis/meta_weblog_api.rb +67 -0
  581. data/vendor/actionwebservice/examples/metaWeblog/apis/meta_weblog_service.rb +48 -0
  582. data/vendor/actionwebservice/examples/metaWeblog/controllers/xmlrpc_controller.rb +16 -0
  583. data/vendor/actionwebservice/install.rb +30 -0
  584. data/vendor/actionwebservice/lib/action_web_service.rb +66 -0
  585. data/vendor/actionwebservice/lib/action_web_service/api.rb +297 -0
  586. data/vendor/actionwebservice/lib/action_web_service/base.rb +38 -0
  587. data/vendor/actionwebservice/lib/action_web_service/casting.rb +138 -0
  588. data/vendor/actionwebservice/lib/action_web_service/client.rb +3 -0
  589. data/vendor/actionwebservice/lib/action_web_service/client/base.rb +28 -0
  590. data/vendor/actionwebservice/lib/action_web_service/client/soap_client.rb +113 -0
  591. data/vendor/actionwebservice/lib/action_web_service/client/xmlrpc_client.rb +58 -0
  592. data/vendor/actionwebservice/lib/action_web_service/container.rb +3 -0
  593. data/vendor/actionwebservice/lib/action_web_service/container/action_controller_container.rb +93 -0
  594. data/vendor/actionwebservice/lib/action_web_service/container/delegated_container.rb +86 -0
  595. data/vendor/actionwebservice/lib/action_web_service/container/direct_container.rb +69 -0
  596. data/vendor/actionwebservice/lib/action_web_service/dispatcher.rb +2 -0
  597. data/vendor/actionwebservice/lib/action_web_service/dispatcher/abstract.rb +207 -0
  598. data/vendor/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb +379 -0
  599. data/vendor/actionwebservice/lib/action_web_service/invocation.rb +202 -0
  600. data/vendor/actionwebservice/lib/action_web_service/protocol.rb +4 -0
  601. data/vendor/actionwebservice/lib/action_web_service/protocol/abstract.rb +112 -0
  602. data/vendor/actionwebservice/lib/action_web_service/protocol/discovery.rb +37 -0
  603. data/vendor/actionwebservice/lib/action_web_service/protocol/soap_protocol.rb +176 -0
  604. data/vendor/actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb +235 -0
  605. data/vendor/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb +122 -0
  606. data/vendor/actionwebservice/lib/action_web_service/scaffolding.rb +283 -0
  607. data/vendor/actionwebservice/lib/action_web_service/struct.rb +64 -0
  608. data/vendor/actionwebservice/lib/action_web_service/support/class_inheritable_options.rb +26 -0
  609. data/vendor/actionwebservice/lib/action_web_service/support/signature_types.rb +226 -0
  610. data/vendor/actionwebservice/lib/action_web_service/templates/scaffolds/layout.erb +65 -0
  611. data/vendor/{plugins/sitealizer/lib/app/views/sitealizer/_hits_summary.rhtml → actionwebservice/lib/action_web_service/templates/scaffolds/layout.rhtml} +0 -0
  612. data/vendor/actionwebservice/lib/action_web_service/templates/scaffolds/methods.erb +6 -0
  613. data/vendor/actionwebservice/lib/action_web_service/templates/scaffolds/methods.rhtml +0 -0
  614. data/vendor/actionwebservice/lib/action_web_service/templates/scaffolds/parameters.erb +29 -0
  615. data/vendor/actionwebservice/lib/action_web_service/templates/scaffolds/parameters.rhtml +0 -0
  616. data/vendor/actionwebservice/lib/action_web_service/templates/scaffolds/result.erb +30 -0
  617. data/vendor/actionwebservice/lib/action_web_service/templates/scaffolds/result.rhtml +0 -0
  618. data/vendor/actionwebservice/lib/action_web_service/test_invoke.rb +110 -0
  619. data/vendor/actionwebservice/lib/action_web_service/version.rb +9 -0
  620. data/vendor/actionwebservice/lib/actionwebservice.rb +1 -0
  621. data/vendor/actionwebservice/setup.rb +1379 -0
  622. data/vendor/actionwebservice/test/abstract_client.rb +183 -0
  623. data/vendor/actionwebservice/test/abstract_dispatcher.rb +551 -0
  624. data/vendor/actionwebservice/test/abstract_unit.rb +45 -0
  625. data/vendor/actionwebservice/test/api_test.rb +102 -0
  626. data/vendor/actionwebservice/test/apis/auto_load_api.rb +3 -0
  627. data/vendor/actionwebservice/test/apis/broken_auto_load_api.rb +2 -0
  628. data/vendor/actionwebservice/test/base_test.rb +42 -0
  629. data/vendor/actionwebservice/test/casting_test.rb +86 -0
  630. data/vendor/actionwebservice/test/client_soap_test.rb +153 -0
  631. data/vendor/actionwebservice/test/client_xmlrpc_test.rb +152 -0
  632. data/vendor/actionwebservice/test/container_test.rb +73 -0
  633. data/vendor/actionwebservice/test/dispatcher_action_controller_soap_test.rb +137 -0
  634. data/vendor/actionwebservice/test/dispatcher_action_controller_xmlrpc_test.rb +59 -0
  635. data/vendor/actionwebservice/test/fixtures/db_definitions/mysql.sql +8 -0
  636. data/vendor/actionwebservice/test/fixtures/users.yml +12 -0
  637. data/vendor/actionwebservice/test/gencov +3 -0
  638. data/vendor/actionwebservice/test/invocation_test.rb +185 -0
  639. data/vendor/actionwebservice/test/run +6 -0
  640. data/vendor/actionwebservice/test/scaffolded_controller_test.rb +146 -0
  641. data/vendor/actionwebservice/test/struct_test.rb +52 -0
  642. data/vendor/actionwebservice/test/test_invoke_test.rb +112 -0
  643. data/vendor/memcache-client/lib/memcache.rb +1 -2
  644. data/vendor/plugins/acts_as_list/README +23 -0
  645. data/vendor/plugins/acts_as_list/init.rb +3 -0
  646. data/vendor/plugins/acts_as_list/lib/active_record/acts/list.rb +256 -0
  647. data/vendor/plugins/acts_as_list/test/list_test.rb +332 -0
  648. data/vendor/plugins/archives_sidebar/lib/archives_sidebar.rb +14 -5
  649. data/vendor/plugins/archives_sidebar/views/content.rhtml +1 -1
  650. data/vendor/plugins/category_sidebar/views/content.rhtml +1 -1
  651. data/vendor/plugins/classic_pagination/CHANGELOG +152 -0
  652. data/vendor/plugins/classic_pagination/README +18 -0
  653. data/vendor/plugins/classic_pagination/Rakefile +22 -0
  654. data/vendor/plugins/classic_pagination/init.rb +33 -0
  655. data/vendor/plugins/classic_pagination/install.rb +1 -0
  656. data/vendor/plugins/classic_pagination/lib/pagination.rb +405 -0
  657. data/vendor/plugins/classic_pagination/lib/pagination_helper.rb +135 -0
  658. data/vendor/plugins/classic_pagination/test/fixtures/companies.yml +24 -0
  659. data/vendor/plugins/classic_pagination/test/fixtures/company.rb +9 -0
  660. data/vendor/plugins/classic_pagination/test/fixtures/developer.rb +7 -0
  661. data/vendor/plugins/classic_pagination/test/fixtures/developers.yml +21 -0
  662. data/vendor/plugins/classic_pagination/test/fixtures/developers_projects.yml +13 -0
  663. data/vendor/plugins/classic_pagination/test/fixtures/project.rb +3 -0
  664. data/vendor/plugins/classic_pagination/test/fixtures/projects.yml +7 -0
  665. data/vendor/plugins/classic_pagination/test/fixtures/replies.yml +13 -0
  666. data/vendor/plugins/classic_pagination/test/fixtures/reply.rb +5 -0
  667. data/vendor/plugins/classic_pagination/test/fixtures/schema.sql +42 -0
  668. data/vendor/plugins/classic_pagination/test/fixtures/topic.rb +3 -0
  669. data/vendor/plugins/classic_pagination/test/fixtures/topics.yml +22 -0
  670. data/vendor/plugins/classic_pagination/test/helper.rb +117 -0
  671. data/vendor/plugins/classic_pagination/test/pagination_helper_test.rb +38 -0
  672. data/vendor/plugins/classic_pagination/test/pagination_test.rb +177 -0
  673. data/vendor/plugins/datestamped_resources/README +4 -0
  674. data/vendor/plugins/datestamped_resources/Rakefile +22 -0
  675. data/vendor/plugins/datestamped_resources/init.rb +2 -0
  676. data/vendor/plugins/datestamped_resources/install.rb +1 -0
  677. data/vendor/plugins/datestamped_resources/lib/datestamped_resources.rb +202 -0
  678. data/vendor/plugins/datestamped_resources/tasks/datestamped_resources_tasks.rake +4 -0
  679. data/vendor/plugins/datestamped_resources/test/datestamped_resources_test.rb +8 -0
  680. data/vendor/plugins/datestamped_resources/uninstall.rb +1 -0
  681. data/vendor/plugins/expiring_action_cache/lib/actionparamcache.rb +2 -2
  682. data/vendor/plugins/localization/lib/localization.rb +1 -1
  683. data/vendor/plugins/page_sidebar/Rakefile +22 -0
  684. data/vendor/plugins/page_sidebar/init.rb +5 -0
  685. data/vendor/plugins/page_sidebar/lib/page_sidebar.rb +10 -0
  686. data/vendor/plugins/page_sidebar/test/page_sidebar_test.rb +8 -0
  687. data/vendor/plugins/page_sidebar/views/content.rhtml +12 -0
  688. data/vendor/plugins/rspec/CHANGES +1021 -0
  689. data/vendor/plugins/rspec/MIT-LICENSE +20 -0
  690. data/vendor/plugins/rspec/README +72 -0
  691. data/vendor/plugins/rspec/Rakefile +277 -0
  692. data/vendor/plugins/rspec/TODO +2 -0
  693. data/vendor/plugins/rspec/UPGRADE +31 -0
  694. data/vendor/plugins/rspec/autotest/discover.rb +6 -0
  695. data/vendor/plugins/rspec/autotest/rspec.rb +1 -0
  696. data/vendor/plugins/rspec/bin/spec +3 -0
  697. data/vendor/plugins/rspec/bin/spec_translator +8 -0
  698. data/vendor/plugins/rspec/examples/pure/autogenerated_docstrings_example.rb +19 -0
  699. data/vendor/plugins/rspec/examples/pure/before_and_after_example.rb +40 -0
  700. data/vendor/plugins/rspec/examples/pure/behave_as_example.rb +45 -0
  701. data/vendor/plugins/rspec/examples/pure/custom_expectation_matchers.rb +54 -0
  702. data/vendor/plugins/rspec/examples/pure/custom_formatter.rb +12 -0
  703. data/vendor/plugins/rspec/examples/pure/dynamic_spec.rb +9 -0
  704. data/vendor/plugins/rspec/examples/pure/file_accessor.rb +19 -0
  705. data/vendor/plugins/rspec/examples/pure/file_accessor_spec.rb +38 -0
  706. data/vendor/plugins/rspec/examples/pure/greeter_spec.rb +31 -0
  707. data/vendor/plugins/rspec/examples/pure/helper_method_example.rb +14 -0
  708. data/vendor/plugins/rspec/examples/pure/io_processor.rb +8 -0
  709. data/vendor/plugins/rspec/examples/pure/io_processor_spec.rb +21 -0
  710. data/vendor/plugins/rspec/examples/pure/legacy_spec.rb +11 -0
  711. data/vendor/plugins/rspec/examples/pure/mocking_example.rb +27 -0
  712. data/vendor/plugins/rspec/examples/pure/multi_threaded_behaviour_runner.rb +28 -0
  713. data/vendor/plugins/rspec/examples/pure/nested_classes_example.rb +36 -0
  714. data/vendor/plugins/rspec/examples/pure/partial_mock_example.rb +28 -0
  715. data/vendor/plugins/rspec/examples/pure/pending_example.rb +20 -0
  716. data/vendor/plugins/rspec/examples/pure/predicate_example.rb +27 -0
  717. data/vendor/plugins/rspec/examples/pure/priority.txt +1 -0
  718. data/vendor/plugins/rspec/examples/pure/shared_example_group_example.rb +81 -0
  719. data/vendor/plugins/rspec/examples/pure/shared_stack_examples.rb +38 -0
  720. data/vendor/plugins/rspec/examples/pure/spec_helper.rb +3 -0
  721. data/vendor/plugins/rspec/examples/pure/stack.rb +36 -0
  722. data/vendor/plugins/rspec/examples/pure/stack_spec.rb +63 -0
  723. data/vendor/plugins/rspec/examples/pure/stack_spec_with_nested_example_groups.rb +67 -0
  724. data/vendor/plugins/rspec/examples/pure/stubbing_example.rb +69 -0
  725. data/vendor/plugins/rspec/examples/stories/adder.rb +13 -0
  726. data/vendor/plugins/rspec/examples/stories/addition +34 -0
  727. data/vendor/plugins/rspec/examples/stories/addition.rb +9 -0
  728. data/vendor/plugins/rspec/examples/stories/calculator.rb +65 -0
  729. data/vendor/plugins/rspec/examples/stories/game-of-life/.loadpath +5 -0
  730. data/vendor/plugins/rspec/examples/stories/game-of-life/README.txt +21 -0
  731. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/everything.rb +6 -0
  732. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/examples/examples.rb +3 -0
  733. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/examples/game_behaviour.rb +35 -0
  734. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/examples/grid_behaviour.rb +66 -0
  735. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/CellsWithLessThanTwoNeighboursDie.story +21 -0
  736. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/CellsWithMoreThanThreeNeighboursDie.story +21 -0
  737. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/EmptySpacesWithThreeNeighboursCreateACell.story +42 -0
  738. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/ICanCreateACell.story +42 -0
  739. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/ICanKillACell.story +17 -0
  740. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/TheGridWraps.story +53 -0
  741. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/create_a_cell.rb +52 -0
  742. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/helper.rb +6 -0
  743. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/kill_a_cell.rb +26 -0
  744. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/steps.rb +5 -0
  745. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/stories.rb +3 -0
  746. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/stories.txt +22 -0
  747. data/vendor/plugins/rspec/examples/stories/game-of-life/life.rb +3 -0
  748. data/vendor/plugins/rspec/examples/stories/game-of-life/life/game.rb +23 -0
  749. data/vendor/plugins/rspec/examples/stories/game-of-life/life/grid.rb +43 -0
  750. data/vendor/plugins/rspec/examples/stories/helper.rb +9 -0
  751. data/vendor/plugins/rspec/examples/stories/steps/addition_steps.rb +18 -0
  752. data/vendor/plugins/rspec/failing_examples/diffing_spec.rb +36 -0
  753. data/vendor/plugins/rspec/failing_examples/failing_autogenerated_docstrings_example.rb +19 -0
  754. data/vendor/plugins/rspec/failing_examples/failure_in_setup.rb +10 -0
  755. data/vendor/plugins/rspec/failing_examples/failure_in_teardown.rb +10 -0
  756. data/vendor/plugins/rspec/failing_examples/mocking_example.rb +40 -0
  757. data/vendor/plugins/rspec/failing_examples/mocking_with_flexmock.rb +26 -0
  758. data/vendor/plugins/rspec/failing_examples/mocking_with_mocha.rb +25 -0
  759. data/vendor/plugins/rspec/failing_examples/mocking_with_rr.rb +27 -0
  760. data/vendor/plugins/rspec/failing_examples/partial_mock_example.rb +20 -0
  761. data/vendor/plugins/rspec/failing_examples/predicate_example.rb +29 -0
  762. data/vendor/plugins/rspec/failing_examples/raising_example.rb +47 -0
  763. data/vendor/plugins/rspec/failing_examples/spec_helper.rb +3 -0
  764. data/vendor/plugins/rspec/failing_examples/syntax_error_example.rb +7 -0
  765. data/vendor/plugins/rspec/failing_examples/team_spec.rb +44 -0
  766. data/vendor/plugins/rspec/failing_examples/timeout_behaviour.rb +7 -0
  767. data/vendor/plugins/rspec/init.rb +9 -0
  768. data/vendor/plugins/rspec/lib/autotest/discover.rb +3 -0
  769. data/vendor/plugins/rspec/lib/autotest/rspec.rb +94 -0
  770. data/vendor/plugins/rspec/lib/spec.rb +37 -0
  771. data/vendor/plugins/rspec/lib/spec/example.rb +12 -0
  772. data/vendor/plugins/rspec/lib/spec/example/configuration.rb +144 -0
  773. data/vendor/plugins/rspec/lib/spec/example/errors.rb +9 -0
  774. data/vendor/plugins/rspec/lib/spec/example/example_group.rb +16 -0
  775. data/vendor/plugins/rspec/lib/spec/example/example_group_factory.rb +62 -0
  776. data/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb +418 -0
  777. data/vendor/plugins/rspec/lib/spec/example/example_matcher.rb +42 -0
  778. data/vendor/plugins/rspec/lib/spec/example/example_methods.rb +102 -0
  779. data/vendor/plugins/rspec/lib/spec/example/module_reopening_fix.rb +21 -0
  780. data/vendor/plugins/rspec/lib/spec/example/pending.rb +18 -0
  781. data/vendor/plugins/rspec/lib/spec/example/shared_example_group.rb +58 -0
  782. data/vendor/plugins/rspec/lib/spec/expectations.rb +56 -0
  783. data/vendor/plugins/rspec/lib/spec/expectations/differs/default.rb +66 -0
  784. data/vendor/plugins/rspec/lib/spec/expectations/errors.rb +12 -0
  785. data/vendor/plugins/rspec/lib/spec/expectations/extensions.rb +2 -0
  786. data/vendor/plugins/rspec/lib/spec/expectations/extensions/object.rb +71 -0
  787. data/vendor/plugins/rspec/lib/spec/expectations/extensions/string_and_symbol.rb +17 -0
  788. data/vendor/plugins/rspec/lib/spec/expectations/handler.rb +52 -0
  789. data/vendor/plugins/rspec/lib/spec/extensions.rb +3 -0
  790. data/vendor/plugins/rspec/lib/spec/extensions/class.rb +24 -0
  791. data/vendor/plugins/rspec/lib/spec/extensions/main.rb +102 -0
  792. data/vendor/plugins/rspec/lib/spec/extensions/object.rb +10 -0
  793. data/vendor/plugins/rspec/lib/spec/interop/test.rb +10 -0
  794. data/vendor/plugins/rspec/lib/spec/interop/test/unit/autorunner.rb +6 -0
  795. data/vendor/plugins/rspec/lib/spec/interop/test/unit/testcase.rb +61 -0
  796. data/vendor/plugins/rspec/lib/spec/interop/test/unit/testresult.rb +6 -0
  797. data/vendor/plugins/rspec/lib/spec/interop/test/unit/testsuite_adapter.rb +34 -0
  798. data/vendor/plugins/rspec/lib/spec/interop/test/unit/ui/console/testrunner.rb +60 -0
  799. data/vendor/plugins/rspec/lib/spec/matchers.rb +156 -0
  800. data/vendor/plugins/rspec/lib/spec/matchers/be.rb +224 -0
  801. data/vendor/plugins/rspec/lib/spec/matchers/be_close.rb +37 -0
  802. data/vendor/plugins/rspec/lib/spec/matchers/change.rb +144 -0
  803. data/vendor/plugins/rspec/lib/spec/matchers/eql.rb +43 -0
  804. data/vendor/plugins/rspec/lib/spec/matchers/equal.rb +43 -0
  805. data/vendor/plugins/rspec/lib/spec/matchers/exist.rb +17 -0
  806. data/vendor/plugins/rspec/lib/spec/matchers/has.rb +44 -0
  807. data/vendor/plugins/rspec/lib/spec/matchers/have.rb +142 -0
  808. data/vendor/plugins/rspec/lib/spec/matchers/include.rb +70 -0
  809. data/vendor/plugins/rspec/lib/spec/matchers/match.rb +41 -0
  810. data/vendor/plugins/rspec/lib/spec/matchers/operator_matcher.rb +73 -0
  811. data/vendor/plugins/rspec/lib/spec/matchers/raise_error.rb +105 -0
  812. data/vendor/plugins/rspec/lib/spec/matchers/respond_to.rb +45 -0
  813. data/vendor/plugins/rspec/lib/spec/matchers/satisfy.rb +47 -0
  814. data/vendor/plugins/rspec/lib/spec/matchers/simple_matcher.rb +29 -0
  815. data/vendor/plugins/rspec/lib/spec/matchers/throw_symbol.rb +74 -0
  816. data/vendor/plugins/rspec/lib/spec/mocks.rb +211 -0
  817. data/vendor/plugins/rspec/lib/spec/mocks/argument_constraint_matchers.rb +27 -0
  818. data/vendor/plugins/rspec/lib/spec/mocks/argument_expectation.rb +183 -0
  819. data/vendor/plugins/rspec/lib/spec/mocks/error_generator.rb +84 -0
  820. data/vendor/plugins/rspec/lib/spec/mocks/errors.rb +10 -0
  821. data/vendor/plugins/rspec/lib/spec/mocks/extensions/object.rb +3 -0
  822. data/vendor/plugins/rspec/lib/spec/mocks/message_expectation.rb +267 -0
  823. data/vendor/plugins/rspec/lib/spec/mocks/methods.rb +39 -0
  824. data/vendor/plugins/rspec/lib/spec/mocks/mock.rb +50 -0
  825. data/vendor/plugins/rspec/lib/spec/mocks/order_group.rb +29 -0
  826. data/vendor/plugins/rspec/lib/spec/mocks/proxy.rb +170 -0
  827. data/vendor/plugins/rspec/lib/spec/mocks/space.rb +28 -0
  828. data/vendor/plugins/rspec/lib/spec/mocks/spec_methods.rb +38 -0
  829. data/vendor/plugins/rspec/lib/spec/rake/spectask.rb +235 -0
  830. data/vendor/plugins/rspec/lib/spec/rake/verify_rcov.rb +52 -0
  831. data/vendor/plugins/rspec/lib/spec/runner.rb +188 -0
  832. data/vendor/plugins/rspec/lib/spec/runner/backtrace_tweaker.rb +57 -0
  833. data/vendor/plugins/rspec/lib/spec/runner/class_and_arguments_parser.rb +16 -0
  834. data/vendor/plugins/rspec/lib/spec/runner/command_line.rb +28 -0
  835. data/vendor/plugins/rspec/lib/spec/runner/drb_command_line.rb +20 -0
  836. data/vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb +59 -0
  837. data/vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb +78 -0
  838. data/vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb +130 -0
  839. data/vendor/plugins/rspec/lib/spec/runner/formatter/failing_example_groups_formatter.rb +31 -0
  840. data/vendor/plugins/rspec/lib/spec/runner/formatter/failing_examples_formatter.rb +20 -0
  841. data/vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb +333 -0
  842. data/vendor/plugins/rspec/lib/spec/runner/formatter/profile_formatter.rb +47 -0
  843. data/vendor/plugins/rspec/lib/spec/runner/formatter/progress_bar_formatter.rb +30 -0
  844. data/vendor/plugins/rspec/lib/spec/runner/formatter/snippet_extractor.rb +52 -0
  845. data/vendor/plugins/rspec/lib/spec/runner/formatter/specdoc_formatter.rb +39 -0
  846. data/vendor/plugins/rspec/lib/spec/runner/formatter/story/html_formatter.rb +124 -0
  847. data/vendor/plugins/rspec/lib/spec/runner/formatter/story/plain_text_formatter.rb +126 -0
  848. data/vendor/plugins/rspec/lib/spec/runner/formatter/text_mate_formatter.rb +16 -0
  849. data/vendor/plugins/rspec/lib/spec/runner/heckle_runner.rb +72 -0
  850. data/vendor/plugins/rspec/lib/spec/runner/heckle_runner_unsupported.rb +10 -0
  851. data/vendor/plugins/rspec/lib/spec/runner/option_parser.rb +229 -0
  852. data/vendor/plugins/rspec/lib/spec/runner/options.rb +253 -0
  853. data/vendor/plugins/rspec/lib/spec/runner/reporter.rb +143 -0
  854. data/vendor/plugins/rspec/lib/spec/runner/spec_parser.rb +53 -0
  855. data/vendor/plugins/rspec/lib/spec/story.rb +10 -0
  856. data/vendor/plugins/rspec/lib/spec/story/extensions.rb +1 -0
  857. data/vendor/plugins/rspec/lib/spec/story/extensions/main.rb +86 -0
  858. data/vendor/plugins/rspec/lib/spec/story/given_scenario.rb +14 -0
  859. data/vendor/plugins/rspec/lib/spec/story/runner.rb +58 -0
  860. data/vendor/plugins/rspec/lib/spec/story/runner/plain_text_story_runner.rb +48 -0
  861. data/vendor/plugins/rspec/lib/spec/story/runner/scenario_collector.rb +18 -0
  862. data/vendor/plugins/rspec/lib/spec/story/runner/scenario_runner.rb +46 -0
  863. data/vendor/plugins/rspec/lib/spec/story/runner/story_mediator.rb +123 -0
  864. data/vendor/plugins/rspec/lib/spec/story/runner/story_parser.rb +227 -0
  865. data/vendor/plugins/rspec/lib/spec/story/runner/story_runner.rb +68 -0
  866. data/vendor/plugins/rspec/lib/spec/story/scenario.rb +14 -0
  867. data/vendor/plugins/rspec/lib/spec/story/step.rb +48 -0
  868. data/vendor/plugins/rspec/lib/spec/story/step_group.rb +89 -0
  869. data/vendor/plugins/rspec/lib/spec/story/step_mother.rb +37 -0
  870. data/vendor/plugins/rspec/lib/spec/story/story.rb +42 -0
  871. data/vendor/plugins/rspec/lib/spec/story/world.rb +124 -0
  872. data/vendor/plugins/rspec/lib/spec/translator.rb +114 -0
  873. data/vendor/plugins/rspec/lib/spec/version.rb +22 -0
  874. data/vendor/plugins/rspec/plugins/mock_frameworks/flexmock.rb +23 -0
  875. data/vendor/plugins/rspec/plugins/mock_frameworks/mocha.rb +19 -0
  876. data/vendor/plugins/rspec/plugins/mock_frameworks/rr.rb +21 -0
  877. data/vendor/plugins/rspec/plugins/mock_frameworks/rspec.rb +18 -0
  878. data/vendor/plugins/rspec/rake_tasks/examples.rake +7 -0
  879. data/vendor/plugins/rspec/rake_tasks/examples_with_rcov.rake +9 -0
  880. data/vendor/plugins/rspec/rake_tasks/failing_examples_with_html.rake +9 -0
  881. data/vendor/plugins/rspec/rake_tasks/verify_rcov.rake +7 -0
  882. data/vendor/plugins/rspec/spec.opts +6 -0
  883. data/vendor/plugins/rspec/spec/README.jruby +14 -0
  884. data/vendor/plugins/rspec/spec/autotest/discover_spec.rb +19 -0
  885. data/vendor/plugins/rspec/spec/autotest/rspec_spec.rb +264 -0
  886. data/vendor/plugins/rspec/spec/autotest_helper.rb +5 -0
  887. data/vendor/plugins/rspec/spec/rspec_suite.rb +7 -0
  888. data/vendor/plugins/rspec/spec/ruby_forker.rb +13 -0
  889. data/vendor/plugins/rspec/spec/spec/example/configuration_spec.rb +282 -0
  890. data/vendor/plugins/rspec/spec/spec/example/example_group_class_definition_spec.rb +48 -0
  891. data/vendor/plugins/rspec/spec/spec/example/example_group_factory_spec.rb +129 -0
  892. data/vendor/plugins/rspec/spec/spec/example/example_group_methods_spec.rb +480 -0
  893. data/vendor/plugins/rspec/spec/spec/example/example_group_spec.rb +711 -0
  894. data/vendor/plugins/rspec/spec/spec/example/example_matcher_spec.rb +96 -0
  895. data/vendor/plugins/rspec/spec/spec/example/example_methods_spec.rb +91 -0
  896. data/vendor/plugins/rspec/spec/spec/example/example_runner_spec.rb +194 -0
  897. data/vendor/plugins/rspec/spec/spec/example/example_spec.rb +53 -0
  898. data/vendor/plugins/rspec/spec/spec/example/nested_example_group_spec.rb +59 -0
  899. data/vendor/plugins/rspec/spec/spec/example/pending_module_spec.rb +31 -0
  900. data/vendor/plugins/rspec/spec/spec/example/predicate_matcher_spec.rb +21 -0
  901. data/vendor/plugins/rspec/spec/spec/example/shared_example_group_spec.rb +265 -0
  902. data/vendor/plugins/rspec/spec/spec/example/subclassing_example_group_spec.rb +25 -0
  903. data/vendor/plugins/rspec/spec/spec/expectations/differs/default_spec.rb +109 -0
  904. data/vendor/plugins/rspec/spec/spec/expectations/extensions/object_spec.rb +107 -0
  905. data/vendor/plugins/rspec/spec/spec/expectations/fail_with_spec.rb +71 -0
  906. data/vendor/plugins/rspec/spec/spec/extensions/main_spec.rb +76 -0
  907. data/vendor/plugins/rspec/spec/spec/interop/test/unit/test_unit_spec_helper.rb +14 -0
  908. data/vendor/plugins/rspec/spec/spec/interop/test/unit/testcase_spec.rb +10 -0
  909. data/vendor/plugins/rspec/spec/spec/interop/test/unit/testcase_spec_with_test_unit.rb +20 -0
  910. data/vendor/plugins/rspec/spec/spec/interop/test/unit/testsuite_adapter_spec.rb +9 -0
  911. data/vendor/plugins/rspec/spec/spec/interop/test/unit/testsuite_adapter_spec_with_test_unit.rb +34 -0
  912. data/vendor/plugins/rspec/spec/spec/matchers/be_close_spec.rb +39 -0
  913. data/vendor/plugins/rspec/spec/spec/matchers/be_spec.rb +224 -0
  914. data/vendor/plugins/rspec/spec/spec/matchers/change_spec.rb +319 -0
  915. data/vendor/plugins/rspec/spec/spec/matchers/description_generation_spec.rb +153 -0
  916. data/vendor/plugins/rspec/spec/spec/matchers/eql_spec.rb +28 -0
  917. data/vendor/plugins/rspec/spec/spec/matchers/equal_spec.rb +28 -0
  918. data/vendor/plugins/rspec/spec/spec/matchers/exist_spec.rb +57 -0
  919. data/vendor/plugins/rspec/spec/spec/matchers/handler_spec.rb +129 -0
  920. data/vendor/plugins/rspec/spec/spec/matchers/has_spec.rb +37 -0
  921. data/vendor/plugins/rspec/spec/spec/matchers/have_spec.rb +272 -0
  922. data/vendor/plugins/rspec/spec/spec/matchers/include_spec.rb +45 -0
  923. data/vendor/plugins/rspec/spec/spec/matchers/match_spec.rb +37 -0
  924. data/vendor/plugins/rspec/spec/spec/matchers/matcher_methods_spec.rb +78 -0
  925. data/vendor/plugins/rspec/spec/spec/matchers/mock_constraint_matchers_spec.rb +24 -0
  926. data/vendor/plugins/rspec/spec/spec/matchers/operator_matcher_spec.rb +158 -0
  927. data/vendor/plugins/rspec/spec/spec/matchers/raise_error_spec.rb +185 -0
  928. data/vendor/plugins/rspec/spec/spec/matchers/respond_to_spec.rb +54 -0
  929. data/vendor/plugins/rspec/spec/spec/matchers/satisfy_spec.rb +36 -0
  930. data/vendor/plugins/rspec/spec/spec/matchers/simple_matcher_spec.rb +31 -0
  931. data/vendor/plugins/rspec/spec/spec/matchers/throw_symbol_spec.rb +54 -0
  932. data/vendor/plugins/rspec/spec/spec/mocks/any_number_of_times_spec.rb +29 -0
  933. data/vendor/plugins/rspec/spec/spec/mocks/argument_expectation_spec.rb +23 -0
  934. data/vendor/plugins/rspec/spec/spec/mocks/at_least_spec.rb +97 -0
  935. data/vendor/plugins/rspec/spec/spec/mocks/at_most_spec.rb +93 -0
  936. data/vendor/plugins/rspec/spec/spec/mocks/bug_report_10260_spec.rb +8 -0
  937. data/vendor/plugins/rspec/spec/spec/mocks/bug_report_10263.rb +24 -0
  938. data/vendor/plugins/rspec/spec/spec/mocks/bug_report_11545_spec.rb +31 -0
  939. data/vendor/plugins/rspec/spec/spec/mocks/bug_report_15719_spec.rb +30 -0
  940. data/vendor/plugins/rspec/spec/spec/mocks/bug_report_7611_spec.rb +19 -0
  941. data/vendor/plugins/rspec/spec/spec/mocks/bug_report_7805_spec.rb +22 -0
  942. data/vendor/plugins/rspec/spec/spec/mocks/bug_report_8165_spec.rb +31 -0
  943. data/vendor/plugins/rspec/spec/spec/mocks/bug_report_8302_spec.rb +26 -0
  944. data/vendor/plugins/rspec/spec/spec/mocks/failing_mock_argument_constraints_spec.rb +115 -0
  945. data/vendor/plugins/rspec/spec/spec/mocks/mock_ordering_spec.rb +84 -0
  946. data/vendor/plugins/rspec/spec/spec/mocks/mock_space_spec.rb +54 -0
  947. data/vendor/plugins/rspec/spec/spec/mocks/mock_spec.rb +475 -0
  948. data/vendor/plugins/rspec/spec/spec/mocks/multiple_return_value_spec.rb +113 -0
  949. data/vendor/plugins/rspec/spec/spec/mocks/null_object_mock_spec.rb +40 -0
  950. data/vendor/plugins/rspec/spec/spec/mocks/once_counts_spec.rb +53 -0
  951. data/vendor/plugins/rspec/spec/spec/mocks/options_hash_spec.rb +45 -0
  952. data/vendor/plugins/rspec/spec/spec/mocks/partial_mock_spec.rb +106 -0
  953. data/vendor/plugins/rspec/spec/spec/mocks/partial_mock_using_mocks_directly_spec.rb +66 -0
  954. data/vendor/plugins/rspec/spec/spec/mocks/passing_mock_argument_constraints_spec.rb +154 -0
  955. data/vendor/plugins/rspec/spec/spec/mocks/precise_counts_spec.rb +52 -0
  956. data/vendor/plugins/rspec/spec/spec/mocks/record_messages_spec.rb +26 -0
  957. data/vendor/plugins/rspec/spec/spec/mocks/stub_spec.rb +181 -0
  958. data/vendor/plugins/rspec/spec/spec/mocks/twice_counts_spec.rb +67 -0
  959. data/vendor/plugins/rspec/spec/spec/package/bin_spec_spec.rb +14 -0
  960. data/vendor/plugins/rspec/spec/spec/runner/class_and_argument_parser_spec.rb +23 -0
  961. data/vendor/plugins/rspec/spec/spec/runner/command_line_spec.rb +146 -0
  962. data/vendor/plugins/rspec/spec/spec/runner/drb_command_line_spec.rb +92 -0
  963. data/vendor/plugins/rspec/spec/spec/runner/empty_file.txt +0 -0
  964. data/vendor/plugins/rspec/spec/spec/runner/examples.txt +2 -0
  965. data/vendor/plugins/rspec/spec/spec/runner/execution_context_spec.rb +31 -0
  966. data/vendor/plugins/rspec/spec/spec/runner/failed.txt +3 -0
  967. data/vendor/plugins/rspec/spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb +44 -0
  968. data/vendor/plugins/rspec/spec/spec/runner/formatter/failing_examples_formatter_spec.rb +33 -0
  969. data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.4.html +365 -0
  970. data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.5-jruby.html +387 -0
  971. data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.5.html +371 -0
  972. data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.6.html +365 -0
  973. data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb +66 -0
  974. data/vendor/plugins/rspec/spec/spec/runner/formatter/profile_formatter_spec.rb +65 -0
  975. data/vendor/plugins/rspec/spec/spec/runner/formatter/progress_bar_formatter_spec.rb +127 -0
  976. data/vendor/plugins/rspec/spec/spec/runner/formatter/snippet_extractor_spec.rb +18 -0
  977. data/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb +103 -0
  978. data/vendor/plugins/rspec/spec/spec/runner/formatter/specdoc_formatter_spec.rb +126 -0
  979. data/vendor/plugins/rspec/spec/spec/runner/formatter/story/html_formatter_spec.rb +56 -0
  980. data/vendor/plugins/rspec/spec/spec/runner/formatter/story/plain_text_formatter_spec.rb +330 -0
  981. data/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatted-1.8.4.html +365 -0
  982. data/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatted-1.8.6.html +365 -0
  983. data/vendor/plugins/rspec/spec/spec/runner/heckle_runner_spec.rb +78 -0
  984. data/vendor/plugins/rspec/spec/spec/runner/heckler_spec.rb +13 -0
  985. data/vendor/plugins/rspec/spec/spec/runner/noisy_backtrace_tweaker_spec.rb +45 -0
  986. data/vendor/plugins/rspec/spec/spec/runner/option_parser_spec.rb +377 -0
  987. data/vendor/plugins/rspec/spec/spec/runner/options_spec.rb +294 -0
  988. data/vendor/plugins/rspec/spec/spec/runner/output_one_time_fixture.rb +7 -0
  989. data/vendor/plugins/rspec/spec/spec/runner/output_one_time_fixture_runner.rb +8 -0
  990. data/vendor/plugins/rspec/spec/spec/runner/output_one_time_spec.rb +16 -0
  991. data/vendor/plugins/rspec/spec/spec/runner/quiet_backtrace_tweaker_spec.rb +56 -0
  992. data/vendor/plugins/rspec/spec/spec/runner/reporter_spec.rb +189 -0
  993. data/vendor/plugins/rspec/spec/spec/runner/spec.opts +2 -0
  994. data/vendor/plugins/rspec/spec/spec/runner/spec_parser_spec.rb +124 -0
  995. data/vendor/plugins/rspec/spec/spec/runner/spec_spaced.opts +2 -0
  996. data/vendor/plugins/rspec/spec/spec/runner_spec.rb +11 -0
  997. data/vendor/plugins/rspec/spec/spec/spec_classes.rb +126 -0
  998. data/vendor/plugins/rspec/spec/spec/story/builders.rb +46 -0
  999. data/vendor/plugins/rspec/spec/spec/story/extensions/main_spec.rb +161 -0
  1000. data/vendor/plugins/rspec/spec/spec/story/extensions_spec.rb +14 -0
  1001. data/vendor/plugins/rspec/spec/spec/story/given_scenario_spec.rb +27 -0
  1002. data/vendor/plugins/rspec/spec/spec/story/runner/plain_text_story_runner_spec.rb +92 -0
  1003. data/vendor/plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb +27 -0
  1004. data/vendor/plugins/rspec/spec/spec/story/runner/scenario_runner_spec.rb +142 -0
  1005. data/vendor/plugins/rspec/spec/spec/story/runner/story_mediator_spec.rb +133 -0
  1006. data/vendor/plugins/rspec/spec/spec/story/runner/story_parser_spec.rb +384 -0
  1007. data/vendor/plugins/rspec/spec/spec/story/runner/story_runner_spec.rb +256 -0
  1008. data/vendor/plugins/rspec/spec/spec/story/runner_spec.rb +106 -0
  1009. data/vendor/plugins/rspec/spec/spec/story/scenario_spec.rb +20 -0
  1010. data/vendor/plugins/rspec/spec/spec/story/step_group_spec.rb +157 -0
  1011. data/vendor/plugins/rspec/spec/spec/story/step_mother_spec.rb +72 -0
  1012. data/vendor/plugins/rspec/spec/spec/story/step_spec.rb +147 -0
  1013. data/vendor/plugins/rspec/spec/spec/story/story_helper.rb +2 -0
  1014. data/vendor/plugins/rspec/spec/spec/story/story_spec.rb +86 -0
  1015. data/vendor/plugins/rspec/spec/spec/story/world_spec.rb +416 -0
  1016. data/vendor/plugins/rspec/spec/spec/translator_spec.rb +265 -0
  1017. data/vendor/plugins/rspec/spec/spec_helper.rb +103 -0
  1018. data/vendor/plugins/rspec/stories/all.rb +5 -0
  1019. data/vendor/plugins/rspec/stories/example_groups/autogenerated_docstrings +45 -0
  1020. data/vendor/plugins/rspec/stories/example_groups/example_group_with_should_methods +17 -0
  1021. data/vendor/plugins/rspec/stories/example_groups/nested_groups +17 -0
  1022. data/vendor/plugins/rspec/stories/example_groups/output +25 -0
  1023. data/vendor/plugins/rspec/stories/example_groups/stories.rb +7 -0
  1024. data/vendor/plugins/rspec/stories/helper.rb +6 -0
  1025. data/vendor/plugins/rspec/stories/interop/examples_and_tests_together +30 -0
  1026. data/vendor/plugins/rspec/stories/interop/stories.rb +7 -0
  1027. data/vendor/plugins/rspec/stories/interop/test_case_with_should_methods +17 -0
  1028. data/vendor/plugins/rspec/stories/pending_stories/README +3 -0
  1029. data/vendor/plugins/rspec/stories/resources/helpers/cmdline.rb +9 -0
  1030. data/vendor/plugins/rspec/stories/resources/helpers/story_helper.rb +16 -0
  1031. data/vendor/plugins/rspec/stories/resources/matchers/smart_match.rb +37 -0
  1032. data/vendor/plugins/rspec/stories/resources/spec/example_group_with_should_methods.rb +12 -0
  1033. data/vendor/plugins/rspec/stories/resources/spec/simple_spec.rb +8 -0
  1034. data/vendor/plugins/rspec/stories/resources/steps/running_rspec.rb +50 -0
  1035. data/vendor/plugins/rspec/stories/resources/stories/failing_story.rb +15 -0
  1036. data/vendor/plugins/rspec/stories/resources/test/spec_and_test_together.rb +57 -0
  1037. data/vendor/plugins/rspec/stories/resources/test/test_case_with_should_methods.rb +30 -0
  1038. data/vendor/plugins/rspec/story_server/prototype/javascripts/builder.js +136 -0
  1039. data/vendor/plugins/rspec/story_server/prototype/javascripts/controls.js +972 -0
  1040. data/vendor/plugins/rspec/story_server/prototype/javascripts/dragdrop.js +976 -0
  1041. data/vendor/plugins/rspec/story_server/prototype/javascripts/effects.js +1117 -0
  1042. data/vendor/plugins/rspec/story_server/prototype/javascripts/prototype.js +4140 -0
  1043. data/vendor/plugins/rspec/story_server/prototype/javascripts/rspec.js +149 -0
  1044. data/vendor/plugins/rspec/story_server/prototype/javascripts/scriptaculous.js +58 -0
  1045. data/vendor/plugins/rspec/story_server/prototype/javascripts/slider.js +276 -0
  1046. data/vendor/plugins/rspec/story_server/prototype/javascripts/sound.js +55 -0
  1047. data/vendor/plugins/rspec/story_server/prototype/javascripts/unittest.js +568 -0
  1048. data/vendor/plugins/rspec/story_server/prototype/lib/server.rb +24 -0
  1049. data/vendor/plugins/rspec/story_server/prototype/stories.html +176 -0
  1050. data/vendor/plugins/rspec/story_server/prototype/stylesheets/rspec.css +136 -0
  1051. data/vendor/plugins/rspec/story_server/prototype/stylesheets/test.css +90 -0
  1052. data/vendor/plugins/rspec_on_rails/MIT-LICENSE +31 -0
  1053. data/vendor/plugins/rspec_on_rails/README +3 -0
  1054. data/vendor/plugins/rspec_on_rails/Rakefile +9 -0
  1055. data/vendor/plugins/rspec_on_rails/generators/helpers/rails_identifier.rb +16 -0
  1056. data/vendor/plugins/rspec_on_rails/generators/rspec/CHANGES +1 -0
  1057. data/vendor/plugins/rspec_on_rails/generators/rspec/rspec_generator.rb +35 -0
  1058. data/vendor/plugins/rspec_on_rails/generators/rspec/templates/all_stories.rb +4 -0
  1059. data/vendor/plugins/rspec_on_rails/generators/rspec/templates/previous_failures.txt +0 -0
  1060. data/vendor/plugins/rspec_on_rails/generators/rspec/templates/rcov.opts +2 -0
  1061. data/vendor/plugins/rspec_on_rails/generators/rspec/templates/script/spec +4 -0
  1062. data/vendor/plugins/rspec_on_rails/generators/rspec/templates/script/spec_server +102 -0
  1063. data/vendor/plugins/rspec_on_rails/generators/rspec/templates/spec.opts +7 -0
  1064. data/vendor/plugins/rspec_on_rails/generators/rspec/templates/spec_helper.rb +39 -0
  1065. data/vendor/plugins/rspec_on_rails/generators/rspec/templates/stories_helper.rb +3 -0
  1066. data/vendor/plugins/rspec_on_rails/generators/rspec_controller/USAGE +33 -0
  1067. data/vendor/plugins/rspec_on_rails/generators/rspec_controller/rspec_controller_generator.rb +50 -0
  1068. data/vendor/plugins/rspec_on_rails/generators/rspec_controller/templates/controller_spec.rb +25 -0
  1069. data/vendor/plugins/rspec_on_rails/generators/rspec_controller/templates/helper_spec.rb +11 -0
  1070. data/vendor/plugins/rspec_on_rails/generators/rspec_controller/templates/view_spec.rb +12 -0
  1071. data/vendor/plugins/rspec_on_rails/generators/rspec_model/USAGE +18 -0
  1072. data/vendor/plugins/rspec_on_rails/generators/rspec_model/rspec_model_generator.rb +30 -0
  1073. data/vendor/plugins/rspec_on_rails/generators/rspec_model/templates/model_spec.rb +11 -0
  1074. data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/rspec_scaffold_generator.rb +169 -0
  1075. data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/controller_spec.rb +313 -0
  1076. data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/edit_erb_spec.rb +25 -0
  1077. data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/helper_spec.rb +11 -0
  1078. data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/index_erb_spec.rb +22 -0
  1079. data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/new_erb_spec.rb +26 -0
  1080. data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/routing_spec.rb +61 -0
  1081. data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/show_erb_spec.rb +22 -0
  1082. data/vendor/plugins/rspec_on_rails/init.rb +9 -0
  1083. data/vendor/plugins/rspec_on_rails/lib/autotest/rails_rspec.rb +81 -0
  1084. data/vendor/plugins/rspec_on_rails/lib/spec/rails.rb +51 -0
  1085. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example.rb +47 -0
  1086. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/assigns_hash_proxy.rb +42 -0
  1087. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/controller_example_group.rb +245 -0
  1088. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/functional_example_group.rb +66 -0
  1089. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/helper_example_group.rb +82 -0
  1090. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/ivar_proxy.rb +62 -0
  1091. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/model_example_group.rb +14 -0
  1092. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/rails_example_group.rb +60 -0
  1093. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/render_observer.rb +90 -0
  1094. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/view_example_group.rb +172 -0
  1095. data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions.rb +12 -0
  1096. data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_controller/base.rb +14 -0
  1097. data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_controller/rescue.rb +21 -0
  1098. data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_controller/test_response.rb +11 -0
  1099. data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_view/base.rb +27 -0
  1100. data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/active_record/base.rb +30 -0
  1101. data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/object.rb +5 -0
  1102. data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/spec/example/configuration.rb +66 -0
  1103. data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/spec/matchers/have.rb +21 -0
  1104. data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers.rb +29 -0
  1105. data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/assert_select.rb +130 -0
  1106. data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/have_text.rb +55 -0
  1107. data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/redirect_to.rb +113 -0
  1108. data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/render_template.rb +66 -0
  1109. data/vendor/plugins/rspec_on_rails/lib/spec/rails/story_adapter.rb +71 -0
  1110. data/vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb +23 -0
  1111. data/vendor/plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb +39 -0
  1112. data/vendor/plugins/rspec_on_rails/spec/rails/autotest/rails_rspec_spec.rb +8 -0
  1113. data/vendor/plugins/rspec_on_rails/spec/rails/example/assigns_hash_proxy_spec.rb +55 -0
  1114. data/vendor/plugins/rspec_on_rails/spec/rails/example/configuration_spec.rb +83 -0
  1115. data/vendor/plugins/rspec_on_rails/spec/rails/example/controller_isolation_spec.rb +43 -0
  1116. data/vendor/plugins/rspec_on_rails/spec/rails/example/controller_spec_spec.rb +174 -0
  1117. data/vendor/plugins/rspec_on_rails/spec/rails/example/example_group_factory_spec.rb +112 -0
  1118. data/vendor/plugins/rspec_on_rails/spec/rails/example/helper_spec_spec.rb +118 -0
  1119. data/vendor/plugins/rspec_on_rails/spec/rails/example/ivar_proxy_spec.rb +64 -0
  1120. data/vendor/plugins/rspec_on_rails/spec/rails/example/model_spec_spec.rb +18 -0
  1121. data/vendor/plugins/rspec_on_rails/spec/rails/example/shared_behaviour_spec.rb +16 -0
  1122. data/vendor/plugins/rspec_on_rails/spec/rails/example/test_unit_assertion_accessibility_spec.rb +33 -0
  1123. data/vendor/plugins/rspec_on_rails/spec/rails/example/view_spec_spec.rb +249 -0
  1124. data/vendor/plugins/rspec_on_rails/spec/rails/extensions/action_controller_rescue_action_spec.rb +54 -0
  1125. data/vendor/plugins/rspec_on_rails/spec/rails/extensions/action_view_base_spec.rb +37 -0
  1126. data/vendor/plugins/rspec_on_rails/spec/rails/extensions/active_record_spec.rb +14 -0
  1127. data/vendor/plugins/rspec_on_rails/spec/rails/matchers/assert_select_spec.rb +783 -0
  1128. data/vendor/plugins/rspec_on_rails/spec/rails/matchers/description_generation_spec.rb +37 -0
  1129. data/vendor/plugins/rspec_on_rails/spec/rails/matchers/errors_on_spec.rb +13 -0
  1130. data/vendor/plugins/rspec_on_rails/spec/rails/matchers/have_text_spec.rb +62 -0
  1131. data/vendor/plugins/rspec_on_rails/spec/rails/matchers/redirect_to_spec.rb +203 -0
  1132. data/vendor/plugins/rspec_on_rails/spec/rails/matchers/render_spec.rb +86 -0
  1133. data/vendor/plugins/rspec_on_rails/spec/rails/mocks/mock_model_spec.rb +65 -0
  1134. data/vendor/plugins/rspec_on_rails/spec/rails/sample_spec.rb +7 -0
  1135. data/vendor/plugins/rspec_on_rails/spec/rails/spec_server_spec.rb +89 -0
  1136. data/vendor/plugins/rspec_on_rails/spec/rails/spec_spec.rb +11 -0
  1137. data/vendor/plugins/rspec_on_rails/spec/rails_suite.rb +7 -0
  1138. data/vendor/plugins/rspec_on_rails/spec/spec_helper.rb +46 -0
  1139. data/vendor/plugins/rspec_on_rails/spec_resources/controllers/action_view_base_spec_controller.rb +2 -0
  1140. data/vendor/plugins/rspec_on_rails/spec_resources/controllers/controller_spec_controller.rb +48 -0
  1141. data/vendor/plugins/rspec_on_rails/spec_resources/controllers/redirect_spec_controller.rb +59 -0
  1142. data/vendor/plugins/rspec_on_rails/spec_resources/controllers/render_spec_controller.rb +22 -0
  1143. data/vendor/plugins/rspec_on_rails/spec_resources/controllers/rjs_spec_controller.rb +58 -0
  1144. data/vendor/plugins/rspec_on_rails/spec_resources/helpers/explicit_helper.rb +10 -0
  1145. data/vendor/plugins/rspec_on_rails/spec_resources/helpers/more_explicit_helper.rb +5 -0
  1146. data/vendor/plugins/rspec_on_rails/spec_resources/helpers/plugin_application_helper.rb +6 -0
  1147. data/vendor/plugins/rspec_on_rails/spec_resources/helpers/view_spec_helper.rb +13 -0
  1148. data/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/_partial.rhtml +0 -0
  1149. data/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_setting_flash_after_session_reset.rhtml +1 -0
  1150. data/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_setting_flash_before_session_reset.rhtml +1 -0
  1151. data/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_setting_the_assigns_hash.rhtml +0 -0
  1152. data/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_with_errors_in_template.rhtml +1 -0
  1153. data/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_with_template.rhtml +1 -0
  1154. data/vendor/plugins/rspec_on_rails/spec_resources/views/render_spec/_a_partial.rhtml +0 -0
  1155. data/vendor/plugins/rspec_on_rails/spec_resources/views/render_spec/some_action.js.rjs +1 -0
  1156. data/vendor/plugins/rspec_on_rails/spec_resources/views/render_spec/some_action.rhtml +0 -0
  1157. data/vendor/plugins/rspec_on_rails/spec_resources/views/render_spec/some_action.rjs +1 -0
  1158. data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/_replacement_partial.rhtml +1 -0
  1159. data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/hide_div.rjs +1 -0
  1160. data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/hide_page_element.rjs +1 -0
  1161. data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/insert_html.rjs +1 -0
  1162. data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/replace.rjs +1 -0
  1163. data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/replace_html.rjs +1 -0
  1164. data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/replace_html_with_partial.rjs +1 -0
  1165. data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/visual_effect.rjs +1 -0
  1166. data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/visual_toggle_effect.rjs +1 -0
  1167. data/vendor/plugins/rspec_on_rails/spec_resources/views/tag_spec/no_tags.rhtml +1 -0
  1168. data/vendor/plugins/rspec_on_rails/spec_resources/views/tag_spec/single_div_with_no_attributes.rhtml +1 -0
  1169. data/vendor/plugins/rspec_on_rails/spec_resources/views/tag_spec/single_div_with_one_attribute.rhtml +1 -0
  1170. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/_partial.rhtml +2 -0
  1171. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/_partial_used_twice.rhtml +0 -0
  1172. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/_partial_with_local_variable.rhtml +1 -0
  1173. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/_partial_with_sub_partial.rhtml +1 -0
  1174. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/_spacer.rhtml +1 -0
  1175. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/accessor.rhtml +3 -0
  1176. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/entry_form.rhtml +2 -0
  1177. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/explicit_helper.rhtml +2 -0
  1178. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/foo/show.rhtml +1 -0
  1179. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/implicit_helper.rhtml +2 -0
  1180. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/multiple_helpers.rhtml +3 -0
  1181. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/template_with_partial.rhtml +5 -0
  1182. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/template_with_partial_using_collection.rhtml +3 -0
  1183. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/template_with_partial_with_array.rhtml +1 -0
  1184. data/vendor/plugins/rspec_on_rails/stories/all.rb +6 -0
  1185. data/vendor/plugins/rspec_on_rails/stories/helper.rb +5 -0
  1186. data/vendor/plugins/rspec_on_rails/stories/steps/people.rb +8 -0
  1187. data/vendor/plugins/rspec_on_rails/stories/transactions_should_rollback +15 -0
  1188. data/vendor/plugins/rspec_on_rails/stories/transactions_should_rollback.rb +25 -0
  1189. data/vendor/plugins/rspec_on_rails/tasks/rspec.rake +135 -0
  1190. data/vendor/plugins/tag_sidebar/views/content.rhtml +1 -1
  1191. metadata +1661 -906
  1192. data/CHANGES-4.1 +0 -83
  1193. data/TODO-4.2 +0 -14
  1194. data/app/models/content_state/base.rb +0 -111
  1195. data/app/models/content_state/draft.rb +0 -32
  1196. data/app/models/content_state/factory.rb +0 -13
  1197. data/app/models/content_state/ham.rb +0 -35
  1198. data/app/models/content_state/just_marked_as_ham.rb +0 -22
  1199. data/app/models/content_state/just_marked_as_spam.rb +0 -27
  1200. data/app/models/content_state/just_presumed_ham.rb +0 -38
  1201. data/app/models/content_state/just_published.rb +0 -47
  1202. data/app/models/content_state/just_withdrawn.rb +0 -11
  1203. data/app/models/content_state/new.rb +0 -37
  1204. data/app/models/content_state/presumed_ham.rb +0 -38
  1205. data/app/models/content_state/presumed_spam.rb +0 -35
  1206. data/app/models/content_state/publication_pending.rb +0 -41
  1207. data/app/models/content_state/published.rb +0 -35
  1208. data/app/models/content_state/spam.rb +0 -27
  1209. data/app/models/content_state/unclassified.rb +0 -38
  1210. data/app/models/content_state/withdrawn.rb +0 -27
  1211. data/app/views/accounts/login.rhtml +0 -28
  1212. data/app/views/accounts/logout.rhtml +0 -12
  1213. data/app/views/accounts/signup.rhtml +0 -26
  1214. data/app/views/admin/categories/_categories.rhtml +0 -18
  1215. data/app/views/admin/categories/list.rhtml +0 -18
  1216. data/app/views/admin/categories/show.rhtml +0 -19
  1217. data/app/views/admin/comments/_form.rhtml +0 -19
  1218. data/app/views/admin/comments/list.rhtml +0 -33
  1219. data/app/views/admin/comments/new.rhtml +0 -17
  1220. data/app/views/admin/content/_articles.rhtml +0 -22
  1221. data/app/views/admin/content/_form.rhtml +0 -77
  1222. data/app/views/admin/content/edit.rhtml +0 -10
  1223. data/app/views/admin/content/list.rhtml +0 -20
  1224. data/app/views/admin/content/new.rhtml +0 -8
  1225. data/app/views/admin/content/preview.rhtml +0 -10
  1226. data/app/views/admin/content/show.rhtml +0 -26
  1227. data/app/views/admin/feedback/_item.rhtml +0 -19
  1228. data/app/views/admin/feedback/list.rhtml +0 -51
  1229. data/app/views/admin/general/index.rhtml +0 -281
  1230. data/app/views/admin/pages/_form.rhtml +0 -37
  1231. data/app/views/admin/pages/_pages.rhtml +0 -19
  1232. data/app/views/admin/pages/list.rhtml +0 -14
  1233. data/app/views/admin/pages/new.rhtml +0 -8
  1234. data/app/views/admin/pages/show.rhtml +0 -14
  1235. data/app/views/admin/resources/_resources.rhtml +0 -40
  1236. data/app/views/admin/resources/list.rhtml +0 -12
  1237. data/app/views/admin/resources/new.rhtml +0 -16
  1238. data/app/views/admin/shared/_edit.rhtml +0 -17
  1239. data/app/views/admin/sidebar/index.rhtml +0 -38
  1240. data/app/views/admin/textfilters/_form.rhtml +0 -53
  1241. data/app/views/admin/textfilters/_macros.rhtml +0 -16
  1242. data/app/views/admin/textfilters/_textfilters.rhtml +0 -20
  1243. data/app/views/admin/textfilters/edit.rhtml +0 -14
  1244. data/app/views/admin/textfilters/list.rhtml +0 -17
  1245. data/app/views/admin/textfilters/macro_help.rhtml +0 -3
  1246. data/app/views/admin/textfilters/new.rhtml +0 -17
  1247. data/app/views/admin/themes/index.rhtml +0 -18
  1248. data/app/views/admin/users/_form.rhtml +0 -48
  1249. data/app/views/admin/users/_user.rhtml +0 -9
  1250. data/app/views/admin/users/edit.rhtml +0 -18
  1251. data/app/views/admin/users/list.rhtml +0 -9
  1252. data/app/views/admin/users/new.rhtml +0 -17
  1253. data/app/views/admin/users/show.rhtml +0 -24
  1254. data/app/views/articles/_comment_box.rhtml +0 -44
  1255. data/app/views/articles/index.rhtml +0 -11
  1256. data/app/views/articles/read.rhtml +0 -70
  1257. data/app/views/layouts/administration.rhtml +0 -73
  1258. data/app/views/notification_mailer/article.rhtml +0 -6
  1259. data/app/views/notification_mailer/comment.rhtml +0 -11
  1260. data/app/views/shared/_search.rhtml +0 -10
  1261. data/app/views/xml/atom10_feed.rxml +0 -18
  1262. data/app/views/xml/itunes_feed.rxml +0 -29
  1263. data/app/views/xml/rss20_feed.rxml +0 -18
  1264. data/lib/sanitize.rb +0 -107
  1265. data/public/images/admin/dot-vertical.gif +0 -0
  1266. data/public/images/admin/h-tile.gif +0 -0
  1267. data/public/images/admin/hdr-tile.gif +0 -0
  1268. data/public/images/admin/toggle.gif +0 -0
  1269. data/public/images/bg.jpg +0 -0
  1270. data/public/images/bgcolor.jpg +0 -0
  1271. data/public/images/body_bg.png +0 -0
  1272. data/public/images/branding_bg.png +0 -0
  1273. data/public/images/branding_logo.png +0 -0
  1274. data/public/images/cancel.png +0 -0
  1275. data/public/images/checked.png +0 -0
  1276. data/public/images/content_bg.png +0 -0
  1277. data/public/images/delete.png +0 -0
  1278. data/public/images/edit.png +0 -0
  1279. data/public/images/footer.jpg +0 -0
  1280. data/public/images/footer.png +0 -0
  1281. data/public/images/global_bg.png +0 -0
  1282. data/public/images/global_logo.png +0 -0
  1283. data/public/images/not-checked copy.gif +0 -0
  1284. data/public/images/not-checked.gif +0 -0
  1285. data/public/images/section_bg.png +0 -0
  1286. data/public/images/sections_bg.png +0 -0
  1287. data/public/images/sections_hilite.png +0 -0
  1288. data/public/images/sections_hover.png +0 -0
  1289. data/public/images/show.png +0 -0
  1290. data/public/images/sitealizer/bar.gif +0 -0
  1291. data/public/images/sitealizer/uv.png +0 -0
  1292. data/public/images/sitealizer/vh.png +0 -0
  1293. data/public/images/spot-header.gif +0 -0
  1294. data/public/images/spot-title.gif +0 -0
  1295. data/public/images/x-ed.gif +0 -0
  1296. data/public/javascripts/tiny_mce/blank.htm +0 -9
  1297. data/public/javascripts/tiny_mce/themes/advanced/css/editor_content.css +0 -58
  1298. data/public/javascripts/tiny_mce/themes/advanced/css/editor_popup.css +0 -331
  1299. data/public/javascripts/tiny_mce/themes/advanced/css/editor_ui.css +0 -97
  1300. data/public/javascripts/tiny_mce/themes/advanced/docs/en/about.htm +0 -31
  1301. data/public/javascripts/tiny_mce/themes/advanced/docs/en/common_buttons.htm +0 -162
  1302. data/public/javascripts/tiny_mce/themes/advanced/docs/en/create_accessible_content.htm +0 -45
  1303. data/public/javascripts/tiny_mce/themes/advanced/docs/en/images/insert_anchor_window.gif +0 -0
  1304. data/public/javascripts/tiny_mce/themes/advanced/docs/en/images/insert_image_window.gif +0 -0
  1305. data/public/javascripts/tiny_mce/themes/advanced/docs/en/images/insert_link_window.gif +0 -0
  1306. data/public/javascripts/tiny_mce/themes/advanced/docs/en/images/insert_table_window.gif +0 -0
  1307. data/public/javascripts/tiny_mce/themes/advanced/docs/en/index.htm +0 -27
  1308. data/public/javascripts/tiny_mce/themes/advanced/docs/en/insert_anchor_button.htm +0 -32
  1309. data/public/javascripts/tiny_mce/themes/advanced/docs/en/insert_image_button.htm +0 -65
  1310. data/public/javascripts/tiny_mce/themes/advanced/docs/en/insert_link_button.htm +0 -33
  1311. data/public/javascripts/tiny_mce/themes/advanced/docs/en/insert_table_button.htm +0 -71
  1312. data/public/javascripts/tiny_mce/themes/advanced/docs/en/style.css +0 -28
  1313. data/public/javascripts/tiny_mce/themes/advanced/images/anchor.gif +0 -0
  1314. data/public/javascripts/tiny_mce/themes/advanced/images/backcolor.gif +0 -0
  1315. data/public/javascripts/tiny_mce/themes/advanced/images/bold.gif +0 -0
  1316. data/public/javascripts/tiny_mce/themes/advanced/images/bold_de_se.gif +0 -0
  1317. data/public/javascripts/tiny_mce/themes/advanced/images/bold_es.gif +0 -0
  1318. data/public/javascripts/tiny_mce/themes/advanced/images/bold_fr.gif +0 -0
  1319. data/public/javascripts/tiny_mce/themes/advanced/images/bold_ru.gif +0 -0
  1320. data/public/javascripts/tiny_mce/themes/advanced/images/bold_tw.gif +0 -0
  1321. data/public/javascripts/tiny_mce/themes/advanced/images/browse.gif +0 -0
  1322. data/public/javascripts/tiny_mce/themes/advanced/images/bullist.gif +0 -0
  1323. data/public/javascripts/tiny_mce/themes/advanced/images/button_menu.gif +0 -0
  1324. data/public/javascripts/tiny_mce/themes/advanced/images/buttons.gif +0 -0
  1325. data/public/javascripts/tiny_mce/themes/advanced/images/cancel_button_bg.gif +0 -0
  1326. data/public/javascripts/tiny_mce/themes/advanced/images/charmap.gif +0 -0
  1327. data/public/javascripts/tiny_mce/themes/advanced/images/cleanup.gif +0 -0
  1328. data/public/javascripts/tiny_mce/themes/advanced/images/close.gif +0 -0
  1329. data/public/javascripts/tiny_mce/themes/advanced/images/code.gif +0 -0
  1330. data/public/javascripts/tiny_mce/themes/advanced/images/color.gif +0 -0
  1331. data/public/javascripts/tiny_mce/themes/advanced/images/copy.gif +0 -0
  1332. data/public/javascripts/tiny_mce/themes/advanced/images/custom_1.gif +0 -0
  1333. data/public/javascripts/tiny_mce/themes/advanced/images/cut.gif +0 -0
  1334. data/public/javascripts/tiny_mce/themes/advanced/images/forecolor.gif +0 -0
  1335. data/public/javascripts/tiny_mce/themes/advanced/images/help.gif +0 -0
  1336. data/public/javascripts/tiny_mce/themes/advanced/images/hr.gif +0 -0
  1337. data/public/javascripts/tiny_mce/themes/advanced/images/image.gif +0 -0
  1338. data/public/javascripts/tiny_mce/themes/advanced/images/indent.gif +0 -0
  1339. data/public/javascripts/tiny_mce/themes/advanced/images/insert_button_bg.gif +0 -0
  1340. data/public/javascripts/tiny_mce/themes/advanced/images/italic.gif +0 -0
  1341. data/public/javascripts/tiny_mce/themes/advanced/images/italic_de_se.gif +0 -0
  1342. data/public/javascripts/tiny_mce/themes/advanced/images/italic_es.gif +0 -0
  1343. data/public/javascripts/tiny_mce/themes/advanced/images/italic_ru.gif +0 -0
  1344. data/public/javascripts/tiny_mce/themes/advanced/images/italic_tw.gif +0 -0
  1345. data/public/javascripts/tiny_mce/themes/advanced/images/justifycenter.gif +0 -0
  1346. data/public/javascripts/tiny_mce/themes/advanced/images/justifyfull.gif +0 -0
  1347. data/public/javascripts/tiny_mce/themes/advanced/images/justifyleft.gif +0 -0
  1348. data/public/javascripts/tiny_mce/themes/advanced/images/justifyright.gif +0 -0
  1349. data/public/javascripts/tiny_mce/themes/advanced/images/link.gif +0 -0
  1350. data/public/javascripts/tiny_mce/themes/advanced/images/menu_check.gif +0 -0
  1351. data/public/javascripts/tiny_mce/themes/advanced/images/newdocument.gif +0 -0
  1352. data/public/javascripts/tiny_mce/themes/advanced/images/numlist.gif +0 -0
  1353. data/public/javascripts/tiny_mce/themes/advanced/images/opacity.png +0 -0
  1354. data/public/javascripts/tiny_mce/themes/advanced/images/outdent.gif +0 -0
  1355. data/public/javascripts/tiny_mce/themes/advanced/images/paste.gif +0 -0
  1356. data/public/javascripts/tiny_mce/themes/advanced/images/redo.gif +0 -0
  1357. data/public/javascripts/tiny_mce/themes/advanced/images/removeformat.gif +0 -0
  1358. data/public/javascripts/tiny_mce/themes/advanced/images/separator.gif +0 -0
  1359. data/public/javascripts/tiny_mce/themes/advanced/images/statusbar_resize.gif +0 -0
  1360. data/public/javascripts/tiny_mce/themes/advanced/images/strikethrough.gif +0 -0
  1361. data/public/javascripts/tiny_mce/themes/advanced/images/sub.gif +0 -0
  1362. data/public/javascripts/tiny_mce/themes/advanced/images/sup.gif +0 -0
  1363. data/public/javascripts/tiny_mce/themes/advanced/images/underline.gif +0 -0
  1364. data/public/javascripts/tiny_mce/themes/advanced/images/underline_es.gif +0 -0
  1365. data/public/javascripts/tiny_mce/themes/advanced/images/underline_fr.gif +0 -0
  1366. data/public/javascripts/tiny_mce/themes/advanced/images/underline_ru.gif +0 -0
  1367. data/public/javascripts/tiny_mce/themes/advanced/images/underline_tw.gif +0 -0
  1368. data/public/javascripts/tiny_mce/themes/advanced/images/undo.gif +0 -0
  1369. data/public/javascripts/tiny_mce/themes/advanced/images/unlink.gif +0 -0
  1370. data/public/javascripts/tiny_mce/themes/advanced/images/visualaid.gif +0 -0
  1371. data/public/javascripts/tiny_mce/themes/advanced/images/xp/tab_bg.gif +0 -0
  1372. data/public/javascripts/tiny_mce/themes/advanced/images/xp/tab_end.gif +0 -0
  1373. data/public/javascripts/tiny_mce/themes/advanced/images/xp/tab_sel_bg.gif +0 -0
  1374. data/public/javascripts/tiny_mce/themes/advanced/images/xp/tab_sel_end.gif +0 -0
  1375. data/public/javascripts/tiny_mce/themes/advanced/images/xp/tabs_bg.gif +0 -0
  1376. data/public/javascripts/tiny_mce/themes/advanced/jscripts/about.js +0 -75
  1377. data/public/javascripts/tiny_mce/themes/advanced/jscripts/anchor.js +0 -74
  1378. data/public/javascripts/tiny_mce/themes/advanced/jscripts/charmap.js +0 -326
  1379. data/public/javascripts/tiny_mce/themes/advanced/jscripts/color_picker.js +0 -108
  1380. data/public/javascripts/tiny_mce/themes/advanced/jscripts/image.js +0 -81
  1381. data/public/javascripts/tiny_mce/themes/advanced/jscripts/link.js +0 -70
  1382. data/public/javascripts/tiny_mce/themes/advanced/jscripts/source_editor.js +0 -60
  1383. data/spec/fixtures/whiteboards.yml +0 -13
  1384. data/spec/models/audioscrobbler_spec.rb +0 -134
  1385. data/spec/models/content_state_spec.rb +0 -1010
  1386. data/spec/models/delegate_to_content_state_spec.rb +0 -126
  1387. data/spec/models/delicious_spec.rb +0 -101
  1388. data/spec/models/flickr_spec.rb +0 -128
  1389. data/spec/models/page_cache_spec.rb +0 -35
  1390. data/test/mocks/themes/azure/about.markdown +0 -5
  1391. data/test/mocks/themes/azure/layouts/default.rhtml +0 -50
  1392. data/test/mocks/themes/azure/preview.png +0 -0
  1393. data/test/mocks/themes/azure/views/theme/static_view_test.rhtml +0 -1
  1394. data/test/unit/audioscrobbler_test.rb +0 -132
  1395. data/test/unit/content_state/factory_test.rb +0 -88
  1396. data/test/unit/delicious_test.rb +0 -96
  1397. data/test/unit/flickr_test.rb +0 -134
  1398. data/test/unit/fortythree_test.rb +0 -66
  1399. data/test/unit/magnolia_test.rb +0 -87
  1400. data/test/unit/page_cache_test.rb +0 -34
  1401. data/themes/azure/about.markdown +0 -5
  1402. data/themes/azure/images/bg-tile.gif +0 -0
  1403. data/themes/azure/images/bracket.gif +0 -0
  1404. data/themes/azure/images/bullet.gif +0 -0
  1405. data/themes/azure/images/hdr.gif +0 -0
  1406. data/themes/azure/images/q-close.gif +0 -0
  1407. data/themes/azure/images/q-open.gif +0 -0
  1408. data/themes/azure/images/sbar-tile.gif +0 -0
  1409. data/themes/azure/images/xlink.gif +0 -0
  1410. data/themes/azure/layouts/default.rhtml +0 -50
  1411. data/themes/azure/preview.png +0 -0
  1412. data/themes/azure/stylesheets/azure.css +0 -443
  1413. data/themes/azure/stylesheets/print.css +0 -30
  1414. data/themes/azure/views/theme/static_view_test.rhtml +0 -1
  1415. data/themes/scribbish/layouts/default.rhtml +0 -42
  1416. data/themes/scribbish/views/articles/_comment_form.rhtml +0 -52
  1417. data/themes/scribbish/views/articles/_search.rhtml +0 -16
  1418. data/themes/scribbish/views/articles/index.rhtml +0 -5
  1419. data/vendor/plugins/aimpresence_sidebar/Rakefile +0 -22
  1420. data/vendor/plugins/aimpresence_sidebar/init.rb +0 -4
  1421. data/vendor/plugins/aimpresence_sidebar/lib/aimpresence_sidebar.rb +0 -21
  1422. data/vendor/plugins/aimpresence_sidebar/test/aimpresence_sidebar_test.rb +0 -33
  1423. data/vendor/plugins/aimpresence_sidebar/views/content.rhtml +0 -4
  1424. data/vendor/plugins/audioscrobbler_sidebar/MAINTAINERS +0 -26
  1425. data/vendor/plugins/audioscrobbler_sidebar/MIT-LICENSE +0 -21
  1426. data/vendor/plugins/audioscrobbler_sidebar/README +0 -27
  1427. data/vendor/plugins/audioscrobbler_sidebar/Rakefile +0 -22
  1428. data/vendor/plugins/audioscrobbler_sidebar/init.rb +0 -5
  1429. data/vendor/plugins/audioscrobbler_sidebar/lib/audioscrobbler.rb +0 -54
  1430. data/vendor/plugins/audioscrobbler_sidebar/lib/audioscrobbler_sidebar.rb +0 -13
  1431. data/vendor/plugins/audioscrobbler_sidebar/test/audioscrobbler_sidebar_test.rb +0 -8
  1432. data/vendor/plugins/audioscrobbler_sidebar/views/content.rhtml +0 -10
  1433. data/vendor/plugins/backpack_sidebar/MAINTAINERS +0 -26
  1434. data/vendor/plugins/backpack_sidebar/MIT-LICENSE +0 -21
  1435. data/vendor/plugins/backpack_sidebar/README +0 -27
  1436. data/vendor/plugins/backpack_sidebar/Rakefile +0 -22
  1437. data/vendor/plugins/backpack_sidebar/init.rb +0 -5
  1438. data/vendor/plugins/backpack_sidebar/lib/backpack.rb +0 -57
  1439. data/vendor/plugins/backpack_sidebar/lib/backpack_sidebar.rb +0 -20
  1440. data/vendor/plugins/backpack_sidebar/test/backpack_sidebar_test.rb +0 -8
  1441. data/vendor/plugins/backpack_sidebar/views/content.rhtml +0 -12
  1442. data/vendor/plugins/delicious_sidebar/Rakefile +0 -22
  1443. data/vendor/plugins/delicious_sidebar/init.rb +0 -5
  1444. data/vendor/plugins/delicious_sidebar/lib/delicious.rb +0 -57
  1445. data/vendor/plugins/delicious_sidebar/lib/delicious_sidebar.rb +0 -35
  1446. data/vendor/plugins/delicious_sidebar/test/delicious_sidebar_test.rb +0 -8
  1447. data/vendor/plugins/delicious_sidebar/views/content.rhtml +0 -20
  1448. data/vendor/plugins/flickr_sidebar/Rakefile +0 -22
  1449. data/vendor/plugins/flickr_sidebar/init.rb +0 -5
  1450. data/vendor/plugins/flickr_sidebar/lib/flickr.rb +0 -89
  1451. data/vendor/plugins/flickr_sidebar/lib/flickr_sidebar.rb +0 -15
  1452. data/vendor/plugins/flickr_sidebar/test/flickr_sidebar_test.rb +0 -8
  1453. data/vendor/plugins/flickr_sidebar/views/content.rhtml +0 -15
  1454. data/vendor/plugins/fortythree_sidebar/Rakefile +0 -22
  1455. data/vendor/plugins/fortythree_sidebar/init.rb +0 -5
  1456. data/vendor/plugins/fortythree_sidebar/lib/fortythree.rb +0 -62
  1457. data/vendor/plugins/fortythree_sidebar/lib/fortythree_sidebar.rb +0 -13
  1458. data/vendor/plugins/fortythree_sidebar/test/fortythree_sidebar_test.rb +0 -8
  1459. data/vendor/plugins/fortythree_sidebar/views/content.rhtml +0 -8
  1460. data/vendor/plugins/fortythreeplaces_sidebar/Rakefile +0 -22
  1461. data/vendor/plugins/fortythreeplaces_sidebar/init.rb +0 -5
  1462. data/vendor/plugins/fortythreeplaces_sidebar/lib/fortythree.rb +0 -62
  1463. data/vendor/plugins/fortythreeplaces_sidebar/lib/fortythreeplaces_sidebar.rb +0 -13
  1464. data/vendor/plugins/fortythreeplaces_sidebar/test/fortythreeplaces_sidebar_test.rb +0 -8
  1465. data/vendor/plugins/fortythreeplaces_sidebar/views/content.rhtml +0 -8
  1466. data/vendor/plugins/magnolia_sidebar/Rakefile +0 -22
  1467. data/vendor/plugins/magnolia_sidebar/init.rb +0 -5
  1468. data/vendor/plugins/magnolia_sidebar/lib/magnolia_aggregation.rb +0 -81
  1469. data/vendor/plugins/magnolia_sidebar/lib/magnolia_sidebar.rb +0 -16
  1470. data/vendor/plugins/magnolia_sidebar/test/magnolia_sidebar_test.rb +0 -8
  1471. data/vendor/plugins/magnolia_sidebar/views/content.rhtml +0 -12
  1472. data/vendor/plugins/recent_comments_sidebar/Rakefile +0 -22
  1473. data/vendor/plugins/recent_comments_sidebar/init.rb +0 -5
  1474. data/vendor/plugins/recent_comments_sidebar/lib/recent_comments_sidebar.rb +0 -16
  1475. data/vendor/plugins/recent_comments_sidebar/test/recent_comments_sidebar_test.rb +0 -8
  1476. data/vendor/plugins/recent_comments_sidebar/views/content.rhtml +0 -12
  1477. data/vendor/plugins/sitealizer/CHANGELOG +0 -6
  1478. data/vendor/plugins/sitealizer/LICENSE +0 -22
  1479. data/vendor/plugins/sitealizer/README +0 -82
  1480. data/vendor/plugins/sitealizer/Rakefile +0 -22
  1481. data/vendor/plugins/sitealizer/init.rb +0 -24
  1482. data/vendor/plugins/sitealizer/install.rb +0 -22
  1483. data/vendor/plugins/sitealizer/lib/app/assets/images/bar.gif +0 -0
  1484. data/vendor/plugins/sitealizer/lib/app/assets/images/uv.png +0 -0
  1485. data/vendor/plugins/sitealizer/lib/app/assets/images/vh.png +0 -0
  1486. data/vendor/plugins/sitealizer/lib/app/controllers/sitealizer_controller.rb +0 -118
  1487. data/vendor/plugins/sitealizer/lib/app/models/site_tracker.rb +0 -145
  1488. data/vendor/plugins/sitealizer/lib/app/views/layouts/sitealizer.rhtml +0 -66
  1489. data/vendor/plugins/sitealizer/lib/app/views/sitealizer/_browsers.rhtml +0 -23
  1490. data/vendor/plugins/sitealizer/lib/app/views/sitealizer/_daily_stats.rhtml +0 -67
  1491. data/vendor/plugins/sitealizer/lib/app/views/sitealizer/_hosts.rhtml +0 -21
  1492. data/vendor/plugins/sitealizer/lib/app/views/sitealizer/_keywords.rhtml +0 -19
  1493. data/vendor/plugins/sitealizer/lib/app/views/sitealizer/_languages.rhtml +0 -21
  1494. data/vendor/plugins/sitealizer/lib/app/views/sitealizer/_main_frame.rhtml +0 -84
  1495. data/vendor/plugins/sitealizer/lib/app/views/sitealizer/_monthly_hits.rhtml +0 -67
  1496. data/vendor/plugins/sitealizer/lib/app/views/sitealizer/_page_urls.rhtml +0 -20
  1497. data/vendor/plugins/sitealizer/lib/app/views/sitealizer/_platforms.rhtml +0 -21
  1498. data/vendor/plugins/sitealizer/lib/app/views/sitealizer/_referers.rhtml +0 -22
  1499. data/vendor/plugins/sitealizer/lib/app/views/sitealizer/_robots.rhtml +0 -19
  1500. data/vendor/plugins/sitealizer/lib/app/views/sitealizer/_search_engines.rhtml +0 -19
  1501. data/vendor/plugins/sitealizer/lib/app/views/sitealizer/hourly_stats.rhtml +0 -39
  1502. data/vendor/plugins/sitealizer/lib/app/views/sitealizer/index.rhtml +0 -8
  1503. data/vendor/plugins/sitealizer/lib/app/views/sitealizer/login.rhtml +0 -20
  1504. data/vendor/plugins/sitealizer/lib/app/views/sitealizer/menu.rhtml +0 -74
  1505. data/vendor/plugins/sitealizer/lib/app/views/sitealizer/referrer_stats.rhtml +0 -20
  1506. data/vendor/plugins/sitealizer/lib/app/views/sitealizer/search_stats.rhtml +0 -25
  1507. data/vendor/plugins/sitealizer/lib/app/views/sitealizer/summary.rhtml +0 -22
  1508. data/vendor/plugins/sitealizer/lib/app/views/sitealizer/visitor_info.rhtml +0 -30
  1509. data/vendor/plugins/sitealizer/lib/config.yml +0 -18
  1510. data/vendor/plugins/sitealizer/lib/sitealizer.rb +0 -78
  1511. data/vendor/plugins/sitealizer/lib/sitealizer/parser.rb +0 -347
  1512. data/vendor/plugins/sitealizer/lib/tasks/sitealizer.rake +0 -36
  1513. data/vendor/plugins/sitealizer/test/fixtures/sitealizer.yml +0 -89
  1514. data/vendor/plugins/sitealizer/test/sitealizer_controller_test.rb +0 -208
  1515. data/vendor/plugins/sitealizer/test/sitealizer_parser_test.rb +0 -169
  1516. data/vendor/plugins/sitealizer/test/test_helper.rb +0 -7
  1517. data/vendor/plugins/tada_sidebar/MAINTAINERS +0 -26
  1518. data/vendor/plugins/tada_sidebar/MIT-LICENSE +0 -21
  1519. data/vendor/plugins/tada_sidebar/README +0 -27
  1520. data/vendor/plugins/tada_sidebar/Rakefile +0 -22
  1521. data/vendor/plugins/tada_sidebar/init.rb +0 -5
  1522. data/vendor/plugins/tada_sidebar/lib/tada.rb +0 -75
  1523. data/vendor/plugins/tada_sidebar/lib/tada_sidebar.rb +0 -16
  1524. data/vendor/plugins/tada_sidebar/test/tada_sidebar_test.rb +0 -8
  1525. data/vendor/plugins/tada_sidebar/views/content.rhtml +0 -12
  1526. data/vendor/plugins/technorati_sidebar/Rakefile +0 -22
  1527. data/vendor/plugins/technorati_sidebar/init.rb +0 -5
  1528. data/vendor/plugins/technorati_sidebar/lib/technorati.rb +0 -51
  1529. data/vendor/plugins/technorati_sidebar/lib/technorati_sidebar.rb +0 -16
  1530. data/vendor/plugins/technorati_sidebar/test/technorati_sidebar_test.rb +0 -8
  1531. data/vendor/plugins/technorati_sidebar/views/content.rhtml +0 -8
  1532. data/vendor/plugins/upcoming_sidebar/Rakefile +0 -22
  1533. data/vendor/plugins/upcoming_sidebar/init.rb +0 -5
  1534. data/vendor/plugins/upcoming_sidebar/lib/upcoming.rb +0 -74
  1535. data/vendor/plugins/upcoming_sidebar/lib/upcoming_sidebar.rb +0 -15
  1536. data/vendor/plugins/upcoming_sidebar/test/upcoming_sidebar_test.rb +0 -8
  1537. data/vendor/plugins/upcoming_sidebar/views/content.rhtml +0 -8
  1538. data/vendor/plugins/xbox_sidebar/MAINTAINERS +0 -26
  1539. data/vendor/plugins/xbox_sidebar/MIT-LICENSE +0 -21
  1540. data/vendor/plugins/xbox_sidebar/README +0 -27
  1541. data/vendor/plugins/xbox_sidebar/Rakefile +0 -22
  1542. data/vendor/plugins/xbox_sidebar/init.rb +0 -5
  1543. data/vendor/plugins/xbox_sidebar/lib/xbox_sidebar.rb +0 -6
  1544. data/vendor/plugins/xbox_sidebar/test/xbox_sidebar_test.rb +0 -8
  1545. data/vendor/plugins/xbox_sidebar/views/content.rhtml +0 -2
@@ -0,0 +1 @@
1
+ (function(){tinymce.create('tinymce.plugins.Save',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceSave',t._save,t);ed.addCommand('mceCancel',t._cancel,t);ed.addButton('save',{title:'save.save_desc',cmd:'mceSave'});ed.addButton('cancel',{title:'save.cancel_desc',cmd:'mceCancel'});ed.onNodeChange.add(t._nodeChange,t);ed.addShortcut('ctrl+s',ed.getLang('save.save_desc'),'mceSave');},getInfo:function(){return{longname:'Save',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_nodeChange:function(ed,cm,n){var ed=this.editor;if(ed.getParam('save_enablewhendirty')){cm.setDisabled('save',!ed.isDirty());cm.setDisabled('cancel',!ed.isDirty());}},_save:function(){var ed=this.editor,formObj,os,i,elementId;if(ed.getParam("fullscreen_is_enabled"))return true;formObj=tinymce.DOM.get(ed.id).form;if(ed.getParam("save_enablewhendirty")&&!ed.isDirty())return true;if(formObj){tinyMCE.triggerSave();if(os=ed.getParam("save_onsavecallback")){if(ed.execCallback('save_onsavecallback',ed)){ed.startContent=tinymce.trim(ed.getContent({format:'raw'}));ed.nodeChanged();}return;}ed.isNotDirty=true;if(formObj.onsubmit==null||formObj.onsubmit()!=false)tinymce.DOM.get(ed.id).form.submit();ed.nodeChanged();}else ed.windowManager.alert("Error: No form element found.");return true;},_cancel:function(){var ed=this.editor,os,h=tinymce.trim(ed.startContent);if(os=ed.getParam("save_oncancelcallback")){ed.execCallback('save_oncancelcallback',ed);return;}ed.setContent(h);ed.undoManager.clear();ed.nodeChanged();}});tinymce.PluginManager.add('save',tinymce.plugins.Save);})();
@@ -0,0 +1,103 @@
1
+ /**
2
+ * $Id: editor_plugin_src.js 372 2007-11-11 18:38:50Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ (function() {
9
+ tinymce.create('tinymce.plugins.Save', {
10
+ init : function(ed, url) {
11
+ var t = this;
12
+
13
+ t.editor = ed;
14
+
15
+ // Register commands
16
+ ed.addCommand('mceSave', t._save, t);
17
+ ed.addCommand('mceCancel', t._cancel, t);
18
+
19
+ // Register buttons
20
+ ed.addButton('save', {title : 'save.save_desc', cmd : 'mceSave'});
21
+ ed.addButton('cancel', {title : 'save.cancel_desc', cmd : 'mceCancel'});
22
+
23
+ ed.onNodeChange.add(t._nodeChange, t);
24
+ ed.addShortcut('ctrl+s', ed.getLang('save.save_desc'), 'mceSave');
25
+ },
26
+
27
+ getInfo : function() {
28
+ return {
29
+ longname : 'Save',
30
+ author : 'Moxiecode Systems AB',
31
+ authorurl : 'http://tinymce.moxiecode.com',
32
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save',
33
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
34
+ };
35
+ },
36
+
37
+ // Private methods
38
+
39
+ _nodeChange : function(ed, cm, n) {
40
+ var ed = this.editor;
41
+
42
+ if (ed.getParam('save_enablewhendirty')) {
43
+ cm.setDisabled('save', !ed.isDirty());
44
+ cm.setDisabled('cancel', !ed.isDirty());
45
+ }
46
+ },
47
+
48
+ // Private methods
49
+
50
+ _save : function() {
51
+ var ed = this.editor, formObj, os, i, elementId;
52
+
53
+ if (ed.getParam("fullscreen_is_enabled"))
54
+ return true;
55
+
56
+ formObj = tinymce.DOM.get(ed.id).form;
57
+
58
+ if (ed.getParam("save_enablewhendirty") && !ed.isDirty())
59
+ return true;
60
+
61
+ if (formObj) {
62
+ tinyMCE.triggerSave();
63
+
64
+ // Use callback instead
65
+ if (os = ed.getParam("save_onsavecallback")) {
66
+ if (ed.execCallback('save_onsavecallback', ed)) {
67
+ ed.startContent = tinymce.trim(ed.getContent({format : 'raw'}));
68
+ ed.nodeChanged();
69
+ }
70
+
71
+ return;
72
+ }
73
+
74
+ ed.isNotDirty = true;
75
+
76
+ if (formObj.onsubmit == null || formObj.onsubmit() != false)
77
+ tinymce.DOM.get(ed.id).form.submit();
78
+
79
+ ed.nodeChanged();
80
+ } else
81
+ ed.windowManager.alert("Error: No form element found.");
82
+
83
+ return true;
84
+ },
85
+
86
+ _cancel : function() {
87
+ var ed = this.editor, os, h = tinymce.trim(ed.startContent);
88
+
89
+ // Use callback instead
90
+ if (os = ed.getParam("save_oncancelcallback")) {
91
+ ed.execCallback('save_oncancelcallback', ed);
92
+ return;
93
+ }
94
+
95
+ ed.setContent(h);
96
+ ed.undoManager.clear();
97
+ ed.nodeChanged();
98
+ }
99
+ });
100
+
101
+ // Register plugin
102
+ tinymce.PluginManager.add('save', tinymce.plugins.Save);
103
+ })();
@@ -1,35 +1,39 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
1
2
  <html xmlns="http://www.w3.org/1999/xhtml">
2
3
  <head>
3
- <title>{$lang_about_title}</title>
4
- <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
- <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
6
- <script language="javascript" type="text/javascript" src="jscripts/about.js"></script>
7
- <base target="_self" />
4
+ <title>{#advanced_dlg.about_title}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
7
+ <script type="text/javascript" src="js/about.js"></script>
8
8
  </head>
9
- <body id="about" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
9
+ <body id="about" style="display: none">
10
10
  <div class="tabs">
11
11
  <ul>
12
- <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_about}</a></span></li>
13
- <li id="help_tab"><span><a href="javascript:mcTabs.displayTab('help_tab','help_panel');" onmousedown="return false;">{$lang_help}</a></span></li>
14
- <li id="plugins_tab"><span><a href="javascript:mcTabs.displayTab('plugins_tab','plugins_panel');" onmousedown="return false;">{$lang_plugins}</a></span></li>
12
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.about_general}</a></span></li>
13
+ <li id="help_tab" style="display:none"><span><a href="javascript:mcTabs.displayTab('help_tab','help_panel');" onmousedown="return false;">{#advanced_dlg.about_help}</a></span></li>
14
+ <li id="plugins_tab"><span><a href="javascript:mcTabs.displayTab('plugins_tab','plugins_panel');" onmousedown="return false;">{#advanced_dlg.about_plugins}</a></span></li>
15
15
  </ul>
16
16
  </div>
17
17
 
18
18
  <div class="panel_wrapper">
19
19
  <div id="general_panel" class="panel current">
20
- <h3>{$lang_about_title}</h3>
21
- <p>Version: {$tinymce_version} ({$tinymce_releasedate})</p>
20
+ <h3>{#advanced_dlg.about_title}</h3>
21
+ <p>Version: <span id="version"></span> (<span id="date"></span>)</p>
22
22
  <p>TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under <a href="../../license.txt" target="_blank">LGPL</a>
23
23
  by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.</p>
24
- <p>Copyright &copy; 2003-2006, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.</p>
24
+ <p>Copyright &copy; 2003-2007, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.</p>
25
25
  <p>For more information about this software visit the <a href="http://tinymce.moxiecode.com" target="_blank">TinyMCE website</a>.</p>
26
26
 
27
- <div id="buttoncontainer"></div>
27
+ <div id="buttoncontainer">
28
+ <a href="http://www.moxiecode.com" target="_blank"><img src="http://tinymce.moxiecode.com/images/gotmoxie.png" alt="Got Moxie?" border="0" /></a>
29
+ <a href="http://sourceforge.net/projects/tinymce/" target="_blank"><img src="http://sourceforge.net/sflogo.php?group_id=103281" alt="Hosted By Sourceforge" border="0" /></a>
30
+ <a href="http://www.freshmeat.net/projects/tinymce" target="_blank"><img src="http://tinymce.moxiecode.com/images/fm.gif" alt="Also on freshmeat" border="0" /></a>
31
+ </div>
28
32
  </div>
29
33
 
30
34
  <div id="plugins_panel" class="panel">
31
35
  <div id="pluginscontainer">
32
- <h3>{$lang_loaded_plugins}</h3>
36
+ <h3>{#advanced_dlg.about_loaded}</h3>
33
37
 
34
38
  <div id="plugintablecontainer">
35
39
  </div>
@@ -45,7 +49,7 @@
45
49
 
46
50
  <div class="mceActionPanel">
47
51
  <div style="float: right">
48
- <input type="button" id="cancel" name="cancel" value="{$lang_close}" onclick="tinyMCEPopup.close();" />
52
+ <input type="button" id="cancel" name="cancel" value="{#close}" onclick="tinyMCEPopup.close();" />
49
53
  </div>
50
54
  </div>
51
55
  </body>
@@ -1,33 +1,32 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
1
2
  <html xmlns="http://www.w3.org/1999/xhtml">
2
3
  <head>
3
- <title>{$lang_insert_anchor_title}</title>
4
- <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
- <script language="javascript" type="text/javascript" src="jscripts/anchor.js"></script>
4
+ <title>{#advanced_dlg.anchor_title}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
+ <script type="text/javascript" src="js/anchor.js"></script>
6
7
  <base target="_self" />
7
8
  </head>
8
- <body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
9
- <form onsubmit="insertAnchor();return false;" action="#">
10
-
9
+ <body style="display: none">
10
+ <form onsubmit="AnchorDialog.update();return false;" action="#">
11
11
  <table border="0" cellpadding="4" cellspacing="0">
12
12
  <tr>
13
- <td colspan="2" class="title">{$lang_insert_anchor_title}</td>
13
+ <td colspan="2" class="title">{#advanced_dlg.anchor_title}</td>
14
14
  </tr>
15
15
  <tr>
16
- <td nowrap="nowrap">{$lang_insert_anchor_name}:</td>
16
+ <td nowrap="nowrap">{#advanced_dlg.anchor_name}:</td>
17
17
  <td><input name="anchorName" type="text" id="anchorName" value="" style="width: 200px" /></td>
18
18
  </tr>
19
19
  </table>
20
20
 
21
21
  <div class="mceActionPanel">
22
22
  <div style="float: left">
23
- <input type="button" id="insert" name="insert" value="{$lang_update}" onclick="insertAnchor();" />
23
+ <input type="button" id="insert" name="insert" value="{#update}" onclick="AnchorDialog.update();" />
24
24
  </div>
25
25
 
26
26
  <div style="float: right">
27
- <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
27
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
28
28
  </div>
29
29
  </div>
30
-
31
30
  </form>
32
31
  </body>
33
32
  </html>
@@ -1,19 +1,19 @@
1
1
  <html xmlns="http://www.w3.org/1999/xhtml">
2
2
  <head>
3
- <title>{$lang_theme_charmap_title}</title>
3
+ <title>{#advanced_dlg.charmap_title}</title>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
5
- <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
- <script language="javascript" type="text/javascript" src="jscripts/charmap.js"></script>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
+ <script type="text/javascript" src="js/charmap.js"></script>
7
7
  <base target="_self" />
8
8
  </head>
9
- <body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
9
+ <body style="display: none">
10
10
  <table align="center" border="0" cellspacing="0" cellpadding="2">
11
11
  <tr>
12
- <td colspan="2" class="title">{$lang_theme_charmap_title}</td>
12
+ <td colspan="2" class="title">{#advanced_dlg.charmap_title}</td>
13
13
  </tr>
14
14
  <tr>
15
- <td rowspan="2" align="left" valign="top">
16
- <script language="javascript" type="text/javascript">renderCharMapHTML();</script>
15
+ <td id="charmap" rowspan="2" align="left" valign="top">
16
+ <!-- Chars will be rendered here -->
17
17
  </td>
18
18
  <td width="100" align="center" valign="top">
19
19
  <table border="0" cellpadding="0" cellspacing="0" width="100" style="height: 100px">
@@ -1,13 +1,74 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
1
2
  <html xmlns="http://www.w3.org/1999/xhtml">
2
3
  <head>
3
- <title>{$lang_theme_colorpicker_title}</title>
4
- <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
- <script language="javascript" type="text/javascript" src="jscripts/color_picker.js"></script>
4
+ <title>{#advanced_dlg.colorpicker_title}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
7
+ <script type="text/javascript" src="js/color_picker.js"></script>
6
8
  <base target="_self" />
7
9
  </head>
8
- <body onload="tinyMCEPopup.executeOnLoad('init();');" style="margin: 3px; display: none">
9
- <div align="center">
10
- <script language="javascript" type="text/javascript">renderColorMap();</script>
10
+ <body id="colorpicker" style="display: none">
11
+ <div class="tabs">
12
+ <ul>
13
+ <li id="picker_tab" class="current"><span><a href="javascript:mcTabs.displayTab('picker_tab','picker_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_picker_tab}</a></span></li>
14
+ <li id="rgb_tab"><span><a href="javascript:;" onclick="generateWebColors();mcTabs.displayTab('rgb_tab','rgb_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_palette_tab}</a></span></li>
15
+ <li id="named_tab"><span><a href="javascript:;" onclick="generateNamedColors();javascript:mcTabs.displayTab('named_tab','named_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_named_tab}</a></span></li>
16
+ </ul>
17
+ </div>
18
+
19
+ <div class="panel_wrapper">
20
+ <div id="picker_panel" class="panel current">
21
+ <fieldset>
22
+ <legend>{#advanced_dlg.colorpicker_picker_title}</legend>
23
+ <div id="picker">
24
+ <img id="colors" src="img/colorpicker.jpg" onclick="computeColor(event)" onmousedown="isMouseDown = true;return false;" onmouseup="isMouseDown = false;" onmousemove="if (isMouseDown && isMouseOver) computeColor(event); return false;" onmouseover="isMouseOver=true;" onmouseout="isMouseOver=false;" />
25
+
26
+ <div id="light">
27
+ <!-- Will be filled with divs -->
28
+ </div>
29
+
30
+ <br style="clear: both" />
31
+ </div>
32
+ </fieldset>
33
+ </div>
34
+
35
+ <div id="rgb_panel" class="panel">
36
+ <fieldset>
37
+ <legend>{#advanced_dlg.colorpicker_palette_title}</legend>
38
+ <div id="webcolors">
39
+ <!-- Gets filled with web safe colors-->
40
+ </div>
41
+
42
+ <br style="clear: both" />
43
+ </fieldset>
44
+ </div>
45
+
46
+ <div id="named_panel" class="panel">
47
+ <fieldset>
48
+ <legend>{#advanced_dlg.colorpicker_named_title}</legend>
49
+ <div id="namedcolors">
50
+ <!-- Gets filled with named colors-->
51
+ </div>
52
+
53
+ <br style="clear: both" />
54
+
55
+ <div id="colornamecontainer">
56
+ {#advanced_dlg.colorpicker_name} <span id="colorname"></span>
57
+ </div>
58
+ </fieldset>
59
+ </div>
60
+ </div>
61
+
62
+ <div class="mceActionPanel">
63
+ <div style="float: left">
64
+ <input type="button" id="insert" name="insert" value="{#apply}" onclick="insertAction();" />
65
+ </div>
66
+
67
+ <div id="preview"></div>
68
+
69
+ <div id="previewblock">
70
+ <label for="color">{#advanced_dlg.colorpicker_color}</label> <input id="color" type="text" size="8" maxlength="8" class="text" />
71
+ </div>
11
72
  </div>
12
73
  </body>
13
74
  </html>
@@ -1 +1 @@
1
- tinyMCE.importThemeLanguagePack('advanced');var TinyMCE_AdvancedTheme={_defColors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",_autoImportCSSClasses:true,_resizer:{},_buttons:[['bold','{$lang_bold_img}','lang_bold_desc','Bold'],['italic','{$lang_italic_img}','lang_italic_desc','Italic'],['underline','{$lang_underline_img}','lang_underline_desc','Underline'],['strikethrough','strikethrough.gif','lang_striketrough_desc','Strikethrough'],['justifyleft','justifyleft.gif','lang_justifyleft_desc','JustifyLeft'],['justifycenter','justifycenter.gif','lang_justifycenter_desc','JustifyCenter'],['justifyright','justifyright.gif','lang_justifyright_desc','JustifyRight'],['justifyfull','justifyfull.gif','lang_justifyfull_desc','JustifyFull'],['bullist','bullist.gif','lang_bullist_desc','InsertUnorderedList'],['numlist','numlist.gif','lang_numlist_desc','InsertOrderedList'],['outdent','outdent.gif','lang_outdent_desc','Outdent'],['indent','indent.gif','lang_indent_desc','Indent'],['cut','cut.gif','lang_cut_desc','Cut'],['copy','copy.gif','lang_copy_desc','Copy'],['paste','paste.gif','lang_paste_desc','Paste'],['undo','undo.gif','lang_undo_desc','Undo'],['redo','redo.gif','lang_redo_desc','Redo'],['link','link.gif','lang_link_desc','mceLink',true],['unlink','unlink.gif','lang_unlink_desc','unlink'],['image','image.gif','lang_image_desc','mceImage',true],['cleanup','cleanup.gif','lang_cleanup_desc','mceCleanup'],['help','help.gif','lang_help_desc','mceHelp'],['code','code.gif','lang_theme_code_desc','mceCodeEditor'],['hr','hr.gif','lang_theme_hr_desc','inserthorizontalrule'],['removeformat','removeformat.gif','lang_theme_removeformat_desc','removeformat'],['sub','sub.gif','lang_theme_sub_desc','subscript'],['sup','sup.gif','lang_theme_sup_desc','superscript'],['forecolor','forecolor.gif','lang_theme_forecolor_desc','forecolor',true],['backcolor','backcolor.gif','lang_theme_backcolor_desc','HiliteColor',true],['charmap','charmap.gif','lang_theme_charmap_desc','mceCharMap'],['visualaid','visualaid.gif','lang_theme_visualaid_desc','mceToggleVisualAid'],['anchor','anchor.gif','lang_theme_anchor_desc','mceInsertAnchor'],['newdocument','newdocument.gif','lang_newdocument_desc','mceNewDocument']],_buttonMap:'anchor,backcolor,bold,bullist,charmap,cleanup,code,copy,cut,forecolor,help,hr,image,indent,italic,justifycenter,justifyfull,justifyleft,justifyright,link,newdocument,numlist,outdent,paste,redo,removeformat,strikethrough,sub,sup,underline,undo,unlink,visualaid,advhr,ltr,rtl,emotions,flash,fullpage,fullscreen,iespell,insertdate,inserttime,pastetext,pasteword,selectall,preview,print,save,replace,search,table,cell_props,delete_col,delete_row,col_after,col_before,row_after,row_before,merge_cells,row_props,split_cells,delete_table',getControlHTML:function(button_name){var i,x,but;for(i=0;i<TinyMCE_AdvancedTheme._buttons.length;i++){but=TinyMCE_AdvancedTheme._buttons[i];if(but[0]==button_name&&(button_name=="forecolor"||button_name=="backcolor"))return tinyMCE.getMenuButtonHTML(but[0],but[2],'{$themeurl}/images/'+but[1],but[3]+"Menu",but[3],(but.length>4?but[4]:false),(but.length>5?but[5]:null));if(but[0]==button_name)return tinyMCE.getButtonHTML(but[0],but[2],'{$themeurl}/images/'+but[1],but[3],(but.length>4?but[4]:false),(but.length>5?but[5]:null))}switch(button_name){case"formatselect":var html='<select id="{$editor_id}_formatSelect" name="{$editor_id}_formatSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FormatBlock\',false,this.options[this.selectedIndex].value);" class="mceSelectList">';var formats=tinyMCE.getParam("theme_advanced_blockformats","p,address,pre,h1,h2,h3,h4,h5,h6",true).split(',');var lookup=[['p','{$lang_theme_paragraph}'],['address','{$lang_theme_address}'],['pre','{$lang_theme_pre}'],['h1','{$lang_theme_h1}'],['h2','{$lang_theme_h2}'],['h3','{$lang_theme_h3}'],['h4','{$lang_theme_h4}'],['h5','{$lang_theme_h5}'],['h6','{$lang_theme_h6}'],['div','{$lang_theme_div}'],['blockquote','{$lang_theme_blockquote}'],['code','{$lang_theme_code}'],['dt','{$lang_theme_dt}'],['dd','{$lang_theme_dd}'],['samp','{$lang_theme_samp}']];html+='<option value="">{$lang_theme_block}</option>';for(var i=0;i<formats.length;i++){for(var x=0;x<lookup.length;x++){if(formats[i]==lookup[x][0])html+='<option value="&lt;'+lookup[x][0]+'&gt;">'+lookup[x][1]+'</option>'}}html+='</select>';return html;case"styleselect":return'<select id="{$editor_id}_styleSelect" onmousedown="tinyMCE.themes.advanced._setupCSSClasses(\'{$editor_id}\');" name="{$editor_id}_styleSelect" onfocus="tinyMCE.addSelectAccessibility(event,this,window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSetCSSClass\',false,this.options[this.selectedIndex].value);" class="mceSelectList">{$style_select_options}</select>';case"fontselect":var fontHTML='<select id="{$editor_id}_fontNameSelect" name="{$editor_id}_fontNameSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FontName\',false,this.options[this.selectedIndex].value);" class="mceSelectList"><option value="">{$lang_theme_fontdefault}</option>';var iFonts='Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings';var nFonts='Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sand;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats';var fonts=tinyMCE.getParam("theme_advanced_fonts",nFonts).split(';');for(i=0;i<fonts.length;i++){if(fonts[i]!=''){var parts=fonts[i].split('=');fontHTML+='<option value="'+parts[1]+'">'+parts[0]+'</option>'}}fontHTML+='</select>';return fontHTML;case"fontsizeselect":return'<select id="{$editor_id}_fontSizeSelect" name="{$editor_id}_fontSizeSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FontSize\',false,this.options[this.selectedIndex].value);" class="mceSelectList">'+'<option value="0">{$lang_theme_font_size}</option>'+'<option value="1">1 (8 pt)</option>'+'<option value="2">2 (10 pt)</option>'+'<option value="3">3 (12 pt)</option>'+'<option value="4">4 (14 pt)</option>'+'<option value="5">5 (18 pt)</option>'+'<option value="6">6 (24 pt)</option>'+'<option value="7">7 (36 pt)</option>'+'</select>';case"|":case"separator":return'<img src="{$themeurl}/images/separator.gif" width="2" height="20" class="mceSeparatorLine" />';case"spacer":return'<img src="{$themeurl}/images/separator.gif" width="2" height="15" border="0" class="mceSeparatorLine" style="vertical-align: middle" />';case"rowseparator":return'<br />'}return""},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case'mceHelp':tinyMCE.openWindow({file:'about.htm',width:480,height:380},{tinymce_version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion,tinymce_releasedate:tinyMCE.releaseDate,inline:"yes"});return true;case"mceLink":var inst=tinyMCE.getInstanceById(editor_id);var doc=inst.getDoc();var selectedText="";if(tinyMCE.isMSIE){var rng=doc.selection.createRange();selectedText=rng.text}else selectedText=inst.getSel().toString();if(!tinyMCE.linkElement){if((tinyMCE.selectedElement.nodeName.toLowerCase()!="img")&&(selectedText.length<=0))return true}var href="",target="",title="",onclick="",action="insert",style_class="";if(tinyMCE.selectedElement.nodeName.toLowerCase()=="a")tinyMCE.linkElement=tinyMCE.selectedElement;if(tinyMCE.linkElement!=null&&tinyMCE.getAttrib(tinyMCE.linkElement,'href')=="")tinyMCE.linkElement=null;if(tinyMCE.linkElement){href=tinyMCE.getAttrib(tinyMCE.linkElement,'href');target=tinyMCE.getAttrib(tinyMCE.linkElement,'target');title=tinyMCE.getAttrib(tinyMCE.linkElement,'title');onclick=tinyMCE.getAttrib(tinyMCE.linkElement,'onclick');style_class=tinyMCE.getAttrib(tinyMCE.linkElement,'class');if(onclick=="")onclick=tinyMCE.getAttrib(tinyMCE.linkElement,'onclick');onclick=tinyMCE.cleanupEventStr(onclick);href=eval(tinyMCE.settings['urlconverter_callback']+"(href, tinyMCE.linkElement, true);");mceRealHref=tinyMCE.getAttrib(tinyMCE.linkElement,'mce_href');if(mceRealHref!=""){href=mceRealHref;if(tinyMCE.getParam('convert_urls'))href=eval(tinyMCE.settings['urlconverter_callback']+"(href, tinyMCE.linkElement, true);")}action="update"}var template=new Array();template['file']='link.htm';template['width']=310;template['height']=200;template['width']+=tinyMCE.getLang('lang_insert_link_delta_width',0);template['height']+=tinyMCE.getLang('lang_insert_link_delta_height',0);if(inst.settings['insertlink_callback']){var returnVal=eval(inst.settings['insertlink_callback']+"(href, target, title, onclick, action, style_class);");if(returnVal&&returnVal['href'])TinyMCE_AdvancedTheme._insertLink(returnVal['href'],returnVal['target'],returnVal['title'],returnVal['onclick'],returnVal['style_class'])}else{tinyMCE.openWindow(template,{href:href,target:target,title:title,onclick:onclick,action:action,className:style_class,inline:"yes"})}return true;case"mceImage":var src="",alt="",border="",hspace="",vspace="",width="",height="",align="";var title="",onmouseover="",onmouseout="",action="insert";var img=tinyMCE.imgElement;var inst=tinyMCE.getInstanceById(editor_id);if(tinyMCE.selectedElement!=null&&tinyMCE.selectedElement.nodeName.toLowerCase()=="img"){img=tinyMCE.selectedElement;tinyMCE.imgElement=img}if(img){if(tinyMCE.getAttrib(img,'name').indexOf('mce_')==0)return true;src=tinyMCE.getAttrib(img,'src');alt=tinyMCE.getAttrib(img,'alt');if(alt=="")alt=tinyMCE.getAttrib(img,'title');if(tinyMCE.isGecko){var w=img.style.width;if(w!=null&&w!="")img.setAttribute("width",w);var h=img.style.height;if(h!=null&&h!="")img.setAttribute("height",h)}border=tinyMCE.getAttrib(img,'border');hspace=tinyMCE.getAttrib(img,'hspace');vspace=tinyMCE.getAttrib(img,'vspace');width=tinyMCE.getAttrib(img,'width');height=tinyMCE.getAttrib(img,'height');align=tinyMCE.getAttrib(img,'align');onmouseover=tinyMCE.getAttrib(img,'onmouseover');onmouseout=tinyMCE.getAttrib(img,'onmouseout');title=tinyMCE.getAttrib(img,'title');if(tinyMCE.isMSIE){width=img.attributes['width'].specified?width:"";height=img.attributes['height'].specified?height:""}src=eval(tinyMCE.settings['urlconverter_callback']+"(src, img, true);");mceRealSrc=tinyMCE.getAttrib(img,'mce_src');if(mceRealSrc!=""){src=mceRealSrc;if(tinyMCE.getParam('convert_urls'))src=eval(tinyMCE.settings['urlconverter_callback']+"(src, img, true);")}action="update"}var template=new Array();template['file']='image.htm?src={$src}';template['width']=355;template['height']=265+(tinyMCE.isMSIE?25:0);template['width']+=tinyMCE.getLang('lang_insert_image_delta_width',0);template['height']+=tinyMCE.getLang('lang_insert_image_delta_height',0);if(inst.settings['insertimage_callback']){var returnVal=eval(inst.settings['insertimage_callback']+"(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout, action);");if(returnVal&&returnVal['src'])TinyMCE_AdvancedTheme._insertImage(returnVal['src'],returnVal['alt'],returnVal['border'],returnVal['hspace'],returnVal['vspace'],returnVal['width'],returnVal['height'],returnVal['align'],returnVal['title'],returnVal['onmouseover'],returnVal['onmouseout'])}else tinyMCE.openWindow(template,{src:src,alt:alt,border:border,hspace:hspace,vspace:vspace,width:width,height:height,align:align,title:title,onmouseover:onmouseover,onmouseout:onmouseout,action:action,inline:"yes"});return true;case"forecolor":var fcp=new TinyMCE_Layer(editor_id+'_fcPreview',false),p,img,elm;TinyMCE_AdvancedTheme._hideMenus(editor_id);if(!fcp.exists()){fcp.create('div','mceColorPreview',document.getElementById(editor_id+'_toolbar'));elm=fcp.getElement();elm._editor_id=editor_id;elm._command="forecolor";elm._switchId=editor_id+"_forecolor";tinyMCE.addEvent(elm,'click',TinyMCE_AdvancedTheme._handleMenuEvent);tinyMCE.addEvent(elm,'mouseover',TinyMCE_AdvancedTheme._handleMenuEvent);tinyMCE.addEvent(elm,'mouseout',TinyMCE_AdvancedTheme._handleMenuEvent)}img=tinyMCE.selectNodes(document.getElementById(editor_id+"_forecolor"),function(n){return n.nodeName=="IMG"})[0];p=tinyMCE.getAbsPosition(img,document.getElementById(editor_id+'_toolbar'));fcp.moveTo(p.absLeft,p.absTop);fcp.getElement().style.backgroundColor=value!=null?value:tinyMCE.getInstanceById(editor_id).foreColor;fcp.show();return false;case"forecolorMenu":TinyMCE_AdvancedTheme._hideMenus(editor_id);var ml=new TinyMCE_Layer(editor_id+'_fcMenu');if(!ml.exists())ml.create('div','mceMenu',document.body,TinyMCE_AdvancedTheme._getColorHTML(editor_id,'theme_advanced_text_colors','forecolor'));tinyMCE.switchClass(editor_id+'_forecolor','mceMenuButtonFocus');ml.moveRelativeTo(document.getElementById(editor_id+"_forecolor"),'bl');ml.moveBy(tinyMCE.isMSIE&&!tinyMCE.isOpera?-1:1,-1);if(tinyMCE.isOpera)ml.moveBy(0,-2);ml.show();return true;case"HiliteColor":var bcp=new TinyMCE_Layer(editor_id+'_bcPreview',false),p,img;TinyMCE_AdvancedTheme._hideMenus(editor_id);if(!bcp.exists()){bcp.create('div','mceColorPreview',document.getElementById(editor_id+'_toolbar'));elm=bcp.getElement();elm._editor_id=editor_id;elm._command="HiliteColor";elm._switchId=editor_id+"_backcolor";tinyMCE.addEvent(elm,'click',TinyMCE_AdvancedTheme._handleMenuEvent);tinyMCE.addEvent(elm,'mouseover',TinyMCE_AdvancedTheme._handleMenuEvent);tinyMCE.addEvent(elm,'mouseout',TinyMCE_AdvancedTheme._handleMenuEvent)}img=tinyMCE.selectNodes(document.getElementById(editor_id+"_backcolor"),function(n){return n.nodeName=="IMG"})[0];p=tinyMCE.getAbsPosition(img,document.getElementById(editor_id+'_toolbar'));bcp.moveTo(p.absLeft,p.absTop);bcp.getElement().style.backgroundColor=value!=null?value:tinyMCE.getInstanceById(editor_id).backColor;bcp.show();return false;case"HiliteColorMenu":TinyMCE_AdvancedTheme._hideMenus(editor_id);var ml=new TinyMCE_Layer(editor_id+'_bcMenu');if(!ml.exists())ml.create('div','mceMenu',document.body,TinyMCE_AdvancedTheme._getColorHTML(editor_id,'theme_advanced_background_colors','HiliteColor'));tinyMCE.switchClass(editor_id+'_backcolor','mceMenuButtonFocus');ml.moveRelativeTo(document.getElementById(editor_id+"_backcolor"),'bl');ml.moveBy(tinyMCE.isMSIE&&!tinyMCE.isOpera?-1:1,-1);if(tinyMCE.isOpera)ml.moveBy(0,-2);ml.show();return true;case"mceColorPicker":if(user_interface){var template=new Array();var inputColor=value['document'].getElementById(value['element_id']).value;template['file']='color_picker.htm';template['width']=220;template['height']=190;template['close_previous']="no";template['width']+=tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_height',0);if(typeof(value['store_selection'])=="undefined")value['store_selection']=true;tinyMCE.lastColorPickerValue=value;tinyMCE.openWindow(template,{editor_id:editor_id,mce_store_selection:value['store_selection'],inline:"yes",command:"mceColorPicker",input_color:inputColor})}else{var savedVal=tinyMCE.lastColorPickerValue;var elm=savedVal['document'].getElementById(savedVal['element_id']);elm.value=value;if(elm.onchange!=null&&elm.onchange!='')eval('elm.onchange();')}return true;case"mceCodeEditor":var template=new Array();template['file']='source_editor.htm';template['width']=parseInt(tinyMCE.getParam("theme_advanced_source_editor_width",720));template['height']=parseInt(tinyMCE.getParam("theme_advanced_source_editor_height",580));tinyMCE.openWindow(template,{editor_id:editor_id,resizable:"yes",scrollbars:"no",inline:"yes"});return true;case"mceCharMap":var template=new Array();template['file']='charmap.htm';template['width']=550+(tinyMCE.isOpera?40:0);template['height']=250;template['width']+=tinyMCE.getLang('lang_theme_advanced_charmap_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_charmap_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;case"mceInsertAnchor":var template=new Array();template['file']='anchor.htm';template['width']=320;template['height']=90+(tinyMCE.isNS7?30:0);template['width']+=tinyMCE.getLang('lang_theme_advanced_anchor_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_anchor_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;case"mceNewDocument":if(confirm(tinyMCE.getLang('lang_newdocument')))tinyMCE.execInstanceCommand(editor_id,'mceSetContent',false,' ');return true}return false},getEditorTemplate:function(settings,editorId){function removeFromArray(in_array,remove_array){var outArray=new Array(),skip;for(var i=0;i<in_array.length;i++){skip=false;for(var j=0;j<remove_array.length;j++){if(in_array[i]==remove_array[j]){skip=true}}if(!skip){outArray[outArray.length]=in_array[i]}}return outArray}function addToArray(in_array,add_array){for(var i=0;i<add_array.length;i++){in_array[in_array.length]=add_array[i]}return in_array}var template=new Array();var deltaHeight=0;var resizing=tinyMCE.getParam("theme_advanced_resizing",false);var path=tinyMCE.getParam("theme_advanced_path",true);var statusbarHTML='<div id="{$editor_id}_path" class="mceStatusbarPathText" style="display: '+(path?"block":"none")+'">&#160;</div><div id="{$editor_id}_resize" class="mceStatusbarResize" style="display: '+(resizing?"block":"none")+'" onmousedown="tinyMCE.themes.advanced._setResizing(event,\'{$editor_id}\',true);"></div><br style="clear: both" />';var layoutManager=tinyMCE.getParam("theme_advanced_layout_manager","SimpleLayout");var styleSelectHTML='<option value="">{$lang_theme_style_select}</option>';if(settings['theme_advanced_styles']){var stylesAr=settings['theme_advanced_styles'].split(';');for(var i=0;i<stylesAr.length;i++){var key,value;key=stylesAr[i].split('=')[0];value=stylesAr[i].split('=')[1];styleSelectHTML+='<option value="'+value+'">'+key+'</option>'}TinyMCE_AdvancedTheme._autoImportCSSClasses=false}switch(layoutManager){case"SimpleLayout":var toolbarHTML="";var toolbarLocation=tinyMCE.getParam("theme_advanced_toolbar_location","bottom");var toolbarAlign=tinyMCE.getParam("theme_advanced_toolbar_align","center");var pathLocation=tinyMCE.getParam("theme_advanced_path_location","none");var statusbarLocation=tinyMCE.getParam("theme_advanced_statusbar_location",pathLocation);var defVals={theme_advanced_buttons1:"bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,separator,sub,sup,separator,charmap"};toolbarHTML+='<a href="#" accesskey="q" title="'+tinyMCE.getLang("lang_toolbar_focus")+'"';if(!tinyMCE.getParam("accessibility_focus"))toolbarHTML+=' onfocus="tinyMCE.getInstanceById(\''+editorId+'\').getWin().focus();"';toolbarHTML+='></a>';for(var i=1;i<100;i++){var def=defVals["theme_advanced_buttons"+i];var buttons=tinyMCE.getParam("theme_advanced_buttons"+i,def==null?'':def,true,',');if(buttons.length==0)break;buttons=removeFromArray(buttons,tinyMCE.getParam("theme_advanced_disable","",true,','));buttons=addToArray(buttons,tinyMCE.getParam("theme_advanced_buttons"+i+"_add","",true,','));buttons=addToArray(tinyMCE.getParam("theme_advanced_buttons"+i+"_add_before","",true,','),buttons);for(var b=0;b<buttons.length;b++)toolbarHTML+=tinyMCE.getControlHTML(buttons[b]);if(buttons.length>0){toolbarHTML+="<br />";deltaHeight-=23}}toolbarHTML+='<a href="#" accesskey="z" onfocus="tinyMCE.getInstanceById(\''+editorId+'\').getWin().focus();"></a>';template['html']='<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width_style};height:{$height_style}"><tbody>';if(toolbarLocation=="top"){template['html']+='<tr><td class="mceToolbarTop" align="'+toolbarAlign+'" height="1" nowrap="nowrap"><span id="'+editorId+'_toolbar" class="mceToolbarContainer">'+toolbarHTML+'</span></td></tr>'}if(statusbarLocation=="top"){template['html']+='<tr><td class="mceStatusbarTop" height="1">'+statusbarHTML+'</td></tr>';deltaHeight-=23}template['html']+='<tr><td align="center"><span id="{$editor_id}"></span></td></tr>';if(toolbarLocation=="bottom"){template['html']+='<tr><td class="mceToolbarBottom" align="'+toolbarAlign+'" height="1"><span id="'+editorId+'_toolbar" class="mceToolbarContainer">'+toolbarHTML+'</span></td></tr>'}if(toolbarLocation=="external"){var bod=document.body;var elm=document.createElement("div");toolbarHTML=tinyMCE.replaceVar(toolbarHTML,'style_select_options',styleSelectHTML);toolbarHTML=tinyMCE.applyTemplate(toolbarHTML,{editor_id:editorId});elm.className="mceToolbarExternal";elm.id=editorId+"_toolbar";elm.innerHTML='<table width="100%" border="0" align="center"><tr><td align="center">'+toolbarHTML+'</td></tr></table>';bod.appendChild(elm);deltaHeight=0;tinyMCE.getInstanceById(editorId).toolbarElement=elm;}else{tinyMCE.getInstanceById(editorId).toolbarElement=null}if(statusbarLocation=="bottom"){template['html']+='<tr><td class="mceStatusbarBottom" height="1">'+statusbarHTML+'</td></tr>';deltaHeight-=23}template['html']+='</tbody></table>';break;case"RowLayout":template['html']='<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width}px;height:{$height}px"><tbody>';var containers=tinyMCE.getParam("theme_advanced_containers","",true,",");var defaultContainerCSS=tinyMCE.getParam("theme_advanced_containers_default_class","container");var defaultContainerAlign=tinyMCE.getParam("theme_advanced_containers_default_align","center");for(var i=0;i<containers.length;i++){if(containers[i]=="mceEditor")template['html']+='<tr><td align="center" class="mceEditor_border"><span id="{$editor_id}"></span></td></tr>';else if(containers[i]=="mceElementpath"||containers[i]=="mceStatusbar"){var pathClass="mceStatusbar";if(i==containers.length-1){pathClass="mceStatusbarBottom"}else if(i==0){pathClass="mceStatusbar"}else{deltaHeight-=2}template['html']+='<tr><td class="'+pathClass+'" height="1">'+statusbarHTML+'</td></tr>';deltaHeight-=22}else{var curContainer=tinyMCE.getParam("theme_advanced_container_"+containers[i],"",true,',');var curContainerHTML="";var curAlign=tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_align",defaultContainerAlign);var curCSS=tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_class",defaultContainerCSS);curContainer=removeFromArray(curContainer,tinyMCE.getParam("theme_advanced_disable","",true,','));for(var j=0;j<curContainer.length;j++)curContainerHTML+=tinyMCE.getControlHTML(curContainer[j]);if(curContainer.length>0){curContainerHTML+="<br />";deltaHeight-=23}template['html']+='<tr><td class="'+curCSS+'" align="'+curAlign+'" height="1">'+curContainerHTML+'</td></tr>'}}template['html']+='</tbody></table>';break;case"CustomLayout":var customLayout=tinyMCE.getParam("theme_advanced_custom_layout","");if(customLayout!=""&&eval("typeof("+customLayout+")")!="undefined"){template=eval(customLayout+"(template);")}break}if(resizing)template['html']+='<span id="{$editor_id}_resize_box" class="mceResizeBox"></span>';template['html']=tinyMCE.replaceVar(template['html'],'style_select_options',styleSelectHTML);template['delta_width']=0;template['delta_height']=deltaHeight;return template},initInstance:function(inst){if(tinyMCE.getParam("theme_advanced_resizing",false)){if(tinyMCE.getParam("theme_advanced_resizing_use_cookie",true)){var w=TinyMCE_AdvancedTheme._getCookie("TinyMCE_"+inst.editorId+"_width");var h=TinyMCE_AdvancedTheme._getCookie("TinyMCE_"+inst.editorId+"_height");TinyMCE_AdvancedTheme._resizeTo(inst,w,h,tinyMCE.getParam("theme_advanced_resize_horizontal",true))}}inst.addShortcut('ctrl','k','lang_link_desc','mceLink')},_handleMenuEvent:function(e){var te=tinyMCE.isMSIE?window.event.srcElement:e.target;tinyMCE._menuButtonEvent(e.type=="mouseover"?"over":"out",document.getElementById(te._switchId));if(e.type=="click")tinyMCE.execInstanceCommand(te._editor_id,te._command)},_hideMenus:function(id){var fcml=new TinyMCE_Layer(id+'_fcMenu'),bcml=new TinyMCE_Layer(id+'_bcMenu');if(fcml.exists()&&fcml.isVisible()){tinyMCE.switchClass(id+'_forecolor','mceMenuButton');fcml.hide()}if(bcml.exists()&&bcml.isVisible()){tinyMCE.switchClass(id+'_backcolor','mceMenuButton');bcml.hide()}},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection,setup_content){var alignNode,breakOut,classNode;function selectByValue(select_elm,value,first_index){first_index=typeof(first_index)=="undefined"?false:true;if(select_elm){for(var i=0;i<select_elm.options.length;i++){var ov=""+select_elm.options[i].value;if(first_index&&ov.toLowerCase().indexOf(value.toLowerCase())==0){select_elm.selectedIndex=i;return true}if(ov==value){select_elm.selectedIndex=i;return true}}}return false};function getAttrib(elm,name){return elm.getAttribute(name)?elm.getAttribute(name):""};if(node==null)return;var pathElm=document.getElementById(editor_id+"_path");var inst=tinyMCE.getInstanceById(editor_id);var doc=inst.getDoc();TinyMCE_AdvancedTheme._hideMenus(editor_id);if(pathElm){var parentNode=node;var path=new Array();while(parentNode!=null){if(parentNode.nodeName.toUpperCase()=="BODY"){break}if(parentNode.nodeType==1&&tinyMCE.getAttrib(parentNode,"class").indexOf('mceItemHidden')==-1){path[path.length]=parentNode}parentNode=parentNode.parentNode}var html="";for(var i=path.length-1;i>=0;i--){var nodeName=path[i].nodeName.toLowerCase();var nodeData="";if(nodeName.indexOf("html:")==0)nodeName=nodeName.substring(5);if(nodeName=="b"){nodeName="strong"}if(nodeName=="i"){nodeName="em"}if(nodeName=="span"){var cn=tinyMCE.getAttrib(path[i],"class");if(cn!=""&&cn.indexOf('mceItem')==-1)nodeData+="class: "+cn+" ";var st=tinyMCE.getAttrib(path[i],"style");if(st!=""){st=tinyMCE.serializeStyle(tinyMCE.parseStyle(st));nodeData+="style: "+st+" "}}if(nodeName=="font"){if(tinyMCE.getParam("convert_fonts_to_spans"))nodeName="span";var face=tinyMCE.getAttrib(path[i],"face");if(face!="")nodeData+="font: "+face+" ";var size=tinyMCE.getAttrib(path[i],"size");if(size!="")nodeData+="size: "+size+" ";var color=tinyMCE.getAttrib(path[i],"color");if(color!="")nodeData+="color: "+color+" "}if(getAttrib(path[i],'id')!=""){nodeData+="id: "+path[i].getAttribute('id')+" "}var className=tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i],"class"),false);if(className!=""&&className.indexOf('mceItem')==-1)nodeData+="class: "+className+" ";if(getAttrib(path[i],'src')!=""){var src=tinyMCE.getAttrib(path[i],"mce_src");if(src=="")src=tinyMCE.getAttrib(path[i],"src");nodeData+="src: "+src+" "}if(path[i].nodeName=='A'&&getAttrib(path[i],'href')!=""){var href=tinyMCE.getAttrib(path[i],"mce_href");if(href=="")href=tinyMCE.getAttrib(path[i],"href");nodeData+="href: "+href+" "}className=tinyMCE.getAttrib(path[i],"class");if((nodeName=="img"||nodeName=="span")&&className.indexOf('mceItem')!=-1){nodeName=className.replace(/mceItem([a-z]+)/gi,'$1').toLowerCase();nodeData=path[i].getAttribute('title')}if(nodeName=="a"&&(anchor=tinyMCE.getAttrib(path[i],"name"))!=""){nodeName="a";nodeName+="#"+anchor;nodeData=""}if(getAttrib(path[i],'name').indexOf("mce_")!=0){var className=tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i],"class"),false);if(className!=""&&className.indexOf('mceItem')==-1){nodeName+="."+className}}var cmd='tinyMCE.execInstanceCommand(\''+editor_id+'\',\'mceSelectNodeDepth\',false,\''+i+'\');';html+='<a title="'+nodeData+'" href="javascript:'+cmd+'" onclick="'+cmd+'return false;" onmousedown="return false;" target="_self" class="mcePathItem">'+nodeName+'</a>';if(i>0){html+=" &raquo; "}}pathElm.innerHTML='<a href="#" accesskey="x"></a>'+tinyMCE.getLang('lang_theme_path')+": "+html+'&#160;'}tinyMCE.switchClass(editor_id+'_justifyleft','mceButtonNormal');tinyMCE.switchClass(editor_id+'_justifyright','mceButtonNormal');tinyMCE.switchClass(editor_id+'_justifycenter','mceButtonNormal');tinyMCE.switchClass(editor_id+'_justifyfull','mceButtonNormal');tinyMCE.switchClass(editor_id+'_bold','mceButtonNormal');tinyMCE.switchClass(editor_id+'_italic','mceButtonNormal');tinyMCE.switchClass(editor_id+'_underline','mceButtonNormal');tinyMCE.switchClass(editor_id+'_strikethrough','mceButtonNormal');tinyMCE.switchClass(editor_id+'_bullist','mceButtonNormal');tinyMCE.switchClass(editor_id+'_numlist','mceButtonNormal');tinyMCE.switchClass(editor_id+'_sub','mceButtonNormal');tinyMCE.switchClass(editor_id+'_sup','mceButtonNormal');tinyMCE.switchClass(editor_id+'_anchor','mceButtonNormal');tinyMCE.switchClass(editor_id+'_link','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_unlink','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_outdent','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_image','mceButtonNormal');tinyMCE.switchClass(editor_id+'_hr','mceButtonNormal');if(node.nodeName=="A"&&tinyMCE.getAttrib(node,"class").indexOf('mceItemAnchor')!=-1)tinyMCE.switchClass(editor_id+'_anchor','mceButtonSelected');var anchorLink=tinyMCE.getParentElement(node,"a","href");if(anchorLink||any_selection){tinyMCE.switchClass(editor_id+'_link',anchorLink?'mceButtonSelected':'mceButtonNormal');tinyMCE.switchClass(editor_id+'_unlink',anchorLink?'mceButtonSelected':'mceButtonNormal')}tinyMCE.switchClass(editor_id+'_visualaid',visual_aid?'mceButtonSelected':'mceButtonNormal');if(undo_levels!=-1){tinyMCE.switchClass(editor_id+'_undo','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_redo','mceButtonDisabled')}if(tinyMCE.getParentElement(node,"li,blockquote"))tinyMCE.switchClass(editor_id+'_outdent','mceButtonNormal');if(undo_index!=-1&&(undo_index<undo_levels-1&&undo_levels>0))tinyMCE.switchClass(editor_id+'_redo','mceButtonNormal');if(undo_index!=-1&&(undo_index>0&&undo_levels>0))tinyMCE.switchClass(editor_id+'_undo','mceButtonNormal');var selectElm=document.getElementById(editor_id+"_styleSelect");if(selectElm){TinyMCE_AdvancedTheme._setupCSSClasses(editor_id);classNode=node;breakOut=false;var index=0;do{if(classNode&&classNode.className){for(var i=0;i<selectElm.options.length;i++){if(selectElm.options[i].value==classNode.className){index=i;breakOut=true;break}}}}while(!breakOut&&classNode!=null&&(classNode=classNode.parentNode)!=null);selectElm.selectedIndex=index}var selectElm=document.getElementById(editor_id+"_formatSelect");if(selectElm){var elm=tinyMCE.getParentElement(node,"p,div,h1,h2,h3,h4,h5,h6,pre,address");if(elm)selectByValue(selectElm,"<"+elm.nodeName.toLowerCase()+">");else selectByValue(selectElm,"")}var selectElm=document.getElementById(editor_id+"_fontNameSelect");if(selectElm){if(!tinyMCE.isSafari&&!(tinyMCE.isMSIE&&!tinyMCE.isOpera)){var face=inst.queryCommandValue('FontName');face=face==null||face==""?"":face;selectByValue(selectElm,face,face!="")}else{var elm=tinyMCE.getParentElement(node,"font","face");if(elm){var family=tinyMCE.getAttrib(elm,"face");if(family=='')family=''+elm.style.fontFamily;if(!selectByValue(selectElm,family,family!=""))selectByValue(selectElm,"")}else selectByValue(selectElm,"")}}var selectElm=document.getElementById(editor_id+"_fontSizeSelect");if(selectElm){if(!tinyMCE.isSafari&&!tinyMCE.isOpera){var size=inst.queryCommandValue('FontSize');selectByValue(selectElm,size==null||size==""?"0":size)}else{var elm=tinyMCE.getParentElement(node,"font","size");if(elm){var size=tinyMCE.getAttrib(elm,"size");if(size==''){var sizes=new Array('','8px','10px','12px','14px','18px','24px','36px');size=''+elm.style.fontSize;for(var i=0;i<sizes.length;i++){if((''+sizes[i])==size){size=i;break}}}if(!selectByValue(selectElm,size))selectByValue(selectElm,"")}else selectByValue(selectElm,"0")}}alignNode=node;breakOut=false;do{if(!alignNode.getAttribute||!alignNode.getAttribute('align'))continue;switch(alignNode.getAttribute('align').toLowerCase()){case"left":tinyMCE.switchClass(editor_id+'_justifyleft','mceButtonSelected');breakOut=true;break;case"right":tinyMCE.switchClass(editor_id+'_justifyright','mceButtonSelected');breakOut=true;break;case"middle":case"center":tinyMCE.switchClass(editor_id+'_justifycenter','mceButtonSelected');breakOut=true;break;case"justify":tinyMCE.switchClass(editor_id+'_justifyfull','mceButtonSelected');breakOut=true;break}}while(!breakOut&&(alignNode=alignNode.parentNode)!=null);var div=tinyMCE.getParentElement(node,"div");if(div&&div.style.textAlign=="center")tinyMCE.switchClass(editor_id+'_justifycenter','mceButtonSelected');if(!setup_content){var ar=new Array("Bold","_bold","Italic","_italic","Strikethrough","_strikethrough","superscript","_sup","subscript","_sub");for(var i=0;i<ar.length;i+=2){if(inst.queryCommandState(ar[i]))tinyMCE.switchClass(editor_id+ar[i+1],'mceButtonSelected')}if(inst.queryCommandState("Underline")&&(node.parentNode==null||node.parentNode.nodeName!="A"))tinyMCE.switchClass(editor_id+'_underline','mceButtonSelected')}do{switch(node.nodeName){case"UL":tinyMCE.switchClass(editor_id+'_bullist','mceButtonSelected');break;case"OL":tinyMCE.switchClass(editor_id+'_numlist','mceButtonSelected');break;case"HR":tinyMCE.switchClass(editor_id+'_hr','mceButtonSelected');break;case"IMG":if(getAttrib(node,'name').indexOf('mce_')!=0&&tinyMCE.getAttrib(node,'class').indexOf('mceItem')==-1){tinyMCE.switchClass(editor_id+'_image','mceButtonSelected')}break}}while((node=node.parentNode)!=null)},_setupCSSClasses:function(editor_id){var i,selectElm;if(!TinyMCE_AdvancedTheme._autoImportCSSClasses)return;selectElm=document.getElementById(editor_id+'_styleSelect');if(selectElm&&selectElm.getAttribute('cssImported')!='true'){var csses=tinyMCE.getCSSClasses(editor_id);if(csses&&selectElm){for(i=0;i<csses.length;i++)selectElm.options[selectElm.options.length]=new Option(csses[i],csses[i])}if(csses!=null&&csses.length>0)selectElm.setAttribute('cssImported','true')}},_setCookie:function(name,value,expires,path,domain,secure){var curCookie=name+"="+escape(value)+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+escape(path):"")+((domain)?"; domain="+domain:"")+((secure)?"; secure":"");document.cookie=curCookie},_getCookie:function(name){var dc=document.cookie;var prefix=name+"=";var begin=dc.indexOf("; "+prefix);if(begin==-1){begin=dc.indexOf(prefix);if(begin!=0)return null}else begin+=2;var end=document.cookie.indexOf(";",begin);if(end==-1)end=dc.length;return unescape(dc.substring(begin+prefix.length,end))},_resizeTo:function(inst,w,h,set_w){var editorContainer=document.getElementById(inst.editorId+'_parent');var tableElm=editorContainer.firstChild;var iframe=inst.iframeElement;if(w==null||w=="null"){set_w=false;w=0}if(h==null||h=="null")return;w=parseInt(w);h=parseInt(h);if(tinyMCE.isGecko){w+=2;h+=2}var dx=w-tableElm.clientWidth;var dy=h-tableElm.clientHeight;w=w<1?30:w;h=h<1?30:h;if(set_w)tableElm.style.width=w+"px";tableElm.style.height=h+"px";iw=iframe.clientWidth+dx;ih=iframe.clientHeight+dy;iw=iw<1?30:iw;ih=ih<1?30:ih;if(tinyMCE.isGecko){iw-=2;ih-=2}if(set_w)iframe.style.width=iw+"px";iframe.style.height=ih+"px";if(set_w){var tableBodyElm=tableElm.firstChild;var minIframeWidth=tableBodyElm.scrollWidth;if(inst.iframeElement.clientWidth<minIframeWidth){dx=minIframeWidth-inst.iframeElement.clientWidth;inst.iframeElement.style.width=(iw+dx)+"px"}}inst.useCSS=false},_resizeEventHandler:function(e){var resizer=TinyMCE_AdvancedTheme._resizer;if(!resizer.resizing)return;e=typeof(e)=="undefined"?window.event:e;var dx=e.screenX-resizer.downX;var dy=e.screenY-resizer.downY;var resizeBox=resizer.resizeBox;var editorId=resizer.editorId;switch(e.type){case"mousemove":var w,h;w=resizer.width+dx;h=resizer.height+dy;w=w<1?1:w;h=h<1?1:h;if(resizer.horizontal)resizeBox.style.width=w+"px";resizeBox.style.height=h+"px";break;case"mouseup":TinyMCE_AdvancedTheme._setResizing(e,editorId,false);TinyMCE_AdvancedTheme._resizeTo(tinyMCE.getInstanceById(editorId),resizer.width+dx,resizer.height+dy,resizer.horizontal);if(tinyMCE.getParam("theme_advanced_resizing_use_cookie",true)){var expires=new Date();expires.setTime(expires.getTime()+3600000*24*30);TinyMCE_AdvancedTheme._setCookie("TinyMCE_"+editorId+"_width",""+(resizer.horizontal?resizer.width+dx:""),expires);TinyMCE_AdvancedTheme._setCookie("TinyMCE_"+editorId+"_height",""+(resizer.height+dy),expires)}break}},_setResizing:function(e,editor_id,state){e=typeof(e)=="undefined"?window.event:e;var resizer=TinyMCE_AdvancedTheme._resizer;var editorContainer=document.getElementById(editor_id+'_parent');var editorArea=document.getElementById(editor_id+'_parent').firstChild;var resizeBox=document.getElementById(editor_id+'_resize_box');var inst=tinyMCE.getInstanceById(editor_id);if(state){var width=editorArea.clientWidth;var height=editorArea.clientHeight;resizeBox.style.width=width+"px";resizeBox.style.height=height+"px";resizer.iframeWidth=inst.iframeElement.clientWidth;resizer.iframeHeight=inst.iframeElement.clientHeight;editorArea.style.display="none";resizeBox.style.display="block";if(!resizer.eventHandlers){if(tinyMCE.isMSIE)tinyMCE.addEvent(document,"mousemove",TinyMCE_AdvancedTheme._resizeEventHandler);else tinyMCE.addEvent(window,"mousemove",TinyMCE_AdvancedTheme._resizeEventHandler);tinyMCE.addEvent(document,"mouseup",TinyMCE_AdvancedTheme._resizeEventHandler);resizer.eventHandlers=true}resizer.resizing=true;resizer.downX=e.screenX;resizer.downY=e.screenY;resizer.width=parseInt(resizeBox.style.width);resizer.height=parseInt(resizeBox.style.height);resizer.editorId=editor_id;resizer.resizeBox=resizeBox;resizer.horizontal=tinyMCE.getParam("theme_advanced_resize_horizontal",true)}else{resizer.resizing=false;resizeBox.style.display="none";editorArea.style.display=tinyMCE.isMSIE&&!tinyMCE.isOpera?"block":"table";tinyMCE.execCommand('mceResetDesignMode')}},_getColorHTML:function(id,n,cm){var i,h,cl;h='<span class="mceMenuLine"></span>';cl=tinyMCE.getParam(n,TinyMCE_AdvancedTheme._defColors).split(',');h+='<table class="mceColors"><tr>';for(i=0;i<cl.length;i++){c='tinyMCE.execInstanceCommand(\''+id+'\', \''+cm+'\', false, \'#'+cl[i]+'\');';h+='<td><a href="javascript:'+c+'" style="background-color: #'+cl[i]+'" onclick="'+c+';return false;"></a></td>';if((i+1)%8==0)h+='</tr><tr>'}h+='</tr></table>';return h},_insertImage:function(src,alt,border,hspace,vspace,width,height,align,title,onmouseover,onmouseout){tinyMCE.execCommand('mceBeginUndoLevel');if(src=="")return;if(!tinyMCE.imgElement&&tinyMCE.isSafari){var html="";html+='<img src="'+src+'" alt="'+alt+'"';html+=' border="'+border+'" hspace="'+hspace+'"';html+=' vspace="'+vspace+'" width="'+width+'"';html+=' height="'+height+'" align="'+align+'" title="'+title+'" onmouseover="'+onmouseover+'" onmouseout="'+onmouseout+'" />';tinyMCE.execCommand("mceInsertContent",false,html)}else{if(!tinyMCE.imgElement&&tinyMCE.selectedInstance){if(tinyMCE.isSafari)tinyMCE.execCommand("mceInsertContent",false,'<img src="'+tinyMCE.uniqueURL+'" />');else tinyMCE.selectedInstance.contentDocument.execCommand("insertimage",false,tinyMCE.uniqueURL);tinyMCE.imgElement=tinyMCE.getElementByAttributeValue(tinyMCE.selectedInstance.contentDocument.body,"img","src",tinyMCE.uniqueURL)}}if(tinyMCE.imgElement){var needsRepaint=false;var msrc=src;src=eval(tinyMCE.settings['urlconverter_callback']+"(src, tinyMCE.imgElement);");if(tinyMCE.getParam('convert_urls'))msrc=src;if(onmouseover&&onmouseover!="")onmouseover="this.src='"+eval(tinyMCE.settings['urlconverter_callback']+"(onmouseover, tinyMCE.imgElement);")+"';";if(onmouseout&&onmouseout!="")onmouseout="this.src='"+eval(tinyMCE.settings['urlconverter_callback']+"(onmouseout, tinyMCE.imgElement);")+"';";if(typeof(title)=="undefined")title=alt;if(width!=tinyMCE.imgElement.getAttribute("width")||height!=tinyMCE.imgElement.getAttribute("height")||align!=tinyMCE.imgElement.getAttribute("align"))needsRepaint=true;tinyMCE.setAttrib(tinyMCE.imgElement,'src',src);tinyMCE.setAttrib(tinyMCE.imgElement,'mce_src',msrc);tinyMCE.setAttrib(tinyMCE.imgElement,'alt',alt);tinyMCE.setAttrib(tinyMCE.imgElement,'title',title);tinyMCE.setAttrib(tinyMCE.imgElement,'align',align);tinyMCE.setAttrib(tinyMCE.imgElement,'border',border,true);tinyMCE.setAttrib(tinyMCE.imgElement,'hspace',hspace,true);tinyMCE.setAttrib(tinyMCE.imgElement,'vspace',vspace,true);tinyMCE.setAttrib(tinyMCE.imgElement,'width',width,true);tinyMCE.setAttrib(tinyMCE.imgElement,'height',height,true);tinyMCE.setAttrib(tinyMCE.imgElement,'onmouseover',onmouseover);tinyMCE.setAttrib(tinyMCE.imgElement,'onmouseout',onmouseout);if(width&&width!="")tinyMCE.imgElement.style.pixelWidth=width;if(height&&height!="")tinyMCE.imgElement.style.pixelHeight=height;if(needsRepaint)tinyMCE.selectedInstance.repaint()}tinyMCE.execCommand('mceEndUndoLevel')},_insertLink:function(href,target,title,onclick,style_class){tinyMCE.execCommand('mceBeginUndoLevel');if(tinyMCE.selectedInstance&&tinyMCE.selectedElement&&tinyMCE.selectedElement.nodeName.toLowerCase()=="img"){var doc=tinyMCE.selectedInstance.getDoc();var linkElement=tinyMCE.getParentElement(tinyMCE.selectedElement,"a");var newLink=false;if(!linkElement){linkElement=doc.createElement("a");newLink=true}var mhref=href;var thref=eval(tinyMCE.settings['urlconverter_callback']+"(href, linkElement);");mhref=tinyMCE.getParam('convert_urls')?href:mhref;tinyMCE.setAttrib(linkElement,'href',thref);tinyMCE.setAttrib(linkElement,'mce_href',mhref);tinyMCE.setAttrib(linkElement,'target',target);tinyMCE.setAttrib(linkElement,'title',title);tinyMCE.setAttrib(linkElement,'onclick',onclick);tinyMCE.setAttrib(linkElement,'class',style_class);if(newLink){linkElement.appendChild(tinyMCE.selectedElement.cloneNode(true));tinyMCE.selectedElement.parentNode.replaceChild(linkElement,tinyMCE.selectedElement)}return}if(!tinyMCE.linkElement&&tinyMCE.selectedInstance){if(tinyMCE.isSafari){tinyMCE.execCommand("mceInsertContent",false,'<a href="'+tinyMCE.uniqueURL+'">'+tinyMCE.selectedInstance.selection.getSelectedHTML()+'</a>')}else tinyMCE.selectedInstance.contentDocument.execCommand("createlink",false,tinyMCE.uniqueURL);tinyMCE.linkElement=tinyMCE.getElementByAttributeValue(tinyMCE.selectedInstance.contentDocument.body,"a","href",tinyMCE.uniqueURL);var elementArray=tinyMCE.getElementsByAttributeValue(tinyMCE.selectedInstance.contentDocument.body,"a","href",tinyMCE.uniqueURL);for(var i=0;i<elementArray.length;i++){var mhref=href;var thref=eval(tinyMCE.settings['urlconverter_callback']+"(href, elementArray[i]);");mhref=tinyMCE.getParam('convert_urls')?href:mhref;tinyMCE.setAttrib(elementArray[i],'href',thref);tinyMCE.setAttrib(elementArray[i],'mce_href',mhref);tinyMCE.setAttrib(elementArray[i],'target',target);tinyMCE.setAttrib(elementArray[i],'title',title);tinyMCE.setAttrib(elementArray[i],'onclick',onclick);tinyMCE.setAttrib(elementArray[i],'class',style_class)}tinyMCE.linkElement=elementArray[0]}if(tinyMCE.linkElement){var mhref=href;href=eval(tinyMCE.settings['urlconverter_callback']+"(href, tinyMCE.linkElement);");mhref=tinyMCE.getParam('convert_urls')?href:mhref;tinyMCE.setAttrib(tinyMCE.linkElement,'href',href);tinyMCE.setAttrib(tinyMCE.linkElement,'mce_href',mhref);tinyMCE.setAttrib(tinyMCE.linkElement,'target',target);tinyMCE.setAttrib(tinyMCE.linkElement,'title',title);tinyMCE.setAttrib(tinyMCE.linkElement,'onclick',onclick);tinyMCE.setAttrib(tinyMCE.linkElement,'class',style_class)}tinyMCE.execCommand('mceEndUndoLevel')}};tinyMCE.addTheme("advanced",TinyMCE_AdvancedTheme);tinyMCE.addButtonMap(TinyMCE_AdvancedTheme._buttonMap);
1
+ (function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,extend=tinymce.extend,each=tinymce.each,Cookie=tinymce.util.Cookie,lastExtID;tinymce.ThemeManager.requireLangPack('advanced');tinymce.create('tinymce.themes.AdvancedTheme',{controls:{bold:['bold_desc','Bold'],italic:['italic_desc','Italic'],underline:['underline_desc','Underline'],strikethrough:['striketrough_desc','Strikethrough'],justifyleft:['justifyleft_desc','JustifyLeft'],justifycenter:['justifycenter_desc','JustifyCenter'],justifyright:['justifyright_desc','JustifyRight'],justifyfull:['justifyfull_desc','JustifyFull'],bullist:['bullist_desc','InsertUnorderedList'],numlist:['numlist_desc','InsertOrderedList'],outdent:['outdent_desc','Outdent'],indent:['indent_desc','Indent'],cut:['cut_desc','Cut'],copy:['copy_desc','Copy'],paste:['paste_desc','Paste'],undo:['undo_desc','Undo'],redo:['redo_desc','Redo'],link:['link_desc','mceLink'],unlink:['unlink_desc','unlink'],image:['image_desc','mceImage'],cleanup:['cleanup_desc','mceCleanup'],help:['help_desc','mceHelp'],code:['code_desc','mceCodeEditor'],hr:['hr_desc','InsertHorizontalRule'],removeformat:['removeformat_desc','RemoveFormat'],sub:['sub_desc','subscript'],sup:['sup_desc','superscript'],forecolor:['forecolor_desc','ForeColor'],forecolorpicker:['forecolor_desc','mceForeColor'],backcolor:['backcolor_desc','HiliteColor'],backcolorpicker:['backcolor_desc','mceBackColor'],charmap:['charmap_desc','mceCharMap'],visualaid:['visualaid_desc','mceToggleVisualAid'],anchor:['anchor_desc','mceInsertAnchor'],newdocument:['newdocument_desc','mceNewDocument'],blockquote:['blockquote_desc','mceBlockQuote']},stateControls:['bold','italic','underline','strikethrough','bullist','numlist','justifyleft','justifycenter','justifyright','justifyfull','sub','sup','blockquote'],init:function(ed,url){var t=this,s;t.editor=ed;t.url=url;t.onResolveName=new tinymce.util.Dispatcher(this);t.settings=s=extend({theme_advanced_path:true,theme_advanced_toolbar_location:'bottom',theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"center",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_font_sizes:"1,2,3,4,5,6,7",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1},ed.settings);ed.onInit.add(function(){ed.onNodeChange.add(t._nodeChanged,t);ed.dom.loadCSS(ed.baseURI.toAbsolute("themes/advanced/skins/"+ed.settings.skin+"/content.css"));});ed.onSetProgressState.add(function(ed,b,ti){var co,id=ed.id,tb;if(b){t.progressTimer=setTimeout(function(){co=ed.getContainer();co=co.insertBefore(DOM.create('DIV',{style:'position:relative'}),co.firstChild);tb=DOM.get(ed.id+'_tbl');DOM.add(co,'div',{id:id+'_blocker','class':'mceBlocker',style:{width:tb.clientWidth+2,height:tb.clientHeight+2}});DOM.add(co,'div',{id:id+'_progress','class':'mceProgress',style:{left:tb.clientWidth/ 2, top : tb.clientHeight /2}});},ti||0);}else{DOM.remove(id+'_blocker');DOM.remove(id+'_progress');clearTimeout(t.progressTimer);}});DOM.loadCSS(ed.baseURI.toAbsolute(s.editor_css||"themes/advanced/skins/"+ed.settings.skin+"/ui.css"));},createControl:function(n,cf){var cd,c;if(c=cf.createControl(n))return c;switch(n){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu();}if((cd=this.controls[n]))return cf.createButton(n,{title:"advanced."+cd[0],cmd:cd[1],ui:cd[2],value:cd[3]});},execCommand:function(cmd,ui,val){var f=this['_'+cmd];if(f){f.call(this,ui,val);return true;}return false;},_importClasses:function(){var ed=this.editor,c=ed.controlManager.get('styleselect');if(c.getLength()==0){each(ed.dom.getClasses(),function(o){c.add(o['class'],o['class']);});}},_createStyleSelect:function(n){var t=this,ed=t.editor,cf=ed.controlManager,c=cf.createListBox('styleselect',{title:'advanced.style_select',onselect:function(v){if(c.selectedValue===v){ed.execCommand('mceSetStyleInfo',0,{command:'removeformat'});c.select();return false;}else ed.execCommand('mceSetCSSClass',0,v);}});each((t.settings.theme_advanced_styles||'').split(';'),function(v){var p=v.split('=');if(v)c.add(t.editor.translate(p[0]),p[1]);});c.onPostRender.add(function(ed,n){Event.add(n,'focus',t._importClasses,t);Event.add(n,'mousedown',t._importClasses,t);});return c;},_createFontSelect:function(){var c,t=this;c=t.editor.controlManager.createListBox('fontselect',{title:'advanced.fontdefault',cmd:'FontName'});each(t.settings.theme_advanced_fonts.split(';'),function(v){var p=v.split('='),st;if(p[1].indexOf('dings')==-1)st='font-family:'+p[1];c.add(t.editor.translate(p[0]),p[1],{style:st});});return c;},_createFontSizeSelect:function(){var c,t=this,lo=["1 (8 pt)","2 (10 pt)","3 (12 pt)","4 (14 pt)","5 (18 pt)","6 (24 pt)","7 (36 pt)"],fz=[8,10,12,14,18,24,36];c=t.editor.controlManager.createListBox('fontsizeselect',{title:'advanced.font_size',cmd:'FontSize'});each(t.settings.theme_advanced_font_sizes.split(','),function(v){c.add(lo[parseInt(v)-1],v,{'style':'font-size:'+fz[v-1]+'pt','class':'fontSize'+v});});return c;},_createBlockFormats:function(){var c,fmts={p:'advanced.paragraph',address:'advanced.address',pre:'advanced.pre',h1:'advanced.h1',h2:'advanced.h2',h3:'advanced.h3',h4:'advanced.h4',h5:'advanced.h5',h6:'advanced.h6',div:'advanced.div',blockquote:'advanced.blockquote',code:'advanced.code',dt:'advanced.dt',dd:'advanced.dd',samp:'advanced.samp'},t=this;c=t.editor.controlManager.createListBox('formatselect',{title:'advanced.block',cmd:'FormatBlock'});each(t.settings.theme_advanced_blockformats.split(','),function(v){c.add(t.editor.translate(fmts[v]),v,{element:v,'class':v.indexOf('h')==0?'':'preview'});});return c;},_createForeColorMenu:function(){var c,t=this,s=t.settings,o={},v;if(s.theme_advanced_more_colors){o.more_colors_func=function(){t._mceColorPicker(0,{color:c.value,func:function(co){c.setColor(co);}});};}if(v=s.theme_advanced_text_colors)o.colors=v;o.title='advanced.forecolor_desc';o.cmd='ForeColor';o.scope=this;c=t.editor.controlManager.createColorSplitButton('forecolor',o);return c;},_createBackColorMenu:function(){var c,t=this,s=t.settings,o={},v;if(s.theme_advanced_more_colors){o.more_colors_func=function(){t._mceColorPicker(0,{color:c.value,func:function(co){c.setColor(co);}});};}if(v=s.theme_advanced_background_colors)o.colors=v;o.title='advanced.backcolor_desc';o.cmd='HiliteColor';o.scope=this;c=t.editor.controlManager.createColorSplitButton('backcolor',o);return c;},renderUI:function(o){var n,ic,tb,t=this,ed=t.editor,s=t.settings,sc,p,nl;n=p=DOM.create('div',{id:ed.id+'_parent','class':'mceEditor '+ed.settings.skin+'Skin'});if(!DOM.boxModel)n=DOM.add(n,'div',{'class':'mceOldBoxModel'});n=sc=DOM.add(n,'table',{id:ed.id+'_tbl','class':'mceLayout',cellSpacing:0,cellPadding:0});n=tb=DOM.add(n,'tbody');switch((s.theme_advanced_layout_manager||'').toLowerCase()){case"rowlayout":ic=t._rowLayout(s,tb,o);break;case"customlayout":ic=ed.execCallback("theme_advanced_custom_layout",s,tb,o,p);break;default:ic=t._simpleLayout(s,tb,o,p);}n=o.targetNode;nl=sc.rows;DOM.addClass(nl[0],'first');DOM.addClass(nl[nl.length-1],'last');each(DOM.select('tr',tb),function(n){DOM.addClass(n.firstChild,'first');DOM.addClass(n.childNodes[n.childNodes.length-1],'last');});if(DOM.get(s.theme_advanced_toolbar_container))DOM.get(s.theme_advanced_toolbar_container).appendChild(p);else DOM.insertAfter(p,n);Event.add(ed.id+'_path_row','click',function(e){e=e.target;if(e.nodeName=='A'){t._sel(e.href.replace(/^[^#]*#/,''));return Event.cancel(e);}});if(s.theme_advanced_toolbar_location=='external')o.deltaHeight=0;t.deltaHeight=o.deltaHeight;o.targetNode=null;return{iframeContainer:ic,editorContainer:ed.id+'_parent',sizeContainer:sc,deltaHeight:o.deltaHeight};},getInfo:function(){return{longname:'Simple theme',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',version:tinymce.majorVersion+"."+tinymce.minorVersion}},_simpleLayout:function(s,tb,o,p){var t=this,ed=t.editor,lo=s.theme_advanced_toolbar_location,sl=s.theme_advanced_statusbar_location,n,ic,etb,c;if(lo=='top')t._addToolbars(tb,o);if(lo=='external'){n=c=DOM.create('div',{style:'position:relative'});n=DOM.add(n,'div',{id:ed.id+'_external','class':'mceExternalToolbar'});DOM.add(n,'a',{id:ed.id+'_external_close',href:'javascript:;','class':'mceExternalClose'});n=DOM.add(n,'table',{id:ed.id+'_tblext',cellSpacing:0,cellPadding:0});etb=DOM.add(n,'tbody');if(p.firstChild.className=='mceOldBoxModel')p.firstChild.appendChild(c);else p.insertBefore(c,p.firstChild);t._addToolbars(etb,o);ed.onMouseUp.add(function(){var e=DOM.get(ed.id+'_external');DOM.show(e);DOM.hide(lastExtID);var f=Event.add(ed.id+'_external_close','click',function(){DOM.hide(ed.id+'_external');Event.remove(ed.id+'_external_close','click',f);});DOM.show(e);DOM.setStyle(e,'top',0-DOM.getRect(ed.id+'_tblext').h-1);DOM.hide(e);DOM.show(e);e.style.filter='';lastExtID=ed.id+'_external';e=null;});}if(sl=='top')t._addStatusBar(tb,o);if(!s.theme_advanced_toolbar_container){n=DOM.add(tb,'tr');n=ic=DOM.add(n,'td',{'class':'mceIframeContainer'});}if(lo=='bottom')t._addToolbars(tb,o);if(sl=='bottom')t._addStatusBar(tb,o);return ic;},_rowLayout:function(s,tb,o){var t=this,ed=t.editor,dc,da,cf=ed.controlManager,n,ic,to;dc=s.theme_advanced_containers_default_class||'';da=s.theme_advanced_containers_default_align||'center';each((s.theme_advanced_containers||'').split(','),function(c,i){var v=s['theme_advanced_container_'+c].toLowerCase();switch(v){case'mceeditor':n=DOM.add(tb,'tr');n=ic=DOM.add(n,'td',{'class':'mceIframeContainer'});break;case'mceelementpath':t._addStatusBar(tb,o);break;default:n=DOM.add(DOM.add(tb,'tr'),'td',{'class':'mceToolbar '+(s['theme_advanced_container_'+c+'_class']||dc),align:s['theme_advanced_container_'+c+'_align']||da});to=cf.createToolbar("toolbar"+i);t._addControls(v,to);n.innerHTML=to.renderHTML();o.deltaHeight-=s.theme_advanced_row_height;}});return ic;},_addControls:function(v,tb){var t=this,s=t.settings,di,cf=t.editor.controlManager;if(s.theme_advanced_disable&&!t._disabled){di={};each(s.theme_advanced_disable.split(','),function(v){di[v]=1;});t._disabled=di;}else di=t._disabled;each(v.split(','),function(n){var c;if(di&&di[n])return;if(n=='tablecontrols'){each(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"],function(n){n=t.createControl(n,cf);if(n)tb.add(n);});return;}c=t.createControl(n,cf);if(c)tb.add(c);});},_addToolbars:function(c,o){var t=this,i,tb,ed=t.editor,s=t.settings,v,cf=ed.controlManager,di,n,h=[];n=DOM.add(DOM.add(c,'tr'),'td',{'class':'mceToolbar',align:s.theme_advanced_toolbar_align});if(!ed.getParam('accessibility_focus')||ed.getParam('tab_focus'))h.push(DOM.createHTML('a',{href:'#',onfocus:'tinyMCE.get(\''+ed.id+'\').focus();'},'<!-- IE -->'));h.push(DOM.createHTML('a',{href:'#',accesskey:'q',title:ed.getLang("advanced.toolbar_focus")},'<!-- IE -->'));for(i=1;(v=s['theme_advanced_buttons'+i]);i++){tb=cf.createToolbar("toolbar"+i);if(s['theme_advanced_buttons'+i+'_add'])v+=','+s['theme_advanced_buttons'+i+'_add'];if(s['theme_advanced_buttons'+i+'_add_before'])v=s['theme_advanced_buttons'+i+'_add_before']+','+v;t._addControls(v,tb,di);h.push(tb.renderHTML());o.deltaHeight-=s.theme_advanced_row_height;}h.push(DOM.createHTML('a',{href:'#',accesskey:'z',title:ed.getLang("advanced.toolbar_focus"),onfocus:'tinyMCE.getInstanceById(\''+ed.id+'\').focus();'},'<!-- IE -->'));n.innerHTML=h.join('');},_addStatusBar:function(tb,o){var n,t=this,ed=t.editor,s=t.settings,r,mf,me,td;n=DOM.add(tb,'tr');n=td=DOM.add(n,'td',{'class':'mceStatusbar'});n=DOM.add(n,'div',{id:ed.id+'_path_row'},s.theme_advanced_path?ed.translate('advanced.path')+': ':'&nbsp;');DOM.add(n,'a',{href:'#',accesskey:'x'});if(s.theme_advanced_resizing&&!tinymce.isOldWebKit){DOM.add(td,'a',{id:ed.id+'_resize',href:'javascript:;',onclick:"return false;",'class':'resize'});if(s.theme_advanced_resizing_use_cookie){ed.onPostRender.add(function(){var o=Cookie.getHash("TinyMCE_"+ed.id+"_size"),c=DOM.get(ed.id+'_tbl');if(!o)return;if(s.theme_advanced_resize_horizontal)c.style.width=o.cw+'px';c.style.height=o.ch+'px';DOM.get(ed.id+'_ifr').style.height=(parseInt(o.ch)+t.deltaHeight)+'px';});}ed.onPostRender.add(function(){Event.add(ed.id+'_resize','mousedown',function(e){var c,p,w,h,n,pa;c=DOM.get(ed.id+'_tbl');w=c.clientWidth;h=c.clientHeight;miw=s.theme_advanced_resizing_min_width||100;mih=s.theme_advanced_resizing_min_height||100;maw=s.theme_advanced_resizing_max_width||0xFFFF;mah=s.theme_advanced_resizing_max_height||0xFFFF;p=DOM.add(DOM.get(ed.id+'_parent'),'div',{'class':'mcePlaceHolder'});DOM.setStyles(p,{width:w,height:h});DOM.hide(c);DOM.show(p);r={x:e.screenX,y:e.screenY,w:w,h:h,dx:null,dy:null};mf=Event.add(document,'mousemove',function(e){var w,h;r.dx=e.screenX-r.x;r.dy=e.screenY-r.y;w=Math.max(miw,r.w+r.dx);h=Math.max(mih,r.h+r.dy);w=Math.min(maw,w);h=Math.min(mah,h);if(s.theme_advanced_resize_horizontal)p.style.width=w+'px';p.style.height=h+'px';return Event.cancel(e);});me=Event.add(document,'mouseup',function(e){var ifr;Event.remove(document,'mousemove',mf);Event.remove(document,'mouseup',me);c.style.display='';DOM.remove(p);if(r.dx===null)return;ifr=DOM.get(ed.id+'_ifr');if(s.theme_advanced_resize_horizontal)c.style.width=(r.w+r.dx)+'px';c.style.height=(r.h+r.dy)+'px';ifr.style.height=(ifr.clientHeight+r.dy)+'px';if(s.theme_advanced_resizing_use_cookie){Cookie.setHash("TinyMCE_"+ed.id+"_size",{cw:r.w+r.dx,ch:r.h+r.dy});}});return Event.cancel(e);});});}o.deltaHeight-=21;n=tb=null;},_nodeChanged:function(ed,cm,n,co){var t=this,p,de=0,v,c,s=t.settings;tinymce.each(t.stateControls,function(c){cm.setActive(c,ed.queryCommandState(t.controls[c][1]));});cm.setActive('visualaid',ed.hasVisual);cm.setDisabled('undo',!ed.undoManager.hasUndo()&&!ed.typing);cm.setDisabled('redo',!ed.undoManager.hasRedo());cm.setDisabled('outdent',!ed.queryCommandState('Outdent'));p=DOM.getParent(n,'A');if(c=cm.get('link')){if(!p||!p.name){c.setDisabled(!p&&co);c.setActive(!!p);}}if(c=cm.get('unlink')){c.setDisabled(!p&&co);c.setActive(!!p&&!p.name);}if(c=cm.get('anchor')){c.setActive(!!p&&p.name);if(tinymce.isWebKit){p=DOM.getParent(n,'IMG');c.setActive(!!p&&DOM.getAttrib(p,'mce_name')=='a');}}p=DOM.getParent(n,'IMG');if(c=cm.get('image'))c.setActive(!!p&&n.className.indexOf('mceItem')==-1);if(c=cm.get('styleselect')){if(n.className){t._importClasses();c.select(n.className);}else c.select();}if(c=cm.get('formatselect')){p=DOM.getParent(n,DOM.isBlock);if(p)c.select(p.nodeName.toLowerCase());}if(c=cm.get('fontselect'))c.select(ed.queryCommandValue('FontName'));if(c=cm.get('fontsizeselect'))c.select(ed.queryCommandValue('FontSize'));if(s.theme_advanced_path&&s.theme_advanced_statusbar_location){p=DOM.get(ed.id+'_path')||DOM.add(ed.id+'_path_row','span',{id:ed.id+'_path'});p.innerHTML='';ed.dom.getParent(n,function(n){var na=n.nodeName.toLowerCase(),u,pi,ti='';if(n.nodeType!=1||(DOM.hasClass(n,'mceItemHidden')||DOM.hasClass(n,'mceItemRemoved')))return;if(v=DOM.getAttrib(n,'mce_name'))na=v;if(tinymce.isIE&&n.scopeName!=='HTML')na=n.scopeName+':'+na;na=na.replace(/mce\:/g,'');switch(na){case'b':na='strong';break;case'i':na='em';break;case'img':if(v=DOM.getAttrib(n,'src'))ti+='src: '+v+' ';break;case'a':if(v=DOM.getAttrib(n,'name')){ti+='name: '+v+' ';na+='#'+v;}if(v=DOM.getAttrib(n,'href'))ti+='href: '+v+' ';break;case'font':if(s.convert_fonts_to_spans)na='span';if(v=DOM.getAttrib(n,'face'))ti+='font: '+v+' ';if(v=DOM.getAttrib(n,'size'))ti+='size: '+v+' ';if(v=DOM.getAttrib(n,'color'))ti+='color: '+v+' ';break;case'span':if(v=DOM.getAttrib(n,'style'))ti+='style: '+v+' ';break;}if(v=DOM.getAttrib(n,'id'))ti+='id: '+v+' ';if(v=n.className){v=v.replace(/(webkit-[\w\-]+|Apple-[\w\-]+|mceItem\w+|mceVisualAid)/g,'');if(v&&v.indexOf('mceItem')==-1){ti+='class: '+v+' ';if(DOM.isBlock(n)||na=='img'||na=='span')na+='.'+v;}}na=na.replace(/(html:)/g,'');na={name:na,node:n,title:ti};t.onResolveName.dispatch(t,na);ti=na.title;na=na.name;pi=DOM.create('a',{'href':"#"+(de++)+"",onmousedown:"return false;",title:ti},na);if(p.hasChildNodes()){p.insertBefore(document.createTextNode(' \u00bb '),p.firstChild);p.insertBefore(pi,p.firstChild);}else p.appendChild(pi);},ed.getBody());}},_sel:function(v){this.editor.execCommand('mceSelectNodeDepth',false,v);},_mceInsertAnchor:function(ui,v){var ed=this.editor;ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/anchor.htm',width:320+Number(ed.getLang('advanced.anchor_delta_width',0)),height:90+Number(ed.getLang('advanced.anchor_delta_height',0)),inline:true},{theme_url:this.url});},_mceCharMap:function(){var ed=this.editor;ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/charmap.htm',width:550+Number(ed.getLang('advanced.charmap_delta_width',0)),height:250+Number(ed.getLang('advanced.charmap_delta_height',0)),inline:true},{theme_url:this.url});},_mceHelp:function(){var ed=this.editor;ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/about.htm',width:480,height:380,inline:true},{theme_url:this.url});},_mceColorPicker:function(u,v){var ed=this.editor;v=v||{};ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/color_picker.htm',width:375+Number(ed.getLang('advanced.colorpicker_delta_width',0)),height:250+Number(ed.getLang('advanced.colorpicker_delta_height',0)),close_previous:false,inline:true},{input_color:v.color,func:v.func,theme_url:this.url});},_mceCodeEditor:function(ui,val){var ed=this.editor;ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/source_editor.htm',width:parseInt(ed.getParam("theme_advanced_source_editor_width",720)),height:parseInt(ed.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url});},_mceImage:function(ui,val){var ed=this.editor;ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/image.htm',width:355+Number(ed.getLang('advanced.image_delta_width',0)),height:275+Number(ed.getLang('advanced.image_delta_height',0)),inline:true},{theme_url:this.url});},_mceLink:function(ui,val){var ed=this.editor;ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/link.htm',width:310+Number(ed.getLang('advanced.link_delta_width',0)),height:200+Number(ed.getLang('advanced.link_delta_height',0)),inline:true},{theme_url:this.url});},_mceNewDocument:function(){var ed=this.editor;ed.windowManager.confirm('advanced.newdocument',function(s){if(s)ed.execCommand('mceSetContent',false,'');});},_mceForeColor:function(){var t=this;this._mceColorPicker(0,{func:function(co){t.editor.execCommand('ForeColor',false,co);}});},_mceBackColor:function(){var t=this;this._mceColorPicker(0,{func:function(co){t.editor.execCommand('HiliteColor',false,co);}});}});tinymce.ThemeManager.add('advanced',tinymce.themes.AdvancedTheme);}());
@@ -1,1534 +1,990 @@
1
1
  /**
2
- * $Id: editor_template_src.js 129 2006-10-23 09:45:17Z spocke $
2
+ * $Id: editor_template_src.js 492 2007-12-13 14:11:51Z spocke $
3
3
  *
4
4
  * @author Moxiecode
5
- * @copyright Copyright � 2004-2006, Moxiecode Systems AB, All rights reserved.
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
6
  */
7
7
 
8
- /* Import theme specific language pack */
9
- tinyMCE.importThemeLanguagePack('advanced');
10
-
11
- var TinyMCE_AdvancedTheme = {
12
- // Private theme fields
13
- _defColors : "000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",
14
- _autoImportCSSClasses : true,
15
- _resizer : {},
16
- _buttons : [
17
- // Control id, button img, button title, command, user_interface, value
18
- ['bold', '{$lang_bold_img}', 'lang_bold_desc', 'Bold'],
19
- ['italic', '{$lang_italic_img}', 'lang_italic_desc', 'Italic'],
20
- ['underline', '{$lang_underline_img}', 'lang_underline_desc', 'Underline'],
21
- ['strikethrough', 'strikethrough.gif', 'lang_striketrough_desc', 'Strikethrough'],
22
- ['justifyleft', 'justifyleft.gif', 'lang_justifyleft_desc', 'JustifyLeft'],
23
- ['justifycenter', 'justifycenter.gif', 'lang_justifycenter_desc', 'JustifyCenter'],
24
- ['justifyright', 'justifyright.gif', 'lang_justifyright_desc', 'JustifyRight'],
25
- ['justifyfull', 'justifyfull.gif', 'lang_justifyfull_desc', 'JustifyFull'],
26
- ['bullist', 'bullist.gif', 'lang_bullist_desc', 'InsertUnorderedList'],
27
- ['numlist', 'numlist.gif', 'lang_numlist_desc', 'InsertOrderedList'],
28
- ['outdent', 'outdent.gif', 'lang_outdent_desc', 'Outdent'],
29
- ['indent', 'indent.gif', 'lang_indent_desc', 'Indent'],
30
- ['cut', 'cut.gif', 'lang_cut_desc', 'Cut'],
31
- ['copy', 'copy.gif', 'lang_copy_desc', 'Copy'],
32
- ['paste', 'paste.gif', 'lang_paste_desc', 'Paste'],
33
- ['undo', 'undo.gif', 'lang_undo_desc', 'Undo'],
34
- ['redo', 'redo.gif', 'lang_redo_desc', 'Redo'],
35
- ['link', 'link.gif', 'lang_link_desc', 'mceLink', true],
36
- ['unlink', 'unlink.gif', 'lang_unlink_desc', 'unlink'],
37
- ['image', 'image.gif', 'lang_image_desc', 'mceImage', true],
38
- ['cleanup', 'cleanup.gif', 'lang_cleanup_desc', 'mceCleanup'],
39
- ['help', 'help.gif', 'lang_help_desc', 'mceHelp'],
40
- ['code', 'code.gif', 'lang_theme_code_desc', 'mceCodeEditor'],
41
- ['hr', 'hr.gif', 'lang_theme_hr_desc', 'inserthorizontalrule'],
42
- ['removeformat', 'removeformat.gif', 'lang_theme_removeformat_desc', 'removeformat'],
43
- ['sub', 'sub.gif', 'lang_theme_sub_desc', 'subscript'],
44
- ['sup', 'sup.gif', 'lang_theme_sup_desc', 'superscript'],
45
- ['forecolor', 'forecolor.gif', 'lang_theme_forecolor_desc', 'forecolor', true],
46
- ['backcolor', 'backcolor.gif', 'lang_theme_backcolor_desc', 'HiliteColor', true],
47
- ['charmap', 'charmap.gif', 'lang_theme_charmap_desc', 'mceCharMap'],
48
- ['visualaid', 'visualaid.gif', 'lang_theme_visualaid_desc', 'mceToggleVisualAid'],
49
- ['anchor', 'anchor.gif', 'lang_theme_anchor_desc', 'mceInsertAnchor'],
50
- ['newdocument', 'newdocument.gif', 'lang_newdocument_desc', 'mceNewDocument']
51
- ],
52
-
53
- _buttonMap : 'anchor,backcolor,bold,bullist,charmap,cleanup,code,copy,cut,forecolor,help,hr,image,indent,italic,justifycenter,justifyfull,justifyleft,justifyright,link,newdocument,numlist,outdent,paste,redo,removeformat,strikethrough,sub,sup,underline,undo,unlink,visualaid,advhr,ltr,rtl,emotions,flash,fullpage,fullscreen,iespell,insertdate,inserttime,pastetext,pasteword,selectall,preview,print,save,replace,search,table,cell_props,delete_col,delete_row,col_after,col_before,row_after,row_before,merge_cells,row_props,split_cells,delete_table',
54
-
55
- /**
56
- * Returns HTML code for the specificed control.
57
- */
58
- getControlHTML : function(button_name) {
59
- var i, x, but;
60
-
61
- // Lookup button in button list
62
- for (i=0; i<TinyMCE_AdvancedTheme._buttons.length; i++) {
63
- but = TinyMCE_AdvancedTheme._buttons[i];
64
-
65
- if (but[0] == button_name && (button_name == "forecolor" || button_name == "backcolor"))
66
- return tinyMCE.getMenuButtonHTML(but[0], but[2], '{$themeurl}/images/' + but[1], but[3] + "Menu", but[3], (but.length > 4 ? but[4] : false), (but.length > 5 ? but[5] : null));
67
-
68
- if (but[0] == button_name)
69
- return tinyMCE.getButtonHTML(but[0], but[2], '{$themeurl}/images/' + but[1], but[3], (but.length > 4 ? but[4] : false), (but.length > 5 ? but[5] : null));
70
- }
71
-
72
- // Custom controlls other than buttons
73
- switch (button_name) {
74
- case "formatselect":
75
- var html = '<select id="{$editor_id}_formatSelect" name="{$editor_id}_formatSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FormatBlock\',false,this.options[this.selectedIndex].value);" class="mceSelectList">';
76
- var formats = tinyMCE.getParam("theme_advanced_blockformats", "p,address,pre,h1,h2,h3,h4,h5,h6", true).split(',');
77
- var lookup = [
78
- ['p', '{$lang_theme_paragraph}'],
79
- ['address', '{$lang_theme_address}'],
80
- ['pre', '{$lang_theme_pre}'],
81
- ['h1', '{$lang_theme_h1}'],
82
- ['h2', '{$lang_theme_h2}'],
83
- ['h3', '{$lang_theme_h3}'],
84
- ['h4', '{$lang_theme_h4}'],
85
- ['h5', '{$lang_theme_h5}'],
86
- ['h6', '{$lang_theme_h6}'],
87
- ['div', '{$lang_theme_div}'],
88
- ['blockquote', '{$lang_theme_blockquote}'],
89
- ['code', '{$lang_theme_code}'],
90
- ['dt', '{$lang_theme_dt}'],
91
- ['dd', '{$lang_theme_dd}'],
92
- ['samp', '{$lang_theme_samp}']
93
- ];
94
-
95
- html += '<option value="">{$lang_theme_block}</option>';
96
-
97
- // Build format select
98
- for (var i=0; i<formats.length; i++) {
99
- for (var x=0; x<lookup.length; x++) {
100
- if (formats[i] == lookup[x][0])
101
- html += '<option value="&lt;' + lookup[x][0] + '&gt;">' + lookup[x][1] + '</option>';
102
- }
103
- }
104
-
105
- html += '</select>';
106
-
107
- return html;
108
-
109
- case "styleselect":
110
- return '<select id="{$editor_id}_styleSelect" onmousedown="tinyMCE.themes.advanced._setupCSSClasses(\'{$editor_id}\');" name="{$editor_id}_styleSelect" onfocus="tinyMCE.addSelectAccessibility(event,this,window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSetCSSClass\',false,this.options[this.selectedIndex].value);" class="mceSelectList">{$style_select_options}</select>';
111
-
112
- case "fontselect":
113
- var fontHTML = '<select id="{$editor_id}_fontNameSelect" name="{$editor_id}_fontNameSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FontName\',false,this.options[this.selectedIndex].value);" class="mceSelectList"><option value="">{$lang_theme_fontdefault}</option>';
114
- var iFonts = 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings';
115
- var nFonts = 'Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sand;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats';
116
- var fonts = tinyMCE.getParam("theme_advanced_fonts", nFonts).split(';');
117
- for (i=0; i<fonts.length; i++) {
118
- if (fonts[i] != '') {
119
- var parts = fonts[i].split('=');
120
- fontHTML += '<option value="' + parts[1] + '">' + parts[0] + '</option>';
121
- }
122
- }
123
-
124
- fontHTML += '</select>';
125
- return fontHTML;
126
-
127
- case "fontsizeselect":
128
- return '<select id="{$editor_id}_fontSizeSelect" name="{$editor_id}_fontSizeSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FontSize\',false,this.options[this.selectedIndex].value);" class="mceSelectList">'+
129
- '<option value="0">{$lang_theme_font_size}</option>'+
130
- '<option value="1">1 (8 pt)</option>'+
131
- '<option value="2">2 (10 pt)</option>'+
132
- '<option value="3">3 (12 pt)</option>'+
133
- '<option value="4">4 (14 pt)</option>'+
134
- '<option value="5">5 (18 pt)</option>'+
135
- '<option value="6">6 (24 pt)</option>'+
136
- '<option value="7">7 (36 pt)</option>'+
137
- '</select>';
138
-
139
- case "|":
140
- case "separator":
141
- return '<img src="{$themeurl}/images/separator.gif" width="2" height="20" class="mceSeparatorLine" />';
142
-
143
- case "spacer":
144
- return '<img src="{$themeurl}/images/separator.gif" width="2" height="15" border="0" class="mceSeparatorLine" style="vertical-align: middle" />';
145
-
146
- case "rowseparator":
147
- return '<br />';
148
- }
149
-
150
- return "";
151
- },
152
-
153
- /**
154
- * Theme specific execcommand handling.
155
- */
156
- execCommand : function(editor_id, element, command, user_interface, value) {
157
- switch (command) {
158
- case 'mceHelp':
159
- tinyMCE.openWindow({
160
- file : 'about.htm',
161
- width : 480,
162
- height : 380
163
- }, {
164
- tinymce_version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion,
165
- tinymce_releasedate : tinyMCE.releaseDate,
166
- inline : "yes"
167
- });
168
- return true;
169
-
170
- case "mceLink":
171
- var inst = tinyMCE.getInstanceById(editor_id);
172
- var doc = inst.getDoc();
173
- var selectedText = "";
174
-
175
- if (tinyMCE.isMSIE) {
176
- var rng = doc.selection.createRange();
177
- selectedText = rng.text;
178
- } else
179
- selectedText = inst.getSel().toString();
180
-
181
- if (!tinyMCE.linkElement) {
182
- if ((tinyMCE.selectedElement.nodeName.toLowerCase() != "img") && (selectedText.length <= 0))
183
- return true;
184
- }
185
-
186
- var href = "", target = "", title = "", onclick = "", action = "insert", style_class = "";
187
-
188
- if (tinyMCE.selectedElement.nodeName.toLowerCase() == "a")
189
- tinyMCE.linkElement = tinyMCE.selectedElement;
190
-
191
- // Is anchor not a link
192
- if (tinyMCE.linkElement != null && tinyMCE.getAttrib(tinyMCE.linkElement, 'href') == "")
193
- tinyMCE.linkElement = null;
194
-
195
- if (tinyMCE.linkElement) {
196
- href = tinyMCE.getAttrib(tinyMCE.linkElement, 'href');
197
- target = tinyMCE.getAttrib(tinyMCE.linkElement, 'target');
198
- title = tinyMCE.getAttrib(tinyMCE.linkElement, 'title');
199
- onclick = tinyMCE.getAttrib(tinyMCE.linkElement, 'onclick');
200
- style_class = tinyMCE.getAttrib(tinyMCE.linkElement, 'class');
201
-
202
- // Try old onclick to if copy/pasted content
203
- if (onclick == "")
204
- onclick = tinyMCE.getAttrib(tinyMCE.linkElement, 'onclick');
205
-
206
- onclick = tinyMCE.cleanupEventStr(onclick);
207
-
208
- href = eval(tinyMCE.settings['urlconverter_callback'] + "(href, tinyMCE.linkElement, true);");
209
-
210
- // Use mce_href if defined
211
- mceRealHref = tinyMCE.getAttrib(tinyMCE.linkElement, 'mce_href');
212
- if (mceRealHref != "") {
213
- href = mceRealHref;
214
-
215
- if (tinyMCE.getParam('convert_urls'))
216
- href = eval(tinyMCE.settings['urlconverter_callback'] + "(href, tinyMCE.linkElement, true);");
217
- }
218
-
219
- action = "update";
220
- }
221
-
222
- var template = new Array();
223
-
224
- template['file'] = 'link.htm';
225
- template['width'] = 310;
226
- template['height'] = 200;
227
-
228
- // Language specific width and height addons
229
- template['width'] += tinyMCE.getLang('lang_insert_link_delta_width', 0);
230
- template['height'] += tinyMCE.getLang('lang_insert_link_delta_height', 0);
231
-
232
- if (inst.settings['insertlink_callback']) {
233
- var returnVal = eval(inst.settings['insertlink_callback'] + "(href, target, title, onclick, action, style_class);");
234
- if (returnVal && returnVal['href'])
235
- TinyMCE_AdvancedTheme._insertLink(returnVal['href'], returnVal['target'], returnVal['title'], returnVal['onclick'], returnVal['style_class']);
8
+ (function() {
9
+ var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, Cookie = tinymce.util.Cookie, lastExtID;
10
+
11
+ // Tell it to load theme specific language pack(s)
12
+ tinymce.ThemeManager.requireLangPack('advanced');
13
+
14
+ tinymce.create('tinymce.themes.AdvancedTheme', {
15
+ // Control name lookup, format: title, command
16
+ controls : {
17
+ bold : ['bold_desc', 'Bold'],
18
+ italic : ['italic_desc', 'Italic'],
19
+ underline : ['underline_desc', 'Underline'],
20
+ strikethrough : ['striketrough_desc', 'Strikethrough'],
21
+ justifyleft : ['justifyleft_desc', 'JustifyLeft'],
22
+ justifycenter : ['justifycenter_desc', 'JustifyCenter'],
23
+ justifyright : ['justifyright_desc', 'JustifyRight'],
24
+ justifyfull : ['justifyfull_desc', 'JustifyFull'],
25
+ bullist : ['bullist_desc', 'InsertUnorderedList'],
26
+ numlist : ['numlist_desc', 'InsertOrderedList'],
27
+ outdent : ['outdent_desc', 'Outdent'],
28
+ indent : ['indent_desc', 'Indent'],
29
+ cut : ['cut_desc', 'Cut'],
30
+ copy : ['copy_desc', 'Copy'],
31
+ paste : ['paste_desc', 'Paste'],
32
+ undo : ['undo_desc', 'Undo'],
33
+ redo : ['redo_desc', 'Redo'],
34
+ link : ['link_desc', 'mceLink'],
35
+ unlink : ['unlink_desc', 'unlink'],
36
+ image : ['image_desc', 'mceImage'],
37
+ cleanup : ['cleanup_desc', 'mceCleanup'],
38
+ help : ['help_desc', 'mceHelp'],
39
+ code : ['code_desc', 'mceCodeEditor'],
40
+ hr : ['hr_desc', 'InsertHorizontalRule'],
41
+ removeformat : ['removeformat_desc', 'RemoveFormat'],
42
+ sub : ['sub_desc', 'subscript'],
43
+ sup : ['sup_desc', 'superscript'],
44
+ forecolor : ['forecolor_desc', 'ForeColor'],
45
+ forecolorpicker : ['forecolor_desc', 'mceForeColor'],
46
+ backcolor : ['backcolor_desc', 'HiliteColor'],
47
+ backcolorpicker : ['backcolor_desc', 'mceBackColor'],
48
+ charmap : ['charmap_desc', 'mceCharMap'],
49
+ visualaid : ['visualaid_desc', 'mceToggleVisualAid'],
50
+ anchor : ['anchor_desc', 'mceInsertAnchor'],
51
+ newdocument : ['newdocument_desc', 'mceNewDocument'],
52
+ blockquote : ['blockquote_desc', 'mceBlockQuote']
53
+ },
54
+
55
+ stateControls : ['bold', 'italic', 'underline', 'strikethrough', 'bullist', 'numlist', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'sub', 'sup', 'blockquote'],
56
+
57
+ init : function(ed, url) {
58
+ var t = this, s;
59
+
60
+ t.editor = ed;
61
+ t.url = url;
62
+ t.onResolveName = new tinymce.util.Dispatcher(this);
63
+
64
+ // Default settings
65
+ t.settings = s = extend({
66
+ theme_advanced_path : true,
67
+ theme_advanced_toolbar_location : 'bottom',
68
+ theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",
69
+ theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",
70
+ theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap",
71
+ theme_advanced_blockformats : "p,address,pre,h1,h2,h3,h4,h5,h6",
72
+ theme_advanced_toolbar_align : "center",
73
+ theme_advanced_fonts : "Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",
74
+ theme_advanced_font_sizes : "1,2,3,4,5,6,7",
75
+ theme_advanced_more_colors : 1,
76
+ theme_advanced_row_height : 23,
77
+ theme_advanced_resize_horizontal : 1,
78
+ theme_advanced_resizing_use_cookie : 1
79
+ }, ed.settings);
80
+
81
+ // Init editor
82
+ ed.onInit.add(function() {
83
+ ed.onNodeChange.add(t._nodeChanged, t);
84
+ ed.dom.loadCSS(ed.baseURI.toAbsolute("themes/advanced/skins/" + ed.settings.skin + "/content.css"));
85
+ });
86
+
87
+ ed.onSetProgressState.add(function(ed, b, ti) {
88
+ var co, id = ed.id, tb;
89
+
90
+ if (b) {
91
+ t.progressTimer = setTimeout(function() {
92
+ co = ed.getContainer();
93
+ co = co.insertBefore(DOM.create('DIV', {style : 'position:relative'}), co.firstChild);
94
+ tb = DOM.get(ed.id + '_tbl');
95
+
96
+ DOM.add(co, 'div', {id : id + '_blocker', 'class' : 'mceBlocker', style : {width : tb.clientWidth + 2, height : tb.clientHeight + 2}});
97
+ DOM.add(co, 'div', {id : id + '_progress', 'class' : 'mceProgress', style : {left : tb.clientWidth / 2, top : tb.clientHeight / 2}});
98
+ }, ti || 0);
236
99
  } else {
237
- tinyMCE.openWindow(template, {href : href, target : target, title : title, onclick : onclick, action : action, className : style_class, inline : "yes"});
100
+ DOM.remove(id + '_blocker');
101
+ DOM.remove(id + '_progress');
102
+ clearTimeout(t.progressTimer);
238
103
  }
104
+ });
239
105
 
240
- return true;
241
-
242
- case "mceImage":
243
- var src = "", alt = "", border = "", hspace = "", vspace = "", width = "", height = "", align = "";
244
- var title = "", onmouseover = "", onmouseout = "", action = "insert";
245
- var img = tinyMCE.imgElement;
246
- var inst = tinyMCE.getInstanceById(editor_id);
247
-
248
- if (tinyMCE.selectedElement != null && tinyMCE.selectedElement.nodeName.toLowerCase() == "img") {
249
- img = tinyMCE.selectedElement;
250
- tinyMCE.imgElement = img;
251
- }
106
+ DOM.loadCSS(ed.baseURI.toAbsolute(s.editor_css || "themes/advanced/skins/" + ed.settings.skin + "/ui.css"));
107
+ },
252
108
 
253
- if (img) {
254
- // Is it a internal MCE visual aid image, then skip this one.
255
- if (tinyMCE.getAttrib(img, 'name').indexOf('mce_') == 0)
256
- return true;
109
+ createControl : function(n, cf) {
110
+ var cd, c;
257
111
 
258
- src = tinyMCE.getAttrib(img, 'src');
259
- alt = tinyMCE.getAttrib(img, 'alt');
112
+ if (c = cf.createControl(n))
113
+ return c;
260
114
 
261
- // Try polling out the title
262
- if (alt == "")
263
- alt = tinyMCE.getAttrib(img, 'title');
115
+ switch (n) {
116
+ case "styleselect":
117
+ return this._createStyleSelect();
264
118
 
265
- // Fix width/height attributes if the styles is specified
266
- if (tinyMCE.isGecko) {
267
- var w = img.style.width;
268
- if (w != null && w != "")
269
- img.setAttribute("width", w);
270
-
271
- var h = img.style.height;
272
- if (h != null && h != "")
273
- img.setAttribute("height", h);
274
- }
275
-
276
- border = tinyMCE.getAttrib(img, 'border');
277
- hspace = tinyMCE.getAttrib(img, 'hspace');
278
- vspace = tinyMCE.getAttrib(img, 'vspace');
279
- width = tinyMCE.getAttrib(img, 'width');
280
- height = tinyMCE.getAttrib(img, 'height');
281
- align = tinyMCE.getAttrib(img, 'align');
282
- onmouseover = tinyMCE.getAttrib(img, 'onmouseover');
283
- onmouseout = tinyMCE.getAttrib(img, 'onmouseout');
284
- title = tinyMCE.getAttrib(img, 'title');
285
-
286
- // Is realy specified?
287
- if (tinyMCE.isMSIE) {
288
- width = img.attributes['width'].specified ? width : "";
289
- height = img.attributes['height'].specified ? height : "";
290
- }
119
+ case "formatselect":
120
+ return this._createBlockFormats();
291
121
 
292
- //onmouseover = tinyMCE.getImageSrc(tinyMCE.cleanupEventStr(onmouseover));
293
- //onmouseout = tinyMCE.getImageSrc(tinyMCE.cleanupEventStr(onmouseout));
122
+ case "fontselect":
123
+ return this._createFontSelect();
294
124
 
295
- src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, img, true);");
125
+ case "fontsizeselect":
126
+ return this._createFontSizeSelect();
296
127
 
297
- // Use mce_src if defined
298
- mceRealSrc = tinyMCE.getAttrib(img, 'mce_src');
299
- if (mceRealSrc != "") {
300
- src = mceRealSrc;
128
+ case "forecolor":
129
+ return this._createForeColorMenu();
301
130
 
302
- if (tinyMCE.getParam('convert_urls'))
303
- src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, img, true);");
304
- }
305
-
306
- //if (onmouseover != "")
307
- // onmouseover = eval(tinyMCE.settings['urlconverter_callback'] + "(onmouseover, img, true);");
308
-
309
- //if (onmouseout != "")
310
- // onmouseout = eval(tinyMCE.settings['urlconverter_callback'] + "(onmouseout, img, true);");
311
-
312
- action = "update";
313
- }
314
-
315
- var template = new Array();
316
-
317
- template['file'] = 'image.htm?src={$src}';
318
- template['width'] = 355;
319
- template['height'] = 265 + (tinyMCE.isMSIE ? 25 : 0);
131
+ case "backcolor":
132
+ return this._createBackColorMenu();
133
+ }
320
134
 
321
- // Language specific width and height addons
322
- template['width'] += tinyMCE.getLang('lang_insert_image_delta_width', 0);
323
- template['height'] += tinyMCE.getLang('lang_insert_image_delta_height', 0);
135
+ if ((cd = this.controls[n]))
136
+ return cf.createButton(n, {title : "advanced." + cd[0], cmd : cd[1], ui : cd[2], value : cd[3]});
137
+ },
324
138
 
325
- if (inst.settings['insertimage_callback']) {
326
- var returnVal = eval(inst.settings['insertimage_callback'] + "(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout, action);");
327
- if (returnVal && returnVal['src'])
328
- TinyMCE_AdvancedTheme._insertImage(returnVal['src'], returnVal['alt'], returnVal['border'], returnVal['hspace'], returnVal['vspace'], returnVal['width'], returnVal['height'], returnVal['align'], returnVal['title'], returnVal['onmouseover'], returnVal['onmouseout']);
329
- } else
330
- tinyMCE.openWindow(template, {src : src, alt : alt, border : border, hspace : hspace, vspace : vspace, width : width, height : height, align : align, title : title, onmouseover : onmouseover, onmouseout : onmouseout, action : action, inline : "yes"});
139
+ execCommand : function(cmd, ui, val) {
140
+ var f = this['_' + cmd];
331
141
 
142
+ if (f) {
143
+ f.call(this, ui, val);
332
144
  return true;
145
+ }
333
146
 
334
- case "forecolor":
335
- var fcp = new TinyMCE_Layer(editor_id + '_fcPreview', false), p, img, elm;
336
-
337
- TinyMCE_AdvancedTheme._hideMenus(editor_id);
338
-
339
- if (!fcp.exists()) {
340
- fcp.create('div', 'mceColorPreview', document.getElementById(editor_id + '_toolbar'));
341
- elm = fcp.getElement();
342
- elm._editor_id = editor_id;
343
- elm._command = "forecolor";
344
- elm._switchId = editor_id + "_forecolor";
345
- tinyMCE.addEvent(elm, 'click', TinyMCE_AdvancedTheme._handleMenuEvent);
346
- tinyMCE.addEvent(elm, 'mouseover', TinyMCE_AdvancedTheme._handleMenuEvent);
347
- tinyMCE.addEvent(elm, 'mouseout', TinyMCE_AdvancedTheme._handleMenuEvent);
348
- }
349
-
350
- img = tinyMCE.selectNodes(document.getElementById(editor_id + "_forecolor"), function(n) {return n.nodeName == "IMG";})[0];
351
- p = tinyMCE.getAbsPosition(img, document.getElementById(editor_id + '_toolbar'));
352
-
353
- fcp.moveTo(p.absLeft, p.absTop);
354
- fcp.getElement().style.backgroundColor = value != null ? value : tinyMCE.getInstanceById(editor_id).foreColor;
355
- fcp.show();
356
-
357
- return false;
147
+ return false;
148
+ },
358
149
 
359
- case "forecolorMenu":
360
- TinyMCE_AdvancedTheme._hideMenus(editor_id);
150
+ _importClasses : function() {
151
+ var ed = this.editor, c = ed.controlManager.get('styleselect');
361
152
 
362
- // Create color layer
363
- var ml = new TinyMCE_Layer(editor_id + '_fcMenu');
153
+ if (c.getLength() == 0) {
154
+ each(ed.dom.getClasses(), function(o) {
155
+ c.add(o['class'], o['class']);
156
+ });
157
+ }
158
+ },
159
+
160
+ _createStyleSelect : function(n) {
161
+ var t = this, ed = t.editor, cf = ed.controlManager, c = cf.createListBox('styleselect', {
162
+ title : 'advanced.style_select',
163
+ onselect : function(v) {
164
+ if (c.selectedValue === v) {
165
+ ed.execCommand('mceSetStyleInfo', 0, {command : 'removeformat'});
166
+ c.select();
167
+ return false;
168
+ } else
169
+ ed.execCommand('mceSetCSSClass', 0, v);
170
+ }
171
+ });
172
+
173
+ each((t.settings.theme_advanced_styles || '').split(';'), function(v) {
174
+ var p = v.split('=');
175
+
176
+ if (v)
177
+ c.add(t.editor.translate(p[0]), p[1]);
178
+ });
179
+
180
+ c.onPostRender.add(function(ed, n) {
181
+ Event.add(n, 'focus', t._importClasses, t);
182
+ Event.add(n, 'mousedown', t._importClasses, t);
183
+ });
184
+
185
+ return c;
186
+ },
187
+
188
+ _createFontSelect : function() {
189
+ var c, t = this;
190
+
191
+ c = t.editor.controlManager.createListBox('fontselect', {title : 'advanced.fontdefault', cmd : 'FontName'});
192
+
193
+ each(t.settings.theme_advanced_fonts.split(';'), function(v) {
194
+ var p = v.split('='), st;
195
+
196
+ if (p[1].indexOf('dings') == -1)
197
+ st = 'font-family:' + p[1];
198
+
199
+ c.add(t.editor.translate(p[0]), p[1], {style : st});
200
+ });
201
+
202
+ return c;
203
+ },
204
+
205
+ _createFontSizeSelect : function() {
206
+ var c, t = this, lo = [
207
+ "1 (8 pt)",
208
+ "2 (10 pt)",
209
+ "3 (12 pt)",
210
+ "4 (14 pt)",
211
+ "5 (18 pt)",
212
+ "6 (24 pt)",
213
+ "7 (36 pt)"
214
+ ], fz = [8, 10, 12, 14, 18, 24, 36];
215
+
216
+ c = t.editor.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', cmd : 'FontSize'});
217
+
218
+ each(t.settings.theme_advanced_font_sizes.split(','), function(v) {
219
+ c.add(lo[parseInt(v) - 1], v, {'style' : 'font-size:' + fz[v - 1] + 'pt', 'class' : 'fontSize' + v});
220
+ });
221
+
222
+ return c;
223
+ },
224
+
225
+ _createBlockFormats : function() {
226
+ var c, fmts = {
227
+ p : 'advanced.paragraph',
228
+ address : 'advanced.address',
229
+ pre : 'advanced.pre',
230
+ h1 : 'advanced.h1',
231
+ h2 : 'advanced.h2',
232
+ h3 : 'advanced.h3',
233
+ h4 : 'advanced.h4',
234
+ h5 : 'advanced.h5',
235
+ h6 : 'advanced.h6',
236
+ div : 'advanced.div',
237
+ blockquote : 'advanced.blockquote',
238
+ code : 'advanced.code',
239
+ dt : 'advanced.dt',
240
+ dd : 'advanced.dd',
241
+ samp : 'advanced.samp'
242
+ }, t = this;
243
+
244
+ c = t.editor.controlManager.createListBox('formatselect', {title : 'advanced.block', cmd : 'FormatBlock'});
245
+
246
+ each(t.settings.theme_advanced_blockformats.split(','), function(v) {
247
+ c.add(t.editor.translate(fmts[v]), v, {element : v, 'class' : v.indexOf('h') == 0 ? '' : 'preview'});
248
+ });
249
+
250
+ return c;
251
+ },
252
+
253
+ _createForeColorMenu : function() {
254
+ var c, t = this, s = t.settings, o = {}, v;
255
+
256
+ if (s.theme_advanced_more_colors) {
257
+ o.more_colors_func = function() {
258
+ t._mceColorPicker(0, {
259
+ color : c.value,
260
+ func : function(co) {
261
+ c.setColor(co);
262
+ }
263
+ });
264
+ };
265
+ }
364
266
 
365
- if (!ml.exists())
366
- ml.create('div', 'mceMenu', document.body, TinyMCE_AdvancedTheme._getColorHTML(editor_id, 'theme_advanced_text_colors', 'forecolor'));
267
+ if (v = s.theme_advanced_text_colors)
268
+ o.colors = v;
367
269
 
368
- tinyMCE.switchClass(editor_id + '_forecolor', 'mceMenuButtonFocus');
369
- ml.moveRelativeTo(document.getElementById(editor_id + "_forecolor"), 'bl');
270
+ o.title = 'advanced.forecolor_desc';
271
+ o.cmd = 'ForeColor';
272
+ o.scope = this;
370
273
 
371
- ml.moveBy(tinyMCE.isMSIE && !tinyMCE.isOpera ? -1 : 1, -1);
274
+ c = t.editor.controlManager.createColorSplitButton('forecolor', o);
372
275
 
373
- if (tinyMCE.isOpera)
374
- ml.moveBy(0, -2);
276
+ return c;
277
+ },
375
278
 
376
- ml.show();
377
- return true;
279
+ _createBackColorMenu : function() {
280
+ var c, t = this, s = t.settings, o = {}, v;
378
281
 
379
- case "HiliteColor":
380
- var bcp = new TinyMCE_Layer(editor_id + '_bcPreview', false), p, img;
282
+ if (s.theme_advanced_more_colors) {
283
+ o.more_colors_func = function() {
284
+ t._mceColorPicker(0, {
285
+ color : c.value,
286
+ func : function(co) {
287
+ c.setColor(co);
288
+ }
289
+ });
290
+ };
291
+ }
381
292
 
382
- TinyMCE_AdvancedTheme._hideMenus(editor_id);
293
+ if (v = s.theme_advanced_background_colors)
294
+ o.colors = v;
383
295
 
384
- if (!bcp.exists()) {
385
- bcp.create('div', 'mceColorPreview', document.getElementById(editor_id + '_toolbar'));
386
- elm = bcp.getElement();
387
- elm._editor_id = editor_id;
388
- elm._command = "HiliteColor";
389
- elm._switchId = editor_id + "_backcolor";
390
- tinyMCE.addEvent(elm, 'click', TinyMCE_AdvancedTheme._handleMenuEvent);
391
- tinyMCE.addEvent(elm, 'mouseover', TinyMCE_AdvancedTheme._handleMenuEvent);
392
- tinyMCE.addEvent(elm, 'mouseout', TinyMCE_AdvancedTheme._handleMenuEvent);
393
- }
296
+ o.title = 'advanced.backcolor_desc';
297
+ o.cmd = 'HiliteColor';
298
+ o.scope = this;
394
299
 
395
- img = tinyMCE.selectNodes(document.getElementById(editor_id + "_backcolor"), function(n) {return n.nodeName == "IMG";})[0];
396
- p = tinyMCE.getAbsPosition(img, document.getElementById(editor_id + '_toolbar'));
300
+ c = t.editor.controlManager.createColorSplitButton('backcolor', o);
397
301
 
398
- bcp.moveTo(p.absLeft, p.absTop);
399
- bcp.getElement().style.backgroundColor = value != null ? value : tinyMCE.getInstanceById(editor_id).backColor;
400
- bcp.show();
302
+ return c;
303
+ },
401
304
 
402
- return false;
305
+ renderUI : function(o) {
306
+ var n, ic, tb, t = this, ed = t.editor, s = t.settings, sc, p, nl;
403
307
 
404
- case "HiliteColorMenu":
405
- TinyMCE_AdvancedTheme._hideMenus(editor_id);
308
+ n = p = DOM.create('div', {id : ed.id + '_parent', 'class' : 'mceEditor ' + ed.settings.skin + 'Skin'});
406
309
 
407
- // Create color layer
408
- var ml = new TinyMCE_Layer(editor_id + '_bcMenu');
310
+ if (!DOM.boxModel)
311
+ n = DOM.add(n, 'div', {'class' : 'mceOldBoxModel'});
409
312
 
410
- if (!ml.exists())
411
- ml.create('div', 'mceMenu', document.body, TinyMCE_AdvancedTheme._getColorHTML(editor_id, 'theme_advanced_background_colors', 'HiliteColor'));
313
+ n = sc = DOM.add(n, 'table', {id : ed.id + '_tbl', 'class' : 'mceLayout', cellSpacing : 0, cellPadding : 0});
314
+ n = tb = DOM.add(n, 'tbody');
412
315
 
413
- tinyMCE.switchClass(editor_id + '_backcolor', 'mceMenuButtonFocus');
414
- ml.moveRelativeTo(document.getElementById(editor_id + "_backcolor"), 'bl');
316
+ switch ((s.theme_advanced_layout_manager || '').toLowerCase()) {
317
+ case "rowlayout":
318
+ ic = t._rowLayout(s, tb, o);
319
+ break;
415
320
 
416
- ml.moveBy(tinyMCE.isMSIE && !tinyMCE.isOpera ? -1 : 1, -1);
321
+ case "customlayout":
322
+ ic = ed.execCallback("theme_advanced_custom_layout", s, tb, o, p);
323
+ break;
417
324
 
418
- if (tinyMCE.isOpera)
419
- ml.moveBy(0, -2);
325
+ default:
326
+ ic = t._simpleLayout(s, tb, o, p);
327
+ }
420
328
 
421
- ml.show();
422
- return true;
329
+ n = o.targetNode;
423
330
 
424
- case "mceColorPicker":
425
- if (user_interface) {
426
- var template = new Array();
427
- var inputColor = value['document'].getElementById(value['element_id']).value;
331
+ // Add classes to first and last TRs
332
+ nl = sc.rows;
333
+ DOM.addClass(nl[0], 'first');
334
+ DOM.addClass(nl[nl.length - 1], 'last');
428
335
 
429
- template['file'] = 'color_picker.htm';
430
- template['width'] = 220;
431
- template['height'] = 190;
432
- template['close_previous'] = "no";
336
+ // Add classes to first and last TDs
337
+ each(DOM.select('tr', tb), function(n) {
338
+ DOM.addClass(n.firstChild, 'first');
339
+ DOM.addClass(n.childNodes[n.childNodes.length - 1], 'last');
340
+ });
433
341
 
434
- template['width'] += tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_width', 0);
435
- template['height'] += tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_height', 0);
342
+ if (DOM.get(s.theme_advanced_toolbar_container))
343
+ DOM.get(s.theme_advanced_toolbar_container).appendChild(p);
344
+ else
345
+ DOM.insertAfter(p, n);
436
346
 
437
- if (typeof(value['store_selection']) == "undefined")
438
- value['store_selection'] = true;
347
+ Event.add(ed.id + '_path_row', 'click', function(e) {
348
+ e = e.target;
439
349
 
440
- tinyMCE.lastColorPickerValue = value;
441
- tinyMCE.openWindow(template, {editor_id : editor_id, mce_store_selection : value['store_selection'], inline : "yes", command : "mceColorPicker", input_color : inputColor});
442
- } else {
443
- var savedVal = tinyMCE.lastColorPickerValue;
444
- var elm = savedVal['document'].getElementById(savedVal['element_id']);
445
- elm.value = value;
350
+ if (e.nodeName == 'A') {
351
+ t._sel(e.href.replace(/^[^#]*#/, ''));
446
352
 
447
- if (elm.onchange != null && elm.onchange != '')
448
- eval('elm.onchange();');
353
+ return Event.cancel(e);
449
354
  }
450
- return true;
451
-
452
- case "mceCodeEditor":
453
- var template = new Array();
355
+ });
356
+ /*
357
+ if (DOM.get(ed.id + '_path_row')) {
358
+ Event.add(ed.id + '_tbl', 'mouseover', function(e) {
359
+ var re;
360
+
361
+ e = e.target;
454
362
 
455
- template['file'] = 'source_editor.htm';
456
- template['width'] = parseInt(tinyMCE.getParam("theme_advanced_source_editor_width", 720));
457
- template['height'] = parseInt(tinyMCE.getParam("theme_advanced_source_editor_height", 580));
458
-
459
- tinyMCE.openWindow(template, {editor_id : editor_id, resizable : "yes", scrollbars : "no", inline : "yes"});
460
- return true;
461
-
462
- case "mceCharMap":
463
- var template = new Array();
363
+ if (e.nodeName == 'SPAN' && DOM.hasClass(e.parentNode, 'mceButton')) {
364
+ re = DOM.get(ed.id + '_path_row');
365
+ t.lastPath = re.innerHTML;
366
+ DOM.setHTML(re, e.parentNode.title);
367
+ }
368
+ });
464
369
 
465
- template['file'] = 'charmap.htm';
466
- template['width'] = 550 + (tinyMCE.isOpera ? 40 : 0);
467
- template['height'] = 250;
370
+ Event.add(ed.id + '_tbl', 'mouseout', function(e) {
371
+ if (t.lastPath) {
372
+ DOM.setHTML(ed.id + '_path_row', t.lastPath);
373
+ t.lastPath = 0;
374
+ }
375
+ });
376
+ }
377
+ */
378
+ if (s.theme_advanced_toolbar_location == 'external')
379
+ o.deltaHeight = 0;
380
+
381
+ t.deltaHeight = o.deltaHeight;
382
+ o.targetNode = null;
383
+
384
+ return {
385
+ iframeContainer : ic,
386
+ editorContainer : ed.id + '_parent',
387
+ sizeContainer : sc,
388
+ deltaHeight : o.deltaHeight
389
+ };
390
+ },
391
+
392
+ getInfo : function() {
393
+ return {
394
+ longname : 'Simple theme',
395
+ author : 'Moxiecode Systems AB',
396
+ authorurl : 'http://tinymce.moxiecode.com',
397
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
398
+ }
399
+ },
468
400
 
469
- template['width'] += tinyMCE.getLang('lang_theme_advanced_charmap_delta_width', 0);
470
- template['height'] += tinyMCE.getLang('lang_theme_advanced_charmap_delta_height', 0);
401
+ _simpleLayout : function(s, tb, o, p) {
402
+ var t = this, ed = t.editor, lo = s.theme_advanced_toolbar_location, sl = s.theme_advanced_statusbar_location, n, ic, etb, c;
471
403
 
472
- tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
473
- return true;
404
+ // Create toolbar container at top
405
+ if (lo == 'top')
406
+ t._addToolbars(tb, o);
474
407
 
475
- case "mceInsertAnchor":
476
- var template = new Array();
408
+ // Create external toolbar
409
+ if (lo == 'external') {
410
+ n = c = DOM.create('div', {style : 'position:relative'});
411
+ n = DOM.add(n, 'div', {id : ed.id + '_external', 'class' : 'mceExternalToolbar'});
412
+ DOM.add(n, 'a', {id : ed.id + '_external_close', href : 'javascript:;', 'class' : 'mceExternalClose'});
413
+ n = DOM.add(n, 'table', {id : ed.id + '_tblext', cellSpacing : 0, cellPadding : 0});
414
+ etb = DOM.add(n, 'tbody');
477
415
 
478
- template['file'] = 'anchor.htm';
479
- template['width'] = 320;
480
- template['height'] = 90 + (tinyMCE.isNS7 ? 30 : 0);
416
+ if (p.firstChild.className == 'mceOldBoxModel')
417
+ p.firstChild.appendChild(c);
418
+ else
419
+ p.insertBefore(c, p.firstChild);
481
420
 
482
- template['width'] += tinyMCE.getLang('lang_theme_advanced_anchor_delta_width', 0);
483
- template['height'] += tinyMCE.getLang('lang_theme_advanced_anchor_delta_height', 0);
421
+ t._addToolbars(etb, o);
484
422
 
485
- tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
486
- return true;
423
+ ed.onMouseUp.add(function() {
424
+ var e = DOM.get(ed.id + '_external');
425
+ DOM.show(e);
487
426
 
488
- case "mceNewDocument":
489
- if (confirm(tinyMCE.getLang('lang_newdocument')))
490
- tinyMCE.execInstanceCommand(editor_id, 'mceSetContent', false, ' ');
427
+ DOM.hide(lastExtID);
491
428
 
492
- return true;
493
- }
429
+ var f = Event.add(ed.id + '_external_close', 'click', function() {
430
+ DOM.hide(ed.id + '_external');
431
+ Event.remove(ed.id + '_external_close', 'click', f);
432
+ });
494
433
 
495
- return false;
496
- },
497
-
498
- /**
499
- * Editor instance template function.
500
- */
501
- getEditorTemplate : function(settings, editorId) {
502
- function removeFromArray(in_array, remove_array) {
503
- var outArray = new Array(), skip;
504
-
505
- for (var i=0; i<in_array.length; i++) {
506
- skip = false;
507
-
508
- for (var j=0; j<remove_array.length; j++) {
509
- if (in_array[i] == remove_array[j]) {
510
- skip = true;
511
- }
512
- }
434
+ DOM.show(e);
435
+ DOM.setStyle(e, 'top', 0 - DOM.getRect(ed.id + '_tblext').h - 1);
513
436
 
514
- if (!skip) {
515
- outArray[outArray.length] = in_array[i];
516
- }
517
- }
437
+ // Fixes IE rendering bug
438
+ DOM.hide(e);
439
+ DOM.show(e);
440
+ e.style.filter = '';
518
441
 
519
- return outArray;
520
- }
442
+ lastExtID = ed.id + '_external';
521
443
 
522
- function addToArray(in_array, add_array) {
523
- for (var i=0; i<add_array.length; i++) {
524
- in_array[in_array.length] = add_array[i];
444
+ e = null;
445
+ });
525
446
  }
526
447
 
527
- return in_array;
528
- }
448
+ if (sl == 'top')
449
+ t._addStatusBar(tb, o);
529
450
 
530
- var template = new Array();
531
- var deltaHeight = 0;
532
- var resizing = tinyMCE.getParam("theme_advanced_resizing", false);
533
- var path = tinyMCE.getParam("theme_advanced_path", true);
534
- var statusbarHTML = '<div id="{$editor_id}_path" class="mceStatusbarPathText" style="display: ' + (path ? "block" : "none") + '">&#160;</div><div id="{$editor_id}_resize" class="mceStatusbarResize" style="display: ' + (resizing ? "block" : "none") + '" onmousedown="tinyMCE.themes.advanced._setResizing(event,\'{$editor_id}\',true);"></div><br style="clear: both" />';
535
- var layoutManager = tinyMCE.getParam("theme_advanced_layout_manager", "SimpleLayout");
536
-
537
- // Setup style select options -- MOVED UP FOR EXTERNAL TOOLBAR COMPATABILITY!
538
- var styleSelectHTML = '<option value="">{$lang_theme_style_select}</option>';
539
- if (settings['theme_advanced_styles']) {
540
- var stylesAr = settings['theme_advanced_styles'].split(';');
541
-
542
- for (var i=0; i<stylesAr.length; i++) {
543
- var key, value;
544
-
545
- key = stylesAr[i].split('=')[0];
546
- value = stylesAr[i].split('=')[1];
547
-
548
- styleSelectHTML += '<option value="' + value + '">' + key + '</option>';
451
+ // Create iframe container
452
+ if (!s.theme_advanced_toolbar_container) {
453
+ n = DOM.add(tb, 'tr');
454
+ n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
549
455
  }
550
456
 
551
- TinyMCE_AdvancedTheme._autoImportCSSClasses = false;
552
- }
457
+ // Create toolbar container at bottom
458
+ if (lo == 'bottom')
459
+ t._addToolbars(tb, o);
553
460
 
554
- switch(layoutManager) {
555
- case "SimpleLayout" : //the default TinyMCE Layout (for backwards compatibility)...
556
- var toolbarHTML = "";
557
- var toolbarLocation = tinyMCE.getParam("theme_advanced_toolbar_location", "bottom");
558
- var toolbarAlign = tinyMCE.getParam("theme_advanced_toolbar_align", "center");
559
- var pathLocation = tinyMCE.getParam("theme_advanced_path_location", "none"); // Compatiblity
560
- var statusbarLocation = tinyMCE.getParam("theme_advanced_statusbar_location", pathLocation);
561
- var defVals = {
562
- theme_advanced_buttons1 : "bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect",
563
- theme_advanced_buttons2 : "bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,image,cleanup,help,code",
564
- theme_advanced_buttons3 : "hr,removeformat,visualaid,separator,sub,sup,separator,charmap"
565
- };
461
+ if (sl == 'bottom')
462
+ t._addStatusBar(tb, o);
566
463
 
567
- // Add accessibility control
568
- toolbarHTML += '<a href="#" accesskey="q" title="' + tinyMCE.getLang("lang_toolbar_focus") + '"';
464
+ return ic;
465
+ },
569
466
 
570
- if (!tinyMCE.getParam("accessibility_focus"))
571
- toolbarHTML += ' onfocus="tinyMCE.getInstanceById(\'' + editorId + '\').getWin().focus();"';
467
+ _rowLayout : function(s, tb, o) {
468
+ var t = this, ed = t.editor, dc, da, cf = ed.controlManager, n, ic, to;
572
469
 
573
- toolbarHTML += '></a>';
470
+ dc = s.theme_advanced_containers_default_class || '';
471
+ da = s.theme_advanced_containers_default_align || 'center';
574
472
 
575
- // Render rows
576
- for (var i=1; i<100; i++) {
577
- var def = defVals["theme_advanced_buttons" + i];
473
+ each((s.theme_advanced_containers || '').split(','), function(c, i) {
474
+ var v = s['theme_advanced_container_' + c].toLowerCase();
578
475
 
579
- var buttons = tinyMCE.getParam("theme_advanced_buttons" + i, def == null ? '' : def, true, ',');
580
- if (buttons.length == 0)
476
+ switch (v) {
477
+ case 'mceeditor':
478
+ n = DOM.add(tb, 'tr');
479
+ n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
581
480
  break;
582
481
 
583
- buttons = removeFromArray(buttons, tinyMCE.getParam("theme_advanced_disable", "", true, ','));
584
- buttons = addToArray(buttons, tinyMCE.getParam("theme_advanced_buttons" + i + "_add", "", true, ','));
585
- buttons = addToArray(tinyMCE.getParam("theme_advanced_buttons" + i + "_add_before", "", true, ','), buttons);
482
+ case 'mceelementpath':
483
+ t._addStatusBar(tb, o);
484
+ break;
586
485
 
587
- for (var b=0; b<buttons.length; b++)
588
- toolbarHTML += tinyMCE.getControlHTML(buttons[b]);
486
+ default:
487
+ n = DOM.add(DOM.add(tb, 'tr'), 'td', {
488
+ 'class' : 'mceToolbar ' + (s['theme_advanced_container_' + c + '_class'] || dc),
489
+ align : s['theme_advanced_container_' + c + '_align'] || da
490
+ });
589
491
 
590
- if (buttons.length > 0) {
591
- toolbarHTML += "<br />";
592
- deltaHeight -= 23;
593
- }
492
+ to = cf.createToolbar("toolbar" + i);
493
+ t._addControls(v, to);
494
+ n.innerHTML = to.renderHTML();
495
+ o.deltaHeight -= s.theme_advanced_row_height;
594
496
  }
497
+ });
595
498
 
596
- // Add accessibility control
597
- toolbarHTML += '<a href="#" accesskey="z" onfocus="tinyMCE.getInstanceById(\'' + editorId + '\').getWin().focus();"></a>';
598
-
599
- // Setup template html
600
- template['html'] = '<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width_style};height:{$height_style}"><tbody>';
601
-
602
- if (toolbarLocation == "top") {
603
- template['html'] += '<tr><td class="mceToolbarTop" align="' + toolbarAlign + '" height="1" nowrap="nowrap"><span id="' + editorId + '_toolbar" class="mceToolbarContainer">' + toolbarHTML + '</span></td></tr>';
604
- }
499
+ return ic;
500
+ },
605
501
 
606
- if (statusbarLocation == "top") {
607
- template['html'] += '<tr><td class="mceStatusbarTop" height="1">' + statusbarHTML + '</td></tr>';
608
- deltaHeight -= 23;
609
- }
502
+ _addControls : function(v, tb) {
503
+ var t = this, s = t.settings, di, cf = t.editor.controlManager;
610
504
 
611
- template['html'] += '<tr><td align="center"><span id="{$editor_id}"></span></td></tr>';
505
+ if (s.theme_advanced_disable && !t._disabled) {
506
+ di = {};
612
507
 
613
- if (toolbarLocation == "bottom") {
614
- template['html'] += '<tr><td class="mceToolbarBottom" align="' + toolbarAlign + '" height="1"><span id="' + editorId + '_toolbar" class="mceToolbarContainer">' + toolbarHTML + '</span></td></tr>';
615
- }
508
+ each(s.theme_advanced_disable.split(','), function(v) {
509
+ di[v] = 1;
510
+ });
616
511
 
617
- // External toolbar changes
618
- if (toolbarLocation == "external") {
619
- var bod = document.body;
620
- var elm = document.createElement ("div");
512
+ t._disabled = di;
513
+ } else
514
+ di = t._disabled;
621
515
 
622
- toolbarHTML = tinyMCE.replaceVar(toolbarHTML, 'style_select_options', styleSelectHTML);
623
- toolbarHTML = tinyMCE.applyTemplate(toolbarHTML, {editor_id : editorId});
516
+ each(v.split(','), function(n) {
517
+ var c;
624
518
 
625
- elm.className = "mceToolbarExternal";
626
- elm.id = editorId+"_toolbar";
627
- elm.innerHTML = '<table width="100%" border="0" align="center"><tr><td align="center">'+toolbarHTML+'</td></tr></table>';
628
- bod.appendChild (elm);
629
- // bod.style.marginTop = elm.offsetHeight + "px";
519
+ if (di && di[n])
520
+ return;
630
521
 
631
- deltaHeight = 0;
632
- tinyMCE.getInstanceById(editorId).toolbarElement = elm;
522
+ // Compatiblity with 2.x
523
+ if (n == 'tablecontrols') {
524
+ each(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"], function(n) {
525
+ n = t.createControl(n, cf);
633
526
 
634
- //template['html'] = '<div id="mceExternalToolbar" align="center" class="mceToolbarExternal"><table width="100%" border="0" align="center"><tr><td align="center">'+toolbarHTML+'</td></tr></table></div>' + template["html"];
635
- } else {
636
- tinyMCE.getInstanceById(editorId).toolbarElement = null;
637
- }
527
+ if (n)
528
+ tb.add(n);
529
+ });
638
530
 
639
- if (statusbarLocation == "bottom") {
640
- template['html'] += '<tr><td class="mceStatusbarBottom" height="1">' + statusbarHTML + '</td></tr>';
641
- deltaHeight -= 23;
531
+ return;
642
532
  }
643
533
 
644
- template['html'] += '</tbody></table>';
645
- //"SimpleLayout"
646
- break;
647
-
648
- case "RowLayout" : //Container Layout - containers defined in "theme_advanced_containers" are rendered from top to bottom.
649
- template['html'] = '<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width}px;height:{$height}px"><tbody>';
650
-
651
- var containers = tinyMCE.getParam("theme_advanced_containers", "", true, ",");
652
- var defaultContainerCSS = tinyMCE.getParam("theme_advanced_containers_default_class", "container");
653
- var defaultContainerAlign = tinyMCE.getParam("theme_advanced_containers_default_align", "center");
654
-
655
- //Render Containers:
656
- for (var i = 0; i < containers.length; i++)
657
- {
658
- if (containers[i] == "mceEditor") //Exceptions for mceEditor and ...
659
- template['html'] += '<tr><td align="center" class="mceEditor_border"><span id="{$editor_id}"></span></td></tr>';
660
- else if (containers[i] == "mceElementpath" || containers[i] == "mceStatusbar") // ... mceElementpath:
661
- {
662
- var pathClass = "mceStatusbar";
663
-
664
- if (i == containers.length-1)
665
- {
666
- pathClass = "mceStatusbarBottom";
667
- }
668
- else if (i == 0)
669
- {
670
- pathClass = "mceStatusbar";
671
- }
672
- else
673
- {
674
- deltaHeight-=2;
675
- }
676
-
677
- template['html'] += '<tr><td class="' + pathClass + '" height="1">' + statusbarHTML + '</td></tr>';
678
- deltaHeight -= 22;
679
- } else { // Render normal Container
680
- var curContainer = tinyMCE.getParam("theme_advanced_container_"+containers[i], "", true, ',');
681
- var curContainerHTML = "";
682
- var curAlign = tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_align", defaultContainerAlign);
683
- var curCSS = tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_class", defaultContainerCSS);
534
+ c = t.createControl(n, cf);
684
535
 
685
- curContainer = removeFromArray(curContainer, tinyMCE.getParam("theme_advanced_disable", "", true, ','));
536
+ if (c)
537
+ tb.add(c);
538
+ });
539
+ },
686
540
 
687
- for (var j=0; j<curContainer.length; j++)
688
- curContainerHTML += tinyMCE.getControlHTML(curContainer[j]);
689
-
690
- if (curContainer.length > 0) {
691
- curContainerHTML += "<br />";
692
- deltaHeight -= 23;
693
- }
541
+ _addToolbars : function(c, o) {
542
+ var t = this, i, tb, ed = t.editor, s = t.settings, v, cf = ed.controlManager, di, n, h = [];
694
543
 
695
- template['html'] += '<tr><td class="' + curCSS + '" align="' + curAlign + '" height="1">' + curContainerHTML + '</td></tr>';
696
- }
697
- }
544
+ n = DOM.add(DOM.add(c, 'tr'), 'td', {'class' : 'mceToolbar', align : s.theme_advanced_toolbar_align});
698
545
 
699
- template['html'] += '</tbody></table>';
700
- //RowLayout
701
- break;
546
+ if (!ed.getParam('accessibility_focus') || ed.getParam('tab_focus'))
547
+ h.push(DOM.createHTML('a', {href : '#', onfocus : 'tinyMCE.get(\'' + ed.id + '\').focus();'}, '<!-- IE -->'));
702
548
 
703
- case "CustomLayout" : //User defined layout callback...
704
- var customLayout = tinyMCE.getParam("theme_advanced_custom_layout","");
549
+ h.push(DOM.createHTML('a', {href : '#', accesskey : 'q', title : ed.getLang("advanced.toolbar_focus")}, '<!-- IE -->'));
705
550
 
706
- if (customLayout != "" && eval("typeof(" + customLayout + ")") != "undefined") {
707
- template = eval(customLayout + "(template);");
708
- }
709
- break;
710
- }
551
+ // Create toolbar and add the controls
552
+ for (i=1; (v = s['theme_advanced_buttons' + i]); i++) {
553
+ tb = cf.createToolbar("toolbar" + i);
711
554
 
712
- if (resizing)
713
- template['html'] += '<span id="{$editor_id}_resize_box" class="mceResizeBox"></span>';
555
+ if (s['theme_advanced_buttons' + i + '_add'])
556
+ v += ',' + s['theme_advanced_buttons' + i + '_add'];
714
557
 
715
- template['html'] = tinyMCE.replaceVar(template['html'], 'style_select_options', styleSelectHTML);
716
- template['delta_width'] = 0;
717
- template['delta_height'] = deltaHeight;
558
+ if (s['theme_advanced_buttons' + i + '_add_before'])
559
+ v = s['theme_advanced_buttons' + i + '_add_before'] + ',' + v;
718
560
 
719
- return template;
720
- },
561
+ t._addControls(v, tb, di);
721
562
 
722
- initInstance : function(inst) {
723
- if (tinyMCE.getParam("theme_advanced_resizing", false)) {
724
- if (tinyMCE.getParam("theme_advanced_resizing_use_cookie", true)) {
725
- var w = TinyMCE_AdvancedTheme._getCookie("TinyMCE_" + inst.editorId + "_width");
726
- var h = TinyMCE_AdvancedTheme._getCookie("TinyMCE_" + inst.editorId + "_height");
563
+ //n.appendChild(n = tb.render());
564
+ h.push(tb.renderHTML());
727
565
 
728
- TinyMCE_AdvancedTheme._resizeTo(inst, w, h, tinyMCE.getParam("theme_advanced_resize_horizontal", true));
566
+ o.deltaHeight -= s.theme_advanced_row_height;
729
567
  }
730
- }
731
568
 
732
- inst.addShortcut('ctrl', 'k', 'lang_link_desc', 'mceLink');
733
- },
569
+ h.push(DOM.createHTML('a', {href : '#', accesskey : 'z', title : ed.getLang("advanced.toolbar_focus"), onfocus : 'tinyMCE.getInstanceById(\'' + ed.id + '\').focus();'}, '<!-- IE -->'));
734
570
 
735
- _handleMenuEvent : function(e) {
736
- var te = tinyMCE.isMSIE ? window.event.srcElement : e.target;
737
- tinyMCE._menuButtonEvent(e.type == "mouseover" ? "over" : "out", document.getElementById(te._switchId));
571
+ n.innerHTML = h.join('');
572
+ },
738
573
 
739
- if (e.type == "click")
740
- tinyMCE.execInstanceCommand(te._editor_id, te._command);
741
- },
574
+ _addStatusBar : function(tb, o) {
575
+ var n, t = this, ed = t.editor, s = t.settings, r, mf, me, td;
742
576
 
743
- _hideMenus : function(id) {
744
- var fcml = new TinyMCE_Layer(id + '_fcMenu'), bcml = new TinyMCE_Layer(id + '_bcMenu');
577
+ n = DOM.add(tb, 'tr');
578
+ n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'});
579
+ n = DOM.add(n, 'div', {id : ed.id + '_path_row'}, s.theme_advanced_path ? ed.translate('advanced.path') + ': ' : '&nbsp;');
580
+ DOM.add(n, 'a', {href : '#', accesskey : 'x'});
745
581
 
746
- if (fcml.exists() && fcml.isVisible()) {
747
- tinyMCE.switchClass(id + '_forecolor', 'mceMenuButton');
748
- fcml.hide();
749
- }
582
+ if (s.theme_advanced_resizing && !tinymce.isOldWebKit) {
583
+ DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'resize'});
750
584
 
751
- if (bcml.exists() && bcml.isVisible()) {
752
- tinyMCE.switchClass(id + '_backcolor', 'mceMenuButton');
753
- bcml.hide();
754
- }
755
- },
585
+ if (s.theme_advanced_resizing_use_cookie) {
586
+ ed.onPostRender.add(function() {
587
+ var o = Cookie.getHash("TinyMCE_" + ed.id + "_size"), c = DOM.get(ed.id + '_tbl');
756
588
 
757
- /**
758
- * Node change handler.
759
- */
760
- handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection, setup_content) {
761
- var alignNode, breakOut, classNode;
589
+ if (!o)
590
+ return;
762
591
 
763
- function selectByValue(select_elm, value, first_index) {
764
- first_index = typeof(first_index) == "undefined" ? false : true;
592
+ if (s.theme_advanced_resize_horizontal)
593
+ c.style.width = o.cw + 'px';
765
594
 
766
- if (select_elm) {
767
- for (var i=0; i<select_elm.options.length; i++) {
768
- var ov = "" + select_elm.options[i].value;
769
-
770
- if (first_index && ov.toLowerCase().indexOf(value.toLowerCase()) == 0) {
771
- select_elm.selectedIndex = i;
772
- return true;
773
- }
774
-
775
- if (ov == value) {
776
- select_elm.selectedIndex = i;
777
- return true;
778
- }
595
+ c.style.height = o.ch + 'px';
596
+ DOM.get(ed.id + '_ifr').style.height = (parseInt(o.ch) + t.deltaHeight) + 'px';
597
+ });
779
598
  }
780
- }
781
-
782
- return false;
783
- };
784
-
785
- function getAttrib(elm, name) {
786
- return elm.getAttribute(name) ? elm.getAttribute(name) : "";
787
- };
788
-
789
- // No node provided
790
- if (node == null)
791
- return;
792
-
793
- // Update path
794
- var pathElm = document.getElementById(editor_id + "_path");
795
- var inst = tinyMCE.getInstanceById(editor_id);
796
- var doc = inst.getDoc();
797
- TinyMCE_AdvancedTheme._hideMenus(editor_id);
798
-
799
- if (pathElm) {
800
- // Get node path
801
- var parentNode = node;
802
- var path = new Array();
803
-
804
- while (parentNode != null) {
805
- if (parentNode.nodeName.toUpperCase() == "BODY") {
806
- break;
807
- }
808
-
809
- // Only append element nodes to path
810
- if (parentNode.nodeType == 1 && tinyMCE.getAttrib(parentNode, "class").indexOf('mceItemHidden') == -1) {
811
- path[path.length] = parentNode;
812
- }
813
-
814
- parentNode = parentNode.parentNode;
815
- }
816
-
817
- // Setup HTML
818
- var html = "";
819
- for (var i=path.length-1; i>=0; i--) {
820
- var nodeName = path[i].nodeName.toLowerCase();
821
- var nodeData = "";
822
599
 
823
- if (nodeName.indexOf("html:") == 0)
824
- nodeName = nodeName.substring(5);
600
+ ed.onPostRender.add(function() {
601
+ Event.add(ed.id + '_resize', 'mousedown', function(e) {
602
+ var c, p, w, h, n, pa;
825
603
 
826
- if (nodeName == "b") {
827
- nodeName = "strong";
828
- }
604
+ // Measure container
605
+ c = DOM.get(ed.id + '_tbl');
606
+ w = c.clientWidth;
607
+ h = c.clientHeight;
829
608
 
830
- if (nodeName == "i") {
831
- nodeName = "em";
832
- }
609
+ miw = s.theme_advanced_resizing_min_width || 100;
610
+ mih = s.theme_advanced_resizing_min_height || 100;
611
+ maw = s.theme_advanced_resizing_max_width || 0xFFFF;
612
+ mah = s.theme_advanced_resizing_max_height || 0xFFFF;
833
613
 
834
- if (nodeName == "span") {
835
- var cn = tinyMCE.getAttrib(path[i], "class");
836
- if (cn != "" && cn.indexOf('mceItem') == -1)
837
- nodeData += "class: " + cn + " ";
614
+ // Setup placeholder
615
+ p = DOM.add(DOM.get(ed.id + '_parent'), 'div', {'class' : 'mcePlaceHolder'});
616
+ DOM.setStyles(p, {width : w, height : h});
838
617
 
839
- var st = tinyMCE.getAttrib(path[i], "style");
840
- if (st != "") {
841
- st = tinyMCE.serializeStyle(tinyMCE.parseStyle(st));
842
- nodeData += "style: " + st + " ";
843
- }
844
- }
618
+ // Replace with placeholder
619
+ DOM.hide(c);
620
+ DOM.show(p);
845
621
 
846
- if (nodeName == "font") {
847
- if (tinyMCE.getParam("convert_fonts_to_spans"))
848
- nodeName = "span";
622
+ // Create internal resize obj
623
+ r = {
624
+ x : e.screenX,
625
+ y : e.screenY,
626
+ w : w,
627
+ h : h,
628
+ dx : null,
629
+ dy : null
630
+ };
849
631
 
850
- var face = tinyMCE.getAttrib(path[i], "face");
851
- if (face != "")
852
- nodeData += "font: " + face + " ";
632
+ // Start listening
633
+ mf = Event.add(document, 'mousemove', function(e) {
634
+ var w, h;
853
635
 
854
- var size = tinyMCE.getAttrib(path[i], "size");
855
- if (size != "")
856
- nodeData += "size: " + size + " ";
636
+ // Calc delta values
637
+ r.dx = e.screenX - r.x;
638
+ r.dy = e.screenY - r.y;
857
639
 
858
- var color = tinyMCE.getAttrib(path[i], "color");
859
- if (color != "")
860
- nodeData += "color: " + color + " ";
861
- }
640
+ // Boundery fix box
641
+ w = Math.max(miw, r.w + r.dx);
642
+ h = Math.max(mih, r.h + r.dy);
643
+ w = Math.min(maw, w);
644
+ h = Math.min(mah, h);
862
645
 
863
- if (getAttrib(path[i], 'id') != "") {
864
- nodeData += "id: " + path[i].getAttribute('id') + " ";
865
- }
646
+ // Resize placeholder
647
+ if (s.theme_advanced_resize_horizontal)
648
+ p.style.width = w + 'px';
866
649
 
867
- var className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i], "class"), false);
868
- if (className != "" && className.indexOf('mceItem') == -1)
869
- nodeData += "class: " + className + " ";
650
+ p.style.height = h + 'px';
870
651
 
871
- if (getAttrib(path[i], 'src') != "") {
872
- var src = tinyMCE.getAttrib(path[i], "mce_src");
652
+ return Event.cancel(e);
653
+ });
873
654
 
874
- if (src == "")
875
- src = tinyMCE.getAttrib(path[i], "src");
655
+ me = Event.add(document, 'mouseup', function(e) {
656
+ var ifr;
876
657
 
877
- nodeData += "src: " + src + " ";
878
- }
658
+ // Stop listening
659
+ Event.remove(document, 'mousemove', mf);
660
+ Event.remove(document, 'mouseup', me);
879
661
 
880
- if (path[i].nodeName == 'A' && getAttrib(path[i], 'href') != "") {
881
- var href = tinyMCE.getAttrib(path[i], "mce_href");
662
+ c.style.display = '';
663
+ DOM.remove(p);
882
664
 
883
- if (href == "")
884
- href = tinyMCE.getAttrib(path[i], "href");
665
+ if (r.dx === null)
666
+ return;
885
667
 
886
- nodeData += "href: " + href + " ";
887
- }
668
+ ifr = DOM.get(ed.id + '_ifr');
888
669
 
889
- className = tinyMCE.getAttrib(path[i], "class");
890
- if ((nodeName == "img" || nodeName == "span") && className.indexOf('mceItem') != -1) {
891
- nodeName = className.replace(/mceItem([a-z]+)/gi, '$1').toLowerCase();
892
- nodeData = path[i].getAttribute('title');
893
- }
670
+ if (s.theme_advanced_resize_horizontal)
671
+ c.style.width = (r.w + r.dx) + 'px';
894
672
 
895
- if (nodeName == "a" && (anchor = tinyMCE.getAttrib(path[i], "name")) != "") {
896
- nodeName = "a";
897
- nodeName += "#" + anchor;
898
- nodeData = "";
899
- }
900
-
901
- if (getAttrib(path[i], 'name').indexOf("mce_") != 0) {
902
- var className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i], "class"), false);
903
- if (className != "" && className.indexOf('mceItem') == -1) {
904
- nodeName += "." + className;
905
- }
906
- }
673
+ c.style.height = (r.h + r.dy) + 'px';
674
+ ifr.style.height = (ifr.clientHeight + r.dy) + 'px';
907
675
 
908
- var cmd = 'tinyMCE.execInstanceCommand(\'' + editor_id + '\',\'mceSelectNodeDepth\',false,\'' + i + '\');';
909
- html += '<a title="' + nodeData + '" href="javascript:' + cmd + '" onclick="' + cmd + 'return false;" onmousedown="return false;" target="_self" class="mcePathItem">' + nodeName + '</a>';
676
+ if (s.theme_advanced_resizing_use_cookie) {
677
+ Cookie.setHash("TinyMCE_" + ed.id + "_size", {
678
+ cw : r.w + r.dx,
679
+ ch : r.h + r.dy
680
+ });
681
+ }
682
+ });
910
683
 
911
- if (i > 0) {
912
- html += " &raquo; ";
913
- }
684
+ return Event.cancel(e);
685
+ });
686
+ });
914
687
  }
915
688
 
916
- pathElm.innerHTML = '<a href="#" accesskey="x"></a>' + tinyMCE.getLang('lang_theme_path') + ": " + html + '&#160;';
917
- }
689
+ o.deltaHeight -= 21;
690
+ n = tb = null;
691
+ },
918
692
 
919
- // Reset old states
920
- tinyMCE.switchClass(editor_id + '_justifyleft', 'mceButtonNormal');
921
- tinyMCE.switchClass(editor_id + '_justifyright', 'mceButtonNormal');
922
- tinyMCE.switchClass(editor_id + '_justifycenter', 'mceButtonNormal');
923
- tinyMCE.switchClass(editor_id + '_justifyfull', 'mceButtonNormal');
924
- tinyMCE.switchClass(editor_id + '_bold', 'mceButtonNormal');
925
- tinyMCE.switchClass(editor_id + '_italic', 'mceButtonNormal');
926
- tinyMCE.switchClass(editor_id + '_underline', 'mceButtonNormal');
927
- tinyMCE.switchClass(editor_id + '_strikethrough', 'mceButtonNormal');
928
- tinyMCE.switchClass(editor_id + '_bullist', 'mceButtonNormal');
929
- tinyMCE.switchClass(editor_id + '_numlist', 'mceButtonNormal');
930
- tinyMCE.switchClass(editor_id + '_sub', 'mceButtonNormal');
931
- tinyMCE.switchClass(editor_id + '_sup', 'mceButtonNormal');
932
- tinyMCE.switchClass(editor_id + '_anchor', 'mceButtonNormal');
933
- tinyMCE.switchClass(editor_id + '_link', 'mceButtonDisabled');
934
- tinyMCE.switchClass(editor_id + '_unlink', 'mceButtonDisabled');
935
- tinyMCE.switchClass(editor_id + '_outdent', 'mceButtonDisabled');
936
- tinyMCE.switchClass(editor_id + '_image', 'mceButtonNormal');
937
- tinyMCE.switchClass(editor_id + '_hr', 'mceButtonNormal');
938
-
939
- if (node.nodeName == "A" && tinyMCE.getAttrib(node, "class").indexOf('mceItemAnchor') != -1)
940
- tinyMCE.switchClass(editor_id + '_anchor', 'mceButtonSelected');
941
-
942
- // Get link
943
- var anchorLink = tinyMCE.getParentElement(node, "a", "href");
944
-
945
- if (anchorLink || any_selection) {
946
- tinyMCE.switchClass(editor_id + '_link', anchorLink ? 'mceButtonSelected' : 'mceButtonNormal');
947
- tinyMCE.switchClass(editor_id + '_unlink', anchorLink ? 'mceButtonSelected' : 'mceButtonNormal');
948
- }
693
+ _nodeChanged : function(ed, cm, n, co) {
694
+ var t = this, p, de = 0, v, c, s = t.settings;
949
695
 
950
- // Handle visual aid
951
- tinyMCE.switchClass(editor_id + '_visualaid', visual_aid ? 'mceButtonSelected' : 'mceButtonNormal');
696
+ tinymce.each(t.stateControls, function(c) {
697
+ cm.setActive(c, ed.queryCommandState(t.controls[c][1]));
698
+ });
952
699
 
953
- if (undo_levels != -1) {
954
- tinyMCE.switchClass(editor_id + '_undo', 'mceButtonDisabled');
955
- tinyMCE.switchClass(editor_id + '_redo', 'mceButtonDisabled');
956
- }
700
+ cm.setActive('visualaid', ed.hasVisual);
701
+ cm.setDisabled('undo', !ed.undoManager.hasUndo() && !ed.typing);
702
+ cm.setDisabled('redo', !ed.undoManager.hasRedo());
703
+ cm.setDisabled('outdent', !ed.queryCommandState('Outdent'));
957
704
 
958
- // Within li, blockquote
959
- if (tinyMCE.getParentElement(node, "li,blockquote"))
960
- tinyMCE.switchClass(editor_id + '_outdent', 'mceButtonNormal');
961
-
962
- // Has redo levels
963
- if (undo_index != -1 && (undo_index < undo_levels-1 && undo_levels > 0))
964
- tinyMCE.switchClass(editor_id + '_redo', 'mceButtonNormal');
965
-
966
- // Has undo levels
967
- if (undo_index != -1 && (undo_index > 0 && undo_levels > 0))
968
- tinyMCE.switchClass(editor_id + '_undo', 'mceButtonNormal');
969
-
970
- // Select class in select box
971
- var selectElm = document.getElementById(editor_id + "_styleSelect");
972
-
973
- if (selectElm) {
974
- TinyMCE_AdvancedTheme._setupCSSClasses(editor_id);
975
-
976
- classNode = node;
977
- breakOut = false;
978
- var index = 0;
979
-
980
- do {
981
- if (classNode && classNode.className) {
982
- for (var i=0; i<selectElm.options.length; i++) {
983
- if (selectElm.options[i].value == classNode.className) {
984
- index = i;
985
- breakOut = true;
986
- break;
987
- }
988
- }
705
+ p = DOM.getParent(n, 'A');
706
+ if (c = cm.get('link')) {
707
+ if (!p || !p.name) {
708
+ c.setDisabled(!p && co);
709
+ c.setActive(!!p);
989
710
  }
990
- } while (!breakOut && classNode != null && (classNode = classNode.parentNode) != null);
991
-
992
- selectElm.selectedIndex = index;
993
- }
994
-
995
- // Select formatblock
996
- var selectElm = document.getElementById(editor_id + "_formatSelect");
997
- if (selectElm) {
998
- var elm = tinyMCE.getParentElement(node, "p,div,h1,h2,h3,h4,h5,h6,pre,address");
999
-
1000
- if (elm)
1001
- selectByValue(selectElm, "<" + elm.nodeName.toLowerCase() + ">");
1002
- else
1003
- selectByValue(selectElm, "");
1004
- }
1005
-
1006
- // Select fontselect
1007
- var selectElm = document.getElementById(editor_id + "_fontNameSelect");
1008
- if (selectElm) {
1009
- if (!tinyMCE.isSafari && !(tinyMCE.isMSIE && !tinyMCE.isOpera)) {
1010
- var face = inst.queryCommandValue('FontName');
1011
-
1012
- face = face == null || face == "" ? "" : face;
1013
-
1014
- selectByValue(selectElm, face, face != "");
1015
- } else {
1016
- var elm = tinyMCE.getParentElement(node, "font", "face");
1017
-
1018
- if (elm) {
1019
- var family = tinyMCE.getAttrib(elm, "face");
1020
-
1021
- if (family == '')
1022
- family = '' + elm.style.fontFamily;
1023
-
1024
- if (!selectByValue(selectElm, family, family != ""))
1025
- selectByValue(selectElm, "");
1026
- } else
1027
- selectByValue(selectElm, "");
1028
711
  }
1029
- }
1030
712
 
1031
- // Select fontsize
1032
- var selectElm = document.getElementById(editor_id + "_fontSizeSelect");
1033
- if (selectElm) {
1034
- if (!tinyMCE.isSafari && !tinyMCE.isOpera) {
1035
- var size = inst.queryCommandValue('FontSize');
1036
- selectByValue(selectElm, size == null || size == "" ? "0" : size);
1037
- } else {
1038
- var elm = tinyMCE.getParentElement(node, "font", "size");
1039
- if (elm) {
1040
- var size = tinyMCE.getAttrib(elm, "size");
1041
-
1042
- if (size == '') {
1043
- var sizes = new Array('', '8px', '10px', '12px', '14px', '18px', '24px', '36px');
1044
-
1045
- size = '' + elm.style.fontSize;
1046
-
1047
- for (var i=0; i<sizes.length; i++) {
1048
- if (('' + sizes[i]) == size) {
1049
- size = i;
1050
- break;
1051
- }
1052
- }
1053
- }
1054
-
1055
- if (!selectByValue(selectElm, size))
1056
- selectByValue(selectElm, "");
1057
- } else
1058
- selectByValue(selectElm, "0");
713
+ if (c = cm.get('unlink')) {
714
+ c.setDisabled(!p && co);
715
+ c.setActive(!!p && !p.name);
1059
716
  }
1060
- }
1061
717
 
1062
- // Handle align attributes
1063
- alignNode = node;
1064
- breakOut = false;
1065
- do {
1066
- if (!alignNode.getAttribute || !alignNode.getAttribute('align'))
1067
- continue;
1068
-
1069
- switch (alignNode.getAttribute('align').toLowerCase()) {
1070
- case "left":
1071
- tinyMCE.switchClass(editor_id + '_justifyleft', 'mceButtonSelected');
1072
- breakOut = true;
1073
- break;
1074
-
1075
- case "right":
1076
- tinyMCE.switchClass(editor_id + '_justifyright', 'mceButtonSelected');
1077
- breakOut = true;
1078
- break;
1079
-
1080
- case "middle":
1081
- case "center":
1082
- tinyMCE.switchClass(editor_id + '_justifycenter', 'mceButtonSelected');
1083
- breakOut = true;
1084
- break;
1085
-
1086
- case "justify":
1087
- tinyMCE.switchClass(editor_id + '_justifyfull', 'mceButtonSelected');
1088
- breakOut = true;
1089
- break;
1090
- }
1091
- } while (!breakOut && (alignNode = alignNode.parentNode) != null);
1092
-
1093
- // Div justification
1094
- var div = tinyMCE.getParentElement(node, "div");
1095
- if (div && div.style.textAlign == "center")
1096
- tinyMCE.switchClass(editor_id + '_justifycenter', 'mceButtonSelected');
1097
-
1098
- // Do special text
1099
- if (!setup_content) {
1100
- // , "JustifyLeft", "_justifyleft", "JustifyCenter", "justifycenter", "JustifyRight", "justifyright", "JustifyFull", "justifyfull", "InsertUnorderedList", "bullist", "InsertOrderedList", "numlist", "InsertUnorderedList", "bullist", "Outdent", "outdent", "Indent", "indent", "subscript", "sub"
1101
- var ar = new Array("Bold", "_bold", "Italic", "_italic", "Strikethrough", "_strikethrough", "superscript", "_sup", "subscript", "_sub");
1102
- for (var i=0; i<ar.length; i+=2) {
1103
- if (inst.queryCommandState(ar[i]))
1104
- tinyMCE.switchClass(editor_id + ar[i+1], 'mceButtonSelected');
1105
- }
1106
-
1107
- if (inst.queryCommandState("Underline") && (node.parentNode == null || node.parentNode.nodeName != "A"))
1108
- tinyMCE.switchClass(editor_id + '_underline', 'mceButtonSelected');
1109
- }
1110
-
1111
- // Handle elements
1112
- do {
1113
- switch (node.nodeName) {
1114
- case "UL":
1115
- tinyMCE.switchClass(editor_id + '_bullist', 'mceButtonSelected');
1116
- break;
718
+ if (c = cm.get('anchor')) {
719
+ c.setActive(!!p && p.name);
1117
720
 
1118
- case "OL":
1119
- tinyMCE.switchClass(editor_id + '_numlist', 'mceButtonSelected');
1120
- break;
1121
-
1122
- case "HR":
1123
- tinyMCE.switchClass(editor_id + '_hr', 'mceButtonSelected');
1124
- break;
1125
-
1126
- case "IMG":
1127
- if (getAttrib(node, 'name').indexOf('mce_') != 0 && tinyMCE.getAttrib(node, 'class').indexOf('mceItem') == -1) {
1128
- tinyMCE.switchClass(editor_id + '_image', 'mceButtonSelected');
721
+ if (tinymce.isWebKit) {
722
+ p = DOM.getParent(n, 'IMG');
723
+ c.setActive(!!p && DOM.getAttrib(p, 'mce_name') == 'a');
1129
724
  }
1130
- break;
1131
- }
1132
- } while ((node = node.parentNode) != null);
1133
- },
1134
-
1135
- // Private theme internal functions
1136
-
1137
- // This function auto imports CSS classes into the class selection droplist
1138
- _setupCSSClasses : function(editor_id) {
1139
- var i, selectElm;
1140
-
1141
- if (!TinyMCE_AdvancedTheme._autoImportCSSClasses)
1142
- return;
1143
-
1144
- selectElm = document.getElementById(editor_id + '_styleSelect');
1145
-
1146
- if (selectElm && selectElm.getAttribute('cssImported') != 'true') {
1147
- var csses = tinyMCE.getCSSClasses(editor_id);
1148
- if (csses && selectElm) {
1149
- for (i=0; i<csses.length; i++)
1150
- selectElm.options[selectElm.options.length] = new Option(csses[i], csses[i]);
1151
725
  }
1152
726
 
1153
- // Only do this once
1154
- if (csses != null && csses.length > 0)
1155
- selectElm.setAttribute('cssImported', 'true');
1156
- }
1157
- },
1158
-
1159
- _setCookie : function(name, value, expires, path, domain, secure) {
1160
- var curCookie = name + "=" + escape(value) +
1161
- ((expires) ? "; expires=" + expires.toGMTString() : "") +
1162
- ((path) ? "; path=" + escape(path) : "") +
1163
- ((domain) ? "; domain=" + domain : "") +
1164
- ((secure) ? "; secure" : "");
1165
-
1166
- document.cookie = curCookie;
1167
- },
1168
-
1169
- _getCookie : function(name) {
1170
- var dc = document.cookie;
1171
- var prefix = name + "=";
1172
- var begin = dc.indexOf("; " + prefix);
1173
-
1174
- if (begin == -1) {
1175
- begin = dc.indexOf(prefix);
1176
-
1177
- if (begin != 0)
1178
- return null;
1179
- } else
1180
- begin += 2;
1181
-
1182
- var end = document.cookie.indexOf(";", begin);
1183
-
1184
- if (end == -1)
1185
- end = dc.length;
1186
-
1187
- return unescape(dc.substring(begin + prefix.length, end));
1188
- },
1189
-
1190
- _resizeTo : function(inst, w, h, set_w) {
1191
- var editorContainer = document.getElementById(inst.editorId + '_parent');
1192
- var tableElm = editorContainer.firstChild;
1193
- var iframe = inst.iframeElement;
1194
-
1195
- if (w == null || w == "null") {
1196
- set_w = false;
1197
- w = 0;
1198
- }
1199
-
1200
- if (h == null || h == "null")
1201
- return;
727
+ p = DOM.getParent(n, 'IMG');
728
+ if (c = cm.get('image'))
729
+ c.setActive(!!p && n.className.indexOf('mceItem') == -1);
1202
730
 
1203
- w = parseInt(w);
1204
- h = parseInt(h);
1205
-
1206
- if (tinyMCE.isGecko) {
1207
- w += 2;
1208
- h += 2;
1209
- }
1210
-
1211
- var dx = w - tableElm.clientWidth;
1212
- var dy = h - tableElm.clientHeight;
1213
-
1214
- w = w < 1 ? 30 : w;
1215
- h = h < 1 ? 30 : h;
1216
-
1217
- if (set_w)
1218
- tableElm.style.width = w + "px";
1219
-
1220
- tableElm.style.height = h + "px";
1221
-
1222
- iw = iframe.clientWidth + dx;
1223
- ih = iframe.clientHeight + dy;
1224
-
1225
- iw = iw < 1 ? 30 : iw;
1226
- ih = ih < 1 ? 30 : ih;
1227
-
1228
- if (tinyMCE.isGecko) {
1229
- iw -= 2;
1230
- ih -= 2;
1231
- }
1232
-
1233
- if (set_w)
1234
- iframe.style.width = iw + "px";
1235
-
1236
- iframe.style.height = ih + "px";
1237
-
1238
- // Is it to small, make it bigger again
1239
- if (set_w) {
1240
- var tableBodyElm = tableElm.firstChild;
1241
- var minIframeWidth = tableBodyElm.scrollWidth;
1242
- if (inst.iframeElement.clientWidth < minIframeWidth) {
1243
- dx = minIframeWidth - inst.iframeElement.clientWidth;
1244
-
1245
- inst.iframeElement.style.width = (iw + dx) + "px";
731
+ if (c = cm.get('styleselect')) {
732
+ if (n.className) {
733
+ t._importClasses();
734
+ c.select(n.className);
735
+ } else
736
+ c.select();
1246
737
  }
1247
- }
1248
-
1249
- // Remove pesky table controls
1250
- inst.useCSS = false;
1251
- },
1252
738
 
1253
- /**
1254
- * Handles resizing events.
1255
- */
1256
- _resizeEventHandler : function(e) {
1257
- var resizer = TinyMCE_AdvancedTheme._resizer;
739
+ if (c = cm.get('formatselect')) {
740
+ p = DOM.getParent(n, DOM.isBlock);
1258
741
 
1259
- // Do nothing
1260
- if (!resizer.resizing)
1261
- return;
1262
-
1263
- e = typeof(e) == "undefined" ? window.event : e;
1264
-
1265
- var dx = e.screenX - resizer.downX;
1266
- var dy = e.screenY - resizer.downY;
1267
- var resizeBox = resizer.resizeBox;
1268
- var editorId = resizer.editorId;
1269
-
1270
- switch (e.type) {
1271
- case "mousemove":
1272
- var w, h;
1273
-
1274
- w = resizer.width + dx;
1275
- h = resizer.height + dy;
1276
-
1277
- w = w < 1 ? 1 : w;
1278
- h = h < 1 ? 1 : h;
1279
-
1280
- if (resizer.horizontal)
1281
- resizeBox.style.width = w + "px";
1282
-
1283
- resizeBox.style.height = h + "px";
1284
- break;
1285
-
1286
- case "mouseup":
1287
- TinyMCE_AdvancedTheme._setResizing(e, editorId, false);
1288
- TinyMCE_AdvancedTheme._resizeTo(tinyMCE.getInstanceById(editorId), resizer.width + dx, resizer.height + dy, resizer.horizontal);
1289
-
1290
- // Expire in a month
1291
- if (tinyMCE.getParam("theme_advanced_resizing_use_cookie", true)) {
1292
- var expires = new Date();
1293
- expires.setTime(expires.getTime() + 3600000 * 24 * 30);
1294
-
1295
- // Set the cookies
1296
- TinyMCE_AdvancedTheme._setCookie("TinyMCE_" + editorId + "_width", "" + (resizer.horizontal ? resizer.width + dx : ""), expires);
1297
- TinyMCE_AdvancedTheme._setCookie("TinyMCE_" + editorId + "_height", "" + (resizer.height + dy), expires);
1298
- }
1299
- break;
1300
- }
1301
- },
1302
-
1303
- /**
1304
- * Starts/stops the editor resizing.
1305
- */
1306
- _setResizing : function(e, editor_id, state) {
1307
- e = typeof(e) == "undefined" ? window.event : e;
1308
-
1309
- var resizer = TinyMCE_AdvancedTheme._resizer;
1310
- var editorContainer = document.getElementById(editor_id + '_parent');
1311
- var editorArea = document.getElementById(editor_id + '_parent').firstChild;
1312
- var resizeBox = document.getElementById(editor_id + '_resize_box');
1313
- var inst = tinyMCE.getInstanceById(editor_id);
1314
-
1315
- if (state) {
1316
- // Place box over editor area
1317
- var width = editorArea.clientWidth;
1318
- var height = editorArea.clientHeight;
1319
-
1320
- resizeBox.style.width = width + "px";
1321
- resizeBox.style.height = height + "px";
1322
-
1323
- resizer.iframeWidth = inst.iframeElement.clientWidth;
1324
- resizer.iframeHeight = inst.iframeElement.clientHeight;
1325
-
1326
- // Hide editor and show resize box
1327
- editorArea.style.display = "none";
1328
- resizeBox.style.display = "block";
1329
-
1330
- // Add event handlers, only once
1331
- if (!resizer.eventHandlers) {
1332
- if (tinyMCE.isMSIE)
1333
- tinyMCE.addEvent(document, "mousemove", TinyMCE_AdvancedTheme._resizeEventHandler);
1334
- else
1335
- tinyMCE.addEvent(window, "mousemove", TinyMCE_AdvancedTheme._resizeEventHandler);
1336
-
1337
- tinyMCE.addEvent(document, "mouseup", TinyMCE_AdvancedTheme._resizeEventHandler);
1338
-
1339
- resizer.eventHandlers = true;
742
+ if (p)
743
+ c.select(p.nodeName.toLowerCase());
1340
744
  }
1341
745
 
1342
- resizer.resizing = true;
1343
- resizer.downX = e.screenX;
1344
- resizer.downY = e.screenY;
1345
- resizer.width = parseInt(resizeBox.style.width);
1346
- resizer.height = parseInt(resizeBox.style.height);
1347
- resizer.editorId = editor_id;
1348
- resizer.resizeBox = resizeBox;
1349
- resizer.horizontal = tinyMCE.getParam("theme_advanced_resize_horizontal", true);
1350
- } else {
1351
- resizer.resizing = false;
1352
- resizeBox.style.display = "none";
1353
- editorArea.style.display = tinyMCE.isMSIE && !tinyMCE.isOpera ? "block" : "table";
1354
- tinyMCE.execCommand('mceResetDesignMode');
1355
- }
1356
- },
1357
-
1358
- _getColorHTML : function(id, n, cm) {
1359
- var i, h, cl;
746
+ if (c = cm.get('fontselect'))
747
+ c.select(ed.queryCommandValue('FontName'));
1360
748
 
1361
- h = '<span class="mceMenuLine"></span>';
1362
- cl = tinyMCE.getParam(n, TinyMCE_AdvancedTheme._defColors).split(',');
749
+ if (c = cm.get('fontsizeselect'))
750
+ c.select(ed.queryCommandValue('FontSize'));
1363
751
 
1364
- h += '<table class="mceColors"><tr>';
1365
- for (i=0; i<cl.length; i++) {
1366
- c = 'tinyMCE.execInstanceCommand(\'' + id + '\', \'' + cm + '\', false, \'#' + cl[i] + '\');';
1367
- h += '<td><a href="javascript:' + c + '" style="background-color: #' + cl[i] + '" onclick="' + c + ';return false;"></a></td>';
752
+ if (s.theme_advanced_path && s.theme_advanced_statusbar_location) {
753
+ p = DOM.get(ed.id + '_path') || DOM.add(ed.id + '_path_row', 'span', {id : ed.id + '_path'});
754
+ p.innerHTML = '';
1368
755
 
1369
- if ((i+1) % 8 == 0)
1370
- h += '</tr><tr>';
1371
- }
1372
-
1373
- h += '</tr></table>';
1374
- /*
1375
- h += '<a href="" class="mceMoreColors">More colors</a>';
1376
- */
1377
-
1378
- return h;
1379
- },
1380
-
1381
- _insertImage : function(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout) {
1382
- tinyMCE.execCommand('mceBeginUndoLevel');
1383
-
1384
- if (src == "")
1385
- return;
756
+ ed.dom.getParent(n, function(n) {
757
+ var na = n.nodeName.toLowerCase(), u, pi, ti = '';
1386
758
 
1387
- if (!tinyMCE.imgElement && tinyMCE.isSafari) {
1388
- var html = "";
759
+ // Ignore non element and hidden elements
760
+ if (n.nodeType != 1 || (DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved')))
761
+ return;
1389
762
 
1390
- html += '<img src="' + src + '" alt="' + alt + '"';
1391
- html += ' border="' + border + '" hspace="' + hspace + '"';
1392
- html += ' vspace="' + vspace + '" width="' + width + '"';
1393
- html += ' height="' + height + '" align="' + align + '" title="' + title + '" onmouseover="' + onmouseover + '" onmouseout="' + onmouseout + '" />';
763
+ // Fake name
764
+ if (v = DOM.getAttrib(n, 'mce_name'))
765
+ na = v;
766
+
767
+ // Handle prefix
768
+ if (tinymce.isIE && n.scopeName !== 'HTML')
769
+ na = n.scopeName + ':' + na;
1394
770
 
1395
- tinyMCE.execCommand("mceInsertContent", false, html);
1396
- } else {
1397
- if (!tinyMCE.imgElement && tinyMCE.selectedInstance) {
1398
- if (tinyMCE.isSafari)
1399
- tinyMCE.execCommand("mceInsertContent", false, '<img src="' + tinyMCE.uniqueURL + '" />');
1400
- else
1401
- tinyMCE.selectedInstance.contentDocument.execCommand("insertimage", false, tinyMCE.uniqueURL);
1402
-
1403
- tinyMCE.imgElement = tinyMCE.getElementByAttributeValue(tinyMCE.selectedInstance.contentDocument.body, "img", "src", tinyMCE.uniqueURL);
1404
- }
1405
- }
771
+ // Remove internal prefix
772
+ na = na.replace(/mce\:/g, '');
1406
773
 
1407
- if (tinyMCE.imgElement) {
1408
- var needsRepaint = false;
1409
- var msrc = src;
1410
-
1411
- src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, tinyMCE.imgElement);");
1412
-
1413
- if (tinyMCE.getParam('convert_urls'))
1414
- msrc = src;
1415
-
1416
- if (onmouseover && onmouseover != "")
1417
- onmouseover = "this.src='" + eval(tinyMCE.settings['urlconverter_callback'] + "(onmouseover, tinyMCE.imgElement);") + "';";
1418
-
1419
- if (onmouseout && onmouseout != "")
1420
- onmouseout = "this.src='" + eval(tinyMCE.settings['urlconverter_callback'] + "(onmouseout, tinyMCE.imgElement);") + "';";
1421
-
1422
- // Use alt as title if it's undefined
1423
- if (typeof(title) == "undefined")
1424
- title = alt;
774
+ // Handle node name
775
+ switch (na) {
776
+ case 'b':
777
+ na = 'strong';
778
+ break;
1425
779
 
1426
- if (width != tinyMCE.imgElement.getAttribute("width") || height != tinyMCE.imgElement.getAttribute("height") || align != tinyMCE.imgElement.getAttribute("align"))
1427
- needsRepaint = true;
780
+ case 'i':
781
+ na = 'em';
782
+ break;
1428
783
 
1429
- tinyMCE.setAttrib(tinyMCE.imgElement, 'src', src);
1430
- tinyMCE.setAttrib(tinyMCE.imgElement, 'mce_src', msrc);
1431
- tinyMCE.setAttrib(tinyMCE.imgElement, 'alt', alt);
1432
- tinyMCE.setAttrib(tinyMCE.imgElement, 'title', title);
1433
- tinyMCE.setAttrib(tinyMCE.imgElement, 'align', align);
1434
- tinyMCE.setAttrib(tinyMCE.imgElement, 'border', border, true);
1435
- tinyMCE.setAttrib(tinyMCE.imgElement, 'hspace', hspace, true);
1436
- tinyMCE.setAttrib(tinyMCE.imgElement, 'vspace', vspace, true);
1437
- tinyMCE.setAttrib(tinyMCE.imgElement, 'width', width, true);
1438
- tinyMCE.setAttrib(tinyMCE.imgElement, 'height', height, true);
1439
- tinyMCE.setAttrib(tinyMCE.imgElement, 'onmouseover', onmouseover);
1440
- tinyMCE.setAttrib(tinyMCE.imgElement, 'onmouseout', onmouseout);
784
+ case 'img':
785
+ if (v = DOM.getAttrib(n, 'src'))
786
+ ti += 'src: ' + v + ' ';
1441
787
 
1442
- // Fix for bug #989846 - Image resize bug
1443
- if (width && width != "")
1444
- tinyMCE.imgElement.style.pixelWidth = width;
788
+ break;
1445
789
 
1446
- if (height && height != "")
1447
- tinyMCE.imgElement.style.pixelHeight = height;
790
+ case 'a':
791
+ if (v = DOM.getAttrib(n, 'name')) {
792
+ ti += 'name: ' + v + ' ';
793
+ na += '#' + v;
794
+ }
1448
795
 
1449
- if (needsRepaint)
1450
- tinyMCE.selectedInstance.repaint();
1451
- }
796
+ if (v = DOM.getAttrib(n, 'href'))
797
+ ti += 'href: ' + v + ' ';
1452
798
 
1453
- tinyMCE.execCommand('mceEndUndoLevel');
1454
- },
799
+ break;
1455
800
 
1456
- _insertLink : function(href, target, title, onclick, style_class) {
1457
- tinyMCE.execCommand('mceBeginUndoLevel');
801
+ case 'font':
802
+ if (s.convert_fonts_to_spans)
803
+ na = 'span';
1458
804
 
1459
- if (tinyMCE.selectedInstance && tinyMCE.selectedElement && tinyMCE.selectedElement.nodeName.toLowerCase() == "img") {
1460
- var doc = tinyMCE.selectedInstance.getDoc();
1461
- var linkElement = tinyMCE.getParentElement(tinyMCE.selectedElement, "a");
1462
- var newLink = false;
805
+ if (v = DOM.getAttrib(n, 'face'))
806
+ ti += 'font: ' + v + ' ';
1463
807
 
1464
- if (!linkElement) {
1465
- linkElement = doc.createElement("a");
1466
- newLink = true;
1467
- }
808
+ if (v = DOM.getAttrib(n, 'size'))
809
+ ti += 'size: ' + v + ' ';
1468
810
 
1469
- var mhref = href;
1470
- var thref = eval(tinyMCE.settings['urlconverter_callback'] + "(href, linkElement);");
1471
- mhref = tinyMCE.getParam('convert_urls') ? href : mhref;
811
+ if (v = DOM.getAttrib(n, 'color'))
812
+ ti += 'color: ' + v + ' ';
1472
813
 
1473
- tinyMCE.setAttrib(linkElement, 'href', thref);
1474
- tinyMCE.setAttrib(linkElement, 'mce_href', mhref);
1475
- tinyMCE.setAttrib(linkElement, 'target', target);
1476
- tinyMCE.setAttrib(linkElement, 'title', title);
1477
- tinyMCE.setAttrib(linkElement, 'onclick', onclick);
1478
- tinyMCE.setAttrib(linkElement, 'class', style_class);
814
+ break;
1479
815
 
1480
- if (newLink) {
1481
- linkElement.appendChild(tinyMCE.selectedElement.cloneNode(true));
1482
- tinyMCE.selectedElement.parentNode.replaceChild(linkElement, tinyMCE.selectedElement);
1483
- }
816
+ case 'span':
817
+ if (v = DOM.getAttrib(n, 'style'))
818
+ ti += 'style: ' + v + ' ';
1484
819
 
1485
- return;
1486
- }
820
+ break;
821
+ }
1487
822
 
1488
- if (!tinyMCE.linkElement && tinyMCE.selectedInstance) {
1489
- if (tinyMCE.isSafari) {
1490
- tinyMCE.execCommand("mceInsertContent", false, '<a href="' + tinyMCE.uniqueURL + '">' + tinyMCE.selectedInstance.selection.getSelectedHTML() + '</a>');
1491
- } else
1492
- tinyMCE.selectedInstance.contentDocument.execCommand("createlink", false, tinyMCE.uniqueURL);
823
+ if (v = DOM.getAttrib(n, 'id'))
824
+ ti += 'id: ' + v + ' ';
1493
825
 
1494
- tinyMCE.linkElement = tinyMCE.getElementByAttributeValue(tinyMCE.selectedInstance.contentDocument.body, "a", "href", tinyMCE.uniqueURL);
826
+ if (v = n.className) {
827
+ v = v.replace(/(webkit-[\w\-]+|Apple-[\w\-]+|mceItem\w+|mceVisualAid)/g, '');
1495
828
 
1496
- var elementArray = tinyMCE.getElementsByAttributeValue(tinyMCE.selectedInstance.contentDocument.body, "a", "href", tinyMCE.uniqueURL);
829
+ if (v && v.indexOf('mceItem') == -1) {
830
+ ti += 'class: ' + v + ' ';
1497
831
 
1498
- for (var i=0; i<elementArray.length; i++) {
1499
- var mhref = href;
1500
- var thref = eval(tinyMCE.settings['urlconverter_callback'] + "(href, elementArray[i]);");
1501
- mhref = tinyMCE.getParam('convert_urls') ? href : mhref;
832
+ if (DOM.isBlock(n) || na == 'img' || na == 'span')
833
+ na += '.' + v;
834
+ }
835
+ }
1502
836
 
1503
- tinyMCE.setAttrib(elementArray[i], 'href', thref);
1504
- tinyMCE.setAttrib(elementArray[i], 'mce_href', mhref);
1505
- tinyMCE.setAttrib(elementArray[i], 'target', target);
1506
- tinyMCE.setAttrib(elementArray[i], 'title', title);
1507
- tinyMCE.setAttrib(elementArray[i], 'onclick', onclick);
1508
- tinyMCE.setAttrib(elementArray[i], 'class', style_class);
837
+ na = na.replace(/(html:)/g, '');
838
+ na = {name : na, node : n, title : ti};
839
+ t.onResolveName.dispatch(t, na);
840
+ ti = na.title;
841
+ na = na.name;
842
+
843
+ //u = "javascript:tinymce.EditorManager.get('" + ed.id + "').theme._sel('" + (de++) + "');";
844
+ pi = DOM.create('a', {'href' : "#" + (de++) + "", onmousedown : "return false;", title : ti}, na);
845
+
846
+ if (p.hasChildNodes()) {
847
+ p.insertBefore(document.createTextNode(' \u00bb '), p.firstChild);
848
+ p.insertBefore(pi, p.firstChild);
849
+ } else
850
+ p.appendChild(pi);
851
+ }, ed.getBody());
1509
852
  }
1510
-
1511
- tinyMCE.linkElement = elementArray[0];
853
+ },
854
+
855
+ // Commands gets called by execCommand
856
+
857
+ _sel : function(v) {
858
+ this.editor.execCommand('mceSelectNodeDepth', false, v);
859
+ },
860
+
861
+ _mceInsertAnchor : function(ui, v) {
862
+ var ed = this.editor;
863
+
864
+ ed.windowManager.open({
865
+ url : tinymce.baseURL + '/themes/advanced/anchor.htm',
866
+ width : 320 + Number(ed.getLang('advanced.anchor_delta_width', 0)),
867
+ height : 90 + Number(ed.getLang('advanced.anchor_delta_height', 0)),
868
+ inline : true
869
+ }, {
870
+ theme_url : this.url
871
+ });
872
+ },
873
+
874
+ _mceCharMap : function() {
875
+ var ed = this.editor;
876
+
877
+ ed.windowManager.open({
878
+ url : tinymce.baseURL + '/themes/advanced/charmap.htm',
879
+ width : 550 + Number(ed.getLang('advanced.charmap_delta_width', 0)),
880
+ height : 250 + Number(ed.getLang('advanced.charmap_delta_height', 0)),
881
+ inline : true
882
+ }, {
883
+ theme_url : this.url
884
+ });
885
+ },
886
+
887
+ _mceHelp : function() {
888
+ var ed = this.editor;
889
+
890
+ ed.windowManager.open({
891
+ url : tinymce.baseURL + '/themes/advanced/about.htm',
892
+ width : 480,
893
+ height : 380,
894
+ inline : true
895
+ }, {
896
+ theme_url : this.url
897
+ });
898
+ },
899
+
900
+ _mceColorPicker : function(u, v) {
901
+ var ed = this.editor;
902
+
903
+ v = v || {};
904
+
905
+ ed.windowManager.open({
906
+ url : tinymce.baseURL + '/themes/advanced/color_picker.htm',
907
+ width : 375 + Number(ed.getLang('advanced.colorpicker_delta_width', 0)),
908
+ height : 250 + Number(ed.getLang('advanced.colorpicker_delta_height', 0)),
909
+ close_previous : false,
910
+ inline : true
911
+ }, {
912
+ input_color : v.color,
913
+ func : v.func,
914
+ theme_url : this.url
915
+ });
916
+ },
917
+
918
+ _mceCodeEditor : function(ui, val) {
919
+ var ed = this.editor;
920
+
921
+ ed.windowManager.open({
922
+ url : tinymce.baseURL + '/themes/advanced/source_editor.htm',
923
+ width : parseInt(ed.getParam("theme_advanced_source_editor_width", 720)),
924
+ height : parseInt(ed.getParam("theme_advanced_source_editor_height", 580)),
925
+ inline : true,
926
+ resizable : true,
927
+ maximizable : true
928
+ }, {
929
+ theme_url : this.url
930
+ });
931
+ },
932
+
933
+ _mceImage : function(ui, val) {
934
+ var ed = this.editor;
935
+
936
+ ed.windowManager.open({
937
+ url : tinymce.baseURL + '/themes/advanced/image.htm',
938
+ width : 355 + Number(ed.getLang('advanced.image_delta_width', 0)),
939
+ height : 275 + Number(ed.getLang('advanced.image_delta_height', 0)),
940
+ inline : true
941
+ }, {
942
+ theme_url : this.url
943
+ });
944
+ },
945
+
946
+ _mceLink : function(ui, val) {
947
+ var ed = this.editor;
948
+
949
+ ed.windowManager.open({
950
+ url : tinymce.baseURL + '/themes/advanced/link.htm',
951
+ width : 310 + Number(ed.getLang('advanced.link_delta_width', 0)),
952
+ height : 200 + Number(ed.getLang('advanced.link_delta_height', 0)),
953
+ inline : true
954
+ }, {
955
+ theme_url : this.url
956
+ });
957
+ },
958
+
959
+ _mceNewDocument : function() {
960
+ var ed = this.editor;
961
+
962
+ ed.windowManager.confirm('advanced.newdocument', function(s) {
963
+ if (s)
964
+ ed.execCommand('mceSetContent', false, '');
965
+ });
966
+ },
967
+
968
+ _mceForeColor : function() {
969
+ var t = this;
970
+
971
+ this._mceColorPicker(0, {
972
+ func : function(co) {
973
+ t.editor.execCommand('ForeColor', false, co);
974
+ }
975
+ });
976
+ },
977
+
978
+ _mceBackColor : function() {
979
+ var t = this;
980
+
981
+ this._mceColorPicker(0, {
982
+ func : function(co) {
983
+ t.editor.execCommand('HiliteColor', false, co);
984
+ }
985
+ });
1512
986
  }
987
+ });
1513
988
 
1514
- if (tinyMCE.linkElement) {
1515
- var mhref = href;
1516
- href = eval(tinyMCE.settings['urlconverter_callback'] + "(href, tinyMCE.linkElement);");
1517
- mhref = tinyMCE.getParam('convert_urls') ? href : mhref;
1518
-
1519
- tinyMCE.setAttrib(tinyMCE.linkElement, 'href', href);
1520
- tinyMCE.setAttrib(tinyMCE.linkElement, 'mce_href', mhref);
1521
- tinyMCE.setAttrib(tinyMCE.linkElement, 'target', target);
1522
- tinyMCE.setAttrib(tinyMCE.linkElement, 'title', title);
1523
- tinyMCE.setAttrib(tinyMCE.linkElement, 'onclick', onclick);
1524
- tinyMCE.setAttrib(tinyMCE.linkElement, 'class', style_class);
1525
- }
1526
-
1527
- tinyMCE.execCommand('mceEndUndoLevel');
1528
- }
1529
- };
1530
-
1531
- tinyMCE.addTheme("advanced", TinyMCE_AdvancedTheme);
1532
-
1533
- // Add default buttons maps for advanced theme and all internal plugins
1534
- tinyMCE.addButtonMap(TinyMCE_AdvancedTheme._buttonMap);
989
+ tinymce.ThemeManager.add('advanced', tinymce.themes.AdvancedTheme);
990
+ }());