locomotive-aloha-rails 0.20.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1034) hide show
  1. data/LICENSE +18 -0
  2. data/README.md +48 -0
  3. data/Rakefile +60 -0
  4. data/app/assets/javascripts/aloha/preinit.js.erb +1 -0
  5. data/app/assets/javascripts/aloha.js +2 -0
  6. data/lib/aloha/rails/engine.rb +9 -0
  7. data/lib/aloha/rails/sprockets_monkeypatch.rb +13 -0
  8. data/lib/aloha/rails/version.rb +7 -0
  9. data/lib/aloha/rails.rb +3 -0
  10. data/lib/aloha-rails.rb +1 -0
  11. data/vendor/assets/javascripts/aloha/css/aloha-core.css +44 -0
  12. data/vendor/assets/javascripts/aloha/css/aloha-sidebar.css +284 -0
  13. data/vendor/assets/javascripts/aloha/css/aloha.css +7774 -0
  14. data/vendor/assets/javascripts/aloha/css/ext-aloha-reset.css +33 -0
  15. data/vendor/assets/javascripts/aloha/css/ext-aloha.css +357 -0
  16. data/vendor/assets/javascripts/aloha/img/arrow-down.png +0 -0
  17. data/vendor/assets/javascripts/aloha/img/arrow-left.png +0 -0
  18. data/vendor/assets/javascripts/aloha/img/arrow.png +0 -0
  19. data/vendor/assets/javascripts/aloha/img/base-big.png +0 -0
  20. data/vendor/assets/javascripts/aloha/img/base-multi.png +0 -0
  21. data/vendor/assets/javascripts/aloha/img/base.png +0 -0
  22. data/vendor/assets/javascripts/aloha/img/bg.png +0 -0
  23. data/vendor/assets/javascripts/aloha/img/breadcrumb-divider.png +0 -0
  24. data/vendor/assets/javascripts/aloha/img/fade-in.png +0 -0
  25. data/vendor/assets/javascripts/aloha/img/fade-out.png +0 -0
  26. data/vendor/assets/javascripts/aloha/img/gentics-logo.png +0 -0
  27. data/vendor/assets/javascripts/aloha/img/grabhandle.png +0 -0
  28. data/vendor/assets/javascripts/aloha/img/maximize.png +0 -0
  29. data/vendor/assets/javascripts/aloha/img/multisplit-base.jpg +0 -0
  30. data/vendor/assets/javascripts/aloha/img/multisplit-close.gif +0 -0
  31. data/vendor/assets/javascripts/aloha/img/multisplit-open.gif +0 -0
  32. data/vendor/assets/javascripts/aloha/img/pin.png +0 -0
  33. data/vendor/assets/javascripts/aloha/img/removeformat.png +0 -0
  34. data/vendor/assets/javascripts/aloha/img/text_indent.png +0 -0
  35. data/vendor/assets/javascripts/aloha/img/text_indent_remove.png +0 -0
  36. data/vendor/assets/javascripts/aloha/lib/aloha/command.js +246 -0
  37. data/vendor/assets/javascripts/aloha/lib/aloha/console.js +330 -0
  38. data/vendor/assets/javascripts/aloha/lib/aloha/contenthandlermanager.js +65 -0
  39. data/vendor/assets/javascripts/aloha/lib/aloha/core.js +560 -0
  40. data/vendor/assets/javascripts/aloha/lib/aloha/ecma5.js +194 -0
  41. data/vendor/assets/javascripts/aloha/lib/aloha/ecma5shims.js +280 -0
  42. data/vendor/assets/javascripts/aloha/lib/aloha/editable.js +854 -0
  43. data/vendor/assets/javascripts/aloha/lib/aloha/engine.js +8306 -0
  44. data/vendor/assets/javascripts/aloha/lib/aloha/ext-alohaproxy.js +86 -0
  45. data/vendor/assets/javascripts/aloha/lib/aloha/ext-alohareader.js +50 -0
  46. data/vendor/assets/javascripts/aloha/lib/aloha/ext-alohatreeloader.js +77 -0
  47. data/vendor/assets/javascripts/aloha/lib/aloha/ext.js +32 -0
  48. data/vendor/assets/javascripts/aloha/lib/aloha/floatingmenu.js +1304 -0
  49. data/vendor/assets/javascripts/aloha/lib/aloha/ierange-m2.js +546 -0
  50. data/vendor/assets/javascripts/aloha/lib/aloha/jquery.aloha.js +324 -0
  51. data/vendor/assets/javascripts/aloha/lib/aloha/jquery.js +24 -0
  52. data/vendor/assets/javascripts/aloha/lib/aloha/jquery.patch.js +115 -0
  53. data/vendor/assets/javascripts/aloha/lib/aloha/markup.js +977 -0
  54. data/vendor/assets/javascripts/aloha/lib/aloha/message.js +115 -0
  55. data/vendor/assets/javascripts/aloha/lib/aloha/nls/de/i18n.js +10 -0
  56. data/vendor/assets/javascripts/aloha/lib/aloha/nls/i18n.js +20 -0
  57. data/vendor/assets/javascripts/aloha/lib/aloha/observable.js +106 -0
  58. data/vendor/assets/javascripts/aloha/lib/aloha/plugin.js +276 -0
  59. data/vendor/assets/javascripts/aloha/lib/aloha/pluginmanager.js +146 -0
  60. data/vendor/assets/javascripts/aloha/lib/aloha/rangy-core.js +3242 -0
  61. data/vendor/assets/javascripts/aloha/lib/aloha/registry.js +59 -0
  62. data/vendor/assets/javascripts/aloha/lib/aloha/repository.js +241 -0
  63. data/vendor/assets/javascripts/aloha/lib/aloha/repositorymanager.js +570 -0
  64. data/vendor/assets/javascripts/aloha/lib/aloha/repositoryobjects.js +146 -0
  65. data/vendor/assets/javascripts/aloha/lib/aloha/selection.js +2083 -0
  66. data/vendor/assets/javascripts/aloha/lib/aloha/sidebar.js +1133 -0
  67. data/vendor/assets/javascripts/aloha/lib/aloha/ui-attributefield.js +530 -0
  68. data/vendor/assets/javascripts/aloha/lib/aloha/ui-browser.js +214 -0
  69. data/vendor/assets/javascripts/aloha/lib/aloha/ui.js +889 -0
  70. data/vendor/assets/javascripts/aloha/lib/aloha-bootstrap.js +27645 -0
  71. data/vendor/assets/javascripts/aloha/lib/aloha.js +88750 -0
  72. data/vendor/assets/javascripts/aloha/lib/css.js +313 -0
  73. data/vendor/assets/javascripts/aloha/lib/i18n.js +153 -0
  74. data/vendor/assets/javascripts/aloha/lib/jquery-plugin.js +46 -0
  75. data/vendor/assets/javascripts/aloha/lib/order.js +140 -0
  76. data/vendor/assets/javascripts/aloha/lib/require.js +2013 -0
  77. data/vendor/assets/javascripts/aloha/lib/text.js +262 -0
  78. data/vendor/assets/javascripts/aloha/lib/util/class.js +80 -0
  79. data/vendor/assets/javascripts/aloha/lib/util/dom.js +1673 -0
  80. data/vendor/assets/javascripts/aloha/lib/util/json2.js +481 -0
  81. data/vendor/assets/javascripts/aloha/lib/util/lang.js +66 -0
  82. data/vendor/assets/javascripts/aloha/lib/util/position.js +158 -0
  83. data/vendor/assets/javascripts/aloha/lib/util/range.js +923 -0
  84. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/adapter/jquery/ext-jquery-adapter-debug.js +2470 -0
  85. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/adapter/jquery/ext-jquery-adapter.js +7 -0
  86. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/ext-all-debug.js +47684 -0
  87. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/ext-all.js +13 -0
  88. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/gpl-3.0.txt +674 -0
  89. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/license.txt +42 -0
  90. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/charts.swf +0 -0
  91. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/css/ext-all.css +5903 -0
  92. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/css/ext-all.less +6795 -0
  93. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/css/xtheme-gray.css +1692 -0
  94. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/expressinstall.swf +0 -0
  95. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/box/corners-blue.gif +0 -0
  96. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/box/corners.gif +0 -0
  97. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/box/l-blue.gif +0 -0
  98. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/box/l.gif +0 -0
  99. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/box/r-blue.gif +0 -0
  100. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/box/r.gif +0 -0
  101. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/box/tb-blue.gif +0 -0
  102. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/box/tb.gif +0 -0
  103. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/arrow.gif +0 -0
  104. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/btn.gif +0 -0
  105. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/group-cs.gif +0 -0
  106. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/group-lr.gif +0 -0
  107. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/group-tb.gif +0 -0
  108. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/s-arrow-b-noline.gif +0 -0
  109. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/s-arrow-b.gif +0 -0
  110. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/s-arrow-bo.gif +0 -0
  111. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/s-arrow-noline.gif +0 -0
  112. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/s-arrow-o.gif +0 -0
  113. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/s-arrow.gif +0 -0
  114. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/dd/drop-add.gif +0 -0
  115. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/dd/drop-no.gif +0 -0
  116. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/dd/drop-yes.gif +0 -0
  117. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/editor/tb-sprite.gif +0 -0
  118. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/checkbox.gif +0 -0
  119. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/clear-trigger.gif +0 -0
  120. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/clear-trigger.psd +0 -0
  121. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/date-trigger.gif +0 -0
  122. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/date-trigger.psd +0 -0
  123. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/error-tip-corners.gif +0 -0
  124. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/exclamation.gif +0 -0
  125. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/radio.gif +0 -0
  126. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/search-trigger.gif +0 -0
  127. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/search-trigger.psd +0 -0
  128. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/text-bg.gif +0 -0
  129. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/trigger-square.gif +0 -0
  130. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/trigger-square.psd +0 -0
  131. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/trigger-tpl.gif +0 -0
  132. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/trigger.gif +0 -0
  133. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/trigger.psd +0 -0
  134. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/gradient-bg.gif +0 -0
  135. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/arrow-left-white.gif +0 -0
  136. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/arrow-right-white.gif +0 -0
  137. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/col-move-bottom.gif +0 -0
  138. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/col-move-top.gif +0 -0
  139. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/columns.gif +0 -0
  140. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/dirty.gif +0 -0
  141. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/done.gif +0 -0
  142. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/drop-no.gif +0 -0
  143. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/drop-yes.gif +0 -0
  144. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/footer-bg.gif +0 -0
  145. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid-blue-hd.gif +0 -0
  146. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid-blue-split.gif +0 -0
  147. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid-hrow.gif +0 -0
  148. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid-loading.gif +0 -0
  149. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid-split.gif +0 -0
  150. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid-vista-hd.gif +0 -0
  151. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid3-hd-btn.gif +0 -0
  152. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid3-hrow-over.gif +0 -0
  153. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid3-hrow.gif +0 -0
  154. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid3-special-col-bg.gif +0 -0
  155. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid3-special-col-sel-bg.gif +0 -0
  156. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/group-by.gif +0 -0
  157. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/group-collapse.gif +0 -0
  158. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/group-expand-sprite.gif +0 -0
  159. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/group-expand.gif +0 -0
  160. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/hd-pop.gif +0 -0
  161. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/hmenu-asc.gif +0 -0
  162. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/hmenu-desc.gif +0 -0
  163. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/hmenu-lock.gif +0 -0
  164. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/hmenu-lock.png +0 -0
  165. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/hmenu-unlock.gif +0 -0
  166. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/hmenu-unlock.png +0 -0
  167. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/invalid_line.gif +0 -0
  168. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/loading.gif +0 -0
  169. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/mso-hd.gif +0 -0
  170. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/nowait.gif +0 -0
  171. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/page-first-disabled.gif +0 -0
  172. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/page-first.gif +0 -0
  173. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/page-last-disabled.gif +0 -0
  174. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/page-last.gif +0 -0
  175. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/page-next-disabled.gif +0 -0
  176. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/page-next.gif +0 -0
  177. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/page-prev-disabled.gif +0 -0
  178. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/page-prev.gif +0 -0
  179. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/pick-button.gif +0 -0
  180. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/refresh.gif +0 -0
  181. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/row-check-sprite.gif +0 -0
  182. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/row-expand-sprite.gif +0 -0
  183. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/row-over.gif +0 -0
  184. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/row-sel.gif +0 -0
  185. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/sort-hd.gif +0 -0
  186. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/sort_asc.gif +0 -0
  187. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/sort_desc.gif +0 -0
  188. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/wait.gif +0 -0
  189. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/collapse.gif +0 -0
  190. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/expand.gif +0 -0
  191. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/gradient-bg.gif +0 -0
  192. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/mini-bottom.gif +0 -0
  193. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/mini-left.gif +0 -0
  194. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/mini-right.gif +0 -0
  195. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/mini-top.gif +0 -0
  196. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/ns-collapse.gif +0 -0
  197. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/ns-expand.gif +0 -0
  198. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/panel-close.gif +0 -0
  199. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/panel-title-bg.gif +0 -0
  200. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/panel-title-light-bg.gif +0 -0
  201. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/stick.gif +0 -0
  202. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/stuck.gif +0 -0
  203. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/tab-close-on.gif +0 -0
  204. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/tab-close.gif +0 -0
  205. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/menu/checked.gif +0 -0
  206. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/menu/group-checked.gif +0 -0
  207. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/menu/item-over.gif +0 -0
  208. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/menu/menu-parent.gif +0 -0
  209. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/menu/menu.gif +0 -0
  210. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/menu/unchecked.gif +0 -0
  211. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/corners-sprite.gif +0 -0
  212. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/left-right.gif +0 -0
  213. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/light-hd.gif +0 -0
  214. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/tool-sprite-tpl.gif +0 -0
  215. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/tool-sprites.gif +0 -0
  216. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/tools-sprites-trans.gif +0 -0
  217. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/top-bottom.gif +0 -0
  218. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/top-bottom.png +0 -0
  219. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/white-corners-sprite.gif +0 -0
  220. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/white-left-right.gif +0 -0
  221. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/white-top-bottom.gif +0 -0
  222. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/progress/progress-bg.gif +0 -0
  223. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/qtip/bg.gif +0 -0
  224. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/qtip/close.gif +0 -0
  225. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/qtip/tip-anchor-sprite.gif +0 -0
  226. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/qtip/tip-sprite.gif +0 -0
  227. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/s.gif +0 -0
  228. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shadow-c.png +0 -0
  229. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shadow-lr.png +0 -0
  230. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shadow.png +0 -0
  231. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/blue-loading.gif +0 -0
  232. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/calendar.gif +0 -0
  233. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/glass-bg.gif +0 -0
  234. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/hd-sprite.gif +0 -0
  235. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/large-loading.gif +0 -0
  236. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/left-btn.gif +0 -0
  237. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/loading-balls.gif +0 -0
  238. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/right-btn.gif +0 -0
  239. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/warning.gif +0 -0
  240. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/e-handle-dark.gif +0 -0
  241. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/e-handle.gif +0 -0
  242. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/ne-handle-dark.gif +0 -0
  243. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/ne-handle.gif +0 -0
  244. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/nw-handle-dark.gif +0 -0
  245. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/nw-handle.gif +0 -0
  246. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/s-handle-dark.gif +0 -0
  247. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/s-handle.gif +0 -0
  248. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/se-handle-dark.gif +0 -0
  249. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/se-handle.gif +0 -0
  250. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/square.gif +0 -0
  251. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/sw-handle-dark.gif +0 -0
  252. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/sw-handle.gif +0 -0
  253. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/slider/slider-bg.png +0 -0
  254. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/slider/slider-thumb.png +0 -0
  255. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/slider/slider-v-bg.png +0 -0
  256. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/slider/slider-v-thumb.png +0 -0
  257. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/scroll-left.gif +0 -0
  258. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/scroll-right.gif +0 -0
  259. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/scroller-bg.gif +0 -0
  260. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-btm-inactive-left-bg.gif +0 -0
  261. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-btm-inactive-right-bg.gif +0 -0
  262. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-btm-left-bg.gif +0 -0
  263. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-btm-over-left-bg.gif +0 -0
  264. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-btm-over-right-bg.gif +0 -0
  265. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-btm-right-bg.gif +0 -0
  266. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-close.gif +0 -0
  267. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-strip-bg.gif +0 -0
  268. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-strip-bg.png +0 -0
  269. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-strip-btm-bg.gif +0 -0
  270. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tabs-sprite.gif +0 -0
  271. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/bg.gif +0 -0
  272. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/btn-arrow-light.gif +0 -0
  273. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/btn-arrow.gif +0 -0
  274. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/btn-over-bg.gif +0 -0
  275. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/gray-bg.gif +0 -0
  276. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/more.gif +0 -0
  277. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/tb-bg.gif +0 -0
  278. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/tb-btn-sprite.gif +0 -0
  279. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/tb-xl-btn-sprite.gif +0 -0
  280. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/tb-xl-sep.gif +0 -0
  281. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/arrows.gif +0 -0
  282. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/drop-add.gif +0 -0
  283. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/drop-between.gif +0 -0
  284. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/drop-no.gif +0 -0
  285. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/drop-over.gif +0 -0
  286. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/drop-under.gif +0 -0
  287. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/drop-yes.gif +0 -0
  288. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-end-minus-nl.gif +0 -0
  289. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-end-minus.gif +0 -0
  290. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-end-plus-nl.gif +0 -0
  291. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-end-plus.gif +0 -0
  292. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-end.gif +0 -0
  293. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-line.gif +0 -0
  294. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-minus-nl.gif +0 -0
  295. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-minus.gif +0 -0
  296. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-plus-nl.gif +0 -0
  297. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-plus.gif +0 -0
  298. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow.gif +0 -0
  299. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/folder-open.gif +0 -0
  300. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/folder.gif +0 -0
  301. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/leaf.gif +0 -0
  302. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/loading.gif +0 -0
  303. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/s.gif +0 -0
  304. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/icon-error.gif +0 -0
  305. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/icon-info.gif +0 -0
  306. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/icon-question.gif +0 -0
  307. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/icon-warning.gif +0 -0
  308. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/left-corners.png +0 -0
  309. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/left-corners.psd +0 -0
  310. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/left-right.png +0 -0
  311. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/left-right.psd +0 -0
  312. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/right-corners.png +0 -0
  313. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/right-corners.psd +0 -0
  314. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/top-bottom.png +0 -0
  315. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/top-bottom.psd +0 -0
  316. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/button/btn-arrow.gif +0 -0
  317. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/button/btn-sprite.gif +0 -0
  318. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/button/btn.gif +0 -0
  319. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/button/group-cs.gif +0 -0
  320. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/button/group-lr.gif +0 -0
  321. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/button/group-tb.gif +0 -0
  322. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/button/s-arrow-bo.gif +0 -0
  323. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/button/s-arrow-o.gif +0 -0
  324. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/form/clear-trigger.gif +0 -0
  325. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/form/date-trigger.gif +0 -0
  326. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/form/search-trigger.gif +0 -0
  327. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/form/trigger-square.gif +0 -0
  328. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/form/trigger.gif +0 -0
  329. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/gradient-bg.gif +0 -0
  330. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/col-move-bottom.gif +0 -0
  331. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/col-move-top.gif +0 -0
  332. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/grid3-hd-btn.gif +0 -0
  333. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/grid3-hrow-over.gif +0 -0
  334. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/grid3-hrow-over2.gif +0 -0
  335. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/grid3-hrow.gif +0 -0
  336. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/grid3-hrow2.gif +0 -0
  337. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/grid3-special-col-bg.gif +0 -0
  338. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/grid3-special-col-bg2.gif +0 -0
  339. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/grid3-special-col-sel-bg.gif +0 -0
  340. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/group-collapse.gif +0 -0
  341. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/group-expand-sprite.gif +0 -0
  342. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/group-expand.gif +0 -0
  343. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/page-first.gif +0 -0
  344. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/page-last.gif +0 -0
  345. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/page-next.gif +0 -0
  346. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/page-prev.gif +0 -0
  347. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/refresh.gif +0 -0
  348. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/row-expand-sprite.gif +0 -0
  349. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/sort_asc.gif +0 -0
  350. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/sort_desc.gif +0 -0
  351. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/menu/group-checked.gif +0 -0
  352. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/menu/item-over-disabled.gif +0 -0
  353. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/menu/item-over.gif +0 -0
  354. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/menu/menu-parent.gif +0 -0
  355. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/corners-sprite.gif +0 -0
  356. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/left-right.gif +0 -0
  357. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/light-hd.gif +0 -0
  358. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/tool-sprite-tpl.gif +0 -0
  359. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/tool-sprites.gif +0 -0
  360. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/tools-sprites-trans.gif +0 -0
  361. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/top-bottom.gif +0 -0
  362. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/top-bottom.png +0 -0
  363. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/white-corners-sprite.gif +0 -0
  364. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/white-left-right.gif +0 -0
  365. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/white-top-bottom.gif +0 -0
  366. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/progress/progress-bg.gif +0 -0
  367. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/qtip/bg.gif +0 -0
  368. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/qtip/close.gif +0 -0
  369. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/qtip/tip-anchor-sprite.gif +0 -0
  370. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/qtip/tip-sprite.gif +0 -0
  371. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/s.gif +0 -0
  372. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/shared/hd-sprite.gif +0 -0
  373. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/shared/left-btn.gif +0 -0
  374. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/shared/right-btn.gif +0 -0
  375. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/sizer/e-handle.gif +0 -0
  376. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/sizer/ne-handle.gif +0 -0
  377. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/sizer/nw-handle.gif +0 -0
  378. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/sizer/s-handle.gif +0 -0
  379. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/sizer/se-handle.gif +0 -0
  380. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/sizer/square.gif +0 -0
  381. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/sizer/sw-handle.gif +0 -0
  382. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/slider/slider-thumb.png +0 -0
  383. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/slider/slider-v-thumb.png +0 -0
  384. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/scroll-left.gif +0 -0
  385. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/scroll-right.gif +0 -0
  386. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/scroller-bg.gif +0 -0
  387. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-btm-inactive-left-bg.gif +0 -0
  388. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-btm-inactive-right-bg.gif +0 -0
  389. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-btm-left-bg.gif +0 -0
  390. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-btm-over-left-bg.gif +0 -0
  391. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-btm-over-right-bg.gif +0 -0
  392. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-btm-right-bg.gif +0 -0
  393. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-close.gif +0 -0
  394. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-strip-bg.gif +0 -0
  395. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-strip-bg.png +0 -0
  396. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-strip-btm-bg.gif +0 -0
  397. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tabs-sprite.gif +0 -0
  398. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/toolbar/bg.gif +0 -0
  399. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/toolbar/btn-arrow-light.gif +0 -0
  400. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/toolbar/btn-arrow.gif +0 -0
  401. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/toolbar/btn-over-bg.gif +0 -0
  402. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/toolbar/gray-bg.gif +0 -0
  403. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/toolbar/more.gif +0 -0
  404. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/toolbar/tb-bg.gif +0 -0
  405. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/toolbar/tb-btn-sprite.gif +0 -0
  406. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tree/arrows.gif +0 -0
  407. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tree/elbow-end-minus-nl.gif +0 -0
  408. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tree/elbow-end-minus.gif +0 -0
  409. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tree/elbow-end-plus-nl.gif +0 -0
  410. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tree/elbow-end-plus.gif +0 -0
  411. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/window/icon-error.gif +0 -0
  412. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/window/icon-info.gif +0 -0
  413. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/window/icon-question.gif +0 -0
  414. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/window/icon-warning.gif +0 -0
  415. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/window/left-corners.png +0 -0
  416. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/window/left-corners.pspimage +0 -0
  417. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/window/left-right.png +0 -0
  418. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/window/right-corners.png +0 -0
  419. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/window/top-bottom.png +0 -0
  420. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/resources.jsb +507 -0
  421. data/vendor/assets/javascripts/aloha/lib/vendor/jquery-1.6.1.js +8936 -0
  422. data/vendor/assets/javascripts/aloha/lib/vendor/jquery.json-2.2.min.js +33 -0
  423. data/vendor/assets/javascripts/aloha/lib/vendor/jquery.store.js +446 -0
  424. data/vendor/assets/javascripts/aloha/lib/vendor/sanitize.js +267 -0
  425. data/vendor/assets/javascripts/aloha/plugins/common/abbr/css/abbr.css +0 -0
  426. data/vendor/assets/javascripts/aloha/plugins/common/abbr/lib/abbr-plugin.js +293 -0
  427. data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/de/i18n.js +1 -0
  428. data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/i18n.js +4 -0
  429. data/vendor/assets/javascripts/aloha/plugins/common/abbr/package.json +1 -0
  430. data/vendor/assets/javascripts/aloha/plugins/common/align/LICENSE +166 -0
  431. data/vendor/assets/javascripts/aloha/plugins/common/align/README +12 -0
  432. data/vendor/assets/javascripts/aloha/plugins/common/align/css/align.css +19 -0
  433. data/vendor/assets/javascripts/aloha/plugins/common/align/img/align.png +0 -0
  434. data/vendor/assets/javascripts/aloha/plugins/common/align/lib/align-plugin.js +345 -0
  435. data/vendor/assets/javascripts/aloha/plugins/common/align/nls/en/i18n.js +1 -0
  436. data/vendor/assets/javascripts/aloha/plugins/common/align/nls/fr/i18n.js +1 -0
  437. data/vendor/assets/javascripts/aloha/plugins/common/align/nls/i18n.js +6 -0
  438. data/vendor/assets/javascripts/aloha/plugins/common/align/package.json +2 -0
  439. data/vendor/assets/javascripts/aloha/plugins/common/block/README +0 -0
  440. data/vendor/assets/javascripts/aloha/plugins/common/block/css/block.css +51 -0
  441. data/vendor/assets/javascripts/aloha/plugins/common/block/img/toolbar-draghandle.gif +0 -0
  442. data/vendor/assets/javascripts/aloha/plugins/common/block/lib/block-plugin.js +104 -0
  443. data/vendor/assets/javascripts/aloha/plugins/common/block/lib/block.js +442 -0
  444. data/vendor/assets/javascripts/aloha/plugins/common/block/lib/blockcontenthandler.js +58 -0
  445. data/vendor/assets/javascripts/aloha/plugins/common/block/lib/blockmanager.js +242 -0
  446. data/vendor/assets/javascripts/aloha/plugins/common/block/lib/editor.js +209 -0
  447. data/vendor/assets/javascripts/aloha/plugins/common/block/lib/editormanager.js +34 -0
  448. data/vendor/assets/javascripts/aloha/plugins/common/block/lib/sidebarattributeeditor.js +119 -0
  449. data/vendor/assets/javascripts/aloha/plugins/common/block/package.json +11 -0
  450. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/css/characterpicker.css +38 -0
  451. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/img/icon.png +0 -0
  452. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/lib/characterpicker-plugin.js +227 -0
  453. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/de/i18n.js +1 -0
  454. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/i18n.js +4 -0
  455. data/vendor/assets/javascripts/aloha/plugins/common/commands/css/abbr.css +0 -0
  456. data/vendor/assets/javascripts/aloha/plugins/common/commands/lib/commands-plugin.js +15 -0
  457. data/vendor/assets/javascripts/aloha/plugins/common/commands/lib/inserthtml.js +107 -0
  458. data/vendor/assets/javascripts/aloha/plugins/common/commands/package.json +1 -0
  459. data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/README.md +0 -0
  460. data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/contenthandler-plugin.js +54 -0
  461. data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/genericcontenthandler.js +255 -0
  462. data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/oembedcontenthandler.js +276 -0
  463. data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/sanitizecontenthandler.js +136 -0
  464. data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/wordcontenthandler.js +279 -0
  465. data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/package.json +1 -0
  466. data/vendor/assets/javascripts/aloha/plugins/common/format/css/format.css +8 -0
  467. data/vendor/assets/javascripts/aloha/plugins/common/format/img/em.png +0 -0
  468. data/vendor/assets/javascripts/aloha/plugins/common/format/img/strong.png +0 -0
  469. data/vendor/assets/javascripts/aloha/plugins/common/format/lib/format-plugin.js +303 -0
  470. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/de/i18n.js +1 -0
  471. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/eo/i18n.js +1 -0
  472. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/fi/i18n.js +1 -0
  473. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/fr/i18n.js +1 -0
  474. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/i18n.js +10 -0
  475. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/it/i18n.js +1 -0
  476. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/pl/i18n.js +1 -0
  477. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/ru/i18n.js +1 -0
  478. data/vendor/assets/javascripts/aloha/plugins/common/highlighteditables/css/highlighteditables.css +14 -0
  479. data/vendor/assets/javascripts/aloha/plugins/common/highlighteditables/lib/highlighteditables-plugin.js +72 -0
  480. data/vendor/assets/javascripts/aloha/plugins/common/highlighteditables/package.json +1 -0
  481. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/css/horizontalruler.css +4 -0
  482. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/img/icon.png +0 -0
  483. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/lib/horizontalruler-plugin.js +55 -0
  484. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/de/i18n.js +1 -0
  485. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/i18n.js +4 -0
  486. data/vendor/assets/javascripts/aloha/plugins/common/image/AGPL3 +661 -0
  487. data/vendor/assets/javascripts/aloha/plugins/common/image/LICENSE +25 -0
  488. data/vendor/assets/javascripts/aloha/plugins/common/image/README.md +83 -0
  489. data/vendor/assets/javascripts/aloha/plugins/common/image/css/image.css +124 -0
  490. data/vendor/assets/javascripts/aloha/plugins/common/image/demo/crop.html +76 -0
  491. data/vendor/assets/javascripts/aloha/plugins/common/image/demo/crop.php +21 -0
  492. data/vendor/assets/javascripts/aloha/plugins/common/image/demo/cropnresize.jpg +0 -0
  493. data/vendor/assets/javascripts/aloha/plugins/common/image/demo/index.html +120 -0
  494. data/vendor/assets/javascripts/aloha/plugins/common/image/img/blank.jpg +0 -0
  495. data/vendor/assets/javascripts/aloha/plugins/common/image/img/cropnresize.png +0 -0
  496. data/vendor/assets/javascripts/aloha/plugins/common/image/img/handle-sw.png +0 -0
  497. data/vendor/assets/javascripts/aloha/plugins/common/image/img/image-align-left.png +0 -0
  498. data/vendor/assets/javascripts/aloha/plugins/common/image/img/image-align-none.png +0 -0
  499. data/vendor/assets/javascripts/aloha/plugins/common/image/img/image-align-right.png +0 -0
  500. data/vendor/assets/javascripts/aloha/plugins/common/image/img/image-border.png +0 -0
  501. data/vendor/assets/javascripts/aloha/plugins/common/image/img/image-title.png +0 -0
  502. data/vendor/assets/javascripts/aloha/plugins/common/image/img/image.gif +0 -0
  503. data/vendor/assets/javascripts/aloha/plugins/common/image/img/padding-decrease.gif +0 -0
  504. data/vendor/assets/javascripts/aloha/plugins/common/image/img/padding-increase.gif +0 -0
  505. data/vendor/assets/javascripts/aloha/plugins/common/image/img/page.png +0 -0
  506. data/vendor/assets/javascripts/aloha/plugins/common/image/img/size-decrease.gif +0 -0
  507. data/vendor/assets/javascripts/aloha/plugins/common/image/img/size-increase.gif +0 -0
  508. data/vendor/assets/javascripts/aloha/plugins/common/image/lib/image-plugin.js +1615 -0
  509. data/vendor/assets/javascripts/aloha/plugins/common/image/nls/cz/i18n.js +16 -0
  510. data/vendor/assets/javascripts/aloha/plugins/common/image/nls/de/i18n.js +1 -0
  511. data/vendor/assets/javascripts/aloha/plugins/common/image/nls/fr/i18n.js +1 -0
  512. data/vendor/assets/javascripts/aloha/plugins/common/image/nls/i18n.js +7 -0
  513. data/vendor/assets/javascripts/aloha/plugins/common/image/nls/ru/i18n.js +16 -0
  514. data/vendor/assets/javascripts/aloha/plugins/common/image/package.json +1 -0
  515. data/vendor/assets/javascripts/aloha/plugins/common/image/test/test.css +12 -0
  516. data/vendor/assets/javascripts/aloha/plugins/common/image/test/test.html +40 -0
  517. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/jcrop/jcrop.gif +0 -0
  518. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/jcrop/jquery.jcrop.css +35 -0
  519. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/jcrop/jquery.jcrop.min.js +163 -0
  520. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/mousewheel/mousewheel.js +60 -0
  521. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/jquery-ui-1.8.10.custom.min.js +97 -0
  522. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  523. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  524. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
  525. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  526. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  527. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  528. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  529. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  530. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  531. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
  532. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
  533. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
  534. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
  535. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
  536. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/jquery-ui-1.8.10.cropnresize.css +33 -0
  537. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/jquery-ui-1.8.10.custom.css +314 -0
  538. data/vendor/assets/javascripts/aloha/plugins/common/link/css/link.css +55 -0
  539. data/vendor/assets/javascripts/aloha/plugins/common/link/demo/background.png +0 -0
  540. data/vendor/assets/javascripts/aloha/plugins/common/link/demo/external-link-ltr-icon.png +0 -0
  541. data/vendor/assets/javascripts/aloha/plugins/common/link/demo/index.css +91 -0
  542. data/vendor/assets/javascripts/aloha/plugins/common/link/demo/index.html +91 -0
  543. data/vendor/assets/javascripts/aloha/plugins/common/link/extra/delicious.js +246 -0
  544. data/vendor/assets/javascripts/aloha/plugins/common/link/extra/linklist.js +227 -0
  545. data/vendor/assets/javascripts/aloha/plugins/common/link/extra/slowlinklist.js +228 -0
  546. data/vendor/assets/javascripts/aloha/plugins/common/link/lib/link-plugin.js +759 -0
  547. data/vendor/assets/javascripts/aloha/plugins/common/link/nls/de/i18n.js +13 -0
  548. data/vendor/assets/javascripts/aloha/plugins/common/link/nls/fr/i18n.js +6 -0
  549. data/vendor/assets/javascripts/aloha/plugins/common/link/nls/i18n.js +9 -0
  550. data/vendor/assets/javascripts/aloha/plugins/common/link/nls/pl/i18n.js +6 -0
  551. data/vendor/assets/javascripts/aloha/plugins/common/link/nls/ru/i18n.js +6 -0
  552. data/vendor/assets/javascripts/aloha/plugins/common/list/lib/list-plugin.js +849 -0
  553. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/de/i18n.js +1 -0
  554. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/eo/i18n.js +1 -0
  555. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/fi/i18n.js +1 -0
  556. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/fr/i18n.js +1 -0
  557. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/i18n.js +9 -0
  558. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/it/i18n.js +1 -0
  559. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/ru/i18n.js +1 -0
  560. data/vendor/assets/javascripts/aloha/plugins/common/list/package.json +1 -0
  561. data/vendor/assets/javascripts/aloha/plugins/common/paste/README.md +3 -0
  562. data/vendor/assets/javascripts/aloha/plugins/common/paste/lib/paste-plugin.js +221 -0
  563. data/vendor/assets/javascripts/aloha/plugins/common/paste/package.json +8 -0
  564. data/vendor/assets/javascripts/aloha/plugins/common/table/css/table.css +160 -0
  565. data/vendor/assets/javascripts/aloha/plugins/common/table/img/down.cur +0 -0
  566. data/vendor/assets/javascripts/aloha/plugins/common/table/img/left.cur +0 -0
  567. data/vendor/assets/javascripts/aloha/plugins/common/table/img/table_layout.png +0 -0
  568. data/vendor/assets/javascripts/aloha/plugins/common/table/img/wai-green.png +0 -0
  569. data/vendor/assets/javascripts/aloha/plugins/common/table/img/wai-red.png +0 -0
  570. data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-cell.js +463 -0
  571. data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-create-layer.js +210 -0
  572. data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-plugin-utils.js +355 -0
  573. data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-plugin.js +1498 -0
  574. data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-selection.js +374 -0
  575. data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table.js +1529 -0
  576. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/de/i18n.js +1 -0
  577. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/eo/i18n.js +1 -0
  578. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/fi/i18n.js +1 -0
  579. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/fr/i18n.js +1 -0
  580. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/i18n.js +11 -0
  581. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/it/i18n.js +1 -0
  582. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/pl/i18n.js +1 -0
  583. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/ru/i18n.js +1 -0
  584. data/vendor/assets/javascripts/aloha/plugins/common/table/package.json +1 -0
  585. data/vendor/assets/javascripts/aloha/plugins/common/undo/demo/index.css +49 -0
  586. data/vendor/assets/javascripts/aloha/plugins/common/undo/demo/index.html +85 -0
  587. data/vendor/assets/javascripts/aloha/plugins/common/undo/lib/undo-plugin.js +134 -0
  588. data/vendor/assets/javascripts/aloha/plugins/common/undo/package.json +7 -0
  589. data/vendor/assets/javascripts/aloha/plugins/common/undo/vendor/diff_match_patch_uncompressed.js +2155 -0
  590. data/vendor/assets/javascripts/aloha/plugins/common/undo/vendor/undo.js +119 -0
  591. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/README +0 -0
  592. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/css/attributes.css +12 -0
  593. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/lib/attributes-plugin.js +217 -0
  594. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/de/i18n.js +1 -0
  595. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/en/i18n.js +1 -0
  596. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/i18n.js +5 -0
  597. data/vendor/assets/javascripts/aloha/plugins/extra/browser/README +0 -0
  598. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/browser.css +360 -0
  599. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/browser.jqgrid.css +374 -0
  600. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/browsercombined.css +752 -0
  601. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  602. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  603. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  604. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  605. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  606. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  607. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  608. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  609. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-icons_222222_256x240.png +0 -0
  610. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-icons_2e83ff_256x240.png +0 -0
  611. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-icons_454545_256x240.png +0 -0
  612. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-icons_888888_256x240.png +0 -0
  613. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-icons_cd0a0a_256x240.png +0 -0
  614. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/jquery-ui-1.8.13.custom.css +319 -0
  615. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/jstree.css +88 -0
  616. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/throbber.gif +0 -0
  617. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/ui.jqgrid.css +148 -0
  618. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/arrow-000-medium.png +0 -0
  619. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/arrow-180.png +0 -0
  620. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/arrow-315-medium.png +0 -0
  621. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/arrow-stop-180.png +0 -0
  622. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/arrow-stop.png +0 -0
  623. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/arrow.png +0 -0
  624. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/control-stop-square-small.png +0 -0
  625. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/folder-horizontal-open.png +0 -0
  626. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/folder-open.png +0 -0
  627. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/gcn-icons/gcn-icon-file.gif +0 -0
  628. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/gcn-icons/gcn-icon-image.gif +0 -0
  629. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/gcn-icons/gcn-icon-page.gif +0 -0
  630. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/magnifier-left.png +0 -0
  631. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/page.png +0 -0
  632. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/picture.png +0 -0
  633. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/sort-alphabet-descending.png +0 -0
  634. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/sort-alphabet.png +0 -0
  635. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/throbber.gif +0 -0
  636. data/vendor/assets/javascripts/aloha/plugins/extra/browser/lib/browser-plugin.js +10 -0
  637. data/vendor/assets/javascripts/aloha/plugins/extra/browser/lib/browser.js +1103 -0
  638. data/vendor/assets/javascripts/aloha/plugins/extra/browser/lib/locale.js +26 -0
  639. data/vendor/assets/javascripts/aloha/plugins/extra/browser/nls/de/i18n.js +18 -0
  640. data/vendor/assets/javascripts/aloha/plugins/extra/browser/nls/de.json +1 -0
  641. data/vendor/assets/javascripts/aloha/plugins/extra/browser/nls/en/i18n.js +18 -0
  642. data/vendor/assets/javascripts/aloha/plugins/extra/browser/nls/en.json +1 -0
  643. data/vendor/assets/javascripts/aloha/plugins/extra/browser/nls/i18n.js +4 -0
  644. data/vendor/assets/javascripts/aloha/plugins/extra/browser/vendor/grid.locale.de.js +134 -0
  645. data/vendor/assets/javascripts/aloha/plugins/extra/browser/vendor/grid.locale.en.js +129 -0
  646. data/vendor/assets/javascripts/aloha/plugins/extra/browser/vendor/jquery.jqGrid.js +467 -0
  647. data/vendor/assets/javascripts/aloha/plugins/extra/browser/vendor/jquery.jstree.js +4544 -0
  648. data/vendor/assets/javascripts/aloha/plugins/extra/browser/vendor/jquery.ui.js +756 -0
  649. data/vendor/assets/javascripts/aloha/plugins/extra/browser/vendor/ui-layout.js +108 -0
  650. data/vendor/assets/javascripts/aloha/plugins/extra/cite/README +0 -0
  651. data/vendor/assets/javascripts/aloha/plugins/extra/cite/css/cite.css +49 -0
  652. data/vendor/assets/javascripts/aloha/plugins/extra/cite/img/blockquote.png +0 -0
  653. data/vendor/assets/javascripts/aloha/plugins/extra/cite/img/icon_cite.png +0 -0
  654. data/vendor/assets/javascripts/aloha/plugins/extra/cite/lib/cite-plugin.js +539 -0
  655. data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/de/i18n.js +1 -0
  656. data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/en/i18n.js +1 -0
  657. data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/i18n.js +4 -0
  658. data/vendor/assets/javascripts/aloha/plugins/extra/cite/package.json +1 -0
  659. data/vendor/assets/javascripts/aloha/plugins/extra/comments/img/add-icon.png +0 -0
  660. data/vendor/assets/javascripts/aloha/plugins/extra/comments/img/add.png +0 -0
  661. data/vendor/assets/javascripts/aloha/plugins/extra/comments/img/comments.png +0 -0
  662. data/vendor/assets/javascripts/aloha/plugins/extra/comments/img/hr.png +0 -0
  663. data/vendor/assets/javascripts/aloha/plugins/extra/comments/img/textbox.png +0 -0
  664. data/vendor/assets/javascripts/aloha/plugins/extra/comments/package.json +1 -0
  665. data/vendor/assets/javascripts/aloha/plugins/extra/comments/src/comments.css +442 -0
  666. data/vendor/assets/javascripts/aloha/plugins/extra/comments/src/comments.js +669 -0
  667. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/AGPL3 +661 -0
  668. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/LICENSE +25 -0
  669. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/README.md +5 -0
  670. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/TODO.md +2 -0
  671. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/demo/index.css +47 -0
  672. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/demo/index.html +101 -0
  673. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/demo/migration/index.css +189 -0
  674. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/demo/migration/index.html +321 -0
  675. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/demo/specs/DragnDropnImage.graphml +677 -0
  676. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/demo/style.css +47 -0
  677. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/demo/upload.php +26 -0
  678. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/i18n/en.json +1 -0
  679. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/i18n/fr.json +1 -0
  680. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/img/cross.png +0 -0
  681. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/img/hourglass.png +0 -0
  682. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/img/loading.gif +0 -0
  683. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/img/page.png +0 -0
  684. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/img/tick.png +0 -0
  685. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/lib/draganddropfiles-plugin.js +4 -0
  686. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/lib/dragndropfiles.css +110 -0
  687. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/lib/dragndropfiles.js +349 -0
  688. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/lib/dropfilesrepository.js +365 -0
  689. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/package.json +1 -0
  690. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/README.md +3 -0
  691. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/css/formatless.css +7 -0
  692. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/img/button.png +0 -0
  693. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/lib/formatlesshandler.js +67 -0
  694. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/lib/formatlesspaste-plugin.js +103 -0
  695. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/de/i18n.js +1 -0
  696. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/i18n.js +7 -0
  697. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/package.json +8 -0
  698. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/README +0 -0
  699. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/css/headerids.css +8 -0
  700. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/lib/headerids-plugin.js +127 -0
  701. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/de/i18n.js +1 -0
  702. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/en/i18n.js +1 -0
  703. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/i18n.js +5 -0
  704. data/vendor/assets/javascripts/aloha/plugins/extra/hints/dep/jquery.poshytip.js +470 -0
  705. data/vendor/assets/javascripts/aloha/plugins/extra/hints/i18n/de.json +1 -0
  706. data/vendor/assets/javascripts/aloha/plugins/extra/hints/i18n/en.json +1 -0
  707. data/vendor/assets/javascripts/aloha/plugins/extra/hints/img/tip-twitter_arrows.gif +0 -0
  708. data/vendor/assets/javascripts/aloha/plugins/extra/hints/package.json +9 -0
  709. data/vendor/assets/javascripts/aloha/plugins/extra/hints/src/hints.css +61 -0
  710. data/vendor/assets/javascripts/aloha/plugins/extra/hints/src/hints.js +49 -0
  711. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/README +0 -0
  712. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ad.png +0 -0
  713. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ae.png +0 -0
  714. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/af.png +0 -0
  715. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ag.png +0 -0
  716. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ai.png +0 -0
  717. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/al.png +0 -0
  718. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/am.png +0 -0
  719. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/an.png +0 -0
  720. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ao.png +0 -0
  721. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ar.png +0 -0
  722. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/as.png +0 -0
  723. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/at.png +0 -0
  724. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/au.png +0 -0
  725. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/aw.png +0 -0
  726. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ax.png +0 -0
  727. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/az.png +0 -0
  728. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ba.png +0 -0
  729. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bb.png +0 -0
  730. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bd.png +0 -0
  731. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/be.png +0 -0
  732. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bf.png +0 -0
  733. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bg.png +0 -0
  734. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bh.png +0 -0
  735. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bi.png +0 -0
  736. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bj.png +0 -0
  737. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bm.png +0 -0
  738. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bn.png +0 -0
  739. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bo.png +0 -0
  740. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/br.png +0 -0
  741. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bs.png +0 -0
  742. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bt.png +0 -0
  743. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bv.png +0 -0
  744. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bw.png +0 -0
  745. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/by.png +0 -0
  746. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bz.png +0 -0
  747. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ca.png +0 -0
  748. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/catalonia.png +0 -0
  749. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cc.png +0 -0
  750. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cd.png +0 -0
  751. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cf.png +0 -0
  752. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cg.png +0 -0
  753. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ch.png +0 -0
  754. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ci.png +0 -0
  755. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ck.png +0 -0
  756. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cl.png +0 -0
  757. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cm.png +0 -0
  758. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cn.png +0 -0
  759. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/co.png +0 -0
  760. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cr.png +0 -0
  761. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cs.png +0 -0
  762. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cu.png +0 -0
  763. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cv.png +0 -0
  764. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cx.png +0 -0
  765. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cy.png +0 -0
  766. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cz.png +0 -0
  767. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/de.png +0 -0
  768. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/dj.png +0 -0
  769. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/dk.png +0 -0
  770. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/dm.png +0 -0
  771. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/do.png +0 -0
  772. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/dz.png +0 -0
  773. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ec.png +0 -0
  774. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ee.png +0 -0
  775. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/eg.png +0 -0
  776. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/eh.png +0 -0
  777. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/en.png +0 -0
  778. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/er.png +0 -0
  779. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/es.png +0 -0
  780. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/et.png +0 -0
  781. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/europeanunion.png +0 -0
  782. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fam.png +0 -0
  783. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fi.png +0 -0
  784. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fj.png +0 -0
  785. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fk.png +0 -0
  786. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fm.png +0 -0
  787. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fo.png +0 -0
  788. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fr.png +0 -0
  789. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ga.png +0 -0
  790. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gb.png +0 -0
  791. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gd.png +0 -0
  792. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ge.png +0 -0
  793. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gf.png +0 -0
  794. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gh.png +0 -0
  795. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gi.png +0 -0
  796. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gl.png +0 -0
  797. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gm.png +0 -0
  798. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gn.png +0 -0
  799. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gp.png +0 -0
  800. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gq.png +0 -0
  801. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gr.png +0 -0
  802. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gs.png +0 -0
  803. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gt.png +0 -0
  804. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gu.png +0 -0
  805. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gw.png +0 -0
  806. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gy.png +0 -0
  807. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/hk.png +0 -0
  808. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/hm.png +0 -0
  809. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/hn.png +0 -0
  810. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/hr.png +0 -0
  811. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ht.png +0 -0
  812. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/hu.png +0 -0
  813. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/id.png +0 -0
  814. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ie.png +0 -0
  815. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/il.png +0 -0
  816. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/in.png +0 -0
  817. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/io.png +0 -0
  818. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/iq.png +0 -0
  819. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ir.png +0 -0
  820. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/is.png +0 -0
  821. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/it.png +0 -0
  822. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/jm.png +0 -0
  823. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/jo.png +0 -0
  824. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/jp.png +0 -0
  825. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ke.png +0 -0
  826. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kg.png +0 -0
  827. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kh.png +0 -0
  828. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ki.png +0 -0
  829. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/km.png +0 -0
  830. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kn.png +0 -0
  831. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kp.png +0 -0
  832. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kr.png +0 -0
  833. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kw.png +0 -0
  834. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ky.png +0 -0
  835. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kz.png +0 -0
  836. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/la.png +0 -0
  837. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lb.png +0 -0
  838. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lc.png +0 -0
  839. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/li.png +0 -0
  840. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lk.png +0 -0
  841. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lr.png +0 -0
  842. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ls.png +0 -0
  843. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lt.png +0 -0
  844. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lu.png +0 -0
  845. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lv.png +0 -0
  846. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ly.png +0 -0
  847. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ma.png +0 -0
  848. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mc.png +0 -0
  849. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/md.png +0 -0
  850. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/me.png +0 -0
  851. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mg.png +0 -0
  852. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mh.png +0 -0
  853. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mk.png +0 -0
  854. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ml.png +0 -0
  855. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mm.png +0 -0
  856. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mn.png +0 -0
  857. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mo.png +0 -0
  858. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mp.png +0 -0
  859. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mq.png +0 -0
  860. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mr.png +0 -0
  861. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ms.png +0 -0
  862. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mt.png +0 -0
  863. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mu.png +0 -0
  864. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mv.png +0 -0
  865. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mw.png +0 -0
  866. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mx.png +0 -0
  867. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/my.png +0 -0
  868. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mz.png +0 -0
  869. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/na.png +0 -0
  870. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/nc.png +0 -0
  871. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ne.png +0 -0
  872. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/nf.png +0 -0
  873. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ng.png +0 -0
  874. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ni.png +0 -0
  875. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/nl.png +0 -0
  876. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/no.png +0 -0
  877. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/np.png +0 -0
  878. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/nr.png +0 -0
  879. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/nu.png +0 -0
  880. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/nz.png +0 -0
  881. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/om.png +0 -0
  882. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pa.png +0 -0
  883. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pe.png +0 -0
  884. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pf.png +0 -0
  885. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pg.png +0 -0
  886. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ph.png +0 -0
  887. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pk.png +0 -0
  888. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pl.png +0 -0
  889. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pm.png +0 -0
  890. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pn.png +0 -0
  891. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pr.png +0 -0
  892. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ps.png +0 -0
  893. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pt.png +0 -0
  894. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pw.png +0 -0
  895. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/py.png +0 -0
  896. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/qa.png +0 -0
  897. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/re.png +0 -0
  898. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ro.png +0 -0
  899. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/rs.png +0 -0
  900. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ru.png +0 -0
  901. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/rw.png +0 -0
  902. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sa.png +0 -0
  903. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sb.png +0 -0
  904. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sc.png +0 -0
  905. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/scotland.png +0 -0
  906. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sd.png +0 -0
  907. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/se.png +0 -0
  908. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sg.png +0 -0
  909. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sh.png +0 -0
  910. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/si.png +0 -0
  911. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sj.png +0 -0
  912. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sk.png +0 -0
  913. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sl.png +0 -0
  914. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sm.png +0 -0
  915. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sn.png +0 -0
  916. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/so.png +0 -0
  917. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sr.png +0 -0
  918. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/st.png +0 -0
  919. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sv.png +0 -0
  920. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sy.png +0 -0
  921. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sz.png +0 -0
  922. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tc.png +0 -0
  923. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/td.png +0 -0
  924. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tf.png +0 -0
  925. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tg.png +0 -0
  926. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/th.png +0 -0
  927. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tj.png +0 -0
  928. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tk.png +0 -0
  929. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tl.png +0 -0
  930. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tm.png +0 -0
  931. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tn.png +0 -0
  932. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/to.png +0 -0
  933. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tr.png +0 -0
  934. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tt.png +0 -0
  935. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tv.png +0 -0
  936. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tw.png +0 -0
  937. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tz.png +0 -0
  938. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ua.png +0 -0
  939. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ug.png +0 -0
  940. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/um.png +0 -0
  941. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/us.png +0 -0
  942. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/uy.png +0 -0
  943. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/uz.png +0 -0
  944. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/va.png +0 -0
  945. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/vc.png +0 -0
  946. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ve.png +0 -0
  947. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/vg.png +0 -0
  948. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/vi.png +0 -0
  949. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/vn.png +0 -0
  950. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/vu.png +0 -0
  951. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/wales.png +0 -0
  952. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/wf.png +0 -0
  953. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ws.png +0 -0
  954. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ye.png +0 -0
  955. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/yt.png +0 -0
  956. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/za.png +0 -0
  957. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/zm.png +0 -0
  958. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/zw.png +0 -0
  959. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/lib/linkbrowser-plugin.js +153 -0
  960. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/de/i18n.js +1 -0
  961. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/fr/i18n.js +1 -0
  962. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/i18n.js +7 -0
  963. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/pl/i18n.js +1 -0
  964. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/ru/i18n.js +1 -0
  965. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/demo/index.css +49 -0
  966. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/demo/index.html +82 -0
  967. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/i18n/en.json +1 -0
  968. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/package.json +1 -0
  969. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/proxy.php +244 -0
  970. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/src/linkchecker.css +14 -0
  971. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/src/linkchecker.js +256 -0
  972. data/vendor/assets/javascripts/aloha/plugins/extra/listenforcer/lib/listenforcer-plugin.js +165 -0
  973. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/README +0 -0
  974. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/css/metaview.css +86 -0
  975. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/anchor.png +0 -0
  976. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/blockquote.png +0 -0
  977. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/button.png +0 -0
  978. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/caption.png +0 -0
  979. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/cite.png +0 -0
  980. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/dd.png +0 -0
  981. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/div.png +0 -0
  982. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/dl.png +0 -0
  983. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/dt.png +0 -0
  984. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/h1.png +0 -0
  985. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/h2.png +0 -0
  986. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/h3.png +0 -0
  987. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/h4.png +0 -0
  988. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/h5.png +0 -0
  989. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/h6.png +0 -0
  990. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/icon_cite.png +0 -0
  991. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/p.png +0 -0
  992. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/pre.png +0 -0
  993. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/table.png +0 -0
  994. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/td.png +0 -0
  995. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/th.png +0 -0
  996. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/lib/metaview-plugin.js +82 -0
  997. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/de/i18n.js +1 -0
  998. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/de.json +1 -0
  999. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/en/i18n.js +1 -0
  1000. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/en.json +1 -0
  1001. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/i18n.js +5 -0
  1002. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/README +0 -0
  1003. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/css/numerated-headers.css +7 -0
  1004. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/demo/index.css +189 -0
  1005. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/demo/index.html +139 -0
  1006. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/demo/js/aloha-config.js +115 -0
  1007. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/img/headers.png +0 -0
  1008. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/lib/numerated-headers-plugin.js +233 -0
  1009. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/de/i18n.js +1 -0
  1010. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/en/i18n.js +1 -0
  1011. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/i18n.js +5 -0
  1012. data/vendor/assets/javascripts/aloha/plugins/extra/profiler/css/profiler.css +34 -0
  1013. data/vendor/assets/javascripts/aloha/plugins/extra/profiler/lib/profiler-plugin.js +285 -0
  1014. data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/LICENSE.md +662 -0
  1015. data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/README.md +8 -0
  1016. data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/css/ribbon.css +10 -0
  1017. data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/lib/ribbon-plugin.js +186 -0
  1018. data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/package.json +1 -0
  1019. data/vendor/assets/javascripts/aloha/plugins/extra/toc/i18n/de.json +1 -0
  1020. data/vendor/assets/javascripts/aloha/plugins/extra/toc/i18n/en.json +1 -0
  1021. data/vendor/assets/javascripts/aloha/plugins/extra/toc/package.json +1 -0
  1022. data/vendor/assets/javascripts/aloha/plugins/extra/toc/src/toc.js +350 -0
  1023. data/vendor/assets/javascripts/aloha/plugins/extra/vie/LICENSE +22 -0
  1024. data/vendor/assets/javascripts/aloha/plugins/extra/vie/README.markdown +65 -0
  1025. data/vendor/assets/javascripts/aloha/plugins/extra/vie/demo/index.html +93 -0
  1026. data/vendor/assets/javascripts/aloha/plugins/extra/vie/img/cms-decoupled-communications.png +0 -0
  1027. data/vendor/assets/javascripts/aloha/plugins/extra/vie/package.json +1 -0
  1028. data/vendor/assets/javascripts/aloha/plugins/extra/vie/src/backbone-min.js +27 -0
  1029. data/vendor/assets/javascripts/aloha/plugins/extra/vie/src/underscore-min.js +25 -0
  1030. data/vendor/assets/javascripts/aloha/plugins/extra/vie/src/vie-aloha.js +74 -0
  1031. data/vendor/assets/javascripts/aloha/plugins/extra/vie/src/vie-collectionmanager.js +70 -0
  1032. data/vendor/assets/javascripts/aloha/plugins/extra/vie/src/vie-containermanager.js +263 -0
  1033. data/vendor/assets/javascripts/aloha/plugins/extra/vie/src/vie.js +20 -0
  1034. metadata +1105 -0
