gnuside-aloha-rails 0.23.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (826) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +18 -0
  3. data/README.md +48 -0
  4. data/Rakefile +69 -0
  5. data/app/assets/javascripts/aloha.js +3 -0
  6. data/app/assets/javascripts/aloha/preinit.js.erb +1 -0
  7. data/lib/aloha-rails.rb +1 -0
  8. data/lib/aloha/rails.rb +2 -0
  9. data/lib/aloha/rails/engine.rb +9 -0
  10. data/lib/aloha/rails/version.rb +7 -0
  11. data/lib/tasks/aloha-assets.rake +9 -0
  12. data/vendor/assets/javascripts/aloha/css/aloha.scss +31 -0
  13. data/vendor/assets/javascripts/aloha/img/arrow-down.png +0 -0
  14. data/vendor/assets/javascripts/aloha/img/arrow-left.png +0 -0
  15. data/vendor/assets/javascripts/aloha/img/arrow.png +0 -0
  16. data/vendor/assets/javascripts/aloha/img/base-multi.png +0 -0
  17. data/vendor/assets/javascripts/aloha/img/base.png +0 -0
  18. data/vendor/assets/javascripts/aloha/img/bg.png +0 -0
  19. data/vendor/assets/javascripts/aloha/img/breadcrumb-divider.png +0 -0
  20. data/vendor/assets/javascripts/aloha/img/gentics-logo.png +0 -0
  21. data/vendor/assets/javascripts/aloha/img/grabhandle.png +0 -0
  22. data/vendor/assets/javascripts/aloha/img/maximize.png +0 -0
  23. data/vendor/assets/javascripts/aloha/img/multisplit-base.jpg +0 -0
  24. data/vendor/assets/javascripts/aloha/img/multisplit-close.gif +0 -0
  25. data/vendor/assets/javascripts/aloha/img/multisplit-open.gif +0 -0
  26. data/vendor/assets/javascripts/aloha/img/pin.png +0 -0
  27. data/vendor/assets/javascripts/aloha/img/removeformat.png +0 -0
  28. data/vendor/assets/javascripts/aloha/img/text_indent.png +0 -0
  29. data/vendor/assets/javascripts/aloha/img/text_indent_remove.png +0 -0
  30. data/vendor/assets/javascripts/aloha/lib/aloha-jquery-noconflict.js +14 -0
  31. data/vendor/assets/javascripts/aloha/lib/aloha.js +595 -0
  32. data/vendor/assets/javascripts/aloha/lib/aloha/block-jump.js +153 -0
  33. data/vendor/assets/javascripts/aloha/lib/aloha/command.js +287 -0
  34. data/vendor/assets/javascripts/aloha/lib/aloha/console.js +347 -0
  35. data/vendor/assets/javascripts/aloha/lib/aloha/contenthandlermanager.js +104 -0
  36. data/vendor/assets/javascripts/aloha/lib/aloha/copypaste.js +108 -0
  37. data/vendor/assets/javascripts/aloha/lib/aloha/core.js +623 -0
  38. data/vendor/assets/javascripts/aloha/lib/aloha/ecma5shims.js +326 -0
  39. data/vendor/assets/javascripts/aloha/lib/aloha/editable.js +1042 -0
  40. data/vendor/assets/javascripts/aloha/lib/aloha/engine.js +8646 -0
  41. data/vendor/assets/javascripts/aloha/lib/aloha/ephemera.js +492 -0
  42. data/vendor/assets/javascripts/aloha/lib/aloha/ierange-m2.js +29 -0
  43. data/vendor/assets/javascripts/aloha/lib/aloha/jquery.aloha.js +542 -0
  44. data/vendor/assets/javascripts/aloha/lib/aloha/markup.js +1276 -0
  45. data/vendor/assets/javascripts/aloha/lib/aloha/nls/ca/i18n.js +11 -0
  46. data/vendor/assets/javascripts/aloha/lib/aloha/nls/de/i18n.js +11 -0
  47. data/vendor/assets/javascripts/aloha/lib/aloha/nls/i18n.js +20 -0
  48. data/vendor/assets/javascripts/aloha/lib/aloha/nls/mk/i18n.js +11 -0
  49. data/vendor/assets/javascripts/aloha/lib/aloha/nls/pt-br/i18n.js +11 -0
  50. data/vendor/assets/javascripts/aloha/lib/aloha/nls/ru/i18n.js +11 -0
  51. data/vendor/assets/javascripts/aloha/lib/aloha/nls/uk/i18n.js +11 -0
  52. data/vendor/assets/javascripts/aloha/lib/aloha/nls/zh-hans/i18n.js +11 -0
  53. data/vendor/assets/javascripts/aloha/lib/aloha/observable.js +113 -0
  54. data/vendor/assets/javascripts/aloha/lib/aloha/plugin.js +281 -0
  55. data/vendor/assets/javascripts/aloha/lib/aloha/pluginmanager.js +203 -0
  56. data/vendor/assets/javascripts/aloha/lib/aloha/rangy-core.js +30 -0
  57. data/vendor/assets/javascripts/aloha/lib/aloha/registry.js +137 -0
  58. data/vendor/assets/javascripts/aloha/lib/aloha/repository.js +255 -0
  59. data/vendor/assets/javascripts/aloha/lib/aloha/repositorymanager.js +742 -0
  60. data/vendor/assets/javascripts/aloha/lib/aloha/repositoryobjects.js +162 -0
  61. data/vendor/assets/javascripts/aloha/lib/aloha/selection.js +2402 -0
  62. data/vendor/assets/javascripts/aloha/lib/aloha/sidebar.js +1045 -0
  63. data/vendor/assets/javascripts/aloha/lib/aloha/state-override.js +147 -0
  64. data/vendor/assets/javascripts/aloha/lib/css.js +455 -0
  65. data/vendor/assets/javascripts/aloha/lib/i18n.js +192 -0
  66. data/vendor/assets/javascripts/aloha/lib/require.js +2053 -0
  67. data/vendor/assets/javascripts/aloha/lib/text.js +288 -0
  68. data/vendor/assets/javascripts/aloha/lib/util/arrays.js +287 -0
  69. data/vendor/assets/javascripts/aloha/lib/util/boundary-markers.js +86 -0
  70. data/vendor/assets/javascripts/aloha/lib/util/browser.js +32 -0
  71. data/vendor/assets/javascripts/aloha/lib/util/class.js +78 -0
  72. data/vendor/assets/javascripts/aloha/lib/util/dom.js +1888 -0
  73. data/vendor/assets/javascripts/aloha/lib/util/dom2.js +908 -0
  74. data/vendor/assets/javascripts/aloha/lib/util/functions.js +62 -0
  75. data/vendor/assets/javascripts/aloha/lib/util/html.js +311 -0
  76. data/vendor/assets/javascripts/aloha/lib/util/json2.js +464 -0
  77. data/vendor/assets/javascripts/aloha/lib/util/keys.js +65 -0
  78. data/vendor/assets/javascripts/aloha/lib/util/lang.js +89 -0
  79. data/vendor/assets/javascripts/aloha/lib/util/maps.js +130 -0
  80. data/vendor/assets/javascripts/aloha/lib/util/misc.js +51 -0
  81. data/vendor/assets/javascripts/aloha/lib/util/position.js +176 -0
  82. data/vendor/assets/javascripts/aloha/lib/util/range-context.js +776 -0
  83. data/vendor/assets/javascripts/aloha/lib/util/range.js +917 -0
  84. data/vendor/assets/javascripts/aloha/lib/util/strings.js +122 -0
  85. data/vendor/assets/javascripts/aloha/lib/util/trees.js +336 -0
  86. data/vendor/assets/javascripts/aloha/lib/vendor/3rdparty.txt +70 -0
  87. data/vendor/assets/javascripts/aloha/lib/vendor/amplify.store.js +298 -0
  88. data/vendor/assets/javascripts/aloha/lib/vendor/class.js +76 -0
  89. data/vendor/assets/javascripts/aloha/lib/vendor/grid.locale.de.js +138 -0
  90. data/vendor/assets/javascripts/aloha/lib/vendor/grid.locale.en.js +133 -0
  91. data/vendor/assets/javascripts/aloha/lib/vendor/ierange-m2.js +508 -0
  92. data/vendor/assets/javascripts/aloha/lib/vendor/jquery-1.7.2.js +9421 -0
  93. data/vendor/assets/javascripts/aloha/lib/vendor/jquery-ui-1.9.0.custom-aloha.js +14711 -0
  94. data/vendor/assets/javascripts/aloha/lib/vendor/jquery.jqgrid.js +474 -0
  95. data/vendor/assets/javascripts/aloha/lib/vendor/jquery.jstree.js +4549 -0
  96. data/vendor/assets/javascripts/aloha/lib/vendor/jquery.layout-1.3.0-rc30.7.js +5924 -0
  97. data/vendor/assets/javascripts/aloha/lib/vendor/pubsub/js/pubsub-unminified.js +187 -0
  98. data/vendor/assets/javascripts/aloha/lib/vendor/pubsub/js/pubsub.js +2 -0
  99. data/vendor/assets/javascripts/aloha/lib/vendor/rangy-core.js +3295 -0
  100. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/css/jstree.css +88 -0
  101. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/css/repository-browser.css +744 -0
  102. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/arrow-000-medium.png +0 -0
  103. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/arrow-180.png +0 -0
  104. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/arrow-315-medium.png +0 -0
  105. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/arrow-stop-180.png +0 -0
  106. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/arrow-stop.png +0 -0
  107. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/arrow.png +0 -0
  108. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/control-stop-square-small.png +0 -0
  109. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/folder-horizontal-open.png +0 -0
  110. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/folder-open.png +0 -0
  111. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/magnifier-left.png +0 -0
  112. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/page.png +0 -0
  113. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/picture.png +0 -0
  114. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/sort-alphabet-descending.png +0 -0
  115. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/sort-alphabet.png +0 -0
  116. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/throbber.gif +0 -0
  117. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/js/repository-browser-unminified.js +1450 -0
  118. data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/js/repository-browser.js +32 -0
  119. data/vendor/assets/javascripts/aloha/lib/vendor/sanitize.js +278 -0
  120. data/vendor/assets/javascripts/aloha/plugins/common/abbr/css/abbr.css +1 -0
  121. data/vendor/assets/javascripts/aloha/plugins/common/abbr/img/remabbr.png +0 -0
  122. data/vendor/assets/javascripts/aloha/plugins/common/abbr/lib/abbr-plugin.js +304 -0
  123. data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/ca/i18n.js +6 -0
  124. data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/de/i18n.js +6 -0
  125. data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/i18n.js +15 -0
  126. data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/mk/i18n.js +6 -0
  127. data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/pt-br/i18n.js +6 -0
  128. data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/ru/i18n.js +6 -0
  129. data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/uk/i18n.js +6 -0
  130. data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/zh-hans/i18n.js +6 -0
  131. data/vendor/assets/javascripts/aloha/plugins/common/abbr/package.json +1 -0
  132. data/vendor/assets/javascripts/aloha/plugins/common/align/LICENSE +166 -0
  133. data/vendor/assets/javascripts/aloha/plugins/common/align/README +12 -0
  134. data/vendor/assets/javascripts/aloha/plugins/common/align/css/align.css +31 -0
  135. data/vendor/assets/javascripts/aloha/plugins/common/align/img/align.png +0 -0
  136. data/vendor/assets/javascripts/aloha/plugins/common/align/lib/align-plugin.js +465 -0
  137. data/vendor/assets/javascripts/aloha/plugins/common/align/nls/ca/i18n.js +6 -0
  138. data/vendor/assets/javascripts/aloha/plugins/common/align/nls/de/i18n.js +9 -0
  139. data/vendor/assets/javascripts/aloha/plugins/common/align/nls/i18n.js +18 -0
  140. data/vendor/assets/javascripts/aloha/plugins/common/align/nls/mk/i18n.js +6 -0
  141. data/vendor/assets/javascripts/aloha/plugins/common/align/nls/pt-br/i18n.js +6 -0
  142. data/vendor/assets/javascripts/aloha/plugins/common/align/nls/ru/i18n.js +6 -0
  143. data/vendor/assets/javascripts/aloha/plugins/common/align/nls/uk/i18n.js +6 -0
  144. data/vendor/assets/javascripts/aloha/plugins/common/align/nls/zh-hans/i18n.js +6 -0
  145. data/vendor/assets/javascripts/aloha/plugins/common/align/package.json +2 -0
  146. data/vendor/assets/javascripts/aloha/plugins/common/block/README +0 -0
  147. data/vendor/assets/javascripts/aloha/plugins/common/block/css/block.css +110 -0
  148. data/vendor/assets/javascripts/aloha/plugins/common/block/img/toolbar-draghandle.gif +0 -0
  149. data/vendor/assets/javascripts/aloha/plugins/common/block/lib/block-plugin.js +347 -0
  150. data/vendor/assets/javascripts/aloha/plugins/common/block/lib/block.js +1277 -0
  151. data/vendor/assets/javascripts/aloha/plugins/common/block/lib/blockcontenthandler.js +118 -0
  152. data/vendor/assets/javascripts/aloha/plugins/common/block/lib/blockmanager.js +621 -0
  153. data/vendor/assets/javascripts/aloha/plugins/common/block/lib/editor.js +331 -0
  154. data/vendor/assets/javascripts/aloha/plugins/common/block/lib/editormanager.js +55 -0
  155. data/vendor/assets/javascripts/aloha/plugins/common/block/lib/sidebarattributeeditor.js +126 -0
  156. data/vendor/assets/javascripts/aloha/plugins/common/block/nls/ca/i18n.js +3 -0
  157. data/vendor/assets/javascripts/aloha/plugins/common/block/nls/de/i18n.js +3 -0
  158. data/vendor/assets/javascripts/aloha/plugins/common/block/nls/i18n.js +12 -0
  159. data/vendor/assets/javascripts/aloha/plugins/common/block/nls/mk/i18n.js +3 -0
  160. data/vendor/assets/javascripts/aloha/plugins/common/block/nls/pt-br/i18n.js +3 -0
  161. data/vendor/assets/javascripts/aloha/plugins/common/block/nls/ru/i18n.js +3 -0
  162. data/vendor/assets/javascripts/aloha/plugins/common/block/nls/uk/i18n.js +3 -0
  163. data/vendor/assets/javascripts/aloha/plugins/common/block/nls/zh-hans/i18n.js +3 -0
  164. data/vendor/assets/javascripts/aloha/plugins/common/block/package.json +11 -0
  165. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/css/characterpicker.css +44 -0
  166. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/img/icon.png +0 -0
  167. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/lib/characterpicker-plugin.js +466 -0
  168. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/ca/i18n.js +3 -0
  169. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/de/i18n.js +3 -0
  170. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/i18n.js +12 -0
  171. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/mk/i18n.js +3 -0
  172. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/pt-br/i18n.js +3 -0
  173. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/ru/i18n.js +3 -0
  174. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/uk/i18n.js +3 -0
  175. data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/zh-hans/i18n.js +3 -0
  176. data/vendor/assets/javascripts/aloha/plugins/common/commands/css/abbr.css +0 -0
  177. data/vendor/assets/javascripts/aloha/plugins/common/commands/lib/commands-plugin.js +33 -0
  178. data/vendor/assets/javascripts/aloha/plugins/common/commands/lib/inserthtml.js +126 -0
  179. data/vendor/assets/javascripts/aloha/plugins/common/commands/package.json +1 -0
  180. data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/README.md +0 -0
  181. data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/blockelementcontenthandler.js +144 -0
  182. data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/contenthandler-plugin.js +65 -0
  183. data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/contenthandler-utils.js +58 -0
  184. data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/genericcontenthandler.js +359 -0
  185. data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/oembedcontenthandler.js +461 -0
  186. data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/sanitizecontenthandler.js +186 -0
  187. data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/wordcontenthandler.js +461 -0
  188. data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/package.json +1 -0
  189. data/vendor/assets/javascripts/aloha/plugins/common/dom-to-xhtml/lib/dom-to-xhtml-plugin.js +74 -0
  190. data/vendor/assets/javascripts/aloha/plugins/common/dom-to-xhtml/lib/dom-to-xhtml.js +415 -0
  191. data/vendor/assets/javascripts/aloha/plugins/common/format/img/em.png +0 -0
  192. data/vendor/assets/javascripts/aloha/plugins/common/format/img/strong.png +0 -0
  193. data/vendor/assets/javascripts/aloha/plugins/common/format/lib/format-plugin.js +594 -0
  194. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/ca/i18n.js +52 -0
  195. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/de/i18n.js +52 -0
  196. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/i18n.js +61 -0
  197. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/mk/i18n.js +52 -0
  198. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/pt-br/i18n.js +52 -0
  199. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/ru/i18n.js +52 -0
  200. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/uk/i18n.js +52 -0
  201. data/vendor/assets/javascripts/aloha/plugins/common/format/nls/zh-hans/i18n.js +52 -0
  202. data/vendor/assets/javascripts/aloha/plugins/common/highlighteditables/css/highlighteditables.css +14 -0
  203. data/vendor/assets/javascripts/aloha/plugins/common/highlighteditables/lib/highlighteditables-plugin.js +100 -0
  204. data/vendor/assets/javascripts/aloha/plugins/common/highlighteditables/package.json +1 -0
  205. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/css/horizontalruler.css +3 -0
  206. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/img/icon.png +0 -0
  207. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/lib/horizontalruler-plugin.js +95 -0
  208. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/ca/i18n.js +3 -0
  209. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/de/i18n.js +3 -0
  210. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/i18n.js +12 -0
  211. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/mk/i18n.js +3 -0
  212. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/pt-br/i18n.js +3 -0
  213. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/ru/i18n.js +3 -0
  214. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/uk/i18n.js +3 -0
  215. data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/zh-hans/i18n.js +3 -0
  216. data/vendor/assets/javascripts/aloha/plugins/common/image/README.md +66 -0
  217. data/vendor/assets/javascripts/aloha/plugins/common/image/css/image.css +133 -0
  218. data/vendor/assets/javascripts/aloha/plugins/common/image/img/blank.jpg +0 -0
  219. data/vendor/assets/javascripts/aloha/plugins/common/image/img/crop-buttons.gif +0 -0
  220. data/vendor/assets/javascripts/aloha/plugins/common/image/img/cropnresize.png +0 -0
  221. data/vendor/assets/javascripts/aloha/plugins/common/image/img/handle-sw.png +0 -0
  222. data/vendor/assets/javascripts/aloha/plugins/common/image/img/image-align-left.png +0 -0
  223. data/vendor/assets/javascripts/aloha/plugins/common/image/img/image-align-none.png +0 -0
  224. data/vendor/assets/javascripts/aloha/plugins/common/image/img/image-align-right.png +0 -0
  225. data/vendor/assets/javascripts/aloha/plugins/common/image/img/image-border.png +0 -0
  226. data/vendor/assets/javascripts/aloha/plugins/common/image/img/image-title.png +0 -0
  227. data/vendor/assets/javascripts/aloha/plugins/common/image/img/image.gif +0 -0
  228. data/vendor/assets/javascripts/aloha/plugins/common/image/img/padding-decrease.gif +0 -0
  229. data/vendor/assets/javascripts/aloha/plugins/common/image/img/padding-increase.gif +0 -0
  230. data/vendor/assets/javascripts/aloha/plugins/common/image/img/page.png +0 -0
  231. data/vendor/assets/javascripts/aloha/plugins/common/image/img/size-decrease.gif +0 -0
  232. data/vendor/assets/javascripts/aloha/plugins/common/image/img/size-increase.gif +0 -0
  233. data/vendor/assets/javascripts/aloha/plugins/common/image/lib/image-floatingMenu.js +308 -0
  234. data/vendor/assets/javascripts/aloha/plugins/common/image/lib/image-plugin-actions.js +0 -0
  235. data/vendor/assets/javascripts/aloha/plugins/common/image/lib/image-plugin.js +1341 -0
  236. data/vendor/assets/javascripts/aloha/plugins/common/image/nls/ca/i18n.js +32 -0
  237. data/vendor/assets/javascripts/aloha/plugins/common/image/nls/de/i18n.js +32 -0
  238. data/vendor/assets/javascripts/aloha/plugins/common/image/nls/i18n.js +41 -0
  239. data/vendor/assets/javascripts/aloha/plugins/common/image/nls/mk/i18n.js +32 -0
  240. data/vendor/assets/javascripts/aloha/plugins/common/image/nls/pt-br/i18n.js +32 -0
  241. data/vendor/assets/javascripts/aloha/plugins/common/image/nls/ru/i18n.js +32 -0
  242. data/vendor/assets/javascripts/aloha/plugins/common/image/nls/uk/i18n.js +32 -0
  243. data/vendor/assets/javascripts/aloha/plugins/common/image/nls/zh-hans/i18n.js +32 -0
  244. data/vendor/assets/javascripts/aloha/plugins/common/image/package.json +1 -0
  245. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/jcrop/jcrop.gif +0 -0
  246. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/jcrop/jquery.jcrop.css +46 -0
  247. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/jcrop/jquery.jcrop.min.js +165 -0
  248. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/mousewheel/mousewheel.js +85 -0
  249. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  250. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  251. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
  252. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  253. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  254. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  255. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  256. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  257. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  258. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
  259. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
  260. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
  261. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
  262. data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
  263. data/vendor/assets/javascripts/aloha/plugins/common/link/css/link.css +52 -0
  264. data/vendor/assets/javascripts/aloha/plugins/common/link/extra/delicious.js +264 -0
  265. data/vendor/assets/javascripts/aloha/plugins/common/link/extra/linklist.js +247 -0
  266. data/vendor/assets/javascripts/aloha/plugins/common/link/extra/slowlinklist.js +247 -0
  267. data/vendor/assets/javascripts/aloha/plugins/common/link/lib/link-plugin.js +958 -0
  268. data/vendor/assets/javascripts/aloha/plugins/common/link/nls/ca/i18n.js +14 -0
  269. data/vendor/assets/javascripts/aloha/plugins/common/link/nls/de/i18n.js +14 -0
  270. data/vendor/assets/javascripts/aloha/plugins/common/link/nls/i18n.js +23 -0
  271. data/vendor/assets/javascripts/aloha/plugins/common/link/nls/mk/i18n.js +14 -0
  272. data/vendor/assets/javascripts/aloha/plugins/common/link/nls/pt-br/i18n.js +14 -0
  273. data/vendor/assets/javascripts/aloha/plugins/common/link/nls/ru/i18n.js +14 -0
  274. data/vendor/assets/javascripts/aloha/plugins/common/link/nls/uk/i18n.js +14 -0
  275. data/vendor/assets/javascripts/aloha/plugins/common/link/nls/zh-hans/i18n.js +14 -0
  276. data/vendor/assets/javascripts/aloha/plugins/common/list/lib/list-plugin.js +878 -0
  277. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/ca/i18n.js +7 -0
  278. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/de/i18n.js +7 -0
  279. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/i18n.js +16 -0
  280. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/mk/i18n.js +7 -0
  281. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/pt-br/i18n.js +7 -0
  282. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/ru/i18n.js +7 -0
  283. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/uk/i18n.js +7 -0
  284. data/vendor/assets/javascripts/aloha/plugins/common/list/nls/zh-hans/i18n.js +7 -0
  285. data/vendor/assets/javascripts/aloha/plugins/common/list/package.json +1 -0
  286. data/vendor/assets/javascripts/aloha/plugins/common/paste/lib/paste-plugin.js +457 -0
  287. data/vendor/assets/javascripts/aloha/plugins/common/paste/package.json +8 -0
  288. data/vendor/assets/javascripts/aloha/plugins/common/table/css/table.css +125 -0
  289. data/vendor/assets/javascripts/aloha/plugins/common/table/img/down.cur +0 -0
  290. data/vendor/assets/javascripts/aloha/plugins/common/table/img/left.cur +0 -0
  291. data/vendor/assets/javascripts/aloha/plugins/common/table/img/table_layout.png +0 -0
  292. data/vendor/assets/javascripts/aloha/plugins/common/table/img/wai-green.png +0 -0
  293. data/vendor/assets/javascripts/aloha/plugins/common/table/img/wai-red.png +0 -0
  294. data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-cell.js +542 -0
  295. data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-create-layer.js +213 -0
  296. data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-plugin-utils.js +494 -0
  297. data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-plugin.js +1596 -0
  298. data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-selection.js +468 -0
  299. data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table.js +2110 -0
  300. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/ca/i18n.js +28 -0
  301. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/de/i18n.js +29 -0
  302. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/i18n.js +38 -0
  303. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/mk/i18n.js +28 -0
  304. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/pt-br/i18n.js +28 -0
  305. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/ru/i18n.js +28 -0
  306. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/uk/i18n.js +28 -0
  307. data/vendor/assets/javascripts/aloha/plugins/common/table/nls/zh-hans/i18n.js +28 -0
  308. data/vendor/assets/javascripts/aloha/plugins/common/table/package.json +1 -0
  309. data/vendor/assets/javascripts/aloha/plugins/common/ui/css/jquery-ui-1.9m6.css +430 -0
  310. data/vendor/assets/javascripts/aloha/plugins/common/ui/css/ui.css +689 -0
  311. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/blockquote.png +0 -0
  312. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/character-picker.png +0 -0
  313. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/em.png +0 -0
  314. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/format-block.png +0 -0
  315. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/format-inline.png +0 -0
  316. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/indent.png +0 -0
  317. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/jqueryui/ui-icons_222222_256x240.png +0 -0
  318. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/justify.png +0 -0
  319. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/language-annotation.png +0 -0
  320. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview.png +0 -0
  321. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/anchor.png +0 -0
  322. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/blockquote.png +0 -0
  323. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/caption.png +0 -0
  324. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/cite.png +0 -0
  325. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/dd.png +0 -0
  326. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/div.png +0 -0
  327. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/dl.png +0 -0
  328. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/dt.png +0 -0
  329. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/h1.png +0 -0
  330. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/h2.png +0 -0
  331. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/h3.png +0 -0
  332. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/h4.png +0 -0
  333. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/h5.png +0 -0
  334. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/h6.png +0 -0
  335. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/p.png +0 -0
  336. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/pre.png +0 -0
  337. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/q.png +0 -0
  338. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/table.png +0 -0
  339. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/td.png +0 -0
  340. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/th.png +0 -0
  341. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/multisplit-close.gif +0 -0
  342. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/multisplit-open.gif +0 -0
  343. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/outdent.png +0 -0
  344. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/quote.png +0 -0
  345. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/removeformat.png +0 -0
  346. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/strong.png +0 -0
  347. data/vendor/assets/javascripts/aloha/plugins/common/ui/img/tree.png +0 -0
  348. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/arena.js +11 -0
  349. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/autocomplete.js +70 -0
  350. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/button.js +114 -0
  351. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/component.js +121 -0
  352. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/container.js +210 -0
  353. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/context.js +53 -0
  354. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/dialog.js +215 -0
  355. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/floating.js +405 -0
  356. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/menuButton.js +169 -0
  357. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/multiSplit.js +237 -0
  358. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/port-helper-attribute-field.js +440 -0
  359. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/port-helper-multi-split.js +71 -0
  360. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/scopes.js +187 -0
  361. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/settings.js +202 -0
  362. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/subguarded.js +183 -0
  363. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/surface.js +106 -0
  364. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/tab.js +316 -0
  365. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/text.js +33 -0
  366. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/toggleButton.js +57 -0
  367. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/toolbar.js +251 -0
  368. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/ui-plugin.js +169 -0
  369. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/ui.js +181 -0
  370. data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/utils.js +104 -0
  371. data/vendor/assets/javascripts/aloha/plugins/common/ui/nls/ca/i18n.js +46 -0
  372. data/vendor/assets/javascripts/aloha/plugins/common/ui/nls/de/i18n.js +48 -0
  373. data/vendor/assets/javascripts/aloha/plugins/common/ui/nls/i18n.js +75 -0
  374. data/vendor/assets/javascripts/aloha/plugins/common/ui/nls/mk/i18n.js +46 -0
  375. data/vendor/assets/javascripts/aloha/plugins/common/ui/nls/pt-br/i18n.js +46 -0
  376. data/vendor/assets/javascripts/aloha/plugins/common/ui/nls/ru/i18n.js +46 -0
  377. data/vendor/assets/javascripts/aloha/plugins/common/ui/nls/uk/i18n.js +46 -0
  378. data/vendor/assets/javascripts/aloha/plugins/common/ui/nls/zh-hans/i18n.js +46 -0
  379. data/vendor/assets/javascripts/aloha/plugins/common/ui/vendor/jquery-ui-autocomplete-html.js +42 -0
  380. data/vendor/assets/javascripts/aloha/plugins/common/undo/lib/undo-plugin.js +165 -0
  381. data/vendor/assets/javascripts/aloha/plugins/common/undo/package.json +7 -0
  382. data/vendor/assets/javascripts/aloha/plugins/common/undo/vendor/diff_match_patch_uncompressed.js +2155 -0
  383. data/vendor/assets/javascripts/aloha/plugins/common/undo/vendor/undo.js +121 -0
  384. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/README +0 -0
  385. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/css/attributes.css +12 -0
  386. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/lib/attributes-plugin.js +237 -0
  387. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/ca/i18n.js +5 -0
  388. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/de/i18n.js +5 -0
  389. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/i18n.js +14 -0
  390. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/mk/i18n.js +5 -0
  391. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/pt-br/i18n.js +5 -0
  392. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/ru/i18n.js +5 -0
  393. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/uk/i18n.js +5 -0
  394. data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/zh-hans/i18n.js +5 -0
  395. data/vendor/assets/javascripts/aloha/plugins/extra/captioned-image/css/captioned-image.css +15 -0
  396. data/vendor/assets/javascripts/aloha/plugins/extra/captioned-image/lib/captioned-image-plugin.js +555 -0
  397. data/vendor/assets/javascripts/aloha/plugins/extra/cite/README +0 -0
  398. data/vendor/assets/javascripts/aloha/plugins/extra/cite/css/cite.css +39 -0
  399. data/vendor/assets/javascripts/aloha/plugins/extra/cite/img/blockquote.png +0 -0
  400. data/vendor/assets/javascripts/aloha/plugins/extra/cite/img/icon_cite.png +0 -0
  401. data/vendor/assets/javascripts/aloha/plugins/extra/cite/lib/cite-plugin.js +614 -0
  402. data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/ca/i18n.js +4 -0
  403. data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/de/i18n.js +4 -0
  404. data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/i18n.js +13 -0
  405. data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/mk/i18n.js +4 -0
  406. data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/pt-br/i18n.js +4 -0
  407. data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/ru/i18n.js +4 -0
  408. data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/uk/i18n.js +4 -0
  409. data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/zh-hans/i18n.js +4 -0
  410. data/vendor/assets/javascripts/aloha/plugins/extra/cite/package.json +1 -0
  411. data/vendor/assets/javascripts/aloha/plugins/extra/comments/img/add-icon.png +0 -0
  412. data/vendor/assets/javascripts/aloha/plugins/extra/comments/img/add.png +0 -0
  413. data/vendor/assets/javascripts/aloha/plugins/extra/comments/img/comments.png +0 -0
  414. data/vendor/assets/javascripts/aloha/plugins/extra/comments/img/hr.png +0 -0
  415. data/vendor/assets/javascripts/aloha/plugins/extra/comments/img/textbox.png +0 -0
  416. data/vendor/assets/javascripts/aloha/plugins/extra/comments/lib/comments-plugin.js +692 -0
  417. data/vendor/assets/javascripts/aloha/plugins/extra/comments/lib/comments.css +442 -0
  418. data/vendor/assets/javascripts/aloha/plugins/extra/comments/package.json +1 -0
  419. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/README.md +5 -0
  420. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/TODO.md +2 -0
  421. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/img/cross.png +0 -0
  422. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/img/hourglass.png +0 -0
  423. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/img/loading.gif +0 -0
  424. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/img/page.png +0 -0
  425. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/img/tick.png +0 -0
  426. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/lib/draganddropfiles-plugin.js +4 -0
  427. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/lib/dragndropfiles.css +110 -0
  428. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/lib/dragndropfiles.js +363 -0
  429. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/lib/dropfilesrepository.js +365 -0
  430. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/nls/ca/i18n.js +3 -0
  431. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/nls/de/i18n.js +3 -0
  432. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/nls/i18n.js +12 -0
  433. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/nls/mk/i18n.js +3 -0
  434. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/nls/pt-br/i18n.js +3 -0
  435. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/nls/ru/i18n.js +3 -0
  436. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/nls/uk/i18n.js +3 -0
  437. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/nls/zh-hans/i18n.js +3 -0
  438. data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/package.json +1 -0
  439. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/README.md +1 -0
  440. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/css/formatless.css +7 -0
  441. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/img/button.png +0 -0
  442. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/lib/formatlesshandler.js +97 -0
  443. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/lib/formatlesspaste-plugin.js +230 -0
  444. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/ca/i18n.js +3 -0
  445. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/de/i18n.js +3 -0
  446. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/i18n.js +12 -0
  447. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/mk/i18n.js +3 -0
  448. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/pt-br/i18n.js +3 -0
  449. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/ru/i18n.js +3 -0
  450. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/uk/i18n.js +3 -0
  451. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/zh-hans/i18n.js +3 -0
  452. data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/package.json +8 -0
  453. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/README +0 -0
  454. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/css/headerids.css +8 -0
  455. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/lib/headerids-plugin.js +254 -0
  456. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/ca/i18n.js +6 -0
  457. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/de/i18n.js +6 -0
  458. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/i18n.js +15 -0
  459. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/mk/i18n.js +6 -0
  460. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/pt-br/i18n.js +6 -0
  461. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/ru/i18n.js +6 -0
  462. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/uk/i18n.js +6 -0
  463. data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/zh-hans/i18n.js +6 -0
  464. data/vendor/assets/javascripts/aloha/plugins/extra/hints/README.md +12 -0
  465. data/vendor/assets/javascripts/aloha/plugins/extra/hints/css/hints.css +29 -0
  466. data/vendor/assets/javascripts/aloha/plugins/extra/hints/lib/hints-plugin.js +97 -0
  467. data/vendor/assets/javascripts/aloha/plugins/extra/hints/package.json +9 -0
  468. data/vendor/assets/javascripts/aloha/plugins/extra/hints/vendor/tipsy.js +242 -0
  469. data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/README +0 -0
  470. data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/lib/imagebrowser-plugin.js +160 -0
  471. data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/nls/ca/i18n.js +6 -0
  472. data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/nls/de/i18n.js +6 -0
  473. data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/nls/i18n.js +15 -0
  474. data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/nls/mk/i18n.js +6 -0
  475. data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/nls/pt-br/i18n.js +6 -0
  476. data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/nls/ru/i18n.js +6 -0
  477. data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/nls/uk/i18n.js +6 -0
  478. data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/nls/zh-hans/i18n.js +6 -0
  479. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/README +0 -0
  480. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ad.png +0 -0
  481. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ae.png +0 -0
  482. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/af.png +0 -0
  483. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ag.png +0 -0
  484. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ai.png +0 -0
  485. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/al.png +0 -0
  486. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/am.png +0 -0
  487. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/an.png +0 -0
  488. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ao.png +0 -0
  489. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ar.png +0 -0
  490. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/as.png +0 -0
  491. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/at.png +0 -0
  492. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/au.png +0 -0
  493. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/aw.png +0 -0
  494. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ax.png +0 -0
  495. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/az.png +0 -0
  496. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ba.png +0 -0
  497. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bb.png +0 -0
  498. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bd.png +0 -0
  499. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/be.png +0 -0
  500. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bf.png +0 -0
  501. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bg.png +0 -0
  502. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bh.png +0 -0
  503. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bi.png +0 -0
  504. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bj.png +0 -0
  505. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bm.png +0 -0
  506. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bn.png +0 -0
  507. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bo.png +0 -0
  508. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/br.png +0 -0
  509. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bs.png +0 -0
  510. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bt.png +0 -0
  511. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bv.png +0 -0
  512. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bw.png +0 -0
  513. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/by.png +0 -0
  514. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bz.png +0 -0
  515. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ca.png +0 -0
  516. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/catalonia.png +0 -0
  517. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cc.png +0 -0
  518. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cd.png +0 -0
  519. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cf.png +0 -0
  520. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cg.png +0 -0
  521. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ch.png +0 -0
  522. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ci.png +0 -0
  523. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ck.png +0 -0
  524. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cl.png +0 -0
  525. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cm.png +0 -0
  526. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cn.png +0 -0
  527. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/co.png +0 -0
  528. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cr.png +0 -0
  529. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cs.png +0 -0
  530. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cu.png +0 -0
  531. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cv.png +0 -0
  532. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cx.png +0 -0
  533. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cy.png +0 -0
  534. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cz.png +0 -0
  535. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/de.png +0 -0
  536. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/dj.png +0 -0
  537. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/dk.png +0 -0
  538. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/dm.png +0 -0
  539. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/do.png +0 -0
  540. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/dz.png +0 -0
  541. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ec.png +0 -0
  542. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ee.png +0 -0
  543. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/eg.png +0 -0
  544. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/eh.png +0 -0
  545. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/en.png +0 -0
  546. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/er.png +0 -0
  547. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/es.png +0 -0
  548. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/et.png +0 -0
  549. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/europeanunion.png +0 -0
  550. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fam.png +0 -0
  551. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fi.png +0 -0
  552. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fj.png +0 -0
  553. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fk.png +0 -0
  554. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fm.png +0 -0
  555. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fo.png +0 -0
  556. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fr.png +0 -0
  557. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ga.png +0 -0
  558. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gb.png +0 -0
  559. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gd.png +0 -0
  560. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ge.png +0 -0
  561. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gf.png +0 -0
  562. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gh.png +0 -0
  563. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gi.png +0 -0
  564. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gl.png +0 -0
  565. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gm.png +0 -0
  566. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gn.png +0 -0
  567. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gp.png +0 -0
  568. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gq.png +0 -0
  569. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gr.png +0 -0
  570. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gs.png +0 -0
  571. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gt.png +0 -0
  572. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gu.png +0 -0
  573. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gw.png +0 -0
  574. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gy.png +0 -0
  575. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/hk.png +0 -0
  576. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/hm.png +0 -0
  577. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/hn.png +0 -0
  578. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/hr.png +0 -0
  579. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ht.png +0 -0
  580. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/hu.png +0 -0
  581. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/id.png +0 -0
  582. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ie.png +0 -0
  583. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/il.png +0 -0
  584. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/in.png +0 -0
  585. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/io.png +0 -0
  586. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/iq.png +0 -0
  587. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ir.png +0 -0
  588. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/is.png +0 -0
  589. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/it.png +0 -0
  590. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/jm.png +0 -0
  591. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/jo.png +0 -0
  592. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/jp.png +0 -0
  593. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ke.png +0 -0
  594. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kg.png +0 -0
  595. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kh.png +0 -0
  596. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ki.png +0 -0
  597. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/km.png +0 -0
  598. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kn.png +0 -0
  599. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kp.png +0 -0
  600. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kr.png +0 -0
  601. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kw.png +0 -0
  602. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ky.png +0 -0
  603. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kz.png +0 -0
  604. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/la.png +0 -0
  605. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lb.png +0 -0
  606. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lc.png +0 -0
  607. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/li.png +0 -0
  608. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lk.png +0 -0
  609. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lr.png +0 -0
  610. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ls.png +0 -0
  611. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lt.png +0 -0
  612. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lu.png +0 -0
  613. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lv.png +0 -0
  614. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ly.png +0 -0
  615. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ma.png +0 -0
  616. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mc.png +0 -0
  617. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/md.png +0 -0
  618. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/me.png +0 -0
  619. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mg.png +0 -0
  620. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mh.png +0 -0
  621. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mk.png +0 -0
  622. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ml.png +0 -0
  623. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mm.png +0 -0
  624. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mn.png +0 -0
  625. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mo.png +0 -0
  626. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mp.png +0 -0
  627. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mq.png +0 -0
  628. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mr.png +0 -0
  629. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ms.png +0 -0
  630. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mt.png +0 -0
  631. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mu.png +0 -0
  632. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mv.png +0 -0
  633. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mw.png +0 -0
  634. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mx.png +0 -0
  635. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/my.png +0 -0
  636. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mz.png +0 -0
  637. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/na.png +0 -0
  638. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/nc.png +0 -0
  639. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ne.png +0 -0
  640. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/nf.png +0 -0
  641. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ng.png +0 -0
  642. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ni.png +0 -0
  643. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/nl.png +0 -0
  644. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/no.png +0 -0
  645. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/np.png +0 -0
  646. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/nr.png +0 -0
  647. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/nu.png +0 -0
  648. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/nz.png +0 -0
  649. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/om.png +0 -0
  650. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pa.png +0 -0
  651. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pe.png +0 -0
  652. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pf.png +0 -0
  653. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pg.png +0 -0
  654. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ph.png +0 -0
  655. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pk.png +0 -0
  656. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pl.png +0 -0
  657. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pm.png +0 -0
  658. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pn.png +0 -0
  659. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pr.png +0 -0
  660. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ps.png +0 -0
  661. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pt.png +0 -0
  662. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pw.png +0 -0
  663. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/py.png +0 -0
  664. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/qa.png +0 -0
  665. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/re.png +0 -0
  666. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ro.png +0 -0
  667. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/rs.png +0 -0
  668. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ru.png +0 -0
  669. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/rw.png +0 -0
  670. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sa.png +0 -0
  671. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sb.png +0 -0
  672. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sc.png +0 -0
  673. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/scotland.png +0 -0
  674. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sd.png +0 -0
  675. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/se.png +0 -0
  676. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sg.png +0 -0
  677. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sh.png +0 -0
  678. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/si.png +0 -0
  679. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sj.png +0 -0
  680. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sk.png +0 -0
  681. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sl.png +0 -0
  682. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sm.png +0 -0
  683. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sn.png +0 -0
  684. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/so.png +0 -0
  685. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sr.png +0 -0
  686. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/st.png +0 -0
  687. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sv.png +0 -0
  688. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sy.png +0 -0
  689. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sz.png +0 -0
  690. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tc.png +0 -0
  691. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/td.png +0 -0
  692. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tf.png +0 -0
  693. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tg.png +0 -0
  694. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/th.png +0 -0
  695. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tj.png +0 -0
  696. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tk.png +0 -0
  697. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tl.png +0 -0
  698. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tm.png +0 -0
  699. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tn.png +0 -0
  700. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/to.png +0 -0
  701. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tr.png +0 -0
  702. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tt.png +0 -0
  703. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tv.png +0 -0
  704. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tw.png +0 -0
  705. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tz.png +0 -0
  706. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ua.png +0 -0
  707. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ug.png +0 -0
  708. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/um.png +0 -0
  709. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/us.png +0 -0
  710. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/uy.png +0 -0
  711. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/uz.png +0 -0
  712. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/va.png +0 -0
  713. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/vc.png +0 -0
  714. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ve.png +0 -0
  715. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/vg.png +0 -0
  716. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/vi.png +0 -0
  717. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/vn.png +0 -0
  718. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/vu.png +0 -0
  719. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/wales.png +0 -0
  720. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/wf.png +0 -0
  721. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ws.png +0 -0
  722. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ye.png +0 -0
  723. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/yt.png +0 -0
  724. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/za.png +0 -0
  725. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/zm.png +0 -0
  726. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/zw.png +0 -0
  727. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/lib/linkbrowser-plugin.js +161 -0
  728. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/ca/i18n.js +6 -0
  729. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/de/i18n.js +6 -0
  730. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/i18n.js +15 -0
  731. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/mk/i18n.js +6 -0
  732. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/pt-br/i18n.js +6 -0
  733. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/ru/i18n.js +6 -0
  734. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/uk/i18n.js +6 -0
  735. data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/zh-hans/i18n.js +6 -0
  736. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/nls/ca/i18n.js +28 -0
  737. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/nls/de/i18n.js +28 -0
  738. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/nls/i18n.js +37 -0
  739. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/nls/mk/i18n.js +28 -0
  740. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/nls/pt-br/i18n.js +28 -0
  741. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/nls/ru/i18n.js +28 -0
  742. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/nls/uk/i18n.js +28 -0
  743. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/nls/zh-hans/i18n.js +28 -0
  744. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/package.json +1 -0
  745. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/proxy.php.example +244 -0
  746. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/src/linkchecker.css +14 -0
  747. data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/src/linkchecker.js +269 -0
  748. data/vendor/assets/javascripts/aloha/plugins/extra/listenforcer/lib/listenforcer-plugin.js +190 -0
  749. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/README +0 -0
  750. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/css/metaview.css +78 -0
  751. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/anchor.png +0 -0
  752. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/blockquote.png +0 -0
  753. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/button.png +0 -0
  754. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/caption.png +0 -0
  755. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/cite.png +0 -0
  756. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/dd.png +0 -0
  757. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/div.png +0 -0
  758. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/dl.png +0 -0
  759. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/dt.png +0 -0
  760. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/h1.png +0 -0
  761. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/h2.png +0 -0
  762. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/h3.png +0 -0
  763. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/h4.png +0 -0
  764. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/h5.png +0 -0
  765. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/h6.png +0 -0
  766. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/hr.png +0 -0
  767. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/icon_cite.png +0 -0
  768. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/p.png +0 -0
  769. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/pre.png +0 -0
  770. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/table.png +0 -0
  771. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/td.png +0 -0
  772. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/th.png +0 -0
  773. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/lib/metaview-plugin.js +185 -0
  774. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/ca/i18n.js +3 -0
  775. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/de/i18n.js +3 -0
  776. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/i18n.js +12 -0
  777. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/mk/i18n.js +3 -0
  778. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/pt-br/i18n.js +3 -0
  779. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/ru/i18n.js +3 -0
  780. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/uk/i18n.js +3 -0
  781. data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/zh-hans/i18n.js +3 -0
  782. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/README +0 -0
  783. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/css/numerated-headers.css +7 -0
  784. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/img/headers.png +0 -0
  785. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/lib/numerated-headers-plugin.js +421 -0
  786. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/ca/i18n.js +5 -0
  787. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/de/i18n.js +6 -0
  788. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/i18n.js +15 -0
  789. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/mk/i18n.js +5 -0
  790. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/pt-br/i18n.js +5 -0
  791. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/ru/i18n.js +5 -0
  792. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/uk/i18n.js +5 -0
  793. data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/zh-hans/i18n.js +5 -0
  794. data/vendor/assets/javascripts/aloha/plugins/extra/profiler/css/profiler.css +34 -0
  795. data/vendor/assets/javascripts/aloha/plugins/extra/profiler/lib/profiler-plugin.js +304 -0
  796. data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/README.md +8 -0
  797. data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/css/ribbon.css +54 -0
  798. data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/img/fade-in.png +0 -0
  799. data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/img/fade-out.png +0 -0
  800. data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/lib/ribbon-plugin.js +144 -0
  801. data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/package.json +1 -0
  802. data/vendor/assets/javascripts/aloha/plugins/extra/sourceview/css/sourceview.css +18 -0
  803. data/vendor/assets/javascripts/aloha/plugins/extra/sourceview/lib/sourceview-plugin.js +252 -0
  804. data/vendor/assets/javascripts/aloha/plugins/extra/sourceview/vendor/htmlbeautifier.js +468 -0
  805. data/vendor/assets/javascripts/aloha/plugins/extra/textcolor/css/textcolor.css +65 -0
  806. data/vendor/assets/javascripts/aloha/plugins/extra/textcolor/img/icon.png +0 -0
  807. data/vendor/assets/javascripts/aloha/plugins/extra/textcolor/lib/textcolor-plugin.js +420 -0
  808. data/vendor/assets/javascripts/aloha/plugins/extra/textcolor/nls/de/i18n.js +3 -0
  809. data/vendor/assets/javascripts/aloha/plugins/extra/textcolor/nls/i18n.js +6 -0
  810. data/vendor/assets/javascripts/aloha/plugins/extra/toc/lib/toc-plugin.js +399 -0
  811. data/vendor/assets/javascripts/aloha/plugins/extra/toc/nls/ca/i18n.js +3 -0
  812. data/vendor/assets/javascripts/aloha/plugins/extra/toc/nls/de/i18n.js +3 -0
  813. data/vendor/assets/javascripts/aloha/plugins/extra/toc/nls/i18n.js +12 -0
  814. data/vendor/assets/javascripts/aloha/plugins/extra/toc/nls/mk/i18n.js +3 -0
  815. data/vendor/assets/javascripts/aloha/plugins/extra/toc/nls/pt-br/i18n.js +3 -0
  816. data/vendor/assets/javascripts/aloha/plugins/extra/toc/nls/ru/i18n.js +3 -0
  817. data/vendor/assets/javascripts/aloha/plugins/extra/toc/nls/uk/i18n.js +3 -0
  818. data/vendor/assets/javascripts/aloha/plugins/extra/toc/nls/zh-hans/i18n.js +3 -0
  819. data/vendor/assets/javascripts/aloha/plugins/extra/toc/package.json +1 -0
  820. data/vendor/assets/javascripts/aloha/plugins/extra/validation/lib/validation-plugin.js +277 -0
  821. data/vendor/assets/stylesheets/aloha-common-extra.css +24 -0
  822. data/vendor/assets/stylesheets/aloha-core.css +19 -0
  823. data/vendor/assets/stylesheets/aloha-reset.css +24 -0
  824. data/vendor/assets/stylesheets/aloha-sidebar.css +296 -0
  825. data/vendor/assets/stylesheets/aloha.css +31 -0
  826. metadata +898 -0
