locomotive_cms 0.0.3.3 → 0.0.4.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (839) hide show
  1. data/Gemfile +47 -33
  2. data/README.textile +11 -5
  3. data/app/controllers/admin/accounts_controller.rb +6 -6
  4. data/app/controllers/admin/api_contents_controller.rb +9 -9
  5. data/app/controllers/admin/asset_collections_controller.rb +9 -9
  6. data/app/controllers/admin/assets_controller.rb +13 -13
  7. data/app/controllers/admin/base_controller.rb +21 -21
  8. data/app/controllers/admin/content_types_controller.rb +7 -3
  9. data/app/controllers/admin/contents_controller.rb +16 -16
  10. data/app/controllers/admin/cross_domain_sessions_controller.rb +34 -0
  11. data/app/controllers/admin/current_sites_controller.rb +9 -9
  12. data/app/controllers/admin/custom_fields_controller.rb +11 -11
  13. data/app/controllers/admin/images_controller.rb +51 -0
  14. data/app/controllers/admin/imports_controller.rb +51 -0
  15. data/app/controllers/admin/memberships_controller.rb +4 -4
  16. data/app/controllers/admin/my_accounts_controller.rb +9 -9
  17. data/app/controllers/admin/pages_controller.rb +23 -12
  18. data/app/controllers/admin/passwords_controller.rb +6 -6
  19. data/app/controllers/admin/rendering_controller.rb +6 -6
  20. data/app/controllers/admin/sessions_controller.rb +8 -8
  21. data/app/controllers/admin/sitemaps_controller.rb +6 -6
  22. data/app/controllers/admin/sites_controller.rb +9 -9
  23. data/app/controllers/admin/snippets_controller.rb +10 -8
  24. data/app/controllers/admin/theme_assets_controller.rb +28 -17
  25. data/app/controllers/application_controller.rb +9 -1
  26. data/app/controllers/home_controller.rb +4 -4
  27. data/app/helpers/admin/accounts_helper.rb +3 -3
  28. data/app/helpers/admin/assets_helper.rb +11 -5
  29. data/app/helpers/admin/base_helper.rb +9 -9
  30. data/app/helpers/admin/custom_fields_helper.rb +11 -11
  31. data/app/helpers/admin/login_helper.rb +7 -7
  32. data/app/helpers/admin/pages_helper.rb +22 -18
  33. data/app/helpers/admin/sites_helper.rb +5 -5
  34. data/app/models/account.rb +33 -16
  35. data/app/models/asset.rb +19 -15
  36. data/app/models/asset_collection.rb +29 -20
  37. data/app/models/content_instance.rb +34 -17
  38. data/app/models/content_type.rb +29 -22
  39. data/app/models/editable_element.rb +21 -0
  40. data/app/models/editable_file.rb +9 -0
  41. data/app/models/editable_long_text.rb +3 -0
  42. data/app/models/editable_short_text.rb +12 -0
  43. data/app/models/extensions/asset/vignette.rb +13 -11
  44. data/app/models/extensions/page/editable_elements.rb +111 -0
  45. data/app/models/extensions/page/parse.rb +107 -0
  46. data/app/models/extensions/page/render.rb +8 -14
  47. data/app/models/extensions/page/templatized.rb +16 -16
  48. data/app/models/extensions/page/tree.rb +33 -24
  49. data/app/models/membership.rb +12 -12
  50. data/app/models/page.rb +41 -39
  51. data/app/models/site.rb +46 -41
  52. data/app/models/snippet.rb +63 -2
  53. data/app/models/theme_asset.rb +103 -59
  54. data/app/uploaders/asset_uploader.rb +19 -18
  55. data/app/uploaders/editable_file_uploader.rb +11 -0
  56. data/app/uploaders/theme_asset_uploader.rb +11 -22
  57. data/app/views/admin/accounts/new.html.haml +4 -4
  58. data/app/views/admin/asset_collections/edit.html.haml +10 -10
  59. data/app/views/admin/asset_collections/index.html.haml +2 -2
  60. data/app/views/admin/asset_collections/new.html.haml +2 -2
  61. data/app/views/admin/assets/edit.html.haml +1 -1
  62. data/app/views/admin/assets/new.html.haml +2 -2
  63. data/app/views/admin/content_types/_form.html.haml +4 -4
  64. data/app/views/admin/content_types/edit.html.haml +3 -3
  65. data/app/views/admin/content_types/new.html.haml +2 -2
  66. data/app/views/admin/contents/_form.html.haml +1 -1
  67. data/app/views/admin/contents/_list.html.haml +3 -3
  68. data/app/views/admin/contents/edit.html.haml +1 -1
  69. data/app/views/admin/contents/index.html.haml +6 -6
  70. data/app/views/admin/contents/new.html.haml +3 -3
  71. data/app/views/admin/cross_domain_sessions/new.html.haml +14 -0
  72. data/app/views/admin/current_sites/_form.html.haml +9 -9
  73. data/app/views/admin/current_sites/edit.html.haml +3 -2
  74. data/app/views/admin/custom_fields/_custom_form.html.haml +4 -4
  75. data/app/views/admin/custom_fields/_edit_field.html.haml +2 -2
  76. data/app/views/admin/custom_fields/_index.html.haml +24 -24
  77. data/app/views/admin/custom_fields/edit_category.html.haml +16 -16
  78. data/app/views/admin/errors/404.html.haml +7 -0
  79. data/app/views/admin/errors/500.html.haml +7 -0
  80. data/app/views/admin/imports/new.html.haml +21 -0
  81. data/app/views/admin/imports/show.html.haml +19 -0
  82. data/app/views/admin/mailer/confirmation_instructions.html.haml +2 -2
  83. data/app/views/admin/mailer/reset_password_instructions.html.haml +4 -4
  84. data/app/views/admin/mailer/unlock_instructions.html.haml +3 -3
  85. data/app/views/admin/memberships/new.html.haml +3 -3
  86. data/app/views/admin/my_accounts/edit.html.haml +11 -10
  87. data/app/views/admin/pages/_editable_elements.html.haml +35 -0
  88. data/app/views/admin/pages/_form.html.haml +21 -26
  89. data/app/views/admin/pages/_page.html.haml +5 -5
  90. data/app/views/admin/pages/edit.html.haml +3 -3
  91. data/app/views/admin/pages/index.html.haml +2 -2
  92. data/app/views/admin/pages/new.html.haml +2 -2
  93. data/app/views/admin/passwords/edit.html.haml +4 -4
  94. data/app/views/admin/passwords/new.html.haml +6 -6
  95. data/app/views/admin/sessions/new.html.haml +2 -2
  96. data/app/views/admin/shared/_footer.html.haml +1 -1
  97. data/app/views/admin/shared/_form_actions.html.haml +2 -2
  98. data/app/views/admin/shared/_head.html.haml +3 -3
  99. data/app/views/admin/shared/_header.html.haml +9 -2
  100. data/app/views/admin/shared/menu/_contents.html.haml +3 -3
  101. data/app/views/admin/shared/menu/_settings.html.haml +1 -2
  102. data/app/views/admin/sitemaps/show.xml.builder +13 -3
  103. data/app/views/admin/sites/_form.html.haml +5 -5
  104. data/app/views/admin/sites/new.html.haml +2 -2
  105. data/app/views/admin/snippets/_form.html.haml +6 -3
  106. data/app/views/admin/snippets/_snippet.html.haml +3 -2
  107. data/app/views/admin/snippets/edit.html.haml +2 -2
  108. data/app/views/admin/snippets/index.html.haml +2 -2
  109. data/app/views/admin/snippets/new.html.haml +3 -3
  110. data/app/views/admin/theme_assets/_asset.html.haml +11 -10
  111. data/app/views/admin/theme_assets/_form.html.haml +19 -21
  112. data/app/views/admin/theme_assets/edit.html.haml +1 -1
  113. data/app/views/admin/theme_assets/images.html.haml +11 -11
  114. data/app/views/admin/theme_assets/index.html.haml +34 -19
  115. data/app/views/admin/theme_assets/new.html.haml +2 -2
  116. data/app/views/home/show.html.haml +2 -2
  117. data/app/views/layouts/admin/application.html.haml +6 -6
  118. data/app/views/layouts/admin/{login.html.haml → box.html.haml} +5 -3
  119. data/app/views/layouts/application.html.haml +1 -1
  120. data/config/application.rb +3 -1
  121. data/config/cucumber.yml +2 -8
  122. data/config/environments/development.rb +4 -3
  123. data/config/environments/production.rb +16 -1
  124. data/config/environments/test.rb +7 -1
  125. data/config/initializers/devise.rb +3 -9
  126. data/config/initializers/formtastic.rb +2 -2
  127. data/config/initializers/haml.rb +1 -0
  128. data/config/initializers/inflections.rb +6 -1
  129. data/config/initializers/locomotive.rb +8 -9
  130. data/config/initializers/rspec_generator.rb +1 -1
  131. data/config/initializers/secret_token.rb +1 -1
  132. data/config/locales/admin_ui_en.yml +93 -56
  133. data/config/locales/admin_ui_fr.yml +82 -68
  134. data/config/locales/default_en.yml +8 -10
  135. data/config/locales/default_fr.yml +32 -37
  136. data/config/locales/flash.en.yml +20 -21
  137. data/config/locales/flash.fr.yml +20 -21
  138. data/config/routes.rb +33 -27
  139. data/lib/generators/locomotive/copy_assets/copy_assets_generator.rb +5 -5
  140. data/lib/generators/locomotive/install/install_generator.rb +3 -3
  141. data/lib/generators/locomotive/install/templates/locomotive.rb +8 -8
  142. data/lib/locomotive/admin_responder.rb +5 -5
  143. data/lib/locomotive/carrierwave/base.rb +3 -3
  144. data/lib/locomotive/carrierwave/patches.rb +17 -13
  145. data/lib/locomotive/carrierwave.rb +5 -1
  146. data/lib/locomotive/configuration.rb +8 -8
  147. data/lib/{core_ext.rb → locomotive/core_ext.rb} +15 -11
  148. data/lib/locomotive/custom_fields.rb +6 -5
  149. data/lib/locomotive/delayed_job.rb +47 -0
  150. data/lib/locomotive/engine.rb +13 -4
  151. data/lib/locomotive/heroku/custom_domain.rb +14 -14
  152. data/lib/locomotive/heroku.rb +18 -16
  153. data/lib/locomotive/httparty/patches.rb +4 -4
  154. data/lib/locomotive/httparty/webservice.rb +4 -4
  155. data/lib/locomotive/httparty.rb +1 -1
  156. data/lib/locomotive/import/asset_collections.rb +53 -0
  157. data/lib/locomotive/import/assets.rb +74 -0
  158. data/lib/locomotive/import/content_types.rb +84 -0
  159. data/lib/locomotive/import/job.rb +73 -0
  160. data/lib/locomotive/import/pages.rb +114 -0
  161. data/lib/locomotive/import/site.rb +17 -0
  162. data/lib/locomotive/import/snippets.rb +23 -0
  163. data/lib/locomotive/import.rb +7 -0
  164. data/lib/locomotive/inherited_resources.rb +5 -4
  165. data/lib/locomotive/liquid/drops/asset.rb +21 -0
  166. data/lib/locomotive/liquid/drops/asset_collections.rb +47 -12
  167. data/lib/locomotive/liquid/drops/base.rb +12 -12
  168. data/lib/locomotive/liquid/drops/content.rb +10 -10
  169. data/lib/locomotive/liquid/drops/contents.rb +15 -20
  170. data/lib/locomotive/liquid/drops/page.rb +9 -11
  171. data/lib/locomotive/liquid/drops/site.rb +15 -0
  172. data/lib/locomotive/liquid/errors.rb +5 -0
  173. data/lib/locomotive/liquid/filters/date.rb +14 -14
  174. data/lib/locomotive/liquid/filters/html.rb +65 -24
  175. data/lib/locomotive/liquid/filters/misc.rb +11 -11
  176. data/lib/locomotive/liquid/filters/text.rb +7 -7
  177. data/lib/locomotive/liquid/tags/blueprint.rb +13 -13
  178. data/lib/locomotive/liquid/tags/consume.rb +23 -13
  179. data/lib/locomotive/liquid/tags/editable/base.rb +60 -0
  180. data/lib/locomotive/liquid/tags/editable/file.rb +23 -0
  181. data/lib/locomotive/liquid/tags/editable/long_text.rb +31 -0
  182. data/lib/locomotive/liquid/tags/editable/short_text.rb +31 -0
  183. data/lib/locomotive/liquid/tags/editable.rb +4 -0
  184. data/lib/locomotive/liquid/tags/extends.rb +42 -0
  185. data/lib/locomotive/liquid/tags/google_analytics.rb +39 -0
  186. data/lib/locomotive/liquid/tags/inherited_block.rb +31 -0
  187. data/lib/locomotive/liquid/tags/inline_editor.rb +52 -0
  188. data/lib/locomotive/liquid/tags/jquery.rb +8 -8
  189. data/lib/locomotive/liquid/tags/nav.rb +17 -17
  190. data/lib/locomotive/liquid/tags/paginate.rb +23 -23
  191. data/lib/locomotive/liquid/tags/snippet.rb +39 -14
  192. data/lib/locomotive/liquid/tags/with_scope.rb +11 -11
  193. data/lib/locomotive/liquid.rb +3 -3
  194. data/lib/locomotive/logger.rb +4 -4
  195. data/lib/locomotive/middlewares/fonts.rb +44 -0
  196. data/lib/locomotive/middlewares.rb +1 -0
  197. data/lib/locomotive/misc_form_builder.rb +47 -0
  198. data/lib/locomotive/mongoid/document.rb +7 -8
  199. data/lib/locomotive/mongoid/model_extensions.rb +1 -1
  200. data/lib/locomotive/mongoid/patches.rb +79 -51
  201. data/lib/locomotive/mongoid.rb +1 -1
  202. data/lib/locomotive/railties/tasks.rake +16 -0
  203. data/lib/locomotive/regexps.rb +4 -8
  204. data/lib/locomotive/render.rb +46 -36
  205. data/lib/locomotive/routing/default_constraint.rb +12 -13
  206. data/lib/locomotive/routing/site_dispatcher.rb +20 -18
  207. data/lib/locomotive/routing.rb +2 -0
  208. data/lib/locomotive/session_store.rb +57 -0
  209. data/lib/locomotive/version.rb +3 -0
  210. data/lib/locomotive.rb +22 -14
  211. data/lib/tasks/cucumber.rake +2 -2
  212. data/lib/tasks/rspec.rake +1 -1
  213. data/public/images/admin/{login → box}/bottom_panel_bg.png +0 -0
  214. data/public/images/admin/{login → box}/buttons/left_bg.png +0 -0
  215. data/public/images/admin/{login → box}/buttons/right_bg.png +0 -0
  216. data/public/images/admin/{login → box}/content_panel_bg.png +0 -0
  217. data/public/images/admin/{login → box}/input_bg.png +0 -0
  218. data/public/images/admin/{login → box}/light_bg.png +0 -0
  219. data/public/images/admin/{login → box}/top_panel_bg.png +0 -0
  220. data/public/images/admin/{login → box}/wrapper_bg.png +0 -0
  221. data/public/images/admin/buttons/dark-gray-bg.png +0 -0
  222. data/public/images/admin/form/spinner.gif +0 -0
  223. data/public/images/admin/inline_editor/action-left.png +0 -0
  224. data/public/images/admin/inline_editor/action-right.png +0 -0
  225. data/public/images/admin/inline_editor/bg.png +0 -0
  226. data/public/images/admin/inline_editor/drawer.png +0 -0
  227. data/public/images/admin/list/icons/states.png +0 -0
  228. data/public/images/admin/plugins/selectmenu/arrow.png +0 -0
  229. data/public/images/admin/plugins/selectmenu/background.png +0 -0
  230. data/public/javascripts/admin/account.js +4 -4
  231. data/public/javascripts/admin/aloha/VERSION.txt +2 -0
  232. data/public/javascripts/admin/aloha/aloha-nodeps.js +153 -0
  233. data/public/javascripts/admin/aloha/aloha.js +246 -0
  234. data/public/javascripts/admin/aloha/css/aloha.css +408 -0
  235. data/{vendor/plugins/custom_fields/MIT-LICENSE → public/javascripts/admin/aloha/deps/MIT-LICENSE.txt} +4 -4
  236. data/public/javascripts/admin/aloha/deps/extjs/resources/charts.swf +0 -0
  237. data/public/javascripts/admin/aloha/deps/extjs/resources/css/ext-all.css +6795 -0
  238. data/public/javascripts/admin/aloha/deps/extjs/resources/css/xtheme-gray.css +1654 -0
  239. data/public/javascripts/admin/aloha/deps/extjs/resources/expressinstall.swf +0 -0
  240. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/box/corners-blue.gif +0 -0
  241. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/box/corners.gif +0 -0
  242. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/box/l-blue.gif +0 -0
  243. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/box/l.gif +0 -0
  244. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/box/r-blue.gif +0 -0
  245. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/box/r.gif +0 -0
  246. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/box/tb-blue.gif +0 -0
  247. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/box/tb.gif +0 -0
  248. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/button/arrow.gif +0 -0
  249. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/button/btn.gif +0 -0
  250. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/button/group-cs.gif +0 -0
  251. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/button/group-lr.gif +0 -0
  252. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/button/group-tb.gif +0 -0
  253. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/button/s-arrow-b-noline.gif +0 -0
  254. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/button/s-arrow-b.gif +0 -0
  255. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/button/s-arrow-bo.gif +0 -0
  256. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/button/s-arrow-noline.gif +0 -0
  257. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/button/s-arrow-o.gif +0 -0
  258. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/button/s-arrow.gif +0 -0
  259. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/dd/drop-add.gif +0 -0
  260. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/dd/drop-no.gif +0 -0
  261. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/dd/drop-yes.gif +0 -0
  262. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/editor/tb-sprite.gif +0 -0
  263. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/form/checkbox.gif +0 -0
  264. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/form/clear-trigger.gif +0 -0
  265. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/form/clear-trigger.psd +0 -0
  266. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/form/date-trigger.gif +0 -0
  267. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/form/date-trigger.psd +0 -0
  268. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/form/error-tip-corners.gif +0 -0
  269. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/form/exclamation.gif +0 -0
  270. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/form/radio.gif +0 -0
  271. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/form/search-trigger.gif +0 -0
  272. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/form/search-trigger.psd +0 -0
  273. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/form/text-bg.gif +0 -0
  274. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/form/trigger-square.gif +0 -0
  275. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/form/trigger-square.psd +0 -0
  276. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/form/trigger-tpl.gif +0 -0
  277. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/form/trigger.gif +0 -0
  278. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/form/trigger.psd +0 -0
  279. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/gradient-bg.gif +0 -0
  280. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/arrow-left-white.gif +0 -0
  281. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/arrow-right-white.gif +0 -0
  282. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/col-move-bottom.gif +0 -0
  283. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/col-move-top.gif +0 -0
  284. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/columns.gif +0 -0
  285. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/dirty.gif +0 -0
  286. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/done.gif +0 -0
  287. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/drop-no.gif +0 -0
  288. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/drop-yes.gif +0 -0
  289. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/footer-bg.gif +0 -0
  290. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/grid-blue-hd.gif +0 -0
  291. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/grid-blue-split.gif +0 -0
  292. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/grid-hrow.gif +0 -0
  293. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/grid-loading.gif +0 -0
  294. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/grid-split.gif +0 -0
  295. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/grid-vista-hd.gif +0 -0
  296. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/grid3-hd-btn.gif +0 -0
  297. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/grid3-hrow-over.gif +0 -0
  298. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/grid3-hrow.gif +0 -0
  299. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/grid3-special-col-bg.gif +0 -0
  300. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/grid3-special-col-sel-bg.gif +0 -0
  301. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/group-by.gif +0 -0
  302. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/group-collapse.gif +0 -0
  303. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/group-expand-sprite.gif +0 -0
  304. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/group-expand.gif +0 -0
  305. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/hd-pop.gif +0 -0
  306. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/hmenu-asc.gif +0 -0
  307. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/hmenu-desc.gif +0 -0
  308. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/hmenu-lock.gif +0 -0
  309. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/hmenu-lock.png +0 -0
  310. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/hmenu-unlock.gif +0 -0
  311. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/hmenu-unlock.png +0 -0
  312. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/invalid_line.gif +0 -0
  313. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/loading.gif +0 -0
  314. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/mso-hd.gif +0 -0
  315. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/nowait.gif +0 -0
  316. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/page-first-disabled.gif +0 -0
  317. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/page-first.gif +0 -0
  318. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/page-last-disabled.gif +0 -0
  319. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/page-last.gif +0 -0
  320. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/page-next-disabled.gif +0 -0
  321. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/page-next.gif +0 -0
  322. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/page-prev-disabled.gif +0 -0
  323. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/page-prev.gif +0 -0
  324. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/pick-button.gif +0 -0
  325. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/refresh.gif +0 -0
  326. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/row-check-sprite.gif +0 -0
  327. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/row-expand-sprite.gif +0 -0
  328. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/row-over.gif +0 -0
  329. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/row-sel.gif +0 -0
  330. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/sort-hd.gif +0 -0
  331. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/sort_asc.gif +0 -0
  332. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/sort_desc.gif +0 -0
  333. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/grid/wait.gif +0 -0
  334. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/layout/collapse.gif +0 -0
  335. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/layout/expand.gif +0 -0
  336. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/layout/gradient-bg.gif +0 -0
  337. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/layout/mini-bottom.gif +0 -0
  338. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/layout/mini-left.gif +0 -0
  339. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/layout/mini-right.gif +0 -0
  340. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/layout/mini-top.gif +0 -0
  341. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/layout/ns-collapse.gif +0 -0
  342. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/layout/ns-expand.gif +0 -0
  343. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/layout/panel-close.gif +0 -0
  344. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/layout/panel-title-bg.gif +0 -0
  345. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/layout/panel-title-light-bg.gif +0 -0
  346. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/layout/stick.gif +0 -0
  347. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/layout/stuck.gif +0 -0
  348. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/layout/tab-close-on.gif +0 -0
  349. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/layout/tab-close.gif +0 -0
  350. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/menu/checked.gif +0 -0
  351. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/menu/group-checked.gif +0 -0
  352. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/menu/item-over.gif +0 -0
  353. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/menu/menu-parent.gif +0 -0
  354. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/menu/menu.gif +0 -0
  355. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/menu/unchecked.gif +0 -0
  356. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/panel/corners-sprite.gif +0 -0
  357. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/panel/left-right.gif +0 -0
  358. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/panel/light-hd.gif +0 -0
  359. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/panel/tool-sprite-tpl.gif +0 -0
  360. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/panel/tool-sprites.gif +0 -0
  361. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/panel/tools-sprites-trans.gif +0 -0
  362. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/panel/top-bottom.gif +0 -0
  363. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/panel/top-bottom.png +0 -0
  364. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/panel/white-corners-sprite.gif +0 -0
  365. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/panel/white-left-right.gif +0 -0
  366. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/panel/white-top-bottom.gif +0 -0
  367. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/progress/progress-bg.gif +0 -0
  368. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/qtip/bg.gif +0 -0
  369. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/qtip/close.gif +0 -0
  370. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/qtip/tip-anchor-sprite.gif +0 -0
  371. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/qtip/tip-sprite.gif +0 -0
  372. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/s.gif +0 -0
  373. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/shadow-c.png +0 -0
  374. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/shadow-lr.png +0 -0
  375. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/shadow.png +0 -0
  376. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/shared/blue-loading.gif +0 -0
  377. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/shared/calendar.gif +0 -0
  378. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/shared/glass-bg.gif +0 -0
  379. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/shared/hd-sprite.gif +0 -0
  380. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/shared/large-loading.gif +0 -0
  381. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/shared/left-btn.gif +0 -0
  382. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/shared/loading-balls.gif +0 -0
  383. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/shared/right-btn.gif +0 -0
  384. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/shared/warning.gif +0 -0
  385. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/sizer/e-handle-dark.gif +0 -0
  386. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/sizer/e-handle.gif +0 -0
  387. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/sizer/ne-handle-dark.gif +0 -0
  388. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/sizer/ne-handle.gif +0 -0
  389. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/sizer/nw-handle-dark.gif +0 -0
  390. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/sizer/nw-handle.gif +0 -0
  391. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/sizer/s-handle-dark.gif +0 -0
  392. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/sizer/s-handle.gif +0 -0
  393. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/sizer/se-handle-dark.gif +0 -0
  394. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/sizer/se-handle.gif +0 -0
  395. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/sizer/square.gif +0 -0
  396. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/sizer/sw-handle-dark.gif +0 -0
  397. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/sizer/sw-handle.gif +0 -0
  398. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/slider/slider-bg.png +0 -0
  399. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/slider/slider-thumb.png +0 -0
  400. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/slider/slider-v-bg.png +0 -0
  401. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/slider/slider-v-thumb.png +0 -0
  402. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tabs/scroll-left.gif +0 -0
  403. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tabs/scroll-right.gif +0 -0
  404. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tabs/scroller-bg.gif +0 -0
  405. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tabs/tab-btm-inactive-left-bg.gif +0 -0
  406. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tabs/tab-btm-inactive-right-bg.gif +0 -0
  407. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tabs/tab-btm-left-bg.gif +0 -0
  408. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tabs/tab-btm-over-left-bg.gif +0 -0
  409. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tabs/tab-btm-over-right-bg.gif +0 -0
  410. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tabs/tab-btm-right-bg.gif +0 -0
  411. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tabs/tab-close.gif +0 -0
  412. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tabs/tab-strip-bg.gif +0 -0
  413. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tabs/tab-strip-bg.png +0 -0
  414. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tabs/tab-strip-btm-bg.gif +0 -0
  415. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tabs/tabs-sprite.gif +0 -0
  416. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/toolbar/bg.gif +0 -0
  417. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/toolbar/btn-arrow-light.gif +0 -0
  418. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/toolbar/btn-arrow.gif +0 -0
  419. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/toolbar/btn-over-bg.gif +0 -0
  420. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/toolbar/gray-bg.gif +0 -0
  421. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/toolbar/more.gif +0 -0
  422. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/toolbar/tb-bg.gif +0 -0
  423. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/toolbar/tb-btn-sprite.gif +0 -0
  424. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/toolbar/tb-xl-btn-sprite.gif +0 -0
  425. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/toolbar/tb-xl-sep.gif +0 -0
  426. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tree/arrows.gif +0 -0
  427. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tree/drop-add.gif +0 -0
  428. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tree/drop-between.gif +0 -0
  429. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tree/drop-no.gif +0 -0
  430. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tree/drop-over.gif +0 -0
  431. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tree/drop-under.gif +0 -0
  432. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tree/drop-yes.gif +0 -0
  433. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tree/elbow-end-minus-nl.gif +0 -0
  434. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tree/elbow-end-minus.gif +0 -0
  435. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tree/elbow-end-plus-nl.gif +0 -0
  436. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tree/elbow-end-plus.gif +0 -0
  437. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tree/elbow-end.gif +0 -0
  438. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tree/elbow-line.gif +0 -0
  439. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tree/elbow-minus-nl.gif +0 -0
  440. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tree/elbow-minus.gif +0 -0
  441. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tree/elbow-plus-nl.gif +0 -0
  442. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tree/elbow-plus.gif +0 -0
  443. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tree/elbow.gif +0 -0
  444. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tree/folder-open.gif +0 -0
  445. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tree/folder.gif +0 -0
  446. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tree/leaf.gif +0 -0
  447. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tree/loading.gif +0 -0
  448. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/tree/s.gif +0 -0
  449. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/window/icon-error.gif +0 -0
  450. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/window/icon-info.gif +0 -0
  451. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/window/icon-question.gif +0 -0
  452. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/window/icon-warning.gif +0 -0
  453. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/window/left-corners.png +0 -0
  454. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/window/left-corners.psd +0 -0
  455. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/window/left-right.png +0 -0
  456. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/window/left-right.psd +0 -0
  457. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/window/right-corners.png +0 -0
  458. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/window/right-corners.psd +0 -0
  459. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/window/top-bottom.png +0 -0
  460. data/public/javascripts/admin/aloha/deps/extjs/resources/images/default/window/top-bottom.psd +0 -0
  461. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/button/btn-arrow.gif +0 -0
  462. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/button/btn-sprite.gif +0 -0
  463. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/button/btn.gif +0 -0
  464. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/button/group-cs.gif +0 -0
  465. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/button/group-lr.gif +0 -0
  466. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/button/group-tb.gif +0 -0
  467. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/button/s-arrow-bo.gif +0 -0
  468. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/button/s-arrow-o.gif +0 -0
  469. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/form/clear-trigger.gif +0 -0
  470. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/form/date-trigger.gif +0 -0
  471. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/form/search-trigger.gif +0 -0
  472. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/form/trigger-square.gif +0 -0
  473. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/form/trigger.gif +0 -0
  474. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/gradient-bg.gif +0 -0
  475. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/grid/col-move-bottom.gif +0 -0
  476. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/grid/col-move-top.gif +0 -0
  477. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/grid/grid3-hd-btn.gif +0 -0
  478. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/grid/grid3-hrow-over.gif +0 -0
  479. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/grid/grid3-hrow-over2.gif +0 -0
  480. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/grid/grid3-hrow.gif +0 -0
  481. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/grid/grid3-hrow2.gif +0 -0
  482. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/grid/grid3-special-col-bg.gif +0 -0
  483. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/grid/grid3-special-col-bg2.gif +0 -0
  484. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/grid/grid3-special-col-sel-bg.gif +0 -0
  485. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/grid/group-collapse.gif +0 -0
  486. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/grid/group-expand-sprite.gif +0 -0
  487. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/grid/group-expand.gif +0 -0
  488. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/grid/page-first.gif +0 -0
  489. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/grid/page-last.gif +0 -0
  490. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/grid/page-next.gif +0 -0
  491. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/grid/page-prev.gif +0 -0
  492. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/grid/refresh.gif +0 -0
  493. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/grid/row-expand-sprite.gif +0 -0
  494. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/grid/sort_asc.gif +0 -0
  495. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/grid/sort_desc.gif +0 -0
  496. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/menu/group-checked.gif +0 -0
  497. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/menu/item-over-disabled.gif +0 -0
  498. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/menu/item-over.gif +0 -0
  499. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/menu/menu-parent.gif +0 -0
  500. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/panel/corners-sprite.gif +0 -0
  501. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/panel/left-right.gif +0 -0
  502. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/panel/light-hd.gif +0 -0
  503. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/panel/tool-sprite-tpl.gif +0 -0
  504. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/panel/tool-sprites.gif +0 -0
  505. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/panel/tools-sprites-trans.gif +0 -0
  506. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/panel/top-bottom.gif +0 -0
  507. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/panel/top-bottom.png +0 -0
  508. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/panel/white-corners-sprite.gif +0 -0
  509. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/panel/white-left-right.gif +0 -0
  510. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/panel/white-top-bottom.gif +0 -0
  511. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/progress/progress-bg.gif +0 -0
  512. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/qtip/bg.gif +0 -0
  513. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/qtip/close.gif +0 -0
  514. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/qtip/tip-anchor-sprite.gif +0 -0
  515. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/qtip/tip-sprite.gif +0 -0
  516. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/s.gif +0 -0
  517. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/shared/hd-sprite.gif +0 -0
  518. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/shared/left-btn.gif +0 -0
  519. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/shared/right-btn.gif +0 -0
  520. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/sizer/e-handle.gif +0 -0
  521. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/sizer/ne-handle.gif +0 -0
  522. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/sizer/nw-handle.gif +0 -0
  523. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/sizer/s-handle.gif +0 -0
  524. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/sizer/se-handle.gif +0 -0
  525. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/sizer/square.gif +0 -0
  526. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/sizer/sw-handle.gif +0 -0
  527. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/slider/slider-thumb.png +0 -0
  528. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/slider/slider-v-thumb.png +0 -0
  529. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/tabs/scroll-left.gif +0 -0
  530. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/tabs/scroll-right.gif +0 -0
  531. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/tabs/scroller-bg.gif +0 -0
  532. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/tabs/tab-btm-inactive-left-bg.gif +0 -0
  533. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/tabs/tab-btm-inactive-right-bg.gif +0 -0
  534. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/tabs/tab-btm-left-bg.gif +0 -0
  535. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/tabs/tab-btm-over-left-bg.gif +0 -0
  536. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/tabs/tab-btm-over-right-bg.gif +0 -0
  537. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/tabs/tab-btm-right-bg.gif +0 -0
  538. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/tabs/tab-close.gif +0 -0
  539. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/tabs/tab-strip-bg.gif +0 -0
  540. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/tabs/tab-strip-bg.png +0 -0
  541. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/tabs/tab-strip-btm-bg.gif +0 -0
  542. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/tabs/tabs-sprite.gif +0 -0
  543. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/toolbar/bg.gif +0 -0
  544. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/toolbar/btn-arrow-light.gif +0 -0
  545. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/toolbar/btn-arrow.gif +0 -0
  546. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/toolbar/btn-over-bg.gif +0 -0
  547. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/toolbar/gray-bg.gif +0 -0
  548. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/toolbar/more.gif +0 -0
  549. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/toolbar/tb-bg.gif +0 -0
  550. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/toolbar/tb-btn-sprite.gif +0 -0
  551. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/tree/arrows.gif +0 -0
  552. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/tree/elbow-end-minus-nl.gif +0 -0
  553. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/tree/elbow-end-minus.gif +0 -0
  554. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/tree/elbow-end-plus-nl.gif +0 -0
  555. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/tree/elbow-end-plus.gif +0 -0
  556. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/window/icon-error.gif +0 -0
  557. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/window/icon-info.gif +0 -0
  558. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/window/icon-question.gif +0 -0
  559. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/window/icon-warning.gif +0 -0
  560. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/window/left-corners.png +0 -0
  561. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/window/left-corners.pspimage +0 -0
  562. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/window/left-right.png +0 -0
  563. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/window/right-corners.png +0 -0
  564. data/public/javascripts/admin/aloha/deps/extjs/resources/images/gray/window/top-bottom.png +0 -0
  565. data/public/javascripts/admin/aloha/deps/extjs/resources/resources.jsb +507 -0
  566. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/css/prettyPhoto.css +386 -0
  567. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/images/dark_rounded/btnNext.png +0 -0
  568. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/images/dark_rounded/btnPrevious.png +0 -0
  569. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/images/dark_rounded/contentPattern.png +0 -0
  570. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/images/dark_rounded/loader.gif +0 -0
  571. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/images/dark_rounded/sprite.png +0 -0
  572. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/images/dark_square/btnNext.png +0 -0
  573. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/images/dark_square/btnPrevious.png +0 -0
  574. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/images/dark_square/contentPattern.png +0 -0
  575. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/images/dark_square/loader.gif +0 -0
  576. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/images/dark_square/sprite.png +0 -0
  577. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/images/facebook/btnNext.png +0 -0
  578. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/images/facebook/btnPrevious.png +0 -0
  579. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/images/facebook/contentPatternBottom.png +0 -0
  580. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/images/facebook/contentPatternLeft.png +0 -0
  581. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/images/facebook/contentPatternRight.png +0 -0
  582. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/images/facebook/contentPatternTop.png +0 -0
  583. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/images/facebook/loader.gif +0 -0
  584. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/images/facebook/sprite.png +0 -0
  585. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/images/light_rounded/btnNext.png +0 -0
  586. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/images/light_rounded/btnPrevious.png +0 -0
  587. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/images/light_rounded/loader.gif +0 -0
  588. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/images/light_rounded/sprite.png +0 -0
  589. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/images/light_square/btnNext.png +0 -0
  590. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/images/light_square/btnPrevious.png +0 -0
  591. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/images/light_square/loader.gif +0 -0
  592. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/images/light_square/sprite.png +0 -0
  593. data/public/javascripts/admin/aloha/i18n/de.dict +5 -0
  594. data/public/javascripts/admin/aloha/i18n/en.dict +5 -0
  595. data/public/javascripts/admin/aloha/i18n/eo.dict +5 -0
  596. data/public/javascripts/admin/aloha/i18n/fi.dict +5 -0
  597. data/public/javascripts/admin/aloha/i18n/fr.dict +5 -0
  598. data/public/javascripts/admin/aloha/i18n/it.dict +5 -0
  599. data/public/javascripts/admin/aloha/i18n/ru.dict +5 -0
  600. data/public/javascripts/admin/aloha/images/base.gif +0 -0
  601. data/public/javascripts/admin/aloha/images/base.png +0 -0
  602. data/public/javascripts/admin/aloha/images/base_multi.png +0 -0
  603. data/public/javascripts/admin/aloha/images/fade_in.png +0 -0
  604. data/public/javascripts/admin/aloha/images/fade_out.png +0 -0
  605. data/public/javascripts/admin/aloha/images/gentics_logo.png +0 -0
  606. data/public/javascripts/admin/aloha/images/grabhandle.png +0 -0
  607. data/public/javascripts/admin/aloha/images/maximize.png +0 -0
  608. data/public/javascripts/admin/aloha/images/multisplit-close.gif +0 -0
  609. data/public/javascripts/admin/aloha/images/multisplit-open.gif +0 -0
  610. data/public/javascripts/admin/aloha/images/multisplit_base.jpg +0 -0
  611. data/public/javascripts/admin/aloha/images/pin.png +0 -0
  612. data/public/javascripts/admin/aloha/images/removeformat.png +0 -0
  613. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/i18n/de.dict +2 -0
  614. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/i18n/en.dict +2 -0
  615. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/i18n/eo.dict +2 -0
  616. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/i18n/fi.dict +2 -0
  617. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/i18n/fr.dict +2 -0
  618. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/i18n/it.dict +2 -0
  619. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/plugin.js +7 -0
  620. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummySave/i18n/de.dict +2 -0
  621. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummySave/i18n/en.dict +3 -0
  622. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummySave/i18n/fi.dict +3 -0
  623. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummySave/i18n/fr.dict +3 -0
  624. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummySave/i18n/it.dict +3 -0
  625. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummySave/plugin.js +7 -0
  626. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/de.dict +30 -0
  627. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/en.dict +30 -0
  628. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/eo.dict +29 -0
  629. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/fi.dict +30 -0
  630. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/fr.dict +30 -0
  631. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/it.dict +30 -0
  632. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/ru.dict +30 -0
  633. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/plugin.js +7 -0
  634. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/i18n/de.dict +20 -0
  635. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/i18n/en.dict +20 -0
  636. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/i18n/eo.dict +16 -0
  637. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/i18n/fi.dict +20 -0
  638. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/i18n/fr.dict +16 -0
  639. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/i18n/it.dict +20 -0
  640. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/plugin.js +7 -0
  641. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.HighlightEditables/css/HighlightEditables.css +14 -0
  642. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.HighlightEditables/plugin.js +7 -0
  643. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/css/Link.css +15 -0
  644. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/css/jquery.autocomplete.css +48 -0
  645. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/deps/jquery.autocomplete.js +1 -0
  646. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/i18n/de.dict +4 -0
  647. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/i18n/en.dict +4 -0
  648. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/i18n/fr.dict +4 -0
  649. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/i18n/ru.dict +4 -0
  650. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/plugin.js +7 -0
  651. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/ressource.js +7 -0
  652. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/ressourcedummy.js +7 -0
  653. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/ressourceregistry.js +7 -0
  654. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/de.dict +2 -0
  655. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/en.dict +2 -0
  656. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/eo.dict +2 -0
  657. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/fi.dict +2 -0
  658. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/fr.dict +2 -0
  659. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/it.dict +2 -0
  660. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/ru.dict +2 -0
  661. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/plugin.js +7 -0
  662. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.TOC/plugin.js +1 -0
  663. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/de.dict +12 -0
  664. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/en.dict +12 -0
  665. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/eo.dict +12 -0
  666. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/fi.dict +12 -0
  667. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/fr.dict +12 -0
  668. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/it.dict +12 -0
  669. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/ru.dict +12 -0
  670. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/plugin.js +7 -0
  671. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/resources/down.cur +0 -0
  672. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/resources/left.cur +0 -0
  673. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/resources/table.css +194 -0
  674. data/public/javascripts/admin/aloha/plugins/eu.iksproject.plugins.Loader/plugin.js +1 -0
  675. data/public/javascripts/admin/aloha/plugins/eu.iksproject.plugins.Person/i18n/en.dict +2 -0
  676. data/public/javascripts/admin/aloha/plugins/eu.iksproject.plugins.Person/i18n/fi.dict +2 -0
  677. data/public/javascripts/admin/aloha/plugins/eu.iksproject.plugins.Person/i18n/fr.dict +2 -0
  678. data/public/javascripts/admin/aloha/plugins/eu.iksproject.plugins.Person/person.css +3 -0
  679. data/public/javascripts/admin/aloha/plugins/eu.iksproject.plugins.Person/plugin.js +1 -0
  680. data/public/javascripts/admin/aloha/plugins/simpletable/plugin.js.deactivated +2330 -0
  681. data/public/javascripts/admin/application.js +112 -98
  682. data/public/javascripts/admin/asset_collections.js +50 -50
  683. data/public/javascripts/admin/assets.js +4 -4
  684. data/public/javascripts/admin/content_types.js +15 -15
  685. data/public/javascripts/admin/contents.js +20 -20
  686. data/public/javascripts/admin/custom_fields.js +154 -154
  687. data/public/javascripts/admin/editable_elements.js +30 -0
  688. data/public/javascripts/admin/import.js +32 -0
  689. data/public/javascripts/admin/inline_editor.js +64 -0
  690. data/public/javascripts/admin/inline_editor_toolbar.js +170 -0
  691. data/public/javascripts/admin/pages.js +86 -79
  692. data/public/javascripts/admin/plugins/imagepicker.js +81 -0
  693. data/public/javascripts/admin/plugins/plupload/src/flash.js +298 -0
  694. data/public/javascripts/admin/plugins/plupload/src/plupload.js +1333 -0
  695. data/public/javascripts/admin/plugins/selectmenu.js +527 -0
  696. data/public/javascripts/admin/plugins/smartupdater.js +155 -0
  697. data/public/javascripts/admin/plugins/tiny_mce/langs/fr.js +154 -0
  698. data/public/javascripts/admin/plugins/tiny_mce/plugins/inlinepopups/skins/locomotive/window.css +72 -0
  699. data/public/javascripts/admin/plugins/tiny_mce/plugins/locoimage/css/locoimage.css +110 -0
  700. data/public/javascripts/admin/plugins/tiny_mce/plugins/locoimage/editor_plugin.js +1 -0
  701. data/public/javascripts/admin/plugins/tiny_mce/plugins/locoimage/editor_plugin_src.js +46 -0
  702. data/public/javascripts/admin/plugins/tiny_mce/plugins/locoimage/image.htm +62 -0
  703. data/public/javascripts/admin/plugins/tiny_mce/plugins/{advimage → locoimage}/img/sample.gif +0 -0
  704. data/public/javascripts/admin/plugins/tiny_mce/plugins/locoimage/js/image.js +172 -0
  705. data/public/javascripts/admin/plugins/tiny_mce/plugins/locoimage/langs/en_dlg.js +9 -0
  706. data/public/javascripts/admin/plugins/tiny_mce/plugins/locoimage/langs/fr_dlg.js +9 -0
  707. data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/js/source_editor.js +37 -37
  708. data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/langs/fr.js +62 -0
  709. data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/langs/fr_dlg.js +51 -0
  710. data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/content.css +36 -5
  711. data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/dialog.css +53 -109
  712. data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/img/butt2.png +0 -0
  713. data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/img/button-bg.png +0 -0
  714. data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/img/buttons.png +0 -0
  715. data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/img/down_arrow.gif +0 -0
  716. data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/img/fade-butt.png +0 -0
  717. data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/img/icons.png +0 -0
  718. data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/img/items.gif +0 -0
  719. data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/img/menu-arrow.png +0 -0
  720. data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/img/menu-check.png +0 -0
  721. data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/img/progress.gif +0 -0
  722. data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/img/tabs.gif +0 -0
  723. data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/img/toolbarbg.png +0 -0
  724. data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/ui.css +997 -213
  725. data/public/javascripts/admin/rails.js +16 -11
  726. data/public/javascripts/admin/site.js +42 -38
  727. data/public/javascripts/admin/snippets.js +21 -15
  728. data/public/javascripts/admin/theme_assets.js +32 -94
  729. data/public/javascripts/admin/utils.js +10 -10
  730. data/public/stylesheets/admin/application.css +142 -154
  731. data/public/stylesheets/admin/assets.css +54 -0
  732. data/public/stylesheets/admin/box.css +114 -59
  733. data/public/stylesheets/admin/buttons.css +36 -38
  734. data/public/stylesheets/admin/editable_elements.css +64 -0
  735. data/public/stylesheets/admin/fancybox_changes.css +101 -0
  736. data/public/stylesheets/admin/formtastic.css +3 -3
  737. data/public/stylesheets/admin/formtastic_changes.css +239 -232
  738. data/public/stylesheets/admin/inline_editor.css +90 -0
  739. data/public/stylesheets/admin/jquery/images/ui-icons_ffffff_256x240.png +0 -0
  740. data/public/stylesheets/admin/layout.css +86 -84
  741. data/public/stylesheets/admin/menu.css +106 -106
  742. data/public/stylesheets/admin/plugins/selectmenu.css +64 -0
  743. metadata +1104 -586
  744. data/app/controllers/admin/layouts_controller.rb +0 -13
  745. data/app/controllers/admin/page_parts_controller.rb +0 -12
  746. data/app/models/extensions/page/parts.rb +0 -54
  747. data/app/models/layout.rb +0 -48
  748. data/app/models/liquid_template.rb +0 -32
  749. data/app/models/page_part.rb +0 -35
  750. data/app/views/admin/layouts/_form.html.haml +0 -10
  751. data/app/views/admin/layouts/_layout.html.haml +0 -7
  752. data/app/views/admin/layouts/edit.html.haml +0 -18
  753. data/app/views/admin/layouts/index.html.haml +0 -15
  754. data/app/views/admin/layouts/new.html.haml +0 -15
  755. data/lib/locomotive/liquid/db_file_system.rb +0 -18
  756. data/lib/locomotive/liquid/drops/javascripts.rb +0 -18
  757. data/lib/locomotive/liquid/drops/stylesheets.rb +0 -19
  758. data/lib/locomotive/liquid/liquify_template.rb +0 -57
  759. data/lib/misc_form_builder.rb +0 -45
  760. data/public/images/admin/nocoffee.gif +0 -0
  761. data/public/javascripts/admin/page_parts.js +0 -88
  762. data/public/javascripts/admin/plugins/tiny_mce/plugins/advimage/css/advimage.css +0 -13
  763. data/public/javascripts/admin/plugins/tiny_mce/plugins/advimage/editor_plugin.js +0 -1
  764. data/public/javascripts/admin/plugins/tiny_mce/plugins/advimage/editor_plugin_src.js +0 -50
  765. data/public/javascripts/admin/plugins/tiny_mce/plugins/advimage/image.htm +0 -232
  766. data/public/javascripts/admin/plugins/tiny_mce/plugins/advimage/js/image.js +0 -443
  767. data/public/javascripts/admin/plugins/tiny_mce/plugins/advimage/langs/en_dlg.js +0 -43
  768. data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/img/menu_arrow.gif +0 -0
  769. data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/img/menu_check.gif +0 -0
  770. data/public/stylesheets/admin/login.css +0 -141
  771. data/public/stylesheets/admin/page_parts.css +0 -67
  772. data/spec/factories.rb +0 -77
  773. data/spec/lib/core_ext_spec.rb +0 -37
  774. data/spec/lib/locomotive/heroku_spec.rb +0 -149
  775. data/spec/lib/locomotive/httparty/patches_spec.rb +0 -19
  776. data/spec/lib/locomotive/httparty/webservice_spec.rb +0 -24
  777. data/spec/lib/locomotive/liquid/drops/contents_spec.rb +0 -33
  778. data/spec/lib/locomotive/liquid/drops/page_spec.rb +0 -48
  779. data/spec/lib/locomotive/liquid/filters/html_spec.rb +0 -82
  780. data/spec/lib/locomotive/liquid/filters/misc_spec.rb +0 -36
  781. data/spec/lib/locomotive/liquid/filters/text_spec.rb +0 -11
  782. data/spec/lib/locomotive/liquid/tags/consume_spec.rb +0 -40
  783. data/spec/lib/locomotive/liquid/tags/nav_spec.rb +0 -50
  784. data/spec/lib/locomotive/liquid/tags/paginate_spec.rb +0 -99
  785. data/spec/lib/locomotive/liquid/tags/snippet_spec.rb +0 -20
  786. data/spec/lib/locomotive/liquid/tags/with_scope_spec.rb +0 -20
  787. data/spec/lib/locomotive/render_spec.rb +0 -127
  788. data/spec/models/account_spec.rb +0 -65
  789. data/spec/models/asset_collections_spec.rb +0 -177
  790. data/spec/models/content_instance_spec.rb +0 -33
  791. data/spec/models/content_type_spec.rb +0 -49
  792. data/spec/models/layout_spec.rb +0 -64
  793. data/spec/models/liquid_template_spec.rb +0 -19
  794. data/spec/models/membership_spec.rb +0 -56
  795. data/spec/models/page_spec.rb +0 -358
  796. data/spec/models/site_spec.rb +0 -147
  797. data/spec/models/snippet_spec.rb +0 -9
  798. data/spec/models/theme_asset_spec.rb +0 -89
  799. data/spec/spec_helper.rb +0 -18
  800. data/spec/support/be_valid.rb +0 -31
  801. data/spec/support/carrierwave.rb +0 -32
  802. data/spec/support/locomotive.rb +0 -36
  803. data/vendor/plugins/custom_fields/Gemfile +0 -12
  804. data/vendor/plugins/custom_fields/README +0 -13
  805. data/vendor/plugins/custom_fields/Rakefile +0 -29
  806. data/vendor/plugins/custom_fields/init.rb +0 -2
  807. data/vendor/plugins/custom_fields/lib/custom_fields/custom_fields_for.rb +0 -50
  808. data/vendor/plugins/custom_fields/lib/custom_fields/extensions/mongoid/associations/embeds_many.rb +0 -31
  809. data/vendor/plugins/custom_fields/lib/custom_fields/extensions/mongoid/associations/has_many_related.rb +0 -33
  810. data/vendor/plugins/custom_fields/lib/custom_fields/extensions/mongoid/associations/proxy.rb +0 -20
  811. data/vendor/plugins/custom_fields/lib/custom_fields/extensions/mongoid/document.rb +0 -28
  812. data/vendor/plugins/custom_fields/lib/custom_fields/field.rb +0 -82
  813. data/vendor/plugins/custom_fields/lib/custom_fields/proxy_class_enabler.rb +0 -37
  814. data/vendor/plugins/custom_fields/lib/custom_fields/types/boolean.rb +0 -29
  815. data/vendor/plugins/custom_fields/lib/custom_fields/types/category.rb +0 -85
  816. data/vendor/plugins/custom_fields/lib/custom_fields/types/date.rb +0 -35
  817. data/vendor/plugins/custom_fields/lib/custom_fields/types/default.rb +0 -37
  818. data/vendor/plugins/custom_fields/lib/custom_fields/types/file.rb +0 -27
  819. data/vendor/plugins/custom_fields/lib/custom_fields/types/string.rb +0 -13
  820. data/vendor/plugins/custom_fields/lib/custom_fields/types/text.rb +0 -15
  821. data/vendor/plugins/custom_fields/lib/custom_fields.rb +0 -28
  822. data/vendor/plugins/custom_fields/spec/fixtures/doc.txt +0 -1
  823. data/vendor/plugins/custom_fields/spec/integration/custom_fields_for_spec.rb +0 -28
  824. data/vendor/plugins/custom_fields/spec/integration/types/category_spec.rb +0 -26
  825. data/vendor/plugins/custom_fields/spec/integration/types/file_spec.rb +0 -18
  826. data/vendor/plugins/custom_fields/spec/models/person.rb +0 -10
  827. data/vendor/plugins/custom_fields/spec/models/project.rb +0 -18
  828. data/vendor/plugins/custom_fields/spec/models/task.rb +0 -10
  829. data/vendor/plugins/custom_fields/spec/spec_helper.rb +0 -27
  830. data/vendor/plugins/custom_fields/spec/support/carrierwave.rb +0 -31
  831. data/vendor/plugins/custom_fields/spec/support/mongoid.rb +0 -6
  832. data/vendor/plugins/custom_fields/spec/unit/custom_field_spec.rb +0 -42
  833. data/vendor/plugins/custom_fields/spec/unit/custom_fields_for_spec.rb +0 -106
  834. data/vendor/plugins/custom_fields/spec/unit/proxy_class_enabler_spec.rb +0 -25
  835. data/vendor/plugins/custom_fields/spec/unit/types/boolean_spec.rb +0 -81
  836. data/vendor/plugins/custom_fields/spec/unit/types/category_spec.rb +0 -112
  837. data/vendor/plugins/custom_fields/spec/unit/types/date_spec.rb +0 -59
  838. data/vendor/plugins/custom_fields/spec/unit/types/file_spec.rb +0 -23
  839. data/vendor/plugins/custom_fields/uninstall.rb +0 -1
