wagn 1.12.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (875) hide show
  1. data/.gitignore +24 -0
  2. data/.rspec +4 -0
  3. data/CONTRIBUTING.rdoc +13 -0
  4. data/GPL +331 -0
  5. data/Gemfile +87 -0
  6. data/LICENSE +16 -0
  7. data/README.rdoc +103 -0
  8. data/Rakefile +7 -0
  9. data/VERSION +1 -0
  10. data/app/assets/images/body-bg.bmp +0 -0
  11. data/app/assets/images/body-bg.png +0 -0
  12. data/app/assets/images/external_link.png +0 -0
  13. data/app/assets/images/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  14. data/app/assets/images/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  15. data/app/assets/images/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  16. data/app/assets/images/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  17. data/app/assets/images/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  18. data/app/assets/images/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  19. data/app/assets/images/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  20. data/app/assets/images/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  21. data/app/assets/images/images/ui-icons_222222_256x240.png +0 -0
  22. data/app/assets/images/images/ui-icons_2e83ff_256x240.png +0 -0
  23. data/app/assets/images/images/ui-icons_454545_256x240.png +0 -0
  24. data/app/assets/images/images/ui-icons_888888_256x240.png +0 -0
  25. data/app/assets/images/images/ui-icons_cd0a0a_256x240.png +0 -0
  26. data/app/assets/javascripts/application.js +25 -0
  27. data/app/assets/javascripts/html5shiv-printshiv.js +499 -0
  28. data/app/assets/javascripts/jquery.autosize.js +254 -0
  29. data/app/assets/javascripts/jquery.fileupload.js +1111 -0
  30. data/app/assets/javascripts/jquery.iframe-transport.js +156 -0
  31. data/app/assets/javascripts/jquery.ui.autocomplete.html.js +40 -0
  32. data/app/assets/javascripts/wagn.js.coffee +288 -0
  33. data/app/assets/javascripts/wagn_menu.js +76 -0
  34. data/app/assets/javascripts/wagn_mod.js.coffee +401 -0
  35. data/app/controllers/account_controller.rb +67 -0
  36. data/app/controllers/admin_controller.rb +130 -0
  37. data/app/controllers/card_controller.rb +163 -0
  38. data/app/controllers/stub_card_controller.rb +9 -0
  39. data/app/controllers/wagn_controller.rb +123 -0
  40. data/app/mailers/.gitkeep +0 -0
  41. data/app/mailers/mailer.rb +108 -0
  42. data/app/models/.gitkeep +0 -0
  43. data/app/models/account.rb +196 -0
  44. data/app/models/card.rb +42 -0
  45. data/app/models/card/reference.rb +71 -0
  46. data/app/models/card/revision.rb +45 -0
  47. data/app/models/user.rb +123 -0
  48. data/app/views/mailer/account_info.text.erb +17 -0
  49. data/app/views/mailer/change_notice.html.erb +32 -0
  50. data/app/views/mailer/flexmail.html.erb +6 -0
  51. data/app/views/mailer/signup_alert.html.erb +14 -0
  52. data/bin/wagn +9 -0
  53. data/config.ru +4 -0
  54. data/config/application.rb +15 -0
  55. data/config/boot.rb +8 -0
  56. data/config/environment.rb +8 -0
  57. data/config/environments/cucumber.rb +30 -0
  58. data/config/environments/development.rb +59 -0
  59. data/config/environments/production.rb +65 -0
  60. data/config/environments/profile.rb +28 -0
  61. data/config/environments/test.rb +45 -0
  62. data/config/initializers/01_init_ruby_extensions.rb +76 -0
  63. data/config/initializers/airbrake.rb +10 -0
  64. data/config/initializers/backtrace_silencers.rb +8 -0
  65. data/config/initializers/inflections.rb +13 -0
  66. data/config/initializers/mime_types.rb +13 -0
  67. data/config/initializers/notification.rb +4 -0
  68. data/config/initializers/recaptcha.rb +6 -0
  69. data/config/initializers/schema_views.rb +59 -0
  70. data/config/initializers/secret_token.rb +9 -0
  71. data/config/initializers/session_store.rb +9 -0
  72. data/config/initializers/uuid_state_file.rb +2 -0
  73. data/config/initializers/wrap_parameters.rb +15 -0
  74. data/config/routes.rb +45 -0
  75. data/config/samples/asset_htaccess +9 -0
  76. data/config/samples/cucumber.yml +8 -0
  77. data/config/samples/database.yml.erb +34 -0
  78. data/config/samples/robots.txt +12 -0
  79. data/config/version.txt +1 -0
  80. data/config/version_cards.txt +1 -0
  81. data/db/bootstrap/card_references.yml +1478 -0
  82. data/db/bootstrap/card_revisions.yml +3561 -0
  83. data/db/bootstrap/cards.yml +7192 -0
  84. data/db/bootstrap/users.yml +29 -0
  85. data/db/migrate/20110511221913_require_earlier_migrations.rb +17 -0
  86. data/db/migrate/20120105203350_require_1_8_migrations.rb +15 -0
  87. data/db/migrate/20121111025347_require_1_10_migrations.rb +15 -0
  88. data/db/migrate/20121118114000_split_link_type.rb +16 -0
  89. data/db/migrate/20121118115000_update_link_type.rb +19 -0
  90. data/db/migrate/20130106052640_table_cleanup.rb +25 -0
  91. data/db/migrate/20130109015336_trunk_left.rb +14 -0
  92. data/db/migrate/20130411210957_update_codenames.rb +14 -0
  93. data/db/migrate_cards/20130411191151_renaming_for_menu.rb +56 -0
  94. data/db/migrate_cards/20130411211600_delete_old_related_tab_cards.rb +27 -0
  95. data/db/migrate_cards/20130419215612_import_help_text.rb +23 -0
  96. data/db/migrate_cards/20130823192433_add_style_cards.rb +95 -0
  97. data/db/migrate_cards/20130910183318_move_styles_to_content.rb +19 -0
  98. data/db/migrate_cards/20130920214038_jsonize_tinymce.rb +24 -0
  99. data/db/migrate_cards/20130920291703_update_stylesheets.rb +26 -0
  100. data/db/migrate_cards/20130927191728_account_events.rb +29 -0
  101. data/db/migrate_cards/20131016172445_common_css_patch.rb +21 -0
  102. data/db/migrate_cards/20140110193325_reset_account_request_type.rb +19 -0
  103. data/db/migrate_cards/data/1.11_help_text.json +410 -0
  104. data/db/migrate_cards/data/1.12_stylesheets/classic_cards.scss +101 -0
  105. data/db/migrate_cards/data/1.12_stylesheets/common.scss +226 -0
  106. data/db/migrate_cards/data/1.12_stylesheets/right_sidebar.scss +27 -0
  107. data/db/migrate_cards/data/1.12_stylesheets/traditional.scss +152 -0
  108. data/db/schema.rb +92 -0
  109. data/db/seeds.rb +8 -0
  110. data/features/account_requests.feature +22 -0
  111. data/features/autonaming.feature +21 -0
  112. data/features/content_settings.feature +44 -0
  113. data/features/flexmail.feature +54 -0
  114. data/features/google_maps.feature +31 -0
  115. data/features/hello_wagn.feature +29 -0
  116. data/features/layouts.feature +23 -0
  117. data/features/notifications.feature +31 -0
  118. data/features/pattern_settings.feature +43 -0
  119. data/features/pointer_inputs.feature +81 -0
  120. data/features/presetting_content.feature +12 -0
  121. data/features/step_definitions/email_steps.rb +183 -0
  122. data/features/step_definitions/notification_steps.rb +23 -0
  123. data/features/step_definitions/wagn_steps.rb +207 -0
  124. data/features/step_definitions/web_steps.rb +138 -0
  125. data/features/support/env.rb +58 -0
  126. data/features/support/paths.rb +58 -0
  127. data/features/support/scopes.rb +22 -0
  128. data/features/support/wag_env.rb +11 -0
  129. data/features/table_of_contents.feature +35 -0
  130. data/features/templates.feature +30 -0
  131. data/features/update_includers.feature +68 -0
  132. data/features/virtual_cards.feature +11 -0
  133. data/features/watch.feature +54 -0
  134. data/lib/active_record/foreign_keys.rb +80 -0
  135. data/lib/active_record/quoting_and_matching.rb +72 -0
  136. data/lib/card/chunk.rb +103 -0
  137. data/lib/card/codename.rb +47 -0
  138. data/lib/card/constant.rb +20 -0
  139. data/lib/card/content.rb +206 -0
  140. data/lib/card/diff.rb +317 -0
  141. data/lib/card/exceptions.rb +22 -0
  142. data/lib/card/flexmail.rb +47 -0
  143. data/lib/card/format.rb +541 -0
  144. data/lib/card/name.rb +39 -0
  145. data/lib/card/query.rb +81 -0
  146. data/lib/card/query/card_spec.rb +516 -0
  147. data/lib/card/query/ref_spec.rb +23 -0
  148. data/lib/card/query/spec.rb +21 -0
  149. data/lib/card/query/value_spec.rb +66 -0
  150. data/lib/card/set.rb +239 -0
  151. data/lib/card/set_pattern.rb +140 -0
  152. data/lib/generators/card_migration/USAGE +12 -0
  153. data/lib/generators/card_migration/card_migration_generator.rb +10 -0
  154. data/lib/generators/card_migration/templates/card_migration.erb +16 -0
  155. data/lib/generators/format/USAGE +9 -0
  156. data/lib/generators/format/format_generator.rb +8 -0
  157. data/lib/generators/format/templates/format_spec_template.erb +6 -0
  158. data/lib/generators/format/templates/format_template.erb +3 -0
  159. data/lib/generators/set/USAGE +9 -0
  160. data/lib/generators/set/set_generator.rb +14 -0
  161. data/lib/generators/set/templates/set_spec_template.erb +6 -0
  162. data/lib/generators/set/templates/set_template.erb +1 -0
  163. data/lib/generators/wagn/USAGE +8 -0
  164. data/lib/generators/wagn/templates/Gemfile +5 -0
  165. data/lib/generators/wagn/templates/Rakefile +7 -0
  166. data/lib/generators/wagn/templates/config.ru +5 -0
  167. data/lib/generators/wagn/templates/config/application.rb +47 -0
  168. data/lib/generators/wagn/templates/config/boot.rb +11 -0
  169. data/lib/generators/wagn/templates/config/database.yml +35 -0
  170. data/lib/generators/wagn/templates/config/databases/frontbase.yml +31 -0
  171. data/lib/generators/wagn/templates/config/databases/ibm_db.yml +86 -0
  172. data/lib/generators/wagn/templates/config/databases/jdbc.yml +62 -0
  173. data/lib/generators/wagn/templates/config/databases/jdbcmysql.yml +33 -0
  174. data/lib/generators/wagn/templates/config/databases/jdbcpostgresql.yml +43 -0
  175. data/lib/generators/wagn/templates/config/databases/jdbcsqlite3.yml +20 -0
  176. data/lib/generators/wagn/templates/config/databases/mysql.yml +54 -0
  177. data/lib/generators/wagn/templates/config/databases/oracle.yml +39 -0
  178. data/lib/generators/wagn/templates/config/databases/postgresql.yml +55 -0
  179. data/lib/generators/wagn/templates/config/databases/sqlite3.yml +25 -0
  180. data/lib/generators/wagn/templates/config/environment.rb +5 -0
  181. data/lib/generators/wagn/templates/gitignore +18 -0
  182. data/lib/generators/wagn/templates/script/wagn +5 -0
  183. data/lib/generators/wagn/wagn_generator.rb +127 -0
  184. data/lib/tasks/.gitkeep +0 -0
  185. data/lib/tasks/cucumber.rake +68 -0
  186. data/lib/tasks/db.rake +54 -0
  187. data/lib/tasks/test.rake +94 -0
  188. data/lib/tasks/wagn.rake +215 -0
  189. data/lib/wagn.rb +33 -0
  190. data/lib/wagn/all.rb +16 -0
  191. data/lib/wagn/application.rb +96 -0
  192. data/lib/wagn/authenticated_system.rb +38 -0
  193. data/lib/wagn/cache.rb +176 -0
  194. data/lib/wagn/cli.rb +17 -0
  195. data/lib/wagn/commands.rb +2 -0
  196. data/lib/wagn/commands/application.rb +10 -0
  197. data/lib/wagn/env.rb +42 -0
  198. data/lib/wagn/exceptions.rb +10 -0
  199. data/lib/wagn/loader.rb +135 -0
  200. data/lib/wagn/location.rb +88 -0
  201. data/lib/wagn/migration_helper.rb +32 -0
  202. data/lib/wagn/script_wagn_loader.rb +29 -0
  203. data/lib/wagn/spec_helper.rb +99 -0
  204. data/lib/wagn/version.rb +27 -0
  205. data/mods/core/chunks/literal.rb +24 -0
  206. data/mods/core/chunks/reference.rb +41 -0
  207. data/mods/core/chunks/uri.rb +135 -0
  208. data/mods/core/formats/data_format.rb +2 -0
  209. data/mods/core/formats/html_format.rb +319 -0
  210. data/mods/core/formats/text_format.rb +5 -0
  211. data/mods/core/layouts/blank.html +5 -0
  212. data/mods/core/layouts/default.html +20 -0
  213. data/mods/core/layouts/noside.html +16 -0
  214. data/mods/core/layouts/pre.html +2 -0
  215. data/mods/core/layouts/simple.html +5 -0
  216. data/mods/core/set_patterns/01_all.rb +12 -0
  217. data/mods/core/set_patterns/02_all_plus.rb +11 -0
  218. data/mods/core/set_patterns/03_type.rb +19 -0
  219. data/mods/core/set_patterns/04_star.rb +11 -0
  220. data/mods/core/set_patterns/05_rstar.rb +13 -0
  221. data/mods/core/set_patterns/06_right.rb +16 -0
  222. data/mods/core/set_patterns/07_type_plus_right.rb +19 -0
  223. data/mods/core/set_patterns/08_self.rb +15 -0
  224. data/mods/core/sets/all/active_card.rb +21 -0
  225. data/mods/core/sets/all/attribute_tracking.rb +85 -0
  226. data/mods/core/sets/all/collection.rb +46 -0
  227. data/mods/core/sets/all/content.rb +90 -0
  228. data/mods/core/sets/all/fetch.rb +198 -0
  229. data/mods/core/sets/all/initialize.rb +45 -0
  230. data/mods/core/sets/all/name.rb +266 -0
  231. data/mods/core/sets/all/pattern.rb +79 -0
  232. data/mods/core/sets/all/permissions.rb +218 -0
  233. data/mods/core/sets/all/phases.rb +159 -0
  234. data/mods/core/sets/all/references.rb +102 -0
  235. data/mods/core/sets/all/rules.rb +125 -0
  236. data/mods/core/sets/all/states.rb +16 -0
  237. data/mods/core/sets/all/templating.rb +118 -0
  238. data/mods/core/sets/all/tracked_attributes.rb +145 -0
  239. data/mods/core/sets/all/trash.rb +45 -0
  240. data/mods/core/sets/all/type.rb +70 -0
  241. data/mods/core/sets/all/utils.rb +91 -0
  242. data/mods/standard/chunks/include.rb +85 -0
  243. data/mods/standard/chunks/link.rb +84 -0
  244. data/mods/standard/formats/css_format.rb +3 -0
  245. data/mods/standard/formats/csv_format.rb +3 -0
  246. data/mods/standard/formats/email_html_format.rb +9 -0
  247. data/mods/standard/formats/file_format.rb +3 -0
  248. data/mods/standard/formats/json_format.rb +3 -0
  249. data/mods/standard/formats/kml_format.rb +3 -0
  250. data/mods/standard/formats/rss_format.rb +8 -0
  251. data/mods/standard/formats/xml_format.rb +3 -0
  252. data/mods/standard/lib/google_maps_addon.rb +30 -0
  253. data/mods/standard/lib/stylesheets/functional.scss +181 -0
  254. data/mods/standard/lib/stylesheets/jquery-ui-smoothness.css +474 -0
  255. data/mods/standard/lib/stylesheets/standard.scss +614 -0
  256. data/mods/standard/sets/all/account.rb +241 -0
  257. data/mods/standard/sets/all/admin.rb +53 -0
  258. data/mods/standard/sets/all/all_css.rb +39 -0
  259. data/mods/standard/sets/all/all_csv.rb +53 -0
  260. data/mods/standard/sets/all/attach.rb +143 -0
  261. data/mods/standard/sets/all/base.rb +136 -0
  262. data/mods/standard/sets/all/comment.rb +39 -0
  263. data/mods/standard/sets/all/email_html.rb +7 -0
  264. data/mods/standard/sets/all/file.rb +14 -0
  265. data/mods/standard/sets/all/flexmail.rb +3 -0
  266. data/mods/standard/sets/all/follow.rb +117 -0
  267. data/mods/standard/sets/all/geocode.rb +16 -0
  268. data/mods/standard/sets/all/history.rb +112 -0
  269. data/mods/standard/sets/all/json.rb +73 -0
  270. data/mods/standard/sets/all/kml.rb +48 -0
  271. data/mods/standard/sets/all/rich_html.rb +472 -0
  272. data/mods/standard/sets/all/rss.rb +66 -0
  273. data/mods/standard/sets/all/text.rb +9 -0
  274. data/mods/standard/sets/right/account.rb +1 -0
  275. data/mods/standard/sets/right/add_help.rb +1 -0
  276. data/mods/standard/sets/right/comment.rb +3 -0
  277. data/mods/standard/sets/right/create.rb +82 -0
  278. data/mods/standard/sets/right/crypted_password.rb +4 -0
  279. data/mods/standard/sets/right/default.rb +2 -0
  280. data/mods/standard/sets/right/delete.rb +3 -0
  281. data/mods/standard/sets/right/email.rb +5 -0
  282. data/mods/standard/sets/right/help.rb +1 -0
  283. data/mods/standard/sets/right/read.rb +3 -0
  284. data/mods/standard/sets/right/salt.rb +4 -0
  285. data/mods/standard/sets/right/structure.rb +11 -0
  286. data/mods/standard/sets/right/style.rb +67 -0
  287. data/mods/standard/sets/right/update.rb +3 -0
  288. data/mods/standard/sets/right/when_created.rb +5 -0
  289. data/mods/standard/sets/right/when_last_edited.rb +5 -0
  290. data/mods/standard/sets/rstar/rules.rb +235 -0
  291. data/mods/standard/sets/self/account_links.rb +30 -0
  292. data/mods/standard/sets/self/alerts.rb +6 -0
  293. data/mods/standard/sets/self/foot.rb +9 -0
  294. data/mods/standard/sets/self/head.rb +105 -0
  295. data/mods/standard/sets/self/navbox.rb +28 -0
  296. data/mods/standard/sets/self/now.rb +7 -0
  297. data/mods/standard/sets/self/recent.rb +45 -0
  298. data/mods/standard/sets/self/search.rb +37 -0
  299. data/mods/standard/sets/self/style_functional.rb +8 -0
  300. data/mods/standard/sets/self/style_jquery_ui_smoothness.rb +8 -0
  301. data/mods/standard/sets/self/style_standard.rb +8 -0
  302. data/mods/standard/sets/self/version.rb +8 -0
  303. data/mods/standard/sets/type/account_request.rb +81 -0
  304. data/mods/standard/sets/type/basic.rb +43 -0
  305. data/mods/standard/sets/type/cardtype.rb +32 -0
  306. data/mods/standard/sets/type/css.rb +17 -0
  307. data/mods/standard/sets/type/date.rb +9 -0
  308. data/mods/standard/sets/type/file.rb +87 -0
  309. data/mods/standard/sets/type/html.rb +17 -0
  310. data/mods/standard/sets/type/image.rb +67 -0
  311. data/mods/standard/sets/type/layout_type.rb +11 -0
  312. data/mods/standard/sets/type/number.rb +20 -0
  313. data/mods/standard/sets/type/phrase.rb +3 -0
  314. data/mods/standard/sets/type/plain_text.rb +10 -0
  315. data/mods/standard/sets/type/pointer.rb +219 -0
  316. data/mods/standard/sets/type/ruby_and_script.rb +31 -0
  317. data/mods/standard/sets/type/scss.rb +34 -0
  318. data/mods/standard/sets/type/search_type.rb +268 -0
  319. data/mods/standard/sets/type/set.rb +109 -0
  320. data/mods/standard/sets/type/setting.rb +88 -0
  321. data/mods/standard/sets/type/skin.rb +27 -0
  322. data/mods/standard/sets/type/toggle.rb +12 -0
  323. data/mods/standard/sets/type/user.rb +24 -0
  324. data/public/404.html +27 -0
  325. data/public/500.html +28 -0
  326. data/public/assets/application-7f1664ac8e65db8af0bfa6539e23c7df.js +103 -0
  327. data/public/assets/application-7f1664ac8e65db8af0bfa6539e23c7df.js.gz +0 -0
  328. data/public/assets/application.js +103 -0
  329. data/public/assets/application.js.gz +0 -0
  330. data/public/assets/body-bg-660b752b44b87594071f3d0851ac5360.png +0 -0
  331. data/public/assets/body-bg-d031f29b6ba7399a6862382c3552f44c.bmp +0 -0
  332. data/public/assets/body-bg.bmp +0 -0
  333. data/public/assets/body-bg.png +0 -0
  334. data/public/assets/external_link-b15ab5051b4ec6f32892ed80019405b5.png +0 -0
  335. data/public/assets/external_link.png +0 -0
  336. data/public/assets/html5shiv-printshiv-ad36fc7219f4aeaa275f9a7fe2383413.js +1 -0
  337. data/public/assets/html5shiv-printshiv-ad36fc7219f4aeaa275f9a7fe2383413.js.gz +0 -0
  338. data/public/assets/html5shiv-printshiv.js +1 -0
  339. data/public/assets/html5shiv-printshiv.js.gz +0 -0
  340. data/public/assets/images/ui-bg_flat_0_aaaaaa_40x100-7d1197a52442bc56fcad60d0390f4b32.png +0 -0
  341. data/public/assets/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  342. data/public/assets/images/ui-bg_flat_75_ffffff_40x100-3c4b974defa5e8bdaf8a603034c4435e.png +0 -0
  343. data/public/assets/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  344. data/public/assets/images/ui-bg_glass_55_fbf9ee_1x400-38c2dea4d046fd3f56cc3996e2e6018b.png +0 -0
  345. data/public/assets/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  346. data/public/assets/images/ui-bg_glass_65_ffffff_1x400-ddb7ee7527bff283054406c50e597e1e.png +0 -0
  347. data/public/assets/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  348. data/public/assets/images/ui-bg_glass_75_dadada_1x400-d618461418b1ebc6b7996979f4c3dc92.png +0 -0
  349. data/public/assets/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  350. data/public/assets/images/ui-bg_glass_75_e6e6e6_1x400-48d8d545f708e5870a965ce9df8b0e38.png +0 -0
  351. data/public/assets/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  352. data/public/assets/images/ui-bg_glass_95_fef1ec_1x400-f3526b8f82249928f0a6baf044204b15.png +0 -0
  353. data/public/assets/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  354. data/public/assets/images/ui-bg_highlight-soft_75_cccccc_1x100-cec5c56503b8480f834c3fce35dae8df.png +0 -0
  355. data/public/assets/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  356. data/public/assets/images/ui-icons_222222_256x240-66e635a2f90b9f90675d402617630b24.png +0 -0
  357. data/public/assets/images/ui-icons_222222_256x240.png +0 -0
  358. data/public/assets/images/ui-icons_2e83ff_256x240-2ea4c160a75c1992daa2eeac86255b99.png +0 -0
  359. data/public/assets/images/ui-icons_2e83ff_256x240.png +0 -0
  360. data/public/assets/images/ui-icons_454545_256x240-5c7f12676bcead9cb2d4cb8f23f16e95.png +0 -0
  361. data/public/assets/images/ui-icons_454545_256x240.png +0 -0
  362. data/public/assets/images/ui-icons_888888_256x240-95fd3047e1f7325d995a21c729b04125.png +0 -0
  363. data/public/assets/images/ui-icons_888888_256x240.png +0 -0
  364. data/public/assets/images/ui-icons_cd0a0a_256x240-c0c1ec6a8bcf48fec40303e975a4dfa6.png +0 -0
  365. data/public/assets/images/ui-icons_cd0a0a_256x240.png +0 -0
  366. data/public/assets/jquerymobile/ajax-loader-a8a4bc1c4b502e156ed451507987eed7.png +0 -0
  367. data/public/assets/jquerymobile/ajax-loader-cad1a448fe000d9643c57860e5493861.gif +0 -0
  368. data/public/assets/jquerymobile/ajax-loader.gif +0 -0
  369. data/public/assets/jquerymobile/ajax-loader.png +0 -0
  370. data/public/assets/jquerymobile/icons-18-black-b6e62647e8518462e73fd052bfe25d6c.png +0 -0
  371. data/public/assets/jquerymobile/icons-18-black.png +0 -0
  372. data/public/assets/jquerymobile/icons-18-white-f4ae730f6acc1e5b1781652e5d6973c7.png +0 -0
  373. data/public/assets/jquerymobile/icons-18-white.png +0 -0
  374. data/public/assets/jquerymobile/icons-36-black-13a52024f9a92e59a69dca49014d9292.png +0 -0
  375. data/public/assets/jquerymobile/icons-36-black.png +0 -0
  376. data/public/assets/jquerymobile/icons-36-white-3b109c0900c418fd2e5468dfb35b3f59.png +0 -0
  377. data/public/assets/jquerymobile/icons-36-white.png +0 -0
  378. data/public/assets/manifest.yml +395 -0
  379. data/public/assets/tinymce-22b5a139d9ff7df7643afae9ce205508.js +13 -0
  380. data/public/assets/tinymce-22b5a139d9ff7df7643afae9ce205508.js.gz +0 -0
  381. data/public/assets/tinymce.js +13 -0
  382. data/public/assets/tinymce.js.gz +0 -0
  383. data/public/assets/tinymce/jquery.tinymce.js +1 -0
  384. data/public/assets/tinymce/langs/en.js +1 -0
  385. data/public/assets/tinymce/license.txt +504 -0
  386. data/public/assets/tinymce/plugins/advhr/css/advhr.css +5 -0
  387. data/public/assets/tinymce/plugins/advhr/editor_plugin.js +1 -0
  388. data/public/assets/tinymce/plugins/advhr/editor_plugin_src.js +57 -0
  389. data/public/assets/tinymce/plugins/advhr/js/rule.js +43 -0
  390. data/public/assets/tinymce/plugins/advhr/langs/en_dlg.js +1 -0
  391. data/public/assets/tinymce/plugins/advhr/rule.htm +58 -0
  392. data/public/assets/tinymce/plugins/advimage/css/advimage.css +13 -0
  393. data/public/assets/tinymce/plugins/advimage/editor_plugin.js +1 -0
  394. data/public/assets/tinymce/plugins/advimage/editor_plugin_src.js +50 -0
  395. data/public/assets/tinymce/plugins/advimage/image.htm +235 -0
  396. data/public/assets/tinymce/plugins/advimage/img/sample.gif +0 -0
  397. data/public/assets/tinymce/plugins/advimage/js/image.js +464 -0
  398. data/public/assets/tinymce/plugins/advimage/langs/en_dlg.js +1 -0
  399. data/public/assets/tinymce/plugins/advlink/css/advlink.css +8 -0
  400. data/public/assets/tinymce/plugins/advlink/editor_plugin.js +1 -0
  401. data/public/assets/tinymce/plugins/advlink/editor_plugin_src.js +61 -0
  402. data/public/assets/tinymce/plugins/advlink/js/advlink.js +543 -0
  403. data/public/assets/tinymce/plugins/advlink/langs/en_dlg.js +1 -0
  404. data/public/assets/tinymce/plugins/advlink/link.htm +338 -0
  405. data/public/assets/tinymce/plugins/advlist/editor_plugin.js +1 -0
  406. data/public/assets/tinymce/plugins/advlist/editor_plugin_src.js +176 -0
  407. data/public/assets/tinymce/plugins/autolink/editor_plugin.js +1 -0
  408. data/public/assets/tinymce/plugins/autolink/editor_plugin_src.js +184 -0
  409. data/public/assets/tinymce/plugins/autoresize/editor_plugin.js +1 -0
  410. data/public/assets/tinymce/plugins/autoresize/editor_plugin_src.js +119 -0
  411. data/public/assets/tinymce/plugins/autosave/editor_plugin.js +1 -0
  412. data/public/assets/tinymce/plugins/autosave/editor_plugin_src.js +433 -0
  413. data/public/assets/tinymce/plugins/bbcode/editor_plugin.js +1 -0
  414. data/public/assets/tinymce/plugins/bbcode/editor_plugin_src.js +120 -0
  415. data/public/assets/tinymce/plugins/contextmenu/editor_plugin.js +1 -0
  416. data/public/assets/tinymce/plugins/contextmenu/editor_plugin_src.js +163 -0
  417. data/public/assets/tinymce/plugins/directionality/editor_plugin.js +1 -0
  418. data/public/assets/tinymce/plugins/directionality/editor_plugin_src.js +85 -0
  419. data/public/assets/tinymce/plugins/emotions/editor_plugin.js +1 -0
  420. data/public/assets/tinymce/plugins/emotions/editor_plugin_src.js +43 -0
  421. data/public/assets/tinymce/plugins/emotions/emotions.htm +42 -0
  422. data/public/assets/tinymce/plugins/emotions/img/smiley-cool.gif +0 -0
  423. data/public/assets/tinymce/plugins/emotions/img/smiley-cry.gif +0 -0
  424. data/public/assets/tinymce/plugins/emotions/img/smiley-embarassed.gif +0 -0
  425. data/public/assets/tinymce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
  426. data/public/assets/tinymce/plugins/emotions/img/smiley-frown.gif +0 -0
  427. data/public/assets/tinymce/plugins/emotions/img/smiley-innocent.gif +0 -0
  428. data/public/assets/tinymce/plugins/emotions/img/smiley-kiss.gif +0 -0
  429. data/public/assets/tinymce/plugins/emotions/img/smiley-laughing.gif +0 -0
  430. data/public/assets/tinymce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
  431. data/public/assets/tinymce/plugins/emotions/img/smiley-sealed.gif +0 -0
  432. data/public/assets/tinymce/plugins/emotions/img/smiley-smile.gif +0 -0
  433. data/public/assets/tinymce/plugins/emotions/img/smiley-surprised.gif +0 -0
  434. data/public/assets/tinymce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
  435. data/public/assets/tinymce/plugins/emotions/img/smiley-undecided.gif +0 -0
  436. data/public/assets/tinymce/plugins/emotions/img/smiley-wink.gif +0 -0
  437. data/public/assets/tinymce/plugins/emotions/img/smiley-yell.gif +0 -0
  438. data/public/assets/tinymce/plugins/emotions/js/emotions.js +43 -0
  439. data/public/assets/tinymce/plugins/emotions/langs/en_dlg.js +1 -0
  440. data/public/assets/tinymce/plugins/example/dialog.htm +22 -0
  441. data/public/assets/tinymce/plugins/example/editor_plugin.js +1 -0
  442. data/public/assets/tinymce/plugins/example/editor_plugin_src.js +84 -0
  443. data/public/assets/tinymce/plugins/example/img/example.gif +0 -0
  444. data/public/assets/tinymce/plugins/example/js/dialog.js +19 -0
  445. data/public/assets/tinymce/plugins/example/langs/en.js +3 -0
  446. data/public/assets/tinymce/plugins/example/langs/en_dlg.js +3 -0
  447. data/public/assets/tinymce/plugins/example_dependency/editor_plugin.js +1 -0
  448. data/public/assets/tinymce/plugins/example_dependency/editor_plugin_src.js +50 -0
  449. data/public/assets/tinymce/plugins/fullpage/css/fullpage.css +143 -0
  450. data/public/assets/tinymce/plugins/fullpage/editor_plugin.js +1 -0
  451. data/public/assets/tinymce/plugins/fullpage/editor_plugin_src.js +405 -0
  452. data/public/assets/tinymce/plugins/fullpage/fullpage.htm +259 -0
  453. data/public/assets/tinymce/plugins/fullpage/js/fullpage.js +232 -0
  454. data/public/assets/tinymce/plugins/fullpage/langs/en_dlg.js +1 -0
  455. data/public/assets/tinymce/plugins/fullscreen/editor_plugin.js +1 -0
  456. data/public/assets/tinymce/plugins/fullscreen/editor_plugin_src.js +234 -0
  457. data/public/assets/tinymce/plugins/fullscreen/fullscreen.htm +117 -0
  458. data/public/assets/tinymce/plugins/iespell/editor_plugin.js +1 -0
  459. data/public/assets/tinymce/plugins/iespell/editor_plugin_src.js +54 -0
  460. data/public/assets/tinymce/plugins/inlinepopups/editor_plugin.js +1 -0
  461. data/public/assets/tinymce/plugins/inlinepopups/editor_plugin_src.js +699 -0
  462. data/public/assets/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
  463. data/public/assets/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
  464. data/public/assets/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
  465. data/public/assets/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
  466. data/public/assets/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
  467. data/public/assets/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
  468. data/public/assets/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
  469. data/public/assets/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css +90 -0
  470. data/public/assets/tinymce/plugins/inlinepopups/template.htm +387 -0
  471. data/public/assets/tinymce/plugins/insertdatetime/editor_plugin.js +1 -0
  472. data/public/assets/tinymce/plugins/insertdatetime/editor_plugin_src.js +83 -0
  473. data/public/assets/tinymce/plugins/layer/editor_plugin.js +1 -0
  474. data/public/assets/tinymce/plugins/layer/editor_plugin_src.js +262 -0
  475. data/public/assets/tinymce/plugins/legacyoutput/editor_plugin.js +1 -0
  476. data/public/assets/tinymce/plugins/legacyoutput/editor_plugin_src.js +139 -0
  477. data/public/assets/tinymce/plugins/lists/editor_plugin.js +1 -0
  478. data/public/assets/tinymce/plugins/lists/editor_plugin_src.js +955 -0
  479. data/public/assets/tinymce/plugins/media/css/media.css +17 -0
  480. data/public/assets/tinymce/plugins/media/editor_plugin.js +1 -0
  481. data/public/assets/tinymce/plugins/media/editor_plugin_src.js +898 -0
  482. data/public/assets/tinymce/plugins/media/js/embed.js +73 -0
  483. data/public/assets/tinymce/plugins/media/js/media.js +513 -0
  484. data/public/assets/tinymce/plugins/media/langs/en_dlg.js +1 -0
  485. data/public/assets/tinymce/plugins/media/media.htm +922 -0
  486. data/public/assets/tinymce/plugins/media/moxieplayer.swf +0 -0
  487. data/public/assets/tinymce/plugins/nonbreaking/editor_plugin.js +1 -0
  488. data/public/assets/tinymce/plugins/nonbreaking/editor_plugin_src.js +54 -0
  489. data/public/assets/tinymce/plugins/noneditable/editor_plugin.js +1 -0
  490. data/public/assets/tinymce/plugins/noneditable/editor_plugin_src.js +537 -0
  491. data/public/assets/tinymce/plugins/pagebreak/editor_plugin.js +1 -0
  492. data/public/assets/tinymce/plugins/pagebreak/editor_plugin_src.js +74 -0
  493. data/public/assets/tinymce/plugins/paste/editor_plugin.js +1 -0
  494. data/public/assets/tinymce/plugins/paste/editor_plugin_src.js +885 -0
  495. data/public/assets/tinymce/plugins/paste/js/pastetext.js +36 -0
  496. data/public/assets/tinymce/plugins/paste/js/pasteword.js +51 -0
  497. data/public/assets/tinymce/plugins/paste/langs/en_dlg.js +1 -0
  498. data/public/assets/tinymce/plugins/paste/pastetext.htm +27 -0
  499. data/public/assets/tinymce/plugins/paste/pasteword.htm +21 -0
  500. data/public/assets/tinymce/plugins/preview/editor_plugin.js +1 -0
  501. data/public/assets/tinymce/plugins/preview/editor_plugin_src.js +53 -0
  502. data/public/assets/tinymce/plugins/preview/example.html +28 -0
  503. data/public/assets/tinymce/plugins/preview/jscripts/embed.js +73 -0
  504. data/public/assets/tinymce/plugins/preview/preview.html +17 -0
  505. data/public/assets/tinymce/plugins/print/editor_plugin.js +1 -0
  506. data/public/assets/tinymce/plugins/print/editor_plugin_src.js +34 -0
  507. data/public/assets/tinymce/plugins/save/editor_plugin.js +1 -0
  508. data/public/assets/tinymce/plugins/save/editor_plugin_src.js +101 -0
  509. data/public/assets/tinymce/plugins/searchreplace/css/searchreplace.css +6 -0
  510. data/public/assets/tinymce/plugins/searchreplace/editor_plugin.js +1 -0
  511. data/public/assets/tinymce/plugins/searchreplace/editor_plugin_src.js +61 -0
  512. data/public/assets/tinymce/plugins/searchreplace/js/searchreplace.js +148 -0
  513. data/public/assets/tinymce/plugins/searchreplace/langs/en_dlg.js +1 -0
  514. data/public/assets/tinymce/plugins/searchreplace/searchreplace.htm +100 -0
  515. data/public/assets/tinymce/plugins/spellchecker/css/content.css +1 -0
  516. data/public/assets/tinymce/plugins/spellchecker/editor_plugin.js +1 -0
  517. data/public/assets/tinymce/plugins/spellchecker/editor_plugin_src.js +471 -0
  518. data/public/assets/tinymce/plugins/spellchecker/img/wline.gif +0 -0
  519. data/public/assets/tinymce/plugins/style/css/props.css +14 -0
  520. data/public/assets/tinymce/plugins/style/editor_plugin.js +1 -0
  521. data/public/assets/tinymce/plugins/style/editor_plugin_src.js +71 -0
  522. data/public/assets/tinymce/plugins/style/js/props.js +709 -0
  523. data/public/assets/tinymce/plugins/style/langs/en_dlg.js +1 -0
  524. data/public/assets/tinymce/plugins/style/props.htm +845 -0
  525. data/public/assets/tinymce/plugins/style/readme.txt +19 -0
  526. data/public/assets/tinymce/plugins/tabfocus/editor_plugin.js +1 -0
  527. data/public/assets/tinymce/plugins/tabfocus/editor_plugin_src.js +122 -0
  528. data/public/assets/tinymce/plugins/table/cell.htm +180 -0
  529. data/public/assets/tinymce/plugins/table/css/cell.css +17 -0
  530. data/public/assets/tinymce/plugins/table/css/row.css +25 -0
  531. data/public/assets/tinymce/plugins/table/css/table.css +13 -0
  532. data/public/assets/tinymce/plugins/table/editor_plugin.js +1 -0
  533. data/public/assets/tinymce/plugins/table/editor_plugin_src.js +1456 -0
  534. data/public/assets/tinymce/plugins/table/js/cell.js +319 -0
  535. data/public/assets/tinymce/plugins/table/js/merge_cells.js +27 -0
  536. data/public/assets/tinymce/plugins/table/js/row.js +254 -0
  537. data/public/assets/tinymce/plugins/table/js/table.js +501 -0
  538. data/public/assets/tinymce/plugins/table/langs/en_dlg.js +1 -0
  539. data/public/assets/tinymce/plugins/table/merge_cells.htm +32 -0
  540. data/public/assets/tinymce/plugins/table/row.htm +158 -0
  541. data/public/assets/tinymce/plugins/table/table.htm +188 -0
  542. data/public/assets/tinymce/plugins/template/blank.htm +12 -0
  543. data/public/assets/tinymce/plugins/template/css/template.css +23 -0
  544. data/public/assets/tinymce/plugins/template/editor_plugin.js +1 -0
  545. data/public/assets/tinymce/plugins/template/editor_plugin_src.js +159 -0
  546. data/public/assets/tinymce/plugins/template/js/template.js +106 -0
  547. data/public/assets/tinymce/plugins/template/langs/en_dlg.js +1 -0
  548. data/public/assets/tinymce/plugins/template/template.htm +31 -0
  549. data/public/assets/tinymce/plugins/visualblocks/css/visualblocks.css +21 -0
  550. data/public/assets/tinymce/plugins/visualblocks/editor_plugin.js +1 -0
  551. data/public/assets/tinymce/plugins/visualblocks/editor_plugin_src.js +63 -0
  552. data/public/assets/tinymce/plugins/visualchars/editor_plugin.js +1 -0
  553. data/public/assets/tinymce/plugins/visualchars/editor_plugin_src.js +83 -0
  554. data/public/assets/tinymce/plugins/wordcount/editor_plugin.js +1 -0
  555. data/public/assets/tinymce/plugins/wordcount/editor_plugin_src.js +122 -0
  556. data/public/assets/tinymce/plugins/xhtmlxtras/abbr.htm +142 -0
  557. data/public/assets/tinymce/plugins/xhtmlxtras/acronym.htm +142 -0
  558. data/public/assets/tinymce/plugins/xhtmlxtras/attributes.htm +149 -0
  559. data/public/assets/tinymce/plugins/xhtmlxtras/cite.htm +142 -0
  560. data/public/assets/tinymce/plugins/xhtmlxtras/css/attributes.css +11 -0
  561. data/public/assets/tinymce/plugins/xhtmlxtras/css/popup.css +9 -0
  562. data/public/assets/tinymce/plugins/xhtmlxtras/del.htm +162 -0
  563. data/public/assets/tinymce/plugins/xhtmlxtras/editor_plugin.js +1 -0
  564. data/public/assets/tinymce/plugins/xhtmlxtras/editor_plugin_src.js +132 -0
  565. data/public/assets/tinymce/plugins/xhtmlxtras/ins.htm +162 -0
  566. data/public/assets/tinymce/plugins/xhtmlxtras/js/abbr.js +28 -0
  567. data/public/assets/tinymce/plugins/xhtmlxtras/js/acronym.js +28 -0
  568. data/public/assets/tinymce/plugins/xhtmlxtras/js/attributes.js +111 -0
  569. data/public/assets/tinymce/plugins/xhtmlxtras/js/cite.js +28 -0
  570. data/public/assets/tinymce/plugins/xhtmlxtras/js/del.js +53 -0
  571. data/public/assets/tinymce/plugins/xhtmlxtras/js/element_common.js +229 -0
  572. data/public/assets/tinymce/plugins/xhtmlxtras/js/ins.js +53 -0
  573. data/public/assets/tinymce/plugins/xhtmlxtras/langs/en_dlg.js +1 -0
  574. data/public/assets/tinymce/themes/advanced/about.htm +52 -0
  575. data/public/assets/tinymce/themes/advanced/anchor.htm +26 -0
  576. data/public/assets/tinymce/themes/advanced/charmap.htm +55 -0
  577. data/public/assets/tinymce/themes/advanced/color_picker.htm +70 -0
  578. data/public/assets/tinymce/themes/advanced/editor_template.js +1 -0
  579. data/public/assets/tinymce/themes/advanced/editor_template_src.js +1490 -0
  580. data/public/assets/tinymce/themes/advanced/image.htm +80 -0
  581. data/public/assets/tinymce/themes/advanced/img/colorpicker.jpg +0 -0
  582. data/public/assets/tinymce/themes/advanced/img/flash.gif +0 -0
  583. data/public/assets/tinymce/themes/advanced/img/icons.gif +0 -0
  584. data/public/assets/tinymce/themes/advanced/img/iframe.gif +0 -0
  585. data/public/assets/tinymce/themes/advanced/img/pagebreak.gif +0 -0
  586. data/public/assets/tinymce/themes/advanced/img/quicktime.gif +0 -0
  587. data/public/assets/tinymce/themes/advanced/img/realmedia.gif +0 -0
  588. data/public/assets/tinymce/themes/advanced/img/shockwave.gif +0 -0
  589. data/public/assets/tinymce/themes/advanced/img/trans.gif +0 -0
  590. data/public/assets/tinymce/themes/advanced/img/video.gif +0 -0
  591. data/public/assets/tinymce/themes/advanced/img/windowsmedia.gif +0 -0
  592. data/public/assets/tinymce/themes/advanced/js/about.js +73 -0
  593. data/public/assets/tinymce/themes/advanced/js/anchor.js +56 -0
  594. data/public/assets/tinymce/themes/advanced/js/charmap.js +363 -0
  595. data/public/assets/tinymce/themes/advanced/js/color_picker.js +345 -0
  596. data/public/assets/tinymce/themes/advanced/js/image.js +253 -0
  597. data/public/assets/tinymce/themes/advanced/js/link.js +159 -0
  598. data/public/assets/tinymce/themes/advanced/js/source_editor.js +78 -0
  599. data/public/assets/tinymce/themes/advanced/langs/en.js +1 -0
  600. data/public/assets/tinymce/themes/advanced/langs/en_dlg.js +1 -0
  601. data/public/assets/tinymce/themes/advanced/link.htm +57 -0
  602. data/public/assets/tinymce/themes/advanced/shortcuts.htm +47 -0
  603. data/public/assets/tinymce/themes/advanced/skins/default/content.css +50 -0
  604. data/public/assets/tinymce/themes/advanced/skins/default/dialog.css +118 -0
  605. data/public/assets/tinymce/themes/advanced/skins/default/img/buttons.png +0 -0
  606. data/public/assets/tinymce/themes/advanced/skins/default/img/items.gif +0 -0
  607. data/public/assets/tinymce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
  608. data/public/assets/tinymce/themes/advanced/skins/default/img/menu_check.gif +0 -0
  609. data/public/assets/tinymce/themes/advanced/skins/default/img/progress.gif +0 -0
  610. data/public/assets/tinymce/themes/advanced/skins/default/img/tabs.gif +0 -0
  611. data/public/assets/tinymce/themes/advanced/skins/default/ui.css +219 -0
  612. data/public/assets/tinymce/themes/advanced/skins/highcontrast/content.css +24 -0
  613. data/public/assets/tinymce/themes/advanced/skins/highcontrast/dialog.css +106 -0
  614. data/public/assets/tinymce/themes/advanced/skins/highcontrast/ui.css +106 -0
  615. data/public/assets/tinymce/themes/advanced/skins/o2k7/content.css +48 -0
  616. data/public/assets/tinymce/themes/advanced/skins/o2k7/dialog.css +118 -0
  617. data/public/assets/tinymce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
  618. data/public/assets/tinymce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
  619. data/public/assets/tinymce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
  620. data/public/assets/tinymce/themes/advanced/skins/o2k7/ui.css +222 -0
  621. data/public/assets/tinymce/themes/advanced/skins/o2k7/ui_black.css +8 -0
  622. data/public/assets/tinymce/themes/advanced/skins/o2k7/ui_silver.css +5 -0
  623. data/public/assets/tinymce/themes/advanced/source_editor.htm +25 -0
  624. data/public/assets/tinymce/themes/simple/editor_template.js +1 -0
  625. data/public/assets/tinymce/themes/simple/editor_template_src.js +84 -0
  626. data/public/assets/tinymce/themes/simple/img/icons.gif +0 -0
  627. data/public/assets/tinymce/themes/simple/langs/en.js +1 -0
  628. data/public/assets/tinymce/themes/simple/skins/default/content.css +25 -0
  629. data/public/assets/tinymce/themes/simple/skins/default/ui.css +32 -0
  630. data/public/assets/tinymce/themes/simple/skins/o2k7/content.css +17 -0
  631. data/public/assets/tinymce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
  632. data/public/assets/tinymce/themes/simple/skins/o2k7/ui.css +35 -0
  633. data/public/assets/tinymce/tiny_mce.js +1 -0
  634. data/public/assets/tinymce/tiny_mce_jquery.js +1 -0
  635. data/public/assets/tinymce/tiny_mce_jquery_src.js +17913 -0
  636. data/public/assets/tinymce/tiny_mce_popup.js +5 -0
  637. data/public/assets/tinymce/tiny_mce_src.js +19127 -0
  638. data/public/assets/tinymce/utils/editable_selects.js +70 -0
  639. data/public/assets/tinymce/utils/form_utils.js +210 -0
  640. data/public/assets/tinymce/utils/mctabs.js +162 -0
  641. data/public/assets/tinymce/utils/validate.js +252 -0
  642. data/public/assets2bpacked/jstree/README.txt +10 -0
  643. data/public/assets2bpacked/jstree/_demo/_dump.sql +20 -0
  644. data/public/assets2bpacked/jstree/_demo/_inc/__mysql_errors.log +0 -0
  645. data/public/assets2bpacked/jstree/_demo/_inc/class._database.php +146 -0
  646. data/public/assets2bpacked/jstree/_demo/_inc/class._database_i.php +152 -0
  647. data/public/assets2bpacked/jstree/_demo/_inc/class.tree.php +602 -0
  648. data/public/assets2bpacked/jstree/_demo/_install.txt +6 -0
  649. data/public/assets2bpacked/jstree/_demo/config.php +14 -0
  650. data/public/assets2bpacked/jstree/_demo/file.png +0 -0
  651. data/public/assets2bpacked/jstree/_demo/folder.png +0 -0
  652. data/public/assets2bpacked/jstree/_demo/index.html +461 -0
  653. data/public/assets2bpacked/jstree/_demo/root.png +0 -0
  654. data/public/assets2bpacked/jstree/_demo/server.php +69 -0
  655. data/public/assets2bpacked/jstree/_docs/!style.css +48 -0
  656. data/public/assets2bpacked/jstree/_docs/_drive.png +0 -0
  657. data/public/assets2bpacked/jstree/_docs/_html_data.html +2 -0
  658. data/public/assets2bpacked/jstree/_docs/_json_data.json +4 -0
  659. data/public/assets2bpacked/jstree/_docs/_search_data.json +6 -0
  660. data/public/assets2bpacked/jstree/_docs/_search_result.json +1 -0
  661. data/public/assets2bpacked/jstree/_docs/_xml_flat.xml +12 -0
  662. data/public/assets2bpacked/jstree/_docs/_xml_nest.xml +18 -0
  663. data/public/assets2bpacked/jstree/_docs/checkbox.html +171 -0
  664. data/public/assets2bpacked/jstree/_docs/contextmenu.html +121 -0
  665. data/public/assets2bpacked/jstree/_docs/cookies.html +97 -0
  666. data/public/assets2bpacked/jstree/_docs/core.html +689 -0
  667. data/public/assets2bpacked/jstree/_docs/crrm.html +316 -0
  668. data/public/assets2bpacked/jstree/_docs/dnd.html +199 -0
  669. data/public/assets2bpacked/jstree/_docs/hotkeys.html +82 -0
  670. data/public/assets2bpacked/jstree/_docs/html_data.html +175 -0
  671. data/public/assets2bpacked/jstree/_docs/index.html +86 -0
  672. data/public/assets2bpacked/jstree/_docs/json_data.html +249 -0
  673. data/public/assets2bpacked/jstree/_docs/languages.html +152 -0
  674. data/public/assets2bpacked/jstree/_docs/logo.png +0 -0
  675. data/public/assets2bpacked/jstree/_docs/search.html +153 -0
  676. data/public/assets2bpacked/jstree/_docs/sort.html +85 -0
  677. data/public/assets2bpacked/jstree/_docs/syntax/!script.js +2232 -0
  678. data/public/assets2bpacked/jstree/_docs/syntax/!style.css +511 -0
  679. data/public/assets2bpacked/jstree/_docs/syntax/clipboard.swf +0 -0
  680. data/public/assets2bpacked/jstree/_docs/syntax/help.png +0 -0
  681. data/public/assets2bpacked/jstree/_docs/syntax/magnifier.png +0 -0
  682. data/public/assets2bpacked/jstree/_docs/syntax/page_white_code.png +0 -0
  683. data/public/assets2bpacked/jstree/_docs/syntax/page_white_copy.png +0 -0
  684. data/public/assets2bpacked/jstree/_docs/syntax/printer.png +0 -0
  685. data/public/assets2bpacked/jstree/_docs/syntax/wrapping.png +0 -0
  686. data/public/assets2bpacked/jstree/_docs/themeroller.html +107 -0
  687. data/public/assets2bpacked/jstree/_docs/themes.html +127 -0
  688. data/public/assets2bpacked/jstree/_docs/types.html +178 -0
  689. data/public/assets2bpacked/jstree/_docs/ui.html +197 -0
  690. data/public/assets2bpacked/jstree/_docs/unique.html +85 -0
  691. data/public/assets2bpacked/jstree/_docs/xml_data.html +218 -0
  692. data/public/assets2bpacked/jstree/_lib/jquery.cookie.js +96 -0
  693. data/public/assets2bpacked/jstree/_lib/jquery.hotkeys.js +99 -0
  694. data/public/assets2bpacked/jstree/_lib/jquery.js +5 -0
  695. data/public/assets2bpacked/jstree/jquery.jstree.js +4564 -0
  696. data/public/assets2bpacked/jstree/themes/apple/bg.jpg +0 -0
  697. data/public/assets2bpacked/jstree/themes/apple/d.png +0 -0
  698. data/public/assets2bpacked/jstree/themes/apple/dot_for_ie.gif +0 -0
  699. data/public/assets2bpacked/jstree/themes/apple/style.css +61 -0
  700. data/public/assets2bpacked/jstree/themes/apple/throbber.gif +0 -0
  701. data/public/assets2bpacked/jstree/themes/classic/d.gif +0 -0
  702. data/public/assets2bpacked/jstree/themes/classic/d.png +0 -0
  703. data/public/assets2bpacked/jstree/themes/classic/dot_for_ie.gif +0 -0
  704. data/public/assets2bpacked/jstree/themes/classic/style.css +77 -0
  705. data/public/assets2bpacked/jstree/themes/classic/throbber.gif +0 -0
  706. data/public/assets2bpacked/jstree/themes/default-rtl/d.gif +0 -0
  707. data/public/assets2bpacked/jstree/themes/default-rtl/d.png +0 -0
  708. data/public/assets2bpacked/jstree/themes/default-rtl/dots.gif +0 -0
  709. data/public/assets2bpacked/jstree/themes/default-rtl/style.css +84 -0
  710. data/public/assets2bpacked/jstree/themes/default-rtl/throbber.gif +0 -0
  711. data/public/assets2bpacked/jstree/themes/default/d.gif +0 -0
  712. data/public/assets2bpacked/jstree/themes/default/d.png +0 -0
  713. data/public/assets2bpacked/jstree/themes/default/style.css +74 -0
  714. data/public/assets2bpacked/jstree/themes/default/throbber.gif +0 -0
  715. data/public/favicon.ico +0 -0
  716. data/public/jasmine/card_form.html +13 -0
  717. data/public/robots.txt +12 -0
  718. data/script/autospec +4 -0
  719. data/script/rails +6 -0
  720. data/script/test_filter +25 -0
  721. data/script/wagn.rb +6 -0
  722. data/spec/controllers/account_controller_spec.rb +43 -0
  723. data/spec/controllers/admin_controller_spec.rb +23 -0
  724. data/spec/controllers/captcha_spec.rb +103 -0
  725. data/spec/controllers/card_controller_spec.rb +353 -0
  726. data/spec/controllers/location_spec.rb +49 -0
  727. data/spec/controllers/sets_spec.rb +97 -0
  728. data/spec/controllers/wagn_controller_spec.rb +5 -0
  729. data/spec/javascripts/helpers/.gitkeep +0 -0
  730. data/spec/javascripts/helpers/jasmine-config.js +2 -0
  731. data/spec/javascripts/helpers/jasmine-jquery-1.3.1.js +295 -0
  732. data/spec/javascripts/support/jasmine.yml +77 -0
  733. data/spec/javascripts/support/jasmine_config.rb +24 -0
  734. data/spec/javascripts/support/jasmine_runner.rb +21 -0
  735. data/spec/javascripts/wagn_spec.coffee +40 -0
  736. data/spec/lib/card/chunk_spec.rb +18 -0
  737. data/spec/lib/card/codename_spec.rb +30 -0
  738. data/spec/lib/card/content_spec.rb +293 -0
  739. data/spec/lib/card/diff_spec.rb +111 -0
  740. data/spec/lib/card/flexmail_spec.rb +209 -0
  741. data/spec/lib/card/format_spec.rb +173 -0
  742. data/spec/lib/card/name_spec.rb +275 -0
  743. data/spec/lib/card/query_spec.rb +456 -0
  744. data/spec/lib/card/set_pattern_spec.rb +40 -0
  745. data/spec/lib/card/set_spec.rb +84 -0
  746. data/spec/lib/wagn/cache_spec.rb +120 -0
  747. data/spec/lib/wagn/loader_spec.rb +33 -0
  748. data/spec/mailers/account_spec.rb +66 -0
  749. data/spec/mailers/mailer_spec.rb +57 -0
  750. data/spec/models/account_spec.rb +19 -0
  751. data/spec/models/card/cardtype_spec.rb +218 -0
  752. data/spec/models/card/comment_spec.rb +38 -0
  753. data/spec/models/card/create_spec.rb +83 -0
  754. data/spec/models/card/reference_spec.rb +214 -0
  755. data/spec/models/card/revision_spec.rb +58 -0
  756. data/spec/models/card/trash_spec.rb +258 -0
  757. data/spec/models/card/type_transition_spec.rb +162 -0
  758. data/spec/models/card/validation_spec.rb +37 -0
  759. data/spec/models/card_spec.rb +177 -0
  760. data/spec/models/user_spec.rb +95 -0
  761. data/spec/mods/core/chunks/literal_spec.rb +15 -0
  762. data/spec/mods/core/chunks/uri_spec.rb +293 -0
  763. data/spec/mods/core/formats/data_format_spec.rb +6 -0
  764. data/spec/mods/core/formats/html_format_spec.rb +165 -0
  765. data/spec/mods/core/formats/text_format_spec.rb +6 -0
  766. data/spec/mods/core/sets/all/active_card_spec.rb +6 -0
  767. data/spec/mods/core/sets/all/attribute_tracking_spec.rb +22 -0
  768. data/spec/mods/core/sets/all/collection_spec.rb +49 -0
  769. data/spec/mods/core/sets/all/content_spec.rb +15 -0
  770. data/spec/mods/core/sets/all/fetch_spec.rb +206 -0
  771. data/spec/mods/core/sets/all/initialize_spec.rb +59 -0
  772. data/spec/mods/core/sets/all/name_spec.rb +30 -0
  773. data/spec/mods/core/sets/all/pattern_spec.rb +93 -0
  774. data/spec/mods/core/sets/all/permissions_spec.rb +481 -0
  775. data/spec/mods/core/sets/all/phases_spec.rb +6 -0
  776. data/spec/mods/core/sets/all/references_spec.rb +9 -0
  777. data/spec/mods/core/sets/all/rules2_spec.rb +250 -0
  778. data/spec/mods/core/sets/all/rules_spec.rb +99 -0
  779. data/spec/mods/core/sets/all/states_spec.rb +6 -0
  780. data/spec/mods/core/sets/all/templating_spec.rb +105 -0
  781. data/spec/mods/core/sets/all/tracked_attributes_spec.rb +316 -0
  782. data/spec/mods/core/sets/all/type_spec.rb +49 -0
  783. data/spec/mods/core/sets/all/utils_spec.rb +6 -0
  784. data/spec/mods/standard/chunks/include_spec.rb +182 -0
  785. data/spec/mods/standard/chunks/link_spec.rb +60 -0
  786. data/spec/mods/standard/formats/css_format_spec.rb +6 -0
  787. data/spec/mods/standard/formats/csv_format_spec.rb +6 -0
  788. data/spec/mods/standard/formats/email_html_format_spec.rb +6 -0
  789. data/spec/mods/standard/formats/file_format_spec.rb +6 -0
  790. data/spec/mods/standard/formats/json_format_spec.rb +6 -0
  791. data/spec/mods/standard/formats/kml_format_spec.rb +6 -0
  792. data/spec/mods/standard/formats/rss_format_spec.rb +6 -0
  793. data/spec/mods/standard/formats/xml_format_spec.rb +6 -0
  794. data/spec/mods/standard/sets/all/account_spec.rb +117 -0
  795. data/spec/mods/standard/sets/all/admin_spec.rb +6 -0
  796. data/spec/mods/standard/sets/all/all_css_spec.rb +11 -0
  797. data/spec/mods/standard/sets/all/all_csv_spec.rb +10 -0
  798. data/spec/mods/standard/sets/all/attach_spec.rb +10 -0
  799. data/spec/mods/standard/sets/all/base_spec.rb +52 -0
  800. data/spec/mods/standard/sets/all/email_html_spec.rb +14 -0
  801. data/spec/mods/standard/sets/all/file_spec.rb +6 -0
  802. data/spec/mods/standard/sets/all/flexmail_spec.rb +6 -0
  803. data/spec/mods/standard/sets/all/follow_spec.rb +96 -0
  804. data/spec/mods/standard/sets/all/geocode_spec.rb +37 -0
  805. data/spec/mods/standard/sets/all/json_spec.rb +27 -0
  806. data/spec/mods/standard/sets/all/kml_spec.rb +6 -0
  807. data/spec/mods/standard/sets/all/rich_html_spec.rb +10 -0
  808. data/spec/mods/standard/sets/all/rss_spec.rb +6 -0
  809. data/spec/mods/standard/sets/all/text_spec.rb +6 -0
  810. data/spec/mods/standard/sets/right/account_spec.rb +6 -0
  811. data/spec/mods/standard/sets/right/add_help_spec.rb +6 -0
  812. data/spec/mods/standard/sets/right/comment_spec.rb +6 -0
  813. data/spec/mods/standard/sets/right/create_spec.rb +6 -0
  814. data/spec/mods/standard/sets/right/crypted_password_spec.rb +6 -0
  815. data/spec/mods/standard/sets/right/default_spec.rb +6 -0
  816. data/spec/mods/standard/sets/right/delete_spec.rb +6 -0
  817. data/spec/mods/standard/sets/right/email_spec.rb +27 -0
  818. data/spec/mods/standard/sets/right/help_spec.rb +6 -0
  819. data/spec/mods/standard/sets/right/read_spec.rb +6 -0
  820. data/spec/mods/standard/sets/right/salt_spec.rb +6 -0
  821. data/spec/mods/standard/sets/right/structure_spec.rb +10 -0
  822. data/spec/mods/standard/sets/right/style_spec.rb +6 -0
  823. data/spec/mods/standard/sets/right/update_spec.rb +6 -0
  824. data/spec/mods/standard/sets/right/when_created_spec.rb +8 -0
  825. data/spec/mods/standard/sets/right/when_last_edited_spec.rb +8 -0
  826. data/spec/mods/standard/sets/rstar/rules_spec.rb +26 -0
  827. data/spec/mods/standard/sets/self/account_links_spec.rb +10 -0
  828. data/spec/mods/standard/sets/self/alerts_spec.rb +6 -0
  829. data/spec/mods/standard/sets/self/foot_spec.rb +6 -0
  830. data/spec/mods/standard/sets/self/head_spec.rb +18 -0
  831. data/spec/mods/standard/sets/self/navbox_spec.rb +8 -0
  832. data/spec/mods/standard/sets/self/now_spec.rb +8 -0
  833. data/spec/mods/standard/sets/self/recent_spec.rb +6 -0
  834. data/spec/mods/standard/sets/self/search_spec.rb +6 -0
  835. data/spec/mods/standard/sets/self/style_functional_spec.rb +6 -0
  836. data/spec/mods/standard/sets/self/style_jquery_ui_smoothness_spec.rb +6 -0
  837. data/spec/mods/standard/sets/self/style_standard_spec.rb +6 -0
  838. data/spec/mods/standard/sets/self/version_spec.rb +8 -0
  839. data/spec/mods/standard/sets/type/account_request_spec.rb +160 -0
  840. data/spec/mods/standard/sets/type/basic_spec.rb +6 -0
  841. data/spec/mods/standard/sets/type/cardtype_spec.rb +6 -0
  842. data/spec/mods/standard/sets/type/css_spec.rb +6 -0
  843. data/spec/mods/standard/sets/type/date_spec.rb +8 -0
  844. data/spec/mods/standard/sets/type/file_spec.rb +6 -0
  845. data/spec/mods/standard/sets/type/html_spec.rb +24 -0
  846. data/spec/mods/standard/sets/type/image_spec.rb +17 -0
  847. data/spec/mods/standard/sets/type/layout_type_spec.rb +8 -0
  848. data/spec/mods/standard/sets/type/number_spec.rb +8 -0
  849. data/spec/mods/standard/sets/type/phrase_spec.rb +8 -0
  850. data/spec/mods/standard/sets/type/plain_text_spec.rb +12 -0
  851. data/spec/mods/standard/sets/type/pointer_spec.rb +74 -0
  852. data/spec/mods/standard/sets/type/ruby_and_script_spec.rb +6 -0
  853. data/spec/mods/standard/sets/type/scss_spec.rb +6 -0
  854. data/spec/mods/standard/sets/type/search_type_spec.rb +16 -0
  855. data/spec/mods/standard/sets/type/set_spec.rb +27 -0
  856. data/spec/mods/standard/sets/type/setting_spec.rb +6 -0
  857. data/spec/mods/standard/sets/type/skin_spec.rb +6 -0
  858. data/spec/mods/standard/sets/type/toggle_spec.rb +13 -0
  859. data/spec/mods/standard/sets/type/user_spec.rb +6 -0
  860. data/spec/spec.opts +6 -0
  861. data/test/fixtures/.gitkeep +0 -0
  862. data/test/fixtures/card_references.yml +1954 -0
  863. data/test/fixtures/card_revisions.yml +4499 -0
  864. data/test/fixtures/cards.yml +9419 -0
  865. data/test/fixtures/mao2.jpg +0 -0
  866. data/test/fixtures/rails.gif +0 -0
  867. data/test/fixtures/users.yml +169 -0
  868. data/test/performance/card_create_test.rb +22 -0
  869. data/test/performance/fetch_test.rb +9 -0
  870. data/test/performance/homepage_test.rb +9 -0
  871. data/test/performance/render_test.rb +10 -0
  872. data/test/seed.rb +192 -0
  873. data/test/test_helper.rb +123 -0
  874. data/wagn.gemspec +46 -0
  875. metadata +1307 -0
