locomotive-aloha-rails 0.20.1.5 → 0.23.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1280) hide show
  1. data/README.md +4 -4
  2. data/Rakefile +15 -6
  3. data/app/assets/javascripts/aloha.js +1 -0
  4. data/lib/aloha/rails/engine.rb +1 -1
  5. data/lib/aloha/rails/version.rb +2 -2
  6. data/vendor/assets/javascripts/aloha/css/aloha-common-extra.css +24 -0
  7. data/vendor/assets/javascripts/aloha/css/aloha-core.css +4 -29
  8. data/vendor/assets/javascripts/aloha/css/aloha-reset.css +24 -0
  9. data/vendor/assets/javascripts/aloha/css/aloha-sidebar.css +77 -89
  10. data/vendor/assets/javascripts/aloha/css/aloha.css +31 -7777
  11. data/vendor/assets/javascripts/aloha/img/arrow-down.png +0 -0
  12. data/vendor/assets/javascripts/aloha/img/arrow-left.png +0 -0
  13. data/vendor/assets/javascripts/aloha/img/arrow.png +0 -0
  14. data/vendor/assets/javascripts/aloha/img/base-multi.png +0 -0
  15. data/vendor/assets/javascripts/aloha/img/base.png +0 -0
  16. data/vendor/assets/javascripts/aloha/img/bg.png +0 -0
  17. data/vendor/assets/javascripts/aloha/img/breadcrumb-divider.png +0 -0
  18. data/vendor/assets/javascripts/aloha/img/gentics-logo.png +0 -0
  19. data/vendor/assets/javascripts/aloha/img/grabhandle.png +0 -0
  20. data/vendor/assets/javascripts/aloha/img/maximize.png +0 -0
  21. data/vendor/assets/javascripts/aloha/img/multisplit-base.jpg +0 -0
  22. data/vendor/assets/javascripts/aloha/img/multisplit-close.gif +0 -0
  23. data/vendor/assets/javascripts/aloha/img/multisplit-open.gif +0 -0
  24. data/vendor/assets/javascripts/aloha/img/pin.png +0 -0
  25. data/vendor/assets/javascripts/aloha/img/removeformat.png +0 -0
  26. data/vendor/assets/javascripts/aloha/img/text_indent.png +0 -0
  27. data/vendor/assets/javascripts/aloha/img/text_indent_remove.png +0 -0
  28. data/vendor/assets/javascripts/aloha/lib/aloha-jquery-noconflict.js +12 -0
  29. data/vendor/assets/javascripts/aloha/lib/aloha.js +532 -89342
  30. data/vendor/assets/javascripts/aloha/lib/aloha/block-jump.js +153 -0
  31. data/vendor/assets/javascripts/aloha/lib/aloha/command.js +161 -123
  32. data/vendor/assets/javascripts/aloha/lib/aloha/console.js +312 -295
  33. data/vendor/assets/javascripts/aloha/lib/aloha/contenthandlermanager.js +82 -44
  34. data/vendor/assets/javascripts/aloha/lib/aloha/copypaste.js +108 -0
  35. data/vendor/assets/javascripts/aloha/lib/aloha/core.js +453 -410
  36. data/vendor/assets/javascripts/aloha/lib/aloha/ecma5shims.js +307 -277
  37. data/vendor/assets/javascripts/aloha/lib/aloha/editable.js +548 -408
  38. data/vendor/assets/javascripts/aloha/lib/aloha/engine.js +7359 -7182
  39. data/vendor/assets/javascripts/aloha/lib/aloha/ephemera.js +485 -0
  40. data/vendor/assets/javascripts/aloha/lib/aloha/ierange-m2.js +28 -545
  41. data/vendor/assets/javascripts/aloha/lib/aloha/jquery.aloha.js +364 -146
  42. data/vendor/assets/javascripts/aloha/lib/aloha/markup.js +1272 -1255
  43. data/vendor/assets/javascripts/aloha/lib/aloha/nls/ca/i18n.js +11 -0
  44. data/vendor/assets/javascripts/aloha/lib/aloha/nls/de/i18n.js +11 -10
  45. data/vendor/assets/javascripts/aloha/lib/aloha/nls/i18n.js +19 -19
  46. data/vendor/assets/javascripts/aloha/lib/aloha/nls/mk/i18n.js +11 -0
  47. data/vendor/assets/javascripts/aloha/lib/aloha/nls/pt-br/i18n.js +11 -0
  48. data/vendor/assets/javascripts/aloha/lib/aloha/nls/ru/i18n.js +11 -0
  49. data/vendor/assets/javascripts/aloha/lib/aloha/nls/uk/i18n.js +11 -0
  50. data/vendor/assets/javascripts/aloha/lib/aloha/nls/zh-hans/i18n.js +11 -0
  51. data/vendor/assets/javascripts/aloha/lib/aloha/observable.js +43 -36
  52. data/vendor/assets/javascripts/aloha/lib/aloha/plugin.js +80 -75
  53. data/vendor/assets/javascripts/aloha/lib/aloha/pluginmanager.js +146 -97
  54. data/vendor/assets/javascripts/aloha/lib/aloha/rangy-core.js +30 -3242
  55. data/vendor/assets/javascripts/aloha/lib/aloha/registry.js +102 -24
  56. data/vendor/assets/javascripts/aloha/lib/aloha/repository.js +137 -123
  57. data/vendor/assets/javascripts/aloha/lib/aloha/repositorymanager.js +742 -571
  58. data/vendor/assets/javascripts/aloha/lib/aloha/repositoryobjects.js +77 -61
  59. data/vendor/assets/javascripts/aloha/lib/aloha/selection.js +2402 -2102
  60. data/vendor/assets/javascripts/aloha/lib/aloha/sidebar.js +566 -664
  61. data/vendor/assets/javascripts/aloha/lib/aloha/state-override.js +125 -0
  62. data/vendor/assets/javascripts/aloha/lib/css.js +329 -187
  63. data/vendor/assets/javascripts/aloha/lib/i18n.js +118 -79
  64. data/vendor/assets/javascripts/aloha/lib/require.js +1424 -1384
  65. data/vendor/assets/javascripts/aloha/lib/text.js +39 -13
  66. data/vendor/assets/javascripts/aloha/lib/util/arrays.js +240 -0
  67. data/vendor/assets/javascripts/aloha/lib/util/browser.js +32 -0
  68. data/vendor/assets/javascripts/aloha/lib/util/class.js +67 -69
  69. data/vendor/assets/javascripts/aloha/lib/util/dom.js +1525 -1504
  70. data/vendor/assets/javascripts/aloha/lib/util/dom2.js +748 -0
  71. data/vendor/assets/javascripts/aloha/lib/util/functions.js +62 -0
  72. data/vendor/assets/javascripts/aloha/lib/util/html.js +121 -0
  73. data/vendor/assets/javascripts/aloha/lib/util/json2.js +240 -257
  74. data/vendor/assets/javascripts/aloha/lib/util/keys.js +65 -0
  75. data/vendor/assets/javascripts/aloha/lib/util/lang.js +89 -66
  76. data/vendor/assets/javascripts/aloha/lib/util/maps.js +108 -0
  77. data/vendor/assets/javascripts/aloha/lib/util/misc.js +51 -0
  78. data/vendor/assets/javascripts/aloha/lib/util/position.js +176 -158
  79. data/vendor/assets/javascripts/aloha/lib/util/range-context.js +528 -0
  80. data/vendor/assets/javascripts/aloha/lib/util/range.js +799 -805
  81. data/vendor/assets/javascripts/aloha/lib/util/strings.js +114 -0
  82. data/vendor/assets/javascripts/aloha/lib/util/trees.js +336 -0
  83. data/vendor/assets/javascripts/aloha/lib/vendor/3rdparty.txt +70 -0
  84. data/vendor/assets/javascripts/aloha/lib/vendor/amplify.store.js +298 -0
  85. data/vendor/assets/javascripts/aloha/lib/vendor/class.js +76 -0
  86. data/vendor/assets/javascripts/aloha/{plugins/extra/browser → lib}/vendor/grid.locale.de.js +138 -139
  87. data/vendor/assets/javascripts/aloha/{plugins/extra/browser → lib}/vendor/grid.locale.en.js +43 -44
  88. data/vendor/assets/javascripts/aloha/lib/vendor/ierange-m2.js +508 -0
  89. data/vendor/assets/javascripts/aloha/lib/vendor/{jquery-1.6.1.js → jquery-1.7.2.js} +2553 -2068
  90. data/vendor/assets/javascripts/aloha/lib/vendor/jquery-ui-1.9.0.custom-aloha.js +14711 -0
  91. data/vendor/assets/javascripts/aloha/{plugins/extra/browser/vendor/jquery.jqGrid.js → lib/vendor/jquery.jqgrid.js} +5 -3
  92. data/vendor/assets/javascripts/aloha/{plugins/extra/browser → lib}/vendor/jquery.jstree.js +4 -4
  93. data/vendor/assets/javascripts/aloha/lib/vendor/jquery.layout-1.3.0-rc30.7.js +5924 -0
  94. data/vendor/assets/javascripts/aloha/lib/vendor/pubsub/js/pubsub-unminified.js +187 -0
  95. data/vendor/assets/javascripts/aloha/lib/vendor/pubsub/js/pubsub.js +2 -0
  96. data/vendor/assets/javascripts/aloha/lib/vendor/rangy-core.js +3295 -0
  97. data/vendor/assets/javascripts/aloha/{plugins/extra/browser → lib/vendor/repository-browser}/css/jstree.css +0 -0
  98. data/vendor/assets/javascripts/aloha/{plugins/extra/browser/css/browsercombined.css → lib/vendor/repository-browser/css/repository-browser.css} +64 -60
  99. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/arrow-000-medium.png +0 -0
  100. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/arrow-180.png +0 -0
  101. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/arrow-315-medium.png +0 -0
  102. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/arrow-stop-180.png +0 -0
  103. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/arrow-stop.png +0 -0
  104. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/arrow.png +0 -0
  105. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/control-stop-square-small.png +0 -0
  106. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/folder-horizontal-open.png +0 -0
  107. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/folder-open.png +0 -0
  108. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/magnifier-left.png +0 -0
  109. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/page.png +0 -0
  110. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/picture.png +0 -0
  111. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/sort-alphabet-descending.png +0 -0
  112. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/sort-alphabet.png +0 -0
  113. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/throbber.gif +0 -0
  114. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/js/repository-browser-unminified.js +1450 -0
  115. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/js/repository-browser.js +32 -0
  116. data/vendor/assets/javascripts/aloha/lib/vendor/sanitize.js +18 -7
  117. data/vendor/assets/javascripts/aloha/plugins/common/abbr/css/abbr.css +1 -0
  118. data/vendor/assets/javascripts/aloha/plugins/common/abbr/img/remabbr.png +0 -0
  119. data/vendor/assets/javascripts/aloha/plugins/common/abbr/lib/abbr-plugin.js +119 -109
  120. data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/ca/i18n.js +6 -0
  121. data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/de/i18n.js +6 -1
  122. data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/i18n.js +14 -3
  123. data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/mk/i18n.js +6 -0
  124. data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/pt-br/i18n.js +6 -0
  125. data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/ru/i18n.js +6 -0
  126. data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/uk/i18n.js +6 -0
  127. data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/zh-hans/i18n.js +6 -0
  128. data/vendor/assets/javascripts/aloha/plugins/common/abbr/package.json +0 -0
  129. data/vendor/assets/javascripts/aloha/plugins/common/align/css/align.css +17 -5
  130. data/vendor/assets/javascripts/aloha/plugins/common/align/img/align.png +0 -0
  131. data/vendor/assets/javascripts/aloha/plugins/common/align/lib/align-plugin.js +463 -353
  132. data/vendor/assets/javascripts/aloha/plugins/common/align/nls/ca/i18n.js +6 -0
  133. data/vendor/assets/javascripts/aloha/plugins/common/align/nls/de/i18n.js +6 -0
  134. data/vendor/assets/javascripts/aloha/plugins/common/align/nls/i18n.js +16 -4
  135. data/vendor/assets/javascripts/aloha/plugins/common/align/nls/mk/i18n.js +6 -0
  136. data/vendor/assets/javascripts/aloha/plugins/common/align/nls/pt-br/i18n.js +6 -0
  137. data/vendor/assets/javascripts/aloha/plugins/common/align/nls/ru/i18n.js +6 -0
  138. data/vendor/assets/javascripts/aloha/plugins/common/align/nls/uk/i18n.js +6 -0
  139. data/vendor/assets/javascripts/aloha/plugins/common/align/nls/zh-hans/i18n.js +6 -0
  140. data/vendor/assets/javascripts/aloha/plugins/common/block/css/block.css +13 -7
  141. data/vendor/assets/javascripts/aloha/plugins/common/block/lib/block-plugin.js +270 -24
  142. data/vendor/assets/javascripts/aloha/plugins/common/block/lib/block.js +268 -49
  143. data/vendor/assets/javascripts/aloha/plugins/common/block/lib/blockcontenthandler.js +27 -8
  144. data/vendor/assets/javascripts/aloha/plugins/common/block/lib/blockmanager.js +624 -479
  145. data/vendor/assets/javascripts/aloha/plugins/common/block/lib/editor.js +30 -11
  146. data/vendor/assets/javascripts/aloha/plugins/common/block/lib/editormanager.js +26 -7
  147. data/vendor/assets/javascripts/aloha/plugins/common/block/lib/sidebarattributeeditor.js +33 -13
  148. data/vendor/assets/javascripts/aloha/plugins/common/block/nls/ca/i18n.js +3 -0
  149. data/vendor/assets/javascripts/aloha/plugins/common/block/nls/de/i18n.js +3 -0
  150. data/vendor/assets/javascripts/aloha/plugins/common/block/nls/i18n.js +12 -0
  151. data/vendor/assets/javascripts/aloha/plugins/common/block/nls/mk/i18n.js +3 -0
  152. data/vendor/assets/javascripts/aloha/plugins/common/block/nls/pt-br/i18n.js +3 -0
  153. data/vendor/assets/javascripts/aloha/plugins/common/block/nls/ru/i18n.js +3 -0
  154. data/vendor/assets/javascripts/aloha/plugins/common/block/nls/uk/i18n.js +3 -0
  155. data/vendor/assets/javascripts/aloha/plugins/common/block/nls/zh-hans/i18n.js +3 -0
  156. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/css/characterpicker.css +29 -26
  157. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/img/icon.png +0 -0
  158. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/lib/characterpicker-plugin.js +445 -215
  159. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/ca/i18n.js +3 -0
  160. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/de/i18n.js +3 -1
  161. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/i18n.js +11 -3
  162. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/mk/i18n.js +3 -0
  163. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/pt-br/i18n.js +3 -0
  164. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/ru/i18n.js +3 -0
  165. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/uk/i18n.js +3 -0
  166. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/zh-hans/i18n.js +3 -0
  167. data/vendor/assets/javascripts/aloha/plugins/common/commands/css/abbr.css +0 -0
  168. data/vendor/assets/javascripts/aloha/plugins/common/commands/lib/commands-plugin.js +27 -9
  169. data/vendor/assets/javascripts/aloha/plugins/common/commands/lib/inserthtml.js +28 -9
  170. data/vendor/assets/javascripts/aloha/plugins/common/commands/package.json +0 -0
  171. data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/blockelementcontenthandler.js +173 -0
  172. data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/contenthandler-plugin.js +45 -34
  173. data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/contenthandler-utils.js +58 -0
  174. data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/genericcontenthandler.js +320 -255
  175. data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/oembedcontenthandler.js +420 -235
  176. data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/sanitizecontenthandler.js +82 -33
  177. data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/wordcontenthandler.js +204 -128
  178. data/vendor/assets/javascripts/aloha/plugins/common/dom-to-xhtml/lib/dom-to-xhtml-plugin.js +57 -12
  179. data/vendor/assets/javascripts/aloha/plugins/common/dom-to-xhtml/lib/dom-to-xhtml.js +186 -77
  180. data/vendor/assets/javascripts/aloha/plugins/common/format/img/em.png +0 -0
  181. data/vendor/assets/javascripts/aloha/plugins/common/format/img/strong.png +0 -0
  182. data/vendor/assets/javascripts/aloha/plugins/common/format/lib/format-plugin.js +480 -255
  183. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/ca/i18n.js +52 -0
  184. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/de/i18n.js +52 -1
  185. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/i18n.js +60 -9
  186. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/mk/i18n.js +52 -0
  187. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/pt-br/i18n.js +52 -0
  188. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/ru/i18n.js +52 -1
  189. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/uk/i18n.js +52 -0
  190. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/zh-hans/i18n.js +52 -0
  191. data/vendor/assets/javascripts/aloha/plugins/common/highlighteditables/css/highlighteditables.css +0 -0
  192. data/vendor/assets/javascripts/aloha/plugins/common/highlighteditables/lib/highlighteditables-plugin.js +43 -15
  193. data/vendor/assets/javascripts/aloha/plugins/common/highlighteditables/package.json +0 -0
  194. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/css/horizontalruler.css +2 -3
  195. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/img/icon.png +0 -0
  196. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/lib/horizontalruler-plugin.js +53 -28
  197. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/ca/i18n.js +3 -0
  198. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/de/i18n.js +3 -1
  199. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/i18n.js +11 -3
  200. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/mk/i18n.js +3 -0
  201. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/pt-br/i18n.js +3 -0
  202. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/ru/i18n.js +3 -0
  203. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/uk/i18n.js +3 -0
  204. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/zh-hans/i18n.js +3 -0
  205. data/vendor/assets/javascripts/aloha/plugins/common/image/README.md +5 -22
  206. data/vendor/assets/javascripts/aloha/plugins/common/image/css/image.css +24 -15
  207. data/vendor/assets/javascripts/aloha/plugins/common/image/img/blank.jpg +0 -0
  208. data/vendor/assets/javascripts/aloha/plugins/common/image/img/cropnresize.png +0 -0
  209. data/vendor/assets/javascripts/aloha/plugins/common/image/img/handle-sw.png +0 -0
  210. data/vendor/assets/javascripts/aloha/plugins/common/image/img/image-align-left.png +0 -0
  211. data/vendor/assets/javascripts/aloha/plugins/common/image/img/image-align-none.png +0 -0
  212. data/vendor/assets/javascripts/aloha/plugins/common/image/img/image-align-right.png +0 -0
  213. data/vendor/assets/javascripts/aloha/plugins/common/image/img/image-border.png +0 -0
  214. data/vendor/assets/javascripts/aloha/plugins/common/image/img/image-title.png +0 -0
  215. data/vendor/assets/javascripts/aloha/plugins/common/image/img/image.gif +0 -0
  216. data/vendor/assets/javascripts/aloha/plugins/common/image/img/padding-decrease.gif +0 -0
  217. data/vendor/assets/javascripts/aloha/plugins/common/image/img/padding-increase.gif +0 -0
  218. data/vendor/assets/javascripts/aloha/plugins/common/image/img/page.png +0 -0
  219. data/vendor/assets/javascripts/aloha/plugins/common/image/img/size-decrease.gif +0 -0
  220. data/vendor/assets/javascripts/aloha/plugins/common/image/img/size-increase.gif +0 -0
  221. data/vendor/assets/javascripts/aloha/plugins/common/image/lib/image-floatingMenu.js +308 -0
  222. data/vendor/assets/javascripts/aloha/plugins/{extra/browser/README → common/image/lib/image-plugin-actions.js} +0 -0
  223. data/vendor/assets/javascripts/aloha/plugins/common/image/lib/image-plugin.js +1330 -1632
  224. data/vendor/assets/javascripts/aloha/plugins/common/image/nls/ca/i18n.js +32 -0
  225. data/vendor/assets/javascripts/aloha/plugins/common/image/nls/de/i18n.js +32 -1
  226. data/vendor/assets/javascripts/aloha/plugins/common/image/nls/i18n.js +39 -5
  227. data/vendor/assets/javascripts/aloha/plugins/common/image/nls/mk/i18n.js +32 -0
  228. data/vendor/assets/javascripts/aloha/plugins/common/image/nls/pt-br/i18n.js +32 -0
  229. data/vendor/assets/javascripts/aloha/plugins/common/image/nls/ru/i18n.js +32 -16
  230. data/vendor/assets/javascripts/aloha/plugins/common/image/nls/uk/i18n.js +32 -0
  231. data/vendor/assets/javascripts/aloha/plugins/common/image/nls/zh-hans/i18n.js +32 -0
  232. data/vendor/assets/javascripts/aloha/plugins/common/image/package.json +0 -0
  233. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/jcrop/jcrop.gif +0 -0
  234. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/jcrop/jquery.jcrop.css +0 -0
  235. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/jcrop/jquery.jcrop.min.js +3 -1
  236. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/mousewheel/mousewheel.js +42 -17
  237. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  238. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  239. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
  240. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  241. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  242. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  243. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  244. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  245. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  246. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
  247. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
  248. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
  249. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
  250. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
  251. data/vendor/assets/javascripts/aloha/plugins/common/link/css/link.css +58 -55
  252. data/vendor/assets/javascripts/aloha/plugins/common/link/extra/delicious.js +26 -8
  253. data/vendor/assets/javascripts/aloha/plugins/common/link/extra/linklist.js +91 -73
  254. data/vendor/assets/javascripts/aloha/plugins/common/link/extra/slowlinklist.js +29 -10
  255. data/vendor/assets/javascripts/aloha/plugins/common/link/lib/link-plugin.js +429 -297
  256. data/vendor/assets/javascripts/aloha/plugins/common/link/nls/ca/i18n.js +14 -0
  257. data/vendor/assets/javascripts/aloha/plugins/common/link/nls/de/i18n.js +14 -13
  258. data/vendor/assets/javascripts/aloha/plugins/common/link/nls/i18n.js +23 -9
  259. data/vendor/assets/javascripts/aloha/plugins/common/link/nls/mk/i18n.js +14 -0
  260. data/vendor/assets/javascripts/aloha/plugins/common/link/nls/pt-br/i18n.js +14 -0
  261. data/vendor/assets/javascripts/aloha/plugins/common/link/nls/ru/i18n.js +14 -6
  262. data/vendor/assets/javascripts/aloha/plugins/common/link/nls/uk/i18n.js +14 -0
  263. data/vendor/assets/javascripts/aloha/plugins/common/link/nls/zh-hans/i18n.js +14 -0
  264. data/vendor/assets/javascripts/aloha/plugins/common/list/lib/list-plugin.js +150 -121
  265. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/ca/i18n.js +7 -0
  266. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/de/i18n.js +7 -5
  267. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/i18n.js +15 -8
  268. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/mk/i18n.js +7 -0
  269. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/pt-br/i18n.js +7 -0
  270. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/ru/i18n.js +7 -1
  271. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/uk/i18n.js +7 -0
  272. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/zh-hans/i18n.js +7 -0
  273. data/vendor/assets/javascripts/aloha/plugins/common/list/package.json +0 -0
  274. data/vendor/assets/javascripts/aloha/plugins/common/paste/lib/paste-plugin.js +338 -192
  275. data/vendor/assets/javascripts/aloha/plugins/common/table/css/table.css +5 -40
  276. data/vendor/assets/javascripts/aloha/plugins/common/table/img/down.cur +0 -0
  277. data/vendor/assets/javascripts/aloha/plugins/common/table/img/left.cur +0 -0
  278. data/vendor/assets/javascripts/aloha/plugins/common/table/img/table_layout.png +0 -0
  279. data/vendor/assets/javascripts/aloha/plugins/common/table/img/wai-green.png +0 -0
  280. data/vendor/assets/javascripts/aloha/plugins/common/table/img/wai-red.png +0 -0
  281. data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-cell.js +177 -106
  282. data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-create-layer.js +5 -2
  283. data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-plugin-utils.js +147 -8
  284. data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-plugin.js +925 -892
  285. data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-selection.js +10 -6
  286. data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table.js +577 -193
  287. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/ca/i18n.js +28 -0
  288. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/de/i18n.js +28 -27
  289. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/i18n.js +37 -36
  290. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/mk/i18n.js +28 -0
  291. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/pt-br/i18n.js +28 -0
  292. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/ru/i18n.js +28 -1
  293. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/uk/i18n.js +28 -0
  294. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/zh-hans/i18n.js +28 -0
  295. data/vendor/assets/javascripts/aloha/plugins/common/table/package.json +0 -0
  296. data/vendor/assets/javascripts/aloha/plugins/common/ui/css/jquery-ui-1.9m6.css +430 -0
  297. data/vendor/assets/javascripts/aloha/plugins/common/ui/css/ui.css +689 -0
  298. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/blockquote.png +0 -0
  299. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/character-picker.png +0 -0
  300. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/em.png +0 -0
  301. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/format-block.png +0 -0
  302. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/format-inline.png +0 -0
  303. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/indent.png +0 -0
  304. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/jqueryui/ui-icons_222222_256x240.png +0 -0
  305. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/justify.png +0 -0
  306. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/language-annotation.png +0 -0
  307. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview.png +0 -0
  308. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/anchor.png +0 -0
  309. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/blockquote.png +0 -0
  310. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/caption.png +0 -0
  311. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/cite.png +0 -0
  312. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/dd.png +0 -0
  313. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/div.png +0 -0
  314. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/dl.png +0 -0
  315. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/dt.png +0 -0
  316. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/h1.png +0 -0
  317. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/h2.png +0 -0
  318. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/h3.png +0 -0
  319. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/h4.png +0 -0
  320. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/h5.png +0 -0
  321. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/h6.png +0 -0
  322. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/p.png +0 -0
  323. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/pre.png +0 -0
  324. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/q.png +0 -0
  325. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/table.png +0 -0
  326. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/td.png +0 -0
  327. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/th.png +0 -0
  328. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/multisplit-close.gif +0 -0
  329. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/multisplit-open.gif +0 -0
  330. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/outdent.png +0 -0
  331. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/quote.png +0 -0
  332. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/removeformat.png +0 -0
  333. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/strong.png +0 -0
  334. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/tree.png +0 -0
  335. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/arena.js +11 -0
  336. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/autocomplete.js +70 -0
  337. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/button.js +114 -0
  338. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/component.js +121 -0
  339. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/container.js +210 -0
  340. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/context.js +53 -0
  341. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/dialog.js +215 -0
  342. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/floating.js +405 -0
  343. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/menuButton.js +169 -0
  344. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/multiSplit.js +237 -0
  345. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/port-helper-attribute-field.js +444 -0
  346. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/port-helper-multi-split.js +71 -0
  347. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/scopes.js +187 -0
  348. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/settings.js +202 -0
  349. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/subguarded.js +183 -0
  350. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/surface.js +106 -0
  351. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/tab.js +281 -0
  352. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/text.js +33 -0
  353. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/toggleButton.js +57 -0
  354. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/toolbar.js +251 -0
  355. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/ui-plugin.js +169 -0
  356. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/ui.js +181 -0
  357. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/utils.js +104 -0
  358. data/vendor/assets/javascripts/aloha/plugins/common/ui/nls/ca/i18n.js +46 -0
  359. data/vendor/assets/javascripts/aloha/plugins/common/ui/nls/de/i18n.js +47 -0
  360. data/vendor/assets/javascripts/aloha/plugins/common/ui/nls/i18n.js +75 -0
  361. data/vendor/assets/javascripts/aloha/plugins/common/ui/nls/mk/i18n.js +46 -0
  362. data/vendor/assets/javascripts/aloha/plugins/common/ui/nls/pt-br/i18n.js +46 -0
  363. data/vendor/assets/javascripts/aloha/plugins/common/ui/nls/ru/i18n.js +46 -0
  364. data/vendor/assets/javascripts/aloha/plugins/common/ui/nls/uk/i18n.js +46 -0
  365. data/vendor/assets/javascripts/aloha/plugins/common/ui/nls/zh-hans/i18n.js +46 -0
  366. data/vendor/assets/javascripts/aloha/plugins/common/ui/vendor/jquery-ui-autocomplete-html.js +42 -0
  367. data/vendor/assets/javascripts/aloha/plugins/common/undo/lib/undo-plugin.js +165 -134
  368. data/vendor/assets/javascripts/aloha/plugins/common/undo/package.json +0 -0
  369. data/vendor/assets/javascripts/aloha/plugins/common/undo/vendor/undo.js +2 -0
  370. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/lib/attributes-plugin.js +27 -7
  371. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/ca/i18n.js +5 -0
  372. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/de/i18n.js +5 -1
  373. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/i18n.js +13 -4
  374. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/mk/i18n.js +5 -0
  375. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/pt-br/i18n.js +5 -0
  376. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/ru/i18n.js +5 -0
  377. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/uk/i18n.js +5 -0
  378. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/zh-hans/i18n.js +5 -0
  379. data/vendor/assets/javascripts/aloha/plugins/extra/captioned-image/css/captioned-image.css +15 -0
  380. data/vendor/assets/javascripts/aloha/plugins/extra/captioned-image/lib/captioned-image-plugin.js +555 -0
  381. data/vendor/assets/javascripts/aloha/plugins/extra/cite/img/blockquote.png +0 -0
  382. data/vendor/assets/javascripts/aloha/plugins/extra/cite/img/icon_cite.png +0 -0
  383. data/vendor/assets/javascripts/aloha/plugins/extra/cite/lib/cite-plugin.js +369 -308
  384. data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/ca/i18n.js +4 -0
  385. data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/de/i18n.js +4 -1
  386. data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/i18n.js +12 -3
  387. data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/mk/i18n.js +4 -0
  388. data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/pt-br/i18n.js +4 -0
  389. data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/ru/i18n.js +4 -0
  390. data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/uk/i18n.js +4 -0
  391. data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/zh-hans/i18n.js +4 -0
  392. data/vendor/assets/javascripts/aloha/plugins/extra/comments/img/add-icon.png +0 -0
  393. data/vendor/assets/javascripts/aloha/plugins/extra/comments/img/add.png +0 -0
  394. data/vendor/assets/javascripts/aloha/plugins/extra/comments/img/comments.png +0 -0
  395. data/vendor/assets/javascripts/aloha/plugins/extra/comments/img/hr.png +0 -0
  396. data/vendor/assets/javascripts/aloha/plugins/extra/comments/img/textbox.png +0 -0
  397. data/vendor/assets/javascripts/aloha/plugins/extra/comments/{src/comments.js → lib/comments-plugin.js} +38 -15
  398. data/vendor/assets/javascripts/aloha/plugins/extra/comments/{src → lib}/comments.css +0 -0
  399. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/README.md +1 -1
  400. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/TODO.md +0 -0
  401. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/img/cross.png +0 -0
  402. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/img/hourglass.png +0 -0
  403. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/img/loading.gif +0 -0
  404. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/img/page.png +0 -0
  405. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/img/tick.png +0 -0
  406. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/lib/draganddropfiles-plugin.js +1 -1
  407. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/lib/dragndropfiles.css +0 -0
  408. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/lib/dragndropfiles.js +27 -13
  409. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/lib/dropfilesrepository.js +2 -2
  410. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/nls/ca/i18n.js +3 -0
  411. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/nls/de/i18n.js +3 -0
  412. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/nls/i18n.js +12 -0
  413. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/nls/mk/i18n.js +3 -0
  414. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/nls/pt-br/i18n.js +3 -0
  415. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/nls/ru/i18n.js +3 -0
  416. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/nls/uk/i18n.js +3 -0
  417. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/nls/zh-hans/i18n.js +3 -0
  418. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/package.json +0 -0
  419. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/README.md +1 -3
  420. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/css/formatless.css +1 -1
  421. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/img/button.png +0 -0
  422. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/lib/formatlesshandler.js +76 -46
  423. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/lib/formatlesspaste-plugin.js +217 -90
  424. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/ca/i18n.js +3 -0
  425. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/de/i18n.js +3 -1
  426. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/i18n.js +10 -5
  427. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/mk/i18n.js +3 -0
  428. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/pt-br/i18n.js +3 -0
  429. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/ru/i18n.js +3 -0
  430. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/uk/i18n.js +3 -0
  431. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/zh-hans/i18n.js +3 -0
  432. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/lib/headerids-plugin.js +69 -30
  433. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/ca/i18n.js +6 -0
  434. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/de/i18n.js +6 -1
  435. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/i18n.js +14 -4
  436. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/mk/i18n.js +6 -0
  437. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/pt-br/i18n.js +6 -0
  438. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/ru/i18n.js +6 -0
  439. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/uk/i18n.js +6 -0
  440. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/zh-hans/i18n.js +6 -0
  441. data/vendor/assets/javascripts/aloha/plugins/extra/hints/README.md +12 -0
  442. data/vendor/assets/javascripts/aloha/plugins/extra/hints/css/hints.css +29 -0
  443. data/vendor/assets/javascripts/aloha/plugins/extra/hints/lib/hints-plugin.js +97 -0
  444. data/vendor/assets/javascripts/aloha/plugins/extra/hints/package.json +3 -3
  445. data/vendor/assets/javascripts/aloha/plugins/extra/hints/vendor/tipsy.js +242 -0
  446. data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/README +0 -0
  447. data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/lib/imagebrowser-plugin.js +160 -0
  448. data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/nls/ca/i18n.js +6 -0
  449. data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/nls/de/i18n.js +6 -0
  450. data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/nls/i18n.js +15 -0
  451. data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/nls/mk/i18n.js +6 -0
  452. data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/nls/pt-br/i18n.js +6 -0
  453. data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/nls/ru/i18n.js +6 -0
  454. data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/nls/uk/i18n.js +6 -0
  455. data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/nls/zh-hans/i18n.js +6 -0
  456. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ad.png +0 -0
  457. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ae.png +0 -0
  458. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/af.png +0 -0
  459. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ag.png +0 -0
  460. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ai.png +0 -0
  461. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/al.png +0 -0
  462. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/am.png +0 -0
  463. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/an.png +0 -0
  464. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ao.png +0 -0
  465. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ar.png +0 -0
  466. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/as.png +0 -0
  467. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/at.png +0 -0
  468. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/au.png +0 -0
  469. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/aw.png +0 -0
  470. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ax.png +0 -0
  471. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/az.png +0 -0
  472. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ba.png +0 -0
  473. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bb.png +0 -0
  474. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bd.png +0 -0
  475. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/be.png +0 -0
  476. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bf.png +0 -0
  477. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bg.png +0 -0
  478. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bh.png +0 -0
  479. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bi.png +0 -0
  480. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bj.png +0 -0
  481. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bm.png +0 -0
  482. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bn.png +0 -0
  483. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bo.png +0 -0
  484. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/br.png +0 -0
  485. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bs.png +0 -0
  486. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bt.png +0 -0
  487. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bv.png +0 -0
  488. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bw.png +0 -0
  489. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/by.png +0 -0
  490. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bz.png +0 -0
  491. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ca.png +0 -0
  492. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/catalonia.png +0 -0
  493. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cc.png +0 -0
  494. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cd.png +0 -0
  495. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cf.png +0 -0
  496. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cg.png +0 -0
  497. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ch.png +0 -0
  498. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ci.png +0 -0
  499. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ck.png +0 -0
  500. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cl.png +0 -0
  501. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cm.png +0 -0
  502. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cn.png +0 -0
  503. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/co.png +0 -0
  504. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cr.png +0 -0
  505. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cs.png +0 -0
  506. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cu.png +0 -0
  507. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cv.png +0 -0
  508. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cx.png +0 -0
  509. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cy.png +0 -0
  510. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cz.png +0 -0
  511. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/de.png +0 -0
  512. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/dj.png +0 -0
  513. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/dk.png +0 -0
  514. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/dm.png +0 -0
  515. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/do.png +0 -0
  516. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/dz.png +0 -0
  517. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ec.png +0 -0
  518. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ee.png +0 -0
  519. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/eg.png +0 -0
  520. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/eh.png +0 -0
  521. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/en.png +0 -0
  522. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/er.png +0 -0
  523. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/es.png +0 -0
  524. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/et.png +0 -0
  525. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/europeanunion.png +0 -0
  526. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fam.png +0 -0
  527. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fi.png +0 -0
  528. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fj.png +0 -0
  529. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fk.png +0 -0
  530. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fm.png +0 -0
  531. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fo.png +0 -0
  532. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fr.png +0 -0
  533. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ga.png +0 -0
  534. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gb.png +0 -0
  535. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gd.png +0 -0
  536. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ge.png +0 -0
  537. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gf.png +0 -0
  538. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gh.png +0 -0
  539. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gi.png +0 -0
  540. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gl.png +0 -0
  541. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gm.png +0 -0
  542. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gn.png +0 -0
  543. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gp.png +0 -0
  544. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gq.png +0 -0
  545. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gr.png +0 -0
  546. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gs.png +0 -0
  547. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gt.png +0 -0
  548. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gu.png +0 -0
  549. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gw.png +0 -0
  550. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gy.png +0 -0
  551. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/hk.png +0 -0
  552. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/hm.png +0 -0
  553. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/hn.png +0 -0
  554. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/hr.png +0 -0
  555. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ht.png +0 -0
  556. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/hu.png +0 -0
  557. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/id.png +0 -0
  558. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ie.png +0 -0
  559. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/il.png +0 -0
  560. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/in.png +0 -0
  561. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/io.png +0 -0
  562. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/iq.png +0 -0
  563. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ir.png +0 -0
  564. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/is.png +0 -0
  565. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/it.png +0 -0
  566. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/jm.png +0 -0
  567. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/jo.png +0 -0
  568. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/jp.png +0 -0
  569. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ke.png +0 -0
  570. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kg.png +0 -0
  571. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kh.png +0 -0
  572. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ki.png +0 -0
  573. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/km.png +0 -0
  574. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kn.png +0 -0
  575. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kp.png +0 -0
  576. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kr.png +0 -0
  577. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kw.png +0 -0
  578. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ky.png +0 -0
  579. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kz.png +0 -0
  580. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/la.png +0 -0
  581. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lb.png +0 -0
  582. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lc.png +0 -0
  583. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/li.png +0 -0
  584. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lk.png +0 -0
  585. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lr.png +0 -0
  586. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ls.png +0 -0
  587. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lt.png +0 -0
  588. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lu.png +0 -0
  589. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lv.png +0 -0
  590. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ly.png +0 -0
  591. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ma.png +0 -0
  592. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mc.png +0 -0
  593. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/md.png +0 -0
  594. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/me.png +0 -0
  595. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mg.png +0 -0
  596. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mh.png +0 -0
  597. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mk.png +0 -0
  598. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ml.png +0 -0
  599. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mm.png +0 -0
  600. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mn.png +0 -0
  601. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mo.png +0 -0
  602. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mp.png +0 -0
  603. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mq.png +0 -0
  604. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mr.png +0 -0
  605. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ms.png +0 -0
  606. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mt.png +0 -0
  607. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mu.png +0 -0
  608. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mv.png +0 -0
  609. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mw.png +0 -0
  610. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mx.png +0 -0
  611. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/my.png +0 -0
  612. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mz.png +0 -0
  613. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/na.png +0 -0
  614. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/nc.png +0 -0
  615. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ne.png +0 -0
  616. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/nf.png +0 -0
  617. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ng.png +0 -0
  618. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ni.png +0 -0
  619. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/nl.png +0 -0
  620. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/no.png +0 -0
  621. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/np.png +0 -0
  622. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/nr.png +0 -0
  623. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/nu.png +0 -0
  624. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/nz.png +0 -0
  625. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/om.png +0 -0
  626. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pa.png +0 -0
  627. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pe.png +0 -0
  628. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pf.png +0 -0
  629. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pg.png +0 -0
  630. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ph.png +0 -0
  631. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pk.png +0 -0
  632. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pl.png +0 -0
  633. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pm.png +0 -0
  634. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pn.png +0 -0
  635. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pr.png +0 -0
  636. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ps.png +0 -0
  637. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pt.png +0 -0
  638. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pw.png +0 -0
  639. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/py.png +0 -0
  640. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/qa.png +0 -0
  641. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/re.png +0 -0
  642. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ro.png +0 -0
  643. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/rs.png +0 -0
  644. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ru.png +0 -0
  645. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/rw.png +0 -0
  646. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sa.png +0 -0
  647. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sb.png +0 -0
  648. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sc.png +0 -0
  649. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/scotland.png +0 -0
  650. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sd.png +0 -0
  651. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/se.png +0 -0
  652. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sg.png +0 -0
  653. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sh.png +0 -0
  654. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/si.png +0 -0
  655. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sj.png +0 -0
  656. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sk.png +0 -0
  657. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sl.png +0 -0
  658. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sm.png +0 -0
  659. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sn.png +0 -0
  660. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/so.png +0 -0
  661. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sr.png +0 -0
  662. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/st.png +0 -0
  663. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sv.png +0 -0
  664. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sy.png +0 -0
  665. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sz.png +0 -0
  666. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tc.png +0 -0
  667. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/td.png +0 -0
  668. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tf.png +0 -0
  669. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tg.png +0 -0
  670. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/th.png +0 -0
  671. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tj.png +0 -0
  672. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tk.png +0 -0
  673. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tl.png +0 -0
  674. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tm.png +0 -0
  675. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tn.png +0 -0
  676. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/to.png +0 -0
  677. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tr.png +0 -0
  678. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tt.png +0 -0
  679. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tv.png +0 -0
  680. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tw.png +0 -0
  681. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tz.png +0 -0
  682. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ua.png +0 -0
  683. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ug.png +0 -0
  684. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/um.png +0 -0
  685. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/us.png +0 -0
  686. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/uy.png +0 -0
  687. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/uz.png +0 -0
  688. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/va.png +0 -0
  689. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/vc.png +0 -0
  690. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ve.png +0 -0
  691. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/vg.png +0 -0
  692. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/vi.png +0 -0
  693. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/vn.png +0 -0
  694. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/vu.png +0 -0
  695. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/wales.png +0 -0
  696. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/wf.png +0 -0
  697. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ws.png +0 -0
  698. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ye.png +0 -0
  699. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/yt.png +0 -0
  700. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/za.png +0 -0
  701. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/zm.png +0 -0
  702. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/zw.png +0 -0
  703. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/lib/linkbrowser-plugin.js +96 -100
  704. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/ca/i18n.js +6 -0
  705. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/de/i18n.js +6 -1
  706. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/i18n.js +14 -6
  707. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/mk/i18n.js +6 -0
  708. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/pt-br/i18n.js +6 -0
  709. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/ru/i18n.js +6 -1
  710. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/uk/i18n.js +6 -0
  711. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/zh-hans/i18n.js +6 -0
  712. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/nls/ca/i18n.js +28 -0
  713. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/nls/de/i18n.js +28 -0
  714. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/nls/i18n.js +37 -0
  715. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/nls/mk/i18n.js +28 -0
  716. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/nls/pt-br/i18n.js +28 -0
  717. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/nls/ru/i18n.js +28 -0
  718. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/nls/uk/i18n.js +28 -0
  719. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/nls/zh-hans/i18n.js +28 -0
  720. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/package.json +0 -0
  721. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/{proxy.php → proxy.php.example} +0 -0
  722. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/src/linkchecker.css +0 -0
  723. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/src/linkchecker.js +28 -15
  724. data/vendor/assets/javascripts/aloha/plugins/extra/listenforcer/lib/listenforcer-plugin.js +56 -31
  725. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/css/metaview.css +6 -14
  726. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/anchor.png +0 -0
  727. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/blockquote.png +0 -0
  728. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/button.png +0 -0
  729. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/caption.png +0 -0
  730. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/cite.png +0 -0
  731. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/dd.png +0 -0
  732. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/div.png +0 -0
  733. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/dl.png +0 -0
  734. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/dt.png +0 -0
  735. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/h1.png +0 -0
  736. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/h2.png +0 -0
  737. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/h3.png +0 -0
  738. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/h4.png +0 -0
  739. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/h5.png +0 -0
  740. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/h6.png +0 -0
  741. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/hr.png +0 -0
  742. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/icon_cite.png +0 -0
  743. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/p.png +0 -0
  744. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/pre.png +0 -0
  745. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/table.png +0 -0
  746. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/td.png +0 -0
  747. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/th.png +0 -0
  748. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/lib/metaview-plugin.js +178 -74
  749. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/ca/i18n.js +3 -0
  750. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/de/i18n.js +3 -1
  751. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/i18n.js +11 -4
  752. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/mk/i18n.js +3 -0
  753. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/pt-br/i18n.js +3 -0
  754. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/ru/i18n.js +3 -0
  755. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/uk/i18n.js +3 -0
  756. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/zh-hans/i18n.js +3 -0
  757. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/css/numerated-headers.css +1 -1
  758. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/img/headers.png +0 -0
  759. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/lib/numerated-headers-plugin.js +405 -217
  760. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/ca/i18n.js +5 -0
  761. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/de/i18n.js +5 -1
  762. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/i18n.js +13 -4
  763. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/mk/i18n.js +5 -0
  764. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/pt-br/i18n.js +5 -0
  765. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/ru/i18n.js +5 -0
  766. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/uk/i18n.js +5 -0
  767. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/zh-hans/i18n.js +5 -0
  768. data/vendor/assets/javascripts/aloha/plugins/extra/profiler/lib/profiler-plugin.js +29 -10
  769. data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/README.md +0 -0
  770. data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/css/ribbon.css +49 -5
  771. data/vendor/assets/javascripts/aloha/{img → plugins/extra/ribbon/img}/fade-in.png +0 -0
  772. data/vendor/assets/javascripts/aloha/{img → plugins/extra/ribbon/img}/fade-out.png +0 -0
  773. data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/lib/ribbon-plugin.js +108 -150
  774. data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/package.json +0 -0
  775. data/vendor/assets/javascripts/aloha/plugins/extra/sourceview/css/sourceview.css +18 -0
  776. data/vendor/assets/javascripts/aloha/plugins/extra/sourceview/lib/sourceview-plugin.js +252 -0
  777. data/vendor/assets/javascripts/aloha/plugins/extra/sourceview/vendor/htmlbeautifier.js +468 -0
  778. data/vendor/assets/javascripts/aloha/plugins/extra/textcolor/css/textcolor.css +50 -0
  779. data/vendor/assets/javascripts/aloha/{lib/vendor/ext-3.2.1/resources/images/gray/window/left-right.png → plugins/extra/textcolor/img/icon.png} +0 -0
  780. data/vendor/assets/javascripts/aloha/plugins/extra/textcolor/lib/textcolor-plugin.js +420 -0
  781. data/vendor/assets/javascripts/aloha/plugins/extra/textcolor/nls/de/i18n.js +3 -0
  782. data/vendor/assets/javascripts/aloha/plugins/extra/textcolor/nls/i18n.js +6 -0
  783. data/vendor/assets/javascripts/aloha/plugins/extra/toc/lib/toc-plugin.js +56 -39
  784. data/vendor/assets/javascripts/aloha/plugins/extra/toc/nls/ca/i18n.js +3 -0
  785. data/vendor/assets/javascripts/aloha/plugins/extra/toc/nls/de/i18n.js +3 -3
  786. data/vendor/assets/javascripts/aloha/plugins/extra/toc/nls/i18n.js +11 -3
  787. data/vendor/assets/javascripts/aloha/plugins/extra/toc/nls/mk/i18n.js +3 -0
  788. data/vendor/assets/javascripts/aloha/plugins/extra/toc/nls/pt-br/i18n.js +3 -0
  789. data/vendor/assets/javascripts/aloha/plugins/extra/toc/nls/ru/i18n.js +3 -0
  790. data/vendor/assets/javascripts/aloha/plugins/extra/toc/nls/uk/i18n.js +3 -0
  791. data/vendor/assets/javascripts/aloha/plugins/extra/toc/nls/zh-hans/i18n.js +3 -0
  792. data/vendor/assets/javascripts/aloha/plugins/extra/toc/package.json +0 -0
  793. data/vendor/assets/javascripts/aloha/plugins/extra/validation/lib/validation-plugin.js +277 -0
  794. metadata +293 -508
  795. data/vendor/assets/javascripts/aloha/css/ext-aloha-reset.css +0 -33
  796. data/vendor/assets/javascripts/aloha/css/ext-aloha.css +0 -360
  797. data/vendor/assets/javascripts/aloha/img/base-big.png +0 -0
  798. data/vendor/assets/javascripts/aloha/lib/aloha-bootstrap.js +0 -28276
  799. data/vendor/assets/javascripts/aloha/lib/aloha/ecma5.js +0 -194
  800. data/vendor/assets/javascripts/aloha/lib/aloha/ext-alohaproxy.js +0 -86
  801. data/vendor/assets/javascripts/aloha/lib/aloha/ext-alohareader.js +0 -50
  802. data/vendor/assets/javascripts/aloha/lib/aloha/ext-alohatreeloader.js +0 -77
  803. data/vendor/assets/javascripts/aloha/lib/aloha/ext.js +0 -32
  804. data/vendor/assets/javascripts/aloha/lib/aloha/floatingmenu.js +0 -1496
  805. data/vendor/assets/javascripts/aloha/lib/aloha/jquery.js +0 -34
  806. data/vendor/assets/javascripts/aloha/lib/aloha/jquery.patch.js +0 -115
  807. data/vendor/assets/javascripts/aloha/lib/aloha/message.js +0 -115
  808. data/vendor/assets/javascripts/aloha/lib/aloha/ui-attributefield.js +0 -530
  809. data/vendor/assets/javascripts/aloha/lib/aloha/ui-browser.js +0 -214
  810. data/vendor/assets/javascripts/aloha/lib/aloha/ui.js +0 -889
  811. data/vendor/assets/javascripts/aloha/lib/jquery-plugin.js +0 -49
  812. data/vendor/assets/javascripts/aloha/lib/order.js +0 -140
  813. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/adapter/jquery/ext-jquery-adapter-debug.js +0 -2470
  814. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/adapter/jquery/ext-jquery-adapter.js +0 -7
  815. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/ext-all-debug.js +0 -47708
  816. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/ext-all.js +0 -13
  817. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/gpl-3.0.txt +0 -674
  818. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/license.txt +0 -42
  819. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/charts.swf +0 -0
  820. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/css/ext-all.css +0 -5903
  821. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/css/ext-all.less +0 -6795
  822. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/css/xtheme-gray.css +0 -1692
  823. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/expressinstall.swf +0 -0
  824. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/box/corners-blue.gif +0 -0
  825. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/box/corners.gif +0 -0
  826. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/box/l-blue.gif +0 -0
  827. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/box/l.gif +0 -0
  828. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/box/r-blue.gif +0 -0
  829. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/box/r.gif +0 -0
  830. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/box/tb-blue.gif +0 -0
  831. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/box/tb.gif +0 -0
  832. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/arrow.gif +0 -0
  833. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/btn.gif +0 -0
  834. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/group-cs.gif +0 -0
  835. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/group-lr.gif +0 -0
  836. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/group-tb.gif +0 -0
  837. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/s-arrow-b-noline.gif +0 -0
  838. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/s-arrow-b.gif +0 -0
  839. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/s-arrow-bo.gif +0 -0
  840. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/s-arrow-noline.gif +0 -0
  841. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/s-arrow-o.gif +0 -0
  842. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/s-arrow.gif +0 -0
  843. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/dd/drop-add.gif +0 -0
  844. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/dd/drop-no.gif +0 -0
  845. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/dd/drop-yes.gif +0 -0
  846. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/editor/tb-sprite.gif +0 -0
  847. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/checkbox.gif +0 -0
  848. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/clear-trigger.gif +0 -0
  849. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/clear-trigger.psd +0 -0
  850. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/date-trigger.gif +0 -0
  851. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/date-trigger.psd +0 -0
  852. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/error-tip-corners.gif +0 -0
  853. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/exclamation.gif +0 -0
  854. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/radio.gif +0 -0
  855. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/search-trigger.gif +0 -0
  856. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/search-trigger.psd +0 -0
  857. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/text-bg.gif +0 -0
  858. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/trigger-square.gif +0 -0
  859. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/trigger-square.psd +0 -0
  860. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/trigger-tpl.gif +0 -0
  861. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/trigger.gif +0 -0
  862. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/trigger.psd +0 -0
  863. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/gradient-bg.gif +0 -0
  864. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/arrow-left-white.gif +0 -0
  865. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/arrow-right-white.gif +0 -0
  866. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/col-move-bottom.gif +0 -0
  867. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/col-move-top.gif +0 -0
  868. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/columns.gif +0 -0
  869. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/dirty.gif +0 -0
  870. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/done.gif +0 -0
  871. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/drop-no.gif +0 -0
  872. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/drop-yes.gif +0 -0
  873. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/footer-bg.gif +0 -0
  874. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid-blue-hd.gif +0 -0
  875. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid-blue-split.gif +0 -0
  876. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid-hrow.gif +0 -0
  877. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid-loading.gif +0 -0
  878. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid-split.gif +0 -0
  879. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid-vista-hd.gif +0 -0
  880. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid3-hd-btn.gif +0 -0
  881. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid3-hrow-over.gif +0 -0
  882. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid3-hrow.gif +0 -0
  883. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid3-special-col-bg.gif +0 -0
  884. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid3-special-col-sel-bg.gif +0 -0
  885. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/group-by.gif +0 -0
  886. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/group-collapse.gif +0 -0
  887. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/group-expand-sprite.gif +0 -0
  888. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/group-expand.gif +0 -0
  889. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/hd-pop.gif +0 -0
  890. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/hmenu-asc.gif +0 -0
  891. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/hmenu-desc.gif +0 -0
  892. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/hmenu-lock.gif +0 -0
  893. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/hmenu-lock.png +0 -0
  894. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/hmenu-unlock.gif +0 -0
  895. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/hmenu-unlock.png +0 -0
  896. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/invalid_line.gif +0 -0
  897. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/loading.gif +0 -0
  898. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/mso-hd.gif +0 -0
  899. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/nowait.gif +0 -0
  900. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/page-first-disabled.gif +0 -0
  901. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/page-first.gif +0 -0
  902. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/page-last-disabled.gif +0 -0
  903. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/page-last.gif +0 -0
  904. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/page-next-disabled.gif +0 -0
  905. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/page-next.gif +0 -0
  906. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/page-prev-disabled.gif +0 -0
  907. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/page-prev.gif +0 -0
  908. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/pick-button.gif +0 -0
  909. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/refresh.gif +0 -0
  910. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/row-check-sprite.gif +0 -0
  911. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/row-expand-sprite.gif +0 -0
  912. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/row-over.gif +0 -0
  913. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/row-sel.gif +0 -0
  914. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/sort-hd.gif +0 -0
  915. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/sort_asc.gif +0 -0
  916. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/sort_desc.gif +0 -0
  917. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/wait.gif +0 -0
  918. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/collapse.gif +0 -0
  919. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/expand.gif +0 -0
  920. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/gradient-bg.gif +0 -0
  921. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/mini-bottom.gif +0 -0
  922. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/mini-left.gif +0 -0
  923. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/mini-right.gif +0 -0
  924. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/mini-top.gif +0 -0
  925. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/ns-collapse.gif +0 -0
  926. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/ns-expand.gif +0 -0
  927. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/panel-close.gif +0 -0
  928. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/panel-title-bg.gif +0 -0
  929. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/panel-title-light-bg.gif +0 -0
  930. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/stick.gif +0 -0
  931. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/stuck.gif +0 -0
  932. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/tab-close-on.gif +0 -0
  933. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/tab-close.gif +0 -0
  934. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/menu/checked.gif +0 -0
  935. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/menu/group-checked.gif +0 -0
  936. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/menu/item-over.gif +0 -0
  937. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/menu/menu-parent.gif +0 -0
  938. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/menu/menu.gif +0 -0
  939. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/menu/unchecked.gif +0 -0
  940. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/corners-sprite.gif +0 -0
  941. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/left-right.gif +0 -0
  942. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/light-hd.gif +0 -0
  943. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/tool-sprite-tpl.gif +0 -0
  944. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/tool-sprites.gif +0 -0
  945. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/tools-sprites-trans.gif +0 -0
  946. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/top-bottom.gif +0 -0
  947. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/top-bottom.png +0 -0
  948. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/white-corners-sprite.gif +0 -0
  949. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/white-left-right.gif +0 -0
  950. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/white-top-bottom.gif +0 -0
  951. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/progress/progress-bg.gif +0 -0
  952. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/qtip/bg.gif +0 -0
  953. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/qtip/close.gif +0 -0
  954. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/qtip/tip-anchor-sprite.gif +0 -0
  955. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/qtip/tip-sprite.gif +0 -0
  956. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/s.gif +0 -0
  957. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shadow-c.png +0 -0
  958. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shadow-lr.png +0 -0
  959. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shadow.png +0 -0
  960. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/blue-loading.gif +0 -0
  961. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/calendar.gif +0 -0
  962. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/glass-bg.gif +0 -0
  963. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/hd-sprite.gif +0 -0
  964. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/large-loading.gif +0 -0
  965. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/left-btn.gif +0 -0
  966. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/loading-balls.gif +0 -0
  967. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/right-btn.gif +0 -0
  968. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/warning.gif +0 -0
  969. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/e-handle-dark.gif +0 -0
  970. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/e-handle.gif +0 -0
  971. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/ne-handle-dark.gif +0 -0
  972. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/ne-handle.gif +0 -0
  973. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/nw-handle-dark.gif +0 -0
  974. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/nw-handle.gif +0 -0
  975. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/s-handle-dark.gif +0 -0
  976. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/s-handle.gif +0 -0
  977. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/se-handle-dark.gif +0 -0
  978. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/se-handle.gif +0 -0
  979. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/square.gif +0 -0
  980. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/sw-handle-dark.gif +0 -0
  981. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/sw-handle.gif +0 -0
  982. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/slider/slider-bg.png +0 -0
  983. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/slider/slider-thumb.png +0 -0
  984. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/slider/slider-v-bg.png +0 -0
  985. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/slider/slider-v-thumb.png +0 -0
  986. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/scroll-left.gif +0 -0
  987. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/scroll-right.gif +0 -0
  988. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/scroller-bg.gif +0 -0
  989. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-btm-inactive-left-bg.gif +0 -0
  990. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-btm-inactive-right-bg.gif +0 -0
  991. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-btm-left-bg.gif +0 -0
  992. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-btm-over-left-bg.gif +0 -0
  993. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-btm-over-right-bg.gif +0 -0
  994. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-btm-right-bg.gif +0 -0
  995. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-close.gif +0 -0
  996. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-strip-bg.gif +0 -0
  997. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-strip-bg.png +0 -0
  998. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-strip-btm-bg.gif +0 -0
  999. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tabs-sprite.gif +0 -0
  1000. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/bg.gif +0 -0
  1001. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/btn-arrow-light.gif +0 -0
  1002. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/btn-arrow.gif +0 -0
  1003. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/btn-over-bg.gif +0 -0
  1004. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/gray-bg.gif +0 -0
  1005. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/more.gif +0 -0
  1006. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/tb-bg.gif +0 -0
  1007. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/tb-btn-sprite.gif +0 -0
  1008. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/tb-xl-btn-sprite.gif +0 -0
  1009. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/tb-xl-sep.gif +0 -0
  1010. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/arrows.gif +0 -0
  1011. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/drop-add.gif +0 -0
  1012. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/drop-between.gif +0 -0
  1013. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/drop-no.gif +0 -0
  1014. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/drop-over.gif +0 -0
  1015. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/drop-under.gif +0 -0
  1016. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/drop-yes.gif +0 -0
  1017. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-end-minus-nl.gif +0 -0
  1018. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-end-minus.gif +0 -0
  1019. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-end-plus-nl.gif +0 -0
  1020. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-end-plus.gif +0 -0
  1021. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-end.gif +0 -0
  1022. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-line.gif +0 -0
  1023. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-minus-nl.gif +0 -0
  1024. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-minus.gif +0 -0
  1025. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-plus-nl.gif +0 -0
  1026. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-plus.gif +0 -0
  1027. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow.gif +0 -0
  1028. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/folder-open.gif +0 -0
  1029. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/folder.gif +0 -0
  1030. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/leaf.gif +0 -0
  1031. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/loading.gif +0 -0
  1032. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/s.gif +0 -0
  1033. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/icon-error.gif +0 -0
  1034. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/icon-info.gif +0 -0
  1035. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/icon-question.gif +0 -0
  1036. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/icon-warning.gif +0 -0
  1037. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/left-corners.png +0 -0
  1038. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/left-corners.psd +0 -0
  1039. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/left-right.png +0 -0
  1040. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/left-right.psd +0 -0
  1041. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/right-corners.png +0 -0
  1042. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/right-corners.psd +0 -0
  1043. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/top-bottom.png +0 -0
  1044. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/top-bottom.psd +0 -0
  1045. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/button/btn-arrow.gif +0 -0
  1046. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/button/btn-sprite.gif +0 -0
  1047. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/button/btn.gif +0 -0
  1048. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/button/group-cs.gif +0 -0
  1049. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/button/group-lr.gif +0 -0
  1050. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/button/group-tb.gif +0 -0
  1051. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/button/s-arrow-bo.gif +0 -0
  1052. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/button/s-arrow-o.gif +0 -0
  1053. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/form/clear-trigger.gif +0 -0
  1054. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/form/date-trigger.gif +0 -0
  1055. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/form/search-trigger.gif +0 -0
  1056. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/form/trigger-square.gif +0 -0
  1057. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/form/trigger.gif +0 -0
  1058. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/gradient-bg.gif +0 -0
  1059. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/col-move-bottom.gif +0 -0
  1060. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/col-move-top.gif +0 -0
  1061. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/grid3-hd-btn.gif +0 -0
  1062. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/grid3-hrow-over.gif +0 -0
  1063. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/grid3-hrow-over2.gif +0 -0
  1064. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/grid3-hrow.gif +0 -0
  1065. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/grid3-hrow2.gif +0 -0
  1066. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/grid3-special-col-bg.gif +0 -0
  1067. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/grid3-special-col-bg2.gif +0 -0
  1068. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/grid3-special-col-sel-bg.gif +0 -0
  1069. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/group-collapse.gif +0 -0
  1070. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/group-expand-sprite.gif +0 -0
  1071. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/group-expand.gif +0 -0
  1072. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/page-first.gif +0 -0
  1073. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/page-last.gif +0 -0
  1074. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/page-next.gif +0 -0
  1075. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/page-prev.gif +0 -0
  1076. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/refresh.gif +0 -0
  1077. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/row-expand-sprite.gif +0 -0
  1078. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/sort_asc.gif +0 -0
  1079. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/sort_desc.gif +0 -0
  1080. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/menu/group-checked.gif +0 -0
  1081. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/menu/item-over-disabled.gif +0 -0
  1082. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/menu/item-over.gif +0 -0
  1083. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/menu/menu-parent.gif +0 -0
  1084. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/corners-sprite.gif +0 -0
  1085. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/left-right.gif +0 -0
  1086. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/light-hd.gif +0 -0
  1087. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/tool-sprite-tpl.gif +0 -0
  1088. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/tool-sprites.gif +0 -0
  1089. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/tools-sprites-trans.gif +0 -0
  1090. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/top-bottom.gif +0 -0
  1091. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/top-bottom.png +0 -0
  1092. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/white-corners-sprite.gif +0 -0
  1093. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/white-left-right.gif +0 -0
  1094. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/white-top-bottom.gif +0 -0
  1095. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/progress/progress-bg.gif +0 -0
  1096. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/qtip/bg.gif +0 -0
  1097. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/qtip/close.gif +0 -0
  1098. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/qtip/tip-anchor-sprite.gif +0 -0
  1099. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/qtip/tip-sprite.gif +0 -0
  1100. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/s.gif +0 -0
  1101. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/shared/hd-sprite.gif +0 -0
  1102. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/shared/left-btn.gif +0 -0
  1103. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/shared/right-btn.gif +0 -0
  1104. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/sizer/e-handle.gif +0 -0
  1105. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/sizer/ne-handle.gif +0 -0
  1106. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/sizer/nw-handle.gif +0 -0
  1107. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/sizer/s-handle.gif +0 -0
  1108. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/sizer/se-handle.gif +0 -0
  1109. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/sizer/square.gif +0 -0
  1110. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/sizer/sw-handle.gif +0 -0
  1111. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/slider/slider-thumb.png +0 -0
  1112. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/slider/slider-v-thumb.png +0 -0
  1113. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/scroll-left.gif +0 -0
  1114. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/scroll-right.gif +0 -0
  1115. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/scroller-bg.gif +0 -0
  1116. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-btm-inactive-left-bg.gif +0 -0
  1117. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-btm-inactive-right-bg.gif +0 -0
  1118. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-btm-left-bg.gif +0 -0
  1119. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-btm-over-left-bg.gif +0 -0
  1120. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-btm-over-right-bg.gif +0 -0
  1121. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-btm-right-bg.gif +0 -0
  1122. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-close.gif +0 -0
  1123. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-strip-bg.gif +0 -0
  1124. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-strip-bg.png +0 -0
  1125. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-strip-btm-bg.gif +0 -0
  1126. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tabs-sprite.gif +0 -0
  1127. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/toolbar/bg.gif +0 -0
  1128. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/toolbar/btn-arrow-light.gif +0 -0
  1129. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/toolbar/btn-arrow.gif +0 -0
  1130. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/toolbar/btn-over-bg.gif +0 -0
  1131. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/toolbar/gray-bg.gif +0 -0
  1132. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/toolbar/more.gif +0 -0
  1133. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/toolbar/tb-bg.gif +0 -0
  1134. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/toolbar/tb-btn-sprite.gif +0 -0
  1135. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tree/arrows.gif +0 -0
  1136. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tree/elbow-end-minus-nl.gif +0 -0
  1137. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tree/elbow-end-minus.gif +0 -0
  1138. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tree/elbow-end-plus-nl.gif +0 -0
  1139. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tree/elbow-end-plus.gif +0 -0
  1140. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/window/icon-error.gif +0 -0
  1141. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/window/icon-info.gif +0 -0
  1142. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/window/icon-question.gif +0 -0
  1143. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/window/icon-warning.gif +0 -0
  1144. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/window/left-corners.png +0 -0
  1145. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/window/left-corners.pspimage +0 -0
  1146. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/window/right-corners.png +0 -0
  1147. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/window/top-bottom.png +0 -0
  1148. data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/resources.jsb +0 -507
  1149. data/vendor/assets/javascripts/aloha/lib/vendor/jquery.json-2.2.min.js +0 -33
  1150. data/vendor/assets/javascripts/aloha/lib/vendor/jquery.store.js +0 -470
  1151. data/vendor/assets/javascripts/aloha/plugins/common/align/nls/en/i18n.js +0 -1
  1152. data/vendor/assets/javascripts/aloha/plugins/common/align/nls/fr/i18n.js +0 -1
  1153. data/vendor/assets/javascripts/aloha/plugins/common/block/lib/jquery-ui-1.8.16.custom.min.js +0 -198
  1154. data/vendor/assets/javascripts/aloha/plugins/common/format/css/format.css +0 -8
  1155. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/eo/i18n.js +0 -1
  1156. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/fi/i18n.js +0 -1
  1157. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/fr/i18n.js +0 -1
  1158. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/it/i18n.js +0 -1
  1159. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/pl/i18n.js +0 -1
  1160. data/vendor/assets/javascripts/aloha/plugins/common/image/AGPL3 +0 -661
  1161. data/vendor/assets/javascripts/aloha/plugins/common/image/LICENSE +0 -25
  1162. data/vendor/assets/javascripts/aloha/plugins/common/image/demo/crop.html +0 -76
  1163. data/vendor/assets/javascripts/aloha/plugins/common/image/demo/crop.php +0 -21
  1164. data/vendor/assets/javascripts/aloha/plugins/common/image/demo/cropnresize.jpg +0 -0
  1165. data/vendor/assets/javascripts/aloha/plugins/common/image/demo/index.html +0 -120
  1166. data/vendor/assets/javascripts/aloha/plugins/common/image/nls/cz/i18n.js +0 -16
  1167. data/vendor/assets/javascripts/aloha/plugins/common/image/nls/fr/i18n.js +0 -1
  1168. data/vendor/assets/javascripts/aloha/plugins/common/image/test/test.css +0 -12
  1169. data/vendor/assets/javascripts/aloha/plugins/common/image/test/test.html +0 -40
  1170. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/jquery-ui-1.8.10.custom.min.js +0 -97
  1171. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/jquery-ui-1.8.10.cropnresize.css +0 -33
  1172. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/jquery-ui-1.8.10.custom.css +0 -314
  1173. data/vendor/assets/javascripts/aloha/plugins/common/link/demo/background.png +0 -0
  1174. data/vendor/assets/javascripts/aloha/plugins/common/link/demo/external-link-ltr-icon.png +0 -0
  1175. data/vendor/assets/javascripts/aloha/plugins/common/link/demo/index.css +0 -91
  1176. data/vendor/assets/javascripts/aloha/plugins/common/link/demo/index.html +0 -91
  1177. data/vendor/assets/javascripts/aloha/plugins/common/link/nls/fr/i18n.js +0 -6
  1178. data/vendor/assets/javascripts/aloha/plugins/common/link/nls/pl/i18n.js +0 -6
  1179. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/eo/i18n.js +0 -1
  1180. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/fi/i18n.js +0 -1
  1181. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/fr/i18n.js +0 -1
  1182. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/it/i18n.js +0 -1
  1183. data/vendor/assets/javascripts/aloha/plugins/common/paste/README.md +0 -3
  1184. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/eo/i18n.js +0 -1
  1185. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/fi/i18n.js +0 -1
  1186. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/fr/i18n.js +0 -1
  1187. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/it/i18n.js +0 -1
  1188. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/pl/i18n.js +0 -1
  1189. data/vendor/assets/javascripts/aloha/plugins/common/undo/demo/index.css +0 -49
  1190. data/vendor/assets/javascripts/aloha/plugins/common/undo/demo/index.html +0 -85
  1191. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/en/i18n.js +0 -1
  1192. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/browser.css +0 -360
  1193. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/browser.jqgrid.css +0 -374
  1194. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  1195. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  1196. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  1197. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  1198. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  1199. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  1200. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  1201. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  1202. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-icons_222222_256x240.png +0 -0
  1203. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-icons_2e83ff_256x240.png +0 -0
  1204. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-icons_454545_256x240.png +0 -0
  1205. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-icons_888888_256x240.png +0 -0
  1206. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-icons_cd0a0a_256x240.png +0 -0
  1207. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/jquery-ui-1.8.13.custom.css +0 -319
  1208. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/throbber.gif +0 -0
  1209. data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/ui.jqgrid.css +0 -148
  1210. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/arrow-000-medium.png +0 -0
  1211. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/arrow-180.png +0 -0
  1212. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/arrow-315-medium.png +0 -0
  1213. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/arrow-stop-180.png +0 -0
  1214. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/arrow-stop.png +0 -0
  1215. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/arrow.png +0 -0
  1216. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/control-stop-square-small.png +0 -0
  1217. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/folder-horizontal-open.png +0 -0
  1218. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/folder-open.png +0 -0
  1219. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/gcn-icons/gcn-icon-file.gif +0 -0
  1220. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/gcn-icons/gcn-icon-image.gif +0 -0
  1221. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/gcn-icons/gcn-icon-page.gif +0 -0
  1222. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/magnifier-left.png +0 -0
  1223. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/page.png +0 -0
  1224. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/picture.png +0 -0
  1225. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/sort-alphabet-descending.png +0 -0
  1226. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/sort-alphabet.png +0 -0
  1227. data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/throbber.gif +0 -0
  1228. data/vendor/assets/javascripts/aloha/plugins/extra/browser/lib/browser-plugin.js +0 -10
  1229. data/vendor/assets/javascripts/aloha/plugins/extra/browser/lib/browser.js +0 -1126
  1230. data/vendor/assets/javascripts/aloha/plugins/extra/browser/lib/locale.js +0 -26
  1231. data/vendor/assets/javascripts/aloha/plugins/extra/browser/nls/de.json +0 -1
  1232. data/vendor/assets/javascripts/aloha/plugins/extra/browser/nls/de/i18n.js +0 -18
  1233. data/vendor/assets/javascripts/aloha/plugins/extra/browser/nls/en.json +0 -1
  1234. data/vendor/assets/javascripts/aloha/plugins/extra/browser/nls/en/i18n.js +0 -18
  1235. data/vendor/assets/javascripts/aloha/plugins/extra/browser/nls/i18n.js +0 -4
  1236. data/vendor/assets/javascripts/aloha/plugins/extra/browser/vendor/jquery.ui.js +0 -761
  1237. data/vendor/assets/javascripts/aloha/plugins/extra/browser/vendor/ui-layout.js +0 -113
  1238. data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/en/i18n.js +0 -1
  1239. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/AGPL3 +0 -661
  1240. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/LICENSE +0 -25
  1241. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/demo/index.css +0 -47
  1242. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/demo/index.html +0 -101
  1243. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/demo/migration/index.css +0 -189
  1244. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/demo/migration/index.html +0 -321
  1245. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/demo/specs/DragnDropnImage.graphml +0 -677
  1246. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/demo/style.css +0 -47
  1247. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/demo/upload.php +0 -26
  1248. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/i18n/en.json +0 -1
  1249. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/i18n/fr.json +0 -1
  1250. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/en/i18n.js +0 -1
  1251. data/vendor/assets/javascripts/aloha/plugins/extra/hints/dep/jquery.poshytip.js +0 -470
  1252. data/vendor/assets/javascripts/aloha/plugins/extra/hints/i18n/de.json +0 -1
  1253. data/vendor/assets/javascripts/aloha/plugins/extra/hints/i18n/en.json +0 -1
  1254. data/vendor/assets/javascripts/aloha/plugins/extra/hints/img/tip-twitter_arrows.gif +0 -0
  1255. data/vendor/assets/javascripts/aloha/plugins/extra/hints/src/hints.css +0 -61
  1256. data/vendor/assets/javascripts/aloha/plugins/extra/hints/src/hints.js +0 -49
  1257. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/fr/i18n.js +0 -1
  1258. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/pl/i18n.js +0 -1
  1259. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/demo/index.css +0 -49
  1260. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/demo/index.html +0 -82
  1261. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/i18n/en.json +0 -1
  1262. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/de.json +0 -1
  1263. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/en.json +0 -1
  1264. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/en/i18n.js +0 -1
  1265. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/demo/index.css +0 -189
  1266. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/demo/index.html +0 -139
  1267. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/demo/js/aloha-config.js +0 -115
  1268. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/en/i18n.js +0 -1
  1269. data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/LICENSE.md +0 -662
  1270. data/vendor/assets/javascripts/aloha/plugins/extra/vie/LICENSE +0 -22
  1271. data/vendor/assets/javascripts/aloha/plugins/extra/vie/README.markdown +0 -65
  1272. data/vendor/assets/javascripts/aloha/plugins/extra/vie/demo/index.html +0 -93
  1273. data/vendor/assets/javascripts/aloha/plugins/extra/vie/img/cms-decoupled-communications.png +0 -0
  1274. data/vendor/assets/javascripts/aloha/plugins/extra/vie/package.json +0 -1
  1275. data/vendor/assets/javascripts/aloha/plugins/extra/vie/src/backbone-min.js +0 -27
  1276. data/vendor/assets/javascripts/aloha/plugins/extra/vie/src/underscore-min.js +0 -25
  1277. data/vendor/assets/javascripts/aloha/plugins/extra/vie/src/vie-aloha.js +0 -74
  1278. data/vendor/assets/javascripts/aloha/plugins/extra/vie/src/vie-collectionmanager.js +0 -70
  1279. data/vendor/assets/javascripts/aloha/plugins/extra/vie/src/vie-containermanager.js +0 -263
  1280. data/vendor/assets/javascripts/aloha/plugins/extra/vie/src/vie.js +0 -20