@@ -0,0 +1,326 @@
1
+ /**
2
+ * ecma5schims.js - Shim for ECMA5 compatibility
3
+ * (http://en.wikipedia.org/wiki/Shim_%28computing%29)
4
+ *
5
+ * A shim library that implements common functions that are missing on some
6
+ * environments in order to complete ECMA5 compatibility across all major
7
+ * browsers.
8
+ *
9
+ * TODO: This code needs to be refactored so as to conform to Aloha coding
10
+ * standards. It is also severly lacking in documentation. Please take
11
+ * note of: https://github.com/alohaeditor/Aloha-Editor/wiki/Commit-Checklist .
12
+ */
13
+
14
+ define([], function () {
15
+ 'use strict';
16
+ var $_;
17
+
18
+ var shims = {
19
+ // Function bind
20
+ bind: function (owner) {
21
+ var obj = this.obj || this;
22
+ var native_method = Function.prototype.bind;
23
+ var args = Array.prototype.slice.call(arguments, 1);
24
+
25
+ if (native_method) {
26
+ return native_method.apply(obj, arguments);
27
+ }
28
+ return function () {
29
+ return obj.apply(owner, arguments.length === 0 ? args : args.concat(Array.prototype.slice.call(arguments)));
30
+ };
31
+ },
32
+
33
+ // String trim
34
+ trim: function () {
35
+ var obj = this.obj || this;
36
+ var native_method = String.prototype.trim;
37
+
38
+ if (native_method) {
39
+ return native_method.call(obj);
40
+ }
41
+ return obj.replace(/^\s+/, '').replace(/\s+$/, '');
42
+ },
43
+
44
+ // Array methods
45
+ // i optional
46
+ indexOf: function (find, i) {
47
+ var obj = this.obj || this;
48
+ var native_method = Array.prototype.indexOf;
49
+
50
+ if (native_method) {
51
+ return native_method.call(obj, find, i);
52
+ }
53
+ if (i === undefined) {
54
+ i = 0;
55
+ }
56
+ if (i < 0) {
57
+ i += obj.length;
58
+ }
59
+ if (i < 0) {
60
+ i = 0;
61
+ }
62
+ var n;
63
+ for (n = obj.length; i < n; i++) {
64
+ if (undefined !== obj[i] && obj[i] === find) {
65
+ return i;
66
+ }
67
+ }
68
+ return -1;
69
+ },
70
+
71
+ // that optional
72
+ forEach: function (action, that) {
73
+ var obj = this.obj || this;
74
+ var native_method = Array.prototype.forEach;
75
+
76
+ if (native_method) {
77
+ return native_method.call(obj, action, that);
78
+ }
79
+ var i, n;
80
+ for (i = 0, n = obj.length; i < n; i++) {
81
+ if (undefined !== obj[i]) {
82
+ action.call(that, obj[i], i, obj);
83
+ }
84
+ }
85
+ },
86
+
87
+ // that optional
88
+ // chain optional
89
+ map: function (mapper, that, chain) {
90
+ var obj = this.obj || this;
91
+ var native_method = Array.prototype.map;
92
+ var returnWrapper = (typeof arguments[arguments.length - 1] == "boolean") ? Array.prototype.pop.call(arguments) : false;
93
+ var result = [];
94
+
95
+ if (native_method) {
96
+ result = native_method.call(obj, mapper, that);
97
+ } else {
98
+ var other = [];
99
+ var i, n;
100
+ for (i = 0, n = obj.length; i < n; i++) {
101
+ if (undefined !== obj[i]) {
102
+ other[i] = mapper.call(that, obj[i], i, obj);
103
+ }
104
+ }
105
+ result = other;
106
+ }
107
+
108
+ return returnWrapper ? $_(result) : result;
109
+ },
110
+
111
+ // that optional
112
+ // chain optional
113
+ filter: function (filterFunc, that, chain) {
114
+ var obj = this.obj || this;
115
+ var native_method = Array.prototype.filter;
116
+ var returnWrapper = (typeof arguments[arguments.length - 1] == "boolean") ? Array.prototype.pop.call(arguments) : false;
117
+ var result = [];
118
+
119
+ if (native_method) {
120
+ result = native_method.call(obj, filterFunc, that);
121
+ } else {
122
+ var other = [],
123
+ v,
124
+ i,
125
+ n;
126
+ for (i = 0, n = obj.length; i < n; i++) {
127
+ if (undefined !== obj[i] && filterFunc.call(that, v = obj[i], i, obj)) {
128
+ other.push(v);
129
+ }
130
+ }
131
+ result = other;
132
+ }
133
+
134
+ return returnWrapper ? $_(result) : result;
135
+ },
136
+
137
+ // that optional
138
+ every: function (tester, that) {
139
+ var obj = this.obj || this;
140
+ var native_method = Array.prototype.every;
141
+
142
+ if (native_method) {
143
+ return native_method.call(obj, tester, that);
144
+ }
145
+ var i, n;
146
+ for (i = 0, n = obj.length; i < n; i++) {
147
+ if (undefined !== obj[i] && !tester.call(that, obj[i], i, obj)) {
148
+ return false;
149
+ }
150
+ }
151
+ return true;
152
+ },
153
+
154
+ // that optional
155
+ some: function (tester, that) {
156
+ var obj = this.obj || this;
157
+ var native_method = Array.prototype.some;
158
+
159
+ if (native_method) {
160
+ return native_method.call(obj, tester, that);
161
+ }
162
+ var i, n;
163
+ for (i = 0, n = obj.length; i < n; i++) {
164
+ if (undefined !== obj[i] && tester.call(that, obj[i], i, obj)) {
165
+ return true;
166
+ }
167
+ }
168
+ return false;
169
+ },
170
+
171
+ // Since IE7 doesn't support 'hasAttribute' method on nodes
172
+ // TODO: raise an exception if the object is not an node
173
+ hasAttribute: function (attr) {
174
+ var obj = this.obj || this;
175
+ var native_method = obj.hasAttribute;
176
+
177
+ if (native_method) {
178
+ return obj.hasAttribute(attr);
179
+ }
180
+ return !!obj.getAttribute(attr);
181
+ }
182
+
183
+ };
184
+
185
+ $_ = function (obj) {
186
+ var Wrapper = function () {};
187
+ Wrapper.prototype = shims;
188
+
189
+ var wrapper_instance = new Wrapper();
190
+ wrapper_instance.obj = obj;
191
+ return wrapper_instance;
192
+ };
193
+
194
+ var shim;
195
+ for (shim in shims) {
196
+ if (shims.hasOwnProperty(shim)) {
197
+ $_[shim] = shims[shim];
198
+ }
199
+ }
200
+
201
+
202
+ // Node constants
203
+ // http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-1841493061
204
+ if (typeof window.Node != 'undefined') {
205
+ $_.Node = window.Node;
206
+ } else {
207
+ $_.Node = {
208
+ 'ELEMENT_NODE': 1,
209
+ 'ATTRIBUTE_NODE': 2,
210
+ 'TEXT_NODE': 3,
211
+ 'CDATA_SECTION_NODE': 4,
212
+ 'ENTITY_REFERENCE_NODE': 5,
213
+ 'ENTITY_NODE': 6,
214
+ 'PROCESSING_INSTRUCTION_NODE': 7,
215
+ 'COMMENT_NODE': 8,
216
+ 'DOCUMENT_NODE': 9,
217
+ 'DOCUMENT_TYPE_NODE': 10,
218
+ 'DOCUMENT_FRAGMENT_NODE': 11,
219
+ 'NOTATION_NODE': 12,
220
+ //The two nodes are disconnected. Order between disconnected nodes is always implementation-specific.
221
+ 'DOCUMENT_POSITION_DISCONNECTED': 0x01,
222
+ //The second node precedes the reference node.
223
+ 'DOCUMENT_POSITION_PRECEDING': 0x02,
224
+ //The node follows the reference node.
225
+ 'DOCUMENT_POSITION_FOLLOWING': 0x04,
226
+ //The node contains the reference node. A node which contains is always preceding, too.
227
+ 'DOCUMENT_POSITION_CONTAINS': 0x08,
228
+ //The node is contained by the reference node. A node which is contained is always following, too.
229
+ 'DOCUMENT_POSITION_CONTAINED_BY': 0x10,
230
+ //The determination of preceding versus following is implementation-specific.
231
+ 'DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC': 0x20
232
+ };
233
+ }
234
+
235
+ //node.ownerDocument gives the document object, which isn't the right info for a disconnect
236
+ function getRootParent(node) {
237
+ var parent = null;
238
+
239
+ if (node) {
240
+ do {
241
+ parent = node;
242
+ } while (null != (node = node.parentNode));
243
+ }
244
+
245
+ return parent;
246
+ }
247
+
248
+ //Compare Position - MIT Licensed, John Resig; http://ejohn.org/blog/comparing-document-position/
249
+ //Already checked for equality and disconnect
250
+ function comparePosition(node1, node2) {
251
+ return (node1.contains(node2) && 16) + (node2.contains(node1) && 8) + (node1.sourceIndex >= 0 && node2.sourceIndex >= 0 ? (node1.sourceIndex < node2.sourceIndex && 4) + (node1.sourceIndex > node2.sourceIndex && 2) : 1);
252
+ }
253
+
254
+ //get a node with a sourceIndex to use
255
+ function getUseNode(node) {
256
+ //if the node already has a sourceIndex, use that node
257
+ if (null != node.sourceIndex) {
258
+ return node;
259
+ }
260
+ //otherwise, insert a comment (which has a sourceIndex but minimal DOM impact) before the node and use that
261
+ return node.parentNode.insertBefore(document.createComment(""), node);
262
+ }
263
+
264
+ // http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-compareDocumentPosition
265
+ // FIXME: Check if the DOMNode prototype can be set.
266
+ $_.compareDocumentPosition = function (node1, node2) {
267
+
268
+ if (document.documentElement.compareDocumentPosition) {
269
+ return node1.compareDocumentPosition(node2);
270
+ }
271
+
272
+ if (!document.documentElement.contains) {
273
+ throw 'neither compareDocumentPosition nor contains is supported by this browser.';
274
+ }
275
+
276
+ if (node1 == node2) {
277
+ return 0;
278
+ }
279
+
280
+ //if they don't have the same parent, there's a disconnect
281
+ if (getRootParent(node1) != getRootParent(node2)) {
282
+ return 1;
283
+ }
284
+
285
+ //use this if both nodes have a sourceIndex (text nodes don't)
286
+ if (null != node1.sourceIndex && null != node2.sourceIndex) {
287
+ return comparePosition(node1, node2);
288
+ }
289
+
290
+ //document will definitely contain the other node
291
+ if (node1 == document) {
292
+ return 20;
293
+ }
294
+ if (node2 == document) {
295
+ return 10;
296
+ }
297
+
298
+ //get sourceIndexes to use for both nodes
299
+ var useNode1 = getUseNode(node1),
300
+ useNode2 = getUseNode(node2);
301
+
302
+ //call this function again to get the result
303
+ var result = comparePosition(useNode1, useNode2);
304
+
305
+ //clean up if needed
306
+ if (node1 != useNode1) {
307
+ useNode1.parentNode.removeChild(useNode1);
308
+ }
309
+ if (node2 != useNode2) {
310
+ useNode2.parentNode.removeChild(useNode2);
311
+ }
312
+ return result;
313
+ };
314
+
315
+ $_.getComputedStyle = function (node, style) {
316
+ if (window.getComputedStyle) {
317
+ return window.getComputedStyle(node, style);
318
+ }
319
+ if (node.currentStyle) {
320
+ return node.currentStyle;
321
+ }
322
+ return null;
323
+ };
324
+
325
+ return $_;
326
+ });
@@ -0,0 +1,1042 @@
1
+ /* editable.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/pluginmanager',
32
+ 'aloha/selection',
33
+ 'aloha/markup',
34
+ 'aloha/contenthandlermanager',
35
+ 'aloha/console',
36
+ 'aloha/block-jump',
37
+ 'aloha/ephemera',
38
+ 'util/dom2',
39
+ 'PubSub',
40
+ 'aloha/copypaste',
41
+ 'aloha/command',
42
+ 'aloha/state-override'
43
+ ], function (
44
+ Aloha,
45
+ Class,
46
+ $,
47
+ PluginManager,
48
+ Selection,
49
+ Markup,
50
+ ContentHandlerManager,
51
+ console,
52
+ BlockJump,
53
+ Ephemera,
54
+ Dom,
55
+ PubSub,
56
+ CopyPaste,
57
+ Command,
58
+ StateOverride
59
+ ) {
60
+ 'use strict';
61
+
62
+ var jQuery = $;
63
+ var unescape = window.unescape,
64
+ GENTICS = window.GENTICS,
65
+
66
+ // True, if the next editable activate event should not be handled
67
+ ignoreNextActivateEvent = false;
68
+
69
+ /**
70
+ * A cache to hold information derived, and used in getContents().
71
+ * @type {object<string,(string|jQuery.<HTMLElement>)>}
72
+ * @private
73
+ */
74
+ var editableContentCache = {};
75
+
76
+ // default supported and custom content handler settings
77
+ // @TODO move to new config when implemented in Aloha
78
+ Aloha.defaults.contentHandler = {};
79
+ Aloha.defaults.contentHandler.initEditable = ['blockelement', 'sanitize'];
80
+ Aloha.defaults.contentHandler.getContents = ['blockelement', 'sanitize', 'basic'];
81
+
82
+ // The insertHtml contenthandler ( paste ) will, by default, use all
83
+ // registered content handlers.
84
+ //Aloha.defaults.contentHandler.insertHtml = void 0;
85
+
86
+ if (typeof Aloha.settings.contentHandler === 'undefined') {
87
+ Aloha.settings.contentHandler = {};
88
+ }
89
+
90
+ var defaultContentSerializer = function (editableElement) {
91
+ return jQuery(editableElement).html();
92
+ };
93
+
94
+ var contentSerializer = defaultContentSerializer;
95
+
96
+ /**
97
+ * Triggers smartContentChange handlers.
98
+ *
99
+ * @param {Aloha.Editable}
100
+ * @return {string} Content that has been processed by getContent handlers
101
+ * and smartContentChange handlers.
102
+ */
103
+ function handleSmartContentChange(editable) {
104
+ return ContentHandlerManager.handleContent(editable.getContents(), {
105
+ contenthandler: Aloha.settings.contentHandler.smartContentChange
106
+ }, editable);
107
+ }
108
+
109
+ /**
110
+ * List of observed key, mapped against their keycodes.
111
+ *
112
+ * @type {object<number, string>}
113
+ * @const
114
+ */
115
+ var KEYCODES = {
116
+ 65: 'a'
117
+ };
118
+
119
+ /**
120
+ * Handlers for various key combos.
121
+ * Each handler ought to return false if they do not want the event to
122
+ * continue propagating.
123
+ */
124
+ var keyBindings = {
125
+ 'ctrl+a': function () {
126
+ var editable = CopyPaste.getEditableAt(CopyPaste.getRange());
127
+ if (editable) {
128
+ CopyPaste.selectAllOf(editable.obj[0]);
129
+ return false;
130
+ }
131
+ }
132
+ };
133
+
134
+ /**
135
+ * Gets the name of the modifier key if is in effect for the given event.
136
+ *
137
+ * eg: <Ctrl>+c
138
+ *
139
+ * @param {jQuery.Event} $event
140
+ * @return {string|null} Modifier string or null if no modifier is in
141
+ * effect.
142
+ *
143
+ */
144
+ function keyModifier($event) {
145
+ return $event.altKey ? 'alt' :
146
+ $event.ctrlKey ? 'ctrl' :
147
+ $event.shiftKey ? 'shift' : null;
148
+ }
149
+
150
+ /**
151
+ * Handles keydown events that are fired on the page's document.
152
+ *
153
+ * @param {jQuery.Event) $event
154
+ * @return {boolean} Returns false to stop propagation; undefined otherwise.
155
+ */
156
+ function onKeydown($event) {
157
+ if (!Aloha.activeEditable) {
158
+ return;
159
+ }
160
+ var key = KEYCODES[$event.which];
161
+ if (key) {
162
+ var modifier = keyModifier($event);
163
+ var combo = (modifier ? modifier + '+' : '') + key;
164
+ if (keyBindings[combo]) {
165
+ return keyBindings[combo]($event);
166
+ }
167
+ }
168
+ }
169
+
170
+ $(document).keydown(onKeydown);
171
+
172
+ /**
173
+ * Editable object
174
+ * @namespace Aloha
175
+ * @class Editable
176
+ * @method
177
+ * @constructor
178
+ * @param {Object} obj jQuery object reference to the object
179
+ */
180
+ Aloha.Editable = Class.extend({
181
+
182
+ _constructor: function (obj) {
183
+ // check wheter the object has an ID otherwise generate and set
184
+ // globally unique ID
185
+ if (!obj.attr('id')) {
186
+ obj.attr('id', GENTICS.Utils.guid());
187
+ }
188
+
189
+ // store object reference
190
+ this.obj = obj;
191
+ this.originalObj = obj;
192
+ this.ready = false;
193
+
194
+ // delimiters, timer and idle for smartContentChange
195
+ // smartContentChange triggers -- tab: '\u0009' - space: '\u0020' - enter: 'Enter'
196
+ // backspace: U+0008 - delete: U+007F
197
+ this.sccDelimiters = [':', ';', '.', '!', '?', ',',
198
+ unescape('%u0009'), unescape('%u0020'), unescape('%u0008'), unescape('%u007F'), 'Enter'];
199
+ this.sccIdle = 5000;
200
+ this.sccDelay = 500;
201
+ this.sccTimerIdle = false;
202
+ this.sccTimerDelay = false;
203
+
204
+ // see keyset http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071221/keyset.html
205
+ this.keyCodeMap = {
206
+ 93: 'Apps', // The Application key
207
+ 18: 'Alt', // The Alt ( Menu ) key.
208
+ 20: 'CapsLock', // The Caps Lock ( Capital ) key.
209
+ 17: 'Control', // The Control ( Ctrl ) key.
210
+ 40: 'Down', // The Down Arrow key.
211
+ 35: 'End', // The End key.
212
+ 13: 'Enter', // The Enter key.
213
+ 112: 'F1', // The F1 key.
214
+ 113: 'F2', // The F2 key.
215
+ 114: 'F3', // The F3 key.
216
+ 115: 'F4', // The F4 key.
217
+ 116: 'F5', // The F5 key.
218
+ 117: 'F6', // The F6 key.
219
+ 118: 'F7', // The F7 key.
220
+ 119: 'F8', // The F8 key.
221
+ 120: 'F9', // The F9 key.
222
+ 121: 'F10', // The F10 key.
223
+ 122: 'F11', // The F11 key.
224
+ 123: 'F12', // The F12 key.
225
+
226
+ // Anybody knows the keycode for F13-F24?
227
+ 36: 'Home', // The Home key.
228
+ 45: 'Insert', // The Insert ( Ins ) key.
229
+ 37: 'Left', // The Left Arrow key.
230
+ 224: 'Meta', // The Meta key.
231
+ 34: 'PageDown', // The Page Down ( Next ) key.
232
+ 33: 'PageUp', // The Page Up key.
233
+ 19: 'Pause', // The Pause key.
234
+ 44: 'PrintScreen', // The Print Screen ( PrintScrn, SnapShot ) key.
235
+ 39: 'Right', // The Right Arrow key.
236
+ 145: 'Scroll', // The scroll lock key
237
+ 16: 'Shift', // The Shift key.
238
+ 38: 'Up', // The Up Arrow key.
239
+ 91: 'Win', // The left Windows Logo key.
240
+ 92: 'Win' // The right Windows Logo key.
241
+ };
242
+
243
+ this.placeholderClass = 'aloha-placeholder';
244
+
245
+ Aloha.registerEditable(this);
246
+ },
247
+
248
+ /**
249
+ * Initialize the editable
250
+ * @return void
251
+ * @hide
252
+ */
253
+ init: function () {
254
+ var me = this;
255
+
256
+ // TODO make editables their own settings.
257
+ this.settings = Aloha.settings;
258
+
259
+ // smartContentChange settings
260
+ // @TODO move to new config when implemented in Aloha
261
+ if (Aloha.settings && Aloha.settings.smartContentChange) {
262
+ if (Aloha.settings.smartContentChange.delimiters) {
263
+ this.sccDelimiters = Aloha.settings.smartContentChange.delimiters;
264
+ }
265
+
266
+ if (Aloha.settings.smartContentChange.idle) {
267
+ this.sccIdle = Aloha.settings.smartContentChange.idle;
268
+ }
269
+
270
+ if (Aloha.settings.smartContentChange.delay) {
271
+ this.sccDelay = Aloha.settings.smartContentChange.delay;
272
+ }
273
+ }
274
+
275
+ // check if Aloha can handle the obj as Editable
276
+ if (!this.check(this.obj)) {
277
+ //Aloha.log( 'warn', this, 'Aloha cannot handle {' + this.obj[0].nodeName + '}' );
278
+ this.destroy();
279
+ return;
280
+ }
281
+
282
+ // apply content handler to clean up content
283
+ if (typeof Aloha.settings.contentHandler.getContents === 'undefined') {
284
+ Aloha.settings.contentHandler.getContents = Aloha.defaults.contentHandler.getContents;
285
+ }
286
+
287
+ // apply content handler to clean up content
288
+ if (typeof Aloha.settings.contentHandler.initEditable === 'undefined') {
289
+ Aloha.settings.contentHandler.initEditable = Aloha.defaults.contentHandler.initEditable;
290
+ }
291
+
292
+ var content = me.obj.html();
293
+ content = ContentHandlerManager.handleContent(content, {
294
+ contenthandler: Aloha.settings.contentHandler.initEditable,
295
+ command: 'initEditable'
296
+ }, me);
297
+ me.obj.html(content);
298
+
299
+ // Because editables can only properly be initialized when Aloha
300
+ // plugins are loaded.
301
+ Aloha.bind('aloha-plugins-loaded', function () {
302
+ me.obj.addClass('aloha-editable').contentEditable(true);
303
+
304
+ me.obj.mousedown(function (e) {
305
+ if (!Aloha.eventHandled) {
306
+ Aloha.eventHandled = true;
307
+ return me.activate(e);
308
+ }
309
+ });
310
+
311
+ me.obj.mouseup(function (e) {
312
+ Aloha.eventHandled = false;
313
+ });
314
+
315
+ me.obj.focus(function (e) {
316
+ return me.activate(e);
317
+ });
318
+
319
+ var keyInputElements = me.obj.add('.aloha-block', me.obj)
320
+ .keydown(function (event) {
321
+ var letEventPass = Markup.preProcessKeyStrokes(event);
322
+ me.keyCode = event.which;
323
+
324
+ if (!letEventPass) {
325
+ // the event will not proceed to key press, therefore trigger smartContentChange
326
+ me.smartContentChange(event);
327
+ }
328
+ return letEventPass;
329
+ })
330
+ .keypress(StateOverride.keyPressHandler);
331
+
332
+ // handle keypress
333
+ me.obj.keypress(function (event) {
334
+ // triggers a smartContentChange to get the right charcode
335
+ // To test try http://www.w3.org/2002/09/tests/keys.html
336
+ Aloha.activeEditable.smartContentChange(event);
337
+ });
338
+
339
+ // handle shortcut keys
340
+ me.obj.keyup(function (event) {
341
+ if (event.keyCode === 27) {
342
+ Aloha.deactivateEditable();
343
+ return false;
344
+ }
345
+ });
346
+
347
+ // register the onSelectionChange Event with the Editable field
348
+ me.obj.contentEditableSelectionChange(function (event) {
349
+ Selection.onChange(me.obj, event);
350
+ return me.obj;
351
+ });
352
+
353
+ // mark the editable as unmodified
354
+ me.setUnmodified();
355
+
356
+ // we don't do the sanitizing on aloha ready, since some plugins add elements into the content and bind
357
+ // events to it. If we sanitize by replacing the html, all events would get lost. TODO: think about a
358
+ // better solution for the sanitizing, without destroying the events apply content handler to clean up content
359
+ // var content = me.obj.html();
360
+ // if ( typeof Aloha.settings.contentHandler.initEditable === 'undefined' ) {
361
+ // Aloha.settings.contentHandler.initEditable = Aloha.defaults.contentHandler.initEditable;
362
+ // }
363
+ // content = ContentHandlerManager.handleContent( content, {
364
+ // contenthandler: Aloha.settings.contentHandler.initEditable
365
+ // } );
366
+ // me.obj.html( content );
367
+
368
+ me.snapshotContent = me.getContents();
369
+
370
+ // FF bug: check for empty editable contents ( no <br>; no whitespace )
371
+ if (jQuery.browser.mozilla) {
372
+ me.initEmptyEditable();
373
+ }
374
+
375
+ me.initPlaceholder();
376
+
377
+ me.ready = true;
378
+
379
+ // disable object resizing.
380
+ // we do this in here and with a slight delay, because
381
+ // starting with FF 15, this would cause a JS error
382
+ // if done before the first DOM object is made contentEditable.
383
+ window.setTimeout(function () {
384
+ Aloha.disableObjectResizing();
385
+ }, 20);
386
+
387
+ // throw a new event when the editable has been created
388
+ /**
389
+ * @event editableCreated fires after a new editable has been created, eg. via $( '#editme' ).aloha()
390
+ * The event is triggered in Aloha's global scope Aloha
391
+ * @param {Event} e the event object
392
+ * @param {Array} a an array which contains a reference to the currently created editable on its first position
393
+ */
394
+ Aloha.trigger('aloha-editable-created', [me]);
395
+ PubSub.pub('aloha.editable.created', {data: me});
396
+ });
397
+ },
398
+
399
+ /**
400
+ * True, if this editable is active for editing
401
+ * @property
402
+ * @type boolean
403
+ */
404
+ isActive: false,
405
+
406
+ /**
407
+ * stores the original content to determine if it has been modified
408
+ * @hide
409
+ */
410
+ originalContent: null,
411
+
412
+ /**
413
+ * every time a selection is made in the current editable the selection has to
414
+ * be saved for further use
415
+ * @hide
416
+ */
417
+ range: undefined,
418
+
419
+ /**
420
+ * Check if object can be edited by Aloha Editor
421
+ * @return {boolean } editable true if Aloha Editor can handle else false
422
+ * @hide
423
+ */
424
+ check: function () {
425
+ /* TODO check those elements
426
+ 'map', 'meter', 'object', 'output', 'progress', 'samp',
427
+ 'time', 'area', 'datalist', 'figure', 'kbd', 'keygen',
428
+ 'mark', 'math', 'wbr', 'area',
429
+ */
430
+
431
+ // Extract El
432
+ var me = this,
433
+ obj = this.obj,
434
+ el = obj.get(0),
435
+ nodeName = el.nodeName.toLowerCase(),
436
+
437
+ // supported elements
438
+ textElements = ['a', 'abbr', 'address', 'article', 'aside', 'b', 'bdo', 'blockquote', 'cite', 'code', 'command', 'del', 'details', 'dfn', 'div', 'dl', 'em', 'footer', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'i', 'ins', 'menu', 'nav', 'p', 'pre', 'q', 'ruby', 'section', 'small', 'span', 'strong', 'sub', 'sup', 'var'],
439
+ i,
440
+ div;
441
+
442
+ for (i = 0; i < textElements.length; ++i) {
443
+ if (nodeName === textElements[i]) {
444
+ return true;
445
+ }
446
+ }
447
+
448
+ // special handled elements
449
+ switch (nodeName) {
450
+ case 'label':
451
+ case 'button':
452
+ // TODO need some special handling.
453
+ break;
454
+ case 'textarea':
455
+ case 'input':
456
+ // Create a div alongside the textarea
457
+ div = jQuery('<div id="' + this.getId() + '-aloha" class="aloha-' + nodeName + '" />').insertAfter(obj);
458
+
459
+ // Resize the div to the textarea and
460
+ // Populate the div with the value of the textarea
461
+ // Then, hide the textarea
462
+ div.height(obj.height()).width(obj.width()).html(obj.val());
463
+
464
+ obj.hide();
465
+
466
+ // Attach a onsubmit to the form to place the HTML of the
467
+ // div back into the textarea
468
+ obj.parents('form:first').submit(function () {
469
+ obj.val(me.getContents());
470
+ });
471
+
472
+ // Swap textarea reference with the new div
473
+ this.obj = div;
474
+
475
+ // Supported
476
+ return true;
477
+ default:
478
+ break;
479
+ }
480
+
481
+ // the following elements are not supported
482
+ /*
483
+ 'canvas', 'audio', 'br', 'embed', 'fieldset', 'hgroup', 'hr',
484
+ 'iframe', 'img', 'input', 'map', 'script', 'select', 'style',
485
+ 'svg', 'table', 'ul', 'video', 'ol', 'form', 'noscript',
486
+ */
487
+ return false;
488
+ },
489
+
490
+ /**
491
+ * Init Placeholder
492
+ *
493
+ * @return void
494
+ */
495
+ initPlaceholder: function () {
496
+ if (Aloha.settings.placeholder && this.isEmpty()) {
497
+ this.addPlaceholder();
498
+ }
499
+ },
500
+
501
+ /**
502
+ * Check if the conteneditable is empty.
503
+ *
504
+ * @return {Boolean}
505
+ */
506
+ isEmpty: function () {
507
+ var editableTrimedContent = jQuery.trim(this.getContents()),
508
+ onlyBrTag = (editableTrimedContent === '<br>') ? true : false;
509
+ return (editableTrimedContent.length === 0 || onlyBrTag);
510
+ },
511
+
512
+ /**
513
+ * Check if the editable div is not empty. Fixes a FF browser bug
514
+ * see issue: https://github.com/alohaeditor/Aloha-Editor/issues/269
515
+ *
516
+ * @return {undefined}
517
+ */
518
+ initEmptyEditable: function () {
519
+ var obj = this.obj;
520
+ if (this.empty(this.getContents())) {
521
+ jQuery(obj).prepend('<br class="aloha-cleanme" />');
522
+ }
523
+ },
524
+
525
+ /**
526
+ * Add placeholder in editable
527
+ *
528
+ * @return void
529
+ */
530
+ addPlaceholder: function () {
531
+ var div = jQuery('<div>'),
532
+ span = jQuery('<span>'),
533
+ el,
534
+ obj = this.obj;
535
+ if (GENTICS.Utils.Dom.allowsNesting(obj[0], div[0])) {
536
+ el = div;
537
+ } else {
538
+ el = span;
539
+ }
540
+ if (jQuery("." + this.placeholderClass, obj).length !== 0) {
541
+ return;
542
+ }
543
+ jQuery.each(Aloha.settings.placeholder, function (selector, selectorConfig) {
544
+ if (obj.is(selector)) {
545
+ el.html(selectorConfig);
546
+ }
547
+ });
548
+ if (!el.is(':empty')) {
549
+ el.addClass(this.placeholderClass).addClass('aloha-ephemera');
550
+ jQuery(obj).append(el);
551
+ }
552
+ jQuery('br', obj).remove();
553
+ },
554
+
555
+ /**
556
+ * remove placeholder from contenteditable. If setCursor is true,
557
+ * will also set the cursor to the start of the selection. However,
558
+ * this will be ASYNCHRONOUS, so if you rely on the fact that
559
+ * the placeholder is removed after calling this method, setCursor
560
+ * should be false ( or not set )
561
+ *
562
+ * @return void
563
+ */
564
+ removePlaceholder: function (obj, setCursor) {
565
+ var placeholderClass = this.placeholderClass,
566
+ range;
567
+ if (jQuery("." + this.placeholderClass, obj).length === 0) {
568
+ return;
569
+ }
570
+ // set the cursor // remove placeholder
571
+ if (setCursor === true) {
572
+ window.setTimeout(function () {
573
+ range = new Selection.SelectionRange();
574
+ range.startContainer = range.endContainer = obj.get(0);
575
+ range.startOffset = range.endOffset = 0;
576
+ jQuery('.' + placeholderClass, obj).remove();
577
+ range.select();
578
+
579
+ }, 100);
580
+ } else {
581
+ jQuery('.' + placeholderClass, obj).remove();
582
+ }
583
+ },
584
+
585
+ /**
586
+ * destroy the editable
587
+ * @return void
588
+ */
589
+ destroy: function () {
590
+ // leave the element just to get sure
591
+ if (this === Aloha.getActiveEditable()) {
592
+ this.blur();
593
+ }
594
+
595
+ // special handled elements
596
+ switch (this.originalObj.get(0).nodeName.toLowerCase()) {
597
+ case 'label':
598
+ case 'button':
599
+ // TODO need some special handling.
600
+ break;
601
+ case 'textarea':
602
+ case 'input':
603
+ // restore content to original textarea
604
+ this.originalObj.val(this.getContents());
605
+ this.obj.remove();
606
+ this.originalObj.show();
607
+ break;
608
+ default:
609
+ break;
610
+ }
611
+
612
+ // now the editable is not ready any more
613
+ this.ready = false;
614
+
615
+ // remove the placeholder if needed.
616
+ this.removePlaceholder(this.obj);
617
+
618
+ // initialize the object and disable contentEditable
619
+ // unbind all events
620
+ // TODO should only unbind the specific handlers.
621
+ this.obj.removeClass('aloha-editable').contentEditable(false).unbind('mousedown click dblclick focus keydown keypress keyup');
622
+
623
+ /* TODO remove this event, it should implemented as bind and unbind
624
+ // register the onSelectionChange Event with the Editable field
625
+ this.obj.contentEditableSelectionChange( function( event ) {
626
+ Aloha.Selection.onChange( me.obj, event );
627
+ return me.obj;
628
+ } );
629
+ */
630
+
631
+ // throw a new event when the editable has been created
632
+ /**
633
+ * @event editableCreated fires after a new editable has been destroyes, eg. via $( '#editme' ).mahalo()
634
+ * The event is triggered in Aloha's global scope Aloha
635
+ * @param {Event} e the event object
636
+ * @param {Array} a an array which contains a reference to the currently created editable on its first position
637
+ */
638
+ Aloha.trigger('aloha-editable-destroyed', [this]);
639
+ PubSub.pub('aloha.editable.destroyed', {data: this});
640
+
641
+ // finally register the editable with Aloha
642
+ Aloha.unregisterEditable(this);
643
+ },
644
+
645
+ /**
646
+ * marks the editables current state as unmodified. Use this method to inform the editable
647
+ * that it's contents have been saved
648
+ * @method
649
+ */
650
+ setUnmodified: function () {
651
+ this.originalContent = this.getContents();
652
+ },
653
+
654
+ /**
655
+ * check if the editable has been modified during the edit process#
656
+ * @method
657
+ * @return boolean true if the editable has been modified, false otherwise
658
+ */
659
+ isModified: function () {
660
+ return this.originalContent !== this.getContents();
661
+ },
662
+
663
+ /**
664
+ * String representation of the object
665
+ * @method
666
+ * @return Aloha.Editable
667
+ */
668
+ toString: function () {
669
+ return 'Aloha.Editable';
670
+ },
671
+
672
+ /**
673
+ * check whether the editable has been disabled
674
+ */
675
+ isDisabled: function () {
676
+ return !this.obj.contentEditable() || this.obj.contentEditable() === 'false';
677
+ },
678
+
679
+ /**
680
+ * disable this editable
681
+ * a disabled editable cannot be written on by keyboard
682
+ */
683
+ disable: function () {
684
+ return this.isDisabled() || this.obj.contentEditable(false);
685
+ },
686
+
687
+ /**
688
+ * enable this editable
689
+ * reenables a disabled editable to be writteable again
690
+ */
691
+ enable: function () {
692
+ return this.isDisabled() && this.obj.contentEditable(true);
693
+ },
694
+
695
+
696
+ /**
697
+ * activates an Editable for editing
698
+ * disables all other active items
699
+ * @method
700
+ */
701
+ activate: function (e) {
702
+ // get active Editable before setting the new one.
703
+ var oldActive = Aloha.getActiveEditable();
704
+
705
+ // We need to ommit this call when this flag is set to true.
706
+ // This flag will only be set to true before the removePlaceholder method
707
+ // is called since that method invokes a focus event which will again trigger
708
+ // this method. We want to avoid double invokation of this method.
709
+ if (ignoreNextActivateEvent) {
710
+ ignoreNextActivateEvent = false;
711
+ return;
712
+ }
713
+
714
+ // handle special case in which a nested editable is focused by a click
715
+ // in this case the "focus" event would be triggered on the parent element
716
+ // which actually shifts the focus away to it's parent. this if is here to
717
+ // prevent this situation
718
+ if (e && e.type === 'focus' && oldActive !== null && oldActive.obj.parent().get(0) === e.currentTarget) {
719
+ return;
720
+ }
721
+
722
+ // leave immediately if this is already the active editable
723
+ if (this.isActive || this.isDisabled()) {
724
+ // we don't want parent editables to be triggered as well, so return false
725
+ return;
726
+ }
727
+
728
+ this.obj.addClass('aloha-editable-active');
729
+
730
+ Aloha.activateEditable(this);
731
+
732
+ ignoreNextActivateEvent = true;
733
+ this.removePlaceholder(this.obj, true);
734
+ ignoreNextActivateEvent = false;
735
+
736
+ this.isActive = true;
737
+
738
+ /**
739
+ * @event editableActivated fires after the editable has been activated by clicking on it.
740
+ * This event is triggered in Aloha's global scope Aloha
741
+ * @param {Event} e the event object
742
+ * @param {Array} a an array which contains a reference to last active editable on its first position, as well
743
+ * as the currently active editable on it's second position
744
+ */
745
+ // trigger a 'general' editableActivated event
746
+ Aloha.trigger('aloha-editable-activated', {
747
+ 'oldActive': oldActive,
748
+ 'editable': this
749
+ });
750
+ PubSub.pub('aloha.editable.activated', {
751
+ data: {
752
+ old: oldActive,
753
+ editable: this
754
+ }
755
+ });
756
+ },
757
+
758
+ /**
759
+ * handle the blur event
760
+ * this must not be attached to the blur event, which will trigger far too often
761
+ * eg. when a table within an editable is selected
762
+ * @hide
763
+ */
764
+ blur: function () {
765
+ this.obj.blur();
766
+ this.isActive = false;
767
+ this.initPlaceholder();
768
+ this.obj.removeClass('aloha-editable-active');
769
+
770
+ /**
771
+ * @event editableDeactivated fires after the editable has been activated by clicking on it.
772
+ * This event is triggered in Aloha's global scope Aloha
773
+ * @param {Event} e the event object
774
+ * @param {Array} a an array which contains a reference to this editable
775
+ */
776
+ Aloha.trigger('aloha-editable-deactivated', {
777
+ editable: this
778
+ });
779
+ PubSub.pub('aloha.editable.deactivated', {
780
+ data: {
781
+ editable: this
782
+ }
783
+ });
784
+
785
+ /**
786
+ * @event smartContentChanged
787
+ */
788
+ Aloha.activeEditable.smartContentChange({
789
+ type: 'blur'
790
+ }, null);
791
+ },
792
+
793
+ /**
794
+ * check if the string is empty
795
+ * used for zerowidth check
796
+ * @return true if empty or string is null, false otherwise
797
+ * @hide
798
+ */
799
+ empty: function (str) {
800
+ // br is needed for chrome
801
+ return (null === str) || (jQuery.trim(str) === '' || str === '<br/>');
802
+ },
803
+
804
+ /**
805
+ * Get the contents of this editable as a HTML string or child node DOM
806
+ * objects.
807
+ *
808
+ * @param {boolean} asObject Whether or not to retreive the contents of
809
+ * this editable as child node objects or as
810
+ * HTML string.
811
+ * @return {string|jQuery.<HTMLElement>} Contents of the editable as
812
+ * DOM objects or an HTML string.
813
+ */
814
+ getContents: function (asObject) {
815
+ var raw = this.obj.html();
816
+ var cache = editableContentCache[this.getId()];
817
+
818
+ if (!cache || raw !== cache.raw) {
819
+
820
+ BlockJump.removeZeroWidthTextNodeFix();
821
+
822
+ var $clone = this.obj.clone(false);
823
+ this.removePlaceholder($clone);
824
+ $clone = jQuery(Ephemera.prune($clone[0]));
825
+ PluginManager.makeClean($clone);
826
+
827
+ // TODO rewrite ContentHandlerManager to accept DOM trees instead of strings
828
+ $clone = jQuery('<div>' + ContentHandlerManager.handleContent($clone.html(), {
829
+ contenthandler: Aloha.settings.contentHandler.getContents,
830
+ command: 'getContents'
831
+ }, this) + '</div>');
832
+
833
+ cache = editableContentCache[this.getId()] = {};
834
+ cache.raw = raw;
835
+ cache.element = $clone;
836
+ }
837
+
838
+ if (asObject) {
839
+ return cache.element.clone().contents();
840
+ }
841
+
842
+ if (null == cache.serialized) {
843
+ cache.serialized = contentSerializer(cache.element[0]);
844
+ }
845
+ return cache.serialized;
846
+ },
847
+
848
+ /**
849
+ * Set the contents of this editable as a HTML string
850
+ * @param content as html
851
+ * @param return as object or html string
852
+ * @return contents of the editable
853
+ */
854
+ setContents: function (content, asObject) {
855
+ var reactivate = null;
856
+
857
+ if (Aloha.getActiveEditable() === this) {
858
+ Aloha.deactivateEditable();
859
+ reactivate = this;
860
+ }
861
+
862
+ this.obj.html(content);
863
+
864
+ if (null !== reactivate) {
865
+ reactivate.activate();
866
+ }
867
+
868
+ this.smartContentChange({
869
+ type: 'set-contents'
870
+ });
871
+
872
+ return asObject ? this.obj.contents() : contentSerializer(this.obj[0]);
873
+ },
874
+
875
+ /**
876
+ * Get the id of this editable
877
+ * @method
878
+ * @return id of this editable
879
+ */
880
+ getId: function () {
881
+ return this.obj.attr('id');
882
+ },
883
+
884
+ /**
885
+ * Generates and signals a smartContentChange event.
886
+ *
887
+ * A smart content change occurs when a special editing action, or a
888
+ * combination of interactions are performed by the user during the
889
+ * course of editing within an editable.
890
+ * The smart content change event would therefore signal to any
891
+ * component that is listening to this event, that content has been
892
+ * inserted into the editable that may need to be prococessed in a
893
+ * special way
894
+ * This is used for smart actions within the content/while editing.
895
+ * @param {Event} event
896
+ * @hide
897
+ */
898
+ smartContentChange: function (event) {
899
+ var me = this,
900
+ uniChar = null,
901
+ re,
902
+ match;
903
+
904
+ // ignore meta keys like crtl+v or crtl+l and so on
905
+ if (event && (event.metaKey || event.crtlKey || event.altKey)) {
906
+ return false;
907
+ }
908
+
909
+ if (event && event.originalEvent) {
910
+ // regex to strip unicode
911
+ re = new RegExp("U\\+(\\w{4})");
912
+ match = re.exec(event.originalEvent.keyIdentifier);
913
+
914
+ // Use among browsers reliable which http://api.jquery.com/keypress
915
+ uniChar = (this.keyCodeMap[this.keyCode] || String.fromCharCode(event.which) || 'unknown');
916
+ }
917
+
918
+ var snapshot = null;
919
+
920
+ function getSnapshotContent() {
921
+ if (null == snapshot) {
922
+ snapshot = me.getSnapshotContent();
923
+ }
924
+ return snapshot;
925
+ }
926
+
927
+ // handle "Enter" -- it's not "U+1234" -- when returned via "event.originalEvent.keyIdentifier"
928
+ // reference: http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071221/keyset.html
929
+ if (jQuery.inArray(uniChar, this.sccDelimiters) >= 0) {
930
+ clearTimeout(this.sccTimerIdle);
931
+ clearTimeout(this.sccTimerDelay);
932
+
933
+ this.sccTimerDelay = window.setTimeout(function () {
934
+ Aloha.trigger('aloha-smart-content-changed', {
935
+ 'editable': me,
936
+ 'keyIdentifier': event.originalEvent.keyIdentifier,
937
+ 'keyCode': event.keyCode,
938
+ 'char': uniChar,
939
+ 'triggerType': 'keypress', // keypress, timer, blur, paste
940
+ 'getSnapshotContent': getSnapshotContent
941
+ });
942
+ handleSmartContentChange(me);
943
+
944
+ console.debug('Aloha.Editable',
945
+ 'smartContentChanged: event type keypress triggered');
946
+ }, this.sccDelay);
947
+
948
+ } else if (event && event.type === 'paste') {
949
+ Aloha.trigger('aloha-smart-content-changed', {
950
+ 'editable': me,
951
+ 'keyIdentifier': null,
952
+ 'keyCode': null,
953
+ 'char': null,
954
+ 'triggerType': 'paste',
955
+ 'getSnapshotContent': getSnapshotContent
956
+ });
957
+ handleSmartContentChange(me);
958
+
959
+ } else if (event && event.type === 'blur') {
960
+ Aloha.trigger('aloha-smart-content-changed', {
961
+ 'editable': me,
962
+ 'keyIdentifier': null,
963
+ 'keyCode': null,
964
+ 'char': null,
965
+ 'triggerType': 'blur',
966
+ 'getSnapshotContent': getSnapshotContent
967
+ });
968
+ handleSmartContentChange(me);
969
+
970
+ } else if (event && event.type === 'block-change') {
971
+ Aloha.trigger('aloha-smart-content-changed', {
972
+ 'editable': me,
973
+ 'keyIdentifier': null,
974
+ 'keyCode': null,
975
+ 'char': null,
976
+ 'triggerType': 'block-change',
977
+ 'getSnapshotContent': getSnapshotContent
978
+ });
979
+ handleSmartContentChange(me);
980
+
981
+ } else if (uniChar !== null) {
982
+ // in the rare case idle time is lower then delay time
983
+ clearTimeout(this.sccTimerDelay);
984
+ clearTimeout(this.sccTimerIdle);
985
+ this.sccTimerIdle = window.setTimeout(function () {
986
+ Aloha.trigger('aloha-smart-content-changed', {
987
+ 'editable': me,
988
+ 'keyIdentifier': null,
989
+ 'keyCode': null,
990
+ 'char': null,
991
+ 'triggerType': 'idle',
992
+ 'getSnapshotContent': getSnapshotContent
993
+ });
994
+ handleSmartContentChange(me);
995
+ }, this.sccIdle);
996
+ }
997
+ },
998
+
999
+ /**
1000
+ * Get a snapshot of the active editable as a HTML string
1001
+ * @hide
1002
+ * @return snapshot of the editable
1003
+ */
1004
+ getSnapshotContent: function () {
1005
+ var ret = this.snapshotContent;
1006
+ this.snapshotContent = this.getContents();
1007
+ return ret;
1008
+ }
1009
+ });
1010
+
1011
+ /**
1012
+ * Sets the content serializer function.
1013
+ *
1014
+ * The default content serializer will just call the jQuery.html()
1015
+ * function on the editable element (which gets the innerHTML property).
1016
+ *
1017
+ * This method is a static class method and will affect the result
1018
+ * of editable.getContents() for all editables that have been or
1019
+ * will be constructed.
1020
+ *
1021
+ * @param {!Function} serializerFunction
1022
+ * A function that accepts a DOM element and returns the serialized
1023
+ * XHTML of the element contents (excluding the start and end tag of
1024
+ * the passed element).
1025
+ * @api
1026
+ */
1027
+ Aloha.Editable.setContentSerializer = function (serializerFunction) {
1028
+ contentSerializer = serializerFunction;
1029
+ };
1030
+
1031
+ /**
1032
+ * Gets the content serializer function.
1033
+ *
1034
+ * @see Aloha.Editable.setContentSerializer()
1035
+ * @api
1036
+ * @return {!Function}
1037
+ * The serializer function.
1038
+ */
1039
+ Aloha.Editable.getContentSerializer = function () {
1040
+ return contentSerializer;
1041
+ };
1042
+ });