data/lib/tasks/rspec.rake CHANGED
@@ -1,7 +1,7 @@
1
1
  begin
2
2
  require 'rspec/core'
3
3
  require 'rspec/core/rake_task'
4
- rescue MissingSourceFile
4
+ rescue MissingSourceFile
5
5
  module Rspec
6
6
  module Core
7
7
  class RakeTask
File without changes
File without changes
File without changes
File without changes
@@ -1,5 +1,5 @@
1
1
  $(document).ready(function() {
2
- $.subscribe('form.saved.success', function(event, data) {
3
- $('#global-actions-bar a:first').html($('#my_account_name').val());
4
- }, []);
5
- });
2
+ $.subscribe('form.saved.success', function(event, data) {
3
+ $('#global-actions-bar a:first').html($('#my_account_name').val());
4
+ }, []);
5
+ });
@@ -0,0 +1,2 @@
1
+ nightly
2
+ 2010-09-05 15:50:06
@@ -0,0 +1,153 @@
1
+ /*
2
+ * Aloha Editor
3
+ * Author & Copyright (c) 2010 Gentics Software GmbH
4
+ * aloha-sales@gentics.com
5
+ * Licensed unter the terms of http://www.aloha-editor.com/license.html
6
+ */
7
+ jQuery.fn.between=function(content,offset){if(this[0].nodeType!==3){if(offset>this.children().size()){offset=this.children().size()}if(offset<=0){this.prepend(content)}else{this.children().eq(offset-1).after(content)}}else{if(offset<=0){this.before(content)}else{if(offset>=this[0].length){this.after(content)}else{var fullText=this[0].data;this[0].data=fullText.substring(0,offset);this.after(fullText.substring(offset,fullText.length));this.after(content)}}}};
8
+ /*
9
+ * Aloha Editor
10
+ * Author & Copyright (c) 2010 Gentics Software GmbH
11
+ * aloha-sales@gentics.com
12
+ * Licensed unter the terms of http://www.aloha-editor.com/license.html
13
+ */
14
+ if(typeof GENTICS=="undefined"||!GENTICS){var GENTICS={}}if(typeof GENTICS.Utils=="undefined"||!GENTICS){GENTICS.Utils={}}GENTICS.Utils.applyProperties=function(target,properties){var name;for(name in properties){if(properties.hasOwnProperty(name)){target[name]=properties[name]}}};
15
+ /*
16
+ * Aloha Editor
17
+ * Author & Copyright (c) 2010 Gentics Software GmbH
18
+ * aloha-sales@gentics.com
19
+ * Licensed unter the terms of http://www.aloha-editor.com/license.html
20
+ */
21
+ if(typeof GENTICS=="undefined"||!GENTICS){var GENTICS={}}if(typeof GENTICS.Utils=="undefined"||!GENTICS){GENTICS.Utils={}}GENTICS.Utils.RangeObject=function(param){this.startContainer;this.startOffset;this.endContainer;this.endOffset;this.startParents=[];this.endParents=[];this.rangeTree=[];if(typeof param==="object"){if(param.startContainer!==undefined){this.startContainer=param.startContainer}if(param.startOffset!==undefined){this.startOffset=param.startOffset}if(param.endContainer!==undefined){this.endContainer=param.endContainer}if(param.endOffset!==undefined){this.endOffset=param.endOffset}}else{if(param===true){this.initializeFromUserSelection()}}};GENTICS.Utils.RangeObject.prototype.log=function(message,obj){if(GENTICS&&GENTICS.Aloha&&GENTICS.Aloha.Log){GENTICS.Aloha.Log.debug(this,message);return false}if(console){console.log(message);if(obj){console.log(obj)}}};GENTICS.Utils.RangeObject.prototype.isCollapsed=function(){return(!this.endContainer||(this.startContainer===this.endContainer&&this.startOffset===this.endOffset))};GENTICS.Utils.RangeObject.prototype.getCommonAncestorContainer=function(){if(this.commonAncestorContainer){return this.commonAncestorContainer}this.updateCommonAncestorContainer();return this.commonAncestorContainer};GENTICS.Utils.RangeObject.prototype.getContainerParents=function(limit,fromEnd){var container=fromEnd?this.endContainer:this.startContainer;var parentStore=fromEnd?this.endParents:this.startParents;if(!container){return false}if(typeof limit=="undefined"){limit=jQuery("body")}if(!parentStore[limit.get(0)]){var parents;if(container.nodeType==3){parents=jQuery(container).parents()}else{parents=jQuery(container).parents();for(var i=parents.length;i>0;--i){parents[i]=parents[i-1]}parents[0]=container}var limitIndex=parents.index(limit);if(limitIndex>=0){parents=parents.slice(0,limitIndex)}parentStore[limit.get(0)]=parents}return parentStore[limit.get(0)]};GENTICS.Utils.RangeObject.prototype.getStartContainerParents=function(limit){return this.getContainerParents(limit,false)};GENTICS.Utils.RangeObject.prototype.getEndContainerParents=function(limit){return this.getContainerParents(limit,true)};GENTICS.Utils.RangeObject.prototype.updateCommonAncestorContainer=function(commonAncestorContainer){var parentsStartContainer=this.getStartContainerParents();var parentsEndContainer=this.getEndContainerParents();if(!commonAncestorContainer){if(!(parentsStartContainer.length>0&&parentsEndContainer.length>0)){GENTICS.Utils.RangeObject.prototype.log("could not find commonAncestorContainer");return false}for(var i=0;i<parentsStartContainer.length;i++){if(parentsEndContainer.index(parentsStartContainer[i])!=-1){this.commonAncestorContainer=parentsStartContainer[i];break}}}else{this.commonAncestorContainer=commonAncestorContainer}GENTICS.Utils.RangeObject.prototype.log(commonAncestorContainer?"commonAncestorContainer was set successfully":"commonAncestorContainer was calculated successfully");return true};GENTICS.Utils.RangeObject.prototype.getCollapsedIERange=function(container,offset){var ieRange=document.body.createTextRange();var left=this.searchElementToLeft(container,offset);if(left.element){var tmpRange=document.body.createTextRange();tmpRange.moveToElementText(left.element);ieRange.setEndPoint("StartToEnd",tmpRange);if(left.characters!=0){ieRange.moveStart("character",left.characters)}else{ieRange.moveStart("character",1);ieRange.moveStart("character",-1)}}else{var right=this.searchElementToRight(container,offset);if(false&&right.element){var tmpRange=document.body.createTextRange();tmpRange.moveToElementText(right.element);ieRange.setEndPoint("StartToStart",tmpRange);if(right.characters!=0){ieRange.moveStart("character",-right.characters)}else{ieRange.moveStart("character",-1);ieRange.moveStart("character",1)}}else{var parent=container.nodeType==3?container.parentNode:container;var tmpRange=document.body.createTextRange();tmpRange.moveToElementText(parent);ieRange.setEndPoint("StartToStart",tmpRange);if(left.characters!=0){ieRange.moveStart("character",left.characters)}}}ieRange.collapse();return ieRange};GENTICS.Utils.RangeObject.prototype.select=document.createRange===undefined?function(){if(GENTICS.Aloha.Log.isDebugEnabled()){GENTICS.Aloha.Log.debug(this,"Set selection to current range (IE version)")}if(this.startContainer.nodeType==3&&GENTICS.Utils.Dom.isBlockLevelElement(this.startContainer.nextSibling)){jQuery(this.startContainer).after("<br/>");if(this.endContainer===this.startContainer.parentNode&&GENTICS.Utils.Dom.getIndexInParent(this.startContainer)<this.endOffset){this.endOffset++}}var ieRange=document.body.createTextRange();var startRange=this.getCollapsedIERange(this.startContainer,this.startOffset);ieRange.setEndPoint("StartToStart",startRange);if(this.isCollapsed()){ieRange.collapse()}else{var endRange=this.getCollapsedIERange(this.endContainer,this.endOffset);ieRange.setEndPoint("EndToStart",endRange)}ieRange.select()}:function(){if(GENTICS.Aloha.Log.isDebugEnabled()){GENTICS.Aloha.Log.debug(this,"Set selection to current range (non IE version)")}var range=document.createRange();range.setStart(this.startContainer,this.startOffset);range.setEnd(this.endContainer,this.endOffset);window.getSelection().removeAllRanges();window.getSelection().addRange(range)};GENTICS.Utils.RangeObject.prototype.searchElementToLeft=function(container,offset){var checkElement=undefined;var characters=0;if(container.nodeType==3){characters=offset;checkElement=container.previousSibling}else{if(offset>0){checkElement=container.childNodes[offset-1]}}while(checkElement&&checkElement.nodeType==3){characters+=checkElement.data.length;checkElement=checkElement.previousSibling}return{element:checkElement,characters:characters}};GENTICS.Utils.RangeObject.prototype.searchElementToRight=function(container,offset){var checkElement=undefined;var characters=0;if(container.nodeType==3){characters=container.data.length-offset;checkElement=container.nextSibling}else{if(offset<container.childNodes.length){checkElement=container.childNodes[offset]}}while(checkElement&&checkElement.nodeType==3){characters+=checkElement.data.length;checkElement=checkElement.nextSibling}return{element:checkElement,characters:characters}};GENTICS.Utils.RangeObject.prototype.update=function(event){GENTICS.Utils.RangeObject.prototype.log("==========");GENTICS.Utils.RangeObject.prototype.log("now updating rangeObject");this.initializeFromUserSelection(event);this.updateCommonAncestorContainer()};GENTICS.Utils.RangeObject.prototype.initializeFromUserSelection=function(event){var selection=window.getSelection();if(!selection){return false}var browserRange=selection.getRangeAt(0);if(!browserRange){return false}this.startContainer=browserRange.startContainer;this.endContainer=browserRange.endContainer;this.startOffset=browserRange.startOffset;this.endOffset=browserRange.endOffset;this.correctRange();return};GENTICS.Utils.RangeObject.prototype.correctRange=function(){this.clearCaches();if(this.isCollapsed()){if(this.startContainer.nodeType==1){if(this.startOffset>0&&this.startContainer.childNodes[this.startOffset-1].nodeType==3){this.startContainer=this.startContainer.childNodes[this.startOffset-1];this.startOffset=this.startContainer.data.length;this.endContainer=this.startContainer;this.endOffset=this.startOffset;return}if(this.startOffset>0&&this.startContainer.childNodes[this.startOffset-1].nodeType==1){var adjacentTextNode=GENTICS.Utils.Dom.searchAdjacentTextNode(this.startContainer,this.startOffset,true);if(adjacentTextNode){this.startContainer=this.endContainer=adjacentTextNode;this.startOffset=this.endOffset=adjacentTextNode.data.length;return}adjacentTextNode=GENTICS.Utils.Dom.searchAdjacentTextNode(this.startContainer,this.startOffset,false);if(adjacentTextNode){this.startContainer=this.endContainer=adjacentTextNode;this.startOffset=this.endOffset=0;return}}if(this.startOffset<this.startContainer.childNodes.length&&this.startContainer.childNodes[this.startOffset].nodeType==3){this.startContainer=this.startContainer.childNodes[this.startOffset];this.startOffset=0;this.endContainer=this.startContainer;this.endOffset=0;return}}if(this.startContainer.nodeType==3&&this.startOffset==0){var adjacentTextNode=GENTICS.Utils.Dom.searchAdjacentTextNode(this.startContainer.parentNode,GENTICS.Utils.Dom.getIndexInParent(this.startContainer),true);if(adjacentTextNode){this.startContainer=this.endContainer=adjacentTextNode;this.startOffset=this.endOffset=adjacentTextNode.data.length}}}else{if(this.startContainer.nodeType==1){if(this.startOffset<this.startContainer.childNodes.length&&this.startContainer.childNodes[this.startOffset].nodeType==3){this.startContainer=this.startContainer.childNodes[this.startOffset];this.startOffset=0}else{if(this.startOffset<this.startContainer.childNodes.length&&this.startContainer.childNodes[this.startOffset].nodeType==1){var textNode=false;var checkedElement=this.startContainer.childNodes[this.startOffset];while(textNode===false&&checkedElement.childNodes&&checkedElement.childNodes.length>0){checkedElement=checkedElement.childNodes[0];if(checkedElement.nodeType==3){textNode=checkedElement}}if(textNode!==false){this.startContainer=textNode;this.startOffset=0}}}}if(this.startContainer.nodeType==3&&this.startOffset==this.startContainer.data.length){var adjacentTextNode=GENTICS.Utils.Dom.searchAdjacentTextNode(this.startContainer.parentNode,GENTICS.Utils.Dom.getIndexInParent(this.startContainer)+1,false);if(adjacentTextNode){this.startContainer=adjacentTextNode;this.startOffset=0}}if(this.endContainer.nodeType==3&&this.endOffset==0){if(this.endContainer.previousSibling&&this.endContainer.previousSibling.nodeType==3){this.endContainer=this.endContainer.previousSibling;this.endOffset=this.endContainer.data.length}else{if(this.endContainer.previousSibling&&this.endContainer.previousSibling.nodeType==1&&this.endContainer.parentNode){var parentNode=this.endContainer.parentNode;for(var offset=0;offset<parentNode.childNodes.length;++offset){if(parentNode.childNodes[offset]==this.endContainer){this.endOffset=offset;break}}this.endContainer=parentNode}}}if(this.endContainer.nodeType==1&&this.endOffset==0){if(this.endContainer.previousSibling){if(this.endContainer.previousSibling.nodeType==3){this.endContainer=this.endContainer.previousSibling;this.endOffset=this.endContainer.data.length}else{if(this.endContainer.previousSibling.nodeType==1&&this.endContainer.previousSibling.childNodes&&this.endContainer.previousSibling.childNodes.length>0){this.endContainer=this.endContainer.previousSibling;this.endOffset=this.endContainer.childNodes.length}}}}if(this.endContainer.nodeType==1){if(this.endOffset>0&&this.endContainer.childNodes[this.endOffset-1].nodeType==3){this.endContainer=this.endContainer.childNodes[this.endOffset-1];this.endOffset=this.endContainer.data.length}else{if(this.endOffset>0&&this.endContainer.childNodes[this.endOffset-1].nodeType==1){var textNode=false;var checkedElement=this.endContainer.childNodes[this.endOffset-1];while(textNode===false&&checkedElement.childNodes&&checkedElement.childNodes.length>0){checkedElement=checkedElement.childNodes[checkedElement.childNodes.length-1];if(checkedElement.nodeType==3){textNode=checkedElement}}if(textNode!==false){this.endContainer=textNode;this.endOffset=this.endContainer.data.length}}}}}};GENTICS.Utils.RangeObject.prototype.clearCaches=function(){this.rangeTree=[];this.startParents=[];this.endParents=[];this.commonAncestorContainer=undefined};GENTICS.Utils.RangeObject.prototype.getRangeTree=function(root){if(typeof root=="undefined"){root=this.getCommonAncestorContainer()}if(this.rangeTree[root]){return this.rangeTree[root]}this.inselection=false;this.rangeTree[root]=this.recursiveGetRangeTree(root);return this.rangeTree[root]};GENTICS.Utils.RangeObject.prototype.recursiveGetRangeTree=function(currentObject){var jQueryCurrentObject=jQuery(currentObject);var childCount=0;var that=this;var currentElements=new Array();jQueryCurrentObject.contents().each(function(index){var type="none";var startOffset=false;var endOffset=false;var collapsedFound=false;if(that.isCollapsed()&&currentObject===that.startContainer&&that.startOffset==index){currentElements[childCount]=new GENTICS.Utils.RangeTree();currentElements[childCount].type="collapsed";currentElements[childCount].domobj=undefined;that.inselection=false;collapsedFound=true;childCount++}if(!that.inselection&&!collapsedFound){switch(this.nodeType){case 3:if(this===that.startContainer){that.inselection=true;type=that.startOffset>0?"partial":"full";startOffset=that.startOffset;endOffset=this.length}break;case 1:if(this===that.startContainer&&that.startOffset==0){that.inselection=true;type="full"}if(currentObject===that.startContainer&&that.startOffset==index){that.inselection=true;type="full"}break}}if(that.inselection&&!collapsedFound){if(type=="none"){type="full"}switch(this.nodeType){case 3:if(this===that.endContainer){that.inselection=false;if(that.endOffset<this.length){type="partial"}if(startOffset===false){startOffset=0}endOffset=that.endOffset}break;case 1:if(this===that.endContainer&&that.endOffset==0){that.inselection=false}break}if(currentObject===that.endContainer&&that.endOffset<=index){that.inselection=false;type="none"}}currentElements[childCount]=new GENTICS.Utils.RangeTree();currentElements[childCount].domobj=this;currentElements[childCount].type=type;if(type=="partial"){currentElements[childCount].startOffset=startOffset;currentElements[childCount].endOffset=endOffset}currentElements[childCount].children=that.recursiveGetRangeTree(this);if(currentElements[childCount].children.length>0){var noneFound=false;var partialFound=false;var fullFound=false;for(var i=0;i<currentElements[childCount].children.length;++i){switch(currentElements[childCount].children[i].type){case"none":noneFound=true;break;case"full":fullFound=true;break;case"partial":partialFound=true;break}}if(partialFound||(fullFound&&noneFound)){currentElements[childCount].type="partial"}else{if(fullFound&&!partialFound&&!noneFound){currentElements[childCount].type="full"}}}childCount++});if(this.isCollapsed()&&currentObject===this.startContainer&&this.startOffset==currentObject.childNodes.length){currentElements[childCount]=new GENTICS.Utils.RangeTree();currentElements[childCount].type="collapsed";currentElements[childCount].domobj=undefined}return currentElements};GENTICS.Utils.RangeObject.prototype.findMarkup=function(comparator,limit,atEnd){var parents=this.getContainerParents(limit,atEnd);var returnValue=false;jQuery.each(parents,function(index,domObj){if(comparator.apply(domObj)){returnValue=domObj;return false}});return returnValue};GENTICS.Utils.RangeTree=function(){this.domobj=new Object();this.type;this.children=new Array()};
22
+ /*
23
+ * Aloha Editor
24
+ * Author & Copyright (c) 2010 Gentics Software GmbH
25
+ * aloha-sales@gentics.com
26
+ * Licensed unter the terms of http://www.aloha-editor.com/license.html
27
+ */
28
+ if(typeof GENTICS=="undefined"||!GENTICS){var GENTICS={}}if(typeof GENTICS.Utils=="undefined"||!GENTICS){GENTICS.Utils={}}GENTICS.Utils.Position={};GENTICS.Utils.Position.w=jQuery(window);GENTICS.Utils.Position.Scroll={top:0,left:0,isScrolling:false};GENTICS.Utils.Position.Mouse={x:0,y:0,oldX:0,oldY:0,isMoving:false,triggeredMouseStop:true};GENTICS.Utils.Position.mouseStopCallbacks=new Array();GENTICS.Utils.Position.mouseMoveCallbacks=new Array();GENTICS.Utils.Position.update=function(){var st=this.w.scrollTop();var sl=this.w.scrollLeft();if(this.Scroll.isScrolling){if(this.Scroll.top==st&&this.Scroll.left==sl){this.Scroll.isScrolling=false}}else{if(this.Scroll.top!=st||this.Scroll.left!=sl){this.Scroll.isScrolling=true}}this.Scroll.top=st;this.Scroll.left=sl;if(this.Mouse.x==this.Mouse.oldX&&this.Mouse.y==this.Mouse.oldY){this.Mouse.isMoving=false;if(!this.Mouse.triggeredMouseStop){this.Mouse.triggeredMouseStop=true;for(var i=0;i<this.mouseStopCallbacks.length;i++){this.mouseStopCallbacks[i].call()}}}else{this.Mouse.isMoving=true;this.Mouse.triggeredMouseStop=false;for(var i=0;i<this.mouseMoveCallbacks.length;i++){this.mouseMoveCallbacks[i].call()}}this.Mouse.oldX=this.Mouse.x;this.Mouse.oldY=this.Mouse.y};GENTICS.Utils.Position.addMouseStopCallback=function(callback){this.mouseStopCallbacks.push(callback);return(this.mouseStopCallbacks.length-1)};GENTICS.Utils.Position.addMouseMoveCallback=function(callback){this.mouseMoveCallbacks.push(callback);return(this.mouseMoveCallbacks.length-1)};setInterval("GENTICS.Utils.Position.update()",500);jQuery("html").mousemove(function(e){GENTICS.Utils.Position.Mouse.x=e.pageX;GENTICS.Utils.Position.Mouse.y=e.pageY});
29
+ /*
30
+ * Aloha Editor
31
+ * Author & Copyright (c) 2010 Gentics Software GmbH
32
+ * aloha-sales@gentics.com
33
+ * Licensed unter the terms of http://www.aloha-editor.com/license.html
34
+ */
35
+ if(typeof GENTICS=="undefined"||!GENTICS){var GENTICS={}}if(typeof GENTICS.Utils=="undefined"||!GENTICS.Utils){GENTICS.Utils={}}if(typeof GENTICS.Utils.Dom=="undefined"||!GENTICS.Utils.Dom){GENTICS.Utils.Dom=function(){}}GENTICS.Utils.Dom.prototype.mergeableTags=["a","b","span","code","del","em","i","ins","strong","sub","sup","#text"];GENTICS.Utils.Dom.prototype.nonWordBoundaryTags=["a","b","span","code","del","em","i","ins","span","strong","sub","sup","#text"];GENTICS.Utils.Dom.prototype.nonEmptyTags=["br"];GENTICS.Utils.Dom.prototype.tags={flow:["a","abbr","address","area","article","aside","audio","b","bdo","blockquote","br","button","canvas","cite","code","command","datalist","del","details","dfn","div","dl","em","embed","fieldset","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","menu","meter","nav","noscript","object","ol","output","p","pre","progress","q","ruby","samp","script","section","select","small","span","strong","style","sub","sup","svg","table","textarea","time","ul","var","video","wbr","#text"],phrasing:["a","abbr","area","audio","b","bdo","br","button","canvas","cite","code","command","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","samp","script","select","small","span","strong","sub","sup","svg","textarea","time","var","video","wbr","#text"]};GENTICS.Utils.Dom.prototype.children={a:"phrasing",b:"phrasing",blockquote:"flow",br:"empty",caption:"flow",cite:"phrasing",code:"phrasing",col:"empty",colgroup:"col",del:"phrasing",div:"flow",h1:"phrasing",h2:"phrasing",h3:"phrasing",h4:"phrasing",h5:"phrasing",h6:"phrasing",hr:"empty",i:"phrasing",img:"empty",ins:"phrasing",li:"flow",ol:"li",p:"phrasing",pre:"phrasing",small:"phrasing",span:"phrasing",strong:"phrasing",sub:"phrasing",sup:"phrasing",table:["caption","colgroup","thead","tbody","tfoot","tr"],tbody:"tr",td:"flow",tfoot:"tr",th:"phrasing",thead:"tr",tr:["th","td"],ul:"li"};GENTICS.Utils.Dom.prototype.blockLevelElements=["p","h1","h2","h3","h4","h5","h6","blockquote","div","pre"];GENTICS.Utils.Dom.prototype.listElements=["li","ol","ul"];GENTICS.Utils.Dom.prototype.split=function(range,limit,atEnd){var splitElement=jQuery(range.startContainer);var splitPosition=range.startOffset;if(atEnd){splitElement=jQuery(range.endContainer);splitPosition=range.endOffset}if(limit.length<1){limit=jQuery(document.body)}var updateRange=(!range.isCollapsed()&&!atEnd);var path;var parents=splitElement.parents().get();parents.unshift(splitElement.get(0));jQuery.each(parents,function(index,element){var isLimit=limit.filter(function(){return this==element}).length;if(isLimit){if(index>0){path=parents.slice(0,index)}return false}});if(!path){return}path=path.reverse();var newDom;var insertElement;for(var i=0;i<path.length;i++){var element=path[i];if(i===path.length-1){var secondPart;if(element.nodeType===3){secondPart=document.createTextNode(element.data.substring(splitPosition,element.data.length));element.data=element.data.substring(0,splitPosition)}else{var newElement=jQuery(element).clone(false).empty();var children=jQuery(element).contents();secondPart=newElement.append(children.slice(splitPosition,children.length)).get(0)}if(updateRange&&range.endContainer===element){range.endContainer=secondPart;range.endOffset-=splitPosition;range.clearCaches()}if(insertElement){insertElement.prepend(secondPart)}else{jQuery(element).after(secondPart)}}else{var newElement=jQuery(element).clone(false).empty();if(!newDom){newDom=newElement;insertElement=newElement}else{insertElement.prepend(newElement);insertElement=newElement}var next;while(next=path[i+1].nextSibling){insertElement.append(next)}if(updateRange&&range.endContainer===element){range.endContainer=newElement.get(0);var prev=path[i+1];var offset=0;while(prev=prev.previousSibling){offset++}range.endOffset-=offset;range.clearCaches()}}}jQuery(path[0]).after(newDom);return jQuery([path[0],newDom?newDom.get(0):secondPart])};GENTICS.Utils.Dom.prototype.allowsNesting=function(outerDOMObject,innerDOMObject){if(!outerDOMObject||!outerDOMObject.nodeName||!innerDOMObject||!innerDOMObject.nodeName){return false}var outerNodeName=outerDOMObject.nodeName.toLowerCase();var innerNodeName=innerDOMObject.nodeName.toLowerCase();if(!this.children[outerNodeName]){return false}if(this.children[outerNodeName]==innerNodeName){return true}if(jQuery.isArray(this.children[outerNodeName])&&jQuery.inArray(innerNodeName,this.children[outerNodeName])>=0){return true}if(jQuery.isArray(this.tags[this.children[outerNodeName]])&&jQuery.inArray(innerNodeName,this.tags[this.children[outerNodeName]])>=0){return true}return false};GENTICS.Utils.Dom.prototype.addMarkup=function(rangeObject,markup,nesting){if(rangeObject.startContainer.nodeType==3&&rangeObject.startOffset>0&&rangeObject.startOffset<rangeObject.startContainer.data.length){this.split(rangeObject,jQuery(rangeObject.startContainer).parent(),false)}if(rangeObject.endContainer.nodeType==3&&rangeObject.endOffset>0&&rangeObject.endOffset<rangeObject.endContainer.data.length){this.split(rangeObject,jQuery(rangeObject.endContainer).parent(),true)}var rangeTree=rangeObject.getRangeTree();this.recursiveAddMarkup(rangeTree,markup,rangeObject,nesting);this.doCleanup({merge:true,removeempty:true},rangeObject)};GENTICS.Utils.Dom.prototype.recursiveAddMarkup=function(rangeTree,markup,rangeObject,nesting){for(var i=0;i<rangeTree.length;++i){if(rangeTree[i].type=="full"&&this.allowsNesting(markup.get(0),rangeTree[i].domobj)){if((nesting||rangeTree[i].domobj.nodeName!=markup.get(0).nodeName)&&(rangeTree[i].domobj.nodeType!=3||jQuery.trim(rangeTree[i].domobj.data).length!=0)){jQuery(rangeTree[i].domobj).wrap(markup);if(!nesting&&rangeTree[i].domobj.nodeType!=3){var innerRange=new GENTICS.Utils.RangeObject();innerRange.startContainer=innerRange.endContainer=rangeTree[i].domobj.parentNode;innerRange.startOffset=0;innerRange.endOffset=innerRange.endContainer.childNodes.length;this.removeMarkup(innerRange,markup,jQuery(rangeTree[i].domobj.parentNode))}}}else{if(false){}else{if(nesting||rangeTree[i].domobj.nodeName!=markup.get(0).nodeName){if(rangeTree[i].children&&rangeTree[i].children.length>0){this.recursiveAddMarkup(rangeTree[i].children,markup)}}}}}};GENTICS.Utils.Dom.prototype.findHighestElement=function(start,nodeName,limit){var testObject=start;nodeName=nodeName.toLowerCase();var isLimit=limit?function(){return limit.filter(function(){return testObject==this}).length}:function(){return false};var highestObject=undefined;while(!isLimit()&&testObject){if(testObject.nodeName.toLowerCase()==nodeName){highestObject=testObject}testObject=testObject.parentNode}return highestObject};GENTICS.Utils.Dom.prototype.removeMarkup=function(rangeObject,markup,limit){var nodeName=markup.get(0).nodeName;var startSplitLimit=this.findHighestElement(rangeObject.startContainer,nodeName,limit);var endSplitLimit=this.findHighestElement(rangeObject.endContainer,nodeName,limit);var didSplit=false;if(startSplitLimit){this.split(rangeObject,jQuery(startSplitLimit).parent(),false);didSplit=true}if(endSplitLimit){this.split(rangeObject,jQuery(endSplitLimit).parent(),true);didSplit=true}if(didSplit){rangeObject.correctRange()}var highestObject=this.findHighestElement(rangeObject.getCommonAncestorContainer(),nodeName,limit);var root=highestObject?highestObject.parentNode:undefined;var rangeTree=rangeObject.getRangeTree(root);this.recursiveRemoveMarkup(rangeTree,markup);this.doCleanup({merge:true,removeempty:true},rangeObject,root)};GENTICS.Utils.Dom.prototype.recursiveRemoveMarkup=function(rangeTree,markup){for(var i=0;i<rangeTree.length;++i){if(rangeTree[i].type=="full"&&rangeTree[i].domobj.nodeName==markup.get(0).nodeName){var content=jQuery(rangeTree[i].domobj).contents();if(content.length>0){content.first().unwrap()}else{jQuery(rangeTree[i].domobj).remove()}}if(rangeTree[i].children){this.recursiveRemoveMarkup(rangeTree[i].children,markup)}}};GENTICS.Utils.Dom.prototype.doCleanup=function(cleanup,rangeObject,start){var that=this;if(typeof cleanup=="undefined"){cleanup={merge:true,removeempty:true}}if(typeof start=="undefined"){if(rangeObject){start=rangeObject.getCommonAncestorContainer()}}var prevNode=false;var modifiedRange=false;var startObject=jQuery(start);startObject.contents().each(function(index){switch(this.nodeType){case 1:if(prevNode&&prevNode.nodeName==this.nodeName){if(rangeObject.startContainer===startObject&&rangeObject.startOffset>index){rangeObject.startOffset-=1;modifiedRange=true}if(rangeObject.endContainer===startObject&&rangeObject.endOffset>index){rangeObject.endOffset-=1;modifiedRange=true}jQuery(prevNode).append(jQuery(this).contents());modifiedRange|=that.doCleanup(cleanup,rangeObject,prevNode);jQuery(this).remove()}else{modifiedRange|=that.doCleanup(cleanup,rangeObject,this);var removed=false;if(cleanup.removeempty){if(GENTICS.Utils.Dom.isBlockLevelElement(this)&&this.childNodes.length==0){jQuery(this).remove();removed=true}if(jQuery.inArray(this.nodeName.toLowerCase(),that.mergeableTags)>=0&&jQuery(this).text().length==0){jQuery(this).remove();removed=true}}if(!removed){if(jQuery.inArray(this.nodeName.toLowerCase(),that.mergeableTags)>=0){prevNode=this}else{prevNode=false}}}break;case 3:if(prevNode&&prevNode.nodeType==3&&cleanup.merge){if(rangeObject.startContainer===this){rangeObject.startContainer=prevNode;rangeObject.startOffset+=prevNode.length;modifiedRange=true}if(rangeObject.endContainer===this){rangeObject.endContainer=prevNode;rangeObject.endOffset+=prevNode.length;modifiedRange=true}if(rangeObject.startContainer===startObject&&rangeObject.startOffset>index){rangeObject.startOffset-=1;modifiedRange=true}if(rangeObject.endContainer===startObject&&rangeObject.endOffset>index){rangeObject.endOffset-=1;modifiedRange=true}prevNode.data+=this.data;jQuery(this).remove()}else{prevNode=this}break}});if(cleanup.removeempty&&GENTICS.Utils.Dom.isBlockLevelElement(start)&&(!start.childNodes||start.childNodes.length==0)){if(rangeObject.startContainer==start){rangeObject.startContainer=start.parentNode;rangeObject.startOffset=GENTICS.Utils.Dom.getIndexInParent(start)}if(rangeObject.endContainer==start){rangeObject.endContainer=start.parentNode;rangeObject.endOffset=GENTICS.Utils.Dom.getIndexInParent(start)}startObject.remove();modifiedRange=true}if(modifiedRange){rangeObject.clearCaches()}return modifiedRange};GENTICS.Utils.Dom.prototype.getIndexInParent=function(node){if(!node){return false}var index=0;var check=node.previousSibling;while(check){index++;check=check.previousSibling}return index};GENTICS.Utils.Dom.prototype.isBlockLevelElement=function(node){if(!node){return false}if(node.nodeType==1&&jQuery.inArray(node.nodeName.toLowerCase(),this.blockLevelElements)>=0){return true}else{return false}};GENTICS.Utils.Dom.prototype.isLineBreakElement=function(node){if(!node){return false}return node.nodeType==1&&node.nodeName.toLowerCase()=="br"};GENTICS.Utils.Dom.prototype.isListElement=function(node){if(!node){return false}return node.nodeType==1&&jQuery.inArray(node.nodeName.toLowerCase(),this.listElements)>=0};GENTICS.Utils.Dom.prototype.isSplitObject=function(el){if(el.nodeType===1){switch(el.nodeName.toLowerCase()){case"p":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":case"li":return true}}return false};GENTICS.Utils.Dom.prototype.searchAdjacentTextNode=function(parent,index,searchleft,stopat){if(!parent||parent.nodeType!=1||index<0||index>parent.childNodes.length){return false}if(typeof stopat=="undefined"){stopat={blocklevel:true,list:true,linebreak:true}}if(stopat.blocklevel=="undefined"){stopal.blocklevel=true}if(stopat.list=="undefined"){stopal.list=true}if(stopat.linebreak=="undefined"){stopal.linebreak=true}if(typeof searchleft=="undefined"){searchleft=true}var nextNode=undefined;var currentParent=parent;if(searchleft&&index>0){nextNode=parent.childNodes[index-1]}if(!searchleft&&index<parent.childNodes.length){nextNode=parent.childNodes[index]}while(typeof currentParent!="undefined"){if(!nextNode){if(stopat.blocklevel&&this.isBlockLevelElement(currentParent)){return false}else{if(stopat.list&&this.isListElement(currentParent)){return false}else{nextNode=searchleft?currentParent.previousSibling:currentParent.nextSibling;currentParent=currentParent.parentNode}}}else{if(nextNode.nodeType==3&&jQuery.trim(nextNode.data).length>0){return nextNode}else{if(stopat.blocklevel&&this.isBlockLevelElement(nextNode)){return false}else{if(stopat.linebreak&&this.isLineBreakElement(nextNode)){return false}else{if(stopat.list&&this.isListElement(nextNode)){return false}else{if(nextNode.nodeType==3){nextNode=searchleft?nextNode.previousSibling:nextNode.nextSibling}else{currentParent=nextNode;nextNode=searchleft?nextNode.lastChild:nextNode.firstChild}}}}}}}};GENTICS.Utils.Dom.prototype.insertIntoDOM=function(object,range,limit,atEnd){var parentElements=range.getContainerParents(limit,atEnd);var that=this;var newParent;if(!limit){limit=jQuery(document.body)}if(parentElements.length==0){newParent=limit.get(0)}else{jQuery.each(parentElements,function(index,parent){if(that.allowsNesting(parent,object.get(0))){newParent=parent;return false}})}if(typeof newParent=="undefined"&&limit.length>0){newParent=limit.get(0)}if(typeof newParent!="undefined"){var splitParts=this.split(range,jQuery(newParent),atEnd);if(splitParts){splitParts.eq(0).after(object);return true}else{return false}}else{return false}};GENTICS.Utils.Dom.prototype.removeFromDOM=function(object,range,preserveContent){if(preserveContent){var indexInParent=this.getIndexInParent(object);var numChildren=jQuery(object).contents().length;var parent=object.parentNode;if(range.startContainer==parent&&range.startOffset>indexInParent){range.startOffset+=numChildren-1}else{if(range.startContainer==object){range.startContainer=parent;range.startOffset=indexInParent+range.startOffset}}if(range.endContainer==parent&&range.endOffset>indexInParent){range.endOffset+=numChildren-1}else{if(range.endContainer==object){range.endContainer=parent;range.endOffset=indexInParent+range.endOffset}}jQuery(object).contents().unwrap();this.doCleanup({merge:true},range,parent)}else{}};GENTICS.Utils.Dom.prototype.extendToWord=function(range,fromBoundaries){var leftBoundary=this.searchWordBoundary(range.startContainer,range.startOffset,true);var rightBoundary=this.searchWordBoundary(range.endContainer,range.endOffset,false);if(!fromBoundaries){if(range.startContainer==leftBoundary.container&&range.startOffset==leftBoundary.offset){return}if(range.endContainer==rightBoundary.container&&range.endOffset==rightBoundary.offset){return}}range.startContainer=leftBoundary.container;range.startOffset=leftBoundary.offset;range.endContainer=rightBoundary.container;range.endOffset=rightBoundary.offset;range.correctRange();range.clearCaches()};GENTICS.Utils.Dom.prototype.isWordBoundaryElement=function(object){if(!object||!object.nodeName){return false}return jQuery.inArray(object.nodeName.toLowerCase(),this.nonWordBoundaryTags)==-1};GENTICS.Utils.Dom.prototype.searchWordBoundary=function(container,offset,searchleft){if(typeof searchleft=="undefined"){searchleft=true}var boundaryFound=false;while(!boundaryFound){if(container.nodeType==3){if(!searchleft){var wordBoundaryPos=container.data.substring(offset).search(/\W/);if(wordBoundaryPos!=-1){offset=offset+wordBoundaryPos;boundaryFound=true}else{offset=this.getIndexInParent(container)+1;container=container.parentNode}}else{var wordBoundaryPos=container.data.substring(0,offset).search(/\W/);var tempWordBoundaryPos=wordBoundaryPos;while(tempWordBoundaryPos!=-1){wordBoundaryPos=tempWordBoundaryPos;tempWordBoundaryPos=container.data.substring(wordBoundaryPos+1,offset).search(/\W/);if(tempWordBoundaryPos!=-1){tempWordBoundaryPos=tempWordBoundaryPos+wordBoundaryPos+1}}if(wordBoundaryPos!=-1){offset=wordBoundaryPos+1;boundaryFound=true}else{offset=this.getIndexInParent(container);container=container.parentNode}}}else{if(container.nodeType==1){if(!searchleft){if(offset<container.childNodes.length){if(this.isWordBoundaryElement(container.childNodes[offset])){boundaryFound=true}else{container=container.childNodes[offset];offset=0}}else{if(this.isWordBoundaryElement(container)){boundaryFound=true}else{offset=this.getIndexInParent(container)+1;container=container.parentNode}}}else{if(offset>0){if(this.isWordBoundaryElement(container.childNodes[offset-1])){boundaryFound=true}else{container=container.childNodes[offset-1];offset=container.nodeType==3?container.data.length:container.childNodes.length}}else{if(this.isWordBoundaryElement(container)){boundaryFound=true}else{offset=this.getIndexInParent(container);container=container.parentNode}}}}}}if(container.nodeType!=3){var textNode=this.searchAdjacentTextNode(container,offset,!searchleft);if(textNode){container=textNode;offset=searchleft?0:container.data.length}}return{container:container,offset:offset}};GENTICS.Utils.Dom.prototype.isEmpty=function(domObject){if(!domObject){return true}if(jQuery.inArray(domObject.nodeName.toLowerCase(),this.nonEmptyTags)!=-1){return false}if(domObject.nodeType==3){return domObject.data.search(/\S/)==-1}for(var i=0;i<domObject.childNodes.length;++i){if(!this.isEmpty(domObject.childNodes[i])){return false}}return true};GENTICS.Utils.Dom=new GENTICS.Utils.Dom();
36
+ /*
37
+ * Aloha Editor
38
+ * Author & Copyright (c) 2010 Gentics Software GmbH
39
+ * aloha-sales@gentics.com
40
+ * Licensed unter the terms of http://www.aloha-editor.com/license.html
41
+ */
42
+ if(typeof GENTICS=="undefined"||!GENTICS){
43
+ /*
44
+ * The GENTICS global namespace object. If GENTICS is already defined, the
45
+ * existing GENTICS object will not be overwritten so that defined
46
+ * namespaces are preserved.
47
+ */
48
+ var GENTICS={}}GENTICS.Aloha=function(){};GENTICS.Aloha.setAutobase=function(){var scriptTags=document.getElementsByTagName("script");var path=scriptTags[scriptTags.length-1].src.split("?")[0];path=path.split("/");var substitute=1;if("core"===path[path.length-2]){substitute=2}GENTICS.Aloha.prototype.autobase=path.slice(0,substitute*-1).join("/")+"/"};GENTICS.Aloha.setAutobase();GENTICS.Aloha.prototype.version="nightly";GENTICS.Aloha.prototype.editables=new Array();GENTICS.Aloha.prototype.activeEditable=null;GENTICS.Aloha.prototype.ready=false;GENTICS.Aloha.prototype.dictionaries={};GENTICS.Aloha.prototype.settings={};GENTICS.Aloha.prototype.OSName="Unknown";GENTICS.Aloha.prototype.init=function(){var that=this;jQuery("html").mousedown(function(){if(that.activeEditable&&!that.isMessageVisible()){that.activeEditable.blur();that.FloatingMenu.setScope("GENTICS.Aloha.empty");that.activeEditable=null}});if(typeof this.settings.base=="undefined"||!this.settings.base){this.settings.base=GENTICS.Aloha.autobase;if(typeof GENTICS_Aloha_base!="undefined"){this.settings.base=GENTICS_Aloha_base}}this.Log.init();if(!(this.settings.errorhandling==false)){window.onerror=function(msg,url,linenumber){GENTICS.Aloha.Log.error(GENTICS.Aloha,"Error message: "+msg+"\nURL: "+url+"\nLine Number: "+linenumber);return true}}if(navigator.appVersion.indexOf("Win")!=-1){this.OSName="Win"}if(navigator.appVersion.indexOf("Mac")!=-1){this.OSName="Mac"}if(navigator.appVersion.indexOf("X11")!=-1){this.OSName="Unix"}if(navigator.appVersion.indexOf("Linux")!=-1){this.OSName="Linux"}this.initI18n();this.PluginRegistry.init();this.Ribbon.init();this.FloatingMenu.init();Ext.MessageBox.buttonText.yes=GENTICS.Aloha.i18n(this,"yes");Ext.MessageBox.buttonText.no=GENTICS.Aloha.i18n(this,"no");Ext.MessageBox.buttonText.cancel=GENTICS.Aloha.i18n(this,"cancel");this.ready=true;for(var i=0;i<this.editables.length;i++){this.editables[i].init()}};GENTICS.Aloha.prototype.activateEditable=function(editable){for(var i=0;i<this.editables.length;i++){if(this.editables[i]!=editable&&this.editables[i].isActive){var oldActive=this.editables[i];this.editables[i].blur()}}this.activeEditable=editable};GENTICS.Aloha.prototype.getActiveEditable=function(){return this.activeEditable};GENTICS.Aloha.prototype.deactivateEditable=function(){if(typeof this.activeEditable=="undefined"||this.activeEditable==null){return}this.activeEditable.blur();this.FloatingMenu.setScope("GENTICS.Aloha.empty");this.activeEditable=null};GENTICS.Aloha.prototype.log=function(level,component,message){GENTICS.Aloha.Log.log(level,component,message)};GENTICS.Aloha.prototype.identStr=function(object){if(object instanceof jQuery){object=object[0]}if(!(object instanceof HTMLElement)){GENTICS.Aloha.Log.warn(this,"{"+object.toString()+"} provided is not an HTML element");return object.toString()}var out=object.tagName.toLowerCase();if(object.id){return out+"#"+object.id}if(object.className){return out+"."+object.className}return out};GENTICS.Aloha.prototype.trim=function(str){str=str.replace(/^\s+/,"");for(var i=str.length-1;i>=0;i--){if(/\S/.test(str.charAt(i))){str=str.substring(0,i+1);break}}return str};GENTICS.Aloha.prototype.initI18n=function(){if(typeof this.settings.i18n=="undefined"||!this.settings.i18n){this.settings.i18n={}}if(typeof this.settings.i18n.available=="undefined"||!this.settings.i18n.available||!this.settings.i18n.available instanceof Array){this.settings.i18n.available=["en","de","fr","eo","fi","ru","it"]}if((typeof this.settings.i18n.current=="undefined"||!this.settings.i18n.current)&&typeof this.settings.i18n.acceptLanguage=="string"){var acceptLanguage=[];var preferredLanugage=this.settings.i18n.acceptLanguage.split(",");for(i=0;i<preferredLanugage.length;i++){var lang=preferredLanugage[i].split(";");if(typeof lang[1]=="undefined"||!lang[1]){lang[1]=1}else{lang[1]=parseFloat(lang[1].substring(2,lang[1].length))}acceptLanguage.push(lang)}acceptLanguage.sort(function(a,b){return b[1]-a[1]});for(i=0;i<acceptLanguage.length;i++){if(jQuery.inArray(acceptLanguage[i][0],this.settings.i18n.available)>=0){this.settings.i18n.current=acceptLanguage[i][0];break}}}if(typeof this.settings.i18n.current=="undefined"||!this.settings.i18n.current){this.settings.i18n.current=(navigator.language?navigator.language:navigator.userLanguage)}var actualLanguage=this.getLanguage(this.settings.i18n.current,this.settings.i18n.available);if(!actualLanguage){GENTICS.Aloha.Log.error(this,"Could not determine actual language.")}else{var fileUrl=this.settings.base+"i18n/"+actualLanguage+".dict";this.loadI18nFile(fileUrl,this)}};GENTICS.Aloha.prototype.getLanguage=function(language,availableLanguages){if(!availableLanguages instanceof Array){GENTICS.Aloha.Log.error(this,"Available languages must be an Array");return null}if(typeof language=="undefined"||!language){return availableLanguages[0]}for(var i=0;i<availableLanguages.length;++i){if(language==availableLanguages[i]){return language}}return availableLanguages[0]};GENTICS.Aloha.prototype.loadI18nFile=function(fileUrl,component){jQuery.ajax({async:false,datatype:"text",url:fileUrl,error:function(request,textStatus,error){GENTICS.Aloha.Log.error(component,"Error while getting dictionary file "+fileUrl+": server returned "+textStatus)},success:function(data,textStatus,request){if(GENTICS.Aloha.Log.isInfoEnabled()){GENTICS.Aloha.Log.info(component,"Loaded dictionary file "+fileUrl)}GENTICS.Aloha.parseI18nFile(data,component)}})};GENTICS.Aloha.prototype.parseI18nFile=function(data,component){data=data.replace(/\r/g,"");var entries=data.split("\n");var dictionary=new Object();for(var i=0;i<entries.length;++i){var entry=entries[i];var equal=entry.indexOf("=");if(equal>0){var key=GENTICS.Aloha.trim(entry.substring(0,equal));var value=GENTICS.Aloha.trim(entry.substring(equal+1,entry.length));value=value.replace(/\\n/g,"\n");value=value.replace(/\\\\/g,"\\");if(dictionary[key]){GENTICS.Aloha.Log.warn(component,"Found duplicate key "+key+" in dictionary file, ignoring")}else{dictionary[key]=value}}}this.dictionaries[component.toString()]=dictionary};GENTICS.Aloha.prototype.i18n=function(component,key,replacements){var value=null;if(this.dictionaries[component.toString()]){if(this.dictionaries[component.toString()][key]){value=this.dictionaries[component.toString()][key]}}if(!value&&component!=GENTICS.Aloha){if(this.dictionaries[GENTICS.Aloha.toString()]){if(this.dictionaries[GENTICS.Aloha.toString()][key]){value=this.dictionaries[GENTICS.Aloha.toString()][key]}}}if(!value){return"??? "+key+" ???"}else{if(typeof replacements!="undefined"&&replacements!=null){for(var i=0;i<replacements.length;++i){if(typeof replacements[i]!="undefined"&&replacements[i]!=null){var regEx=new RegExp("\\{"+(i)+"\\}","g");var safeArgument=replacements[i].toString().replace(/\{/g,"\\{");safeArgument=safeArgument.replace(/\}/g,"\\}");value=value.replace(regEx,safeArgument)}}}value=value.replace(/\{\d\}/g,"");value=value.replace(/\\\{/g,"{");value=value.replace(/\\\}/g,"}");return value}};GENTICS.Aloha.prototype.registerEditable=function(editable){this.editables.push(editable)};GENTICS.Aloha.prototype.unregisterEditable=function(editable){var id=this.editables.indexOf(editable);if(id!=-1){this.editables.splice(id,1)}};GENTICS.Aloha.prototype.showMessage=function(message){if(GENTICS.Aloha.FloatingMenu.obj){GENTICS.Aloha.FloatingMenu.obj.css("z-index",8900)}switch(message.type){case GENTICS.Aloha.Message.Type.ALERT:Ext.MessageBox.alert(message.title,message.text,message.callback);break;case GENTICS.Aloha.Message.Type.CONFIRM:Ext.MessageBox.confirm(message.title,message.text,message.callback);break;case GENTICS.Aloha.Message.Type.WAIT:Ext.MessageBox.wait(message.text,message.title);break;default:this.log("warn",this,"Unknown message type for message {"+message.toString()+"}");break}};GENTICS.Aloha.prototype.hideMessage=function(){Ext.MessageBox.hide()};GENTICS.Aloha.prototype.isMessageVisible=function(){return Ext.MessageBox.isVisible()};GENTICS.Aloha.prototype.toString=function(){return"GENTICS.Aloha"};GENTICS.Aloha.prototype.isModified=function(){for(var i in this.editables){if(this.editables[i].isModified){if(this.editables[i].isModified()){return true}}}return false};GENTICS.Aloha=new GENTICS.Aloha();if(!Array.indexOf){Array.prototype.indexOf=function(obj){for(var i=0;i<this.length;i++){if(this[i]===obj){return i}}return -1}}jQuery(document).ready(function(){if(Ext.isReady){GENTICS.Aloha.init()}else{Ext.onReady(function(){GENTICS.Aloha.init()})}});
49
+ /*
50
+ * Aloha Editor
51
+ * Author & Copyright (c) 2010 Gentics Software GmbH
52
+ * aloha-sales@gentics.com
53
+ * Licensed unter the terms of http://www.aloha-editor.com/license.html
54
+ */
55
+ if(typeof GENTICS.Aloha.ui=="undefined"){GENTICS.Aloha.ui=function(){}}GENTICS.Aloha.ui.Button=function(properties){this.label;this.iconClass;this.icon;this.onclick;this.menu;this.toggle;this.pressed=false;this.visible=true;this.enabled=true;this.tooltip;this.extButton;GENTICS.Utils.applyProperties(this,properties);this.id=this.generateId()};GENTICS.Aloha.ui.Button.idCounter=0;GENTICS.Aloha.ui.Button.prototype.generateId=function(){GENTICS.Aloha.ui.Button.idCounter=GENTICS.Aloha.ui.Button.idCounter+1;return"GENTICS_Aloha_ui_Button_"+GENTICS.Aloha.ui.Button.idCounter};GENTICS.Aloha.ui.Button.prototype.setPressed=function(pressed){if(this.toggle){this.pressed=pressed;if(typeof this.extButton=="object"&&this.extButton.pressed!=pressed){this.extButton.toggle(this.pressed)}}};GENTICS.Aloha.ui.Button.prototype.isPressed=function(){if(this.toggle){return this.pressed}else{return false}};GENTICS.Aloha.ui.Button.prototype.show=function(){this.visible=true};GENTICS.Aloha.ui.Button.prototype.hide=function(){this.visible=false};GENTICS.Aloha.ui.Button.prototype.isVisible=function(){return this.visible};GENTICS.Aloha.ui.Button.prototype.enable=function(){this.enabled=true;if(typeof this.extButton=="object"){this.extButton.enable()}};GENTICS.Aloha.ui.Button.prototype.disable=function(){this.enabled=false;if(typeof this.extButton=="object"){this.extButton.disable()}};GENTICS.Aloha.ui.Button.prototype.isEnabled=function(){return this.enabled};GENTICS.Aloha.ui.Button.prototype.getExtMenu=function(){if(typeof this.menu==="object"){var menu=new Ext.menu.Menu();for(var i=0;i<this.menu.length;++i){var entry=this.menu[i];menu.addItem(new Ext.menu.Item(entry.getExtMenuConfigProperties()))}}return menu};GENTICS.Aloha.ui.Button.prototype.getExtMenuConfigProperties=function(){var that=this;var submenu=this.getExtMenu();return{text:this.label,icon:this.icon,iconCls:this.iconClass,handler:function(){if(typeof that.onclick=="function"){that.onclick()}},menu:submenu}};GENTICS.Aloha.ui.Button.prototype.getExtConfigProperties=function(){var that=this;var menu=this.getExtMenu();var buttonConfig={text:this.label,enableToggle:this.toggle,pressed:this.pressed,icon:this.icon,iconCls:this.iconClass,scale:this.size,rowspan:(this.size=="large"||this.size=="medium")?2:1,menu:menu,handler:function(element,event){if(typeof that.onclick==="function"){that.onclick.apply(that,[element,event])}that.pressed=!that.pressed},xtype:(menu&&typeof this.onclick=="function")?"splitbutton":"button",tooltipType:"qtip",tooltip:this.tooltip,id:this.id,arrowAlign:this.size=="large"||this.size=="small"?"right":"bottom"};return buttonConfig};Ext.ux.GENTICSMultiSplitButton=Ext.extend(Ext.Component,{autoEl:{cls:"GENTICS_multisplit-wrapper"},ulObj:null,panelButton:null,wrapper:null,panelOpened:false,onRender:function(){Ext.ux.GENTICSMultiSplitButton.superclass.onRender.apply(this,arguments);this.wrapper=jQuery(this.el.dom);var item;var html='<ul class="GENTICS_multisplit">';for(var i=0;i<this.items.length;i++){item=this.items[i];if(item.visible==undefined){item.visible=true}if(item.wide){continue}html+='<li><button xmlns:ext="http://www.extjs.com/" class="'+item.iconClass+'" ext:qtip="'+item.tooltip+'" gtxmultisplititem="'+i+'">&#160;</button></li>'}for(var i=0;i<this.items.length;i++){item=this.items[i];if(!item.wide){continue}html+='<li><button xmlns:ext="http://www.extjs.com/" class="GENTICS_multisplit-wide '+item.iconClass+'" ext:qtip="'+item.tooltip+'" gtxmultisplititem="'+i+'">'+item.text+"</button></li>"}html+="</ul>";var that=this;GENTICS.Aloha.FloatingMenu.extTabPanel.on("move",function(){that.closePanel()});GENTICS.Aloha.FloatingMenu.extTabPanel.on("tabchange",function(){that.closePanel()});this.ulObj=jQuery(this.el.createChild(html).dom);this.ulObj.click(function(event){that.onClick(event)});this.panelButton=jQuery(this.el.createChild('<button class="GENTICS_multisplit_toggle GENTICS_multisplit_toggle_open">&#160;</button>').dom);this.panelButton.click(function(){that.togglePanel()})},onClick:function(event){if(!event.target.attributes.gtxmultisplititem){return}var el=jQuery(event.target);this.closePanel();if(!el.hasClass("GENTICS_multisplit-wide")){this.setActiveDOMElement(el)}this.items[event.target.attributes.gtxmultisplititem.value].click()},setActiveItem:function(name){this.closePanel();if(this.activeItem==name){return}for(var i=0;i<this.items.length;i++){if(this.items[i].name==name){var button=jQuery(this.ulObj).find("[gtxmultisplititem="+i+"]");this.setActiveDOMElement(button);this.activeItem=name;return}}this.activeItem=null;this.setActiveDOMElement(null)},setActiveDOMElement:function(el){var ct=this;while(typeof ct!="undefined"){if(ct.hidden){this.activeDOMElement=el;return}ct=ct.ownerCt}jQuery(this.ulObj).find(".GENTICS_multisplit-activeitem").removeClass("GENTICS_multisplit-activeitem");if(el){el.addClass("GENTICS_multisplit-activeitem")}if(el==null||el.parent().is(":hidden")){return}if(el){this.ulObj.css("margin-top",0);var top=el.position().top;this.ulObj.css("margin-top",-top+6);this.ulObj.css("height",46+top-6)}this.activeDOMElement=undefined},togglePanel:function(){if(this.panelOpened){this.closePanel()}else{this.openPanel()}},openPanel:function(){if(this.panelOpened){return}this.ulObj.appendTo(jQuery(document.body));this.ulObj.addClass("GENTICS_multisplit-expanded");this.ulObj.mousedown(function(e){e.stopPropagation()});var o=this.wrapper.offset();this.ulObj.css("top",o.top-1);this.ulObj.css("left",o.left-1);this.ulObj.animate({height:this.ulObj.attr("scrollHeight")});this.panelButton.removeClass("GENTICS_multisplit_toggle_open");this.panelButton.addClass("GENTICS_multisplit_toggle_close");this.panelOpened=true},closePanel:function(){if(!this.panelOpened){return}this.ulObj.removeClass("GENTICS_multisplit-expanded");this.ulObj.appendTo(this.wrapper);this.panelButton.addClass("GENTICS_multisplit_toggle_open");this.panelButton.removeClass("GENTICS_multisplit_toggle_close");this.panelOpened=false},hideItem:function(name){for(var i=0;i<this.items.length;i++){if(this.items[i].name==name){this.items[i].visible=false;jQuery("#"+this.id+" [gtxmultisplititem="+i+"]").parent().hide();return}}},showItem:function(name){for(var i=0;i<this.items.length;i++){if(this.items[i].name==name){this.items[i].visible=true;jQuery("#"+this.id+" [gtxmultisplititem="+i+"]").parent().show();return}}}});Ext.reg("genticsmultisplitbutton",Ext.ux.GENTICSMultiSplitButton);GENTICS.Aloha.ui.MultiSplitButton=function(properties){this.items;GENTICS.Utils.applyProperties(this,properties);this.id=this.generateId()};GENTICS.Aloha.ui.MultiSplitButton.idCounter=0;GENTICS.Aloha.ui.MultiSplitButton.prototype.generateId=function(){GENTICS.Aloha.ui.MultiSplitButton.idCounter=GENTICS.Aloha.ui.MultiSplitButton.idCounter+1;return"GENTICS_Aloha_ui_MultiSplitButton_"+GENTICS.Aloha.ui.MultiSplitButton.idCounter};GENTICS.Aloha.ui.MultiSplitButton.prototype.getExtConfigProperties=function(){return{xtype:"genticsmultisplitbutton",items:this.items,id:this.id}};GENTICS.Aloha.ui.MultiSplitButton.prototype.setActiveItem=function(name){this.extButton.setActiveItem(name)};GENTICS.Aloha.ui.MultiSplitButton.prototype.isVisible=function(){for(var i=0;i<this.items.length;i++){if(this.items[i].visible){return true}}return false};GENTICS.Aloha.ui.MultiSplitButton.prototype.showItem=function(name){this.extButton.showItem(name)};GENTICS.Aloha.ui.MultiSplitButton.prototype.hideItem=function(name){this.extButton.hideItem(name)};(function(){if(typeof this.GENTICS_Aloha_autoloadcss=="undefined"||!(this.GENTICS_Aloha_autoloadcss==false)){var base=GENTICS.Aloha.autobase;if(typeof GENTICS_Aloha_base!="undefined"){base=GENTICS_Aloha_base}var header=document.getElementsByTagName("head")[0];header.appendChild(cssElement(base+"css/aloha.css?v="+GENTICS.Aloha.version));header.appendChild(cssElement(base+"deps/extjs/resources/css/ext-all.css?v="+GENTICS.Aloha.version));header.appendChild(cssElement(base+"deps/extjs/resources/css/xtheme-gray.css?v="+GENTICS.Aloha.version));header.appendChild(cssElement(base+"deps/prettyPhoto/resources/css/prettyPhoto.css?v="+GENTICS.Aloha.version));header.appendChild(cssElement(base+"plugins/com.gentics.aloha.plugins.Table/resources/table.css?v="+GENTICS.Aloha.version));header.appendChild(cssElement(base+"plugins/com.gentics.aloha.plugins.Link/css/jquery.autocomplete.css?v="+GENTICS.Aloha.version));header.appendChild(cssElement(base+"plugins/com.gentics.aloha.plugins.Link/css/Link.css?v="+GENTICS.Aloha.version));header.appendChild(cssElement(base+"plugins/com.gentics.aloha.plugins.HighlightEditables/css/HighlightEditables.css?v="+GENTICS.Aloha.version))}function cssElement(link){var csslink=document.createElement("link");csslink.setAttribute("rel","stylesheet");csslink.setAttribute("type","text/css");csslink.setAttribute("href",link);csslink.setAttribute("media","all");return csslink}})();
56
+ /*
57
+ * Aloha Editor
58
+ * Author & Copyright (c) 2010 Gentics Software GmbH
59
+ * aloha-sales@gentics.com
60
+ * Licensed unter the terms of http://www.aloha-editor.com/license.html
61
+ */
62
+ GENTICS.Aloha.Editable=function(obj){this.obj=obj;this.ready=false;GENTICS.Aloha.registerEditable(this);this.init()};GENTICS.Aloha.Editable.prototype.isActive=false;GENTICS.Aloha.Editable.prototype.originalContent=null;GENTICS.Aloha.Editable.prototype.range=undefined;GENTICS.Aloha.Editable.prototype.init=function(){var that=this;if(GENTICS.Aloha.ready){this.obj.addClass("GENTICS_editable");this.obj.attr("contenteditable",true);this.obj.mousedown(function(e){that.activate(e);e.stopPropagation()});this.obj.focus(function(e){that.activate(e)});this.obj.keydown(function(event){return GENTICS.Aloha.Markup.preProcessKeyStrokes(event)});this.obj.keyup(function(event){if(event.keyCode==27){GENTICS.Aloha.deactivateEditable();return false}});this.obj.GENTICS_contentEditableSelectionChange(function(event){GENTICS.Aloha.Selection.onChange(that.obj,event);return that.obj});GENTICS.Aloha.EventRegistry.trigger(new GENTICS.Aloha.Event("editableCreated",GENTICS.Aloha,[this]));this.setUnmodified();this.ready=true}};GENTICS.Aloha.Editable.prototype.destroy=function(){var that=this;this.blur();this.ready=false;this.obj.removeClass("GENTICS_editable");this.obj.removeAttr("contenteditable");this.obj.unbind("mousedown");this.obj.unbind("focus");this.obj.unbind("keydown");this.obj.unbind("keyup");GENTICS.Aloha.EventRegistry.trigger(new GENTICS.Aloha.Event("editableDestroyed",GENTICS.Aloha,[this]));GENTICS.Aloha.unregisterEditable(this)};GENTICS.Aloha.Editable.prototype.setUnmodified=function(){this.originalContent=this.getContents()};GENTICS.Aloha.Editable.prototype.isModified=function(){if(this.originalContent!=this.getContents()){return true}else{return false}};GENTICS.Aloha.Editable.prototype.toString=function(){return"GENTICS.Aloha.Editable"};GENTICS.Aloha.Editable.prototype.activate=function(e){if(this.isActive){return}var oldActive=GENTICS.Aloha.getActiveEditable();GENTICS.Aloha.activateEditable(this);if(document.selection&&document.selection.createRange){this.obj.mouseup()}this.isActive=true;GENTICS.Aloha.EventRegistry.trigger(new GENTICS.Aloha.Event("editableActivated",GENTICS.Aloha,{oldActive:oldActive,editable:this}));GENTICS.Aloha.EventRegistry.trigger(new GENTICS.Aloha.Event("editableActivated",this,{oldActive:GENTICS.Aloha.getActiveEditable()}))};GENTICS.Aloha.Editable.prototype.blur=function(){this.obj.blur();this.isActive=false;GENTICS.Aloha.EventRegistry.trigger(new GENTICS.Aloha.Event("editableDeactivated",GENTICS.Aloha,{editable:this}));GENTICS.Aloha.EventRegistry.trigger(new GENTICS.Aloha.Event("editableDeactivated",this))};GENTICS.Aloha.Editable.prototype.empty=function(str){if(null===str){return true}return(GENTICS.Aloha.trim(str)==""||str=="<br>")};GENTICS.Aloha.Editable.prototype.getContents=function(){var clonedObj=this.obj.clone(true);GENTICS.Aloha.PluginRegistry.makeClean(clonedObj);return clonedObj.html()};GENTICS.Aloha.Editable.prototype.getId=function(){return this.obj.attr("id")};
63
+ /*
64
+ * Aloha Editor
65
+ * Author & Copyright (c) 2010 Gentics Software GmbH
66
+ * aloha-sales@gentics.com
67
+ * Licensed unter the terms of http://www.aloha-editor.com/license.html
68
+ */
69
+ GENTICS.Aloha.Ribbon=function(){var that=this;this.toolbar=new Ext.Toolbar({height:30,cls:"GENTICS_ribbon ext-root"});this.toolbar.add(new Ext.Toolbar.Spacer({width:"5"}));this.icon=new Ext.Toolbar.Spacer();this.toolbar.add(this.icon);this.toolbar.add(new Ext.Toolbar.Fill());this.toolbar.add(new Ext.Toolbar.Separator());var fadeButton=new Ext.Button({iconCls:"GENTICS_fade_out",handler:function(button){var toolbar=jQuery(that.toolbar.getEl().dom);if(button.iconCls=="GENTICS_fade_out"){toolbar.css("marginLeft","34px");toolbar.animate({left:"-100%"});jQuery("body").animate({paddingTop:0});button.setIconClass("GENTICS_fade_in")}else{toolbar.css("marginLeft","0px");toolbar.animate({left:"0%"});jQuery("body").animate({paddingTop:30});button.setIconClass("GENTICS_fade_out")}that.toolbar.doLayout()}});this.toolbar.add(fadeButton);this.toolbar.add(new Ext.Toolbar.Spacer({width:"5"}))};GENTICS.Aloha.Ribbon.prototype.setIcon=function(iconClass){if(typeof this.icon.cls!="undefined"){this.icon.removeClass(this.icon.cls)}this.icon.addClass(iconClass)};GENTICS.Aloha.Ribbon.prototype.addButton=function(button){if(typeof button.menu==="object"){var menu=new Ext.menu.Menu();jQuery.each(button.menu,function(index,entry){menu.addItem(new Ext.menu.Item({text:entry.label,icon:entry.icon,iconCls:entry.iconClass,handler:function(){entry.onclick.apply(entry)}}))})}var buttonConfig={text:button.label,enableToggle:button.toggle,icon:button.icon,pressed:button.pressed,iconCls:button.iconClass,menu:menu,handler:function(){if(typeof button.onclick==="function"){button.onclick.apply(button)}button.pressed=!button.pressed}};var extButton;if(menu&&typeof button.onclick=="function"){extButton=new Ext.SplitButton(buttonConfig)}else{extButton=new Ext.Button(buttonConfig)}this.toolbar.insert(this.toolbar.items.getCount()-3,extButton)};GENTICS.Aloha.Ribbon.prototype.addSeparator=function(){this.toolbar.insert(this.toolbar.items.getCount()-3,new Ext.Toolbar.Separator())};GENTICS.Aloha.Ribbon.prototype.init=function(){this.toolbar.render(document.body,0);if(GENTICS.Aloha.settings.ribbon!==false){jQuery("body").css("paddingTop","30px !important");this.show()}};GENTICS.Aloha.Ribbon.prototype.hide=function(){jQuery(".GENTICS_ribbon").fadeOut()};GENTICS.Aloha.Ribbon.prototype.show=function(){jQuery(".GENTICS_ribbon").fadeIn()};GENTICS.Aloha.Ribbon=new GENTICS.Aloha.Ribbon();
70
+ /*
71
+ * Aloha Editor
72
+ * Author & Copyright (c) 2010 Gentics Software GmbH
73
+ * aloha-sales@gentics.com
74
+ * Licensed unter the terms of http://www.aloha-editor.com/license.html
75
+ */
76
+ GENTICS.Aloha.Event=function(eventName,eventSource,properties){this.name=eventName;if(eventSource){this.source=eventSource}else{this.source=GENTICS.Aloha}this.properties=properties};GENTICS.Aloha.EventRegistry=function(){};GENTICS.Aloha.EventRegistry.prototype.subscribe=function(eventSource,eventName,handleMethod){jQuery(eventSource).bind(eventName,handleMethod)};GENTICS.Aloha.EventRegistry.prototype.trigger=function(event){jQuery(event.source).trigger(event.name,event.properties)};GENTICS.Aloha.EventRegistry=new GENTICS.Aloha.EventRegistry();
77
+ /*
78
+ * Aloha Editor
79
+ * Author & Copyright (c) 2010 Gentics Software GmbH
80
+ * aloha-sales@gentics.com
81
+ * Licensed unter the terms of http://www.aloha-editor.com/license.html
82
+ */
83
+ GENTICS.Aloha.FloatingMenu={};GENTICS.Aloha.FloatingMenu.scopes={"GENTICS.Aloha.empty":{name:"GENTICS.Aloha.empty",extendedScopes:[],buttons:[]},"GENTICS.Aloha.global":{name:"GENTICS.Aloha.global",extendedScopes:["GENTICS.Aloha.empty"],buttons:[]},"GENTICS.Aloha.continuoustext":{name:"GENTICS.Aloha.continuoustext",extendedScopes:["GENTICS.Aloha.global"],buttons:[]}};GENTICS.Aloha.FloatingMenu.tabs=new Array();GENTICS.Aloha.FloatingMenu.tabMap={};GENTICS.Aloha.FloatingMenu.initialized=false;GENTICS.Aloha.FloatingMenu.allButtons=new Array();GENTICS.Aloha.FloatingMenu.top=100;GENTICS.Aloha.FloatingMenu.left=100;GENTICS.Aloha.FloatingMenu.pinned=false;GENTICS.Aloha.FloatingMenu.init=function(){this.currentScope="GENTICS.Aloha.global";var that=this;jQuery(window).unload(function(){if(that.pinned){jQuery.cookie("GENTICS.Aloha.FloatingMenu.pinned","true");jQuery.cookie("GENTICS.Aloha.FloatingMenu.top",that.obj.offset().top);jQuery.cookie("GENTICS.Aloha.FloatingMenu.left",that.obj.offset().left);if(GENTICS.Aloha.Log.isInfoEnabled()){GENTICS.Aloha.Log.info(this,"stored FloatingMenu pinned position {"+that.obj.offset().left+", "+that.obj.offset().top+"}")}}else{jQuery.cookie("GENTICS.Aloha.FloatingMenu.pinned",null);jQuery.cookie("GENTICS.Aloha.FloatingMenu.top",null);jQuery.cookie("GENTICS.Aloha.FloatingMenu.left",null)}if(that.userActivatedTab){jQuery.cookie("GENTICS.Aloha.FloatingMenu.activeTab",that.userActivatedTab)}}).resize(function(){var target=that.calcFloatTarget(GENTICS.Aloha.Selection.getRangeObject());if(target){that.floatTo(target)}});this.generateComponent();this.initialized=true};GENTICS.Aloha.FloatingMenu.obj=null;GENTICS.Aloha.FloatingMenu.shadow=null;GENTICS.Aloha.FloatingMenu.panelBody=null;GENTICS.Aloha.FloatingMenu.generateComponent=function(){var that=this;Ext.QuickTips.init();Ext.apply(Ext.QuickTips.getQuickTip(),{minWidth:10});if(this.extTabPanel){}this.extTabPanel=new Ext.TabPanel({activeTab:0,width:400,plain:false,draggable:{insertProxy:false,onDrag:function(e){var pel=this.proxy.getEl();this.x=pel.getLeft(true);this.y=pel.getTop(true);GENTICS.Aloha.FloatingMenu.shadow.hide()},endDrag:function(e){if(GENTICS.Aloha.FloatingMenu.pinned){var top=this.y-jQuery(document).scrollTop()}else{var top=this.y}that.left=this.x;that.top=top;this.panel.setPosition(this.x,top);GENTICS.Aloha.FloatingMenu.refreshShadow();GENTICS.Aloha.FloatingMenu.shadow.show()}},floating:true,defaults:{autoScroll:true},layoutOnTabChange:true,shadow:false,cls:"GENTICS_floatingmenu ext-root",listeners:{tabchange:{fn:function(tabPanel,tab){if(tab.title!=that.autoActivatedTab){if(GENTICS.Aloha.Log.isDebugEnabled()){GENTICS.Aloha.Log.debug(that,"User selected tab "+tab.title)}that.userActivatedTab=tab.title}else{if(GENTICS.Aloha.Log.isDebugEnabled()){GENTICS.Aloha.Log.debug(that,"Tab "+tab.title+" was activated automatically")}}that.autoActivatedTab=undefined;jQuery.each(that.allButtons,function(index,buttonInfo){if(typeof buttonInfo.button!="undefined"&&typeof buttonInfo.button.extButton!="undefined"&&typeof buttonInfo.button.extButton.setActiveDOMElement=="function"){if(typeof buttonInfo.button.extButton.activeDOMElement!="undefined"){buttonInfo.button.extButton.setActiveDOMElement(buttonInfo.button.extButton.activeDOMElement)}}});GENTICS.Aloha.FloatingMenu.shadow.show();GENTICS.Aloha.FloatingMenu.refreshShadow()}}},enableTabScroll:true});jQuery.each(this.tabs,function(index,tab){that.extTabPanel.add(tab.getExtComponent())});jQuery("body").append('<div id="GENTICS_floatingmenu_shadow" class="GENTICS_shadow">&#160;</div>');this.shadow=jQuery("#GENTICS_floatingmenu_shadow");var pinTab=this.extTabPanel.add({title:"&#160;"});this.extTabPanel.render(document.body);jQuery(pinTab.tabEl).addClass("GENTICS_floatingmenu_pin").html("&#160;").mousedown(function(e){that.togglePin();e.stopPropagation()});this.panelBody=jQuery(".GENTICS_floatingmenu .x-tab-panel-bwrap");this.doLayout();this.obj=jQuery(this.extTabPanel.getEl().dom);if(jQuery.cookie("GENTICS.Aloha.FloatingMenu.pinned")=="true"){this.togglePin();this.top=parseInt(jQuery.cookie("GENTICS.Aloha.FloatingMenu.top"));this.left=parseInt(jQuery.cookie("GENTICS.Aloha.FloatingMenu.left"));if(this.top<30){this.top=30}if(this.left<0){this.left=0}if(GENTICS.Aloha.Log.isInfoEnabled()){GENTICS.Aloha.Log.info(this,"restored FloatingMenu pinned position {"+this.left+", "+this.top+"}")}this.refreshShadow()}if(jQuery.cookie("GENTICS.Aloha.FloatingMenu.activeTab")){this.userActivatedTab=jQuery.cookie("GENTICS.Aloha.FloatingMenu.activeTab")}this.extTabPanel.setPosition(this.left,this.top);this.obj.mousedown(function(e){e.stopPropagation()});GENTICS.Aloha.EventRegistry.subscribe(GENTICS.Aloha,"selectionChanged",function(event,rangeObject){if(!that.pinned){var pos=that.calcFloatTarget(rangeObject);if(pos){that.floatTo(pos)}}})};GENTICS.Aloha.FloatingMenu.refreshShadow=function(){if(!this.panelBody){return}GENTICS.Aloha.FloatingMenu.shadow.css("top",this.top+24);GENTICS.Aloha.FloatingMenu.shadow.css("left",this.left);GENTICS.Aloha.FloatingMenu.shadow.width(this.panelBody.width());GENTICS.Aloha.FloatingMenu.shadow.height(this.panelBody.height())};GENTICS.Aloha.FloatingMenu.togglePin=function(){var el=jQuery(".GENTICS_floatingmenu_pin");if(this.pinned){el.removeClass("GENTICS_floatingmenu_pinned");this.top=this.obj.offset().top;this.obj.css("top",this.top);this.obj.css("position","absolute");this.shadow.css("position","absolute");this.refreshShadow();this.pinned=false}else{el.addClass("GENTICS_floatingmenu_pinned");this.top=this.obj.offset().top-jQuery(window).scrollTop();this.obj.css("top",this.top);this.obj.css("position","fixed");this.shadow.css("position","fixed");this.refreshShadow();this.pinned=true}};GENTICS.Aloha.FloatingMenu.createScope=function(scope,extendedScopes){if(typeof extendedScopes=="undefined"){extendedScopes=["GENTICS.Aloha.empty"]}else{if(typeof extendedScopes=="string"){extendedScopes=[extendedScopes]}}var scopeObject=this.scopes[scope];if(scopeObject){}else{this.scopes[scope]={name:scope,extendedScopes:extendedScopes,buttons:[]}}};GENTICS.Aloha.FloatingMenu.addButton=function(scope,button,tab,group){var scopeObject=this.scopes[scope];if(typeof scopeObject=="undefined"){}var buttonInfo={button:button,scopeVisible:false};this.allButtons.push(buttonInfo);scopeObject.buttons.push(buttonInfo);var tabObject=this.tabMap[tab];if(typeof tabObject=="undefined"){tabObject=new GENTICS.Aloha.FloatingMenu.Tab(tab);this.tabs.push(tabObject);this.tabMap[tab]=tabObject}var groupObject=tabObject.getGroup(group);groupObject.addButton(buttonInfo);if(this.initialized){this.generateComponent()}};GENTICS.Aloha.FloatingMenu.doLayout=function(){if(GENTICS.Aloha.Log.isDebugEnabled()){GENTICS.Aloha.Log.debug(this,"doLayout called for FloatingMenu, scope is "+this.currentScope)}var that=this;var firstVisibleTab=false;var activeExtTab=this.extTabPanel.getActiveTab();var activeTab=false;var floatingMenuVisible=false;var showUserActivatedTab=false;jQuery.each(this.tabs,function(index,tab){if(tab.extPanel==activeExtTab){activeTab=tab}var tabVisible=tab.visible;if(tab.doLayout()){floatingMenuVisible=true;if(!tabVisible){if(GENTICS.Aloha.Log.isDebugEnabled()){GENTICS.Aloha.Log.debug(that,"showing tab strip for tab "+tab.label)}that.extTabPanel.unhideTabStripItem(tab.extPanel)}if(firstVisibleTab==false){firstVisibleTab=tab}if(that.userActivatedTab==tab.extPanel.title&&tab.extPanel!=activeExtTab){showUserActivatedTab=tab}}else{if(tabVisible){if(GENTICS.Aloha.Log.isDebugEnabled()){GENTICS.Aloha.Log.debug(that,"hiding tab strip for tab "+tab.label)}that.extTabPanel.hideTabStripItem(tab.extPanel)}}});if(showUserActivatedTab){if(GENTICS.Aloha.Log.isDebugEnabled()){GENTICS.Aloha.Log.debug(this,"Setting active tab to "+showUserActivatedTab.label)}this.extTabPanel.setActiveTab(showUserActivatedTab.extPanel)}else{if(typeof activeTab=="object"&&typeof firstVisibleTab=="object"){if(!activeTab.visible){if(GENTICS.Aloha.Log.isDebugEnabled()){GENTICS.Aloha.Log.debug(this,"Setting active tab to "+firstVisibleTab.label)}this.autoActivatedTab=firstVisibleTab.extPanel.title;this.extTabPanel.setActiveTab(firstVisibleTab.extPanel)}}}if(floatingMenuVisible&&this.extTabPanel.hidden){this.extTabPanel.show();this.refreshShadow();this.shadow.show();this.extTabPanel.setPosition(this.left,this.top)}else{if(!floatingMenuVisible&&!this.extTabPanel.hidden){var pos=this.extTabPanel.getPosition(true);this.left=pos[0]<0?100:pos[0];this.top=pos[1]<0?100:pos[1];this.extTabPanel.hide();this.shadow.hide()}}this.extTabPanel.doLayout()};GENTICS.Aloha.FloatingMenu.setScope=function(scope){var scopeObject=this.scopes[scope];if(typeof scopeObject=="undefined"){}else{if(this.currentScope!=scope){this.currentScope=scope;jQuery.each(this.allButtons,function(index,buttonInfo){buttonInfo.scopeVisible=false});this.setButtonScopeVisibility(scopeObject);this.doLayout()}}};GENTICS.Aloha.FloatingMenu.setButtonScopeVisibility=function(scopeObject){var that=this;jQuery.each(scopeObject.buttons,function(index,buttonInfo){buttonInfo.scopeVisible=true});jQuery.each(scopeObject.extendedScopes,function(index,scopeName){var motherScopeObject=that.scopes[scopeName];if(typeof motherScopeObject=="object"){that.setButtonScopeVisibility(motherScopeObject)}})};GENTICS.Aloha.FloatingMenu.nextFloatTargetObj=function(obj,limitObj){if(!obj||obj==limitObj){return obj}switch(obj.nodeName.toLowerCase()){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":case"p":case"div":case"td":case"pre":case"ul":case"ol":return obj;break;default:return this.nextFloatTargetObj(obj.parentNode,limitObj);break}};GENTICS.Aloha.FloatingMenu.calcFloatTarget=function(range){if(!GENTICS.Aloha.activeEditable){return false}var targetObj=jQuery(this.nextFloatTargetObj(range.getCommonAncestorContainer(),range.limitObject));var scrollTop=GENTICS.Utils.Position.Scroll.top;var y=targetObj.offset().top-this.obj.height()-50;if(y<(scrollTop+30)){y=targetObj.offset().top+targetObj.height()+30}return{x:GENTICS.Aloha.activeEditable.obj.offset().left,y:y}};GENTICS.Aloha.FloatingMenu.floatTo=function(position){if(this.pinned){return}var that=this;if(!this.floatedTo||this.floatedTo.x!=position.x||this.floatedTo.y!=position.y){this.obj.animate({top:position.y,left:position.x},{queue:false,step:function(step,props){if(props.prop=="top"){that.top=props.now}else{if(props.prop=="left"){that.left=props.now}}that.refreshShadow()}});this.floatedTo=position}};GENTICS.Aloha.FloatingMenu.Tab=function(label){this.label=label;this.groups=new Array();this.groupMap={};this.visible=true};GENTICS.Aloha.FloatingMenu.Tab.prototype.getGroup=function(group){var groupObject=this.groupMap[group];if(typeof groupObject=="undefined"){groupObject=new GENTICS.Aloha.FloatingMenu.Group();this.groupMap[group]=groupObject;this.groups.push(groupObject)}return groupObject};GENTICS.Aloha.FloatingMenu.Tab.prototype.getExtComponent=function(){var that=this;if(typeof this.extPanel=="undefined"){this.extPanel=new Ext.Panel({tbar:[],title:this.label,style:"margin-top:0px",bodyStyle:"display:none",autoScroll:true});jQuery.each(this.groups,function(index,group){that.extPanel.getTopToolbar().add(group.getExtComponent())})}return this.extPanel};GENTICS.Aloha.FloatingMenu.Tab.prototype.doLayout=function(){var that=this;if(GENTICS.Aloha.Log.isDebugEnabled()){GENTICS.Aloha.Log.debug(this,"doLayout called for tab "+this.label)}this.visible=false;jQuery.each(this.groups,function(index,group){that.visible|=group.doLayout()});if(GENTICS.Aloha.Log.isDebugEnabled()){GENTICS.Aloha.Log.debug(this,"tab "+this.label+(this.visible?" is ":" is not ")+"visible now")}return this.visible};GENTICS.Aloha.FloatingMenu.Group=function(){this.buttons=new Array()};GENTICS.Aloha.FloatingMenu.Group.prototype.addButton=function(buttonInfo){this.buttons.push(buttonInfo)};GENTICS.Aloha.FloatingMenu.Group.prototype.getExtComponent=function(){var that=this;if(typeof this.extButtonGroup=="undefined"){var items=new Array();var buttonCount=0;jQuery.each(this.buttons,function(index,button){items.push(button.button.getExtConfigProperties());buttonCount+=button.button.size=="small"?1:2});this.extButtonGroup=new Ext.ButtonGroup({columns:Math.ceil(buttonCount/2),items:items});jQuery.each(this.buttons,function(index,buttonInfo){buttonInfo.button.extButton=that.extButtonGroup.findById(buttonInfo.button.id)})}return this.extButtonGroup};GENTICS.Aloha.FloatingMenu.Group.prototype.doLayout=function(){var groupVisible=false;var that=this;jQuery.each(this.buttons,function(index,button){var extButton=that.extButtonGroup.findById(button.button.id);var buttonVisible=button.button.isVisible()&&button.scopeVisible;if(buttonVisible&&extButton.hidden){extButton.show()}else{if(!buttonVisible&&!extButton.hidden){extButton.hide()}}groupVisible|=buttonVisible});if(groupVisible&&this.extButtonGroup.hidden){this.extButtonGroup.show()}else{if(!groupVisible&&!this.extButtonGroup.hidden){this.extButtonGroup.hide()}}return groupVisible};if(document.attachEvent&&document.selection){(function(){var DOMUtils={findChildPosition:function(node){for(var i=0;node=node.previousSibling;i++){continue}return i},isDataNode:function(node){return node&&node.nodeValue!==null&&node.data!==null},isAncestorOf:function(parent,node){return !DOMUtils.isDataNode(parent)&&(parent.contains(DOMUtils.isDataNode(node)?node.parentNode:node)||node.parentNode==parent)},isAncestorOrSelf:function(root,node){return DOMUtils.isAncestorOf(root,node)||root==node},findClosestAncestor:function(root,node){if(DOMUtils.isAncestorOf(root,node)){while(node&&node.parentNode!=root){node=node.parentNode}}return node},getNodeLength:function(node){return DOMUtils.isDataNode(node)?node.length:node.childNodes.length},splitDataNode:function(node,offset){if(!DOMUtils.isDataNode(node)){return false}var newNode=node.cloneNode(false);node.deleteData(offset,node.length);newNode.deleteData(0,offset);node.parentNode.insertBefore(newNode,node.nextSibling)}};var TextRangeUtils={convertToDOMRange:function(textRange,document){function adoptBoundary(domRange,textRange,bStart){var cursorNode=document.createElement("a"),cursor=textRange.duplicate();cursor.collapse(bStart);var parent=cursor.parentElement();do{parent.insertBefore(cursorNode,cursorNode.previousSibling);cursor.moveToElementText(cursorNode)}while(cursor.compareEndPoints(bStart?"StartToStart":"StartToEnd",textRange)>0&&cursorNode.previousSibling);if(cursor.compareEndPoints(bStart?"StartToStart":"StartToEnd",textRange)==-1&&cursorNode.nextSibling){cursor.setEndPoint(bStart?"EndToStart":"EndToEnd",textRange);domRange[bStart?"setStart":"setEnd"](cursorNode.nextSibling,cursor.text.length)}else{domRange[bStart?"setStartBefore":"setEndBefore"](cursorNode)}cursorNode.parentNode.removeChild(cursorNode)}var domRange=new DOMRange(document);adoptBoundary(domRange,textRange,true);adoptBoundary(domRange,textRange,false);return domRange},convertFromDOMRange:function(domRange){function adoptEndPoint(textRange,domRange,bStart){var container=domRange[bStart?"startContainer":"endContainer"];var offset=domRange[bStart?"startOffset":"endOffset"],textOffset=0;var anchorNode=DOMUtils.isDataNode(container)?container:container.childNodes[offset];var anchorParent=DOMUtils.isDataNode(container)?container.parentNode:container;if(container.nodeType==3||container.nodeType==4){textOffset=offset}var cursorNode=domRange._document.createElement("a");anchorParent.insertBefore(cursorNode,anchorNode);var cursor=domRange._document.body.createTextRange();cursor.moveToElementText(cursorNode);cursorNode.parentNode.removeChild(cursorNode);textRange.setEndPoint(bStart?"StartToStart":"EndToStart",cursor);textRange[bStart?"moveStart":"moveEnd"]("character",textOffset)}var textRange=domRange._document.body.createTextRange();adoptEndPoint(textRange,domRange,true);adoptEndPoint(textRange,domRange,false);return textRange}};function DOMRange(document){this._document=document;this.startContainer=this.endContainer=document.body;this.endOffset=DOMUtils.getNodeLength(document.body)}DOMRange.START_TO_START=0;DOMRange.START_TO_END=1;DOMRange.END_TO_END=2;DOMRange.END_TO_START=3;DOMRange.prototype={startContainer:null,startOffset:0,endContainer:null,endOffset:0,commonAncestorContainer:null,collapsed:false,_document:null,_refreshProperties:function(){this.collapsed=(this.startContainer==this.endContainer&&this.startOffset==this.endOffset);var node=this.startContainer;while(node&&node!=this.endContainer&&!DOMUtils.isAncestorOf(node,this.endContainer)){node=node.parentNode}this.commonAncestorContainer=node},setStart:function(container,offset){this.startContainer=container;this.startOffset=offset;this._refreshProperties()},setEnd:function(container,offset){this.endContainer=container;this.endOffset=offset;this._refreshProperties()},setStartBefore:function(refNode){this.setStart(refNode.parentNode,DOMUtils.findChildPosition(refNode))},setStartAfter:function(refNode){this.setStart(refNode.parentNode,DOMUtils.findChildPosition(refNode)+1)},setEndBefore:function(refNode){this.setEnd(refNode.parentNode,DOMUtils.findChildPosition(refNode))},setEndAfter:function(refNode){this.setEnd(refNode.parentNode,DOMUtils.findChildPosition(refNode)+1)},selectNode:function(refNode){this.setStartBefore(refNode);this.setEndAfter(refNode)},selectNodeContents:function(refNode){this.setStart(refNode,0);this.setEnd(refNode,DOMUtils.getNodeLength(refNode))},collapse:function(toStart){if(toStart){this.setEnd(this.startContainer,this.startOffset)}else{this.setStart(this.endContainer,this.endOffset)}},cloneContents:function(){return(function cloneSubtree(iterator){for(var node,frag=document.createDocumentFragment();node=iterator.next();){node=node.cloneNode(!iterator.hasPartialSubtree());if(iterator.hasPartialSubtree()){node.appendChild(cloneSubtree(iterator.getSubtreeIterator()))}frag.appendChild(node)}return frag})(new RangeIterator(this))},extractContents:function(){var range=this.cloneRange();if(this.startContainer!=this.commonAncestorContainer){this.setStartAfter(DOMUtils.findClosestAncestor(this.commonAncestorContainer,this.startContainer))}this.collapse(true);return(function extractSubtree(iterator){for(var node,frag=document.createDocumentFragment();node=iterator.next();){iterator.hasPartialSubtree()?node=node.cloneNode(false):iterator.remove();if(iterator.hasPartialSubtree()){node.appendChild(extractSubtree(iterator.getSubtreeIterator()))}frag.appendChild(node)}return frag})(new RangeIterator(range))},deleteContents:function(){var range=this.cloneRange();if(this.startContainer!=this.commonAncestorContainer){this.setStartAfter(DOMUtils.findClosestAncestor(this.commonAncestorContainer,this.startContainer))}this.collapse(true);(function deleteSubtree(iterator){while(iterator.next()){iterator.hasPartialSubtree()?deleteSubtree(iterator.getSubtreeIterator()):iterator.remove()}})(new RangeIterator(range))},insertNode:function(newNode){if(DOMUtils.isDataNode(this.startContainer)){DOMUtils.splitDataNode(this.startContainer,this.startOffset);this.startContainer.parentNode.insertBefore(newNode,this.startContainer.nextSibling)}else{this.startContainer.insertBefore(newNode,this.startContainer.childNodes[this.startOffset])}this.setStart(this.startContainer,this.startOffset)},surroundContents:function(newNode){var content=this.extractContents();this.insertNode(newNode);newNode.appendChild(content);this.selectNode(newNode)},compareBoundaryPoints:function(how,sourceRange){var containerA,offsetA,containerB,offsetB;switch(how){case DOMRange.START_TO_START:case DOMRange.START_TO_END:containerA=this.startContainer;offsetA=this.startOffset;break;case DOMRange.END_TO_END:case DOMRange.END_TO_START:containerA=this.endContainer;offsetA=this.endOffset;break}switch(how){case DOMRange.START_TO_START:case DOMRange.END_TO_START:containerB=sourceRange.startContainer;offsetB=sourceRange.startOffset;break;case DOMRange.START_TO_END:case DOMRange.END_TO_END:containerB=sourceRange.endContainer;offsetB=sourceRange.endOffset;break}return containerA.sourceIndex<containerB.sourceIndex?-1:containerA.sourceIndex==containerB.sourceIndex?offsetA<offsetB?-1:offsetA==offsetB?0:1:1},cloneRange:function(){var range=new DOMRange(this._document);range.setStart(this.startContainer,this.startOffset);range.setEnd(this.endContainer,this.endOffset);return range},detach:function(){},toString:function(){return TextRangeUtils.convertFromDOMRange(this).text},createContextualFragment:function(tagString){var content=(DOMUtils.isDataNode(this.startContainer)?this.startContainer.parentNode:this.startContainer).cloneNode(false);content.innerHTML=tagString;for(var fragment=this._document.createDocumentFragment();content.firstChild;){fragment.appendChild(content.firstChild)}return fragment}};function RangeIterator(range){this.range=range;if(range.collapsed){return}var root=range.commonAncestorContainer;this._next=range.startContainer==root&&!DOMUtils.isDataNode(range.startContainer)?range.startContainer.childNodes[range.startOffset]:DOMUtils.findClosestAncestor(root,range.startContainer);this._end=range.endContainer==root&&!DOMUtils.isDataNode(range.endContainer)?range.endContainer.childNodes[range.endOffset]:DOMUtils.findClosestAncestor(root,range.endContainer).nextSibling}RangeIterator.prototype={range:null,_current:null,_next:null,_end:null,hasNext:function(){return !!this._next},next:function(){var current=this._current=this._next;this._next=this._current&&this._current.nextSibling!=this._end?this._current.nextSibling:null;if(DOMUtils.isDataNode(this._current)){if(this.range.endContainer==this._current){(current=current.cloneNode(true)).deleteData(this.range.endOffset,current.length-this.range.endOffset)}if(this.range.startContainer==this._current){(current=current.cloneNode(true)).deleteData(0,this.range.startOffset)}}return current},remove:function(){if(DOMUtils.isDataNode(this._current)&&(this.range.startContainer==this._current||this.range.endContainer==this._current)){var start=this.range.startContainer==this._current?this.range.startOffset:0;var end=this.range.endContainer==this._current?this.range.endOffset:this._current.length;this._current.deleteData(start,end-start)}else{this._current.parentNode.removeChild(this._current)}},hasPartialSubtree:function(){return !DOMUtils.isDataNode(this._current)&&(DOMUtils.isAncestorOrSelf(this._current,this.range.startContainer)||DOMUtils.isAncestorOrSelf(this._current,this.range.endContainer))},getSubtreeIterator:function(){var subRange=new DOMRange(this.range._document);subRange.selectNodeContents(this._current);if(DOMUtils.isAncestorOrSelf(this._current,this.range.startContainer)){subRange.setStart(this.range.startContainer,this.range.startOffset)}if(DOMUtils.isAncestorOrSelf(this._current,this.range.endContainer)){subRange.setEnd(this.range.endContainer,this.range.endOffset)}return new RangeIterator(subRange)}};function DOMSelection(document){this._document=document;var selection=this;document.attachEvent("onselectionchange",function(){selection._selectionChangeHandler()})}DOMSelection.prototype={rangeCount:0,_document:null,_selectionChangeHandler:function(){this.rangeCount=this._selectionExists(this._document.selection.createRange())?1:0},_selectionExists:function(textRange){return textRange.compareEndPoints("StartToEnd",textRange)!=0||textRange.parentElement().isContentEditable},addRange:function(range){var selection=this._document.selection.createRange(),textRange=TextRangeUtils.convertFromDOMRange(range);if(!this._selectionExists(selection)){textRange.select()}else{if(textRange.compareEndPoints("StartToStart",selection)==-1){if(textRange.compareEndPoints("StartToEnd",selection)>-1&&textRange.compareEndPoints("EndToEnd",selection)==-1){selection.setEndPoint("StartToStart",textRange)}else{if(textRange.compareEndPoints("EndToStart",selection)<1&&textRange.compareEndPoints("EndToEnd",selection)>-1){selection.setEndPoint("EndToEnd",textRange)}}}selection.select()}},removeAllRanges:function(){this._document.selection.empty()},getRangeAt:function(index){var textRange=this._document.selection.createRange();if(this._selectionExists(textRange)){return TextRangeUtils.convertToDOMRange(textRange,this._document)}return null},toString:function(){return this._document.selection.createRange().text}};document.createRange=function(){return new DOMRange(document)};var selection=new DOMSelection(document);window.getSelection=function(){return selection}})();
84
+ /*
85
+ * Aloha Editor
86
+ * Author & Copyright (c) 2010 Gentics Software GmbH
87
+ * aloha-sales@gentics.com
88
+ * Licensed unter the terms of http://www.aloha-editor.com/license.html
89
+ */
90
+ }jQuery.fn.aloha=function(){return this.each(function(){new GENTICS.Aloha.Editable(jQuery(this))})};jQuery.fn.GENTICS_aloha=function(){return this.each(function(){new GENTICS.Aloha.Editable(jQuery(this))})};jQuery.fn.mahalo=function(){return this.each(function(){if(jQuery(this).hasClass("GENTICS_editable")){for(var i=0;i<GENTICS.Aloha.editables.length;i++){if(GENTICS.Aloha.editables[i].obj.get(0)===this){GENTICS.Aloha.editables[i].destroy()}}}})};jQuery.fn.GENTICS_mahalo=function(){return this.each(function(){var that=this})};jQuery.fn.GENTICS_contentEditableSelectionChange=function(callback){var that=this;this.keyup(function(event){var rangeObject=GENTICS.Aloha.Selection.getRangeObject();callback(event)});this.dblclick(function(event){callback(event)});this.mousedown(function(event){that.selectionStarted=true});jQuery(document).mouseup(function(event){GENTICS.Aloha.Selection.eventOriginalTarget=that;if(that.selectionStarted){callback(event)}GENTICS.Aloha.Selection.eventOriginalTarget=false;that.selectionStarted=false});return this};jQuery.fn.outerHTML=function(s){if(s){return this.before(s).remove()}else{return jQuery("<p>").append(this.eq(0).clone()).html()}};
91
+ /*
92
+ * Aloha Editor
93
+ * Author & Copyright (c) 2010 Gentics Software GmbH
94
+ * aloha-sales@gentics.com
95
+ * Licensed unter the terms of http://www.aloha-editor.com/license.html
96
+ */
97
+ GENTICS.Aloha.Log=function(){};GENTICS.Aloha.Log.prototype.logHistory=null;GENTICS.Aloha.Log.prototype.highWaterMarkReached=false;GENTICS.Aloha.Log.prototype.init=function(){if(typeof GENTICS.Aloha.settings.logLevels=="undefined"||!GENTICS.Aloha.settings.logLevels){GENTICS.Aloha.settings.logLevels={error:true,warn:true}}if(typeof GENTICS.Aloha.settings.logHistory=="undefined"||!GENTICS.Aloha.settings.logHistory){GENTICS.Aloha.settings.logHistory={}}if(!GENTICS.Aloha.settings.logHistory.maxEntries){GENTICS.Aloha.settings.logHistory.maxEntries=100}if(!GENTICS.Aloha.settings.logHistory.highWaterMark){GENTICS.Aloha.settings.logHistory.highWaterMark=90}if(!GENTICS.Aloha.settings.logHistory.levels){GENTICS.Aloha.settings.logHistory.levels={error:true,warn:true}}this.flushLogHistory()};GENTICS.Aloha.Log.prototype.log=function(level,component,message){if(typeof level=="undefined"||!level){level="error"}level=level.toLowerCase();if(!GENTICS.Aloha.settings.logLevels[level]){return}this.addToLogHistory({level:level,component:component.toString(),message:message,date:new Date()});switch(level){case"error":if(window.console&&console.error){console.error(component.toString()+": "+message)}break;case"warn":if(window.console&&console.warn){console.warn(component.toString()+": "+message)}break;case"info":if(window.console&&console.info){console.info(component.toString()+": "+message)}break;case"debug":if(window.console&&console.log){console.log(component.toString()+" ["+level+"]: "+message)}break;default:if(window.console&&console.log){console.log(component.toString()+" ["+level+"]: "+message)}break}};GENTICS.Aloha.Log.prototype.error=function(component,message){this.log("error",component,message)};GENTICS.Aloha.Log.prototype.warn=function(component,message){this.log("warn",component,message)};GENTICS.Aloha.Log.prototype.info=function(component,message){this.log("info",component,message)};GENTICS.Aloha.Log.prototype.debug=function(component,message){this.log("debug",component,message)};GENTICS.Aloha.Log.prototype.isLogLevelEnabled=function(level){return GENTICS.Aloha.settings&&GENTICS.Aloha.settings.logLevels&&(GENTICS.Aloha.settings.logLevels[level]==true)};GENTICS.Aloha.Log.prototype.isErrorEnabled=function(){return this.isLogLevelEnabled("error")};GENTICS.Aloha.Log.prototype.isWarnEnabled=function(){return this.isLogLevelEnabled("warn")};GENTICS.Aloha.Log.prototype.isInfoEnabled=function(){return this.isLogLevelEnabled("info")};GENTICS.Aloha.Log.prototype.isDebugEnabled=function(){return this.isLogLevelEnabled("debug")};GENTICS.Aloha.Log.prototype.addToLogHistory=function(entry){if(GENTICS.Aloha.settings.logHistory.maxEntries<=0){return}if(!GENTICS.Aloha.settings.logHistory.levels[entry.level]){return}this.logHistory.push(entry);if(this.highWaterMarkReached==false){if(this.logHistory.length>=GENTICS.Aloha.settings.logHistory.maxEntries*GENTICS.Aloha.settings.logHistory.highWaterMark/100){GENTICS.Aloha.EventRegistry.trigger(new GENTICS.Aloha.Event("logFull",GENTICS.Aloha.Log));this.highWaterMarkReached=true}}while(this.logHistory.length>GENTICS.Aloha.settings.logHistory.maxEntries){this.logHistory.shift()}};GENTICS.Aloha.Log.prototype.getLogHistory=function(){return this.logHistory};GENTICS.Aloha.Log.prototype.flushLogHistory=function(){this.logHistory=new Array();this.highWaterMarkReached=false};GENTICS.Aloha.Log=new GENTICS.Aloha.Log();
98
+ /*
99
+ * Aloha Editor
100
+ * Author & Copyright (c) 2010 Gentics Software GmbH
101
+ * aloha-sales@gentics.com
102
+ * Licensed unter the terms of http://www.aloha-editor.com/license.html
103
+ */
104
+ GENTICS.Aloha.Markup=function(){};GENTICS.Aloha.Markup.prototype.keyHandlers={};GENTICS.Aloha.Markup.prototype.addKeyHandler=function(keyCode,handler){if(!this.keyHandlers[keyCode]){this.keyHandlers[keyCode]=[]}this.keyHandlers[keyCode].push(handler)};GENTICS.Aloha.Markup.prototype.insertBreak=function(){var range=GENTICS.Aloha.Selection.rangeObject;if(!range.isCollapsed()){this.removeSelectedMarkup()}var newBreak=jQuery("<br/>");GENTICS.Utils.Dom.insertIntoDOM(newBreak,range,GENTICS.Aloha.activeEditable.obj);var nextTextNode=GENTICS.Utils.Dom.searchAdjacentTextNode(newBreak.parent().get(0),GENTICS.Utils.Dom.getIndexInParent(newBreak.get(0))+1,false);if(nextTextNode){var nonWSIndex=nextTextNode.data.search(/\S/);if(nonWSIndex>0){nextTextNode.data=nextTextNode.data.substring(nonWSIndex)}}range.startContainer=range.endContainer=newBreak.get(0).parentNode;range.startOffset=range.endOffset=GENTICS.Utils.Dom.getIndexInParent(newBreak.get(0))+1;range.correctRange();range.clearCaches();range.select()};GENTICS.Aloha.Markup.prototype.preProcessKeyStrokes=function(event){if(event.type!="keydown"){return false}var rangeObject=GENTICS.Aloha.Selection.rangeObject;if(this.keyHandlers[event.keyCode]){var handlers=this.keyHandlers[event.keyCode];for(var i=0;i<handlers.length;++i){if(!handlers[i](event)){return false}}}switch(event.keyCode){case 13:if(event.shiftKey){GENTICS.Aloha.Log.debug(this,"... got a smoking Shift+Enter, Cowboy");if(!rangeObject.isCollapsed()){this.removeSelectedMarkup()}GENTICS.Aloha.Selection.updateSelection(false,true);this.processShiftEnter(rangeObject);return false}else{GENTICS.Aloha.Log.debug(this,"... got a lonely Enter, Mum");if(!rangeObject.isCollapsed()){this.removeSelectedMarkup()}GENTICS.Aloha.Selection.updateSelection(false,true);this.processEnter(rangeObject);return false}break}return true};GENTICS.Aloha.Markup.prototype.processShiftEnter=function(rangeObject){this.insertHTMLBreak(rangeObject.getSelectionTree(),rangeObject)};GENTICS.Aloha.Markup.prototype.processEnter=function(rangeObject){if(rangeObject.splitObject){if(jQuery.browser.msie&&GENTICS.Utils.Dom.isListElement(rangeObject.splitObject)){jQuery(rangeObject.splitObject).append(jQuery(document.createTextNode("")))}this.splitRangeObject(rangeObject)}else{this.insertHTMLBreak(rangeObject.getSelectionTree(),rangeObject)}};GENTICS.Aloha.Markup.prototype.insertHTMLCode=function(html){var rangeObject=GENTICS.Aloha.Selection.rangeObject;this.insertHTMLBreak(rangeObject.getSelectionTree(),rangeObject,jQuery(html))};GENTICS.Aloha.Markup.prototype.insertHTMLBreak=function(selectionTree,rangeObject,inBetweenMarkup){inBetweenMarkup=inBetweenMarkup?inBetweenMarkup:jQuery("<br />");for(var i=0;i<selectionTree.length;i++){var el=selectionTree[i];var jqEl=el.domobj?jQuery(el.domobj):undefined;if(el.selection!=="none"){if(el.selection=="collapsed"){if(i>0){var jqElBefore=jQuery(selectionTree[i-1].domobj);jqElBefore.after(inBetweenMarkup)}else{var jqElAfter=jQuery(selectionTree[1].domobj);jqElAfter.before(inBetweenMarkup)}rangeObject.startContainer=rangeObject.endContainer=inBetweenMarkup[0].parentNode;rangeObject.startOffset=rangeObject.endOffset=GENTICS.Utils.Dom.getIndexInParent(inBetweenMarkup[0])+1;rangeObject.correctRange()}else{if(el.domobj&&el.domobj.nodeType===3){if(el.domobj.nextSibling&&el.domobj.nextSibling.nodeType==1&&GENTICS.Aloha.Selection.replacingElements[el.domobj.nextSibling.nodeName.toLowerCase()]){jqEl.after("<br/>")}var checkObj=el.domobj;while(checkObj){if(checkObj.nextSibling){checkObj=false}else{checkObj=checkObj.parentNode;if(checkObj===rangeObject.limitObject){checkObj=false}if(GENTICS.Utils.Dom.isBlockLevelElement(checkObj)){break}}}if(checkObj){jQuery(checkObj).append("<br/>")}jqEl.between(inBetweenMarkup,el.startOffset);var offset=0;var tmpObject=inBetweenMarkup[0];while(tmpObject){tmpObject=tmpObject.previousSibling;offset++}rangeObject.startContainer=inBetweenMarkup[0].parentNode;rangeObject.endContainer=inBetweenMarkup[0].parentNode;rangeObject.startOffset=offset;rangeObject.endOffset=offset;rangeObject.correctRange()}else{if(el.domobj&&el.domobj.nodeType===1){if(jqEl.parent().find("br.GENTICS_ephemera").length===0){jQuery(rangeObject.limitObject).find("br.GENTICS_ephemera").remove();jQuery(rangeObject.commonAncestorContainer).append(this.getFillUpElement(rangeObject.splitObject))}jqEl.after(inBetweenMarkup);rangeObject.startContainer=rangeObject.commonAncestorContainer;rangeObject.endContainer=rangeObject.startContainer;rangeObject.startOffset=i+2;rangeObject.endOffset=i+2;rangeObject.update()}}}}}rangeObject.select()};GENTICS.Aloha.Markup.prototype.getSelectedText=function(){var rangeObject=GENTICS.Aloha.Selection.rangeObject;if(rangeObject.isCollapsed()){return false}return this.getFromSelectionTree(rangeObject.getSelectionTree(),true)};GENTICS.Aloha.Markup.prototype.getFromSelectionTree=function(selectionTree,astext){var text="";for(var i=0;i<selectionTree.length;i++){var el=selectionTree[i];if(el.selection=="partial"){if(el.domobj.nodeType==3){text+=el.domobj.data.substring(el.startOffset,el.endOffset)}else{if(el.domobj.nodeType==1&&el.children){if(astext){text+=this.getFromSelectionTree(el.children,astext)}else{var clone=jQuery(el.domobj).clone(false).empty();clone.html(this.getFromSelectionTree(el.children,astext));text+=clone.outerHTML()}}}}else{if(el.selection=="full"){if(el.domobj.nodeType==3){text+=jQuery(el.domobj).text()}else{if(el.domobj.nodeType==1&&el.children){text+=astext?jQuery(el.domobj).text():jQuery(el.domobj).outerHTML()}}}}}return text};GENTICS.Aloha.Markup.prototype.getSelectedMarkup=function(){var rangeObject=GENTICS.Aloha.Selection.rangeObject;if(rangeObject.isCollapsed()){return false}return this.getFromSelectionTree(rangeObject.getSelectionTree(),false)};GENTICS.Aloha.Markup.prototype.removeSelectedMarkup=function(){var rangeObject=GENTICS.Aloha.Selection.rangeObject;if(rangeObject.isCollapsed()){return}var newRange=new GENTICS.Aloha.Selection.SelectionRange();this.removeFromSelectionTree(rangeObject.getSelectionTree(),newRange);newRange.update();GENTICS.Utils.Dom.doCleanup({merge:true,removeempty:true},GENTICS.Aloha.Selection.rangeObject);GENTICS.Aloha.Selection.rangeObject=newRange;newRange.correctRange();newRange.update();newRange.select();GENTICS.Aloha.Selection.updateSelection()};GENTICS.Aloha.Markup.prototype.removeFromSelectionTree=function(selectionTree,newRange){var firstPartialElement=undefined;for(var i=0;i<selectionTree.length;i++){var el=selectionTree[i];if(el.selection=="partial"){if(el.domobj.nodeType==3){var newdata="";if(el.startOffset>0){newdata+=el.domobj.data.substring(0,el.startOffset)}if(el.endOffset<el.domobj.data.length){newdata+=el.domobj.data.substring(el.endOffset,el.domobj.data.length)}el.domobj.data=newdata;if(!newRange.startContainer){newRange.startContainer=newRange.endContainer=el.domobj;newRange.startOffset=newRange.endOffset=el.startOffset}}else{if(el.domobj.nodeType==1&&el.children){this.removeFromSelectionTree(el.children,newRange);if(firstPartialElement){if(firstPartialElement.nodeName==el.domobj.nodeName){jQuery(firstPartialElement).append(jQuery(el.domobj).contents());jQuery(el.domobj).remove()}}else{firstPartialElement=el.domobj}}}}else{if(el.selection=="full"){if(!newRange.startContainer){var adjacentTextNode=GENTICS.Utils.Dom.searchAdjacentTextNode(el.domobj.parentNode,GENTICS.Utils.Dom.getIndexInParent(el.domobj)+1,false,{blocklevel:false});if(adjacentTextNode){newRange.startContainer=newRange.endContainer=adjacentTextNode;newRange.startOffset=newRange.endOffset=0}else{newRange.startContainer=newRange.endContainer=el.domobj.parentNode;newRange.startOffset=newRange.endOffset=GENTICS.Utils.Dom.getIndexInParent(el.domobj)+1}}jQuery(el.domobj).remove()}}}};GENTICS.Aloha.Markup.prototype.splitRangeObject=function(rangeObject,markup){var splitObject=jQuery(rangeObject.splitObject);rangeObject.update(rangeObject.splitObject);var selectionTree=rangeObject.getSelectionTree();var followUpContainer=this.getSplitFollowUpContainer(rangeObject);this.splitRangeObjectHelper(selectionTree,rangeObject,followUpContainer);if(followUpContainer.hasClass("preparedForRemoval")){followUpContainer.removeClass("preparedForRemoval")}var insertAfterObject=this.getInsertAfterObject(rangeObject,followUpContainer);jQuery(followUpContainer).insertAfter(insertAfterObject);if(rangeObject.splitObject.nodeName.toLowerCase()==="li"&&!GENTICS.Aloha.Selection.standardTextLevelSemanticsComparator(rangeObject.splitObject,followUpContainer)){jQuery(rangeObject.splitObject).remove()}rangeObject.startContainer=followUpContainer.textNodes(true,true).first().get(0);if(!rangeObject.startContainer){rangeObject.startContainer=followUpContainer.textNodes(false).first().parent().get(0)}if(rangeObject.startContainer){rangeObject.endContainer=rangeObject.startContainer;rangeObject.startOffset=0;rangeObject.endOffset=0}else{rangeObject.startContainer=rangeObject.endContainer=followUpContainer.parent().get(0);rangeObject.startOffset=rangeObject.endOffset=GENTICS.Utils.Dom.getIndexInParent(followUpContainer.get(0))}rangeObject.update();rangeObject.select()};GENTICS.Aloha.Markup.prototype.getInsertAfterObject=function(rangeObject,followUpContainer){for(var i=0;i<rangeObject.markupEffectiveAtStart.length;i++){el=rangeObject.markupEffectiveAtStart[i];if(el===rangeObject.splitObject){var passedSplitObject=true}if(!passedSplitObject){continue}if(GENTICS.Aloha.Selection.canTag1WrapTag2(jQuery(el).parent()[0].nodeName,followUpContainer[0].nodeName)){return el}}return false};GENTICS.Aloha.Markup.prototype.getFillUpElement=function(splitObject){if(jQuery.browser.msie){return false}else{return jQuery('<br class="GENTICS_ephemera" />')}};GENTICS.Aloha.Markup.prototype.removeElementContentWhitespaceObj=function(domArray){var correction=0;var removeLater=[];for(var i=0;i<domArray.length;i++){var el=domArray[i];if(el.isElementContentWhitespace){removeLater[removeLater.length]=i}}for(var i=0;i<removeLater.length;i++){var removeIndex=removeLater[i];domArray.splice(removeIndex-correction,1);correction++}};GENTICS.Aloha.Markup.prototype.splitRangeObjectHelper=function(selectionTree,rangeObject,followUpContainer,inBetweenMarkup){if(!followUpContainer){GENTICS.Aloha.Log.warn(this,"no followUpContainer, no inBetweenMarkup, nothing to do...")}var fillUpElement=this.getFillUpElement(rangeObject.splitObject);var splitObject=jQuery(rangeObject.splitObject);var startMoving=false;if(selectionTree.length>0){var mirrorLevel=followUpContainer.contents();if(mirrorLevel.length!==selectionTree.length){this.removeElementContentWhitespaceObj(mirrorLevel)}for(var i=0;i<selectionTree.length;i++){var el=selectionTree[i];if((el.selection==="none"&&startMoving===false)||(el.domobj&&el.domobj.nodeType===3&&el===selectionTree[(selectionTree.length-1)]&&el.startOffset===el.domobj.data.length)){if(followUpContainer.textNodes().length>1){mirrorLevel.eq(i).remove()}else{if(GENTICS.Utils.Dom.isSplitObject(followUpContainer[0])){if(fillUpElement){followUpContainer.html(fillUpElement)}else{followUpContainer.empty()}}else{followUpContainer.empty();followUpContainer.addClass("preparedForRemoval")}}continue}else{if(el.selection!=="none"){if(el.domobj&&el.domobj.nodeType===3&&el.startOffset!==undefined){var completeText=el.domobj.data;if(el.startOffset>0){el.domobj.data=completeText.substr(0,el.startOffset)}else{if(selectionTree.length>1){jQuery(el.domobj).remove()}else{var parent=jQuery(el.domobj).parent();if(GENTICS.Utils.Dom.isSplitObject(parent[0])){if(fillUpElement){parent.html(fillUpElement)}else{parent.empty()}}else{parent.remove()}}}if(completeText.length-el.startOffset>0){mirrorLevel[i].data=completeText.substr(el.startOffset,completeText.length)}else{if(mirrorLevel.length>1){mirrorLevel.eq((i)).remove()}else{if(GENTICS.Utils.Dom.isBlockLevelElement(followUpContainer[0])){if(fillUpElement){followUpContainer.html(fillUpElement)}else{followUpContainer.empty()}}else{followUpContainer.empty();followUpContainer.addClass("preparedForRemoval")}}}}startMoving=true;if(el.children.length>0){this.splitRangeObjectHelper(el.children,rangeObject,mirrorLevel.eq(i),inBetweenMarkup)}}else{if(el.selection==="none"&&startMoving===true){jqObj=jQuery(el.domobj).remove()}}}}}else{GENTICS.Aloha.Log.error(this,"can not split splitObject due to an empty selection tree")}splitObject.find("br.GENTICS_ephemera:gt(0)").remove();followUpContainer.find("br.GENTICS_ephemera:gt(0)").remove();splitObject.find(".preparedForRemoval").remove();followUpContainer.find(".preparedForRemoval").remove();if(splitObject.contents().length===0&&GENTICS.Utils.Dom.isSplitObject(splitObject[0])&&fillUpElement){splitObject.html(fillUpElement)}if(followUpContainer.contents().length===0&&GENTICS.Utils.Dom.isSplitObject(followUpContainer[0])&&fillUpElement){followUpContainer.html(fillUpElement)}};GENTICS.Aloha.Markup.prototype.getSplitFollowUpContainer=function(rangeObject){var tagName=rangeObject.splitObject.nodeName.toLowerCase();switch(tagName){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":var lastObj=jQuery(rangeObject.splitObject).textNodes().last()[0];if(lastObj&&rangeObject.startContainer===lastObj&&rangeObject.startOffset===lastObj.length){var returnObj=jQuery("<p></p>");var inside=jQuery(rangeObject.splitObject).clone().contents();returnObj.append(inside);return returnObj}break;case"li":if(rangeObject.startContainer.nodeName.toLowerCase()==="br"&&jQuery(rangeObject.startContainer).hasClass("GENTICS_ephemera")){var returnObj=jQuery("<p></p>");var inside=jQuery(rangeObject.splitObject).clone().contents();returnObj.append(inside);return returnObj}if(!rangeObject.splitObject.nextSibling&&jQuery.trim(jQuery(rangeObject.splitObject).text()).length==0){var returnObj=jQuery("<p></p>");return returnObj}}return jQuery(rangeObject.splitObject).clone()};GENTICS.Aloha.Markup.prototype.transformDomObject=function(domobj,nodeName){var jqOldObj=jQuery(domobj);var jqNewObj=jQuery("<"+nodeName+"></"+nodeName+">");jqOldObj.contents().appendTo(jqNewObj);jqOldObj.replaceWith(jqNewObj);return jqNewObj};GENTICS.Aloha.Markup.prototype.toString=function(){return"GENTICS.Aloha.Markup"};GENTICS.Aloha.Markup=new GENTICS.Aloha.Markup();
105
+ /*
106
+ * Aloha Editor
107
+ * Author & Copyright (c) 2010 Gentics Software GmbH
108
+ * aloha-sales@gentics.com
109
+ * Licensed unter the terms of http://www.aloha-editor.com/license.html
110
+ */
111
+ GENTICS.Aloha.Message=function(data){this.title=data.title;this.text=data.text;this.type=data.type;this.callback=data.callback};GENTICS.Aloha.Message.Type={CONFIRM:"confirm",ALERT:"alert",WAIT:"wait"};GENTICS.Aloha.Message.prototype.toString=function(){return this.type+": "+this.message};GENTICS.Aloha.MessageLine=function(){this.messages=new Array()};GENTICS.Aloha.MessageLine.prototype.add=function(message){this.messages[this.messages.length]=message;while(this.messages.length>4){this.messages.shift()}jQuery("#gtx_aloha_messageline").html("");for(var i=0;i<this.messages.length;i++){jQuery("#gtx_aloha_messageline").append((this.messages[i].toString()+"<br/>"))}};GENTICS.Aloha.MessageLine=new GENTICS.Aloha.MessageLine();
112
+ /*
113
+ * Aloha Editor
114
+ * Author & Copyright (c) 2010 Gentics Software GmbH
115
+ * aloha-sales@gentics.com
116
+ * Licensed unter the terms of http://www.aloha-editor.com/license.html
117
+ */
118
+ GENTICS.Aloha.PluginRegistry=function(){this.plugins=new Array()};GENTICS.Aloha.PluginRegistry.prototype.register=function(plugin){if(plugin instanceof GENTICS.Aloha.Plugin){this.plugins.push(plugin)}};GENTICS.Aloha.PluginRegistry.prototype.init=function(){for(var i=0;i<this.plugins.length;i++){var plugin=this.plugins[i];if(GENTICS.Aloha.settings.plugins==undefined){GENTICS.Aloha.settings.plugins={}}plugin.settings=GENTICS.Aloha.settings.plugins[plugin.prefix];if(plugin.settings==undefined){plugin.settings={}}if(plugin.settings.enabled==undefined){plugin.settings.enabled=true}var actualLanguage=plugin.languages?GENTICS.Aloha.getLanguage(GENTICS.Aloha.settings.i18n.current,plugin.languages):null;if(!actualLanguage){GENTICS.Aloha.Log.warn(this,"Could not determine actual language, no languages available for plugin "+plugin)}else{var fileUrl=GENTICS.Aloha.settings.base+"plugins/"+plugin.basePath+"/i18n/"+actualLanguage+".dict";GENTICS.Aloha.loadI18nFile(fileUrl,plugin)}if(plugin.settings.enabled==true){this.plugins[i].init()}}};GENTICS.Aloha.PluginRegistry.prototype.makeClean=function(obj){for(var i=0;i<this.plugins.length;i++){var plugin=this.plugins[i];if(GENTICS.Aloha.Log.isDebugEnabled()){GENTICS.Aloha.Log.debug(this,"Passing contents of HTML Element with id { "+obj.attr("id")+" } for cleaning to plugin { "+plugin.prefix+" }")}plugin.makeClean(obj)}};GENTICS.Aloha.PluginRegistry=new GENTICS.Aloha.PluginRegistry();GENTICS.Aloha.PluginRegistry.toString=function(){return"com.gentics.aloha.PluginRegistry"};GENTICS.Aloha.Plugin=function(pluginPrefix,basePath){this.prefix=pluginPrefix;this.basePath=basePath?basePath:pluginPrefix;GENTICS.Aloha.PluginRegistry.register(this)};GENTICS.Aloha.Plugin.prototype.settings=null;GENTICS.Aloha.Plugin.prototype.init=function(){};GENTICS.Aloha.Plugin.prototype.getEditableConfig=function(obj){var config=[];var configSpecified=false;if(this.settings.editables){jQuery.each(this.settings.editables,function(selector,selectorConfig){if(obj.is(selector)){configSpecified=true;config=jQuery.merge(config,selectorConfig)}})}if(!configSpecified){if(this.settings.config=="undefined"||!this.settings.config){config=this.config}else{config=this.settings.config}}return config};GENTICS.Aloha.Plugin.prototype.makeClean=function(obj){};GENTICS.Aloha.Plugin.prototype.getUID=function(id){return this.prefix+"."+id};GENTICS.Aloha.Plugin.prototype.i18n=function(key,replacements){return GENTICS.Aloha.i18n(this,key,replacements)};GENTICS.Aloha.Plugin.prototype.toString=function(){return this.prefix};GENTICS.Aloha.Plugin.prototype.log=function(level,message){GENTICS.Aloha.Log.log(level,this,message)};
119
+ /*
120
+ * Aloha Editor
121
+ * Author & Copyright (c) 2010 Gentics Software GmbH
122
+ * aloha-sales@gentics.com
123
+ * Licensed unter the terms of http://www.aloha-editor.com/license.html
124
+ */
125
+ jQuery.fn.zap=function(){return this.each(function(){jQuery(this.childNodes).insertBefore(this)}).remove()};jQuery.fn.textNodes=function(excludeBreaks,includeEmptyTextNodes){var ret=[];(function(el){if((el.nodeType==3&&jQuery.trim(el.data)!=""&&!includeEmptyTextNodes)||(el.nodeType==3&&includeEmptyTextNodes)||(el.nodeName=="BR"&&!excludeBreaks)){ret.push(el)}else{for(var i=0;i<el.childNodes.length;++i){arguments.callee(el.childNodes[i])}}})(this[0]);return jQuery(ret)};GENTICS.Aloha.Selection=function(){this.rangeObject=new Object();this.tagHierarchy={textNode:[],abbr:["textNode"],b:["textNode","b","i","em","sup","sub","br","span","img","a","del","ins","u","cite","q","code","abbr","strong"],pre:["textNode","b","i","em","sup","sub","br","span","img","a","del","ins","u","cite","q","code","abbr","code"],blockquote:["textNode","b","i","em","sup","sub","br","span","img","a","del","ins","u","cite","q","code","abbr","p","h1","h2","h3","h4","h5","h6"],ins:["textNode","b","i","em","sup","sub","br","span","img","a","u","p","h1","h2","h3","h4","h5","h6"],ul:["li"],ol:["li"],li:["textNode","b","i","em","sup","sub","br","span","img","ul","ol","h1","h2","h3","h4","h5","h6","del","ins","u"],tr:["td","th"],table:["tr"],div:["textNode","b","i","em","sup","sub","br","span","img","ul","ol","table","h1","h2","h3","h4","h5","h6","del","ins","u","p","div","pre","blockquote"],h1:["textNode","b","i","em","sup","sub","br","span","img","a","del","ins","u"]};this.tagHierarchy={textNode:this.tagHierarchy.textNode,abbr:this.tagHierarchy.abbr,br:this.tagHierarchy.textNode,img:this.tagHierarchy.textNode,b:this.tagHierarchy.b,strong:this.tagHierarchy.b,code:this.tagHierarchy.b,q:this.tagHierarchy.b,blockquote:this.tagHierarchy.blockquote,cite:this.tagHierarchy.b,i:this.tagHierarchy.b,em:this.tagHierarchy.b,sup:this.tagHierarchy.b,sub:this.tagHierarchy.b,span:this.tagHierarchy.b,del:this.tagHierarchy.del,ins:this.tagHierarchy.ins,u:this.tagHierarchy.b,p:this.tagHierarchy.b,pre:this.tagHierarchy.pre,a:this.tagHierarchy.b,ul:this.tagHierarchy.ul,ol:this.tagHierarchy.ol,li:this.tagHierarchy.li,td:this.tagHierarchy.li,div:this.tagHierarchy.div,h1:this.tagHierarchy.h1,h2:this.tagHierarchy.h1,h3:this.tagHierarchy.h1,h4:this.tagHierarchy.h1,h5:this.tagHierarchy.h1,h6:this.tagHierarchy.h1,table:this.tagHierarchy.table};this.replacingElements={h1:["p","h1","h2","h3","h4","h5","h6","pre"],blockquote:["blockquote"]};this.replacingElements={h1:this.replacingElements.h1,h2:this.replacingElements.h1,h3:this.replacingElements.h1,h4:this.replacingElements.h1,h5:this.replacingElements.h1,h6:this.replacingElements.h1,pre:this.replacingElements.h1,p:this.replacingElements.h1,blockquote:this.replacingElements.blockquote};this.allowedToStealElements={h1:["textNode"]};this.allowedToStealElements={h1:this.allowedToStealElements.h1,h2:this.allowedToStealElements.h1,h3:this.allowedToStealElements.h1,h4:this.allowedToStealElements.h1,h5:this.allowedToStealElements.h1,h6:this.allowedToStealElements.h1,p:this.tagHierarchy.b}};GENTICS.Aloha.Selection.prototype.SelectionTree=function(){this.domobj=new Object();this.selection;this.children=new Array()};GENTICS.Aloha.Selection.prototype.onChange=function(objectClicked,event){if(this.updateSelectionTimeout){window.clearTimeout(this.updateSelectionTimeout);this.updateSelectionTimeout=undefined}this.updateSelectionTimeout=window.setTimeout(function(){GENTICS.Aloha.Selection.updateSelection(event)},5)};GENTICS.Aloha.Selection.prototype.updateSelection=function(event){var rangeObject=this.rangeObject=new GENTICS.Aloha.Selection.SelectionRange(true);rangeObject.update();GENTICS.Aloha.FloatingMenu.setScope("GENTICS.Aloha.continuoustext");GENTICS.Aloha.EventRegistry.trigger(new GENTICS.Aloha.Event("selectionChanged",GENTICS.Aloha,[rangeObject,event]));return true};GENTICS.Aloha.Selection.prototype.getSelectionTree=function(rangeObject){if(!rangeObject){return this.rangeObject.getSelectionTree()}if(!rangeObject.commonAncestorContainer){GENTICS.Aloha.Log.error(this,"the rangeObject is missing the commonAncestorContainer");return false}this.inselection=false;if(GENTICS.Utils.Dom.doCleanup({mergetext:true},rangeObject)){this.rangeObject.update();this.rangeObject.select()}return this.recursiveGetSelectionTree(rangeObject,rangeObject.commonAncestorContainer)};GENTICS.Aloha.Selection.prototype.recursiveGetSelectionTree=function(rangeObject,currentObject){var jQueryCurrentObject=jQuery(currentObject);var childCount=0;var that=this;var currentElements=new Array();jQueryCurrentObject.contents().each(function(index){var selectionType="none";var startOffset=false;var endOffset=false;var collapsedFound=false;if(rangeObject.isCollapsed()&&currentObject===rangeObject.startContainer&&rangeObject.startOffset==index){currentElements[childCount]=new GENTICS.Aloha.Selection.SelectionTree();currentElements[childCount].selection="collapsed";currentElements[childCount].domobj=undefined;that.inselection=false;collapsedFound=true;childCount++}if(!that.inselection&&!collapsedFound){switch(this.nodeType){case 3:if(this===rangeObject.startContainer){that.inselection=true;selectionType=rangeObject.startOffset>0?"partial":"full";startOffset=rangeObject.startOffset;endOffset=this.length}break;case 1:if(this===rangeObject.startContainer&&rangeObject.startOffset==0){that.inselection=true;selectionType="full"}if(currentObject===rangeObject.startContainer&&rangeObject.startOffset==index){that.inselection=true;selectionType="full"}break}}if(that.inselection&&!collapsedFound){if(selectionType=="none"){selectionType="full"}switch(this.nodeType){case 3:if(this===rangeObject.endContainer){that.inselection=false;if(rangeObject.endOffset<this.length){selectionType="partial"}if(startOffset===false){startOffset=0}endOffset=rangeObject.endOffset}break;case 1:if(this===rangeObject.endContainer&&rangeObject.endOffset==0){that.inselection=false}break}if(currentObject===rangeObject.endContainer&&rangeObject.endOffset<=index){that.inselection=false;selectionType="none"}}currentElements[childCount]=new GENTICS.Aloha.Selection.SelectionTree();currentElements[childCount].domobj=this;currentElements[childCount].selection=selectionType;if(selectionType=="partial"){currentElements[childCount].startOffset=startOffset;currentElements[childCount].endOffset=endOffset}currentElements[childCount].children=that.recursiveGetSelectionTree(rangeObject,this);if(currentElements[childCount].children.length>0){var noneFound=false;var partialFound=false;var fullFound=false;for(var i=0;i<currentElements[childCount].children.length;++i){switch(currentElements[childCount].children[i].selection){case"none":noneFound=true;break;case"full":fullFound=true;break;case"partial":partialFound=true;break}}if(partialFound||(fullFound&&noneFound)){currentElements[childCount].selection="partial"}else{if(fullFound&&!partialFound&&!noneFound){currentElements[childCount].selection="full"}}}childCount++});if(rangeObject.isCollapsed()&&currentObject===rangeObject.startContainer&&rangeObject.startOffset==currentObject.childNodes.length){currentElements[childCount]=new GENTICS.Aloha.Selection.SelectionTree();currentElements[childCount].selection="collapsed";currentElements[childCount].domobj=undefined}return currentElements};GENTICS.Aloha.Selection.prototype.getRangeObject=function(){return this.rangeObject};GENTICS.Aloha.Selection.prototype.isRangeObjectWithinMarkup=function(rangeObject,startOrEnd,markupObject,tagComparator,limitObject){domObj=!startOrEnd?rangeObject.startContainer:rangeObject.endContainer;if(typeof tagComparator!=="undefined"&&typeof tagComparator!=="function"){GENTICS.Aloha.Log.error(this,"parameter tagComparator is not a function")}var that=this;if(typeof tagComparator==="undefined"){tagComparator=function(domobj,markupObject){return that.standardTextLevelSemanticsComparator(domobj,markupObject)}}var parents=jQuery(domObj).parents();var returnVal=false;var i=-1;var that=this;if(parents.length>0){parents.each(function(){if(this===limitObject){GENTICS.Aloha.Log.debug(that,"reached limit dom obj");return false}if(tagComparator(this,markupObject)){if(returnVal===false){returnVal=new Array()}GENTICS.Aloha.Log.debug(that,"reached object equal to markup");i++;returnVal[i]=this;return true}})}return returnVal};GENTICS.Aloha.Selection.prototype.standardSectionsAndGroupingContentComparator=function(domobj,markupObject){if(domobj.nodeType===1){if(markupObject[0].tagName&&GENTICS.Aloha.Selection.replacingElements[domobj.tagName.toLowerCase()]&&GENTICS.Aloha.Selection.replacingElements[domobj.tagName.toLowerCase()].indexOf(markupObject[0].tagName.toLowerCase())!=-1){return true}}else{GENTICS.Aloha.Log.debug(this,"only element nodes (nodeType == 1) can be compared")}return false};GENTICS.Aloha.Selection.prototype.standardTextLevelSemanticsComparator=function(domobj,markupObject){if(domobj.nodeType===1){if(domobj.tagName.toLowerCase()!=markupObject[0].tagName.toLowerCase()){return false}if(!this.standardAttributesComparator(domobj,markupObject)){return false}return true}else{GENTICS.Aloha.Log.debug(this,"only element nodes (nodeType == 1) can be compared")}return false};GENTICS.Aloha.Selection.prototype.standardAttributesComparator=function(domobj,markupObject){if(domobj.attributes&&domobj.attributes.length&&domobj.attributes.length>0){for(var i=0;i<domobj.attributes.length;i++){var attr=domobj.attributes[i];if(attr.nodeName.toLowerCase()=="class"&&attr.nodeValue.length>0){var classString=attr.nodeValue;var classes=classString.split(" ")}}}if(markupObject[0].attributes&&markupObject[0].attributes.length&&markupObject[0].attributes.length>0){for(var i=0;i<markupObject[0].attributes.length;i++){var attr=markupObject[0].attributes[i];if(attr.nodeName.toLowerCase()=="class"&&attr.nodeValue.length>0){var classString=attr.nodeValue;var classes2=classString.split(" ")}}}if(classes&&!classes2||classes2&&!classes){GENTICS.Aloha.Log.debug(this,"tag comparison for <"+domobj.tagName.toLowerCase()+"> failed because one element has classes and the other has not");return false}if(classes&&classes2&&classes.length!=classes.length){GENTICS.Aloha.Log.debug(this,"tag comparison for <"+domobj.tagName.toLowerCase()+"> failed because of a different amount of classes");return false}if(classes&&classes2&&classes.length==classes2.length&&classes.length!=0){for(var i=0;i<classes.length;i++){if(!markupObject.hasClass(classes[i])){GENTICS.Aloha.Log.debug(this,"tag comparison for <"+domobj.tagName.toLowerCase()+"> failed because of different classes");return false}}}return true};GENTICS.Aloha.Selection.prototype.changeMarkup=function(rangeObject,markupObject,tagComparator){var tagName=markupObject[0].tagName.toLowerCase();if(this.replacingElements[tagName]){var backupRangeObject=rangeObject;rangeObject=new this.SelectionRange(rangeObject);if(GENTICS.Aloha.activeEditable){var newCAC=GENTICS.Aloha.activeEditable.obj.get(0)}else{var newCAC=document.body}rangeObject.update(newCAC);markupObject.isReplacingElement=true}else{if(rangeObject.isCollapsed()){GENTICS.Aloha.Log.debug(this,"early returning from applying markup because nothing is currently selected");return false}}if(GENTICS.Aloha.activeEditable){var limitObject=GENTICS.Aloha.activeEditable.obj[0]}else{var limitObject=document.body}var relevantMarkupObjectsAtSelectionStart=this.isRangeObjectWithinMarkup(rangeObject,false,markupObject,tagComparator,limitObject);var relevantMarkupObjectsAtSelectionEnd=this.isRangeObjectWithinMarkup(rangeObject,true,markupObject,tagComparator,limitObject);if(!markupObject.isReplacingElement&&rangeObject.startOffset==0){var prevSibling;if(prevSibling=this.getTextNodeSibling(false,rangeObject.commonAncestorContainer.parentNode,rangeObject.startContainer)){var relevantMarkupObjectBeforeSelection=this.isRangeObjectWithinMarkup({startContainer:prevSibling,startOffset:0},false,markupObject,tagComparator,limitObject)}}if(!markupObject.isReplacingElement&&(rangeObject.endOffset==rangeObject.endContainer.length)){var nextSibling;if(nextSibling=this.getTextNodeSibling(true,rangeObject.commonAncestorContainer.parentNode,rangeObject.endContainer)){var relevantMarkupObjectAfterSelection=this.isRangeObjectWithinMarkup({startContainer:nextSibling,startOffset:0},false,markupObject,tagComparator,limitObject)}}if(!markupObject.isReplacingElement&&(relevantMarkupObjectsAtSelectionStart&&!relevantMarkupObjectsAtSelectionEnd)){GENTICS.Aloha.Log.info(this,"markup 2 non-markup");this.prepareForRemoval(rangeObject.getSelectionTree(),markupObject,tagComparator);jQuery(relevantMarkupObjectsAtSelectionStart).addClass("preparedForRemoval");this.insertCroppedMarkups(relevantMarkupObjectsAtSelectionStart,rangeObject,false,tagComparator)}else{if(!markupObject.isReplacingElement&&relevantMarkupObjectsAtSelectionStart&&relevantMarkupObjectsAtSelectionEnd){GENTICS.Aloha.Log.info(this,"markup 2 markup");this.prepareForRemoval(rangeObject.getSelectionTree(),markupObject,tagComparator);this.splitRelevantMarkupObject(relevantMarkupObjectsAtSelectionStart,relevantMarkupObjectsAtSelectionEnd,rangeObject,tagComparator)}else{if(!markupObject.isReplacingElement&&((!relevantMarkupObjectsAtSelectionStart&&relevantMarkupObjectsAtSelectionEnd)||relevantMarkupObjectAfterSelection||relevantMarkupObjectBeforeSelection)){GENTICS.Aloha.Log.info(this,"non-markup 2 markup OR with next2markup");if(relevantMarkupObjectBeforeSelection&&relevantMarkupObjectAfterSelection){var extendedRangeObject=new GENTICS.Aloha.Selection.SelectionRange(rangeObject);extendedRangeObject.startContainer=jQuery(relevantMarkupObjectBeforeSelection[relevantMarkupObjectBeforeSelection.length-1]).textNodes()[0];extendedRangeObject.startOffset=0;extendedRangeObject.endContainer=jQuery(relevantMarkupObjectAfterSelection[relevantMarkupObjectAfterSelection.length-1]).textNodes().last()[0];extendedRangeObject.endOffset=extendedRangeObject.endContainer.length;extendedRangeObject.update();this.applyMarkup(extendedRangeObject.getSelectionTree(),rangeObject,markupObject,tagComparator);GENTICS.Aloha.Log.info(this,"double extending previous markup(previous and after selection), actually wrapping it ...")}else{if(relevantMarkupObjectBeforeSelection&&!relevantMarkupObjectAfterSelection&&!relevantMarkupObjectsAtSelectionEnd){this.extendExistingMarkupWithSelection(relevantMarkupObjectBeforeSelection,rangeObject,false,tagComparator);GENTICS.Aloha.Log.info(this,"extending previous markup")}else{if(relevantMarkupObjectBeforeSelection&&!relevantMarkupObjectAfterSelection&&relevantMarkupObjectsAtSelectionEnd){var extendedRangeObject=new GENTICS.Aloha.Selection.SelectionRange(rangeObject);extendedRangeObject.startContainer=jQuery(relevantMarkupObjectBeforeSelection[relevantMarkupObjectBeforeSelection.length-1]).textNodes()[0];extendedRangeObject.startOffset=0;extendedRangeObject.endContainer=jQuery(relevantMarkupObjectsAtSelectionEnd[relevantMarkupObjectsAtSelectionEnd.length-1]).textNodes().last()[0];extendedRangeObject.endOffset=extendedRangeObject.endContainer.length;extendedRangeObject.update();this.applyMarkup(extendedRangeObject.getSelectionTree(),rangeObject,markupObject,tagComparator);GENTICS.Aloha.Log.info(this,"double extending previous markup(previous and relevant at the end), actually wrapping it ...")}else{if(!relevantMarkupObjectBeforeSelection&&relevantMarkupObjectAfterSelection){this.extendExistingMarkupWithSelection(relevantMarkupObjectAfterSelection,rangeObject,true,tagComparator);GENTICS.Aloha.Log.info(this,"extending following markup backwards")}else{this.extendExistingMarkupWithSelection(relevantMarkupObjectsAtSelectionEnd,rangeObject,true,tagComparator)}}}}}else{if(markupObject.isReplacingElement||(!relevantMarkupObjectsAtSelectionStart&&!relevantMarkupObjectsAtSelectionEnd&&!relevantMarkupObjectBeforeSelection&&!relevantMarkupObjectAfterSelection)){GENTICS.Aloha.Log.info(this,"non-markup 2 non-markup");this.applyMarkup(rangeObject.getSelectionTree(),rangeObject,markupObject,tagComparator,{setRangeObject2NewMarkup:true})}}}}jQuery(".preparedForRemoval").zap();rangeObject.update();if(markupObject.isReplacingElement){backupRangeObject.select()}else{rangeObject.select()}};GENTICS.Aloha.Selection.prototype.areMarkupObjectsAsLongAsRangeObject=function(relevantMarkupObjectsAtSelectionStart,relevantMarkupObjectsAtSelectionEnd,rangeObject){if(rangeObject.startOffset!==0){return false}for(var i=0;i<relevantMarkupObjectsAtSelectionStart.length;i++){var el=relevantMarkupObjectsAtSelectionStart[i];if(jQuery(el).textNodes().first()[0]!==rangeObject.startContainer){return false}}for(var i=0;i<relevantMarkupObjectsAtSelectionEnd.length;i++){var el=relevantMarkupObjectsAtSelectionEnd[i];if(jQuery(el).textNodes().last()[0]!==rangeObject.endContainer||jQuery(el).textNodes().last()[0].length!=rangeObject.endOffset){return false}}return true};GENTICS.Aloha.Selection.prototype.splitRelevantMarkupObject=function(relevantMarkupObjectsAtSelectionStart,relevantMarkupObjectsAtSelectionEnd,rangeObject,tagComparator){jQuery(relevantMarkupObjectsAtSelectionStart).addClass("preparedForRemoval");jQuery(relevantMarkupObjectsAtSelectionEnd).addClass("preparedForRemoval");if(this.areMarkupObjectsAsLongAsRangeObject(relevantMarkupObjectsAtSelectionStart,relevantMarkupObjectsAtSelectionEnd,rangeObject)){return true}var relevantMarkupObjectAtSelectionStartAndEnd=this.intersectRelevantMarkupObjects(relevantMarkupObjectsAtSelectionStart,relevantMarkupObjectsAtSelectionEnd);if(relevantMarkupObjectAtSelectionStartAndEnd){this.insertCroppedMarkups([relevantMarkupObjectAtSelectionStartAndEnd],rangeObject,false,tagComparator);this.insertCroppedMarkups([relevantMarkupObjectAtSelectionStartAndEnd],rangeObject,true,tagComparator)}else{this.insertCroppedMarkups(relevantMarkupObjectsAtSelectionStart,rangeObject,false,tagComparator);this.insertCroppedMarkups(relevantMarkupObjectsAtSelectionEnd,rangeObject,true,tagComparator)}return true};GENTICS.Aloha.Selection.prototype.intersectRelevantMarkupObjects=function(relevantMarkupObjectsAtSelectionStart,relevantMarkupObjectsAtSelectionEnd){var intersection=false;if(!relevantMarkupObjectsAtSelectionStart||!relevantMarkupObjectsAtSelectionEnd){return intersection}for(var i=0;i<relevantMarkupObjectsAtSelectionStart.length;i++){var elStart=relevantMarkupObjectsAtSelectionStart[i];for(var j=0;j<relevantMarkupObjectsAtSelectionEnd.length;j++){var elEnd=relevantMarkupObjectsAtSelectionEnd[j];if(elStart===elEnd){intersection=elStart}}}return intersection};GENTICS.Aloha.Selection.prototype.extendExistingMarkupWithSelection=function(relevantMarkupObjects,rangeObject,startOrEnd,tagComparator){if(!startOrEnd){var extendMarkupsAtStart=true}if(startOrEnd){var extendMarkupsAtEnd=true}var objects=[];for(var i=0;i<relevantMarkupObjects.length;i++){objects[i]=new this.SelectionRange();el=relevantMarkupObjects[i];if(extendMarkupsAtEnd&&!extendMarkupsAtStart){objects[i].startContainer=rangeObject.startContainer;objects[i].startOffset=rangeObject.startOffset;textnodes=jQuery(el).textNodes(true);objects[i].endContainer=textnodes[textnodes.length-1];objects[i].endOffset=textnodes[textnodes.length-1].length;objects[i].update();this.applyMarkup(objects[i].getSelectionTree(),rangeObject,this.getClonedMarkup4Wrapping(el),tagComparator,{setRangeObject2NewMarkup:true})}if(!extendMarkupsAtEnd&&extendMarkupsAtStart){textnodes=jQuery(el).textNodes(true);objects[i].startContainer=textnodes[0];objects[i].startOffset=0;objects[i].endContainer=rangeObject.endContainer;objects[i].endOffset=rangeObject.endOffset;objects[i].update();this.applyMarkup(objects[i].getSelectionTree(),rangeObject,this.getClonedMarkup4Wrapping(el),tagComparator,{setRangeObject2NewMarkup:true})}}return true};GENTICS.Aloha.Selection.prototype.getClonedMarkup4Wrapping=function(domobj){var wrapper=jQuery(domobj).clone().removeClass("preparedForRemoval").empty();if(wrapper.attr("class").length==0){wrapper.removeAttr("class")}return wrapper};GENTICS.Aloha.Selection.prototype.insertCroppedMarkups=function(relevantMarkupObjects,rangeObject,startOrEnd,tagComparator){if(!startOrEnd){var cropMarkupsAtEnd=true}if(startOrEnd){var cropMarkupsAtStart=true}var objects=[];for(var i=0;i<relevantMarkupObjects.length;i++){objects[i]=new this.SelectionRange();var el=relevantMarkupObjects[i];if(cropMarkupsAtEnd&&!cropMarkupsAtStart){var textNodes=jQuery(el).textNodes(true);objects[i].startContainer=textNodes[0];objects[i].startOffset=0;if(objects[i].startContainer===rangeObject.startContainer&&objects[i].startOffset===rangeObject.startOffset){continue}if(rangeObject.startOffset==0){objects[i].endContainer=this.getTextNodeSibling(false,el,rangeObject.startContainer);objects[i].endOffset=objects[i].endContainer.length}else{objects[i].endContainer=rangeObject.startContainer;objects[i].endOffset=rangeObject.startOffset}objects[i].update();this.applyMarkup(objects[i].getSelectionTree(),rangeObject,this.getClonedMarkup4Wrapping(el),tagComparator,{setRangeObject2NextSibling:true})}if(!cropMarkupsAtEnd&&cropMarkupsAtStart){objects[i].startContainer=rangeObject.endContainer;objects[i].startOffset=rangeObject.endOffset;textnodes=jQuery(el).textNodes(true);objects[i].endContainer=textnodes[textnodes.length-1];objects[i].endOffset=textnodes[textnodes.length-1].length;objects[i].update();this.applyMarkup(objects[i].getSelectionTree(),rangeObject,this.getClonedMarkup4Wrapping(el),tagComparator,{setRangeObject2PreviousSibling:true})}}return true};GENTICS.Aloha.Selection.prototype.changeMarkupOnSelection=function(markupObject){this.changeMarkup(this.getRangeObject(),markupObject,this.getStandardTagComparator(markupObject));GENTICS.Utils.Dom.doCleanup({mergetext:true},this.rangeObject);this.rangeObject.update();this.rangeObject.select()};GENTICS.Aloha.Selection.prototype.applyMarkup=function(selectionTree,rangeObject,markupObject,tagComparator,options){options=options?options:new Object();this.prepareForRemoval(selectionTree,markupObject,tagComparator);var optimizedSelectionTree=this.optimizeSelectionTree4Markup(selectionTree,markupObject,tagComparator);breakpoint=true;for(var i=0;i<optimizedSelectionTree.length;i++){var el=optimizedSelectionTree[i];if(el.wrappable){this.wrapMarkupAroundSelectionTree(el.elements,rangeObject,markupObject,tagComparator,options)}else{GENTICS.Aloha.Log.debug(this,"dive further into non-wrappable object");this.applyMarkup(el.element.children,rangeObject,markupObject,tagComparator,options)}}};GENTICS.Aloha.Selection.prototype.getMarkupType=function(markupObject){var nn=jQuery(markupObject)[0].nodeName.toLowerCase();if(markupObject.outerHTML){GENTICS.Aloha.Log.debug(this,"Node name detected: "+nn+" for: "+markupObject.outerHTML())}if(nn=="#text"){return"textNode"}if(this.replacingElements[nn]){return"sectionOrGroupingContent"}if(this.tagHierarchy[nn]){return"textLevelSemantics"}GENTICS.Aloha.Log.warn(this,"unknown markup passed to this.getMarkupType(...): "+markupObject.outerHTML())};GENTICS.Aloha.Selection.prototype.getStandardTagComparator=function(markupObject){var that=this;switch(this.getMarkupType(markupObject)){case"textNode":return function(p1,p2){return false};break;case"sectionOrGroupingContent":return function(domobj,markupObject){return that.standardSectionsAndGroupingContentComparator(domobj,markupObject)};break;case"textLevelSemantics":default:return function(domobj,markupObject){return that.standardTextLevelSemanticsComparator(domobj,markupObject)}}};GENTICS.Aloha.Selection.prototype.prepareForRemoval=function(selectionTree,markupObject,tagComparator){var that=this;if(typeof tagComparator!=="undefined"&&typeof tagComparator!=="function"){GENTICS.Aloha.Log.error(this,"parameter tagComparator is not a function")}if(typeof tagComparator==="undefined"){tagComparator=this.getStandardTagComparator(markupObject)}for(var i=0;i<selectionTree.length;i++){var el=selectionTree[i];if(el.domobj&&(el.selection=="full"||(el.selection=="partial"&&markupObject.isReplacingElement))){if(el.domobj.nodeType===1&&tagComparator(el.domobj,markupObject)){GENTICS.Aloha.Log.debug(this,"Marking for removal: "+el.domobj.nodeName);jQuery(el.domobj).addClass("preparedForRemoval")}}if(el.selection!="none"&&el.children.length>0){this.prepareForRemoval(el.children,markupObject,tagComparator)}}};GENTICS.Aloha.Selection.prototype.wrapMarkupAroundSelectionTree=function(selectionTree,rangeObject,markupObject,tagComparator,options){var objects2wrap=new Array;var j=-1;GENTICS.Aloha.Log.debug(this,"The formatting <"+markupObject[0].tagName+"> will be wrapped around the selection");var preText="";var postText="";for(var i=0;i<selectionTree.length;i++){var el=selectionTree[i];if(el.domobj&&!this.canTag1WrapTag2(el.domobj.parentNode.tagName.toLowerCase(),markupObject[0].tagName.toLowerCase())){GENTICS.Aloha.Log.info(this,"Skipping the wrapping of <"+markupObject[0].tagName.toLowerCase()+"> because this tag is not allowed inside <"+el.domobj.parentNode.tagName.toLowerCase()+">");continue}if(el.domobj&&el.domobj.nodeType==3&&jQuery.trim(jQuery(el.domobj).outerHTML()).length==0){continue}if(el.domobj&&el.selection=="partial"&&!markupObject.isReplacingElement){if(el.startOffset!==undefined&&el.endOffset===undefined){j++;preText+=el.domobj.data.substr(0,el.startOffset);el.domobj.data=el.domobj.data.substr(el.startOffset,el.domobj.data.length-el.startOffset);objects2wrap[j]=el.domobj}else{if(el.endOffset!==undefined&&el.startOffset===undefined){j++;postText+=el.domobj.data.substr(el.endOffset,el.domobj.data.length-el.endOffset);el.domobj.data=el.domobj.data.substr(0,el.endOffset);objects2wrap[j]=el.domobj}else{if(el.endOffset!==undefined&&el.startOffset!==undefined){if(el.startOffset==el.endOffset){GENTICS.Aloha.Log.debug(this,"skipping empty selection");continue}j++;preText+=el.domobj.data.substr(0,el.startOffset);var middleText=el.domobj.data.substr(el.startOffset,el.endOffset-el.startOffset);postText+=el.domobj.data.substr(el.endOffset,el.domobj.data.length-el.endOffset);el.domobj.data=middleText;objects2wrap[j]=el.domobj}else{GENTICS.Aloha.Log.debug(this,"diving into object");this.applyMarkup(el.children,rangeObject,markupObject,tagComparator,options)}}}}if(el.domobj&&(el.selection=="full"||(el.selection=="partial"&&markupObject.isReplacingElement))){j++;objects2wrap[j]=el.domobj}}breakpoint=true;if(objects2wrap.length>0){objects2wrap=jQuery(objects2wrap);jQuery.each(objects2wrap,function(index,element){if(jQuery.browser.msie&&element.nodeType==3&&!element.nextSibling&&!element.previousSibling&&element.parentNode&&element.parentNode.nodeName.toLowerCase()=="li"){element.data=jQuery.trim(element.data)}});var newMarkup=objects2wrap.wrapAll(markupObject).parent();newMarkup.before(preText).after(postText);var breakpoint=true;if(options.setRangeObject2NewMarkup){var textnodes=objects2wrap.textNodes();if(textnodes.index(rangeObject.startContainer)!=-1){rangeObject.startOffset=0}if(textnodes.index(rangeObject.endContainer)!=-1){rangeObject.endOffset=rangeObject.endContainer.length}var breakpoint=true}if(options.setRangeObject2NextSibling){var prevOrNext=true;var textNode2Start=newMarkup.textNodes(true).last()[0];if(objects2wrap.index(rangeObject.startContainer)!=-1){rangeObject.startContainer=this.getTextNodeSibling(prevOrNext,newMarkup.parent(),textNode2Start);rangeObject.startOffset=0}if(objects2wrap.index(rangeObject.endContainer)!=-1){rangeObject.endContainer=this.getTextNodeSibling(prevOrNext,newMarkup.parent(),textNode2Start);rangeObject.endOffset=rangeObject.endOffset-textNode2Start.length}}if(options.setRangeObject2PreviousSibling){var prevOrNext=false;var textNode2Start=newMarkup.textNodes(true).first()[0];if(objects2wrap.index(rangeObject.startContainer)!=-1){rangeObject.startContainer=this.getTextNodeSibling(prevOrNext,newMarkup.parent(),textNode2Start);rangeObject.startOffset=0}if(objects2wrap.index(rangeObject.endContainer)!=-1){rangeObject.endContainer=this.getTextNodeSibling(prevOrNext,newMarkup.parent(),textNode2Start);rangeObject.endOffset=rangeObject.endContainer.length}}}};GENTICS.Aloha.Selection.prototype.getTextNodeSibling=function(previousOrNext,commonAncestorContainer,currentTextNode){var textNodes=jQuery(commonAncestorContainer).textNodes(true);index=textNodes.index(currentTextNode);if(index==-1){return false}var newIndex=index+(!previousOrNext?-1:1);return textNodes[newIndex]?textNodes[newIndex]:false};GENTICS.Aloha.Selection.prototype.optimizeSelectionTree4Markup=function(selectionTree,markupObject,tagComparator){var groupMap=[];var outerGroupIndex=0;var innerGroupIndex=0;var that=this;if(typeof tagComparator==="undefined"){tagComparator=function(domobj,markupObject){return that.standardTextLevelSemanticsComparator(markupObject)}}for(var i=0;i<selectionTree.length;i++){if(selectionTree[i].domobj&&selectionTree[i].selection!="none"){if(markupObject.isReplacingElement&&tagComparator(markupObject[0],jQuery(selectionTree[i].domobj))){if(groupMap[outerGroupIndex]!==undefined){outerGroupIndex++}groupMap[outerGroupIndex]=new Object();groupMap[outerGroupIndex].wrappable=true;groupMap[outerGroupIndex].elements=new Array();groupMap[outerGroupIndex].elements[innerGroupIndex]=selectionTree[i];outerGroupIndex++}else{if(this.canMarkupBeApplied2ElementAsWhole([selectionTree[i]],markupObject)){if(groupMap[outerGroupIndex]===undefined){groupMap[outerGroupIndex]=new Object();groupMap[outerGroupIndex].wrappable=true;groupMap[outerGroupIndex].elements=new Array()}if(markupObject.isReplacingElement){var startPosition=i;for(var j=i-1;j>=0;j--){if(this.canMarkupBeApplied2ElementAsWhole([selectionTree[j]],markupObject)&&this.isMarkupAllowedToStealSelectionTreeElement(selectionTree[j],markupObject)){startPosition=j}else{break}}var endPosition=i;for(var j=i+1;j<selectionTree.length;j++){if(this.canMarkupBeApplied2ElementAsWhole([selectionTree[j]],markupObject)&&this.isMarkupAllowedToStealSelectionTreeElement(selectionTree[j],markupObject)){endPosition=j}else{break}}innerGroupIndex=0;for(var j=startPosition;j<=endPosition;j++){groupMap[outerGroupIndex].elements[innerGroupIndex]=selectionTree[j];groupMap[outerGroupIndex].elements[innerGroupIndex].selection="full";innerGroupIndex++}innerGroupIndex=0}else{groupMap[outerGroupIndex].elements[innerGroupIndex]=selectionTree[i];innerGroupIndex++}}else{if(groupMap[outerGroupIndex]!==undefined){outerGroupIndex++}groupMap[outerGroupIndex]=new Object();groupMap[outerGroupIndex].wrappable=false;groupMap[outerGroupIndex].element=selectionTree[i];innerGroupIndex=0;outerGroupIndex++}}}}return groupMap};GENTICS.Aloha.Selection.prototype.isMarkupAllowedToStealSelectionTreeElement=function(selectionTreeElement,markupObject){if(!selectionTreeElement.domobj){return false}var nodeName=selectionTreeElement.domobj.nodeName.toLowerCase();nodeName=(nodeName=="#text")?"textNode":nodeName;var markupName=markupObject[0].nodeName.toLowerCase();if(!this.allowedToStealElements[markupName]){return false}if(this.allowedToStealElements[markupName].indexOf(nodeName)==-1){return false}return true};GENTICS.Aloha.Selection.prototype.canMarkupBeApplied2ElementAsWhole=function(selectionTree,markupObject){if(markupObject.jquery){htmlTag=markupObject[0].tagName}if(markupObject.tagName){htmlTag=markupObject.tagName}returnVal=true;for(var i=0;i<selectionTree.length;i++){var el=selectionTree[i];if(el.domobj&&(el.selection!="none"||markupObject.isReplacingElement)){if(!this.canTag1WrapTag2(htmlTag,el.domobj.nodeName)){return false}if(el.children.length>0&&!this.canMarkupBeApplied2ElementAsWhole(el.children,markupObject)){return false}}}return returnVal};GENTICS.Aloha.Selection.prototype.canTag1WrapTag2=function(t1,t2){t1=(t1=="#text")?"textNode":t1.toLowerCase();t2=(t2=="#text")?"textNode":t2.toLowerCase();if(!this.tagHierarchy[t1]){return true}if(!this.tagHierarchy[t2]){return true}var t1Array=this.tagHierarchy[t1];var returnVal=(t1Array.indexOf(t2)!=-1)?true:false;return returnVal};GENTICS.Aloha.Selection.prototype.mayInsertTag=function(tagName){if(typeof this.rangeObject.unmodifiableMarkupAtStart=="object"){for(var i=0;i<this.rangeObject.unmodifiableMarkupAtStart.length;++i){if(!this.canTag1WrapTag2(this.rangeObject.unmodifiableMarkupAtStart[i].nodeName,tagName)){return false}}return true}else{GENTICS.Aloha.Log.warn(this,"Unable to determine whether tag "+tagName+" may be inserted");return true}};GENTICS.Aloha.Selection.prototype.toString=function(){return"GENTICS.Aloha.Selection"};GENTICS.Aloha.Selection.prototype.SelectionRange=function(rangeObject){GENTICS.Utils.RangeObject.apply(this,arguments);this.commonAncestorContainer;this.selectionTree;this.markupEffectiveAtStart=[];this.unmodifiableMarkupAtStart=[];this.limitObject;this.splitObject;if(rangeObject){if(rangeObject.commonAncestorContainer){this.commonAncestorContainer=rangeObject.commonAncestorContainer}if(rangeObject.selectionTree){this.selectionTree=rangeObject.selectionTree}if(rangeObject.limitObject){this.limitObject=rangeObject.limitObject}if(rangeObject.markupEffectiveAtStart){this.markupEffectiveAtStart=rangeObject.markupEffectiveAtStart}if(rangeObject.unmodifiableMarkupAtStart){this.unmodifiableMarkupAtStart=rangeObject.unmodifiableMarkupAtStart}if(rangeObject.splitObject){this.splitObject=rangeObject.splitObject}}};GENTICS.Aloha.Selection.prototype.SelectionRange.prototype=new GENTICS.Utils.RangeObject();GENTICS.Aloha.Selection.prototype.SelectionRange.prototype.select=function(){GENTICS.Utils.RangeObject.prototype.select.apply(this,arguments);GENTICS.Aloha.Selection.updateSelection()};GENTICS.Aloha.Selection.prototype.SelectionRange.prototype.update=function(commonAncestorContainer){this.updatelimitObject();this.updateMarkupEffectiveAtStart();this.updateCommonAncestorContainer(commonAncestorContainer);this.selectionTree=undefined};GENTICS.Aloha.Selection.prototype.SelectionRange.prototype.getSelectionTree=function(){if(!this.selectionTree){this.selectionTree=GENTICS.Aloha.Selection.getSelectionTree(this)}return this.selectionTree};GENTICS.Aloha.Selection.prototype.SelectionRange.prototype.getSelectedSiblings=function(domobj){var selectionTree=this.getSelectionTree();return this.recursionGetSelectedSiblings(domobj,selectionTree)};GENTICS.Aloha.Selection.prototype.SelectionRange.prototype.recursionGetSelectedSiblings=function(domobj,selectionTree){var selectedSiblings=false;var foundObj=false;for(var i=0;i<selectionTree.length;++i){if(selectionTree[i].domobj===domobj){foundObj=true;selectedSiblings=[]}else{if(!foundObj&&selectionTree[i].children){selectedSiblings=this.recursionGetSelectedSiblings(domobj,selectionTree[i].children);if(selectedSiblings!==false){break}}else{if(foundObj&&selectionTree[i].domobj&&selectionTree[i].selection!="collapsed"&&selectionTree[i].selection!="none"){selectedSiblings.push(selectionTree[i].domobj)}else{if(foundObj&&selectionTree[i].selection=="none"){break}}}}}return selectedSiblings};GENTICS.Aloha.Selection.prototype.SelectionRange.prototype.updateMarkupEffectiveAtStart=function(){this.markupEffectiveAtStart=[];this.unmodifiableMarkupAtStart=[];var parents=this.getStartContainerParents();var limitFound=false;for(var i=0;i<parents.length;i++){var el=parents[i];if(!limitFound&&(el!==this.limitObject)){this.markupEffectiveAtStart[i]=el;if(!splitObjectWasSet&&GENTICS.Utils.Dom.isSplitObject(el)){var splitObjectWasSet=true;this.splitObject=el}}else{limitFound=true;this.unmodifiableMarkupAtStart.push(el)}}if(!splitObjectWasSet){this.splitObject=false}return};GENTICS.Aloha.Selection.prototype.SelectionRange.prototype.updatelimitObject=function(){if(GENTICS.Aloha.editables&&GENTICS.Aloha.editables.length>0){var parents=jQuery(this.startContainer).parents();var editables=GENTICS.Aloha.editables;for(var i=0;i<parents.length;i++){var el=parents[i];for(var j=0;j<editables.length;j++){var editable=editables[j].obj[0];if(el===editable){this.limitObject=el;return true}}}}this.limitObject=document.body;return true};GENTICS.Aloha.Selection.prototype.SelectionRange.prototype.toString=function(verbose){if(!verbose){return"GENTICS.Aloha.Selection.SelectionRange"}return"GENTICS.Aloha.Selection.SelectionRange {start ["+this.startContainer.nodeValue+"] offset "+this.startOffset+", end ["+this.endContainer.nodeValue+"] offset "+this.endOffset+"}"};GENTICS.Aloha.Selection=new GENTICS.Aloha.Selection();
126
+ /*
127
+ * Aloha Editor
128
+ * Author & Copyright (c) 2010 Gentics Software GmbH
129
+ * aloha-sales@gentics.com
130
+ * Licensed unter the terms of http://www.aloha-editor.com/license.html
131
+ */
132
+ GENTICS.Aloha.Sidebar=function(){};GENTICS.Aloha.Sidebar.prototype.add=function(panel){};GENTICS.Aloha.Sidebar.prototype.render=function(){};GENTICS.Aloha.Sidebar.prototype.openPanel=function(panel){};GENTICS.Aloha.Sidebar.prototype.closePanel=function(panel){};GENTICS.Aloha.Sidebar.prototype.togglePinPanel=function(panel){};GENTICS.Aloha.SidebarRight=new GENTICS.Aloha.Sidebar();GENTICS.Aloha.SidebarLeft=new GENTICS.Aloha.Sidebar();GENTICS.Aloha.Sidebar.Panel=function(){};GENTICS.Aloha.Sidebar.Panel.prototype.render=function(){};(function($){$.fn.extend({autocomplete:function(urlOrData,options){var isUrl=typeof urlOrData=="string";options=$.extend({},$.Autocompleter.defaults,{url:isUrl?urlOrData:null,data:isUrl?null:urlOrData,delay:isUrl?$.Autocompleter.defaults.delay:10,max:options&&!options.scroll?10:150},options);options.highlight=options.highlight||function(value){return value};options.formatMatch=options.formatMatch||options.formatItem;return this.each(function(){new $.Autocompleter(this,options)})},result:function(handler){return this.bind("result",handler)},search:function(handler){return this.trigger("search",[handler])},flushCache:function(){return this.trigger("flushCache")},setOptions:function(options){return this.trigger("setOptions",[options])},unautocomplete:function(){return this.trigger("unautocomplete")}});$.Autocompleter=function(input,options){var KEY={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var $input=$(input).attr("autocomplete","off").addClass(options.inputClass);var timeout;var previousValue="";var cache=$.Autocompleter.Cache(options);var hasFocus=0;var lastKeyPressCode;var config={mouseDownOnSelect:false};var select=$.Autocompleter.Select(options,input,selectCurrent,config);var blockSubmit;$.browser.opera&&$(input.form).bind("submit.autocomplete",function(){if(blockSubmit){blockSubmit=false;return false}});$input.bind(($.browser.opera?"keypress":"keydown")+".autocomplete",function(event){hasFocus=1;lastKeyPressCode=event.keyCode;switch(event.keyCode){case KEY.UP:event.preventDefault();if(select.visible()){select.prev()}else{onChange(0,true)}break;case KEY.DOWN:event.preventDefault();if(select.visible()){select.next()}else{onChange(0,true)}break;case KEY.PAGEUP:event.preventDefault();if(select.visible()){select.pageUp()}else{onChange(0,true)}break;case KEY.PAGEDOWN:event.preventDefault();if(select.visible()){select.pageDown()}else{onChange(0,true)}break;case options.multiple&&$.trim(options.multipleSeparator)==","&&KEY.COMMA:case KEY.TAB:case KEY.RETURN:if(selectCurrent()){event.preventDefault();blockSubmit=true;return false}break;case KEY.ESC:select.hide();break;default:clearTimeout(timeout);timeout=setTimeout(onChange,options.delay);break}}).focus(function(){hasFocus++}).blur(function(){hasFocus=0;if(!config.mouseDownOnSelect){hideResults()}}).click(function(){if(hasFocus++>1&&!select.visible()){onChange(0,true)}}).bind("search",function(){var fn=(arguments.length>1)?arguments[1]:null;function findValueCallback(q,data){var result;if(data&&data.length){for(var i=0;i<data.length;i++){if(data[i].result.toLowerCase()==q.toLowerCase()){result=data[i];break}}}if(typeof fn=="function"){fn(result)}else{$input.trigger("result",result&&[result.data,result.value])}}$.each(trimWords($input.val()),function(i,value){request(value,findValueCallback,findValueCallback)})}).bind("flushCache",function(){cache.flush()}).bind("setOptions",function(){$.extend(options,arguments[1]);if("data" in arguments[1]){cache.populate()}}).bind("unautocomplete",function(){select.unbind();$input.unbind();$(input.form).unbind(".autocomplete")});function selectCurrent(){var selected=select.selected();if(!selected){return false}var v=selected.result;previousValue=v;if(options.multiple){var words=trimWords($input.val());if(words.length>1){var seperator=options.multipleSeparator.length;var cursorAt=$(input).selection().start;var wordAt,progress=0;$.each(words,function(i,word){progress+=word.length;if(cursorAt<=progress){wordAt=i;return false}progress+=seperator});words[wordAt]=v;v=words.join(options.multipleSeparator)}v+=options.multipleSeparator}$input.val(v);hideResultsNow();$input.trigger("result",[selected.data,selected.value]);return true}function onChange(crap,skipPrevCheck){if(lastKeyPressCode==KEY.DEL){select.hide();return}var currentValue=$input.val();if(!skipPrevCheck&&currentValue==previousValue){return}previousValue=currentValue;currentValue=lastWord(currentValue);if(currentValue.length>=options.minChars){$input.addClass(options.loadingClass);if(!options.matchCase){currentValue=currentValue.toLowerCase()}request(currentValue,receiveData,hideResultsNow)}else{stopLoading();select.hide()}}function trimWords(value){if(!value){return[""]}if(!options.multiple){return[$.trim(value)]}return $.map(value.split(options.multipleSeparator),function(word){return $.trim(value).length?$.trim(word):null})}function lastWord(value){if(!options.multiple){return value}var words=trimWords(value);if(words.length==1){return words[0]}var cursorAt=$(input).selection().start;if(cursorAt==value.length){words=trimWords(value)}else{words=trimWords(value.replace(value.substring(cursorAt),""))}return words[words.length-1]}function autoFill(q,sValue){if(options.autoFill&&(lastWord($input.val()).toLowerCase()==q.toLowerCase())&&lastKeyPressCode!=KEY.BACKSPACE){$input.val($input.val()+sValue.substring(lastWord(previousValue).length));$(input).selection(previousValue.length,previousValue.length+sValue.length)}}function hideResults(){clearTimeout(timeout);timeout=setTimeout(hideResultsNow,200)}function hideResultsNow(){var wasVisible=select.visible();select.hide();clearTimeout(timeout);stopLoading();if(options.mustMatch){$input.search(function(result){if(!result){if(options.multiple){var words=trimWords($input.val()).slice(0,-1);$input.val(words.join(options.multipleSeparator)+(words.length?options.multipleSeparator:""))}else{$input.val("");$input.trigger("result",null)}}})}}function receiveData(q,data){if(data&&data.length&&hasFocus){stopLoading();select.display(data,q);autoFill(q,data[0].value);select.show()}else{hideResultsNow()}}function request(term,success,failure){if(!options.matchCase){term=term.toLowerCase()}var data=cache.load(term);if(data&&data.length){success(term,data)}else{if((typeof options.url=="string")&&(options.url.length>0)){var extraParams={timestamp:+new Date()};$.each(options.extraParams,function(key,param){extraParams[key]=typeof param=="function"?param():param});$.ajax({mode:"abort",port:"autocomplete"+input.name,dataType:options.dataType,url:options.url,data:$.extend({q:lastWord(term),limit:options.max},extraParams),success:function(data){var parsed=options.parse&&options.parse(data)||parse(data);cache.add(term,parsed);success(term,parsed)}})}else{select.emptyList();failure(term)}}}function parse(data){var parsed=[];var rows=data.split("\n");for(var i=0;i<rows.length;i++){var row=$.trim(rows[i]);if(row){row=row.split("|");parsed[parsed.length]={data:row,value:row[0],result:options.formatResult&&options.formatResult(row,row[0])||row[0]}}}return parsed}function stopLoading(){$input.removeClass(options.loadingClass)}};$.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(row){return row[0]},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(value,term){return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:true,scrollHeight:180};$.Autocompleter.Cache=function(options){var data={};var length=0;function matchSubset(s,sub){if(!options.matchCase){s=s.toLowerCase()}var i=s.indexOf(sub);if(options.matchContains=="word"){i=s.toLowerCase().search("\\b"+sub.toLowerCase())}if(i==-1){return false}return i==0||options.matchContains}function add(q,value){if(length>options.cacheLength){flush()}if(!data[q]){length++}data[q]=value}function populate(){if(!options.data){return false}var stMatchSets={},nullData=0;if(!options.url){options.cacheLength=1}stMatchSets[""]=[];for(var i=0,ol=options.data.length;i<ol;i++){var rawValue=options.data[i];rawValue=(typeof rawValue=="string")?[rawValue]:rawValue;var value=options.formatMatch(rawValue,i+1,options.data.length);if(value===false){continue}var firstChar=value.charAt(0).toLowerCase();if(!stMatchSets[firstChar]){stMatchSets[firstChar]=[]}var row={value:value,data:rawValue,result:options.formatResult&&options.formatResult(rawValue)||value};stMatchSets[firstChar].push(row);if(nullData++<options.max){stMatchSets[""].push(row)}}$.each(stMatchSets,function(i,value){options.cacheLength++;add(i,value)})}setTimeout(populate,25);function flush(){data={};length=0}return{flush:flush,add:add,populate:populate,load:function(q){if(!options.cacheLength||!length){return null}if(!options.url&&options.matchContains){var csub=[];for(var k in data){if(k.length>0){var c=data[k];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub.push(x)}})}}return csub}else{if(data[q]){return data[q]}else{if(options.matchSubset){for(var i=q.length-1;i>=options.minChars;i--){var c=data[q.substr(0,i)];if(c){var csub=[];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub[csub.length]=x}});return csub}}}}}return null}}};$.Autocompleter.Select=function(options,input,select,config){var CLASSES={ACTIVE:"ac_over"};var listItems,active=-1,data,term="",needsInit=true,element,list;function init(){if(!needsInit){return}element=$("<div/>").hide().addClass(options.resultsClass).css("position","absolute").appendTo(document.body);list=$("<ul/>").appendTo(element).mouseover(function(event){if(target(event).nodeName&&target(event).nodeName.toUpperCase()=="LI"){active=$("li",list).removeClass(CLASSES.ACTIVE).index(target(event));$(target(event)).addClass(CLASSES.ACTIVE)}}).click(function(event){$(target(event)).addClass(CLASSES.ACTIVE);select();input.focus();return false}).mousedown(function(){config.mouseDownOnSelect=true}).mouseup(function(){config.mouseDownOnSelect=false});if(options.width>0){element.css("width",options.width)}needsInit=false}function target(event){var element=event.target;while(element&&element.tagName!="LI"){element=element.parentNode}if(!element){return[]}return element}function moveSelect(step){listItems.slice(active,active+1).removeClass(CLASSES.ACTIVE);movePosition(step);var activeItem=listItems.slice(active,active+1).addClass(CLASSES.ACTIVE);if(options.scroll){var offset=0;listItems.slice(0,active).each(function(){offset+=this.offsetHeight});if((offset+activeItem[0].offsetHeight-list.scrollTop())>list[0].clientHeight){list.scrollTop(offset+activeItem[0].offsetHeight-list.innerHeight())}else{if(offset<list.scrollTop()){list.scrollTop(offset)}}}}function movePosition(step){active+=step;if(active<0){active=listItems.size()-1}else{if(active>=listItems.size()){active=0}}}function limitNumberOfItems(available){return options.max&&options.max<available?options.max:available}function fillList(){list.empty();var max=limitNumberOfItems(data.length);for(var i=0;i<max;i++){if(!data[i]){continue}var formatted=options.formatItem(data[i].data,i+1,max,data[i].value,term);if(formatted===false){continue}var li=$("<li/>").html(options.highlight(formatted,term)).addClass(i%2==0?"ac_even":"ac_odd").appendTo(list)[0];$.data(li,"ac_data",data[i])}listItems=list.find("li");if(options.selectFirst){listItems.slice(0,1).addClass(CLASSES.ACTIVE);active=0}if($.fn.bgiframe){list.bgiframe()}}return{display:function(d,q){init();data=d;term=q;fillList()},next:function(){moveSelect(1)},prev:function(){moveSelect(-1)},pageUp:function(){if(active!=0&&active-8<0){moveSelect(-active)}else{moveSelect(-8)}},pageDown:function(){if(active!=listItems.size()-1&&active+8>listItems.size()){moveSelect(listItems.size()-1-active)}else{moveSelect(8)}},hide:function(){element&&element.hide();listItems&&listItems.removeClass(CLASSES.ACTIVE);active=-1},visible:function(){return element&&element.is(":visible")},current:function(){return this.visible()&&(listItems.filter("."+CLASSES.ACTIVE)[0]||options.selectFirst&&listItems[0])},show:function(){var offset=$(input).offset();element.css({width:typeof options.width=="string"||options.width>0?options.width:$(input).width(),top:offset.top+input.offsetHeight,left:offset.left}).show();if(options.scroll){list.scrollTop(0);list.css({maxHeight:options.scrollHeight,overflow:"auto"});if($.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var listHeight=0;listItems.each(function(){listHeight+=this.offsetHeight});var scrollbarsVisible=listHeight>options.scrollHeight;list.css("height",scrollbarsVisible?options.scrollHeight:listHeight);if(!scrollbarsVisible){listItems.width(list.width()-parseInt(listItems.css("padding-left"))-parseInt(listItems.css("padding-right")))}}}},selected:function(){var selected=listItems&&listItems.filter("."+CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);return selected&&selected.length&&$.data(selected[0],"ac_data")},emptyList:function(){list&&list.empty()},unbind:function(){element&&element.remove()}}};$.fn.selection=function(start,end){if(start!==undefined){return this.each(function(){if(this.createTextRange){var selRange=this.createTextRange();if(end===undefined||start==end){selRange.move("character",start);selRange.select()}else{selRange.collapse(true);selRange.moveStart("character",start);selRange.moveEnd("character",end);selRange.select()}}else{if(this.setSelectionRange){this.setSelectionRange(start,end)}else{if(this.selectionStart){this.selectionStart=start;this.selectionEnd=end}}}})}var field=this[0];if(field.createTextRange){var range=document.selection.createRange(),orig=field.value,teststring="<->",textLength=range.text.length;range.text=teststring;var caretAt=field.value.indexOf(teststring);field.value=orig;this.selection(caretAt,caretAt+textLength);return{start:caretAt,end:caretAt+textLength}}else{if(field.selectionStart!==undefined){return{start:field.selectionStart,end:field.selectionEnd}}}}})(jQuery);
133
+ /*
134
+ * Aloha Editor
135
+ * Author & Copyright (c) 2010 Gentics Software GmbH
136
+ * aloha-sales@gentics.com
137
+ * Licensed unter the terms of http://www.aloha-editor.com/license.html
138
+ */
139
+ GENTICS.Aloha.RessourceRegistry=function(){this.ressources=new Array()};GENTICS.Aloha.RessourceRegistry.prototype.register=function(ressource){if(ressource instanceof GENTICS.Aloha.Ressource){this.ressources.push(ressource)}};GENTICS.Aloha.RessourceRegistry.prototype.init=function(){for(var i=0;i<this.ressources.length;i++){var ressource=this.ressources[i];if(GENTICS.Aloha.settings.ressources==undefined){GENTICS.Aloha.settings.ressources={}}ressource.settings=GENTICS.Aloha.settings.ressources[ressource.prefix];if(ressource.settings==undefined){ressource.settings={}}if(ressource.settings.enabled==undefined){ressource.settings.enabled=true}if(ressource.settings.enabled==true){this.ressources[i].init()}}};GENTICS.Aloha.RessourceRegistry.toString=function(){return"com.gentics.aloha.RessourceRegistry"};GENTICS.Aloha.RessourceRegistry=new GENTICS.Aloha.RessourceRegistry();GENTICS.Aloha.Ressources={};
140
+ /*
141
+ * Aloha Editor
142
+ * Author & Copyright (c) 2010 Gentics Software GmbH
143
+ * aloha-sales@gentics.com
144
+ * Licensed unter the terms of http://www.aloha-editor.com/license.html
145
+ */
146
+ GENTICS.Aloha.Ressource=function(ressourcePrefix,basePath){this.prefix=ressourcePrefix;this.basePath=basePath?basePath:ressourcePrefix;GENTICS.Aloha.RessourceRegistry.register(this)};GENTICS.Aloha.Ressource.prototype.settings=null;GENTICS.Aloha.Ressource.prototype.init=function(){};GENTICS.Aloha.Ressource.prototype.query=function(attrs){return null};GENTICS.Aloha.Ressource.prototype.resolveRessource=function(obj){return null};
147
+ /*
148
+ * Aloha Editor
149
+ * Author & Copyright (c) 2010 Gentics Software GmbH
150
+ * aloha-sales@gentics.com
151
+ * Licensed unter the terms of http://www.aloha-editor.com/license.html
152
+ */
153
+ GENTICS.Aloha.Ressources.Dummy=new GENTICS.Aloha.Ressource("com.gentics.aloha.resources.Dummy");GENTICS.Aloha.Ressources.Dummy.init=function(){var data=[{id:1,text:"Link A",url:"/page1"},{id:2,text:"Link B",url:"/page2"},{id:3,text:"Link C",url:"/page3"},{id:4,text:"Link D",url:"/page4"}]};GENTICS.Aloha.Ressources.Dummy.query=function(attrs){return this.data};GENTICS.Aloha.Ressources.Dummy.resolve=function(obj){return null};