@@ -0,0 +1,146 @@
1
+ /*!
2
+ * This file is part of Aloha Editor
3
+ * Author & Copyright (c) 2010 Gentics Software GmbH, aloha@gentics.com
4
+ * Licensed unter the terms of http://www.aloha-editor.com/license.html
5
+ */
6
+ define(
7
+ [ 'aloha/core', 'util/class'],
8
+ function( Aloha, Class ) {
9
+
10
+
11
+ var
12
+ // Aloha = window.Aloha,
13
+ // Class = window.Class,
14
+ GENTICS = window.GENTICS;
15
+
16
+ Aloha.RepositoryObject = function() {};
17
+
18
+ /**
19
+ * @namespace Aloha.Repository
20
+ * @class Document
21
+ * @constructor
22
+ *
23
+ * Abstract Document suitable for most Objects.<br /><br />
24
+ *
25
+ * Example:
26
+ *
27
+ <pre><code>
28
+ var item = new Aloha.Repository.Document({
29
+ id: 1,
30
+ repositoryId: 'myrepository',
31
+ name: 'Aloha Editor - The HTML5 Editor',
32
+ type: 'website',
33
+ url:'http://aloha-editor.com',
34
+ });
35
+ </code></pre>
36
+ *
37
+ * @param {Object} properties An object with the data.
38
+ * <div class="mdetail-params"><ul>
39
+ * <li><code>id</code> : String <div class="sub-desc">Unique identifier</div></li>
40
+ * <li><code>repositoryId</code> : String <div class="sub-desc">Unique repository identifier</div></li>
41
+ * <li><code>name</code> : String <div class="sub-desc">Name of the object. This name is used to display</div></li>
42
+ * <li><code>type</code> : String <div class="sub-desc">The specific object type</div></li>
43
+ * <li><code>partentId</code> : String (optional) <div class="sub-desc"></div></li>
44
+ * <li><code>mimetype</code> : String (optional) <div class="sub-desc">MIME type of the Content Stream</div></li>
45
+ * <li><code>filename</code> : String (optional) <div class="sub-desc">File name of the Content Stream</div></li>
46
+ * <li><code>length</code> : String (optional) <div class="sub-desc">Length of the content stream (in bytes)</div></li>
47
+ * <li><code>url</code> : String (optional) <div class="sub-desc">URL of the content stream</div></li>
48
+ * <li><code>renditions</code> : Array (optional) <div class="sub-desc">Array of different renditions of this object</div></li>
49
+ * <li><code>localName</code> : String (optional) <div class="sub-desc">Name of the object. This name is used internally</div></li>
50
+ * <li><code>createdBy</code> : String (optional) <div class="sub-desc">User who created the object</div></li>
51
+ * <li><code>creationDate</code> : Date (optional) <div class="sub-desc">DateTime when the object was created</div></li>
52
+ * <li><code>lastModifiedBy</code> : String (optional) <div class="sub-desc">User who last modified the object</div></li>
53
+ * <li><code>lastModificationDate</code> : Date (optional) <div class="sub-desc">DateTime when the object was last modified</div></li>
54
+ * </ul></div>
55
+ *
56
+ */
57
+ Aloha.RepositoryDocument = Class.extend({
58
+ _constructor: function (properties) {
59
+
60
+ var p = properties;
61
+
62
+ this.type = 'document';
63
+
64
+ // Basic error checking for MUST attributes
65
+ if (!p.id ||
66
+ !p.name ||
67
+ !p.repositoryId
68
+ ) {
69
+ // Aloha.Log.error(this, "No valid Aloha Object. Missing MUST property");
70
+ return;
71
+ }
72
+
73
+ GENTICS.Utils.applyProperties(this, properties);
74
+
75
+ this.baseType = 'document';
76
+ }
77
+ // /**
78
+ // * Not implemented method to generate this JS API doc correctly.
79
+ // */
80
+ // ,empty = function() }
81
+
82
+ });
83
+
84
+
85
+
86
+ /**
87
+ * @namespace Aloha.Repository
88
+ * @class Folder
89
+ * @constructor
90
+ * Abstract Folder suitable for most strucural Objects.<br /><br />
91
+ *
92
+ * Example:
93
+ *
94
+ <pre><code>
95
+ var item = new Aloha.Repository.Folder({
96
+ id: 2,
97
+ repositoryId: 'myrepository',
98
+ name: 'images',
99
+ type: 'directory',
100
+ parentId:'/www'
101
+ });
102
+ </code></pre>
103
+ * @param {Object} properties An object with the data.
104
+ * <div class="mdetail-params"><ul>
105
+ * <li><code>id</code> : String <div class="sub-desc">Unique identifier</div></li>
106
+ * <li><code>repositoryId</code> : String <div class="sub-desc">Unique repository identifier</div></li>
107
+ * <li><code>name</code> : String <div class="sub-desc">Name of the object. This name is used to display</div></li>
108
+ * <li><code>type</code> : String <div class="sub-desc">The specific object type</div></li>
109
+ * <li><code>partentId</code> : String (optional) <div class="sub-desc"></div></li>
110
+ * <li><code>localName</code> : String (optional) <div class="sub-desc">Name of the object. This name is used internally</div></li>
111
+ * <li><code>createdBy</code> : String (optional) <div class="sub-desc">User who created the object</div></li>
112
+ * <li><code>creationDate</code> : Date (optional) <div class="sub-desc">DateTime when the object was created</div></li>
113
+ * <li><code>lastModifiedBy</code> : String (optional) <div class="sub-desc">User who last modified the object</div></li>
114
+ * <li><code>lastModificationDate</code> : Date (optional) <div class="sub-desc">DateTime when the object was last modified</div></li>
115
+ * </ul></div>
116
+ *
117
+ */
118
+ Aloha.RepositoryFolder = Class.extend({
119
+
120
+ _constructor: function(properties) {
121
+
122
+ var p = properties;
123
+
124
+ this.type = 'folder';
125
+
126
+ // Basic error checking for MUST attributes
127
+ if (!p.id ||
128
+ !p.name ||
129
+ !p.repositoryId
130
+ ) {
131
+ // Aloha.Log.error(this, "No valid Aloha Object. Missing MUST property");
132
+ return;
133
+ }
134
+
135
+ GENTICS.Utils.applyProperties(this, properties);
136
+
137
+ this.baseType = 'folder';
138
+
139
+ }
140
+ // /**
141
+ // * Not implemented method to generate this JS API doc correctly.
142
+ // */
143
+ // ,empty = function() {};
144
+
145
+ });
146
+ });
@@ -0,0 +1,2083 @@
1
+ /*!
2
+ * This file is part of Aloha Editor Project http://aloha-editor.org
3
+ * Copyright (c) 2010-2011 Gentics Software GmbH, aloha@gentics.com
4
+ * Contributors http://aloha-editor.org/contribution.php
5
+ * Licensed unter the terms of http://www.aloha-editor.org/license.html
6
+ *//*
7
+ * Aloha Editor is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU Affero General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.*
11
+ *
12
+ * Aloha Editor is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU Affero General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU Affero General Public License
18
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
19
+ */
20
+
21
+
22
+ define(
23
+ [ 'aloha/core', 'aloha/jquery', 'aloha/floatingmenu', 'util/class', 'util/range', 'aloha/rangy-core' ],
24
+ function(Aloha, jQuery, FloatingMenu, Class, Range) {
25
+ var
26
+ // $ = jQuery,
27
+ // Aloha = window.Aloha,
28
+ // Class = window.Class,
29
+ GENTICS = window.GENTICS;
30
+
31
+ /**
32
+ * @namespace Aloha
33
+ * @class Selection
34
+ * This singleton class always represents the current user selection
35
+ * @singleton
36
+ */
37
+ var Selection = Class.extend({
38
+ _constructor: function(){
39
+ // Pseudo Range Clone being cleaned up for better HTML wrapping support
40
+ this.rangeObject = {};
41
+
42
+ this.preventSelectionChangedFlag = false; // will remember if someone urged us to skip the next aloha-selection-changed event
43
+
44
+ // define basics first
45
+ this.tagHierarchy = {
46
+ 'textNode' : [],
47
+ 'abbr' : ['textNode'],
48
+ 'b' : ['textNode', 'b', 'i', 'em', 'sup', 'sub', 'br', 'span', 'img','a','del','ins','u', 'cite', 'q', 'code', 'abbr', 'strong'],
49
+ 'pre' : ['textNode', 'b', 'i', 'em', 'sup', 'sub', 'br', 'span', 'img','a','del','ins','u', 'cite','q', 'code', 'abbr', 'code'],
50
+ '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'],
51
+ 'ins' : ['textNode', 'b', 'i', 'em', 'sup', 'sub', 'br', 'span', 'img','a','u', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
52
+ 'ul' : ['li'],
53
+ 'ol' : ['li'],
54
+ 'li' : ['textNode', 'b', 'i', 'em', 'sup', 'sub', 'br', 'span', 'img', 'ul', 'ol', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'del', 'ins', 'u', 'a'],
55
+ 'tr' : ['td','th'],
56
+ 'table' : ['tr'],
57
+ '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', 'a'],
58
+ 'h1' : ['textNode', 'b', 'i', 'em', 'sup', 'sub', 'br', 'span', 'img','a', 'del', 'ins', 'u']
59
+ };
60
+ // now reference the basics for all other equal tags (important: don't forget to include
61
+ // the basics itself as reference: 'b' : this.tagHierarchy.b
62
+ this.tagHierarchy = {
63
+ 'textNode' : this.tagHierarchy.textNode,
64
+ 'abbr' : this.tagHierarchy.abbr,
65
+ 'br' : this.tagHierarchy.textNode,
66
+ 'img' : this.tagHierarchy.textNode,
67
+ 'b' : this.tagHierarchy.b,
68
+ 'strong' : this.tagHierarchy.b,
69
+ 'code' : this.tagHierarchy.b,
70
+ 'q' : this.tagHierarchy.b,
71
+ 'blockquote' : this.tagHierarchy.blockquote,
72
+ 'cite' : this.tagHierarchy.b,
73
+ 'i' : this.tagHierarchy.b,
74
+ 'em' : this.tagHierarchy.b,
75
+ 'sup' : this.tagHierarchy.b,
76
+ 'sub' : this.tagHierarchy.b,
77
+ 'span' : this.tagHierarchy.b,
78
+ 'del' : this.tagHierarchy.del,
79
+ 'ins' : this.tagHierarchy.ins,
80
+ 'u' : this.tagHierarchy.b,
81
+ 'p' : this.tagHierarchy.b,
82
+ 'pre' : this.tagHierarchy.pre,
83
+ 'a' : this.tagHierarchy.b,
84
+ 'ul' : this.tagHierarchy.ul,
85
+ 'ol' : this.tagHierarchy.ol,
86
+ 'li' : this.tagHierarchy.li,
87
+ 'td' : this.tagHierarchy.li,
88
+ 'div' : this.tagHierarchy.div,
89
+ 'h1' : this.tagHierarchy.h1,
90
+ 'h2' : this.tagHierarchy.h1,
91
+ 'h3' : this.tagHierarchy.h1,
92
+ 'h4' : this.tagHierarchy.h1,
93
+ 'h5' : this.tagHierarchy.h1,
94
+ 'h6' : this.tagHierarchy.h1,
95
+ 'table' : this.tagHierarchy.table
96
+ };
97
+
98
+ // When applying this elements to selection they will replace the assigned elements
99
+ this.replacingElements = {
100
+ 'h1' : ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6','pre', 'blockquote']
101
+ };
102
+ this.replacingElements = {
103
+ 'h1' : this.replacingElements.h1,
104
+ 'h2' : this.replacingElements.h1,
105
+ 'h3' : this.replacingElements.h1,
106
+ 'h4' : this.replacingElements.h1,
107
+ 'h5' : this.replacingElements.h1,
108
+ 'h6' : this.replacingElements.h1,
109
+ 'pre' : this.replacingElements.h1,
110
+ 'p' : this.replacingElements.h1,
111
+ 'blockquote' : this.replacingElements.h1
112
+ };
113
+ this.allowedToStealElements = {
114
+ 'h1' : ['textNode']
115
+ };
116
+ this.allowedToStealElements = {
117
+ 'h1' : this.allowedToStealElements.h1,
118
+ 'h2' : this.allowedToStealElements.h1,
119
+ 'h3' : this.allowedToStealElements.h1,
120
+ 'h4' : this.allowedToStealElements.h1,
121
+ 'h5' : this.allowedToStealElements.h1,
122
+ 'h6' : this.allowedToStealElements.h1,
123
+ 'p' : this.tagHierarchy.b
124
+ };
125
+ },
126
+
127
+ /**
128
+ * Class definition of a SelectionTree (relevant for all formatting / markup changes)
129
+ * TODO: remove this (was moved to range.js)
130
+ * Structure:
131
+ * +
132
+ * |-domobj: <reference to the DOM Object> (NOT jQuery)
133
+ * |-selection: defines if this node is marked by user [none|partial|full]
134
+ * |-children: recursive structure like this
135
+ * @hide
136
+ */
137
+ SelectionTree: function() {
138
+ this.domobj = {};
139
+ this.selection = undefined;
140
+ this.children = [];
141
+ },
142
+
143
+ /**
144
+ * INFO: Method is used for integration with Gentics Aloha, has no use otherwise
145
+ * Updates the rangeObject according to the current user selection
146
+ * Method is always called on selection change
147
+ * @param objectClicked Object that triggered the selectionChange event
148
+ * @return true when rangeObject was modified, false otherwise
149
+ * @hide
150
+ */
151
+ onChange: function(objectClicked, event) {
152
+ if (this.updateSelectionTimeout) {
153
+ window.clearTimeout(this.updateSelectionTimeout);
154
+ this.updateSelectionTimeout = undefined;
155
+ }
156
+ //we have to work around an IE bug that causes the user
157
+ //selection to be incorrectly set on the body element when
158
+ //the updateSelectionTimeout triggers. We remember the range
159
+ //from the time when this onChange is triggered and provide
160
+ //it instead of the current user selection when the timout
161
+ //is triggered. The bug is caused by selecting some text and
162
+ //then clicking once inside the selection (which collapses
163
+ //the selection). Interesting fact: when the timeout is
164
+ //increased to 500 milliseconds, the bug will not cause any
165
+ //problems since the selection will correct itself somehow.
166
+ var range = new Aloha.Selection.SelectionRange(true);
167
+ this.updateSelectionTimeout = window.setTimeout(function () {
168
+ Aloha.Selection._updateSelection(event, range);
169
+ }, 5);
170
+ },
171
+
172
+ /**
173
+ * prevents the next aloha-selection-changed event from being triggered
174
+ */
175
+ preventSelectionChanged: function () {
176
+ this.preventSelectionChangedFlag = true;
177
+ },
178
+
179
+ /**
180
+ * will return wheter selection change event was prevented or not, and reset the preventSelectionChangedFlag
181
+ * @return {Boolean} true if aloha-selection-change event was prevented
182
+ */
183
+ isSelectionChangedPrevented: function () {
184
+ var prevented = this.preventSelectionChangedFlag;
185
+ this.preventSelectionChangedFlag = false;
186
+ return prevented;
187
+ },
188
+
189
+ /**
190
+ * Checks if the current rangeObject common ancector container is edtiable
191
+ * @return {Boolean} true if current common ancestor is editable
192
+ */
193
+ isSelectionEditable: function() {
194
+ return ( this.rangeObject.commonAncestorContainer &&
195
+ jQuery( this.rangeObject.commonAncestorContainer )
196
+ .contentEditable() );
197
+ },
198
+
199
+ /**
200
+ * This method checks, if the current rangeObject common ancestor container has a 'data-aloha-floatingmenu-visible' Attribute.
201
+ * Needed in Floating Menu for exceptional display of floatingmenu.
202
+ */
203
+ isFloatingMenuVisible: function() {
204
+ var visible = jQuery(Aloha.Selection.rangeObject
205
+ .commonAncestorContainer).attr('data-aloha-floatingmenu-visible');
206
+ if(visible !== 'undefined'){
207
+ if (visible === 'true'){
208
+ return true;
209
+ } else {
210
+ return false;
211
+ }
212
+ }
213
+ return false;
214
+ },
215
+
216
+ /**
217
+ * INFO: Method is used for integration with Gentics Aloha, has no use otherwise
218
+ * Updates the rangeObject according to the current user selection
219
+ * Method is always called on selection change
220
+ * @param event jQuery browser event object
221
+ * @return true when rangeObject was modified, false otherwise
222
+ * @hide
223
+ */
224
+ updateSelection: function(event) {
225
+ return this._updateSelection(event, null);
226
+ },
227
+
228
+ /**
229
+ * Internal version of updateSelection that adds the range parameter to be
230
+ * able to work around an IE bug that caused the current user selection
231
+ * sometimes to be on the body element.
232
+ * @param {Object} event
233
+ * @param {Object} range a substitute for the current user selection. if not provided,
234
+ * the current user selection will be used.
235
+ * @hide
236
+ */
237
+ _updateSelection: function( event, range ) {
238
+ if ( event && event.originalEvent
239
+ && event.originalEvent.stopSelectionUpdate === true ) {
240
+ return false;
241
+ }
242
+
243
+ if ( typeof range === 'undefined' ) {
244
+ return false;
245
+ }
246
+
247
+ this.rangeObject = range || new Aloha.Selection.SelectionRange( true );
248
+
249
+ // Only execute the workaround when a valid rangeObject was provided
250
+ if ( typeof this.rangeObject !== "undefined" && typeof this.rangeObject.startContainer !== "undefined" && this.rangeObject.endContainer !== "undefined") {
251
+ // workaround for a nasty IE bug that allows the user to select text nodes inside areas with contenteditable "false"
252
+ if ( (this.rangeObject.startContainer.nodeType === 3 && !jQuery(this.rangeObject.startContainer.parentNode).contentEditable())
253
+ || (this.rangeObject.endContainer.nodeType === 3 && !jQuery(this.rangeObject.endContainer.parentNode).contentEditable())) {
254
+ Aloha.getSelection().removeAllRanges();
255
+ return true;
256
+ }
257
+ }
258
+
259
+ // find the CAC (Common Ancestor Container) and update the selection Tree
260
+ this.rangeObject.update();
261
+
262
+ // check if aloha-selection-changed event has been prevented
263
+ if (this.isSelectionChangedPrevented()) {
264
+ return true;
265
+ }
266
+
267
+ // Only set the specific scope if an event was provided, which means
268
+ // that somehow an editable was selected
269
+ // TODO Bind code to aloha-selection-changed event to remove coupling to floatingmenu
270
+ if (event !== undefined) {
271
+ // Initiallly set the scope to 'continuoustext'
272
+ FloatingMenu.setScope('Aloha.continuoustext');
273
+ }
274
+
275
+ // throw the event that the selection has changed. Plugins now have the
276
+ // chance to react on the chancurrentElements[childCount].children.lengthged selection
277
+ Aloha.trigger('aloha-selection-changed', [ this.rangeObject, event ]);
278
+
279
+ return true;
280
+ },
281
+
282
+ /**
283
+ * creates an object with x items containing all relevant dom objects.
284
+ * Structure:
285
+ * +
286
+ * |-domobj: <reference to the DOM Object> (NOT jQuery)
287
+ * |-selection: defines if this node is marked by user [none|partial|full]
288
+ * |-children: recursive structure like this ("x.." because it's then shown last in DOM Browsers...)
289
+ * TODO: remove this (was moved to range.js)
290
+ *
291
+ * @param rangeObject "Aloha clean" range object including a commonAncestorContainer
292
+ * @return obj selection
293
+ * @hide
294
+ */
295
+ getSelectionTree: function(rangeObject) {
296
+ if (!rangeObject) { // if called without any parameters, the method acts as getter for this.selectionTree
297
+ return this.rangeObject.getSelectionTree();
298
+ }
299
+ if (!rangeObject.commonAncestorContainer) {
300
+ Aloha.Log.error(this, 'the rangeObject is missing the commonAncestorContainer');
301
+ return false;
302
+ }
303
+
304
+ this.inselection = false;
305
+
306
+ // before getting the selection tree, we do a cleanup
307
+ if (GENTICS.Utils.Dom.doCleanup({'merge' : true}, rangeObject)) {
308
+ this.rangeObject.update();
309
+ this.rangeObject.select();
310
+ }
311
+
312
+ return this.recursiveGetSelectionTree(rangeObject, rangeObject.commonAncestorContainer);
313
+ },
314
+
315
+ /**
316
+ * Recursive inner function for generating the selection tree.
317
+ * TODO: remove this (was moved to range.js)
318
+ * @param rangeObject range object
319
+ * @param currentObject current DOM object for which the selection tree shall be generated
320
+ * @return array of SelectionTree objects for the children of the current DOM object
321
+ * @hide
322
+ */
323
+ recursiveGetSelectionTree: function (rangeObject, currentObject) {
324
+ // get all direct children of the given object
325
+ var jQueryCurrentObject = jQuery(currentObject),
326
+ childCount = 0,
327
+ that = this,
328
+ currentElements = [];
329
+
330
+ jQueryCurrentObject.contents().each(function(index) {
331
+ var selectionType = 'none',
332
+ startOffset = false,
333
+ endOffset = false,
334
+ collapsedFound = false,
335
+ i, elementsLength,
336
+ noneFound = false,
337
+ partialFound = false,
338
+ fullFound = false;
339
+
340
+ // check for collapsed selections between nodes
341
+ if (rangeObject.isCollapsed() && currentObject === rangeObject.startContainer && rangeObject.startOffset == index) {
342
+ // insert an extra selectiontree object for the collapsed selection here
343
+ currentElements[childCount] = new Aloha.Selection.SelectionTree();
344
+ currentElements[childCount].selection = 'collapsed';
345
+ currentElements[childCount].domobj = undefined;
346
+ that.inselection = false;
347
+ collapsedFound = true;
348
+ childCount++;
349
+ }
350
+
351
+ if (!that.inselection && !collapsedFound) {
352
+ // the start of the selection was not yet found, so look for it now
353
+ // check whether the start of the selection is found here
354
+
355
+ // check is dependent on the node type
356
+ switch(this.nodeType) {
357
+ case 3: // text node
358
+ if (this === rangeObject.startContainer) {
359
+ // the selection starts here
360
+ that.inselection = true;
361
+
362
+ // when the startoffset is > 0, the selection type is only partial
363
+ selectionType = rangeObject.startOffset > 0 ? 'partial' : 'full';
364
+ startOffset = rangeObject.startOffset;
365
+ endOffset = this.length;
366
+ }
367
+ break;
368
+ case 1: // element node
369
+ if (this === rangeObject.startContainer && rangeObject.startOffset === 0) {
370
+ // the selection starts here
371
+ that.inselection = true;
372
+ selectionType = 'full';
373
+ }
374
+ if (currentObject === rangeObject.startContainer && rangeObject.startOffset === index) {
375
+ // the selection starts here
376
+ that.inselection = true;
377
+ selectionType = 'full';
378
+ }
379
+ break;
380
+ }
381
+ }
382
+
383
+ if (that.inselection && !collapsedFound) {
384
+ if (selectionType == 'none') {
385
+ selectionType = 'full';
386
+ }
387
+ // we already found the start of the selection, so look for the end of the selection now
388
+ // check whether the end of the selection is found here
389
+
390
+ switch(this.nodeType) {
391
+ case 3: // text node
392
+ if (this === rangeObject.endContainer) {
393
+ // the selection ends here
394
+ that.inselection = false;
395
+
396
+ // check for partial selection here
397
+ if (rangeObject.endOffset < this.length) {
398
+ selectionType = 'partial';
399
+ }
400
+ if (startOffset === false) {
401
+ startOffset = 0;
402
+ }
403
+ endOffset = rangeObject.endOffset;
404
+ }
405
+ break;
406
+ case 1: // element node
407
+ if (this === rangeObject.endContainer && rangeObject.endOffset === 0) {
408
+ that.inselection = false;
409
+ }
410
+ break;
411
+ }
412
+ if (currentObject === rangeObject.endContainer && rangeObject.endOffset <= index) {
413
+ that.inselection = false;
414
+ selectionType = 'none';
415
+ }
416
+ }
417
+
418
+ // create the current selection tree entry
419
+ currentElements[childCount] = new Aloha.Selection.SelectionTree();
420
+ currentElements[childCount].domobj = this;
421
+ currentElements[childCount].selection = selectionType;
422
+ if (selectionType == 'partial') {
423
+ currentElements[childCount].startOffset = startOffset;
424
+ currentElements[childCount].endOffset = endOffset;
425
+ }
426
+
427
+ // now do the recursion step into the current object
428
+ currentElements[childCount].children = that.recursiveGetSelectionTree(rangeObject, this);
429
+ elementsLength = currentElements[childCount].children.length;
430
+
431
+ // check whether a selection was found within the children
432
+ if (elementsLength > 0) {
433
+ for ( i = 0; i < elementsLength; ++i) {
434
+ switch(currentElements[childCount].children[i].selection) {
435
+ case 'none':
436
+ noneFound = true;
437
+ break;
438
+ case 'full':
439
+ fullFound = true;
440
+ break;
441
+ case 'partial':
442
+ partialFound = true;
443
+ break;
444
+ }
445
+ }
446
+
447
+ if (partialFound || (fullFound && noneFound)) {
448
+ // found at least one 'partial' selection in the children, or both 'full' and 'none', so this element is also 'partial' selected
449
+ currentElements[childCount].selection = 'partial';
450
+ } else if (fullFound && !partialFound && !noneFound) {
451
+ // only found 'full' selected children, so this element is also 'full' selected
452
+ currentElements[childCount].selection = 'full';
453
+ }
454
+ }
455
+
456
+ childCount++;
457
+ });
458
+
459
+ // extra check for collapsed selections at the end of the current element
460
+ if (rangeObject.isCollapsed()
461
+ && currentObject === rangeObject.startContainer
462
+ && rangeObject.startOffset == currentObject.childNodes.length) {
463
+ currentElements[childCount] = new Aloha.Selection.SelectionTree();
464
+ currentElements[childCount].selection = 'collapsed';
465
+ currentElements[childCount].domobj = undefined;
466
+ }
467
+
468
+ return currentElements;
469
+ },
470
+
471
+ /**
472
+ * Get the currently selected range
473
+ * @return {Aloha.Selection.SelectionRange} currently selected range
474
+ * @method
475
+ */
476
+ getRangeObject: function() {
477
+ return this.rangeObject;
478
+ },
479
+
480
+ /**
481
+ * method finds out, if a node is within a certain markup or not
482
+ * @param rangeObj Aloha rangeObject
483
+ * @param startOrEnd boolean; defines, if start or endContainer should be used: false for start, true for end
484
+ * @param markupObject jQuery object of the markup to look for
485
+ * @param tagComparator method, which is used to compare the dom object and the jQuery markup object. the method must accept 2 parameters, the first is the domobj, the second is the jquery object. if no method is specified, the method this.standardTextLevelSemanticsComparator is used
486
+ * @param limitObject dom object which limits the search are within the dom. normally this will be the active Editable
487
+ * @return true, if the markup is effective on the range objects start or end node
488
+ * @hide
489
+ */
490
+ isRangeObjectWithinMarkup: function(rangeObject, startOrEnd, markupObject, tagComparator, limitObject) {
491
+ var
492
+ domObj = !startOrEnd?rangeObject.startContainer:rangeObject.endContainer,
493
+ that = this,
494
+ parents = jQuery(domObj).parents(),
495
+ returnVal = false,
496
+ i = -1;
497
+
498
+ // check if a comparison method was passed as parameter ...
499
+ if (typeof tagComparator !== 'undefined' && typeof tagComparator !== 'function') {
500
+ Aloha.Log.error(this,'parameter tagComparator is not a function');
501
+ }
502
+ // ... if not use this as standard tag comparison method
503
+ if (typeof tagComparator === 'undefined') {
504
+ tagComparator = function(domobj, markupObject) {
505
+ return that.standardTextLevelSemanticsComparator(domobj, markupObject); // TODO should actually be this.getStandardTagComparator(markupObject)
506
+ };
507
+ }
508
+
509
+ if (parents.length > 0) {
510
+ parents.each(function() {
511
+ // the limit object was reached (normally the Editable Element)
512
+ if (this === limitObject) {
513
+ Aloha.Log.debug(that,'reached limit dom obj');
514
+ return false; // break() of jQuery .each(); THIS IS NOT THE FUNCTION RETURN VALUE
515
+ }
516
+ if (tagComparator(this, markupObject)) {
517
+ if (returnVal === false) {
518
+ returnVal = [];
519
+ }
520
+ Aloha.Log.debug(that,'reached object equal to markup');
521
+ i++;
522
+ returnVal[i] = this;
523
+ return true; // continue() of jQuery .each(); THIS IS NOT THE FUNCTION RETURN VALUE
524
+ }
525
+ });
526
+ }
527
+ return returnVal;
528
+ },
529
+
530
+ /**
531
+ * standard method, to compare a domobj and a jquery object for sections and grouping content (e.g. p, h1, h2, ul, ....).
532
+ * is always used when no other tag comparator is passed as parameter
533
+ * @param domobj domobject to compare with markup
534
+ * @param markupObject jQuery object of the markup to compare with domobj
535
+ * @return true if objects are equal and false if not
536
+ * @hide
537
+ */
538
+ standardSectionsAndGroupingContentComparator: function(domobj, markupObject) {
539
+ if (domobj.nodeType === 1) {
540
+ if (markupObject[0].tagName && Aloha.Selection.replacingElements[ domobj.tagName.toLowerCase() ] && Aloha.Selection.replacingElements[ domobj.tagName.toLowerCase() ].indexOf(markupObject[0].tagName.toLowerCase()) != -1) {
541
+ return true;
542
+ }
543
+ } else {
544
+ Aloha.Log.debug(this,'only element nodes (nodeType == 1) can be compared');
545
+ }
546
+ return false;
547
+ },
548
+
549
+ /**
550
+ * standard method, to compare a domobj and a jquery object for their tagName (aka span elements, e.g. b, i, sup, span, ...).
551
+ * is always used when no other tag comparator is passed as parameter
552
+ * @param domobj domobject to compare with markup
553
+ * @param markupObject jQuery object of the markup to compare with domobj
554
+ * @return true if objects are equal and false if not
555
+ * @hide
556
+ */
557
+ standardTagNameComparator : function(domobj, markupObject) {
558
+ if (domobj.nodeType === 1) {
559
+ if (domobj.tagName.toLowerCase() != markupObject[0].tagName.toLowerCase()) {
560
+ // Aloha.Log.debug(this, 'tag comparison for <' + domobj.tagName.toLowerCase() + '> and <' + markupObject[0].tagName.toLowerCase() + '> failed because tags are different');
561
+ return false;
562
+ }
563
+ return true;//domobj.attributes.length
564
+ } else {
565
+ Aloha.Log.debug(this,'only element nodes (nodeType == 1) can be compared');
566
+ }
567
+ return false;
568
+ },
569
+
570
+ /**
571
+ * standard method, to compare a domobj and a jquery object for text level semantics (aka span elements, e.g. b, i, sup, span, ...).
572
+ * is always used when no other tag comparator is passed as parameter
573
+ * @param domobj domobject to compare with markup
574
+ * @param markupObject jQuery object of the markup to compare with domobj
575
+ * @return true if objects are equal and false if not
576
+ * @hide
577
+ */
578
+ standardTextLevelSemanticsComparator: function(domobj, markupObject) {
579
+ // only element nodes can be compared
580
+ if (domobj.nodeType === 1) {
581
+ if (domobj.tagName.toLowerCase() != markupObject[0].tagName.toLowerCase()) {
582
+ // Aloha.Log.debug(this, 'tag comparison for <' + domobj.tagName.toLowerCase() + '> and <' + markupObject[0].tagName.toLowerCase() + '> failed because tags are different');
583
+ return false;
584
+ }
585
+ if (!this.standardAttributesComparator(domobj, markupObject)) {
586
+ return false;
587
+ }
588
+ return true;//domobj.attributes.length
589
+ } else {
590
+ Aloha.Log.debug(this,'only element nodes (nodeType == 1) can be compared');
591
+ }
592
+ return false;
593
+ },
594
+
595
+
596
+ /**
597
+ * standard method, to compare attributes of one dom obj and one markup obj (jQuery)
598
+ * @param domobj domobject to compare with markup
599
+ * @param markupObject jQuery object of the markup to compare with domobj
600
+ * @return true if objects are equal and false if not
601
+ * @hide
602
+ */
603
+ standardAttributesComparator: function(domobj, markupObject) {
604
+ var i, attr, classString, classes, classes2, classLength, attrLength, domAttrLength;
605
+
606
+ if (domobj.attributes && domobj.attributes.length && domobj.attributes.length > 0) {
607
+ for (i = 0, domAttrLength = domobj.attributes.length; i < domAttrLength; i++) {
608
+ attr = domobj.attributes[i];
609
+ if (attr.nodeName.toLowerCase() == 'class' && attr.nodeValue.length > 0) {
610
+ classString = attr.nodeValue;
611
+ classes = classString.split(' ');
612
+ }
613
+ }
614
+ }
615
+
616
+ if (markupObject[0].attributes && markupObject[0].attributes.length && markupObject[0].attributes.length > 0) {
617
+ for (i = 0, attrLength = markupObject[0].attributes.length; i < attrLength; i++) {
618
+ attr = markupObject[0].attributes[i];
619
+ if (attr.nodeName.toLowerCase() == 'class' && attr.nodeValue.length > 0) {
620
+ classString = attr.nodeValue;
621
+ classes2 = classString.split(' ');
622
+ }
623
+ }
624
+ }
625
+
626
+ if (classes && !classes2 || classes2 && !classes) {
627
+ Aloha.Log.debug(this, 'tag comparison for <' + domobj.tagName.toLowerCase() + '> failed because one element has classes and the other has not');
628
+ return false;
629
+ }
630
+ if (classes && classes2 && classes.length != classes2.length) {
631
+ Aloha.Log.debug(this, 'tag comparison for <' + domobj.tagName.toLowerCase() + '> failed because of a different amount of classes');
632
+ return false;
633
+ }
634
+ if (classes && classes2 && classes.length === classes2.length && classes.length !== 0) {
635
+ for (i = 0, classLength = classes.length; i < classLength; i++) {
636
+ if (!markupObject.hasClass(classes[ i ])) {
637
+ Aloha.Log.debug(this, 'tag comparison for <' + domobj.tagName.toLowerCase() + '> failed because of different classes');
638
+ return false;
639
+ }
640
+ }
641
+ }
642
+ return true;
643
+ },
644
+
645
+ /**
646
+ * method finds out, if a node is within a certain markup or not
647
+ * @param rangeObj Aloha rangeObject
648
+ * @param markupObject jQuery object of the markup to be applied (e.g. created with obj = jQuery('<b></b>'); )
649
+ * @param tagComparator method, which is used to compare the dom object and the jQuery markup object. the method must accept 2 parameters, the first is the domobj, the second is the jquery object. if no method is specified, the method this.standardTextLevelSemanticsComparator is used
650
+ * @return void; TODO: should return true if the markup applied successfully and false if not
651
+ * @hide
652
+ */
653
+ changeMarkup: function(rangeObject, markupObject, tagComparator) {
654
+ var
655
+ tagName = markupObject[0].tagName.toLowerCase(),
656
+ newCAC, limitObject,
657
+ backupRangeObject,
658
+ relevantMarkupObjectsAtSelectionStart = this.isRangeObjectWithinMarkup(rangeObject, false, markupObject, tagComparator, limitObject),
659
+ relevantMarkupObjectsAtSelectionEnd = this.isRangeObjectWithinMarkup(rangeObject, true, markupObject, tagComparator, limitObject),
660
+ nextSibling, relevantMarkupObjectAfterSelection,
661
+ prevSibling, relevantMarkupObjectBeforeSelection,
662
+ extendedRangeObject;
663
+
664
+ // if the element is a replacing element (like p/h1/h2/h3/h4/h5/h6...), which must not wrap each other
665
+ // use a clone of rangeObject
666
+ if (this.replacingElements[ tagName ]) {
667
+ // backup rangeObject for later selection;
668
+ backupRangeObject = rangeObject;
669
+
670
+ // create a new range object to not modify the orginal
671
+ rangeObject = new this.SelectionRange(rangeObject);
672
+
673
+ // either select the active Editable as new commonAncestorContainer (CAC) or use the body
674
+ if (Aloha.activeEditable) {
675
+ newCAC= Aloha.activeEditable.obj.get(0);
676
+ } else {
677
+ newCAC = jQuery('body');
678
+ }
679
+ // update rangeObject by setting the newCAC and automatically recalculating the selectionTree
680
+ rangeObject.update(newCAC);
681
+
682
+ // store the information, that the markupObject can be replaced (not must be!!) inside the jQuery markup object
683
+ markupObject.isReplacingElement = true;
684
+ }
685
+ // if the element is NOT a replacing element, then something needs to be selected, otherwise it can not be wrapped
686
+ // therefor the method can return false, if nothing is selected ( = rangeObject is collapsed)
687
+ else {
688
+ if (rangeObject.isCollapsed()) {
689
+ Aloha.Log.debug(this, 'early returning from applying markup because nothing is currently selected');
690
+ return false;
691
+ }
692
+ }
693
+
694
+ // is Start/End DOM Obj inside the markup to change
695
+ if (Aloha.activeEditable) {
696
+ limitObject = Aloha.activeEditable.obj[0];
697
+ } else {
698
+ limitObject = jQuery('body');
699
+ }
700
+
701
+ if (!markupObject.isReplacingElement && rangeObject.startOffset === 0) { // don't care about replacers, because they never extend
702
+ if (prevSibling = this.getTextNodeSibling(false, rangeObject.commonAncestorContainer.parentNode, rangeObject.startContainer)) {
703
+ relevantMarkupObjectBeforeSelection = this.isRangeObjectWithinMarkup({startContainer : prevSibling, startOffset : 0}, false, markupObject, tagComparator, limitObject);
704
+ }
705
+ }
706
+ if (!markupObject.isReplacingElement && (rangeObject.endOffset === rangeObject.endContainer.length)) { // don't care about replacers, because they never extend
707
+ if (nextSibling = this.getTextNodeSibling(true, rangeObject.commonAncestorContainer.parentNode, rangeObject.endContainer)) {
708
+ relevantMarkupObjectAfterSelection = this.isRangeObjectWithinMarkup({startContainer: nextSibling, startOffset: 0}, false, markupObject, tagComparator, limitObject);
709
+ }
710
+ }
711
+
712
+ // decide what to do (expand or reduce markup)
713
+ // Alternative A: from markup to no-markup: markup will be removed in selection;
714
+ // reapplied from original markup start to selection start
715
+ if (!markupObject.isReplacingElement && (relevantMarkupObjectsAtSelectionStart && !relevantMarkupObjectsAtSelectionEnd)) {
716
+ Aloha.Log.info(this, 'markup 2 non-markup');
717
+ this.prepareForRemoval(rangeObject.getSelectionTree(), markupObject, tagComparator);
718
+ jQuery(relevantMarkupObjectsAtSelectionStart).addClass('preparedForRemoval');
719
+ this.insertCroppedMarkups(relevantMarkupObjectsAtSelectionStart, rangeObject, false, tagComparator);
720
+ }
721
+
722
+ // Alternative B: from markup to markup:
723
+ // remove selected markup (=split existing markup if single, shrink if two different)
724
+ else if (!markupObject.isReplacingElement && relevantMarkupObjectsAtSelectionStart && relevantMarkupObjectsAtSelectionEnd) {
725
+ Aloha.Log.info(this, 'markup 2 markup');
726
+ this.prepareForRemoval(rangeObject.getSelectionTree(), markupObject, tagComparator);
727
+ this.splitRelevantMarkupObject(relevantMarkupObjectsAtSelectionStart, relevantMarkupObjectsAtSelectionEnd, rangeObject, tagComparator);
728
+ }
729
+
730
+ // Alternative C: from no-markup to markup OR with next2markup:
731
+ // new markup is wrapped from selection start to end of originalmarkup, original is remove afterwards
732
+ else if (!markupObject.isReplacingElement && ((!relevantMarkupObjectsAtSelectionStart && relevantMarkupObjectsAtSelectionEnd) || relevantMarkupObjectAfterSelection || relevantMarkupObjectBeforeSelection )) { //
733
+ Aloha.Log.info(this, 'non-markup 2 markup OR with next2markup');
734
+ // move end of rangeObject to end of relevant markups
735
+ if (relevantMarkupObjectBeforeSelection && relevantMarkupObjectAfterSelection) {
736
+ extendedRangeObject = new Aloha.Selection.SelectionRange(rangeObject);
737
+ extendedRangeObject.startContainer = jQuery(relevantMarkupObjectBeforeSelection[ relevantMarkupObjectBeforeSelection.length-1 ]).textNodes()[0];
738
+ extendedRangeObject.startOffset = 0;
739
+ extendedRangeObject.endContainer = jQuery(relevantMarkupObjectAfterSelection[ relevantMarkupObjectAfterSelection.length-1 ]).textNodes().last()[0];
740
+ extendedRangeObject.endOffset = extendedRangeObject.endContainer.length;
741
+ extendedRangeObject.update();
742
+ this.applyMarkup(extendedRangeObject.getSelectionTree(), rangeObject, markupObject, tagComparator);
743
+ Aloha.Log.info(this, 'double extending previous markup(previous and after selection), actually wrapping it ...');
744
+
745
+ } else if (relevantMarkupObjectBeforeSelection && !relevantMarkupObjectAfterSelection && !relevantMarkupObjectsAtSelectionEnd) {
746
+ this.extendExistingMarkupWithSelection(relevantMarkupObjectBeforeSelection, rangeObject, false, tagComparator);
747
+ Aloha.Log.info(this, 'extending previous markup');
748
+
749
+ } else if (relevantMarkupObjectBeforeSelection && !relevantMarkupObjectAfterSelection && relevantMarkupObjectsAtSelectionEnd) {
750
+ extendedRangeObject = new Aloha.Selection.SelectionRange(rangeObject);
751
+ extendedRangeObject.startContainer = jQuery(relevantMarkupObjectBeforeSelection[ relevantMarkupObjectBeforeSelection.length-1 ]).textNodes()[0];
752
+ extendedRangeObject.startOffset = 0;
753
+ extendedRangeObject.endContainer = jQuery(relevantMarkupObjectsAtSelectionEnd[ relevantMarkupObjectsAtSelectionEnd.length-1 ]).textNodes().last()[0];
754
+ extendedRangeObject.endOffset = extendedRangeObject.endContainer.length;
755
+ extendedRangeObject.update();
756
+ this.applyMarkup(extendedRangeObject.getSelectionTree(), rangeObject, markupObject, tagComparator);
757
+ Aloha.Log.info(this, 'double extending previous markup(previous and relevant at the end), actually wrapping it ...');
758
+
759
+ } else if (!relevantMarkupObjectBeforeSelection && relevantMarkupObjectAfterSelection) {
760
+ this.extendExistingMarkupWithSelection(relevantMarkupObjectAfterSelection, rangeObject, true, tagComparator);
761
+ Aloha.Log.info(this, 'extending following markup backwards');
762
+
763
+ } else {
764
+ this.extendExistingMarkupWithSelection(relevantMarkupObjectsAtSelectionEnd, rangeObject, true, tagComparator);
765
+ }
766
+ }
767
+
768
+ // Alternative D: no-markup to no-markup: easy
769
+ else if (markupObject.isReplacingElement || (!relevantMarkupObjectsAtSelectionStart && !relevantMarkupObjectsAtSelectionEnd && !relevantMarkupObjectBeforeSelection && !relevantMarkupObjectAfterSelection)) {
770
+ Aloha.Log.info(this, 'non-markup 2 non-markup');
771
+ this.applyMarkup(rangeObject.getSelectionTree(), rangeObject, markupObject, tagComparator, {setRangeObject2NewMarkup: true});
772
+ }
773
+
774
+ // remove all marked items
775
+ jQuery('.preparedForRemoval').zap();
776
+
777
+ // recalculate cac and selectionTree
778
+ rangeObject.update();
779
+
780
+ // update selection
781
+ if (markupObject.isReplacingElement) {
782
+ // this.setSelection(backupRangeObject, true);
783
+ backupRangeObject.select();
784
+ } else {
785
+ // this.setSelection(rangeObject);
786
+ rangeObject.select();
787
+ }
788
+ },
789
+
790
+ /**
791
+ * method compares a JS array of domobjects with a range object and decides, if the rangeObject spans the whole markup objects. method is used to decide if a markup2markup selection can be completely remove or if it must be splitted into 2 separate markups
792
+ * @param relevantMarkupObjectsAtSelectionStart JS Array of dom objects, which are parents to the rangeObject.startContainer
793
+ * @param relevantMarkupObjectsAtSelectionEnd JS Array of dom objects, which are parents to the rangeObject.endContainer
794
+ * @param rangeObj Aloha rangeObject
795
+ * @return true, if rangeObjects and markup objects are identical, false otherwise
796
+ * @hide
797
+ */
798
+ areMarkupObjectsAsLongAsRangeObject: function(relevantMarkupObjectsAtSelectionStart, relevantMarkupObjectsAtSelectionEnd, rangeObject) {
799
+ var i, el, textNode, relMarkupEnd, relMarkupStart;
800
+
801
+ if (rangeObject.startOffset !== 0) {
802
+ return false;
803
+ }
804
+
805
+ for (i = 0, relMarkupStart = relevantMarkupObjectsAtSelectionStart.length; i < relMarkupStart; i++) {
806
+ el = jQuery(relevantMarkupObjectsAtSelectionStart[i]);
807
+ if (el.textNodes().first()[0] !== rangeObject.startContainer) {
808
+ return false;
809
+ }
810
+ }
811
+
812
+ for (i = 0, relMarkupEnd = relevantMarkupObjectsAtSelectionEnd.length; i < relMarkupEnd; i++) {
813
+ el = jQuery(relevantMarkupObjectsAtSelectionEnd[i]);
814
+ textNode = el.textNodes().last()[0];
815
+ if (textNode !== rangeObject.endContainer || textNode.length != rangeObject.endOffset) {
816
+ return false;
817
+ }
818
+ }
819
+
820
+ return true;
821
+ },
822
+
823
+ /**
824
+ * method used to remove/split markup from a "markup2markup" selection
825
+ * @param relevantMarkupObjectsAtSelectionStart JS Array of dom objects, which are parents to the rangeObject.startContainer
826
+ * @param relevantMarkupObjectsAtSelectionEnd JS Array of dom objects, which are parents to the rangeObject.endContainer
827
+ * @param rangeObj Aloha rangeObject
828
+ * @param tagComparator method, which is used to compare the dom object and the jQuery markup object. the method must accept 2 parameters, the first is the domobj, the second is the jquery object. if no method is specified, the method this.standardTextLevelSemanticsComparator is used
829
+ * @return true (always, since no "false" case is currently known...but might be added)
830
+ * @hide
831
+ */
832
+ splitRelevantMarkupObject: function(relevantMarkupObjectsAtSelectionStart, relevantMarkupObjectsAtSelectionEnd, rangeObject, tagComparator) {
833
+ // mark them to be deleted
834
+ jQuery(relevantMarkupObjectsAtSelectionStart).addClass('preparedForRemoval');
835
+ jQuery(relevantMarkupObjectsAtSelectionEnd).addClass('preparedForRemoval');
836
+
837
+ // check if the rangeObject is identical with the relevantMarkupObjects (in this case the markup can simply be removed)
838
+ if (this.areMarkupObjectsAsLongAsRangeObject(relevantMarkupObjectsAtSelectionStart, relevantMarkupObjectsAtSelectionEnd, rangeObject)) {
839
+ return true;
840
+ }
841
+
842
+ // find intersection (this can always only be one dom element (namely the highest) because all others will be removed
843
+ var relevantMarkupObjectAtSelectionStartAndEnd = this.intersectRelevantMarkupObjects(relevantMarkupObjectsAtSelectionStart, relevantMarkupObjectsAtSelectionEnd);
844
+
845
+ if (relevantMarkupObjectAtSelectionStartAndEnd) {
846
+ this.insertCroppedMarkups([relevantMarkupObjectAtSelectionStartAndEnd], rangeObject, false, tagComparator);
847
+ this.insertCroppedMarkups([relevantMarkupObjectAtSelectionStartAndEnd], rangeObject, true, tagComparator);
848
+ } else {
849
+ this.insertCroppedMarkups(relevantMarkupObjectsAtSelectionStart, rangeObject, false, tagComparator);
850
+ this.insertCroppedMarkups(relevantMarkupObjectsAtSelectionEnd, rangeObject, true, tagComparator);
851
+ }
852
+ return true;
853
+ },
854
+
855
+ /**
856
+ * method takes two arrays of bottom up dom objects, compares them and returns either the object closest to the root or false
857
+ * @param relevantMarkupObjectsAtSelectionStart JS Array of dom objects
858
+ * @param relevantMarkupObjectsAtSelectionEnd JS Array of dom objects
859
+ * @return dom object closest to the root or false
860
+ * @hide
861
+ */
862
+ intersectRelevantMarkupObjects: function(relevantMarkupObjectsAtSelectionStart, relevantMarkupObjectsAtSelectionEnd) {
863
+ var intersection = false, i, elStart, j, elEnd, relMarkupStart, relMarkupEnd;
864
+ if (!relevantMarkupObjectsAtSelectionStart || !relevantMarkupObjectsAtSelectionEnd) {
865
+ return intersection; // we can only intersect, if we have to arrays!
866
+ }
867
+ relMarkupStart = relevantMarkupObjectsAtSelectionStart.length;
868
+ relMarkupEnd = relevantMarkupObjectsAtSelectionEnd.length;
869
+ for (i = 0; i < relMarkupStart; i++) {
870
+ elStart = relevantMarkupObjectsAtSelectionStart[i];
871
+ for (j = 0; j < relMarkupEnd; j++) {
872
+ elEnd = relevantMarkupObjectsAtSelectionEnd[j];
873
+ if (elStart === elEnd) {
874
+ intersection = elStart;
875
+ }
876
+ }
877
+ }
878
+ return intersection;
879
+ },
880
+
881
+ /**
882
+ * method used to add markup to a nonmarkup2markup selection
883
+ * @param relevantMarkupObjects JS Array of dom objects effecting either the start or endContainer of a selection (which should be extended)
884
+ * @param rangeObject Aloha rangeObject the markups should be extended to
885
+ * @param startOrEnd boolean; defines, if the existing markups should be extended forwards or backwards (is propably redundant and could be found out by comparing start or end container with the markup array dom objects)
886
+ * @param tagComparator method, which is used to compare the dom object and the jQuery markup object. the method must accept 2 parameters, the first is the domobj, the second is the jquery object. if no method is specified, the method this.standardTextLevelSemanticsComparator is used
887
+ * @return true
888
+ * @hide
889
+ */
890
+ extendExistingMarkupWithSelection: function(relevantMarkupObjects, rangeObject, startOrEnd, tagComparator) {
891
+ var extendMarkupsAtStart, extendMarkupsAtEnd, objects, i, relMarkupLength, el, textnodes, nodeNr;
892
+ if (!startOrEnd) { // = Start
893
+ // start part of rangeObject should be used, therefor existing markups are cropped at the end
894
+ extendMarkupsAtStart = true;
895
+ }
896
+ if (startOrEnd) { // = End
897
+ // end part of rangeObject should be used, therefor existing markups are cropped at start (beginning)
898
+ extendMarkupsAtEnd = true;
899
+ }
900
+ objects = [];
901
+ for( i = 0, relMarkupLength = relevantMarkupObjects.length; i < relMarkupLength; i++){
902
+ objects[i] = new this.SelectionRange();
903
+ el = relevantMarkupObjects[i];
904
+ if (extendMarkupsAtEnd && !extendMarkupsAtStart) {
905
+ objects[i].startContainer = rangeObject.startContainer; // jQuery(el).contents()[0];
906
+ objects[i].startOffset = rangeObject.startOffset;
907
+ textnodes = jQuery(el).textNodes(true);
908
+
909
+ nodeNr = textnodes.length - 1;
910
+ objects[i].endContainer = textnodes[ nodeNr ];
911
+ objects[i].endOffset = textnodes[ nodeNr ].length;
912
+ objects[i].update();
913
+ this.applyMarkup(objects[i].getSelectionTree(), rangeObject, this.getClonedMarkup4Wrapping(el), tagComparator, {setRangeObject2NewMarkup: true});
914
+ }
915
+ if (!extendMarkupsAtEnd && extendMarkupsAtStart) {
916
+ textnodes = jQuery(el).textNodes(true);
917
+ objects[i].startContainer = textnodes[0]; // jQuery(el).contents()[0];
918
+ objects[i].startOffset = 0;
919
+ objects[i].endContainer = rangeObject.endContainer;
920
+ objects[i].endOffset = rangeObject.endOffset;
921
+ objects[i].update();
922
+ this.applyMarkup(objects[i].getSelectionTree(), rangeObject, this.getClonedMarkup4Wrapping(el), tagComparator, {setRangeObject2NewMarkup: true});
923
+ }
924
+ }
925
+ return true;
926
+ },
927
+
928
+ /**
929
+ * method creates an empty markup jQuery object from a dom object passed as paramter
930
+ * @param domobj domobject to be cloned, cleaned and emptied
931
+ * @param tagComparator method, which is used to compare the dom object and the jQuery markup object. the method must accept 2 parameters, the first is the domobj, the second is the jquery object. if no method is specified, the method this.standardTextLevelSemanticsComparator is used
932
+ * @return jQuery wrapper object to be passed to e.g. this.applyMarkup(...)
933
+ * @hide
934
+ */
935
+ getClonedMarkup4Wrapping: function(domobj) {
936
+ var wrapper = jQuery(domobj).clone().removeClass('preparedForRemoval').empty();
937
+ if (wrapper.attr('class').length === 0) {
938
+ wrapper.removeAttr('class');
939
+ }
940
+ return wrapper;
941
+ },
942
+
943
+ /**
944
+ * method used to subtract the range object from existing markup. in other words: certain markup is removed from the selections defined by the rangeObject
945
+ * @param relevantMarkupObjects JS Array of dom objects effecting either the start or endContainer of a selection (which should be extended)
946
+ * @param rangeObject Aloha rangeObject the markups should be removed from
947
+ * @param startOrEnd boolean; defines, if the existing markups should be reduced at the beginning of the tag or at the end (is propably redundant and could be found out by comparing start or end container with the markup array dom objects)
948
+ * @param tagComparator method, which is used to compare the dom object and the jQuery markup object. the method must accept 2 parameters, the first is the domobj, the second is the jquery object. if no method is specified, the method this.standardTextLevelSemanticsComparator is used
949
+ * @return true
950
+ * @hide
951
+ */
952
+ insertCroppedMarkups: function(relevantMarkupObjects, rangeObject, startOrEnd, tagComparator) {
953
+ var cropMarkupsAtEnd,cropMarkupsAtStart,textnodes,objects,i,el,textNodes;
954
+ if (!startOrEnd) { // = Start
955
+ // start part of rangeObject should be used, therefor existing markups are cropped at the end
956
+ cropMarkupsAtEnd = true;
957
+ } else { // = End
958
+ // end part of rangeObject should be used, therefor existing markups are cropped at start (beginning)
959
+ cropMarkupsAtStart = true;
960
+ }
961
+ objects = [];
962
+ for( i = 0; i<relevantMarkupObjects.length; i++){
963
+ objects[i] = new this.SelectionRange();
964
+ el = relevantMarkupObjects[i];
965
+ if (cropMarkupsAtEnd && !cropMarkupsAtStart) {
966
+ textNodes = jQuery(el).textNodes(true);
967
+ objects[i].startContainer = textNodes[0];
968
+ objects[i].startOffset = 0;
969
+ // if the existing markup startContainer & startOffset are equal to the rangeObject startContainer and startOffset,
970
+ // then markupobject does not have to be added again, because it would have no content (zero-length)
971
+ if (objects[i].startContainer === rangeObject.startContainer && objects[i].startOffset === rangeObject.startOffset) {
972
+ continue;
973
+ }
974
+ if (rangeObject.startOffset === 0) {
975
+ objects[i].endContainer = this.getTextNodeSibling(false, el, rangeObject.startContainer);
976
+ objects[i].endOffset = objects[i].endContainer.length;
977
+ } else {
978
+ objects[i].endContainer = rangeObject.startContainer;
979
+ objects[i].endOffset = rangeObject.startOffset;
980
+ }
981
+
982
+ objects[i].update();
983
+
984
+ this.applyMarkup(objects[i].getSelectionTree(), rangeObject, this.getClonedMarkup4Wrapping(el), tagComparator, {setRangeObject2NextSibling: true});
985
+ }
986
+
987
+ if (!cropMarkupsAtEnd && cropMarkupsAtStart) {
988
+ objects[i].startContainer = rangeObject.endContainer; // jQuery(el).contents()[0];
989
+ objects[i].startOffset = rangeObject.endOffset;
990
+ textnodes = jQuery(el).textNodes(true);
991
+ objects[i].endContainer = textnodes[ textnodes.length-1 ];
992
+ objects[i].endOffset = textnodes[ textnodes.length-1 ].length;
993
+ objects[i].update();
994
+ this.applyMarkup(objects[i].getSelectionTree(), rangeObject, this.getClonedMarkup4Wrapping(el), tagComparator, {setRangeObject2PreviousSibling: true});
995
+ }
996
+ }
997
+ return true;
998
+ },
999
+
1000
+ /**
1001
+ * apply a certain markup to the current selection
1002
+ * @param markupObject jQuery object of the markup to be applied (e.g. created with obj = jQuery('<b></b>'); )
1003
+ * @return void
1004
+ * @hide
1005
+ */
1006
+ changeMarkupOnSelection: function(markupObject) {
1007
+ // change the markup
1008
+ this.changeMarkup(this.getRangeObject(), markupObject, this.getStandardTagComparator(markupObject));
1009
+
1010
+ // merge text nodes
1011
+
1012
+ GENTICS.Utils.Dom.doCleanup({'merge' : true}, this.rangeObject);
1013
+ // update the range and select it
1014
+ this.rangeObject.update();
1015
+ this.rangeObject.select();
1016
+ },
1017
+
1018
+ /**
1019
+ * apply a certain markup to the selection Tree
1020
+ * @param selectionTree SelectionTree Object markup should be applied to
1021
+ * @param rangeObject Aloha rangeObject which will be modified to reflect the dom changes, after the markup was applied (only if activated via options)
1022
+ * @param markupObject jQuery object of the markup to be applied (e.g. created with obj = jQuery('<b></b>'); )
1023
+ * @param tagComparator method, which is used to compare the dom object and the jQuery markup object. the method must accept 2 parameters, the first is the domobj, the second is the jquery object. if no method is specified, the method this.standardTextLevelSemanticsComparator is used
1024
+ * @param options JS object, with the following boolean properties: setRangeObject2NewMarkup, setRangeObject2NextSibling, setRangeObject2PreviousSibling
1025
+ * @return void
1026
+ * @hide
1027
+ */
1028
+ applyMarkup: function(selectionTree, rangeObject, markupObject, tagComparator, options) {
1029
+ var optimizedSelectionTree, i, el, breakpoint;
1030
+
1031
+ options = options ? options : {};
1032
+ // first same tags from within fully selected nodes for removal
1033
+ this.prepareForRemoval(selectionTree, markupObject, tagComparator);
1034
+
1035
+ // first let's optimize the selection Tree in useful groups which can be wrapped together
1036
+ optimizedSelectionTree = this.optimizeSelectionTree4Markup(selectionTree, markupObject, tagComparator);
1037
+ breakpoint = true;
1038
+
1039
+ // now iterate over grouped elements and either recursively dive into object or wrap it as a whole
1040
+ for ( i = 0; i < optimizedSelectionTree.length; i++) {
1041
+ el = optimizedSelectionTree[i];
1042
+ if (el.wrappable) {
1043
+ this.wrapMarkupAroundSelectionTree(el.elements, rangeObject, markupObject, tagComparator, options);
1044
+ } else {
1045
+ Aloha.Log.debug(this,'dive further into non-wrappable object');
1046
+ this.applyMarkup(el.element.children, rangeObject, markupObject, tagComparator, options);
1047
+ }
1048
+ }
1049
+ },
1050
+
1051
+ /**
1052
+ * returns the type of the given markup (trying to match HTML5)
1053
+ * @param markupObject jQuery object of the markup to be applied (e.g. created with obj = jQuery('<b></b>'); )
1054
+ * @return string name of the markup type
1055
+ * @hide
1056
+ */
1057
+ getMarkupType: function(markupObject) {
1058
+ var nn = jQuery(markupObject)[0].nodeName.toLowerCase();
1059
+ if (markupObject.outerHtml) {
1060
+ Aloha.Log.debug(this, 'Node name detected: ' + nn + ' for: ' + markupObject.outerHtml());
1061
+ }
1062
+ if (nn == '#text') {return 'textNode';}
1063
+ if (this.replacingElements[ nn ]) {return 'sectionOrGroupingContent';}
1064
+ if (this.tagHierarchy [ nn ]) {return 'textLevelSemantics';}
1065
+ Aloha.Log.warn(this, 'unknown markup passed to this.getMarkupType(...): ' + markupObject.outerHtml());
1066
+ },
1067
+
1068
+ /**
1069
+ * returns the standard tag comparator for the given markup object
1070
+ * @param markupObject jQuery object of the markup to be applied (e.g. created with obj = jQuery('<b></b>'); )
1071
+ * @return function tagComparator method, which is used to compare the dom object and the jQuery markup object. the method must accept 2 parameters, the first is the domobj, the second is the jquery object. if no method is specified, the method this.standardTextLevelSemanticsComparator is used
1072
+ * @hide
1073
+ */
1074
+ getStandardTagComparator: function(markupObject) {
1075
+ var that = this, result;
1076
+ switch(this.getMarkupType(markupObject)) {
1077
+ case 'textNode':
1078
+ result = function(p1, p2) {
1079
+ return false;
1080
+ };
1081
+ break;
1082
+
1083
+ case 'sectionOrGroupingContent':
1084
+ result = function(domobj, markupObject) {
1085
+ return that.standardSectionsAndGroupingContentComparator(domobj, markupObject);
1086
+ };
1087
+ break;
1088
+
1089
+ case 'textLevelSemantics':
1090
+ /* falls through */
1091
+ default:
1092
+ result = function(domobj, markupObject) {
1093
+ return that.standardTextLevelSemanticsComparator(domobj, markupObject);
1094
+ };
1095
+ break;
1096
+ }
1097
+ return result;
1098
+ },
1099
+
1100
+ /**
1101
+ * searches for fully selected equal markup tags
1102
+ * @param selectionTree SelectionTree Object markup should be applied to
1103
+ * @param markupObject jQuery object of the markup to be applied (e.g. created with obj = jQuery('<b></b>'); )
1104
+ * @param tagComparator method, which is used to compare the dom object and the jQuery markup object. the method must accept 2 parameters, the first is the domobj, the second is the jquery object. if no method is specified, the method this.standardTextLevelSemanticsComparator is used
1105
+ * @return void
1106
+ * @hide
1107
+ */
1108
+ prepareForRemoval: function(selectionTree, markupObject, tagComparator) {
1109
+ var that = this, i, el;
1110
+
1111
+ // check if a comparison method was passed as parameter ...
1112
+ if (typeof tagComparator !== 'undefined' && typeof tagComparator !== 'function') {
1113
+ Aloha.Log.error(this,'parameter tagComparator is not a function');
1114
+ }
1115
+ // ... if not use this as standard tag comparison method
1116
+ if (typeof tagComparator === 'undefined') {
1117
+ tagComparator = this.getStandardTagComparator(markupObject);
1118
+ }
1119
+ for ( i = 0; i<selectionTree.length; i++) {
1120
+ el = selectionTree[i];
1121
+ if (el.domobj && (el.selection == 'full' || (el.selection == 'partial' && markupObject.isReplacingElement))) {
1122
+ // mark for removal
1123
+ if (el.domobj.nodeType === 1 && tagComparator(el.domobj, markupObject)) {
1124
+ Aloha.Log.debug(this, 'Marking for removal: ' + el.domobj.nodeName);
1125
+ jQuery(el.domobj).addClass('preparedForRemoval');
1126
+ }
1127
+ }
1128
+ if (el.selection != 'none' && el.children.length > 0) {
1129
+ this.prepareForRemoval(el.children, markupObject, tagComparator);
1130
+ }
1131
+
1132
+ }
1133
+ },
1134
+
1135
+ /**
1136
+ * searches for fully selected equal markup tags
1137
+ * @param selectionTree SelectionTree Object markup should be applied to
1138
+ * @param rangeObject Aloha rangeObject the markup will be applied to
1139
+ * @param markupObject jQuery object of the markup to be applied (e.g. created with obj = jQuery('<b></b>'); )
1140
+ * @param tagComparator method, which is used to compare the dom object and the jQuery markup object. the method must accept 2 parameters, the first is the domobj, the second is the jquery object. if no method is specified, the method this.standardTextLevelSemanticsComparator is used
1141
+ * @param options JS object, with the following boolean properties: setRangeObject2NewMarkup, setRangeObject2NextSibling, setRangeObject2PreviousSibling
1142
+ * @return void
1143
+ * @hide
1144
+ */
1145
+ wrapMarkupAroundSelectionTree: function(selectionTree, rangeObject, markupObject, tagComparator, options) {
1146
+ // first let's find out if theoretically the whole selection can be wrapped with one tag and save it for later use
1147
+ var objects2wrap = [], // // this will be used later to collect objects
1148
+ j = -1, // internal counter,
1149
+ breakpoint = true,
1150
+ preText = '',
1151
+ postText = '',
1152
+ prevOrNext,
1153
+ textNode2Start,
1154
+ textnodes,
1155
+ newMarkup,
1156
+ i, el, middleText;
1157
+
1158
+
1159
+
1160
+ Aloha.Log.debug(this,'The formatting <' + markupObject[0].tagName + '> will be wrapped around the selection');
1161
+
1162
+ // now lets iterate over the elements
1163
+ for (i = 0; i < selectionTree.length; i++) {
1164
+ el = selectionTree[i];
1165
+
1166
+ // check if markup is allowed inside the elements parent
1167
+ if (el.domobj && !this.canTag1WrapTag2(el.domobj.parentNode.tagName.toLowerCase(), markupObject[0].tagName.toLowerCase())) {
1168
+ Aloha.Log.info(this,'Skipping the wrapping of <' + markupObject[0].tagName.toLowerCase() + '> because this tag is not allowed inside <' + el.domobj.parentNode.tagName.toLowerCase() + '>');
1169
+ continue;
1170
+ }
1171
+
1172
+ // skip empty text nodes
1173
+ if (el.domobj && el.domobj.nodeType === 3 && jQuery.trim(el.domobj.nodeValue).length === 0) {
1174
+ continue;
1175
+ }
1176
+
1177
+ // partial element, can either be a textnode and therefore be wrapped (at least partially)
1178
+ // or can be a nodeType == 1 (tag) which must be dived into
1179
+ if (el.domobj && el.selection == 'partial' && !markupObject.isReplacingElement) {
1180
+ if (el.startOffset !== undefined && el.endOffset === undefined) {
1181
+ j++;
1182
+ preText += el.domobj.data.substr(0,el.startOffset);
1183
+ el.domobj.data = el.domobj.data.substr(el.startOffset, el.domobj.data.length-el.startOffset);
1184
+ objects2wrap[j] = el.domobj;
1185
+ } else if (el.endOffset !== undefined && el.startOffset === undefined) {
1186
+ j++;
1187
+ postText += el.domobj.data.substr(el.endOffset, el.domobj.data.length-el.endOffset);
1188
+ el.domobj.data = el.domobj.data.substr(0, el.endOffset);
1189
+ objects2wrap[j] = el.domobj;
1190
+ } else if (el.endOffset !== undefined && el.startOffset !== undefined) {
1191
+ if (el.startOffset == el.endOffset) { // do not wrap empty selections
1192
+ Aloha.Log.debug(this, 'skipping empty selection');
1193
+ continue;
1194
+ }
1195
+ j++;
1196
+ preText += el.domobj.data.substr(0,el.startOffset);
1197
+ middleText = el.domobj.data.substr(el.startOffset,el.endOffset-el.startOffset);
1198
+ postText += el.domobj.data.substr(el.endOffset, el.domobj.data.length-el.endOffset);
1199
+ el.domobj.data = middleText;
1200
+ objects2wrap[j] = el.domobj;
1201
+ } else {
1202
+ // a partially selected item without selectionStart/EndOffset is a nodeType 1 Element on the way to the textnode
1203
+ Aloha.Log.debug(this, 'diving into object');
1204
+ this.applyMarkup(el.children, rangeObject, markupObject, tagComparator, options);
1205
+ }
1206
+ }
1207
+ // fully selected dom elements can be wrapped as whole element
1208
+ if (el.domobj && (el.selection == 'full' || (el.selection == 'partial' && markupObject.isReplacingElement))) {
1209
+ j++;
1210
+ objects2wrap[j] = el.domobj;
1211
+ }
1212
+ }
1213
+
1214
+ if (objects2wrap.length > 0) {
1215
+ // wrap collected DOM object with markupObject
1216
+ objects2wrap = jQuery(objects2wrap);
1217
+
1218
+ // make a fix for text nodes in <li>'s in ie
1219
+ jQuery.each(objects2wrap, function(index, element) {
1220
+ if (jQuery.browser.msie && element.nodeType == 3
1221
+ && !element.nextSibling && !element.previousSibling
1222
+ && element.parentNode
1223
+ && element.parentNode.nodeName.toLowerCase() == 'li') {
1224
+ element.data = jQuery.trim(element.data);
1225
+ }
1226
+ });
1227
+
1228
+ newMarkup = objects2wrap.wrapAll(markupObject).parent();
1229
+ newMarkup.before(preText).after(postText);
1230
+
1231
+ if (options.setRangeObject2NewMarkup) { // this is used, when markup is added to normal/normal Text
1232
+ textnodes = objects2wrap.textNodes();
1233
+
1234
+ if (textnodes.index(rangeObject.startContainer) != -1) {
1235
+ rangeObject.startOffset = 0;
1236
+ }
1237
+ if (textnodes.index(rangeObject.endContainer) != -1) {
1238
+ rangeObject.endOffset = rangeObject.endContainer.length;
1239
+ }
1240
+ breakpoint=true;
1241
+ }
1242
+ if (options.setRangeObject2NextSibling){
1243
+ prevOrNext = true;
1244
+ textNode2Start = newMarkup.textNodes(true).last()[0];
1245
+ if (objects2wrap.index(rangeObject.startContainer) != -1) {
1246
+ rangeObject.startContainer = this.getTextNodeSibling(prevOrNext, newMarkup.parent(), textNode2Start);
1247
+ rangeObject.startOffset = 0;
1248
+ }
1249
+ if (objects2wrap.index(rangeObject.endContainer) != -1) {
1250
+ rangeObject.endContainer = this.getTextNodeSibling(prevOrNext, newMarkup.parent(), textNode2Start);
1251
+ rangeObject.endOffset = rangeObject.endOffset - textNode2Start.length;
1252
+ }
1253
+ }
1254
+ if (options.setRangeObject2PreviousSibling){
1255
+ prevOrNext = false;
1256
+ textNode2Start = newMarkup.textNodes(true).first()[0];
1257
+ if (objects2wrap.index(rangeObject.startContainer) != -1) {
1258
+ rangeObject.startContainer = this.getTextNodeSibling(prevOrNext, newMarkup.parent(), textNode2Start);
1259
+ rangeObject.startOffset = 0;
1260
+ }
1261
+ if (objects2wrap.index(rangeObject.endContainer) != -1) {
1262
+ rangeObject.endContainer = this.getTextNodeSibling(prevOrNext, newMarkup.parent(), textNode2Start);
1263
+ rangeObject.endOffset = rangeObject.endContainer.length;
1264
+ }
1265
+ }
1266
+ }
1267
+ },
1268
+
1269
+ /**
1270
+ * takes a text node and return either the next recursive text node sibling or the previous
1271
+ * @param previousOrNext boolean, false for previous, true for next sibling
1272
+ * @param commonAncestorContainer dom object to be used as root for the sibling search
1273
+ * @param currentTextNode dom object of the originating text node
1274
+ * @return dom object of the sibling text node
1275
+ * @hide
1276
+ */
1277
+ getTextNodeSibling: function(previousOrNext, commonAncestorContainer, currentTextNode) {
1278
+ var textNodes = jQuery(commonAncestorContainer).textNodes(true),
1279
+ newIndex, index;
1280
+
1281
+ index = textNodes.index(currentTextNode);
1282
+ if (index == -1) { // currentTextNode was not found
1283
+ return false;
1284
+ }
1285
+ newIndex = index + (!previousOrNext ? -1 : 1);
1286
+ return textNodes[newIndex] ? textNodes[newIndex] : false;
1287
+ },
1288
+
1289
+ /**
1290
+ * takes a selection tree and groups it into markup wrappable selection trees
1291
+ * @param selectionTree rangeObject selection tree
1292
+ * @param markupObject jQuery object of the markup to be applied (e.g. created with obj = jQuery('<b></b>'); )
1293
+ * @return JS array of wrappable selection trees
1294
+ * @hide
1295
+ */
1296
+ optimizeSelectionTree4Markup: function(selectionTree, markupObject, tagComparator) {
1297
+ var groupMap = [],
1298
+ outerGroupIndex = 0,
1299
+ innerGroupIndex = 0,
1300
+ that = this,
1301
+ i,j,
1302
+ endPosition, startPosition;
1303
+
1304
+ if (typeof tagComparator === 'undefined') {
1305
+ tagComparator = function(domobj, markupObject) {
1306
+ return that.standardTextLevelSemanticsComparator(markupObject);
1307
+ };
1308
+ }
1309
+ for( i = 0; i<selectionTree.length; i++) {
1310
+ // we are just interested in selected item, but not in non-selected items
1311
+ if (selectionTree[i].domobj && selectionTree[i].selection != 'none') {
1312
+ if (markupObject.isReplacingElement && tagComparator(markupObject[0], jQuery(selectionTree[i].domobj))) {
1313
+ if (groupMap[outerGroupIndex] !== undefined) {
1314
+ outerGroupIndex++;
1315
+ }
1316
+ groupMap[outerGroupIndex] = {};
1317
+ groupMap[outerGroupIndex].wrappable = true;
1318
+ groupMap[outerGroupIndex].elements = [];
1319
+ groupMap[outerGroupIndex].elements[innerGroupIndex] = selectionTree[i];
1320
+ outerGroupIndex++;
1321
+
1322
+ } else
1323
+ // now check, if the children of our item could be wrapped all together by the markup object
1324
+ if (this.canMarkupBeApplied2ElementAsWhole([ selectionTree[i] ], markupObject)) {
1325
+ // if yes, add it to the current group
1326
+ if (groupMap[outerGroupIndex] === undefined) {
1327
+ groupMap[outerGroupIndex] = {};
1328
+ groupMap[outerGroupIndex].wrappable = true;
1329
+ groupMap[outerGroupIndex].elements = [];
1330
+ }
1331
+ if (markupObject.isReplacingElement) { // && selectionTree[i].domobj.nodeType === 3
1332
+ /* we found the node to wrap for a replacing element. however there might
1333
+ * be siblings which should be included as well
1334
+ * although they are actually not selected. example:
1335
+ * li
1336
+ * |-textNode ( .selection = 'none')
1337
+ * |-textNode (cursor inside, therefor .selection = 'partial')
1338
+ * |-textNode ( .selection = 'none')
1339
+ *
1340
+ * in this case it would be useful to select the previous and following textNodes as well (they might result from a previous DOM manipulation)
1341
+ * Think about other cases, where the parent is the Editable. In this case we propably only want to select from and until the next <br /> ??
1342
+ * .... many possibilities, here I realize the two described cases
1343
+ */
1344
+
1345
+ // first find start element starting from the current element going backwards until sibling 0
1346
+ startPosition = i;
1347
+ for (j = i-1; j >= 0; j--) {
1348
+ if (this.canMarkupBeApplied2ElementAsWhole([ selectionTree[ j ] ], markupObject) && this.isMarkupAllowedToStealSelectionTreeElement(selectionTree[ j ], markupObject)) {
1349
+ startPosition = j;
1350
+ } else {
1351
+ break;
1352
+ }
1353
+ }
1354
+
1355
+ // now find the end element starting from the current element going forward until the last sibling
1356
+ endPosition = i;
1357
+ for (j = i+1; j < selectionTree.length; j++) {
1358
+ if (this.canMarkupBeApplied2ElementAsWhole([ selectionTree[ j ] ], markupObject) && this.isMarkupAllowedToStealSelectionTreeElement(selectionTree[ j ], markupObject)) {
1359
+ endPosition = j;
1360
+ } else {
1361
+ break;
1362
+ }
1363
+ }
1364
+
1365
+ // now add the elements to the groupMap
1366
+ innerGroupIndex = 0;
1367
+ for (j = startPosition; j <= endPosition; j++) {
1368
+ groupMap[outerGroupIndex].elements[innerGroupIndex] = selectionTree[j];
1369
+ groupMap[outerGroupIndex].elements[innerGroupIndex].selection = 'full';
1370
+ innerGroupIndex++;
1371
+ }
1372
+ innerGroupIndex = 0;
1373
+ } else {
1374
+ // normal text level semantics object, no siblings need to be selected
1375
+ groupMap[outerGroupIndex].elements[innerGroupIndex] = selectionTree[i];
1376
+ innerGroupIndex++;
1377
+ }
1378
+ } else {
1379
+ // if no, isolate it in its own group
1380
+ if (groupMap[outerGroupIndex] !== undefined) {
1381
+ outerGroupIndex++;
1382
+ }
1383
+ groupMap[outerGroupIndex] = {};
1384
+ groupMap[outerGroupIndex].wrappable = false;
1385
+ groupMap[outerGroupIndex].element = selectionTree[i];
1386
+ innerGroupIndex = 0;
1387
+ outerGroupIndex++;
1388
+ }
1389
+ }
1390
+ }
1391
+ return groupMap;
1392
+ },
1393
+
1394
+ /**
1395
+ * very tricky method, which decides, if a certain markup (normally a replacing markup element like p, h1, blockquote)
1396
+ * is allowed to extend the user selection to other dom objects (represented as selectionTreeElement)
1397
+ * to understand the purpose: if the user selection is collapsed inside e.g. some text, which is currently not
1398
+ * wrapped by the markup to be applied, and therefor the markup does not have an equal markup to replace, then the DOM
1399
+ * manipulator has to decide which objects to wrap. real example:
1400
+ * <div>
1401
+ * <h1>headline</h1>
1402
+ * some text blabla bla<br>
1403
+ * more text HERE THE | CURSOR BLINKING and <b>even more bold text</b>
1404
+ * </div>
1405
+ * when the user now wants to apply e.g. a <p> tag, what will be wrapped? it could be useful if the manipulator would actually
1406
+ * wrap everything inside the div except the <h1>. but for this purpose someone has to decide, if the markup is
1407
+ * allowed to wrap certain dom elements in this case the question would be, if the <p> is allowed to wrap
1408
+ * textNodes, <br> and <b> and <h1>. therefore this tricky method should answer the question for those 3 elements
1409
+ * with true, but for for the <h1> it should return false. and since the method does not know this, there is a configuration
1410
+ * for this
1411
+ *
1412
+ * @param selectionTree rangeObject selection tree element (only one, not an array of)
1413
+ * @param markupObject lowercase string of the tag to be verified (e.g. "b")
1414
+ * @return true if the markup is allowed to wrap the selection tree element, false otherwise
1415
+ * @hide
1416
+ */
1417
+ isMarkupAllowedToStealSelectionTreeElement: function(selectionTreeElement, markupObject) {
1418
+ if (!selectionTreeElement.domobj) {
1419
+ return false;
1420
+ }
1421
+ var nodeName = selectionTreeElement.domobj.nodeName.toLowerCase(),
1422
+ markupName;
1423
+
1424
+ nodeName = (nodeName == '#text') ? 'textNode' : nodeName;
1425
+ markupName = markupObject[0].nodeName.toLowerCase();
1426
+ // if nothing is defined for the markup, it's now allowed
1427
+ if (!this.allowedToStealElements[ markupName ]) {
1428
+ return false;
1429
+ }
1430
+ // if something is defined, but the specifig tag is not in the list
1431
+ if (this.allowedToStealElements[ markupName ].indexOf(nodeName) == -1) {
1432
+ return false;
1433
+ }
1434
+ return true;
1435
+ },
1436
+
1437
+ /**
1438
+ * checks if a selection can be completey wrapped by a certain html tags (helper method for this.optimizeSelectionTree4Markup
1439
+ * @param selectionTree rangeObject selection tree
1440
+ * @param markupObject lowercase string of the tag to be verified (e.g. "b")
1441
+ * @return true if selection can be applied as whole, false otherwise
1442
+ * @hide
1443
+ */
1444
+ canMarkupBeApplied2ElementAsWhole: function(selectionTree, markupObject) {
1445
+ var htmlTag, i, el, returnVal;
1446
+
1447
+ if (markupObject.jquery) {
1448
+ htmlTag = markupObject[0].tagName;
1449
+ }
1450
+ if (markupObject.tagName) {
1451
+ htmlTag = markupObject.tagName;
1452
+ }
1453
+
1454
+ returnVal = true;
1455
+ for ( i = 0; i < selectionTree.length; i++) {
1456
+ el = selectionTree[i];
1457
+ if (el.domobj && (el.selection != "none" || markupObject.isReplacingElement)) {
1458
+ // Aloha.Log.debug(this, 'Checking, if <' + htmlTag + '> can be applied to ' + el.domobj.nodeName);
1459
+ if (!this.canTag1WrapTag2(htmlTag, el.domobj.nodeName)) {
1460
+ return false;
1461
+ }
1462
+ if (el.children.length > 0 && !this.canMarkupBeApplied2ElementAsWhole(el.children, markupObject)) {
1463
+ return false;
1464
+ }
1465
+ }
1466
+ }
1467
+ return returnVal;
1468
+ },
1469
+
1470
+ /**
1471
+ * checks if a tag 1 (first parameter) can wrap tag 2 (second parameter).
1472
+ * IMPORTANT: the method does not verify, if there have to be other tags in between
1473
+ * Example: this.canTag1WrapTag2("table", "td") will return true, because the method does not take into account, that there has to be a "tr" in between
1474
+ * @param t1 string: tagname of outer tag to verify, e.g. "b"
1475
+ * @param t2 string: tagname of inner tag to verify, e.g. "b"
1476
+ * @return true if tag 1 can wrap tag 2, false otherwise
1477
+ * @hide
1478
+ */
1479
+ canTag1WrapTag2: function(t1, t2) {
1480
+ t1 = (t1 == '#text')?'textNode':t1.toLowerCase();
1481
+ t2 = (t2 == '#text')?'textNode':t2.toLowerCase();
1482
+ if (!this.tagHierarchy[ t1 ]) {
1483
+ // Aloha.Log.warn(this, t1 + ' is an unknown tag to the method canTag1WrapTag2 (paramter 1). Sadfully allowing the wrapping...');
1484
+ return true;
1485
+ }
1486
+ if (!this.tagHierarchy[ t2 ]) {
1487
+ // Aloha.Log.warn(this, t2 + ' is an unknown tag to the method canTag1WrapTag2 (paramter 2). Sadfully allowing the wrapping...');
1488
+ return true;
1489
+ }
1490
+ var t1Array = this.tagHierarchy[ t1 ],
1491
+ returnVal = (t1Array.indexOf( t2 ) != -1) ? true : false;
1492
+ return returnVal;
1493
+ },
1494
+
1495
+ /**
1496
+ * Check whether it is allowed to insert the given tag at the start of the
1497
+ * current selection. This method will check whether the markup effective for
1498
+ * the start and outside of the editable part (starting with the editable tag
1499
+ * itself) may wrap the given tag.
1500
+ * @param tagName {String} name of the tag which shall be inserted
1501
+ * @return true when it is allowed to insert that tag, false if not
1502
+ * @hide
1503
+ */
1504
+ mayInsertTag: function (tagName) {
1505
+ if (typeof this.rangeObject.unmodifiableMarkupAtStart == 'object') {
1506
+ // iterate over all DOM elements outside of the editable part
1507
+ for (var i = 0; i < this.rangeObject.unmodifiableMarkupAtStart.length; ++i) {
1508
+ // check whether an element may not wrap the given
1509
+ if (!this.canTag1WrapTag2(this.rangeObject.unmodifiableMarkupAtStart[i].nodeName, tagName)) {
1510
+ // found a DOM element which forbids to insert the given tag, we are done
1511
+ return false;
1512
+ }
1513
+ }
1514
+
1515
+ // all of the found DOM elements allow inserting the given tag
1516
+ return true;
1517
+ } else {
1518
+ Aloha.Log.warn(this, 'Unable to determine whether tag ' + tagName + ' may be inserted');
1519
+ return true;
1520
+ }
1521
+ },
1522
+
1523
+ /**
1524
+ * String representation
1525
+ * @return "Aloha.Selection"
1526
+ * @hide
1527
+ */
1528
+ toString: function() {
1529
+ return 'Aloha.Selection';
1530
+ },
1531
+
1532
+ /**
1533
+ * @namespace Aloha.Selection
1534
+ * @class SelectionRange
1535
+ * @extends GENTICS.Utils.RangeObject
1536
+ * Constructor for a range object.
1537
+ * Optionally you can pass in a range object that's properties will be assigned to the new range object.
1538
+ * @param rangeObject A range object thats properties will be assigned to the new range object.
1539
+ * @constructor
1540
+ */
1541
+ SelectionRange: GENTICS.Utils.RangeObject.extend({
1542
+ _constructor: function(rangeObject){
1543
+ this._super(rangeObject);
1544
+ // If a range object was passed in we apply the values to the new range object
1545
+ if (rangeObject) {
1546
+ if (rangeObject.commonAncestorContainer) {
1547
+ this.commonAncestorContainer = rangeObject.commonAncestorContainer;
1548
+ }
1549
+ if (rangeObject.selectionTree) {
1550
+ this.selectionTree = rangeObject.selectionTree;
1551
+ }
1552
+ if (rangeObject.limitObject) {
1553
+ this.limitObject = rangeObject.limitObject;
1554
+ }
1555
+ if (rangeObject.markupEffectiveAtStart) {
1556
+ this.markupEffectiveAtStart = rangeObject.markupEffectiveAtStart;
1557
+ }
1558
+ if (rangeObject.unmodifiableMarkupAtStart) {
1559
+ this.unmodifiableMarkupAtStart = rangeObject.unmodifiableMarkupAtStart;
1560
+ }
1561
+ if (rangeObject.splitObject) {
1562
+ this.splitObject = rangeObject.splitObject;
1563
+ }
1564
+ }
1565
+ },
1566
+
1567
+ /**
1568
+ * DOM object of the common ancestor from startContainer and endContainer
1569
+ * @hide
1570
+ */
1571
+ commonAncestorContainer: undefined,
1572
+
1573
+ /**
1574
+ * The selection tree
1575
+ * @hide
1576
+ */
1577
+ selectionTree: undefined,
1578
+
1579
+ /**
1580
+ * Array of DOM objects effective for the start container and inside the
1581
+ * editable part (inside the limit object). relevant for the button status
1582
+ * @hide
1583
+ */
1584
+ markupEffectiveAtStart: [],
1585
+
1586
+ /**
1587
+ * Array of DOM objects effective for the start container, which lies
1588
+ * outside of the editable portion (starting with the limit object)
1589
+ * @hide
1590
+ */
1591
+ unmodifiableMarkupAtStart: [],
1592
+
1593
+ /**
1594
+ * DOM object being the limit for all markup relevant activities
1595
+ * @hide
1596
+ */
1597
+ limitObject: undefined,
1598
+
1599
+ /**
1600
+ * DOM object being split when enter key gets hit
1601
+ * @hide
1602
+ */
1603
+ splitObject: undefined,
1604
+
1605
+ /**
1606
+ * Sets the visible selection in the Browser based on the range object.
1607
+ * If the selection is collapsed, this will result in a blinking cursor,
1608
+ * otherwise in a text selection.
1609
+ * @method
1610
+ */
1611
+ select: function() {
1612
+ // Call Utils' select()
1613
+ this._super();
1614
+
1615
+ // update the selection
1616
+ Aloha.Selection.updateSelection();
1617
+ },
1618
+
1619
+ /**
1620
+ * Method to update a range object internally
1621
+ * @param commonAncestorContainer (DOM Object); optional Parameter; if set, the parameter
1622
+ * will be used instead of the automatically calculated CAC
1623
+ * @return void
1624
+ * @hide
1625
+ */
1626
+ update: function(commonAncestorContainer) {
1627
+ this.updatelimitObject();
1628
+ this.updateMarkupEffectiveAtStart();
1629
+ this.updateCommonAncestorContainer(commonAncestorContainer);
1630
+
1631
+ // reset the selectiontree (must be recalculated)
1632
+ this.selectionTree = undefined;
1633
+ },
1634
+
1635
+ /**
1636
+ * Get the selection tree for this range
1637
+ * TODO: remove this (was moved to range.js)
1638
+ * @return selection tree
1639
+ * @hide
1640
+ */
1641
+ getSelectionTree: function () {
1642
+ // if not yet calculated, do this now
1643
+ if (!this.selectionTree) {
1644
+ this.selectionTree = Aloha.Selection.getSelectionTree(this);
1645
+ }
1646
+
1647
+ return this.selectionTree;
1648
+ },
1649
+
1650
+ /**
1651
+ * TODO: move this to range.js
1652
+ * Get an array of domobj (in dom tree order) of siblings of the given domobj, which are contained in the selection
1653
+ * @param domobj dom object to start with
1654
+ * @return array of siblings of the given domobj, which are also selected
1655
+ * @hide
1656
+ */
1657
+ getSelectedSiblings: function (domobj) {
1658
+ var selectionTree = this.getSelectionTree();
1659
+
1660
+ return this.recursionGetSelectedSiblings(domobj, selectionTree);
1661
+ },
1662
+
1663
+ /**
1664
+ * TODO: move this to range.js
1665
+ * Recursive method to find the selected siblings of the given domobj (which should be selected as well)
1666
+ * @param domobj dom object for which the selected siblings shall be found
1667
+ * @param selectionTree current level of the selection tree
1668
+ * @return array of selected siblings of dom objects or false if none found
1669
+ * @hide
1670
+ */
1671
+ recursionGetSelectedSiblings: function (domobj, selectionTree) {
1672
+ var selectedSiblings = false,
1673
+ foundObj = false,
1674
+ i;
1675
+
1676
+ for ( i = 0; i < selectionTree.length; ++i) {
1677
+ if (selectionTree[i].domobj === domobj) {
1678
+ foundObj = true;
1679
+ selectedSiblings = [];
1680
+ } else if (!foundObj && selectionTree[i].children) {
1681
+ // do the recursion
1682
+ selectedSiblings = this.recursionGetSelectedSiblings(domobj, selectionTree[i].children);
1683
+ if (selectedSiblings !== false) {
1684
+ break;
1685
+ }
1686
+ } else if (foundObj && selectionTree[i].domobj && selectionTree[i].selection != 'collapsed' && selectionTree[i].selection != 'none') {
1687
+ selectedSiblings.push(selectionTree[i].domobj);
1688
+ } else if (foundObj && selectionTree[i].selection == 'none') {
1689
+ break;
1690
+ }
1691
+ }
1692
+
1693
+ return selectedSiblings;
1694
+ },
1695
+
1696
+ /**
1697
+ * TODO: move this to range.js
1698
+ * Method updates member var markupEffectiveAtStart and splitObject, which is relevant primarily for button status and enter key behaviour
1699
+ * @return void
1700
+ * @hide
1701
+ */
1702
+ updateMarkupEffectiveAtStart: function() {
1703
+ // reset the current markup
1704
+ this.markupEffectiveAtStart = [];
1705
+ this.unmodifiableMarkupAtStart = [];
1706
+
1707
+ var
1708
+ parents = this.getStartContainerParents(),
1709
+ limitFound = false,
1710
+ splitObjectWasSet,
1711
+ i, el;
1712
+
1713
+ for ( i = 0; i < parents.length; i++) {
1714
+ el = parents[i];
1715
+ if (!limitFound && (el !== this.limitObject)) {
1716
+ this.markupEffectiveAtStart[ i ] = el;
1717
+ if (!splitObjectWasSet && GENTICS.Utils.Dom.isSplitObject(el)) {
1718
+ splitObjectWasSet = true;
1719
+ this.splitObject = el;
1720
+ }
1721
+ } else {
1722
+ limitFound = true;
1723
+ this.unmodifiableMarkupAtStart.push(el);
1724
+ }
1725
+ }
1726
+ if (!splitObjectWasSet) {
1727
+ this.splitObject = false;
1728
+ }
1729
+ return;
1730
+ },
1731
+
1732
+ /**
1733
+ * TODO: remove this
1734
+ * Method updates member var markupEffectiveAtStart, which is relevant primarily for button status
1735
+ * @return void
1736
+ * @hide
1737
+ */
1738
+ updatelimitObject: function() {
1739
+ if (Aloha.editables && Aloha.editables.length > 0) {
1740
+ var parents = this.getStartContainerParents(),
1741
+ editables = Aloha.editables,
1742
+ i, el, j, editable;
1743
+ for ( i = 0; i < parents.length; i++) {
1744
+ el = parents[i];
1745
+ for ( j = 0; j < editables.length; j++) {
1746
+ editable = editables[j].obj[0];
1747
+ if (el === editable) {
1748
+ this.limitObject = el;
1749
+ return true;
1750
+ }
1751
+ }
1752
+ }
1753
+ }
1754
+ this.limitObject = jQuery('body');
1755
+ return true;
1756
+ },
1757
+
1758
+ /**
1759
+ * string representation of the range object
1760
+ * @param verbose set to true for verbose output
1761
+ * @return string representation of the range object
1762
+ * @hide
1763
+ */
1764
+ toString: function(verbose) {
1765
+ if (!verbose) {
1766
+ return 'Aloha.Selection.SelectionRange';
1767
+ }
1768
+ return 'Aloha.Selection.SelectionRange {start [' + this.startContainer.nodeValue + '] offset '
1769
+ + this.startOffset + ', end [' + this.endContainer.nodeValue + '] offset ' + this.endOffset + '}';
1770
+ }
1771
+
1772
+ }) // SelectionRange
1773
+
1774
+ }); // Selection
1775
+
1776
+
1777
+ /**
1778
+ * This method implements an ugly workaround for a selection problem in ie:
1779
+ * when the cursor shall be placed at the end of a text node in a li element, that is followed by a nested list,
1780
+ * the selection would always snap into the first li of the nested list
1781
+ * therefore, we make sure that the text node ends with a space and place the cursor right before it
1782
+ */
1783
+ function nestedListInIEWorkaround ( range ) {
1784
+ if (jQuery.browser.msie
1785
+ && range.startContainer === range.endContainer
1786
+ && range.startOffset === range.endOffset
1787
+ && range.startContainer.nodeType == 3
1788
+ && range.startOffset == range.startContainer.data.length
1789
+ && range.startContainer.nextSibling
1790
+ && ["OL", "UL"].indexOf(range.startContainer.nextSibling.nodeName) !== -1) {
1791
+ if (range.startContainer.data[range.startContainer.data.length-1] == ' ') {
1792
+ range.startOffset = range.endOffset = range.startOffset-1;
1793
+ } else {
1794
+ range.startContainer.data = range.startContainer.data + ' ';
1795
+ }
1796
+ }
1797
+ }
1798
+
1799
+ function correctRange ( range ) {
1800
+ nestedListInIEWorkaround(range);
1801
+ return range;
1802
+ }
1803
+
1804
+ /**
1805
+ * Implements Selection http://html5.org/specs/dom-range.html#selection
1806
+ * @namespace Aloha
1807
+ * @class Selection This singleton class always represents the
1808
+ * current user selection
1809
+ * @singleton
1810
+ */
1811
+ var AlohaSelection = Class.extend({
1812
+
1813
+ _constructor : function( nativeSelection ) {
1814
+
1815
+ this._nativeSelection = nativeSelection;
1816
+ this.ranges = [];
1817
+
1818
+ // will remember if urged to not change the selection
1819
+ this.preventChange = false;
1820
+
1821
+ },
1822
+
1823
+ /**
1824
+ * Returns the element that contains the start of the selection. Returns null if there's no selection.
1825
+ * @readonly
1826
+ * @type Node
1827
+ */
1828
+ anchorNode: null,
1829
+
1830
+ /**
1831
+ * Returns the offset of the start of the selection relative to the element that contains the start
1832
+ * of the selection. Returns 0 if there's no selection.
1833
+ * @readonly
1834
+ * @type int
1835
+ */
1836
+ anchorOffset: 0,
1837
+
1838
+ /**
1839
+ * Returns the element that contains the end of the selection.
1840
+ * Returns null if there's no selection.
1841
+ * @readonly
1842
+ * @type Node
1843
+ */
1844
+ focusNode: null,
1845
+
1846
+ /**
1847
+ * Returns the offset of the end of the selection relative to the element that contains the end
1848
+ * of the selection. Returns 0 if there's no selection.
1849
+ * @readonly
1850
+ * @type int
1851
+ */
1852
+ focusOffset: 0,
1853
+
1854
+ /**
1855
+ * Returns true if there's no selection or if the selection is empty. Otherwise, returns false.
1856
+ * @readonly
1857
+ * @type boolean
1858
+ */
1859
+ isCollapsed: false,
1860
+
1861
+ /**
1862
+ * Returns the number of ranges in the selection.
1863
+ * @readonly
1864
+ * @type int
1865
+ */
1866
+ rangeCount: 0,
1867
+
1868
+ /**
1869
+ * Replaces the selection with an empty one at the given position.
1870
+ * @throws a WRONG_DOCUMENT_ERR exception if the given node is in a different document.
1871
+ * @param parentNode Node of new selection
1872
+ * @param offest offest of new Selection in parentNode
1873
+ * @void
1874
+ */
1875
+ collapse: function ( parentNode, offset ) {
1876
+ this._nativeSelection.collapse( parentNode, offset );
1877
+ },
1878
+
1879
+ /**
1880
+ * Replaces the selection with an empty one at the position of the start of the current selection.
1881
+ * @throws an INVALID_STATE_ERR exception if there is no selection.
1882
+ * @void
1883
+ */
1884
+ collapseToStart: function() {
1885
+ throw "NOT_IMPLEMENTED";
1886
+ },
1887
+
1888
+ /**
1889
+ * @void
1890
+ */
1891
+ extend: function ( parentNode, offset) {
1892
+
1893
+ },
1894
+
1895
+ /**
1896
+ * @param alter DOMString
1897
+ * @param direction DOMString
1898
+ * @param granularity DOMString
1899
+ * @void
1900
+ */
1901
+ modify: function ( alter, direction, granularity ) {
1902
+
1903
+ },
1904
+
1905
+ /**
1906
+ * Replaces the selection with an empty one at the position of the end of the current selection.
1907
+ * @throws an INVALID_STATE_ERR exception if there is no selection.
1908
+ * @void
1909
+ */
1910
+ collapseToEnd: function() {
1911
+ throw "NOT_IMPLEMENTED";
1912
+ },
1913
+
1914
+ /**
1915
+ * Replaces the selection with one that contains all the contents of the given element.
1916
+ * @throws a WRONG_DOCUMENT_ERR exception if the given node is in a different document.
1917
+ * @param parentNode Node the Node fully select
1918
+ * @void
1919
+ */
1920
+ selectAllChildren: function( parentNode ) {
1921
+ throw "NOT_IMPLEMENTED";
1922
+ },
1923
+
1924
+ /**
1925
+ * Deletes the contents of the selection
1926
+ */
1927
+ deleteFromDocument: function() {
1928
+ throw "NOT_IMPLEMENTED";
1929
+ },
1930
+
1931
+ /**
1932
+ * NB!
1933
+ * We have serious problem in IE.
1934
+ * The range that we get in IE is not the same as the range we had set,
1935
+ * so even if we normalize it during getRangeAt, in IE, we will be
1936
+ * correcting the range to the "correct" place, but still not the place
1937
+ * where it was originally set.
1938
+ *
1939
+ * Returns the given range.
1940
+ * The getRangeAt(index) method returns the indexth range in the list.
1941
+ * NOTE: Aloha Editor only support 1 range! index can only be 0
1942
+ * @throws INDEX_SIZE_ERR DOM exception if index is less than zero or
1943
+ * greater or equal to the value returned by the rangeCount.
1944
+ * @param index int
1945
+ * @return Range return the selected range from index
1946
+ */
1947
+ getRangeAt: function ( index ) {
1948
+ return correctRange( this._nativeSelection.getRangeAt( index ) );
1949
+ //if ( index < 0 || this.rangeCount ) {
1950
+ // throw "INDEX_SIZE_ERR DOM";
1951
+ //}
1952
+ //return this._ranges[index];
1953
+ },
1954
+
1955
+ /**
1956
+ * Adds the given range to the selection.
1957
+ * The addRange(range) method adds the given range Range object to the list of
1958
+ * selections, at the end (so the newly added range is the new last range).
1959
+ * NOTE: Aloha Editor only support 1 range! The added range will replace the
1960
+ * range at index 0
1961
+ * see http://html5.org/specs/dom-range.html#selection note about addRange
1962
+ * @throws an INVALID_NODE_TYPE_ERR exception if the given Range has a boundary point
1963
+ * node that's not a Text or Element node, and an INVALID_MODIFICATION_ERR exception
1964
+ * if it has a boundary point node that doesn't descend from a Document.
1965
+ * @param range Range adds the range to the selection
1966
+ * @void
1967
+ */
1968
+ addRange: function( range ) {
1969
+ // set readonly attributes
1970
+ this._nativeSelection.addRange( range );
1971
+ // We will correct the range after rangy has processed the native
1972
+ // selection range, so that our correction will be the final fix on
1973
+ // the range according to the guarentee's that Aloha wants to make
1974
+ this._nativeSelection._ranges[ 0 ] = correctRange( range );
1975
+
1976
+ // make sure, the old Aloha selection will be updated (until all implementations use the new AlohaSelection)
1977
+ Aloha.Selection.updateSelection();
1978
+ },
1979
+
1980
+ /**
1981
+ * Removes the given range from the selection, if the range was one of the ones in the selection.
1982
+ * NOTE: Aloha Editor only support 1 range! The added range will replace the
1983
+ * range at with index 0
1984
+ * @param range Range removes the range from the selection
1985
+ * @void
1986
+ */
1987
+ removeRange: function( range ) {
1988
+ this._nativeSelection.removeRange();
1989
+ },
1990
+
1991
+ /**
1992
+ * Removes all the ranges in the selection.
1993
+ * @viod
1994
+ */
1995
+ removeAllRanges: function() {
1996
+ this._nativeSelection.removeAllRanges();
1997
+ },
1998
+
1999
+ /**
2000
+ * prevents the next aloha-selection-changed event from
2001
+ * being triggered
2002
+ * @param flag boolean defines weather to update the selection on change or not
2003
+ */
2004
+ preventedChange: function( flag ) {
2005
+ // this.preventChange = typeof flag === 'undefined' ? false : flag;
2006
+ },
2007
+
2008
+ /**
2009
+ * will return wheter selection change event was prevented or not, and reset the
2010
+ * preventSelectionChangedFlag
2011
+ * @return boolean true if aloha-selection-change event
2012
+ * was prevented
2013
+ */
2014
+ isChangedPrevented: function() {
2015
+ // return this.preventSelectionChangedFlag;
2016
+ },
2017
+
2018
+ /**
2019
+ * INFO: Method is used for integration with Gentics
2020
+ * Aloha, has no use otherwise Updates the rangeObject
2021
+ * according to the current user selection Method is
2022
+ * always called on selection change
2023
+ *
2024
+ * @param event
2025
+ * jQuery browser event object
2026
+ * @return true when rangeObject was modified, false
2027
+ * otherwise
2028
+ * @hide
2029
+ */
2030
+ refresh: function(event) {
2031
+
2032
+ },
2033
+
2034
+ /**
2035
+ * String representation
2036
+ *
2037
+ * @return "Aloha.Selection"
2038
+ * @hide
2039
+ */
2040
+ toString: function() {
2041
+ return 'Aloha.Selection';
2042
+ },
2043
+
2044
+ getRangeCount: function() {
2045
+ return this._nativeSelection.rangeCount;
2046
+ }
2047
+
2048
+ });
2049
+
2050
+ /**
2051
+ * A wrapper for the function of the same name in the rangy core-depdency.
2052
+ * This function should be preferred as it hides the global rangy object.
2053
+ * For more information look at the following sites:
2054
+ * http://html5.org/specs/dom-range.html
2055
+ * @param window optional - specifices the window to get the selection of
2056
+ */
2057
+ Aloha.getSelection = function( target ) {
2058
+ var target = ( target !== document || target !== window ) ? window : target;
2059
+ // Aloha.Selection.refresh()
2060
+ // implement Aloha Selection
2061
+ // TODO cache
2062
+ return new AlohaSelection( window.rangy.getSelection( target ) );
2063
+ };
2064
+
2065
+ /**
2066
+ * A wrapper for the function of the same name in the rangy core-depdency.
2067
+ * This function should be preferred as it hides the global rangy object.
2068
+ * Please note: when the range object is not needed anymore,
2069
+ * invoke the detach method on it. It is currently unknown to me why
2070
+ * this is required, but that's what it says in the rangy specification.
2071
+ * For more information look at the following sites:
2072
+ * http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html
2073
+ * @param document optional - specifies which document to create the range for
2074
+ */
2075
+ Aloha.createRange = function(givenWindow) {
2076
+ return window.rangy.createRange(givenWindow);
2077
+ };
2078
+
2079
+ var selection = new Selection();
2080
+ Aloha.Selection = selection;
2081
+
2082
+ return selection;
2083
+ });