@@ -1,1255 +1,1272 @@
1
- /*!
2
- * This file is part of Aloha Editor Project http://aloha-editor.org
3
- * Copyright © 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
- define([
22
- 'aloha/core',
23
- 'util/class',
24
- 'aloha/jquery',
25
- 'aloha/ecma5shims'
26
- ],
27
- function( Aloha, Class, jQuery, shims ) {
28
-
29
-
30
-
31
- var GENTICS = window.GENTICS;
32
-
33
- var isOldIE = !!( jQuery.browser.msie &&
34
- 9 > parseInt( jQuery.browser.version, 10 ) );
35
-
36
- function isBR( node ) {
37
- return 'BR' === node.nodeName;
38
- }
39
-
40
- function isBlock( node ) {
41
- return 'false' === jQuery( node ).attr( 'contenteditable' );
42
- }
43
-
44
- function isTextNode( node ) {
45
- return node && 3 === node.nodeType; // Node.TEXT_NODE
46
- }
47
-
48
- function nodeLength( node ) {
49
- return !node ? 0
50
- : ( isTextNode( node ) ? node.length
51
- : node.childNodes.length );
52
- }
53
-
54
- function nextVisibleNode( node ) {
55
- if ( !node ) {
56
- return null;
57
- }
58
-
59
- if ( node.nextSibling ) {
60
- // Skip over nodes that the user cannot see ...
61
- if ( isTextNode( node.nextSibling ) &&
62
- !isVisibleTextNode( node.nextSibling ) ) {
63
- return nextVisibleNode( node.nextSibling );
64
- }
65
-
66
- // Skip over propping <br>s ...
67
- if ( isBR( node.nextSibling ) &&
68
- node.nextSibling === node.parentNode.lastChild ) {
69
- return nextVisibleNode( node.nextSibling );
70
- }
71
-
72
- // Skip over empty editable elements ...
73
- if ( '' === node.nextSibling.innerHTML &&
74
- !isBlock( node.nextSibling ) ) {
75
- return nextVisibleNode( node.nextSibling );
76
- }
77
-
78
- return node.nextSibling;
79
- }
80
-
81
- if ( node.parentNode ) {
82
- return nextVisibleNode( node.parentNode );
83
- }
84
-
85
- return null;
86
- }
87
-
88
- function prevVisibleNode( node ) {
89
- if ( !node ) {
90
- return null;
91
- }
92
-
93
- if ( node.previousSibling ) {
94
- // Skip over nodes that the user cannot see...
95
- if ( isTextNode( node.previousSibling ) &&
96
- !isVisibleTextNode( node.previousSibling ) ) {
97
- return prevVisibleNode( node.previousSibling );
98
- }
99
-
100
- // Skip over empty editable elements ...
101
- if ( '' === node.previousSibling.innerHTML &&
102
- !isBlock( node.previousSibling ) ) {
103
- return prevVisibleNode( node.previouSibling );
104
- }
105
-
106
- return node.previousSibling;
107
- }
108
-
109
- if ( node.parentNode ) {
110
- return prevVisibleNode( node.parentNode );
111
- }
112
-
113
- return null;
114
- }
115
-
116
- /**
117
- * Determines whether the given text node is visible to the the user,
118
- * based on our understanding that browsers will not display
119
- * superfluous white spaces.
120
- *
121
- * @param {HTMLEmenent} node The text node to be checked.
122
- */
123
- function isVisibleTextNode( node ) {
124
- return 0 < node.data.replace( /\s+/g, '' ).length;
125
- }
126
-
127
- function isFrontPosition( node, offset ) {
128
- return ( 0 === offset ) ||
129
- ( offset <= node.data.length -
130
- node.data.replace( /^\s+/, '' ).length );
131
- }
132
-
133
- function isBlockInsideEditable( $block ) {
134
- return $block.parent().hasClass( 'aloha-editable' );
135
- }
136
-
137
- function isEndPosition( node, offset ) {
138
- var length = nodeLength( node );
139
-
140
- if ( length === offset ) {
141
- return true;
142
- }
143
-
144
- var isText = isTextNode( node );
145
-
146
- // If within a text node, then ignore superfluous white-spaces,
147
- // since they are invisible to the user.
148
- if ( isText &&
149
- node.data.replace( /\s+$/, '' ).length === offset ) {
150
- return true;
151
- }
152
-
153
- if ( 1 === length && !isText ) {
154
- return isBR( node.childNodes[0] );
155
- }
156
-
157
- return false;
158
- }
159
-
160
- function blink( node ) {
161
- jQuery( node )
162
- .stop( true )
163
- .css({ opacity: 0 })
164
- .fadeIn( 0 ).delay( 100 )
165
- .fadeIn(function () {
166
- jQuery( node ).css({ opacity: 1 });
167
- });
168
-
169
- return node;
170
- }
171
-
172
- /**
173
- * @TODO(petro): We need to be more intelligent about whether we insert a
174
- * block-level placeholder or a phrasing level element.
175
- * @TODO(petro): test with <pre>
176
- */
177
- function jumpBlock( block, isGoingLeft ) {
178
- var range = new GENTICS.Utils.RangeObject();
179
- var sibling = isGoingLeft ? prevVisibleNode( block )
180
- : nextVisibleNode( block );
181
-
182
- if ( !sibling || isBlock( sibling ) ) {
183
- var $landing = jQuery( '<div>&nbsp;</div>' );
184
-
185
- if ( isGoingLeft ) {
186
- jQuery( block ).before( $landing );
187
- } else {
188
- jQuery( block ).after( $landing );
189
- }
190
-
191
- range.startContainer = range.endContainer = $landing[0];
192
- range.startOffset = range.endOffset = 0;
193
-
194
- // Clear out any old placeholder first ...
195
- cleanupPlaceholders( range );
196
-
197
- window.$_alohaPlaceholder = $landing;
198
- } else {
199
- range.startContainer = range.endContainer = sibling;
200
- range.startOffset = range.endOffset = isGoingLeft ?
201
- nodeLength( sibling ) : ( isOldIE ? 1 : 0 );
202
-
203
- cleanupPlaceholders( range );
204
- }
205
-
206
- range.select();
207
-
208
- Aloha.trigger( 'aloha-block-selected', block );
209
- Aloha.Selection.preventSelectionChanged();
210
- }
211
-
212
- function nodeContains( node1, node2 ) {
213
- return isOldIE ? ( shims.compareDocumentPosition( node1, node2 ) & 16 )
214
- : 0 < jQuery( node1 ).find( node2 ).length;
215
- }
216
-
217
- function isInsidePlaceholder( range ) {
218
- var start = range.startContainer;
219
- var end = range.endContainer;
220
- var $placeholder = window.$_alohaPlaceholder;
221
-
222
- return $placeholder.is( start ) ||
223
- $placeholder.is( end ) ||
224
- nodeContains( $placeholder[0], start ) ||
225
- nodeContains( $placeholder[0], end );
226
- }
227
-
228
- function cleanupPlaceholders( range ) {
229
- if ( window.$_alohaPlaceholder && !isInsidePlaceholder( range ) ) {
230
- if ( 0 === window.$_alohaPlaceholder.html()
231
- .replace( /^(&nbsp;)*$/, '' ).length ) {
232
- window.$_alohaPlaceholder.remove();
233
- }
234
-
235
- window.$_alohaPlaceholder = null;
236
- }
237
- }
238
-
239
- /**
240
- * Markup object
241
- */
242
- Aloha.Markup = Class.extend( {
243
-
244
- /**
245
- * Key handlers for special key codes
246
- */
247
- keyHandlers: {},
248
-
249
- /**
250
- * Add a key handler for the given key code
251
- * @param keyCode key code
252
- * @param handler handler function
253
- */
254
- addKeyHandler: function( keyCode, handler ) {
255
- if ( !this.keyHandlers[ keyCode ] ) {
256
- this.keyHandlers[ keyCode ] = [];
257
- }
258
-
259
- this.keyHandlers[ keyCode ].push( handler );
260
- },
261
-
262
- insertBreak: function() {
263
- var range = Aloha.Selection.rangeObject,
264
- onWSIndex,
265
- nextTextNode,
266
- newBreak;
267
-
268
- if ( !range.isCollapsed() ) {
269
- this.removeSelectedMarkup();
270
- }
271
-
272
- newBreak = jQuery( '<br/>' );
273
- GENTICS.Utils.Dom.insertIntoDOM( newBreak, range, Aloha.activeEditable.obj );
274
-
275
- nextTextNode = GENTICS.Utils.Dom.searchAdjacentTextNode(
276
- newBreak.parent().get( 0 ),
277
- GENTICS.Utils.Dom.getIndexInParent( newBreak.get( 0 ) ) + 1,
278
- false
279
- );
280
-
281
- if ( nextTextNode ) {
282
- // trim leading whitespace
283
- nonWSIndex = nextTextNode.data.search( /\S/ );
284
- if ( nonWSIndex > 0 ) {
285
- nextTextNode.data = nextTextNode.data.substring( nonWSIndex );
286
- }
287
- }
288
-
289
- range.startContainer = range.endContainer = newBreak.get( 0 ).parentNode;
290
- range.startOffset = range.endOffset = GENTICS.Utils.Dom.getIndexInParent( newBreak.get( 0 ) ) + 1;
291
- range.correctRange();
292
- range.clearCaches();
293
- range.select();
294
- },
295
-
296
- /**
297
- * first method to handle key strokes
298
- * @param event DOM event
299
- * @param rangeObject as provided by Aloha.Selection.getRangeObject();
300
- * @return "Aloha.Selection"
301
- */
302
- preProcessKeyStrokes: function( event ) {
303
- if ( event.type !== 'keydown' ) {
304
- return false;
305
- }
306
-
307
- var rangeObject = Aloha.Selection.rangeObject,
308
- handlers,
309
- i;
310
-
311
- if ( this.keyHandlers[ event.keyCode ] ) {
312
- handlers = this.keyHandlers[ event.keyCode ];
313
- for ( i = 0; i < handlers.length; ++i ) {
314
- if ( !handlers[i]( event ) ) {
315
- return false;
316
- }
317
- }
318
- }
319
-
320
- // LEFT (37), RIGHT (39) keys for block detection
321
- if ( event.keyCode === 37 || event.keyCode === 39 ) {
322
- if ( this.processCursor( rangeObject, event.keyCode ) ) {
323
- cleanupPlaceholders( Aloha.Selection.rangeObject );
324
- return true;
325
- }
326
-
327
- return false;
328
- }
329
-
330
- // BACKSPACE
331
- if ( event.keyCode === 8 ) {
332
- event.preventDefault(); // prevent history.back() even on exception
333
- Aloha.execCommand( 'delete', false );
334
- return false;
335
- }
336
-
337
- // DELETE
338
- if ( event.keyCode === 46 ) {
339
- Aloha.execCommand( 'forwarddelete', false );
340
- return false;
341
- }
342
-
343
- // ENTER
344
- if ( event.keyCode === 13 ) {
345
- if ( event.shiftKey ) {
346
- Aloha.execCommand( 'insertlinebreak', false );
347
- return false;
348
- } else {
349
- Aloha.execCommand( 'insertparagraph', false );
350
- return false;
351
- }
352
- }
353
-
354
- return true;
355
- },
356
-
357
- /**
358
- * Processing of cursor keys.
359
- * Detect blocks (elements with contenteditable=false) and will select them
360
- * (normally the cursor would simply jump right past them).
361
- *
362
- * For each block that is selected, an 'aloha-block-selected' event will be
363
- * triggered.
364
- *
365
- * @param {RangyRange} range A range object for the current selection.
366
- * @param {number} keyCode Code of the currently pressed key.
367
- * @return {boolean} False if a block was found, to prevent further events,
368
- * true otherwise.
369
- */
370
- processCursor: function( range, keyCode ) {
371
- if ( !range.isCollapsed() ) {
372
- return true;
373
- }
374
-
375
- var node = range.startContainer;
376
-
377
- if ( !node ) {
378
- return true;
379
- }
380
-
381
- var sibling;
382
-
383
- // Versions of Internet Explorer that are older that 9, will
384
- // erroneously allow you to enter and edit inside elements which have
385
- // their contenteditable attribute set to false...
386
- if ( isOldIE ) {
387
- var $parentBlock = jQuery( node ).parents(
388
- '[contenteditable=false]' );
389
- var isInsideBlock = $parentBlock.length > 0;
390
-
391
- if ( isInsideBlock ) {
392
- if ( isBlockInsideEditable( $parentBlock ) ) {
393
- sibling = $parentBlock[0];
394
- } else {
395
- return true;
396
- }
397
- }
398
- }
399
-
400
- if ( !sibling ) {
401
- // True if keyCode denotes LEFT or UP arrow key, otherwise they
402
- // keyCode is for RIGHT or DOWN in which this value will be false.
403
- var isLeft = (37 === keyCode || 38 === keyCode);
404
- var offset = range.startOffset;
405
-
406
- if ( isTextNode( node ) ) {
407
- if ( isLeft ) {
408
- // FIXME(Petro): Please consider if you have a better idea
409
- // of how we can work around this.
410
- //
411
- // Here is the problem... with Internet Explorer:
412
- // ----------------------------------------------
413
- //
414
- // Versions of Internet Explorer older than 9, are buggy in
415
- // how they `select()', or position a selection from cursor
416
- // movements, when the following conditions are true:
417
- //
418
- // * The range is collapsed.
419
- // * startContainer is a contenteditable text node.
420
- // * startOffset is 1.
421
- // * There is a non-conenteditable element left of the
422
- // startContainer.
423
- // * You attempt to move left to offset 0 (we consider a
424
- // range to be at "frontposition" if it is at offset 0
425
- // within its startContainer).
426
- //
427
- // What happens in IE 7, and IE 8, is that the selection
428
- // will jump to the adjacent non-contenteditable
429
- // element(s), instead moving to the front of the
430
- // container, and the offset will be stuck at 1--even as
431
- // the cursor is jumping around the screen!
432
- //
433
- // Our imperfect work-around is to reckon ourselves to be
434
- // at the front of the next node (ie: offset 0 in other
435
- // browsers), as soon as we detect that we are at offset 1
436
- // in IEv<9.
437
- //
438
- // Considering the bug, I think this is acceptable because
439
- // the user can still position themselve right between the
440
- // block (non-contenteditable element) and the first
441
- // characater of the text node by clicking there with the
442
- // mouse, since this seems to work fine in all IE versions.
443
- var isFrontPositionInIE = isOldIE && 1 === offset;
444
-
445
- if ( !isFrontPositionInIE &&
446
- !isFrontPosition( node, offset ) ) {
447
- return true;
448
- }
449
-
450
- } else if ( !isEndPosition( node, offset ) ) {
451
- return true;
452
- }
453
-
454
- } else {
455
- node = node.childNodes[
456
- offset === nodeLength( node ) ? offset - 1 : offset ];
457
- }
458
-
459
- sibling = isLeft ? prevVisibleNode( node )
460
- : nextVisibleNode( node );
461
- }
462
-
463
- if ( isBlock( sibling ) ) {
464
- jumpBlock( sibling, isLeft );
465
- return false;
466
- }
467
-
468
- return true;
469
- },
470
-
471
- /**
472
- * method handling shiftEnter
473
- * @param Aloha.Selection.SelectionRange of the current selection
474
- * @return void
475
- */
476
- processShiftEnter: function( rangeObject ) {
477
- this.insertHTMLBreak( rangeObject.getSelectionTree(), rangeObject );
478
- },
479
-
480
- /**
481
- * method handling Enter
482
- * @param Aloha.Selection.SelectionRange of the current selection
483
- * @return void
484
- */
485
- processEnter: function( rangeObject ) {
486
- if ( rangeObject.splitObject ) {
487
- // now comes a very evil hack for ie, when the enter is pressed in a text node in an li element, we just append an empty text node
488
- // if ( jQuery.browser.msie
489
- // && GENTICS.Utils.Dom
490
- // .isListElement( rangeObject.splitObject ) ) {
491
- // jQuery( rangeObject.splitObject ).append(
492
- // jQuery( document.createTextNode( '' ) ) );
493
- // }
494
- this.splitRangeObject( rangeObject );
495
- } else { // if there is no split object, the Editable is the paragraph type itself (e.g. a p or h2)
496
- this.insertHTMLBreak( rangeObject.getSelectionTree(), rangeObject );
497
- }
498
- },
499
-
500
- /**
501
- * Insert the given html markup at the current selection
502
- * @param html html markup to be inserted
503
- */
504
- insertHTMLCode: function( html ) {
505
- var rangeObject = Aloha.Selection.rangeObject;
506
- this.insertHTMLBreak( rangeObject.getSelectionTree(), rangeObject, jQuery( html ) );
507
- },
508
-
509
- /**
510
- * insert an HTML Break <br /> into current selection
511
- * @param Aloha.Selection.SelectionRange of the current selection
512
- * @return void
513
- */
514
- insertHTMLBreak: function( selectionTree, rangeObject, inBetweenMarkup ) {
515
- var i,
516
- treeLength,
517
- el,
518
- jqEl,
519
- jqElBefore,
520
- jqElAfter,
521
- tmpObject,
522
- offset,
523
- checkObj;
524
-
525
- inBetweenMarkup = inBetweenMarkup ? inBetweenMarkup: jQuery( '<br/>' );
526
-
527
- for ( i = 0, treeLength = selectionTree.length; i < treeLength; ++i ) {
528
- el = selectionTree[ i ];
529
- jqEl = el.domobj ? jQuery( el.domobj ) : undefined;
530
-
531
- if ( el.selection !== 'none' ) { // before cursor, leave this part inside the splitObject
532
- if ( el.selection == 'collapsed' ) {
533
- // collapsed selection found (between nodes)
534
- if ( i > 0 ) {
535
- // not at the start, so get the element to the left
536
- jqElBefore = jQuery( selectionTree[ i - 1 ].domobj );
537
-
538
- // and insert the break after it
539
- jqElBefore.after( inBetweenMarkup );
540
-
541
- } else {
542
- // at the start, so get the element to the right
543
- jqElAfter = jQuery( selectionTree[1].domobj );
544
-
545
- // and insert the break before it
546
- jqElAfter.before( inBetweenMarkup );
547
- }
548
-
549
- // now set the range
550
- rangeObject.startContainer = rangeObject.endContainer = inBetweenMarkup[0].parentNode;
551
- rangeObject.startOffset = rangeObject.endOffset = GENTICS.Utils.Dom.getIndexInParent( inBetweenMarkup[0] ) + 1;
552
- rangeObject.correctRange();
553
-
554
- } else if ( el.domobj && el.domobj.nodeType === 3 ) { // textNode
555
- // when the textnode is immediately followed by a blocklevel element (like p, h1, ...) we need to add an additional br in between
556
- if ( el.domobj.nextSibling
557
- && el.domobj.nextSibling.nodeType == 1
558
- && Aloha.Selection.replacingElements[
559
- el.domobj.nextSibling.nodeName.toLowerCase()
560
- ] ) {
561
- // TODO check whether this depends on the browser
562
- jqEl.after( '<br/>' );
563
- }
564
-
565
- if ( this.needEndingBreak() ) {
566
- // when the textnode is the last inside a blocklevel element
567
- // (like p, h1, ...) we need to add an additional br as very
568
- // last object in the blocklevel element
569
- checkObj = el.domobj;
570
-
571
- while ( checkObj ) {
572
- if ( checkObj.nextSibling ) {
573
- checkObj = false;
574
- } else {
575
- // go to the parent
576
- checkObj = checkObj.parentNode;
577
-
578
- // found a blocklevel or list element, we are done
579
- if ( GENTICS.Utils.Dom.isBlockLevelElement( checkObj )
580
- || GENTICS.Utils.Dom.isListElement( checkObj ) ) {
581
- break;
582
- }
583
-
584
- // reached the limit object, we are done
585
- if ( checkObj === rangeObject.limitObject ) {
586
- checkObj = false;
587
- }
588
- }
589
- }
590
-
591
- // when we found a blocklevel element, insert a break at the
592
- // end. Mark the break so that it is cleaned when the
593
- // content is fetched.
594
- if ( checkObj ) {
595
- jQuery( checkObj ).append( '<br class="aloha-cleanme" />' );
596
- }
597
- }
598
-
599
- // insert the break
600
- jqEl.between( inBetweenMarkup, el.startOffset );
601
-
602
- // correct the range
603
- // count the number of previous siblings
604
- offset = 0;
605
- tmpObject = inBetweenMarkup[0];
606
- while ( tmpObject ) {
607
- tmpObject = tmpObject.previousSibling;
608
- ++offset;
609
- }
610
-
611
- rangeObject.startContainer = inBetweenMarkup[0].parentNode;
612
- rangeObject.endContainer = inBetweenMarkup[0].parentNode;
613
- rangeObject.startOffset = offset;
614
- rangeObject.endOffset = offset;
615
- rangeObject.correctRange();
616
-
617
- } else if ( el.domobj && el.domobj.nodeType === 1 ) { // other node, normally a break
618
- if ( jqEl.parent().find( 'br.aloha-ephemera' ).length === 0 ) {
619
- // but before putting it, remove all:
620
- jQuery( rangeObject.limitObject ).find( 'br.aloha-ephemera' ).remove();
621
-
622
- // now put it:
623
- jQuery( rangeObject.commonAncestorContainer )
624
- .append( this.getFillUpElement( rangeObject.splitObject ) );
625
- }
626
-
627
- jqEl.after( inBetweenMarkup );
628
-
629
- // now set the selection. Since we just added one break do the currect el
630
- // the new position must be el's position + 1. el's position is the index
631
- // of the el in the selection tree, which is i. then we must add
632
- // another +1 because we want to be AFTER the object, not before. therefor +2
633
- rangeObject.startContainer = rangeObject.commonAncestorContainer;
634
- rangeObject.endContainer = rangeObject.startContainer;
635
- rangeObject.startOffset = i + 2;
636
- rangeObject.endOffset = i + 2;
637
- rangeObject.update();
638
- }
639
- }
640
- }
641
- rangeObject.select();
642
- },
643
-
644
- /**
645
- * Check whether blocklevel elements need breaks at the end to visibly render a newline
646
- * @return true if an ending break is necessary, false if not
647
- */
648
- needEndingBreak: function() {
649
- // currently, all browser except IE need ending breaks
650
- return !jQuery.browser.msie;
651
- },
652
-
653
- /**
654
- * Get the currently selected text or false if nothing is selected (or the selection is collapsed)
655
- * @return selected text
656
- */
657
- getSelectedText: function() {
658
- var rangeObject = Aloha.Selection.rangeObject;
659
-
660
- if ( rangeObject.isCollapsed() ) {
661
- return false;
662
- }
663
-
664
- return this.getFromSelectionTree( rangeObject.getSelectionTree(), true );
665
- },
666
-
667
- /**
668
- * Recursive function to get the selected text from the selection tree starting at the given level
669
- * @param selectionTree array of selectiontree elements
670
- * @param astext true when the contents shall be fetched as text, false for getting as html markup
671
- * @return selected text from that level (incluiding all sublevels)
672
- */
673
- getFromSelectionTree: function( selectionTree, astext ) {
674
- var text = '', i, treeLength, el, clone;
675
- for ( i = 0, treeLength = selectionTree.length; i < treeLength; i++ ) {
676
- el = selectionTree[i];
677
- if ( el.selection == 'partial' ) {
678
- if ( el.domobj.nodeType === 3 ) {
679
- // partial text node selected, get the selected part
680
- text += el.domobj.data.substring( el.startOffset, el.endOffset );
681
- } else if ( el.domobj.nodeType === 1 && el.children ) {
682
- // partial element node selected, do the recursion into the children
683
- if ( astext ) {
684
- text += this.getFromSelectionTree( el.children, astext );
685
- } else {
686
- // when the html shall be fetched, we create a clone of the element and remove all the children
687
- clone = jQuery( el.domobj ).clone( false ).empty();
688
- // then we do the recursion and add the selection into the clone
689
- clone.html( this.getFromSelectionTree( el.children, astext ) );
690
- // finally we get the html of the clone
691
- text += clone.outerHTML();
692
- }
693
- }
694
- } else if ( el.selection == 'full' ) {
695
- if ( el.domobj.nodeType === 3 ) {
696
- // full text node selected, get the text
697
- text += jQuery( el.domobj ).text();
698
- } else if ( el.domobj.nodeType === 1 && el.children ) {
699
- // full element node selected, get the html of the node and all children
700
- text += astext ? jQuery( el.domobj ).text() : jQuery( el.domobj ).outerHTML();
701
- }
702
- }
703
- }
704
-
705
- return text;
706
- },
707
-
708
- /**
709
- * Get the currently selected markup or false if nothing is selected (or the selection is collapsed)
710
- * @return {?String}
711
- */
712
- getSelectedMarkup: function() {
713
- var rangeObject = Aloha.Selection.rangeObject;
714
- return rangeObject.isCollapsed() ? null
715
- : this.getFromSelectionTree( rangeObject.getSelectionTree(), false );
716
- },
717
-
718
- /**
719
- * Remove the currently selected markup
720
- */
721
- removeSelectedMarkup: function() {
722
- var rangeObject = Aloha.Selection.rangeObject, newRange;
723
-
724
- if ( rangeObject.isCollapsed() ) {
725
- return;
726
- }
727
-
728
- newRange = new Aloha.Selection.SelectionRange();
729
- // remove the selection
730
- this.removeFromSelectionTree( rangeObject.getSelectionTree(), newRange );
731
-
732
- // do a cleanup now (starting with the commonancestorcontainer)
733
- newRange.update();
734
- GENTICS.Utils.Dom.doCleanup( { 'merge' : true, 'removeempty' : true }, Aloha.Selection.rangeObject );
735
- Aloha.Selection.rangeObject = newRange;
736
-
737
- // need to set the collapsed selection now
738
- newRange.correctRange();
739
- newRange.update();
740
- newRange.select();
741
- Aloha.Selection.updateSelection();
742
- },
743
-
744
- /**
745
- * Recursively remove the selected items, starting with the given level in the selectiontree
746
- * @param selectionTree current level of the selectiontree
747
- * @param newRange new collapsed range to be set after the removal
748
- */
749
- removeFromSelectionTree: function( selectionTree, newRange ) {
750
- // remember the first found partially selected element node (in case we need
751
- // to merge it with the last found partially selected element node)
752
- var firstPartialElement,
753
- newdata,
754
- i,
755
- el,
756
- adjacentTextNode,
757
- treeLength;
758
-
759
- // iterate through the selection tree
760
- for ( i = 0, treeLength = selectionTree.length; i < treeLength; i++ ) {
761
- el = selectionTree[ i ];
762
-
763
- // check the type of selection
764
- if ( el.selection == 'partial' ) {
765
- if ( el.domobj.nodeType === 3 ) {
766
- // partial text node selected, so remove the selected portion
767
- newdata = '';
768
- if ( el.startOffset > 0 ) {
769
- newdata += el.domobj.data.substring( 0, el.startOffset );
770
- }
771
- if ( el.endOffset < el.domobj.data.length ) {
772
- newdata += el.domobj.data.substring( el.endOffset, el.domobj.data.length );
773
- }
774
- el.domobj.data = newdata;
775
-
776
- // eventually set the new range (if not done before)
777
- if ( !newRange.startContainer ) {
778
- newRange.startContainer = newRange.endContainer = el.domobj;
779
- newRange.startOffset = newRange.endOffset = el.startOffset;
780
- }
781
- } else if ( el.domobj.nodeType === 1 && el.children ) {
782
- // partial element node selected, so do the recursion into the children
783
- this.removeFromSelectionTree( el.children, newRange );
784
-
785
- if ( firstPartialElement ) {
786
- // when the first parially selected element is the same type
787
- // of element, we need to merge them
788
- if ( firstPartialElement.nodeName == el.domobj.nodeName ) {
789
- // merge the nodes
790
- jQuery( firstPartialElement ).append( jQuery( el.domobj ).contents() );
791
-
792
- // and remove the latter one
793
- jQuery( el.domobj ).remove();
794
- }
795
-
796
- } else {
797
- // remember this element as first partially selected element
798
- firstPartialElement = el.domobj;
799
- }
800
- }
801
-
802
- } else if ( el.selection == 'full' ) {
803
- // eventually set the new range (if not done before)
804
- if ( !newRange.startContainer ) {
805
- adjacentTextNode = GENTICS.Utils.Dom.searchAdjacentTextNode(
806
- el.domobj.parentNode,
807
- GENTICS.Utils.Dom.getIndexInParent( el.domobj ) + 1,
808
- false,
809
- { 'blocklevel' : false }
810
- );
811
-
812
- if ( adjacentTextNode ) {
813
- newRange.startContainer = newRange.endContainer = adjacentTextNode;
814
- newRange.startOffset = newRange.endOffset = 0;
815
- } else {
816
- newRange.startContainer = newRange.endContainer = el.domobj.parentNode;
817
- newRange.startOffset = newRange.endOffset = GENTICS.Utils.Dom.getIndexInParent( el.domobj ) + 1;
818
- }
819
- }
820
-
821
- // full node selected, so just remove it (will also remove all children)
822
- jQuery( el.domobj ).remove();
823
- }
824
- }
825
- },
826
-
827
- /**
828
- * split passed rangeObject without or with optional markup
829
- * @param Aloha.Selection.SelectionRange of the current selection
830
- * @param markup object (jQuery) to insert in between the split elements
831
- * @return void
832
- */
833
- splitRangeObject: function( rangeObject, markup ) {
834
- // UAAAA: first check where the markup can be inserted... *grrrrr*, then decide where to split
835
- // object which is split up
836
- var
837
- splitObject = jQuery( rangeObject.splitObject ),
838
- selectionTree, insertAfterObject, followUpContainer;
839
-
840
- // update the commonAncestor with the splitObject (so that the selectionTree is correct)
841
- rangeObject.update( rangeObject.splitObject ); // set the splitObject as new commonAncestorContainer and update the selectionTree
842
-
843
- // calculate the selection tree. NOTE: it is necessary to do this before
844
- // getting the followupcontainer, since getting the selection tree might
845
- // possibly merge text nodes, which would lead to differences in the followupcontainer
846
- selectionTree = rangeObject.getSelectionTree();
847
-
848
- // object to be inserted after the splitObject
849
- followUpContainer = this.getSplitFollowUpContainer( rangeObject );
850
-
851
- // now split up the splitObject into itself AND the followUpContainer
852
- this.splitRangeObjectHelper( selectionTree, rangeObject, followUpContainer ); // split the current object into itself and the followUpContainer
853
-
854
- // check whether the followupcontainer is still marked for removal
855
- if ( followUpContainer.hasClass( 'preparedForRemoval' ) ) {
856
- // TODO shall we just remove the class or shall we not use the followupcontainer?
857
- followUpContainer.removeClass( 'preparedForRemoval' );
858
- }
859
-
860
- // now let's find the place, where the followUp is inserted afterwards. normally that's the splitObject itself, but in
861
- // some cases it might be their parent (e.g. inside a list, a <p> followUp must be inserted outside the list)
862
- insertAfterObject = this.getInsertAfterObject( rangeObject, followUpContainer );
863
-
864
- // now insert the followUpContainer
865
- jQuery( followUpContainer ).insertAfter( insertAfterObject ); // attach the followUpContainer right after the insertAfterObject
866
-
867
- // in some cases, we want to remove the "empty" splitObject (e.g. LIs, if enter was hit twice)
868
- if ( rangeObject.splitObject.nodeName.toLowerCase() === 'li' && !Aloha.Selection.standardTextLevelSemanticsComparator( rangeObject.splitObject, followUpContainer ) ) {
869
- jQuery( rangeObject.splitObject ).remove();
870
- }
871
-
872
- rangeObject.startContainer = null;
873
- // first check whether the followUpContainer starts with a <br/>
874
- // if so, place the cursor right before the <br/>
875
- var followContents = followUpContainer.contents();
876
- if ( followContents.length > 0
877
- && followContents.get( 0 ).nodeType == 1
878
- && followContents.get( 0 ).nodeName.toLowerCase() === 'br' ) {
879
- rangeObject.startContainer = followUpContainer.get( 0 );
880
- }
881
-
882
- if ( !rangeObject.startContainer ) {
883
- // find a possible text node in the followUpContainer and set the selection to it
884
- // if no textnode is available, set the selection to the followup container itself
885
- rangeObject.startContainer = followUpContainer.textNodes( true, true ).first().get( 0 );
886
- }
887
- if ( !rangeObject.startContainer ) { // if no text node was found, select the parent object of <br class="aloha-ephemera" />
888
- rangeObject.startContainer = followUpContainer.textNodes( false ).first().parent().get( 0 );
889
- }
890
- if ( rangeObject.startContainer ) {
891
- // the cursor is always at the beginning of the followUp
892
- rangeObject.endContainer = rangeObject.startContainer;
893
- rangeObject.startOffset = 0;
894
- rangeObject.endOffset = 0;
895
- } else {
896
- rangeObject.startContainer = rangeObject.endContainer = followUpContainer.parent().get( 0 );
897
- rangeObject.startOffset = rangeObject.endOffset = GENTICS.Utils.Dom.getIndexInParent( followUpContainer.get( 0 ) );
898
- }
899
-
900
- // finally update the range object again
901
- rangeObject.update();
902
-
903
- // now set the selection
904
- rangeObject.select();
905
- },
906
-
907
- /**
908
- * method to get the object after which the followUpContainer can be inserted during splitup
909
- * this is a helper method, not needed anywhere else
910
- * @param rangeObject Aloha.Selection.SelectionRange of the current selection
911
- * @param followUpContainer optional jQuery object; if provided the rangeObject will be split and the second part will be insert inside of this object
912
- * @return object after which the followUpContainer can be inserted
913
- */
914
- getInsertAfterObject: function( rangeObject, followUpContainer ) {
915
- var passedSplitObject, i, el;
916
-
917
- for ( i = 0; i < rangeObject.markupEffectiveAtStart.length; i++ ) {
918
- el = rangeObject.markupEffectiveAtStart[ i ];
919
-
920
- // check if we have already passed the splitObject (some other markup might come before)
921
- if ( el === rangeObject.splitObject ) {
922
- passedSplitObject = true;
923
- }
924
-
925
- // if not passed splitObject, skip this markup
926
- if ( !passedSplitObject ) {
927
- continue;
928
- }
929
-
930
- // once we are passed, check if the followUpContainer is allowed to be inserted into the currents el's parent
931
- if ( Aloha.Selection.canTag1WrapTag2( jQuery( el ).parent()[0].nodeName, followUpContainer[0].nodeName ) ) {
932
- return el;
933
- }
934
- }
935
-
936
- return false;
937
- },
938
-
939
- /**
940
- * @fixme: Someone who knows what this function does, please refactor it.
941
- * 1. splitObject arg is not used at all
942
- * 2. Would be better to use ternary operation would be better than if else statement
943
- *
944
- * method to get the html code for a fillUpElement. this is needed for empty paragraphs etc., so that they take up their expected height
945
- * @param splitObject split object (dom object)
946
- * @return fillUpElement HTML Code
947
- */
948
- getFillUpElement: function( splitObject ) {
949
- if ( jQuery.browser.msie ) {
950
- return false;
951
- } else {
952
- return jQuery( '<br class="aloha-cleanme"/>' );
953
- }
954
- },
955
-
956
- /**
957
- * removes textNodes from passed array, which only contain contentWhiteSpace (e.g. a \n between two tags)
958
- * @param domArray array of domObjects
959
- * @return void
960
- */
961
- removeElementContentWhitespaceObj: function( domArray ) {
962
- var correction = 0,
963
- removeLater = [],
964
- i,
965
- el, removeIndex;
966
-
967
- for ( i = 0; i < domArray.length; ++i ) {
968
- el = domArray[ i ];
969
- if ( el.isElementContentWhitespace ) {
970
- removeLater[ removeLater.length ] = i;
971
- }
972
- }
973
-
974
- for ( i = 0; i < removeLater.length; ++i ) {
975
- removeIndex = removeLater[ i ];
976
- domArray.splice( removeIndex - correction, 1 );
977
- ++correction;
978
- }
979
- },
980
-
981
- /**
982
- * recursive method to parallelly walk through two dom subtrees, leave elements before startContainer in first subtree and move rest to other
983
- * @param selectionTree tree to iterate over as contained in rangeObject. must be passed separately to allow recursion in the selection tree, but not in the rangeObject
984
- * @param rangeObject Aloha.Selection.SelectionRange of the current selection
985
- * @param followUpContainer optional jQuery object; if provided the rangeObject will be split and the second part will be insert inside of this object
986
- * @param inBetweenMarkup jQuery object to be inserted between the two split parts. will be either a <br> (if no followUpContainer is passed) OR e.g. a table, which must be inserted between the splitobject AND the follow up
987
- * @return void
988
- */
989
- splitRangeObjectHelper: function( selectionTree, rangeObject,
990
- followUpContainer, inBetweenMarkup ) {
991
- if ( !followUpContainer ) {
992
- Aloha.Log.warn( this, 'no followUpContainer, no inBetweenMarkup, nothing to do...' );
993
- }
994
-
995
- var fillUpElement = this.getFillUpElement( rangeObject.splitObject ),
996
- splitObject = jQuery( rangeObject.splitObject ),
997
- startMoving = false,
998
- el,
999
- i,
1000
- completeText,
1001
- jqObj,
1002
- mirrorLevel,
1003
- parent,
1004
- treeLength;
1005
-
1006
- if ( selectionTree.length > 0 ) {
1007
- mirrorLevel = followUpContainer.contents();
1008
-
1009
- // if length of mirrorLevel and selectionTree are not equal, the mirrorLevel must be corrected. this happens, when the mirrorLevel contains whitespace textNodes
1010
- if ( mirrorLevel.length !== selectionTree.length ) {
1011
- this.removeElementContentWhitespaceObj( mirrorLevel );
1012
- }
1013
-
1014
- for ( i = 0, treeLength = selectionTree.length; i < treeLength; ++i ) {
1015
- el = selectionTree[ i ];
1016
-
1017
- // remove all objects in the mirrorLevel, which are BEFORE the cursor
1018
- // OR if the cursor is at the last position of the last Textnode (causing an empty followUpContainer to be appended)
1019
- if ( ( el.selection === 'none' && startMoving === false ) ||
1020
- ( el.domobj && el.domobj.nodeType === 3
1021
- && el === selectionTree[ ( selectionTree.length - 1 ) ]
1022
- && el.startOffset === el.domobj.data.length ) ) {
1023
- // iteration is before cursor, leave this part inside the splitObject, remove from followUpContainer
1024
- // however if the object to remove is the last existing textNode within the followUpContainer, insert a BR instead
1025
- // otherwise the followUpContainer is invalid and takes up no vertical space
1026
-
1027
- if ( followUpContainer.textNodes().length > 1
1028
- || ( el.domobj.nodeType === 1 && el.children.length === 0 ) ) {
1029
- // note: the second part of the if (el.domobj.nodeType === 1 && el.children.length === 0) covers a very special condition,
1030
- // where an empty tag is located right before the cursor when pressing enter. In this case the empty tag would not be
1031
- // removed correctly otherwise
1032
- mirrorLevel.eq( i ).remove();
1033
-
1034
- } else if ( GENTICS.Utils.Dom.isSplitObject( followUpContainer[0] ) ) {
1035
- if ( fillUpElement ) {
1036
- followUpContainer.html( fillUpElement ); // for your zoological german knowhow: ephemera = Eintagsfliege
1037
- } else {
1038
- followUpContainer.empty();
1039
- }
1040
-
1041
- } else {
1042
- followUpContainer.empty();
1043
- followUpContainer.addClass( 'preparedForRemoval' );
1044
- }
1045
-
1046
- continue;
1047
-
1048
- } else {
1049
- // split objects, which are AT the cursor Position or directly above
1050
- if ( el.selection !== 'none' ) { // before cursor, leave this part inside the splitObject
1051
- // TODO better check for selection == 'partial' here?
1052
- if ( el.domobj && el.domobj.nodeType === 3 && el.startOffset !== undefined ) {
1053
- completeText = el.domobj.data;
1054
- if ( el.startOffset > 0 ) {// first check, if there will be some text left in the splitObject
1055
- el.domobj.data = completeText.substr( 0, el.startOffset );
1056
- } else if ( selectionTree.length > 1 ) { // if not, check if the splitObject contains more than one node, because then it can be removed. this happens, when ENTER is pressed inside of a textnode, but not at the borders
1057
- jQuery( el.domobj ).remove();
1058
- } else { // if the "empty" textnode is the last node left in the splitObject, replace it with a ephemera break
1059
- // if the parent is a blocklevel element, we insert the fillup element
1060
- parent = jQuery( el.domobj ).parent();
1061
- if ( GENTICS.Utils.Dom.isSplitObject( parent[0] ) ) {
1062
- if ( fillUpElement ) {
1063
- parent.html( fillUpElement );
1064
- } else {
1065
- parent.empty();
1066
- }
1067
-
1068
- } else {
1069
- // if the parent is no blocklevel element and would be empty now, we completely remove it
1070
- parent.remove();
1071
- }
1072
- }
1073
- if ( completeText.length - el.startOffset > 0 ) {
1074
- // first check if there is text left to put in the followUpContainer's textnode. this happens, when ENTER is pressed inside of a textnode, but not at the borders
1075
- mirrorLevel[i].data = completeText.substr( el.startOffset, completeText.length );
1076
- } else if ( mirrorLevel.length > 1 ) {
1077
- // if not, check if the followUpContainer contains more than one node, because if yes, the "empty" textnode can be removed
1078
- mirrorLevel.eq( ( i ) ).remove();
1079
- } else if ( GENTICS.Utils.Dom.isBlockLevelElement( followUpContainer[0] ) ) {
1080
- // if the "empty" textnode is the last node left in the followUpContainer (which is a blocklevel element), replace it with a ephemera break
1081
- if ( fillUpElement ) {
1082
- followUpContainer.html( fillUpElement );
1083
- } else {
1084
- followUpContainer.empty();
1085
- }
1086
-
1087
- } else {
1088
- // if the "empty" textnode is the last node left in a non-blocklevel element, mark it for removal
1089
- followUpContainer.empty();
1090
- followUpContainer.addClass( 'preparedForRemoval' );
1091
- }
1092
- }
1093
-
1094
- startMoving = true;
1095
-
1096
- if ( el.children.length > 0 ) {
1097
- this.splitRangeObjectHelper( el.children, rangeObject, mirrorLevel.eq( i ), inBetweenMarkup );
1098
- }
1099
-
1100
- } else {
1101
- // remove all objects in the origin, which are AFTER the cursor
1102
- if ( el.selection === 'none' && startMoving === true ) {
1103
- // iteration is after cursor, remove from splitObject and leave this part inside the followUpContainer
1104
- jqObj = jQuery( el.domobj ).remove();
1105
- }
1106
- }
1107
- }
1108
- }
1109
- } else {
1110
- Aloha.Log.error( this, 'can not split splitObject due to an empty selection tree' );
1111
- }
1112
-
1113
- // and finally cleanup: remove all fillUps > 1
1114
- splitObject.find( 'br.aloha-ephemera:gt(0)' ).remove(); // remove all elements greater than (gt) 0, that also means: leave one
1115
- followUpContainer.find( 'br.aloha-ephemera:gt(0)' ).remove(); // remove all elements greater than (gt) 0, that also means: leave one
1116
-
1117
- // remove objects prepared for removal
1118
- splitObject.find( '.preparedForRemoval' ).remove();
1119
- followUpContainer.find( '.preparedForRemoval' ).remove();
1120
-
1121
- // if splitObject / followUp are empty, place a fillUp inside
1122
- if ( splitObject.contents().length === 0
1123
- && GENTICS.Utils.Dom.isSplitObject( splitObject[0] )
1124
- && fillUpElement ) {
1125
- splitObject.html( fillUpElement );
1126
- }
1127
-
1128
- if ( followUpContainer.contents().length === 0
1129
- && GENTICS.Utils.Dom.isSplitObject( followUpContainer[0] )
1130
- && fillUpElement ) {
1131
- followUpContainer.html( fillUpElement );
1132
- }
1133
- },
1134
-
1135
- /**
1136
- * returns a jQuery object fitting the passed splitObject as follow up object
1137
- * examples,
1138
- * - when passed a p it will return an empty p (clone of the passed p)
1139
- * - when passed an h1, it will return either an h1 (clone of the passed one) or a new p (if the collapsed selection was at the end)
1140
- * @param rangeObject Aloha.RangeObject
1141
- * @return void
1142
- */
1143
- getSplitFollowUpContainer: function( rangeObject ) {
1144
- var tagName = rangeObject.splitObject.nodeName.toLowerCase(),
1145
- returnObj,
1146
- inside,
1147
- lastObj;
1148
-
1149
- switch ( tagName ) {
1150
- case 'h1':
1151
- case 'h2':
1152
- case 'h3':
1153
- case 'h4':
1154
- case 'h5':
1155
- case 'h6':
1156
- // get the last textnode in the splitobject, but don't consider aloha-cleanme elements
1157
- lastObj = jQuery( rangeObject.splitObject ).textNodes( ':not(.aloha-cleanme)' ).last()[0];
1158
- // special case: when enter is hit at the end of a heading, the followUp should be a <p>
1159
- if ( lastObj && rangeObject.startContainer === lastObj
1160
- && rangeObject.startOffset === lastObj.length ) {
1161
- returnObj = jQuery( '<p></p>' );
1162
- inside = jQuery( rangeObject.splitObject ).clone().contents();
1163
- returnObj.append( inside );
1164
- return returnObj;
1165
- }
1166
- break;
1167
-
1168
- case 'li':
1169
- // TODO check whether the li is the last one
1170
- // special case: if enter is hit twice inside a list, the next item should be a <p> (and inserted outside the list)
1171
- if ( rangeObject.startContainer.nodeName.toLowerCase() === 'br'
1172
- && jQuery( rangeObject.startContainer ).hasClass( 'aloha-ephemera' ) ) {
1173
- returnObj = jQuery( '<p></p>' );
1174
- inside = jQuery( rangeObject.splitObject ).clone().contents();
1175
- returnObj.append( inside );
1176
- return returnObj;
1177
- }
1178
- // when the li is the last one and empty, we also just return a <p>
1179
- if ( !rangeObject.splitObject.nextSibling
1180
- && jQuery.trim( jQuery( rangeObject.splitObject ).text() ).length === 0 ) {
1181
- returnObj = jQuery( '<p></p>' );
1182
- return returnObj;
1183
- }
1184
- }
1185
-
1186
- return jQuery( rangeObject.splitObject ).clone();
1187
- },
1188
-
1189
- /**
1190
- * Transform the given domobj into an object with the given new nodeName.
1191
- * Preserves the content and all attributes. If a range object is given, also the range will be preserved
1192
- * @param domobj dom object to transform
1193
- * @param nodeName new node name
1194
- * @param range range object
1195
- * @api
1196
- * @return new object as jQuery object
1197
- */
1198
- transformDomObject: function( domobj, nodeName, range ) {
1199
- // first create the new element
1200
- var jqOldObj = jQuery( domobj ),
1201
- jqNewObj = jQuery( '<' + nodeName + '></' + nodeName + '>' ),
1202
- i;
1203
-
1204
- // TODO what about events? css properties?
1205
-
1206
- // copy attributes
1207
- if ( jqOldObj[0].attributes ) {
1208
- for ( i = 0; i < jqOldObj[0].attributes.length; ++i ) {
1209
- jqNewObj.attr(
1210
- jqOldObj[0].attributes[ i ].nodeName,
1211
- jqOldObj[0].attributes[ i ].nodeValue
1212
- );
1213
- }
1214
- }
1215
-
1216
- // copy inline CSS
1217
- if ( jqOldObj[0].style && jqOldObj[0].style.cssText ) {
1218
- jqNewObj[0].style.cssText = jqOldObj[0].style.cssText;
1219
- }
1220
-
1221
- // now move the contents of the old dom object into the new dom object
1222
- jqOldObj.contents().appendTo( jqNewObj );
1223
-
1224
- // finally replace the old object with the new one
1225
- jqOldObj.replaceWith( jqNewObj );
1226
-
1227
- // preserve the range
1228
- if ( range ) {
1229
- if ( range.startContainer == domobj ) {
1230
- range.startContainer = jqNewObj.get( 0 );
1231
- }
1232
-
1233
- if ( range.endContainer == domobj ) {
1234
- range.endContainer = jqNewObj.get( 0 );
1235
- }
1236
- }
1237
-
1238
- return jqNewObj;
1239
- },
1240
-
1241
- /**
1242
- * String representation
1243
- * @return {String}
1244
- */
1245
- toString: function() {
1246
- return 'Aloha.Markup';
1247
- }
1248
-
1249
- } );
1250
-
1251
- Aloha.Markup = new Aloha.Markup();
1252
-
1253
- return Aloha.Markup;
1254
-
1255
- } );
1
+ /* markup.js is part of Aloha Editor project http://aloha-editor.org
2
+ *
3
+ * Aloha Editor is a WYSIWYG HTML5 inline editing library and editor.
4
+ * Copyright (c) 2010-2012 Gentics Software GmbH, Vienna, Austria.
5
+ * Contributors http://aloha-editor.org/contribution.php
6
+ *
7
+ * Aloha Editor is free software; you can redistribute it and/or
8
+ * modify it under the terms of the GNU General Public License
9
+ * as published by the Free Software Foundation; either version 2
10
+ * of the License, or 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 General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License
18
+ * along with this program; if not, write to the Free Software
19
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
+ *
21
+ * As an additional permission to the GNU GPL version 2, you may distribute
22
+ * non-source (e.g., minimized or compacted) forms of the Aloha-Editor
23
+ * source code without the copy of the GNU GPL normally required,
24
+ * provided you include this license notice and a URL through which
25
+ * recipients can access the Corresponding Source.
26
+ */
27
+ define([
28
+ 'aloha/core',
29
+ 'util/class',
30
+ 'jquery',
31
+ 'aloha/ecma5shims',
32
+ 'aloha/console',
33
+ 'aloha/block-jump'
34
+ ], function (
35
+ Aloha,
36
+ Class,
37
+ jQuery,
38
+ shims,
39
+ console,
40
+ BlockJump
41
+ ) {
42
+ "use strict";
43
+
44
+ var GENTICS = window.GENTICS;
45
+
46
+ var isOldIE = !!(jQuery.browser.msie && 9 > parseInt(jQuery.browser.version, 10));
47
+
48
+ function isBR(node) {
49
+ return 'BR' === node.nodeName;
50
+ }
51
+
52
+ function isBlock(node) {
53
+ return 'false' === jQuery(node).attr('contenteditable');
54
+ }
55
+
56
+ function isTextNode(node) {
57
+ return node && 3 === node.nodeType; // Node.TEXT_NODE
58
+ }
59
+
60
+ function nodeLength(node) {
61
+ return !node ? 0 : (isTextNode(node) ? node.length : node.childNodes.length);
62
+ }
63
+
64
+ /**
65
+ * Determines whether the given text node is visible to the the user,
66
+ * based on our understanding that browsers will not display
67
+ * superfluous white spaces.
68
+ *
69
+ * @param {HTMLEmenent} node The text node to be checked.
70
+ */
71
+ function isVisibleTextNode(node) {
72
+ return 0 < node.data.replace(/\s+/g, '').length;
73
+ }
74
+
75
+ function nextVisibleNode(node) {
76
+ if (!node) {
77
+ return null;
78
+ }
79
+
80
+ if (node.nextSibling) {
81
+ // Skip over nodes that the user cannot see ...
82
+ if (isTextNode(node.nextSibling) && !isVisibleTextNode(node.nextSibling)) {
83
+ return nextVisibleNode(node.nextSibling);
84
+ }
85
+
86
+ // Skip over propping <br>s ...
87
+ if (isBR(node.nextSibling) && node.nextSibling === node.parentNode.lastChild) {
88
+ return nextVisibleNode(node.nextSibling);
89
+ }
90
+
91
+ // Skip over empty editable elements ...
92
+ if ('' === node.nextSibling.innerHTML && !isBlock(node.nextSibling)) {
93
+ return nextVisibleNode(node.nextSibling);
94
+ }
95
+
96
+ return node.nextSibling;
97
+ }
98
+
99
+ if (node.parentNode) {
100
+ return nextVisibleNode(node.parentNode);
101
+ }
102
+
103
+ return null;
104
+ }
105
+
106
+ function prevVisibleNode(node) {
107
+ if (!node) {
108
+ return null;
109
+ }
110
+
111
+ if (node.previousSibling) {
112
+ // Skip over nodes that the user cannot see...
113
+ if (isTextNode(node.previousSibling) && !isVisibleTextNode(node.previousSibling)) {
114
+ return prevVisibleNode(node.previousSibling);
115
+ }
116
+
117
+ // Skip over empty editable elements ...
118
+ if ('' === node.previousSibling.innerHTML && !isBlock(node.previousSibling)) {
119
+ return prevVisibleNode(node.previouSibling);
120
+ }
121
+
122
+ return node.previousSibling;
123
+ }
124
+
125
+ if (node.parentNode) {
126
+ return prevVisibleNode(node.parentNode);
127
+ }
128
+
129
+ return null;
130
+ }
131
+
132
+ function isFrontPosition(node, offset) {
133
+ return (0 === offset) || (offset <= node.data.length - node.data.replace(/^\s+/, '').length);
134
+ }
135
+
136
+ function isBlockInsideEditable($block) {
137
+ return $block.parent().hasClass('aloha-editable');
138
+ }
139
+
140
+ function isEndPosition(node, offset) {
141
+ var length = nodeLength(node);
142
+
143
+ if (length === offset) {
144
+ return true;
145
+ }
146
+
147
+ var isText = isTextNode(node);
148
+
149
+ // If within a text node, then ignore superfluous white-spaces,
150
+ // since they are invisible to the user.
151
+ if (isText && node.data.replace(/\s+$/, '').length === offset) {
152
+ return true;
153
+ }
154
+
155
+ if (1 === length && !isText) {
156
+ return isBR(node.childNodes[0]);
157
+ }
158
+
159
+ return false;
160
+ }
161
+
162
+ function blink(node) {
163
+ jQuery(node).stop(true).css({
164
+ opacity: 0
165
+ }).fadeIn(0).delay(100).fadeIn(function () {
166
+ jQuery(node).css({
167
+ opacity: 1
168
+ });
169
+ });
170
+
171
+ return node;
172
+ }
173
+
174
+ function nodeContains(node1, node2) {
175
+ return isOldIE ? (shims.compareDocumentPosition(node1, node2) & 16) : 0 < jQuery(node1).find(node2).length;
176
+ }
177
+
178
+ function isInsidePlaceholder(range) {
179
+ var start = range.startContainer;
180
+ var end = range.endContainer;
181
+ var $placeholder = window.$_alohaPlaceholder;
182
+
183
+ return $placeholder.is(start) || $placeholder.is(end) || nodeContains($placeholder[0], start) || nodeContains($placeholder[0], end);
184
+ }
185
+
186
+ function cleanupPlaceholders(range) {
187
+ if (window.$_alohaPlaceholder && !isInsidePlaceholder(range)) {
188
+ if (0 === window.$_alohaPlaceholder.html().replace(/^(&nbsp;)*$/, '').length) {
189
+ window.$_alohaPlaceholder.remove();
190
+ }
191
+
192
+ window.$_alohaPlaceholder = null;
193
+ }
194
+ }
195
+
196
+ /**
197
+ * @TODO(petro): We need to be more intelligent about whether we insert a
198
+ * block-level placeholder or a phrasing level element.
199
+ * @TODO(petro): test with <pre>
200
+ * @TODO: move to block-jump.js
201
+ */
202
+ function jumpBlock(block, isGoingLeft, currentRange) {
203
+ var range = new GENTICS.Utils.RangeObject();
204
+ var sibling = isGoingLeft ? prevVisibleNode(block) : nextVisibleNode(block);
205
+
206
+ if (!sibling || isBlock(sibling)) {
207
+ var $landing = jQuery('<div>&nbsp;</div>');
208
+
209
+ if (isGoingLeft) {
210
+ jQuery(block).before($landing);
211
+ } else {
212
+ jQuery(block).after($landing);
213
+ }
214
+
215
+ range.startContainer = range.endContainer = $landing[0];
216
+ range.startOffset = range.endOffset = 0;
217
+
218
+ // Clear out any old placeholder first ...
219
+ cleanupPlaceholders(range);
220
+
221
+ window.$_alohaPlaceholder = $landing;
222
+ } else {
223
+
224
+ // Don't jump the block yet if the cursor is moving to the
225
+ // beginning or end of a text node, or if it is about to leave
226
+ // an element node. Both these cases require a hack in some
227
+ // browsers.
228
+ var moveToBoundaryPositionInIE = ( // To the beginning or end of a text node?
229
+ (currentRange.startContainer.nodeType === 3
230
+ && currentRange.startContainer === currentRange.endContainer
231
+ && currentRange.startContainer.nodeValue !== ""
232
+ && (isGoingLeft ? currentRange.startOffset === 1 : currentRange.endOffset + 1 === currentRange.endContainer.length))
233
+ // Leaving an element node?
234
+ || (currentRange.startContainer.nodeType === 1
235
+ && (!currentRange.startOffset
236
+ || (currentRange.startContainer.childNodes[currentRange.startOffset] && currentRange.startContainer.childNodes[currentRange.startOffset].nodeType === 1)))
237
+ );
238
+
239
+ if (moveToBoundaryPositionInIE) {
240
+ // The cursor is moving to the beginning or end of a text
241
+ // node, or is leaving an element node, which requires a
242
+ // hack in some browsers.
243
+ var zeroWidthNode = BlockJump.insertZeroWidthTextNodeFix(block, isGoingLeft);
244
+ range.startContainer = range.endContainer = zeroWidthNode;
245
+ range.startOffset = range.endOffset = isGoingLeft ? 1 : 0;
246
+ } else {
247
+ // The selection is already at the boundary position - jump
248
+ // the block.
249
+ range.startContainer = range.endContainer = sibling;
250
+ range.startOffset = range.endOffset = isGoingLeft ? nodeLength(sibling) : 0;
251
+ if (!isGoingLeft) {
252
+ // Just as above, jumping to the first position right of
253
+ // a block requires a hack in some browsers. Jumping
254
+ // left seems to be fine.
255
+ BlockJump.insertZeroWidthTextNodeFix(block, true);
256
+ }
257
+ }
258
+ cleanupPlaceholders(range);
259
+ }
260
+
261
+ range.select();
262
+
263
+ Aloha.trigger('aloha-block-selected', block);
264
+ Aloha.Selection.preventSelectionChanged();
265
+ }
266
+
267
+ /**
268
+ * Markup object
269
+ */
270
+ Aloha.Markup = Class.extend({
271
+
272
+ /**
273
+ * Key handlers for special key codes
274
+ */
275
+ keyHandlers: {},
276
+
277
+ /**
278
+ * Add a key handler for the given key code
279
+ * @param keyCode key code
280
+ * @param handler handler function
281
+ */
282
+ addKeyHandler: function (keyCode, handler) {
283
+ if (!this.keyHandlers[keyCode]) {
284
+ this.keyHandlers[keyCode] = [];
285
+ }
286
+
287
+ this.keyHandlers[keyCode].push(handler);
288
+ },
289
+
290
+ /**
291
+ * Removes a key handler for the given key code
292
+ * @param keyCode key code
293
+ */
294
+ removeKeyHandler: function (keyCode) {
295
+ if (this.keyHandlers[keyCode]) {
296
+ this.keyHandlers[keyCode] = null;
297
+ }
298
+ },
299
+
300
+ insertBreak: function () {
301
+ var range = Aloha.Selection.rangeObject,
302
+ nonWSIndex,
303
+ nextTextNode,
304
+ newBreak;
305
+
306
+ if (!range.isCollapsed()) {
307
+ this.removeSelectedMarkup();
308
+ }
309
+
310
+ newBreak = jQuery('<br/>');
311
+ GENTICS.Utils.Dom.insertIntoDOM(newBreak, range, Aloha.activeEditable.obj);
312
+
313
+ nextTextNode = GENTICS.Utils.Dom.searchAdjacentTextNode(
314
+ newBreak.parent().get(0),
315
+ GENTICS.Utils.Dom.getIndexInParent(newBreak.get(0)) + 1,
316
+ false
317
+ );
318
+
319
+ if (nextTextNode) {
320
+ // trim leading whitespace
321
+ nonWSIndex = nextTextNode.data.search(/\S/);
322
+ if (nonWSIndex > 0) {
323
+ nextTextNode.data = nextTextNode.data.substring(nonWSIndex);
324
+ }
325
+ }
326
+
327
+ range.startContainer = range.endContainer = newBreak.get(0).parentNode;
328
+ range.startOffset = range.endOffset = GENTICS.Utils.Dom.getIndexInParent(newBreak.get(0)) + 1;
329
+ range.correctRange();
330
+ range.clearCaches();
331
+ range.select();
332
+ },
333
+
334
+ /**
335
+ * first method to handle key strokes
336
+ * @param event DOM event
337
+ * @param rangeObject as provided by Aloha.Selection.getRangeObject();
338
+ * @return "Aloha.Selection"
339
+ */
340
+ preProcessKeyStrokes: function (event) {
341
+ if (event.type !== 'keydown') {
342
+ return false;
343
+ }
344
+
345
+ var rangeObject,
346
+ handlers,
347
+ i;
348
+
349
+ if (this.keyHandlers[event.keyCode]) {
350
+ handlers = this.keyHandlers[event.keyCode];
351
+ for (i = 0; i < handlers.length; ++i) {
352
+ if (!handlers[i](event)) {
353
+ return false;
354
+ }
355
+ }
356
+ }
357
+
358
+ // LEFT (37), RIGHT (39) keys for block detection
359
+ if (event.keyCode === 37 || event.keyCode === 39) {
360
+ if (Aloha.getSelection().getRangeCount()) {
361
+ rangeObject = Aloha.getSelection().getRangeAt(0);
362
+
363
+ if (this.processCursor(rangeObject, event.keyCode)) {
364
+ cleanupPlaceholders(Aloha.Selection.rangeObject);
365
+ return true;
366
+ }
367
+ }
368
+
369
+ return false;
370
+ }
371
+
372
+ // BACKSPACE
373
+ if (event.keyCode === 8) {
374
+ event.preventDefault(); // prevent history.back() even on exception
375
+ Aloha.execCommand('delete', false);
376
+ return false;
377
+ }
378
+
379
+ // DELETE
380
+ if (event.keyCode === 46) {
381
+ Aloha.execCommand('forwarddelete', false);
382
+ return false;
383
+ }
384
+
385
+ // ENTER
386
+ if (event.keyCode === 13) {
387
+ if (event.shiftKey) {
388
+ Aloha.execCommand('insertlinebreak', false);
389
+ return false;
390
+ }
391
+ Aloha.execCommand('insertparagraph', false);
392
+ return false;
393
+ }
394
+
395
+ return true;
396
+ },
397
+
398
+ /**
399
+ * Processing of cursor keys.
400
+ * Detect blocks (elements with contenteditable=false) and will select them
401
+ * (normally the cursor would simply jump right past them).
402
+ *
403
+ * For each block that is selected, an 'aloha-block-selected' event will be
404
+ * triggered.
405
+ *
406
+ * TODO: the above is what should happen. Currently we just skip past blocks.
407
+ *
408
+ * @param {RangyRange} range A range object for the current selection.
409
+ * @param {number} keyCode Code of the currently pressed key.
410
+ * @return {boolean} False if a block was found, to prevent further events,
411
+ * true otherwise.
412
+ * @TODO move to block-jump.js
413
+ */
414
+ processCursor: function (range, keyCode) {
415
+ if (!range.collapsed) {
416
+ return true;
417
+ }
418
+
419
+ BlockJump.removeZeroWidthTextNodeFix();
420
+
421
+ var node = range.startContainer,
422
+ selection = Aloha.getSelection();
423
+
424
+ if (!node) {
425
+ return true;
426
+ }
427
+
428
+ var sibling, offset;
429
+
430
+ // special handling for moving Cursor around zero-width whitespace in IE7
431
+ if (jQuery.browser.msie && parseInt(jQuery.browser.version, 10) <= 7 && isTextNode(node)) {
432
+ if (keyCode == 37) {
433
+ // moving left -> skip zwsp to the left
434
+ offset = range.startOffset;
435
+ while (offset > 0 && node.data.charAt(offset - 1) === '\u200b') {
436
+ offset--;
437
+ }
438
+ if (offset != range.startOffset) {
439
+ range.setStart(range.startContainer, offset);
440
+ range.setEnd(range.startContainer, offset);
441
+ selection = Aloha.getSelection();
442
+ selection.removeAllRanges();
443
+ selection.addRange(range);
444
+ }
445
+ } else if (keyCode == 39) {
446
+ // moving right -> skip zwsp to the right
447
+ offset = range.startOffset;
448
+ while (offset < node.data.length && node.data.charAt(offset) === '\u200b') {
449
+ offset++;
450
+ }
451
+ if (offset != range.startOffset) {
452
+ range.setStart(range.startContainer, offset);
453
+ range.setEnd(range.startContainer, offset);
454
+ selection.removeAllRanges();
455
+ selection.addRange(range);
456
+ }
457
+ }
458
+ }
459
+
460
+ // Versions of Internet Explorer that are older that 9, will
461
+ // erroneously allow you to enter and edit inside elements which have
462
+ // their contenteditable attribute set to false...
463
+ if (isOldIE && !jQuery(node).contentEditable()) {
464
+ var $parentBlock = jQuery(node).parents('[contenteditable=false]');
465
+ var isInsideBlock = $parentBlock.length > 0;
466
+
467
+ if (isInsideBlock) {
468
+ if (isBlockInsideEditable($parentBlock)) {
469
+ sibling = $parentBlock[0];
470
+ } else {
471
+ return true;
472
+ }
473
+ }
474
+ }
475
+
476
+ var isLeft;
477
+ if (!sibling) {
478
+ // True if keyCode denotes LEFT or UP arrow key, otherwise they
479
+ // keyCode is for RIGHT or DOWN in which this value will be false.
480
+ isLeft = (37 === keyCode || 38 === keyCode);
481
+ offset = range.startOffset;
482
+
483
+ if (isTextNode(node)) {
484
+ if (isLeft) {
485
+ var isApproachingFrontPosition = (1 === offset);
486
+ if (!isApproachingFrontPosition && !isFrontPosition(node, offset)) {
487
+ return true;
488
+ }
489
+ } else if (!isEndPosition(node, offset)) {
490
+ return true;
491
+ }
492
+
493
+ } else {
494
+ node = node.childNodes[offset === nodeLength(node) ? offset - 1 : offset];
495
+ }
496
+
497
+ sibling = isLeft ? prevVisibleNode(node) : nextVisibleNode(node);
498
+ }
499
+
500
+ if (isBlock(sibling)) {
501
+ jumpBlock(sibling, isLeft, range);
502
+ return false;
503
+ }
504
+
505
+ return true;
506
+ },
507
+
508
+ /**
509
+ * method handling shiftEnter
510
+ * @param Aloha.Selection.SelectionRange of the current selection
511
+ * @return void
512
+ */
513
+ processShiftEnter: function (rangeObject) {
514
+ this.insertHTMLBreak(rangeObject.getSelectionTree(), rangeObject);
515
+ },
516
+
517
+ /**
518
+ * method handling Enter
519
+ * @param Aloha.Selection.SelectionRange of the current selection
520
+ * @return void
521
+ */
522
+ processEnter: function (rangeObject) {
523
+ if (rangeObject.splitObject) {
524
+ // now comes a very evil hack for ie, when the enter is pressed in a text node in an li element, we just append an empty text node
525
+ // if ( jQuery.browser.msie
526
+ // && GENTICS.Utils.Dom
527
+ // .isListElement( rangeObject.splitObject ) ) {
528
+ // jQuery( rangeObject.splitObject ).append(
529
+ // jQuery( document.createTextNode( '' ) ) );
530
+ // }
531
+ this.splitRangeObject(rangeObject);
532
+ } else { // if there is no split object, the Editable is the paragraph type itself (e.g. a p or h2)
533
+ this.insertHTMLBreak(rangeObject.getSelectionTree(), rangeObject);
534
+ }
535
+ },
536
+
537
+ /**
538
+ * Insert the given html markup at the current selection
539
+ * @param html html markup to be inserted
540
+ */
541
+ insertHTMLCode: function (html) {
542
+ var rangeObject = Aloha.Selection.rangeObject;
543
+ this.insertHTMLBreak(rangeObject.getSelectionTree(), rangeObject, jQuery(html));
544
+ },
545
+
546
+ /**
547
+ * insert an HTML Break <br /> into current selection
548
+ * @param Aloha.Selection.SelectionRange of the current selection
549
+ * @return void
550
+ */
551
+ insertHTMLBreak: function (selectionTree, rangeObject, inBetweenMarkup) {
552
+ var i,
553
+ treeLength,
554
+ el,
555
+ jqEl,
556
+ jqElBefore,
557
+ jqElAfter,
558
+ tmpObject,
559
+ offset,
560
+ checkObj;
561
+
562
+ inBetweenMarkup = inBetweenMarkup || jQuery('<br/>');
563
+
564
+ for (i = 0, treeLength = selectionTree.length; i < treeLength; ++i) {
565
+ el = selectionTree[i];
566
+ jqEl = el.domobj ? jQuery(el.domobj) : undefined;
567
+
568
+ if (el.selection !== 'none') { // before cursor, leave this part inside the splitObject
569
+ if (el.selection == 'collapsed') {
570
+ // collapsed selection found (between nodes)
571
+ if (i > 0) {
572
+ // not at the start, so get the element to the left
573
+ jqElBefore = jQuery(selectionTree[i - 1].domobj);
574
+
575
+ // and insert the break after it
576
+ jqElBefore.after(inBetweenMarkup);
577
+
578
+ } else {
579
+ // at the start, so get the element to the right
580
+ jqElAfter = jQuery(selectionTree[1].domobj);
581
+
582
+ // and insert the break before it
583
+ jqElAfter.before(inBetweenMarkup);
584
+ }
585
+
586
+ // now set the range
587
+ rangeObject.startContainer = rangeObject.endContainer = inBetweenMarkup[0].parentNode;
588
+ rangeObject.startOffset = rangeObject.endOffset = GENTICS.Utils.Dom.getIndexInParent(inBetweenMarkup[0]) + 1;
589
+ rangeObject.correctRange();
590
+
591
+ } else if (el.domobj && el.domobj.nodeType === 3) { // textNode
592
+ // when the textnode is immediately followed by a blocklevel element (like p, h1, ...) we need to add an additional br in between
593
+ if (el.domobj.nextSibling && el.domobj.nextSibling.nodeType == 1 && Aloha.Selection.replacingElements[el.domobj.nextSibling.nodeName.toLowerCase()]) {
594
+ // TODO check whether this depends on the browser
595
+ jqEl.after('<br/>');
596
+ }
597
+
598
+ if (this.needEndingBreak()) {
599
+ // when the textnode is the last inside a blocklevel element
600
+ // (like p, h1, ...) we need to add an additional br as very
601
+ // last object in the blocklevel element
602
+ checkObj = el.domobj;
603
+
604
+ while (checkObj) {
605
+ if (checkObj.nextSibling) {
606
+ checkObj = false;
607
+ } else {
608
+ // go to the parent
609
+ checkObj = checkObj.parentNode;
610
+
611
+ // found a blocklevel or list element, we are done
612
+ if (GENTICS.Utils.Dom.isBlockLevelElement(checkObj) || GENTICS.Utils.Dom.isListElement(checkObj)) {
613
+ break;
614
+ }
615
+
616
+ // reached the limit object, we are done
617
+ if (checkObj === rangeObject.limitObject) {
618
+ checkObj = false;
619
+ }
620
+ }
621
+ }
622
+
623
+ // when we found a blocklevel element, insert a break at the
624
+ // end. Mark the break so that it is cleaned when the
625
+ // content is fetched.
626
+ if (checkObj) {
627
+ jQuery(checkObj).append('<br class="aloha-cleanme" />');
628
+ }
629
+ }
630
+
631
+ // insert the break
632
+ jqEl.between(inBetweenMarkup, el.startOffset);
633
+
634
+ // correct the range
635
+ // count the number of previous siblings
636
+ offset = 0;
637
+ tmpObject = inBetweenMarkup[0];
638
+ while (tmpObject) {
639
+ tmpObject = tmpObject.previousSibling;
640
+ ++offset;
641
+ }
642
+
643
+ rangeObject.startContainer = inBetweenMarkup[0].parentNode;
644
+ rangeObject.endContainer = inBetweenMarkup[0].parentNode;
645
+ rangeObject.startOffset = offset;
646
+ rangeObject.endOffset = offset;
647
+ rangeObject.correctRange();
648
+
649
+ } else if (el.domobj && el.domobj.nodeType === 1) { // other node, normally a break
650
+ if (jqEl.parent().find('br.aloha-ephemera').length === 0) {
651
+ // but before putting it, remove all:
652
+ jQuery(rangeObject.limitObject).find('br.aloha-ephemera').remove();
653
+
654
+ // now put it:
655
+ jQuery(rangeObject.commonAncestorContainer).append(this.getFillUpElement(rangeObject.splitObject));
656
+ }
657
+
658
+ jqEl.after(inBetweenMarkup);
659
+
660
+ // now set the selection. Since we just added one break do the currect el
661
+ // the new position must be el's position + 1. el's position is the index
662
+ // of the el in the selection tree, which is i. then we must add
663
+ // another +1 because we want to be AFTER the object, not before. therefor +2
664
+ rangeObject.startContainer = rangeObject.commonAncestorContainer;
665
+ rangeObject.endContainer = rangeObject.startContainer;
666
+ rangeObject.startOffset = i + 2;
667
+ rangeObject.endOffset = i + 2;
668
+ rangeObject.update();
669
+ }
670
+ }
671
+ }
672
+ rangeObject.select();
673
+ },
674
+
675
+ /**
676
+ * Check whether blocklevel elements need breaks at the end to visibly render a newline
677
+ * @return true if an ending break is necessary, false if not
678
+ */
679
+ needEndingBreak: function () {
680
+ // currently, all browser except IE need ending breaks
681
+ return !jQuery.browser.msie;
682
+ },
683
+
684
+ /**
685
+ * Get the currently selected text or false if nothing is selected (or the selection is collapsed)
686
+ * @return selected text
687
+ */
688
+ getSelectedText: function () {
689
+ var rangeObject = Aloha.Selection.rangeObject;
690
+
691
+ if (rangeObject.isCollapsed()) {
692
+ return false;
693
+ }
694
+
695
+ return this.getFromSelectionTree(rangeObject.getSelectionTree(), true);
696
+ },
697
+
698
+ /**
699
+ * Recursive function to get the selected text from the selection tree starting at the given level
700
+ * @param selectionTree array of selectiontree elements
701
+ * @param astext true when the contents shall be fetched as text, false for getting as html markup
702
+ * @return selected text from that level (incluiding all sublevels)
703
+ */
704
+ getFromSelectionTree: function (selectionTree, astext) {
705
+ var text = '', i, treeLength, el, clone;
706
+ for (i = 0, treeLength = selectionTree.length; i < treeLength; i++) {
707
+ el = selectionTree[i];
708
+ if (el.selection == 'partial') {
709
+ if (el.domobj.nodeType === 3) {
710
+ // partial text node selected, get the selected part
711
+ text += el.domobj.data.substring(el.startOffset, el.endOffset);
712
+ } else if (el.domobj.nodeType === 1 && el.children) {
713
+ // partial element node selected, do the recursion into the children
714
+ if (astext) {
715
+ text += this.getFromSelectionTree(el.children, astext);
716
+ } else {
717
+ // when the html shall be fetched, we create a clone of
718
+ // the element and remove all the children
719
+ clone = jQuery(el.domobj.outerHTML).empty();
720
+ // then we do the recursion and add the selection into the clone
721
+ clone.html(this.getFromSelectionTree(el.children, astext));
722
+ // finally we get the html of the clone
723
+ text += clone.outerHTML();
724
+ }
725
+ }
726
+ } else if (el.selection == 'full') {
727
+ if (el.domobj.nodeType === 3) {
728
+ // full text node selected, get the text
729
+ text += jQuery(el.domobj).text();
730
+ } else if (el.domobj.nodeType === 1 && el.children) {
731
+ // full element node selected, get the html of the node and all children
732
+ text += astext ? jQuery(el.domobj).text() : jQuery(el.domobj).outerHTML();
733
+ }
734
+ }
735
+ }
736
+
737
+ return text;
738
+ },
739
+
740
+ /**
741
+ * Get the currently selected markup or false if nothing is selected (or the selection is collapsed)
742
+ * @return {?String}
743
+ */
744
+ getSelectedMarkup: function () {
745
+ var rangeObject = Aloha.Selection.rangeObject;
746
+ return rangeObject.isCollapsed() ? null : this.getFromSelectionTree(rangeObject.getSelectionTree(), false);
747
+ },
748
+
749
+ /**
750
+ * Remove the currently selected markup
751
+ */
752
+ removeSelectedMarkup: function () {
753
+ var rangeObject = Aloha.Selection.rangeObject,
754
+ newRange;
755
+
756
+ if (rangeObject.isCollapsed()) {
757
+ return;
758
+ }
759
+
760
+ newRange = new Aloha.Selection.SelectionRange();
761
+ // remove the selection
762
+ this.removeFromSelectionTree(rangeObject.getSelectionTree(), newRange);
763
+
764
+ // do a cleanup now (starting with the commonancestorcontainer)
765
+ newRange.update();
766
+ GENTICS.Utils.Dom.doCleanup({
767
+ 'merge': true,
768
+ 'removeempty': true
769
+ }, Aloha.Selection.rangeObject);
770
+ Aloha.Selection.rangeObject = newRange;
771
+
772
+ // need to set the collapsed selection now
773
+ newRange.correctRange();
774
+ newRange.update();
775
+ newRange.select();
776
+ Aloha.Selection.updateSelection();
777
+ },
778
+
779
+ /**
780
+ * Recursively remove the selected items, starting with the given level in the selectiontree
781
+ * @param selectionTree current level of the selectiontree
782
+ * @param newRange new collapsed range to be set after the removal
783
+ */
784
+ removeFromSelectionTree: function (selectionTree, newRange) {
785
+ // remember the first found partially selected element node (in case we need
786
+ // to merge it with the last found partially selected element node)
787
+ var firstPartialElement, newdata, i, el, adjacentTextNode, treeLength;
788
+
789
+ // iterate through the selection tree
790
+ for (i = 0, treeLength = selectionTree.length; i < treeLength; i++) {
791
+ el = selectionTree[i];
792
+
793
+ // check the type of selection
794
+ if (el.selection == 'partial') {
795
+ if (el.domobj.nodeType === 3) {
796
+ // partial text node selected, so remove the selected portion
797
+ newdata = '';
798
+ if (el.startOffset > 0) {
799
+ newdata += el.domobj.data.substring(0, el.startOffset);
800
+ }
801
+ if (el.endOffset < el.domobj.data.length) {
802
+ newdata += el.domobj.data.substring(el.endOffset, el.domobj.data.length);
803
+ }
804
+ el.domobj.data = newdata;
805
+
806
+ // eventually set the new range (if not done before)
807
+ if (!newRange.startContainer) {
808
+ newRange.startContainer = newRange.endContainer = el.domobj;
809
+ newRange.startOffset = newRange.endOffset = el.startOffset;
810
+ }
811
+ } else if (el.domobj.nodeType === 1 && el.children) {
812
+ // partial element node selected, so do the recursion into the children
813
+ this.removeFromSelectionTree(el.children, newRange);
814
+
815
+ if (firstPartialElement) {
816
+ // when the first parially selected element is the same type
817
+ // of element, we need to merge them
818
+ if (firstPartialElement.nodeName == el.domobj.nodeName) {
819
+ // merge the nodes
820
+ jQuery(firstPartialElement).append(jQuery(el.domobj).contents());
821
+
822
+ // and remove the latter one
823
+ jQuery(el.domobj).remove();
824
+ }
825
+
826
+ } else {
827
+ // remember this element as first partially selected element
828
+ firstPartialElement = el.domobj;
829
+ }
830
+ }
831
+
832
+ } else if (el.selection == 'full') {
833
+ // eventually set the new range (if not done before)
834
+ if (!newRange.startContainer) {
835
+ adjacentTextNode = GENTICS.Utils.Dom.searchAdjacentTextNode(
836
+ el.domobj.parentNode,
837
+ GENTICS.Utils.Dom.getIndexInParent(el.domobj) + 1,
838
+ false,
839
+ {
840
+ 'blocklevel': false
841
+ }
842
+ );
843
+
844
+ if (adjacentTextNode) {
845
+ newRange.startContainer = newRange.endContainer = adjacentTextNode;
846
+ newRange.startOffset = newRange.endOffset = 0;
847
+ } else {
848
+ newRange.startContainer = newRange.endContainer = el.domobj.parentNode;
849
+ newRange.startOffset = newRange.endOffset = GENTICS.Utils.Dom.getIndexInParent(el.domobj) + 1;
850
+ }
851
+ }
852
+
853
+ // full node selected, so just remove it (will also remove all children)
854
+ jQuery(el.domobj).remove();
855
+ }
856
+ }
857
+ },
858
+
859
+ /**
860
+ * split passed rangeObject without or with optional markup
861
+ * @param Aloha.Selection.SelectionRange of the current selection
862
+ * @param markup object (jQuery) to insert in between the split elements
863
+ * @return void
864
+ */
865
+ splitRangeObject: function (rangeObject, markup) {
866
+ // UAAAA: first check where the markup can be inserted... *grrrrr*, then decide where to split
867
+ // object which is split up
868
+ var splitObject = jQuery(rangeObject.splitObject),
869
+ selectionTree,
870
+ insertAfterObject,
871
+ followUpContainer;
872
+
873
+ // update the commonAncestor with the splitObject (so that the selectionTree is correct)
874
+ rangeObject.update(rangeObject.splitObject); // set the splitObject as new commonAncestorContainer and update the selectionTree
875
+
876
+ // calculate the selection tree. NOTE: it is necessary to do this before
877
+ // getting the followupcontainer, since getting the selection tree might
878
+ // possibly merge text nodes, which would lead to differences in the followupcontainer
879
+ selectionTree = rangeObject.getSelectionTree();
880
+
881
+ // object to be inserted after the splitObject
882
+ followUpContainer = this.getSplitFollowUpContainer(rangeObject);
883
+
884
+ // now split up the splitObject into itself AND the followUpContainer
885
+ this.splitRangeObjectHelper(selectionTree, rangeObject, followUpContainer); // split the current object into itself and the followUpContainer
886
+
887
+ // check whether the followupcontainer is still marked for removal
888
+ if (followUpContainer.hasClass('preparedForRemoval')) {
889
+ // TODO shall we just remove the class or shall we not use the followupcontainer?
890
+ followUpContainer.removeClass('preparedForRemoval');
891
+ }
892
+
893
+ // now let's find the place, where the followUp is inserted afterwards. normally that's the splitObject itself, but in
894
+ // some cases it might be their parent (e.g. inside a list, a <p> followUp must be inserted outside the list)
895
+ insertAfterObject = this.getInsertAfterObject(rangeObject, followUpContainer);
896
+
897
+ // now insert the followUpContainer
898
+ jQuery(followUpContainer).insertAfter(insertAfterObject); // attach the followUpContainer right after the insertAfterObject
899
+
900
+ // in some cases, we want to remove the "empty" splitObject (e.g. LIs, if enter was hit twice)
901
+ if (rangeObject.splitObject.nodeName.toLowerCase() === 'li' && !Aloha.Selection.standardTextLevelSemanticsComparator(rangeObject.splitObject, followUpContainer)) {
902
+ jQuery(rangeObject.splitObject).remove();
903
+ }
904
+
905
+ rangeObject.startContainer = null;
906
+ // first check whether the followUpContainer starts with a <br/>
907
+ // if so, place the cursor right before the <br/>
908
+ var followContents = followUpContainer.contents();
909
+ if (followContents.length > 0 && followContents.get(0).nodeType == 1 && followContents.get(0).nodeName.toLowerCase() === 'br') {
910
+ rangeObject.startContainer = followUpContainer.get(0);
911
+ }
912
+
913
+ if (!rangeObject.startContainer) {
914
+ // find a possible text node in the followUpContainer and set the selection to it
915
+ // if no textnode is available, set the selection to the followup container itself
916
+ rangeObject.startContainer = followUpContainer.textNodes(true, true).first().get(0);
917
+ }
918
+ if (!rangeObject.startContainer) { // if no text node was found, select the parent object of <br class="aloha-ephemera" />
919
+ rangeObject.startContainer = followUpContainer.textNodes(false).first().parent().get(0);
920
+ }
921
+ if (rangeObject.startContainer) {
922
+ // the cursor is always at the beginning of the followUp
923
+ rangeObject.endContainer = rangeObject.startContainer;
924
+ rangeObject.startOffset = 0;
925
+ rangeObject.endOffset = 0;
926
+ } else {
927
+ rangeObject.startContainer = rangeObject.endContainer = followUpContainer.parent().get(0);
928
+ rangeObject.startOffset = rangeObject.endOffset = GENTICS.Utils.Dom.getIndexInParent(followUpContainer.get(0));
929
+ }
930
+
931
+ // finally update the range object again
932
+ rangeObject.update();
933
+
934
+ // now set the selection
935
+ rangeObject.select();
936
+ },
937
+
938
+ /**
939
+ * method to get the object after which the followUpContainer can be inserted during splitup
940
+ * this is a helper method, not needed anywhere else
941
+ * @param rangeObject Aloha.Selection.SelectionRange of the current selection
942
+ * @param followUpContainer optional jQuery object; if provided the rangeObject will be split and the second part will be insert inside of this object
943
+ * @return object after which the followUpContainer can be inserted
944
+ */
945
+ getInsertAfterObject: function (rangeObject, followUpContainer) {
946
+ var passedSplitObject, i, el;
947
+
948
+ for (i = 0; i < rangeObject.markupEffectiveAtStart.length; i++) {
949
+ el = rangeObject.markupEffectiveAtStart[i];
950
+
951
+ // check if we have already passed the splitObject (some other markup might come before)
952
+ if (el === rangeObject.splitObject) {
953
+ passedSplitObject = true;
954
+ }
955
+
956
+ // if not passed splitObject, skip this markup
957
+ if (!passedSplitObject) {
958
+ continue;
959
+ }
960
+
961
+ // once we are passed, check if the followUpContainer is allowed to be inserted into the currents el's parent
962
+ if (Aloha.Selection.canTag1WrapTag2(jQuery(el).parent()[0].nodeName, followUpContainer[0].nodeName)) {
963
+ return el;
964
+ }
965
+ }
966
+
967
+ return false;
968
+ },
969
+
970
+ /**
971
+ * @fixme: Someone who knows what this function does, please refactor it.
972
+ * 1. splitObject arg is not used at all
973
+ * 2. Would be better to use ternary operation would be better than if else statement
974
+ *
975
+ * method to get the html code for a fillUpElement. this is needed for empty paragraphs etc., so that they take up their expected height
976
+ * @param splitObject split object (dom object)
977
+ * @return fillUpElement HTML Code
978
+ */
979
+ getFillUpElement: function (splitObject) {
980
+ if (jQuery.browser.msie) {
981
+ return false;
982
+ }
983
+ return jQuery('<br class="aloha-cleanme"/>');
984
+ },
985
+
986
+ /**
987
+ * removes textNodes from passed array, which only contain contentWhiteSpace (e.g. a \n between two tags)
988
+ * @param domArray array of domObjects
989
+ * @return void
990
+ */
991
+ removeElementContentWhitespaceObj: function (domArray) {
992
+ var correction = 0,
993
+ removeLater = [],
994
+ i,
995
+ el,
996
+ removeIndex;
997
+
998
+ for (i = 0; i < domArray.length; ++i) {
999
+ el = domArray[i];
1000
+ if (el.isElementContentWhitespace) {
1001
+ removeLater[removeLater.length] = i;
1002
+ }
1003
+ }
1004
+
1005
+ for (i = 0; i < removeLater.length; ++i) {
1006
+ removeIndex = removeLater[i];
1007
+ domArray.splice(removeIndex - correction, 1);
1008
+ ++correction;
1009
+ }
1010
+ },
1011
+
1012
+ /**
1013
+ * recursive method to parallelly walk through two dom subtrees, leave elements before startContainer in first subtree and move rest to other
1014
+ * @param selectionTree tree to iterate over as contained in rangeObject. must be passed separately to allow recursion in the selection tree, but not in the rangeObject
1015
+ * @param rangeObject Aloha.Selection.SelectionRange of the current selection
1016
+ * @param followUpContainer optional jQuery object; if provided the rangeObject will be split and the second part will be insert inside of this object
1017
+ * @param inBetweenMarkup jQuery object to be inserted between the two split parts. will be either a <br> (if no followUpContainer is passed) OR e.g. a table, which must be inserted between the splitobject AND the follow up
1018
+ * @return void
1019
+ */
1020
+ splitRangeObjectHelper: function (selectionTree, rangeObject, followUpContainer, inBetweenMarkup) {
1021
+ if (!followUpContainer) {
1022
+ Aloha.Log.warn(this, 'no followUpContainer, no inBetweenMarkup, nothing to do...');
1023
+ }
1024
+
1025
+ var fillUpElement = this.getFillUpElement(rangeObject.splitObject),
1026
+ splitObject = jQuery(rangeObject.splitObject),
1027
+ startMoving = false,
1028
+ el,
1029
+ i,
1030
+ completeText,
1031
+ jqObj,
1032
+ mirrorLevel,
1033
+ parent,
1034
+ treeLength;
1035
+
1036
+ if (selectionTree.length > 0) {
1037
+ mirrorLevel = followUpContainer.contents();
1038
+
1039
+ // if length of mirrorLevel and selectionTree are not equal, the mirrorLevel must be corrected. this happens, when the mirrorLevel contains whitespace textNodes
1040
+ if (mirrorLevel.length !== selectionTree.length) {
1041
+ this.removeElementContentWhitespaceObj(mirrorLevel);
1042
+ }
1043
+
1044
+ for (i = 0, treeLength = selectionTree.length; i < treeLength; ++i) {
1045
+ el = selectionTree[i];
1046
+
1047
+ // remove all objects in the mirrorLevel, which are BEFORE the cursor
1048
+ // OR if the cursor is at the last position of the last Textnode (causing an empty followUpContainer to be appended)
1049
+ if ((el.selection === 'none' && startMoving === false) || (el.domobj && el.domobj.nodeType === 3 && el === selectionTree[(selectionTree.length - 1)] && el.startOffset === el.domobj.data.length)) {
1050
+ // iteration is before cursor, leave this part inside the splitObject, remove from followUpContainer
1051
+ // however if the object to remove is the last existing textNode within the followUpContainer, insert a BR instead
1052
+ // otherwise the followUpContainer is invalid and takes up no vertical space
1053
+
1054
+ if (followUpContainer.textNodes().length > 1 || (el.domobj.nodeType === 1 && el.children.length === 0)) {
1055
+ // note: the second part of the if (el.domobj.nodeType === 1 && el.children.length === 0) covers a very special condition,
1056
+ // where an empty tag is located right before the cursor when pressing enter. In this case the empty tag would not be
1057
+ // removed correctly otherwise
1058
+ mirrorLevel.eq(i).remove();
1059
+
1060
+ } else if (GENTICS.Utils.Dom.isSplitObject(followUpContainer[0])) {
1061
+ if (fillUpElement) {
1062
+ followUpContainer.html(fillUpElement); // for your zoological german knowhow: ephemera = Eintagsfliege
1063
+ } else {
1064
+ followUpContainer.empty();
1065
+ }
1066
+
1067
+ } else {
1068
+ followUpContainer.empty();
1069
+ followUpContainer.addClass('preparedForRemoval');
1070
+ }
1071
+
1072
+ continue;
1073
+
1074
+ } else {
1075
+ // split objects, which are AT the cursor Position or directly above
1076
+ if (el.selection !== 'none') { // before cursor, leave this part inside the splitObject
1077
+ // TODO better check for selection == 'partial' here?
1078
+ if (el.domobj && el.domobj.nodeType === 3 && el.startOffset !== undefined) {
1079
+ completeText = el.domobj.data;
1080
+ if (el.startOffset > 0) { // first check, if there will be some text left in the splitObject
1081
+ el.domobj.data = completeText.substr(0, el.startOffset);
1082
+ } else if (selectionTree.length > 1) { // if not, check if the splitObject contains more than one node, because then it can be removed. this happens, when ENTER is pressed inside of a textnode, but not at the borders
1083
+ jQuery(el.domobj).remove();
1084
+ } else { // if the "empty" textnode is the last node left in the splitObject, replace it with a ephemera break
1085
+ // if the parent is a blocklevel element, we insert the fillup element
1086
+ parent = jQuery(el.domobj).parent();
1087
+ if (GENTICS.Utils.Dom.isSplitObject(parent[0])) {
1088
+ if (fillUpElement) {
1089
+ parent.html(fillUpElement);
1090
+ } else {
1091
+ parent.empty();
1092
+ }
1093
+
1094
+ } else {
1095
+ // if the parent is no blocklevel element and would be empty now, we completely remove it
1096
+ parent.remove();
1097
+ }
1098
+ }
1099
+ if (completeText.length - el.startOffset > 0) {
1100
+ // first check if there is text left to put in the followUpContainer's textnode. this happens, when ENTER is pressed inside of a textnode, but not at the borders
1101
+ mirrorLevel[i].data = completeText.substr(el.startOffset, completeText.length);
1102
+ } else if (mirrorLevel.length > 1) {
1103
+ // if not, check if the followUpContainer contains more than one node, because if yes, the "empty" textnode can be removed
1104
+ mirrorLevel.eq((i)).remove();
1105
+ } else if (GENTICS.Utils.Dom.isBlockLevelElement(followUpContainer[0])) {
1106
+ // if the "empty" textnode is the last node left in the followUpContainer (which is a blocklevel element), replace it with a ephemera break
1107
+ if (fillUpElement) {
1108
+ followUpContainer.html(fillUpElement);
1109
+ } else {
1110
+ followUpContainer.empty();
1111
+ }
1112
+
1113
+ } else {
1114
+ // if the "empty" textnode is the last node left in a non-blocklevel element, mark it for removal
1115
+ followUpContainer.empty();
1116
+ followUpContainer.addClass('preparedForRemoval');
1117
+ }
1118
+ }
1119
+
1120
+ startMoving = true;
1121
+
1122
+ if (el.children.length > 0) {
1123
+ this.splitRangeObjectHelper(el.children, rangeObject, mirrorLevel.eq(i), inBetweenMarkup);
1124
+ }
1125
+
1126
+ } else {
1127
+ // remove all objects in the origin, which are AFTER the cursor
1128
+ if (el.selection === 'none' && startMoving === true) {
1129
+ // iteration is after cursor, remove from splitObject and leave this part inside the followUpContainer
1130
+ jqObj = jQuery(el.domobj).remove();
1131
+ }
1132
+ }
1133
+ }
1134
+ }
1135
+ } else {
1136
+ Aloha.Log.error(this, 'can not split splitObject due to an empty selection tree');
1137
+ }
1138
+
1139
+ // and finally cleanup: remove all fillUps > 1
1140
+ splitObject.find('br.aloha-ephemera:gt(0)').remove(); // remove all elements greater than (gt) 0, that also means: leave one
1141
+ followUpContainer.find('br.aloha-ephemera:gt(0)').remove(); // remove all elements greater than (gt) 0, that also means: leave one
1142
+
1143
+ // remove objects prepared for removal
1144
+ splitObject.find('.preparedForRemoval').remove();
1145
+ followUpContainer.find('.preparedForRemoval').remove();
1146
+
1147
+ // if splitObject / followUp are empty, place a fillUp inside
1148
+ if (splitObject.contents().length === 0 && GENTICS.Utils.Dom.isSplitObject(splitObject[0]) && fillUpElement) {
1149
+ splitObject.html(fillUpElement);
1150
+ }
1151
+
1152
+ if (followUpContainer.contents().length === 0 && GENTICS.Utils.Dom.isSplitObject(followUpContainer[0]) && fillUpElement) {
1153
+ followUpContainer.html(fillUpElement);
1154
+ }
1155
+ },
1156
+
1157
+ /**
1158
+ * returns a jQuery object fitting the passed splitObject as follow up object
1159
+ * examples,
1160
+ * - when passed a p it will return an empty p (clone of the passed p)
1161
+ * - when passed an h1, it will return either an h1 (clone of the passed one) or a new p (if the collapsed selection was at the end)
1162
+ * @param rangeObject Aloha.RangeObject
1163
+ * @return void
1164
+ */
1165
+ getSplitFollowUpContainer: function (rangeObject) {
1166
+ var tagName = rangeObject.splitObject.nodeName.toLowerCase(),
1167
+ returnObj,
1168
+ inside,
1169
+ lastObj;
1170
+
1171
+ switch (tagName) {
1172
+ case 'h1':
1173
+ case 'h2':
1174
+ case 'h3':
1175
+ case 'h4':
1176
+ case 'h5':
1177
+ case 'h6':
1178
+ // get the last textnode in the splitobject, but don't consider aloha-cleanme elements
1179
+ lastObj = jQuery(rangeObject.splitObject).textNodes(':not(.aloha-cleanme)').last()[0];
1180
+ // special case: when enter is hit at the end of a heading, the followUp should be a <p>
1181
+ if (lastObj && rangeObject.startContainer === lastObj && rangeObject.startOffset === lastObj.length) {
1182
+ returnObj = jQuery('<p></p>');
1183
+ inside = jQuery(rangeObject.splitObject.outerHTML).contents();
1184
+ returnObj.append(inside);
1185
+ return returnObj;
1186
+ }
1187
+ break;
1188
+
1189
+ case 'li':
1190
+ // TODO check whether the li is the last one
1191
+ // special case: if enter is hit twice inside a list, the next item should be a <p> (and inserted outside the list)
1192
+ if (rangeObject.startContainer.nodeName.toLowerCase() === 'br' && jQuery(rangeObject.startContainer).hasClass('aloha-ephemera')) {
1193
+ returnObj = jQuery('<p></p>');
1194
+ inside = jQuery(rangeObject.splitObject.outerHTML).contents();
1195
+ returnObj.append(inside);
1196
+ return returnObj;
1197
+ }
1198
+ // when the li is the last one and empty, we also just return a <p>
1199
+ if (!rangeObject.splitObject.nextSibling && jQuery.trim(jQuery(rangeObject.splitObject).text()).length === 0) {
1200
+ returnObj = jQuery('<p></p>');
1201
+ return returnObj;
1202
+ }
1203
+ break;
1204
+ }
1205
+
1206
+ return jQuery(rangeObject.splitObject.outerHTML);
1207
+ },
1208
+
1209
+ /**
1210
+ * Transform the given domobj into an object with the given new nodeName.
1211
+ * Preserves the content and all attributes. If a range object is given, also the range will be preserved
1212
+ * @param domobj dom object to transform
1213
+ * @param nodeName new node name
1214
+ * @param range range object
1215
+ * @api
1216
+ * @return new object as jQuery object
1217
+ */
1218
+ transformDomObject: function (domobj, nodeName, range) {
1219
+ // first create the new element
1220
+ var jqOldObj = jQuery(domobj),
1221
+ jqNewObj = jQuery('<' + nodeName + '>'),
1222
+ i,
1223
+ attributes = jqOldObj[0].cloneNode(false).attributes;
1224
+
1225
+ // TODO what about events?
1226
+ // copy attributes
1227
+ if (attributes) {
1228
+ for (i = 0; i < attributes.length; ++i) {
1229
+ if (typeof attributes[i].specified === 'undefined' || attributes[i].specified) {
1230
+ jqNewObj.attr(attributes[i].nodeName, attributes[i].nodeValue);
1231
+ }
1232
+ }
1233
+ }
1234
+
1235
+ // copy inline CSS
1236
+ if (jqOldObj[0].style && jqOldObj[0].style.cssText) {
1237
+ jqNewObj[0].style.cssText = jqOldObj[0].style.cssText;
1238
+ }
1239
+
1240
+ // now move the contents of the old dom object into the new dom object
1241
+ jqOldObj.contents().appendTo(jqNewObj);
1242
+
1243
+ // finally replace the old object with the new one
1244
+ jqOldObj.replaceWith(jqNewObj);
1245
+
1246
+ // preserve the range
1247
+ if (range) {
1248
+ if (range.startContainer == domobj) {
1249
+ range.startContainer = jqNewObj.get(0);
1250
+ }
1251
+
1252
+ if (range.endContainer == domobj) {
1253
+ range.endContainer = jqNewObj.get(0);
1254
+ }
1255
+ }
1256
+
1257
+ return jqNewObj;
1258
+ },
1259
+
1260
+ /**
1261
+ * String representation
1262
+ * @return {String}
1263
+ */
1264
+ toString: function () {
1265
+ return 'Aloha.Markup';
1266
+ }
1267
+
1268
+ });
1269
+
1270
+ Aloha.Markup = new Aloha.Markup();
1271
+ return Aloha.Markup;
1272
+ });