@@ -0,0 +1 @@
1
+ tinyMCE.addI18n('en.fullpage_dlg',{title:"Document Properties","meta_tab":"General","appearance_tab":"Appearance","advanced_tab":"Advanced","meta_props":"Meta Information",langprops:"Language and Encoding","meta_title":"Title","meta_keywords":"Keywords","meta_description":"Description","meta_robots":"Robots",doctypes:"Doctype",langcode:"Language Code",langdir:"Language Direction",ltr:"Left to Right",rtl:"Right to Left","xml_pi":"XML Declaration",encoding:"Character Encoding","appearance_bgprops":"Background Properties","appearance_marginprops":"Body Margins","appearance_linkprops":"Link Colors","appearance_textprops":"Text Properties",bgcolor:"Background Color",bgimage:"Background Image","left_margin":"Left Margin","right_margin":"Right Margin","top_margin":"Top Margin","bottom_margin":"Bottom Margin","text_color":"Text Color","font_size":"Font Size","font_face":"Font Face","link_color":"Link Color","hover_color":"Hover Color","visited_color":"Visited Color","active_color":"Active Color",textcolor:"Color",fontsize:"Font Size",fontface:"Font Family","meta_index_follow":"Index and Follow the Links","meta_index_nofollow":"Index and Don\'t Follow the Links","meta_noindex_follow":"Do Not Index but Follow the Links","meta_noindex_nofollow":"Do Not Index and Don\'t Follow the Links","appearance_style":"Stylesheet and Style Properties",stylesheet:"Stylesheet",style:"Style",author:"Author",copyright:"Copyright",add:"Add New Element",remove:"Remove Selected Element",moveup:"Move Selected Element Up",movedown:"Move Selected Element Down","head_elements":"Head Elements",info:"Information","add_title":"Title Element","add_meta":"Meta Element","add_script":"Script Element","add_style":"Style Element","add_link":"Link Element","add_base":"Base Element","add_comment":"Comment Node","title_element":"Title Element","script_element":"Script Element","style_element":"Style Element","base_element":"Base Element","link_element":"Link Element","meta_element":"Meta Element","comment_element":"Comment",src:"Source",language:"Language",href:"HREF",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"HREF Lang","general_props":"General","advanced_props":"Advanced"});
@@ -0,0 +1 @@
1
+ (function(){var b=tinymce.DOM;var a=function(d,f,e){var c=function(g){var i=d.controlManager.get(g);var h=f.controlManager.get(g);if(i&&h){h.displayColor(i.value)}};c("forecolor");c("backcolor");f.setContent(d.getContent({format:"raw"}),{format:"raw"});f.selection.moveToBookmark(e);if(d.plugins.spellchecker&&f.plugins.spellchecker){f.plugins.spellchecker.setLanguage(d.plugins.spellchecker.selectedLang)}};tinymce.create("tinymce.plugins.FullScreenPlugin",{init:function(i,c){var l=this,m={},k=b.doc.documentElement,d,o,h,g,f,e,j;i.addCommand("mceFullScreen",function(){var q,r;if(i.getParam("fullscreen_is_enabled")){if(i.getParam("fullscreen_new_window")){closeFullscreen()}else{b.win.setTimeout(function(){var t=i;var s=tinyMCE.get(t.getParam("fullscreen_editor_id"));s.plugins.fullscreen.saveState(t);tinyMCE.remove(t)},10)}return}if(i.getParam("fullscreen_new_window")){l.fullscreenSettings={bookmark:i.selection.getBookmark()};q=b.win.open(c+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{q.resizeTo(screen.availWidth,screen.availHeight)}catch(p){}}else{o=b.getStyle(b.doc.body,"overflow",1)||"auto";h=b.getStyle(k,"overflow",1);d=b.getViewPort();g=d.x;f=d.y;if(tinymce.isOpera&&o=="visible"){o="auto"}if(tinymce.isIE&&o=="scroll"){o="auto"}if(tinymce.isIE&&(h=="visible"||h=="scroll")){h="auto"}if(o=="0px"){o=""}b.setStyle(b.doc.body,"overflow","hidden");k.style.overflow="hidden";d=b.getViewPort();b.win.scrollTo(0,0);if(tinymce.isIE){d.h-=1}if(tinymce.isIE6||document.compatMode=="BackCompat"){e="absolute;top:"+d.y}else{e="fixed;top:0"}n=b.add(b.doc.body,"div",{id:"mce_fullscreen_container",style:"position:"+e+";left:0;width:"+d.w+"px;height:"+d.h+"px;z-index:200000;"});b.add(n,"div",{id:"mce_fullscreen"});tinymce.each(i.settings,function(s,t){m[t]=s});m.id="mce_fullscreen";m.width=n.clientWidth;m.height=n.clientHeight-15;m.fullscreen_is_enabled=true;m.fullscreen_editor_id=i.id;m.theme_advanced_resizing=false;m.save_onsavecallback=function(){i.setContent(tinyMCE.get(m.id).getContent());i.execCommand("mceSave")};tinymce.each(i.getParam("fullscreen_settings"),function(t,s){m[s]=t});l.fullscreenSettings={bookmark:i.selection.getBookmark(),fullscreen_overflow:o,fullscreen_html_overflow:h,fullscreen_scrollx:g,fullscreen_scrolly:f};if(m.theme_advanced_toolbar_location==="external"){m.theme_advanced_toolbar_location="top"}tinyMCE.oldSettings=tinyMCE.settings;l.fullscreenEditor=new tinymce.Editor("mce_fullscreen",m);l.fullscreenEditor.onInit.add(function(){l.loadState(l.fullscreenEditor)});l.fullscreenEditor.render();l.fullscreenElement=new tinymce.dom.Element("mce_fullscreen_container");l.fullscreenElement.update();l.resizeFunc=tinymce.dom.Event.add(b.win,"resize",function(){var v=tinymce.DOM.getViewPort(),t=l.fullscreenEditor,s,u;s=t.dom.getSize(t.getContainer().getElementsByTagName("table")[0]);u=t.dom.getSize(t.getContainer().getElementsByTagName("iframe")[0]);t.theme.resizeTo(v.w-s.w+u.w,v.h-s.h+u.h)})}});i.addButton("fullscreen",{title:"fullscreen.desc",cmd:"mceFullScreen"});i.onNodeChange.add(function(q,p){p.setActive("fullscreen",q.getParam("fullscreen_is_enabled"))});l.loadState=function(p){if(!(p&&l.fullscreenSettings)){throw"No fullscreen editor to load to"}a(i,p,l.fullscreenSettings.bookmark);p.focus()};l.saveState=function(q){if(!(q&&l.fullscreenSettings)){throw"No fullscreen editor to restore from"}var p=l.fullscreenSettings;a(q,i,q.selection.getBookmark());if(!i.getParam("fullscreen_new_window")){tinymce.dom.Event.remove(b.win,"resize",l.resizeFunc);delete l.resizeFunc;b.remove("mce_fullscreen_container");b.doc.documentElement.style.overflow=p.fullscreen_html_overflow;b.setStyle(b.doc.body,"overflow",p.fullscreen_overflow);b.win.scrollTo(p.fullscreen_scrollx,p.fullscreen_scrolly)}tinyMCE.settings=tinyMCE.oldSettings;delete tinyMCE.oldSettings;delete l.fullscreenEditor;delete l.fullscreenElement;delete l.fullscreenSettings;b.win.setTimeout(function(){i.selection.moveToBookmark(j);i.focus()},10)}},getInfo:function(){return{longname:"Fullscreen",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("fullscreen",tinymce.plugins.FullScreenPlugin)})();
@@ -0,0 +1,234 @@
1
+ /**
2
+ * editor_plugin_src.js
3
+ *
4
+ * Copyright 2009, Moxiecode Systems AB
5
+ * Released under LGPL License.
6
+ *
7
+ * License: http://tinymce.moxiecode.com/license
8
+ * Contributing: http://tinymce.moxiecode.com/contributing
9
+ */
10
+
11
+ (function() {
12
+ var DOM = tinymce.DOM;
13
+
14
+ // State Transfer function
15
+ var transferState = function(oldEditor, newEditor, bookmark) {
16
+ var transferColorButtonState = function(swapme) {
17
+ var c = oldEditor.controlManager.get(swapme);
18
+ var newC = newEditor.controlManager.get(swapme);
19
+
20
+ if (c && newC) {
21
+ newC.displayColor(c.value);
22
+ }
23
+
24
+ };
25
+
26
+ transferColorButtonState('forecolor');
27
+ transferColorButtonState('backcolor');
28
+ newEditor.setContent(oldEditor.getContent({format : 'raw'}), {format : 'raw'});
29
+ newEditor.selection.moveToBookmark(bookmark);
30
+
31
+ if (oldEditor.plugins.spellchecker && newEditor.plugins.spellchecker) {
32
+ newEditor.plugins.spellchecker.setLanguage(oldEditor.plugins.spellchecker.selectedLang);
33
+ }
34
+ };
35
+
36
+ tinymce.create('tinymce.plugins.FullScreenPlugin', {
37
+ init : function(ed, url) {
38
+ var t = this, s = {}, de = DOM.doc.documentElement, vp, fullscreen_overflow, fullscreen_html_overflow, fullscreen_scrollx, fullscreen_scrolly, posCss, bookmark;
39
+
40
+ // Register commands
41
+ ed.addCommand('mceFullScreen', function() {
42
+ var win, oed;
43
+
44
+ if (ed.getParam('fullscreen_is_enabled')) {
45
+ if (ed.getParam('fullscreen_new_window'))
46
+ closeFullscreen(); // Call to close in fullscreen.htm
47
+ else {
48
+ DOM.win.setTimeout(function() {
49
+ var fullscreenEditor = ed;
50
+
51
+ // find the editor that opened this one, execute restore function there
52
+ var originalEditor = tinyMCE.get(fullscreenEditor.getParam('fullscreen_editor_id'));
53
+ originalEditor.plugins.fullscreen.saveState(fullscreenEditor);
54
+
55
+ tinyMCE.remove(fullscreenEditor);
56
+ }, 10);
57
+ }
58
+
59
+ return;
60
+ }
61
+
62
+ if (ed.getParam('fullscreen_new_window')) {
63
+ t.fullscreenSettings = {
64
+ bookmark: ed.selection.getBookmark()
65
+ };
66
+ win = DOM.win.open(url + "/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight);
67
+ try {
68
+ win.resizeTo(screen.availWidth, screen.availHeight);
69
+ } catch (e) {
70
+ // Ignore
71
+ }
72
+ } else {
73
+ fullscreen_overflow = DOM.getStyle(DOM.doc.body, 'overflow', 1) || 'auto';
74
+ fullscreen_html_overflow = DOM.getStyle(de, 'overflow', 1);
75
+ vp = DOM.getViewPort();
76
+ fullscreen_scrollx = vp.x;
77
+ fullscreen_scrolly = vp.y;
78
+
79
+ // Fixes an Opera bug where the scrollbars doesn't reappear
80
+ if (tinymce.isOpera && fullscreen_overflow == 'visible')
81
+ fullscreen_overflow = 'auto';
82
+
83
+ // Fixes an IE bug where horizontal scrollbars would appear
84
+ if (tinymce.isIE && fullscreen_overflow == 'scroll')
85
+ fullscreen_overflow = 'auto';
86
+
87
+ // Fixes an IE bug where the scrollbars doesn't reappear
88
+ if (tinymce.isIE && (fullscreen_html_overflow == 'visible' || fullscreen_html_overflow == 'scroll'))
89
+ fullscreen_html_overflow = 'auto';
90
+
91
+ if (fullscreen_overflow == '0px')
92
+ fullscreen_overflow = '';
93
+
94
+ DOM.setStyle(DOM.doc.body, 'overflow', 'hidden');
95
+ de.style.overflow = 'hidden'; //Fix for IE6/7
96
+ vp = DOM.getViewPort();
97
+ DOM.win.scrollTo(0, 0);
98
+
99
+ if (tinymce.isIE)
100
+ vp.h -= 1;
101
+
102
+ // Use fixed position if it exists
103
+ if (tinymce.isIE6 || document.compatMode == 'BackCompat')
104
+ posCss = 'absolute;top:' + vp.y;
105
+ else
106
+ posCss = 'fixed;top:0';
107
+
108
+ n = DOM.add(DOM.doc.body, 'div', {
109
+ id : 'mce_fullscreen_container',
110
+ style : 'position:' + posCss + ';left:0;width:' + vp.w + 'px;height:' + vp.h + 'px;z-index:200000;'});
111
+ DOM.add(n, 'div', {id : 'mce_fullscreen'});
112
+
113
+ tinymce.each(ed.settings, function(v, n) {
114
+ s[n] = v;
115
+ });
116
+
117
+ s.id = 'mce_fullscreen';
118
+ s.width = n.clientWidth;
119
+ s.height = n.clientHeight - 15;
120
+ s.fullscreen_is_enabled = true;
121
+ s.fullscreen_editor_id = ed.id;
122
+ s.theme_advanced_resizing = false;
123
+ s.save_onsavecallback = function() {
124
+ ed.setContent(tinyMCE.get(s.id).getContent());
125
+ ed.execCommand('mceSave');
126
+ };
127
+
128
+ tinymce.each(ed.getParam('fullscreen_settings'), function(v, k) {
129
+ s[k] = v;
130
+ });
131
+
132
+ t.fullscreenSettings = {
133
+ bookmark: ed.selection.getBookmark(),
134
+ fullscreen_overflow: fullscreen_overflow,
135
+ fullscreen_html_overflow: fullscreen_html_overflow,
136
+ fullscreen_scrollx: fullscreen_scrollx,
137
+ fullscreen_scrolly: fullscreen_scrolly
138
+ };
139
+
140
+ if (s.theme_advanced_toolbar_location === 'external')
141
+ s.theme_advanced_toolbar_location = 'top';
142
+
143
+ tinyMCE.oldSettings = tinyMCE.settings; // Store old settings, the Editor constructor overwrites them
144
+ t.fullscreenEditor = new tinymce.Editor('mce_fullscreen', s);
145
+ t.fullscreenEditor.onInit.add(function() {
146
+ t.loadState(t.fullscreenEditor);
147
+ });
148
+
149
+ t.fullscreenEditor.render();
150
+
151
+ t.fullscreenElement = new tinymce.dom.Element('mce_fullscreen_container');
152
+ t.fullscreenElement.update();
153
+ //document.body.overflow = 'hidden';
154
+
155
+ t.resizeFunc = tinymce.dom.Event.add(DOM.win, 'resize', function() {
156
+ var vp = tinymce.DOM.getViewPort(), fed = t.fullscreenEditor, outerSize, innerSize;
157
+
158
+ // Get outer/inner size to get a delta size that can be used to calc the new iframe size
159
+ outerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('table')[0]);
160
+ innerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('iframe')[0]);
161
+
162
+ fed.theme.resizeTo(vp.w - outerSize.w + innerSize.w, vp.h - outerSize.h + innerSize.h);
163
+ });
164
+ }
165
+ });
166
+
167
+ // Register buttons
168
+ ed.addButton('fullscreen', {title : 'fullscreen.desc', cmd : 'mceFullScreen'});
169
+
170
+ ed.onNodeChange.add(function(ed, cm) {
171
+ cm.setActive('fullscreen', ed.getParam('fullscreen_is_enabled'));
172
+ });
173
+
174
+ // fullscreenEditor is a param here because in window mode we don't create it
175
+ t.loadState = function(fullscreenEditor) {
176
+ if (!(fullscreenEditor && t.fullscreenSettings)) {
177
+ throw "No fullscreen editor to load to";
178
+ }
179
+
180
+ transferState(ed, fullscreenEditor, t.fullscreenSettings.bookmark);
181
+ fullscreenEditor.focus();
182
+
183
+ };
184
+
185
+ // fullscreenEditor is a param here because in window mode we don't create it
186
+ t.saveState = function(fullscreenEditor) {
187
+ if (!(fullscreenEditor && t.fullscreenSettings)) {
188
+ throw "No fullscreen editor to restore from";
189
+ }
190
+ var settings = t.fullscreenSettings;
191
+
192
+ transferState(fullscreenEditor, ed, fullscreenEditor.selection.getBookmark());
193
+
194
+ // cleanup only required if window mode isn't used
195
+ if (!ed.getParam('fullscreen_new_window')) {
196
+ tinymce.dom.Event.remove(DOM.win, 'resize', t.resizeFunc);
197
+ delete t.resizeFunc;
198
+
199
+ DOM.remove('mce_fullscreen_container');
200
+
201
+ DOM.doc.documentElement.style.overflow = settings.fullscreen_html_overflow;
202
+ DOM.setStyle(DOM.doc.body, 'overflow', settings.fullscreen_overflow);
203
+ DOM.win.scrollTo(settings.fullscreen_scrollx, settings.fullscreen_scrolly);
204
+ }
205
+ tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings
206
+
207
+ // clear variables
208
+ delete tinyMCE.oldSettings;
209
+ delete t.fullscreenEditor;
210
+ delete t.fullscreenElement;
211
+ delete t.fullscreenSettings;
212
+
213
+ // allow the fullscreen editor to be removed before restoring focus and selection
214
+ DOM.win.setTimeout(function() {
215
+ ed.selection.moveToBookmark(bookmark);
216
+ ed.focus();
217
+ }, 10);
218
+ };
219
+ },
220
+
221
+ getInfo : function() {
222
+ return {
223
+ longname : 'Fullscreen',
224
+ author : 'Moxiecode Systems AB',
225
+ authorurl : 'http://tinymce.moxiecode.com',
226
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen',
227
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
228
+ };
229
+ }
230
+ });
231
+
232
+ // Register plugin
233
+ tinymce.PluginManager.add('fullscreen', tinymce.plugins.FullScreenPlugin);
234
+ })();
@@ -0,0 +1,117 @@
1
+ <!DOCTYPE html>
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <title></title>
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
+ <script type="text/javascript" src="../../tiny_mce_dev.js"></script>
7
+ <script type="text/javascript">
8
+ function patchCallback(settings, key) {
9
+ if (settings[key])
10
+ settings[key] = "window.opener." + settings[key];
11
+ }
12
+
13
+ var settings = {}, paSe = window.opener.tinyMCE.activeEditor.settings, oeID = window.opener.tinyMCE.activeEditor.id;
14
+
15
+ // Clone array
16
+ for (var n in paSe)
17
+ settings[n] = paSe[n];
18
+
19
+ // Override options for fullscreen
20
+ for (var n in paSe.fullscreen_settings)
21
+ settings[n] = paSe.fullscreen_settings[n];
22
+
23
+ // Patch callbacks, make them point to window.opener
24
+ patchCallback(settings, 'urlconverter_callback');
25
+ patchCallback(settings, 'insertlink_callback');
26
+ patchCallback(settings, 'insertimage_callback');
27
+ patchCallback(settings, 'setupcontent_callback');
28
+ patchCallback(settings, 'save_callback');
29
+ patchCallback(settings, 'onchange_callback');
30
+ patchCallback(settings, 'init_instance_callback');
31
+ patchCallback(settings, 'file_browser_callback');
32
+ patchCallback(settings, 'cleanup_callback');
33
+ patchCallback(settings, 'execcommand_callback');
34
+ patchCallback(settings, 'oninit');
35
+
36
+ // Set options
37
+ delete settings.id;
38
+ settings['mode'] = 'exact';
39
+ settings['elements'] = 'fullscreenarea';
40
+ settings['add_unload_trigger'] = false;
41
+ settings['ask'] = false;
42
+ settings['document_base_url'] = window.opener.tinyMCE.activeEditor.documentBaseURI.getURI();
43
+ settings['fullscreen_is_enabled'] = true;
44
+ settings['fullscreen_editor_id'] = oeID;
45
+ settings['theme_advanced_resizing'] = false;
46
+ settings['strict_loading_mode'] = true;
47
+
48
+ settings.save_onsavecallback = function() {
49
+ moveContent();
50
+ window.opener.tinyMCE.get(oeID).execCommand('mceSave');
51
+ window.close();
52
+ };
53
+
54
+ function unloadHandler(e) {
55
+ moveContent();
56
+ }
57
+
58
+ function moveContent() {
59
+ // find the original editor, execute restore state in it's plugin instance
60
+ window.opener.tinyMCE.get(oeID).plugins.fullscreen.saveState(tinyMCE.activeEditor);
61
+
62
+ // prevent moveContent from being called twice - e.g. if the unloadHandler runs after moveContent()
63
+ tinymce.dom.Event.remove(window, "beforeunload", unloadHandler);
64
+ }
65
+
66
+ function closeFullscreen() {
67
+ // moveContent() will be called by the unload handler
68
+ window.close();
69
+ }
70
+
71
+ function doParentSubmit() {
72
+ moveContent();
73
+
74
+ if (window.opener.tinyMCE.selectedInstance.formElement.form)
75
+ window.opener.tinyMCE.selectedInstance.formElement.form.submit();
76
+
77
+ window.close();
78
+
79
+ return false;
80
+ }
81
+
82
+ function render() {
83
+ var e = document.getElementById('fullscreenarea'), vp, ed, ow, oh, dom = tinymce.DOM;
84
+
85
+ vp = dom.getViewPort();
86
+ settings.width = vp.w;
87
+ settings.height = vp.h - 15;
88
+
89
+ settings.oninit = function() {
90
+ var ed = tinyMCE.activeEditor;
91
+ window.opener.tinyMCE.get(oeID).plugins.fullscreen.loadState(ed);
92
+
93
+ tinymce.dom.Event.add(window, 'resize', function() {
94
+ var vp = dom.getViewPort();
95
+
96
+ tinyMCE.activeEditor.theme.resizeTo(vp.w, vp.h);
97
+ });
98
+ }
99
+
100
+ tinyMCE.init(settings);
101
+ }
102
+
103
+ // Add onunload
104
+ tinymce.dom.Event.add(window, "beforeunload", unloadHandler);
105
+ </script>
106
+ </head>
107
+ <body style="margin:0;overflow:hidden;width:100%;height:100%" scrolling="no" scroll="no">
108
+ <form onsubmit="doParentSubmit();">
109
+ <textarea id="fullscreenarea" style="width:100%; height:100%"></textarea>
110
+ </form>
111
+
112
+ <script type="text/javascript">
113
+ render();
114
+ </script>
115
+
116
+ </body>
117
+ </html>
@@ -0,0 +1 @@
1
+ (function(){tinymce.create("tinymce.plugins.IESpell",{init:function(a,b){var c=this,d;if(!tinymce.isIE){return}c.editor=a;a.addCommand("mceIESpell",function(){try{d=new ActiveXObject("ieSpell.ieSpellExtension");d.CheckDocumentNode(a.getDoc().documentElement)}catch(f){if(f.number==-2146827859){a.windowManager.confirm(a.getLang("iespell.download"),function(e){if(e){window.open("http://www.iespell.com/download.php","ieSpellDownload","")}})}else{a.windowManager.alert("Error Loading ieSpell: Exception "+f.number)}}});a.addButton("iespell",{title:"iespell.iespell_desc",cmd:"mceIESpell"})},getInfo:function(){return{longname:"IESpell (IE Only)",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("iespell",tinymce.plugins.IESpell)})();
@@ -0,0 +1,54 @@
1
+ /**
2
+ * editor_plugin_src.js
3
+ *
4
+ * Copyright 2009, Moxiecode Systems AB
5
+ * Released under LGPL License.
6
+ *
7
+ * License: http://tinymce.moxiecode.com/license
8
+ * Contributing: http://tinymce.moxiecode.com/contributing
9
+ */
10
+
11
+ (function() {
12
+ tinymce.create('tinymce.plugins.IESpell', {
13
+ init : function(ed, url) {
14
+ var t = this, sp;
15
+
16
+ if (!tinymce.isIE)
17
+ return;
18
+
19
+ t.editor = ed;
20
+
21
+ // Register commands
22
+ ed.addCommand('mceIESpell', function() {
23
+ try {
24
+ sp = new ActiveXObject("ieSpell.ieSpellExtension");
25
+ sp.CheckDocumentNode(ed.getDoc().documentElement);
26
+ } catch (e) {
27
+ if (e.number == -2146827859) {
28
+ ed.windowManager.confirm(ed.getLang("iespell.download"), function(s) {
29
+ if (s)
30
+ window.open('http://www.iespell.com/download.php', 'ieSpellDownload', '');
31
+ });
32
+ } else
33
+ ed.windowManager.alert("Error Loading ieSpell: Exception " + e.number);
34
+ }
35
+ });
36
+
37
+ // Register buttons
38
+ ed.addButton('iespell', {title : 'iespell.iespell_desc', cmd : 'mceIESpell'});
39
+ },
40
+
41
+ getInfo : function() {
42
+ return {
43
+ longname : 'IESpell (IE Only)',
44
+ author : 'Moxiecode Systems AB',
45
+ authorurl : 'http://tinymce.moxiecode.com',
46
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell',
47
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
48
+ };
49
+ }
50
+ });
51
+
52
+ // Register plugin
53
+ tinymce.PluginManager.add('iespell', tinymce.plugins.IESpell);
54
+ })();
@@ -0,0 +1 @@
1
+ (function(){var d=tinymce.DOM,b=tinymce.dom.Element,a=tinymce.dom.Event,e=tinymce.each,c=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(f,g){f.onBeforeRenderUI.add(function(){f.windowManager=new tinymce.InlineWindowManager(f);d.loadCSS(g+"/skins/"+(f.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(f){var g=this;g.parent(f);g.zIndex=300000;g.count=0;g.windows={}},open:function(s,j){var z=this,i,k="",r=z.editor,g=0,v=0,h,m,o,q,l,x,y,n;s=s||{};j=j||{};if(!s.inline){return z.parent(s,j)}n=z._frontWindow();if(n&&d.get(n.id+"_ifr")){n.focussedElement=d.get(n.id+"_ifr").contentWindow.document.activeElement}if(!s.type){z.bookmark=r.selection.getBookmark(1)}i=d.uniqueId();h=d.getViewPort();s.width=parseInt(s.width||320);s.height=parseInt(s.height||240)+(tinymce.isIE?8:0);s.min_width=parseInt(s.min_width||150);s.min_height=parseInt(s.min_height||100);s.max_width=parseInt(s.max_width||2000);s.max_height=parseInt(s.max_height||2000);s.left=s.left||Math.round(Math.max(h.x,h.x+(h.w/2)-(s.width/2)));s.top=s.top||Math.round(Math.max(h.y,h.y+(h.h/2)-(s.height/2)));s.movable=s.resizable=true;j.mce_width=s.width;j.mce_height=s.height;j.mce_inline=true;j.mce_window_id=i;j.mce_auto_focus=s.auto_focus;z.features=s;z.params=j;z.onOpen.dispatch(z,s,j);if(s.type){k+=" mceModal";if(s.type){k+=" mce"+s.type.substring(0,1).toUpperCase()+s.type.substring(1)}s.resizable=false}if(s.statusbar){k+=" mceStatusbar"}if(s.resizable){k+=" mceResizable"}if(s.minimizable){k+=" mceMinimizable"}if(s.maximizable){k+=" mceMaximizable"}if(s.movable){k+=" mceMovable"}z._addAll(d.doc.body,["div",{id:i,role:"dialog","aria-labelledby":s.type?i+"_content":i+"_title","class":(r.settings.inlinepopups_skin||"clearlooks2")+(tinymce.isIE&&window.getSelection?" ie9":""),style:"width:100px;height:100px"},["div",{id:i+"_wrapper","class":"mceWrapper"+k},["div",{id:i+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_title"},s.title||""]],["div",{id:i+"_middle","class":"mceMiddle"},["div",{id:i+"_left","class":"mceLeft",tabindex:"0"}],["span",{id:i+"_content"}],["div",{id:i+"_right","class":"mceRight",tabindex:"0"}]],["div",{id:i+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_status"},"Content"]],["a",{"class":"mceMove",tabindex:"-1",href:"javascript:;"}],["a",{"class":"mceMin",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMax",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMed",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceClose",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{id:i+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);d.setStyles(i,{top:-10000,left:-10000});if(tinymce.isGecko){d.setStyle(i,"overflow","auto")}if(!s.type){g+=d.get(i+"_left").clientWidth;g+=d.get(i+"_right").clientWidth;v+=d.get(i+"_top").clientHeight;v+=d.get(i+"_bottom").clientHeight}d.setStyles(i,{top:s.top,left:s.left,width:s.width+g,height:s.height+v});y=s.url||s.file;if(y){if(tinymce.relaxedDomain){y+=(y.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}y=tinymce._addVer(y)}if(!s.type){d.add(i+"_content","iframe",{id:i+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});d.setStyles(i+"_ifr",{width:s.width,height:s.height});d.setAttrib(i+"_ifr","src",y)}else{d.add(i+"_wrapper","a",{id:i+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");if(s.type=="confirm"){d.add(i+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel")}d.add(i+"_middle","div",{"class":"mceIcon"});d.setHTML(i+"_content",s.content.replace("\n","<br />"));a.add(i,"keyup",function(f){var p=27;if(f.keyCode===p){s.button_func(false);return a.cancel(f)}});a.add(i,"keydown",function(f){var t,p=9;if(f.keyCode===p){t=d.select("a.mceCancel",i+"_wrapper")[0];if(t&&t!==f.target){t.focus()}else{d.get(i+"_ok").focus()}return a.cancel(f)}})}o=a.add(i,"mousedown",function(t){var u=t.target,f,p;f=z.windows[i];z.focus(i);if(u.nodeName=="A"||u.nodeName=="a"){if(u.className=="mceClose"){z.close(null,i);return a.cancel(t)}else{if(u.className=="mceMax"){f.oldPos=f.element.getXY();f.oldSize=f.element.getSize();p=d.getViewPort();p.w-=2;p.h-=2;f.element.moveTo(p.x,p.y);f.element.resizeTo(p.w,p.h);d.setStyles(i+"_ifr",{width:p.w-f.deltaWidth,height:p.h-f.deltaHeight});d.addClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMed"){f.element.moveTo(f.oldPos.x,f.oldPos.y);f.element.resizeTo(f.oldSize.w,f.oldSize.h);f.iframeElement.resizeTo(f.oldSize.w-f.deltaWidth,f.oldSize.h-f.deltaHeight);d.removeClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMove"){return z._startDrag(i,t,u.className)}else{if(d.hasClass(u,"mceResize")){return z._startDrag(i,t,u.className.substring(13))}}}}}}});q=a.add(i,"click",function(f){var p=f.target;z.focus(i);if(p.nodeName=="A"||p.nodeName=="a"){switch(p.className){case"mceClose":z.close(null,i);return a.cancel(f);case"mceButton mceOk":case"mceButton mceCancel":s.button_func(p.className=="mceButton mceOk");return a.cancel(f)}}});a.add([i+"_left",i+"_right"],"focus",function(p){var t=d.get(i+"_ifr");if(t){var f=t.contentWindow.document.body;var u=d.select(":input:enabled,*[tabindex=0]",f);if(p.target.id===(i+"_left")){u[u.length-1].focus()}else{u[0].focus()}}else{d.get(i+"_ok").focus()}});x=z.windows[i]={id:i,mousedown_func:o,click_func:q,element:new b(i,{blocker:1,container:r.getContainer()}),iframeElement:new b(i+"_ifr"),features:s,deltaWidth:g,deltaHeight:v};x.iframeElement.on("focus",function(){z.focus(i)});if(z.count==0&&z.editor.getParam("dialog_type","modal")=="modal"){d.add(d.doc.body,"div",{id:"mceModalBlocker","class":(z.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{zIndex:z.zIndex-1}});d.show("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","true")}else{d.setStyle("mceModalBlocker","z-index",z.zIndex-1)}if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceModalBlocker",{position:"absolute",left:h.x,top:h.y,width:h.w-2,height:h.h-2})}d.setAttrib(i,"aria-hidden","false");z.focus(i);z._fixIELayout(i,1);if(d.get(i+"_ok")){d.get(i+"_ok").focus()}z.count++;return x},focus:function(h){var g=this,f;if(f=g.windows[h]){f.zIndex=this.zIndex++;f.element.setStyle("zIndex",f.zIndex);f.element.update();h=h+"_wrapper";d.removeClass(g.lastId,"mceFocus");d.addClass(h,"mceFocus");g.lastId=h;if(f.focussedElement){f.focussedElement.focus()}else{if(d.get(h+"_ok")){d.get(f.id+"_ok").focus()}else{if(d.get(f.id+"_ifr")){d.get(f.id+"_ifr").focus()}}}}},_addAll:function(k,h){var g,l,f=this,j=tinymce.DOM;if(c(h,"string")){k.appendChild(j.doc.createTextNode(h))}else{if(h.length){k=k.appendChild(j.create(h[0],h[1]));for(g=2;g<h.length;g++){f._addAll(k,h[g])}}}},_startDrag:function(v,G,E){var o=this,u,z,C=d.doc,f,l=o.windows[v],h=l.element,y=h.getXY(),x,q,F,g,A,s,r,j,i,m,k,n,B;g={x:0,y:0};A=d.getViewPort();A.w-=2;A.h-=2;j=G.screenX;i=G.screenY;m=k=n=B=0;u=a.add(C,"mouseup",function(p){a.remove(C,"mouseup",u);a.remove(C,"mousemove",z);if(f){f.remove()}h.moveBy(m,k);h.resizeBy(n,B);q=h.getSize();d.setStyles(v+"_ifr",{width:q.w-l.deltaWidth,height:q.h-l.deltaHeight});o._fixIELayout(v,1);return a.cancel(p)});if(E!="Move"){D()}function D(){if(f){return}o._fixIELayout(v,0);d.add(C.body,"div",{id:"mceEventBlocker","class":"mceEventBlocker "+(o.editor.settings.inlinepopups_skin||"clearlooks2"),style:{zIndex:o.zIndex+1}});if(tinymce.isIE6||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceEventBlocker",{position:"absolute",left:A.x,top:A.y,width:A.w-2,height:A.h-2})}f=new b("mceEventBlocker");f.update();x=h.getXY();q=h.getSize();s=g.x+x.x-A.x;r=g.y+x.y-A.y;d.add(f.get(),"div",{id:"mcePlaceHolder","class":"mcePlaceHolder",style:{left:s,top:r,width:q.w,height:q.h}});F=new b("mcePlaceHolder")}z=a.add(C,"mousemove",function(w){var p,H,t;D();p=w.screenX-j;H=w.screenY-i;switch(E){case"ResizeW":m=p;n=0-p;break;case"ResizeE":n=p;break;case"ResizeN":case"ResizeNW":case"ResizeNE":if(E=="ResizeNW"){m=p;n=0-p}else{if(E=="ResizeNE"){n=p}}k=H;B=0-H;break;case"ResizeS":case"ResizeSW":case"ResizeSE":if(E=="ResizeSW"){m=p;n=0-p}else{if(E=="ResizeSE"){n=p}}B=H;break;case"mceMove":m=p;k=H;break}if(n<(t=l.features.min_width-q.w)){if(m!==0){m+=n-t}n=t}if(B<(t=l.features.min_height-q.h)){if(k!==0){k+=B-t}B=t}n=Math.min(n,l.features.max_width-q.w);B=Math.min(B,l.features.max_height-q.h);m=Math.max(m,A.x-(s+A.x));k=Math.max(k,A.y-(r+A.y));m=Math.min(m,(A.w+A.x)-(s+q.w+A.x));k=Math.min(k,(A.h+A.y)-(r+q.h+A.y));if(m+k!==0){if(s+m<0){m=0}if(r+k<0){k=0}F.moveTo(s+m,r+k)}if(n+B!==0){F.resizeTo(q.w+n,q.h+B)}return a.cancel(w)});return a.cancel(G)},resizeBy:function(g,h,i){var f=this.windows[i];if(f){f.element.resizeBy(g,h);f.iframeElement.resizeBy(g,h)}},close:function(i,k){var g=this,f,j=d.doc,h,k;k=g._findId(k||i);if(!g.windows[k]){g.parent(i);return}g.count--;if(g.count==0){d.remove("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","false");g.editor.focus()}if(f=g.windows[k]){g.onClose.dispatch(g);a.remove(j,"mousedown",f.mousedownFunc);a.remove(j,"click",f.clickFunc);a.clear(k);a.clear(k+"_ifr");d.setAttrib(k+"_ifr","src",'javascript:""');f.element.remove();delete g.windows[k];h=g._frontWindow();if(h){g.focus(h.id)}}},_frontWindow:function(){var g,f=0;e(this.windows,function(h){if(h.zIndex>f){g=h;f=h.zIndex}});return g},setTitle:function(f,g){var h;f=this._findId(f);if(h=d.get(f+"_title")){h.innerHTML=d.encode(g)}},alert:function(g,f,j){var i=this,h;h=i.open({title:i,type:"alert",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},confirm:function(g,f,j){var i=this,h;h=i.open({title:i,type:"confirm",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},_findId:function(f){var g=this;if(typeof(f)=="string"){return f}e(g.windows,function(h){var i=d.get(h.id+"_ifr");if(i&&f==i.contentWindow){f=h.id;return false}});return f},_fixIELayout:function(i,h){var f,g;if(!tinymce.isIE6){return}e(["n","s","w","e","nw","ne","sw","se"],function(j){var k=d.get(i+"_resize_"+j);d.setStyles(k,{width:h?k.clientWidth:"",height:h?k.clientHeight:"",cursor:d.getStyle(k,"cursor",1)});d.setStyle(i+"_bottom","bottom","-1px");k=0});if(f=this.windows[i]){f.element.hide();f.element.show();e(d.select("div,a",i),function(k,j){if(k.currentStyle.backgroundImage!="none"){g=new Image();g.src=k.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1")}});d.get(i).style.filter=""}}});tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)})();
@@ -0,0 +1,699 @@
1
+ /**
2
+ * editor_plugin_src.js
3
+ *
4
+ * Copyright 2009, Moxiecode Systems AB
5
+ * Released under LGPL License.
6
+ *
7
+ * License: http://tinymce.moxiecode.com/license
8
+ * Contributing: http://tinymce.moxiecode.com/contributing
9
+ */
10
+
11
+ (function() {
12
+ var DOM = tinymce.DOM, Element = tinymce.dom.Element, Event = tinymce.dom.Event, each = tinymce.each, is = tinymce.is;
13
+
14
+ tinymce.create('tinymce.plugins.InlinePopups', {
15
+ init : function(ed, url) {
16
+ // Replace window manager
17
+ ed.onBeforeRenderUI.add(function() {
18
+ ed.windowManager = new tinymce.InlineWindowManager(ed);
19
+ DOM.loadCSS(url + '/skins/' + (ed.settings.inlinepopups_skin || 'clearlooks2') + "/window.css");
20
+ });
21
+ },
22
+
23
+ getInfo : function() {
24
+ return {
25
+ longname : 'InlinePopups',
26
+ author : 'Moxiecode Systems AB',
27
+ authorurl : 'http://tinymce.moxiecode.com',
28
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups',
29
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
30
+ };
31
+ }
32
+ });
33
+
34
+ tinymce.create('tinymce.InlineWindowManager:tinymce.WindowManager', {
35
+ InlineWindowManager : function(ed) {
36
+ var t = this;
37
+
38
+ t.parent(ed);
39
+ t.zIndex = 300000;
40
+ t.count = 0;
41
+ t.windows = {};
42
+ },
43
+
44
+ open : function(f, p) {
45
+ var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w, u, parentWindow;
46
+
47
+ f = f || {};
48
+ p = p || {};
49
+
50
+ // Run native windows
51
+ if (!f.inline)
52
+ return t.parent(f, p);
53
+
54
+ parentWindow = t._frontWindow();
55
+ if (parentWindow && DOM.get(parentWindow.id + '_ifr')) {
56
+ parentWindow.focussedElement = DOM.get(parentWindow.id + '_ifr').contentWindow.document.activeElement;
57
+ }
58
+
59
+ // Only store selection if the type is a normal window
60
+ if (!f.type)
61
+ t.bookmark = ed.selection.getBookmark(1);
62
+
63
+ id = DOM.uniqueId();
64
+ vp = DOM.getViewPort();
65
+ f.width = parseInt(f.width || 320);
66
+ f.height = parseInt(f.height || 240) + (tinymce.isIE ? 8 : 0);
67
+ f.min_width = parseInt(f.min_width || 150);
68
+ f.min_height = parseInt(f.min_height || 100);
69
+ f.max_width = parseInt(f.max_width || 2000);
70
+ f.max_height = parseInt(f.max_height || 2000);
71
+ f.left = f.left || Math.round(Math.max(vp.x, vp.x + (vp.w / 2.0) - (f.width / 2.0)));
72
+ f.top = f.top || Math.round(Math.max(vp.y, vp.y + (vp.h / 2.0) - (f.height / 2.0)));
73
+ f.movable = f.resizable = true;
74
+ p.mce_width = f.width;
75
+ p.mce_height = f.height;
76
+ p.mce_inline = true;
77
+ p.mce_window_id = id;
78
+ p.mce_auto_focus = f.auto_focus;
79
+
80
+ // Transpose
81
+ // po = DOM.getPos(ed.getContainer());
82
+ // f.left -= po.x;
83
+ // f.top -= po.y;
84
+
85
+ t.features = f;
86
+ t.params = p;
87
+ t.onOpen.dispatch(t, f, p);
88
+
89
+ if (f.type) {
90
+ opt += ' mceModal';
91
+
92
+ if (f.type)
93
+ opt += ' mce' + f.type.substring(0, 1).toUpperCase() + f.type.substring(1);
94
+
95
+ f.resizable = false;
96
+ }
97
+
98
+ if (f.statusbar)
99
+ opt += ' mceStatusbar';
100
+
101
+ if (f.resizable)
102
+ opt += ' mceResizable';
103
+
104
+ if (f.minimizable)
105
+ opt += ' mceMinimizable';
106
+
107
+ if (f.maximizable)
108
+ opt += ' mceMaximizable';
109
+
110
+ if (f.movable)
111
+ opt += ' mceMovable';
112
+
113
+ // Create DOM objects
114
+ t._addAll(DOM.doc.body,
115
+ ['div', {id : id, role : 'dialog', 'aria-labelledby': f.type ? id + '_content' : id + '_title', 'class' : (ed.settings.inlinepopups_skin || 'clearlooks2') + (tinymce.isIE && window.getSelection ? ' ie9' : ''), style : 'width:100px;height:100px'},
116
+ ['div', {id : id + '_wrapper', 'class' : 'mceWrapper' + opt},
117
+ ['div', {id : id + '_top', 'class' : 'mceTop'},
118
+ ['div', {'class' : 'mceLeft'}],
119
+ ['div', {'class' : 'mceCenter'}],
120
+ ['div', {'class' : 'mceRight'}],
121
+ ['span', {id : id + '_title'}, f.title || '']
122
+ ],
123
+
124
+ ['div', {id : id + '_middle', 'class' : 'mceMiddle'},
125
+ ['div', {id : id + '_left', 'class' : 'mceLeft', tabindex : '0'}],
126
+ ['span', {id : id + '_content'}],
127
+ ['div', {id : id + '_right', 'class' : 'mceRight', tabindex : '0'}]
128
+ ],
129
+
130
+ ['div', {id : id + '_bottom', 'class' : 'mceBottom'},
131
+ ['div', {'class' : 'mceLeft'}],
132
+ ['div', {'class' : 'mceCenter'}],
133
+ ['div', {'class' : 'mceRight'}],
134
+ ['span', {id : id + '_status'}, 'Content']
135
+ ],
136
+
137
+ ['a', {'class' : 'mceMove', tabindex : '-1', href : 'javascript:;'}],
138
+ ['a', {'class' : 'mceMin', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
139
+ ['a', {'class' : 'mceMax', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
140
+ ['a', {'class' : 'mceMed', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
141
+ ['a', {'class' : 'mceClose', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
142
+ ['a', {id : id + '_resize_n', 'class' : 'mceResize mceResizeN', tabindex : '-1', href : 'javascript:;'}],
143
+ ['a', {id : id + '_resize_s', 'class' : 'mceResize mceResizeS', tabindex : '-1', href : 'javascript:;'}],
144
+ ['a', {id : id + '_resize_w', 'class' : 'mceResize mceResizeW', tabindex : '-1', href : 'javascript:;'}],
145
+ ['a', {id : id + '_resize_e', 'class' : 'mceResize mceResizeE', tabindex : '-1', href : 'javascript:;'}],
146
+ ['a', {id : id + '_resize_nw', 'class' : 'mceResize mceResizeNW', tabindex : '-1', href : 'javascript:;'}],
147
+ ['a', {id : id + '_resize_ne', 'class' : 'mceResize mceResizeNE', tabindex : '-1', href : 'javascript:;'}],
148
+ ['a', {id : id + '_resize_sw', 'class' : 'mceResize mceResizeSW', tabindex : '-1', href : 'javascript:;'}],
149
+ ['a', {id : id + '_resize_se', 'class' : 'mceResize mceResizeSE', tabindex : '-1', href : 'javascript:;'}]
150
+ ]
151
+ ]
152
+ );
153
+
154
+ DOM.setStyles(id, {top : -10000, left : -10000});
155
+
156
+ // Fix gecko rendering bug, where the editors iframe messed with window contents
157
+ if (tinymce.isGecko)
158
+ DOM.setStyle(id, 'overflow', 'auto');
159
+
160
+ // Measure borders
161
+ if (!f.type) {
162
+ dw += DOM.get(id + '_left').clientWidth;
163
+ dw += DOM.get(id + '_right').clientWidth;
164
+ dh += DOM.get(id + '_top').clientHeight;
165
+ dh += DOM.get(id + '_bottom').clientHeight;
166
+ }
167
+
168
+ // Resize window
169
+ DOM.setStyles(id, {top : f.top, left : f.left, width : f.width + dw, height : f.height + dh});
170
+
171
+ u = f.url || f.file;
172
+ if (u) {
173
+ if (tinymce.relaxedDomain)
174
+ u += (u.indexOf('?') == -1 ? '?' : '&') + 'mce_rdomain=' + tinymce.relaxedDomain;
175
+
176
+ u = tinymce._addVer(u);
177
+ }
178
+
179
+ if (!f.type) {
180
+ DOM.add(id + '_content', 'iframe', {id : id + '_ifr', src : 'javascript:""', frameBorder : 0, style : 'border:0;width:10px;height:10px'});
181
+ DOM.setStyles(id + '_ifr', {width : f.width, height : f.height});
182
+ DOM.setAttrib(id + '_ifr', 'src', u);
183
+ } else {
184
+ DOM.add(id + '_wrapper', 'a', {id : id + '_ok', 'class' : 'mceButton mceOk', href : 'javascript:;', onmousedown : 'return false;'}, 'Ok');
185
+
186
+ if (f.type == 'confirm')
187
+ DOM.add(id + '_wrapper', 'a', {'class' : 'mceButton mceCancel', href : 'javascript:;', onmousedown : 'return false;'}, 'Cancel');
188
+
189
+ DOM.add(id + '_middle', 'div', {'class' : 'mceIcon'});
190
+ DOM.setHTML(id + '_content', f.content.replace('\n', '<br />'));
191
+
192
+ Event.add(id, 'keyup', function(evt) {
193
+ var VK_ESCAPE = 27;
194
+ if (evt.keyCode === VK_ESCAPE) {
195
+ f.button_func(false);
196
+ return Event.cancel(evt);
197
+ }
198
+ });
199
+
200
+ Event.add(id, 'keydown', function(evt) {
201
+ var cancelButton, VK_TAB = 9;
202
+ if (evt.keyCode === VK_TAB) {
203
+ cancelButton = DOM.select('a.mceCancel', id + '_wrapper')[0];
204
+ if (cancelButton && cancelButton !== evt.target) {
205
+ cancelButton.focus();
206
+ } else {
207
+ DOM.get(id + '_ok').focus();
208
+ }
209
+ return Event.cancel(evt);
210
+ }
211
+ });
212
+ }
213
+
214
+ // Register events
215
+ mdf = Event.add(id, 'mousedown', function(e) {
216
+ var n = e.target, w, vp;
217
+
218
+ w = t.windows[id];
219
+ t.focus(id);
220
+
221
+ if (n.nodeName == 'A' || n.nodeName == 'a') {
222
+ if (n.className == 'mceClose') {
223
+ t.close(null, id);
224
+ return Event.cancel(e);
225
+ } else if (n.className == 'mceMax') {
226
+ w.oldPos = w.element.getXY();
227
+ w.oldSize = w.element.getSize();
228
+
229
+ vp = DOM.getViewPort();
230
+
231
+ // Reduce viewport size to avoid scrollbars
232
+ vp.w -= 2;
233
+ vp.h -= 2;
234
+
235
+ w.element.moveTo(vp.x, vp.y);
236
+ w.element.resizeTo(vp.w, vp.h);
237
+ DOM.setStyles(id + '_ifr', {width : vp.w - w.deltaWidth, height : vp.h - w.deltaHeight});
238
+ DOM.addClass(id + '_wrapper', 'mceMaximized');
239
+ } else if (n.className == 'mceMed') {
240
+ // Reset to old size
241
+ w.element.moveTo(w.oldPos.x, w.oldPos.y);
242
+ w.element.resizeTo(w.oldSize.w, w.oldSize.h);
243
+ w.iframeElement.resizeTo(w.oldSize.w - w.deltaWidth, w.oldSize.h - w.deltaHeight);
244
+
245
+ DOM.removeClass(id + '_wrapper', 'mceMaximized');
246
+ } else if (n.className == 'mceMove')
247
+ return t._startDrag(id, e, n.className);
248
+ else if (DOM.hasClass(n, 'mceResize'))
249
+ return t._startDrag(id, e, n.className.substring(13));
250
+ }
251
+ });
252
+
253
+ clf = Event.add(id, 'click', function(e) {
254
+ var n = e.target;
255
+
256
+ t.focus(id);
257
+
258
+ if (n.nodeName == 'A' || n.nodeName == 'a') {
259
+ switch (n.className) {
260
+ case 'mceClose':
261
+ t.close(null, id);
262
+ return Event.cancel(e);
263
+
264
+ case 'mceButton mceOk':
265
+ case 'mceButton mceCancel':
266
+ f.button_func(n.className == 'mceButton mceOk');
267
+ return Event.cancel(e);
268
+ }
269
+ }
270
+ });
271
+
272
+ // Make sure the tab order loops within the dialog.
273
+ Event.add([id + '_left', id + '_right'], 'focus', function(evt) {
274
+ var iframe = DOM.get(id + '_ifr');
275
+ if (iframe) {
276
+ var body = iframe.contentWindow.document.body;
277
+ var focusable = DOM.select(':input:enabled,*[tabindex=0]', body);
278
+ if (evt.target.id === (id + '_left')) {
279
+ focusable[focusable.length - 1].focus();
280
+ } else {
281
+ focusable[0].focus();
282
+ }
283
+ } else {
284
+ DOM.get(id + '_ok').focus();
285
+ }
286
+ });
287
+
288
+ // Add window
289
+ w = t.windows[id] = {
290
+ id : id,
291
+ mousedown_func : mdf,
292
+ click_func : clf,
293
+ element : new Element(id, {blocker : 1, container : ed.getContainer()}),
294
+ iframeElement : new Element(id + '_ifr'),
295
+ features : f,
296
+ deltaWidth : dw,
297
+ deltaHeight : dh
298
+ };
299
+
300
+ w.iframeElement.on('focus', function() {
301
+ t.focus(id);
302
+ });
303
+
304
+ // Setup blocker
305
+ if (t.count == 0 && t.editor.getParam('dialog_type', 'modal') == 'modal') {
306
+ DOM.add(DOM.doc.body, 'div', {
307
+ id : 'mceModalBlocker',
308
+ 'class' : (t.editor.settings.inlinepopups_skin || 'clearlooks2') + '_modalBlocker',
309
+ style : {zIndex : t.zIndex - 1}
310
+ });
311
+
312
+ DOM.show('mceModalBlocker'); // Reduces flicker in IE
313
+ DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'true');
314
+ } else
315
+ DOM.setStyle('mceModalBlocker', 'z-index', t.zIndex - 1);
316
+
317
+ if (tinymce.isIE6 || /Firefox\/2\./.test(navigator.userAgent) || (tinymce.isIE && !DOM.boxModel))
318
+ DOM.setStyles('mceModalBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2});
319
+
320
+ DOM.setAttrib(id, 'aria-hidden', 'false');
321
+ t.focus(id);
322
+ t._fixIELayout(id, 1);
323
+
324
+ // Focus ok button
325
+ if (DOM.get(id + '_ok'))
326
+ DOM.get(id + '_ok').focus();
327
+ t.count++;
328
+
329
+ return w;
330
+ },
331
+
332
+ focus : function(id) {
333
+ var t = this, w;
334
+
335
+ if (w = t.windows[id]) {
336
+ w.zIndex = this.zIndex++;
337
+ w.element.setStyle('zIndex', w.zIndex);
338
+ w.element.update();
339
+
340
+ id = id + '_wrapper';
341
+ DOM.removeClass(t.lastId, 'mceFocus');
342
+ DOM.addClass(id, 'mceFocus');
343
+ t.lastId = id;
344
+
345
+ if (w.focussedElement) {
346
+ w.focussedElement.focus();
347
+ } else if (DOM.get(id + '_ok')) {
348
+ DOM.get(w.id + '_ok').focus();
349
+ } else if (DOM.get(w.id + '_ifr')) {
350
+ DOM.get(w.id + '_ifr').focus();
351
+ }
352
+ }
353
+ },
354
+
355
+ _addAll : function(te, ne) {
356
+ var i, n, t = this, dom = tinymce.DOM;
357
+
358
+ if (is(ne, 'string'))
359
+ te.appendChild(dom.doc.createTextNode(ne));
360
+ else if (ne.length) {
361
+ te = te.appendChild(dom.create(ne[0], ne[1]));
362
+
363
+ for (i=2; i<ne.length; i++)
364
+ t._addAll(te, ne[i]);
365
+ }
366
+ },
367
+
368
+ _startDrag : function(id, se, ac) {
369
+ var t = this, mu, mm, d = DOM.doc, eb, w = t.windows[id], we = w.element, sp = we.getXY(), p, sz, ph, cp, vp, sx, sy, sex, sey, dx, dy, dw, dh;
370
+
371
+ // Get positons and sizes
372
+ // cp = DOM.getPos(t.editor.getContainer());
373
+ cp = {x : 0, y : 0};
374
+ vp = DOM.getViewPort();
375
+
376
+ // Reduce viewport size to avoid scrollbars while dragging
377
+ vp.w -= 2;
378
+ vp.h -= 2;
379
+
380
+ sex = se.screenX;
381
+ sey = se.screenY;
382
+ dx = dy = dw = dh = 0;
383
+
384
+ // Handle mouse up
385
+ mu = Event.add(d, 'mouseup', function(e) {
386
+ Event.remove(d, 'mouseup', mu);
387
+ Event.remove(d, 'mousemove', mm);
388
+
389
+ if (eb)
390
+ eb.remove();
391
+
392
+ we.moveBy(dx, dy);
393
+ we.resizeBy(dw, dh);
394
+ sz = we.getSize();
395
+ DOM.setStyles(id + '_ifr', {width : sz.w - w.deltaWidth, height : sz.h - w.deltaHeight});
396
+ t._fixIELayout(id, 1);
397
+
398
+ return Event.cancel(e);
399
+ });
400
+
401
+ if (ac != 'Move')
402
+ startMove();
403
+
404
+ function startMove() {
405
+ if (eb)
406
+ return;
407
+
408
+ t._fixIELayout(id, 0);
409
+
410
+ // Setup event blocker
411
+ DOM.add(d.body, 'div', {
412
+ id : 'mceEventBlocker',
413
+ 'class' : 'mceEventBlocker ' + (t.editor.settings.inlinepopups_skin || 'clearlooks2'),
414
+ style : {zIndex : t.zIndex + 1}
415
+ });
416
+
417
+ if (tinymce.isIE6 || (tinymce.isIE && !DOM.boxModel))
418
+ DOM.setStyles('mceEventBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2});
419
+
420
+ eb = new Element('mceEventBlocker');
421
+ eb.update();
422
+
423
+ // Setup placeholder
424
+ p = we.getXY();
425
+ sz = we.getSize();
426
+ sx = cp.x + p.x - vp.x;
427
+ sy = cp.y + p.y - vp.y;
428
+ DOM.add(eb.get(), 'div', {id : 'mcePlaceHolder', 'class' : 'mcePlaceHolder', style : {left : sx, top : sy, width : sz.w, height : sz.h}});
429
+ ph = new Element('mcePlaceHolder');
430
+ };
431
+
432
+ // Handle mouse move/drag
433
+ mm = Event.add(d, 'mousemove', function(e) {
434
+ var x, y, v;
435
+
436
+ startMove();
437
+
438
+ x = e.screenX - sex;
439
+ y = e.screenY - sey;
440
+
441
+ switch (ac) {
442
+ case 'ResizeW':
443
+ dx = x;
444
+ dw = 0 - x;
445
+ break;
446
+
447
+ case 'ResizeE':
448
+ dw = x;
449
+ break;
450
+
451
+ case 'ResizeN':
452
+ case 'ResizeNW':
453
+ case 'ResizeNE':
454
+ if (ac == "ResizeNW") {
455
+ dx = x;
456
+ dw = 0 - x;
457
+ } else if (ac == "ResizeNE")
458
+ dw = x;
459
+
460
+ dy = y;
461
+ dh = 0 - y;
462
+ break;
463
+
464
+ case 'ResizeS':
465
+ case 'ResizeSW':
466
+ case 'ResizeSE':
467
+ if (ac == "ResizeSW") {
468
+ dx = x;
469
+ dw = 0 - x;
470
+ } else if (ac == "ResizeSE")
471
+ dw = x;
472
+
473
+ dh = y;
474
+ break;
475
+
476
+ case 'mceMove':
477
+ dx = x;
478
+ dy = y;
479
+ break;
480
+ }
481
+
482
+ // Boundary check
483
+ if (dw < (v = w.features.min_width - sz.w)) {
484
+ if (dx !== 0)
485
+ dx += dw - v;
486
+
487
+ dw = v;
488
+ }
489
+
490
+ if (dh < (v = w.features.min_height - sz.h)) {
491
+ if (dy !== 0)
492
+ dy += dh - v;
493
+
494
+ dh = v;
495
+ }
496
+
497
+ dw = Math.min(dw, w.features.max_width - sz.w);
498
+ dh = Math.min(dh, w.features.max_height - sz.h);
499
+ dx = Math.max(dx, vp.x - (sx + vp.x));
500
+ dy = Math.max(dy, vp.y - (sy + vp.y));
501
+ dx = Math.min(dx, (vp.w + vp.x) - (sx + sz.w + vp.x));
502
+ dy = Math.min(dy, (vp.h + vp.y) - (sy + sz.h + vp.y));
503
+
504
+ // Move if needed
505
+ if (dx + dy !== 0) {
506
+ if (sx + dx < 0)
507
+ dx = 0;
508
+
509
+ if (sy + dy < 0)
510
+ dy = 0;
511
+
512
+ ph.moveTo(sx + dx, sy + dy);
513
+ }
514
+
515
+ // Resize if needed
516
+ if (dw + dh !== 0)
517
+ ph.resizeTo(sz.w + dw, sz.h + dh);
518
+
519
+ return Event.cancel(e);
520
+ });
521
+
522
+ return Event.cancel(se);
523
+ },
524
+
525
+ resizeBy : function(dw, dh, id) {
526
+ var w = this.windows[id];
527
+
528
+ if (w) {
529
+ w.element.resizeBy(dw, dh);
530
+ w.iframeElement.resizeBy(dw, dh);
531
+ }
532
+ },
533
+
534
+ close : function(win, id) {
535
+ var t = this, w, d = DOM.doc, fw, id;
536
+
537
+ id = t._findId(id || win);
538
+
539
+ // Probably not inline
540
+ if (!t.windows[id]) {
541
+ t.parent(win);
542
+ return;
543
+ }
544
+
545
+ t.count--;
546
+
547
+ if (t.count == 0) {
548
+ DOM.remove('mceModalBlocker');
549
+ DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'false');
550
+ t.editor.focus();
551
+ }
552
+
553
+ if (w = t.windows[id]) {
554
+ t.onClose.dispatch(t);
555
+ Event.remove(d, 'mousedown', w.mousedownFunc);
556
+ Event.remove(d, 'click', w.clickFunc);
557
+ Event.clear(id);
558
+ Event.clear(id + '_ifr');
559
+
560
+ DOM.setAttrib(id + '_ifr', 'src', 'javascript:""'); // Prevent leak
561
+ w.element.remove();
562
+ delete t.windows[id];
563
+
564
+ fw = t._frontWindow();
565
+
566
+ if (fw)
567
+ t.focus(fw.id);
568
+ }
569
+ },
570
+
571
+ // Find front most window
572
+ _frontWindow : function() {
573
+ var fw, ix = 0;
574
+ // Find front most window and focus that
575
+ each (this.windows, function(w) {
576
+ if (w.zIndex > ix) {
577
+ fw = w;
578
+ ix = w.zIndex;
579
+ }
580
+ });
581
+ return fw;
582
+ },
583
+
584
+ setTitle : function(w, ti) {
585
+ var e;
586
+
587
+ w = this._findId(w);
588
+
589
+ if (e = DOM.get(w + '_title'))
590
+ e.innerHTML = DOM.encode(ti);
591
+ },
592
+
593
+ alert : function(txt, cb, s) {
594
+ var t = this, w;
595
+
596
+ w = t.open({
597
+ title : t,
598
+ type : 'alert',
599
+ button_func : function(s) {
600
+ if (cb)
601
+ cb.call(s || t, s);
602
+
603
+ t.close(null, w.id);
604
+ },
605
+ content : DOM.encode(t.editor.getLang(txt, txt)),
606
+ inline : 1,
607
+ width : 400,
608
+ height : 130
609
+ });
610
+ },
611
+
612
+ confirm : function(txt, cb, s) {
613
+ var t = this, w;
614
+
615
+ w = t.open({
616
+ title : t,
617
+ type : 'confirm',
618
+ button_func : function(s) {
619
+ if (cb)
620
+ cb.call(s || t, s);
621
+
622
+ t.close(null, w.id);
623
+ },
624
+ content : DOM.encode(t.editor.getLang(txt, txt)),
625
+ inline : 1,
626
+ width : 400,
627
+ height : 130
628
+ });
629
+ },
630
+
631
+ // Internal functions
632
+
633
+ _findId : function(w) {
634
+ var t = this;
635
+
636
+ if (typeof(w) == 'string')
637
+ return w;
638
+
639
+ each(t.windows, function(wo) {
640
+ var ifr = DOM.get(wo.id + '_ifr');
641
+
642
+ if (ifr && w == ifr.contentWindow) {
643
+ w = wo.id;
644
+ return false;
645
+ }
646
+ });
647
+
648
+ return w;
649
+ },
650
+
651
+ _fixIELayout : function(id, s) {
652
+ var w, img;
653
+
654
+ if (!tinymce.isIE6)
655
+ return;
656
+
657
+ // Fixes the bug where hover flickers and does odd things in IE6
658
+ each(['n','s','w','e','nw','ne','sw','se'], function(v) {
659
+ var e = DOM.get(id + '_resize_' + v);
660
+
661
+ DOM.setStyles(e, {
662
+ width : s ? e.clientWidth : '',
663
+ height : s ? e.clientHeight : '',
664
+ cursor : DOM.getStyle(e, 'cursor', 1)
665
+ });
666
+
667
+ DOM.setStyle(id + "_bottom", 'bottom', '-1px');
668
+
669
+ e = 0;
670
+ });
671
+
672
+ // Fixes graphics glitch
673
+ if (w = this.windows[id]) {
674
+ // Fixes rendering bug after resize
675
+ w.element.hide();
676
+ w.element.show();
677
+
678
+ // Forced a repaint of the window
679
+ //DOM.get(id).style.filter = '';
680
+
681
+ // IE has a bug where images used in CSS won't get loaded
682
+ // sometimes when the cache in the browser is disabled
683
+ // This fix tries to solve it by loading the images using the image object
684
+ each(DOM.select('div,a', id), function(e, i) {
685
+ if (e.currentStyle.backgroundImage != 'none') {
686
+ img = new Image();
687
+ img.src = e.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/, '$1');
688
+ }
689
+ });
690
+
691
+ DOM.get(id).style.filter = '';
692
+ }
693
+ }
694
+ });
695
+
696
+ // Register plugin
697
+ tinymce.PluginManager.add('inlinepopups', tinymce.plugins.InlinePopups);
698
+ })();
699
+