promethee 1.4.8 → 1.4.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (476) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -6
  3. data/app/assets/javascripts/promethee.js +4 -0
  4. data/app/assets/stylesheets/promethee-edit.sass +1 -0
  5. data/config/initializers/assets.rb +1 -0
  6. data/lib/promethee/rails/version.rb +1 -1
  7. data/node_modules/angular-summernote/CHANGELOG.md +149 -0
  8. data/node_modules/angular-summernote/LICENSE-MIT +22 -0
  9. data/node_modules/angular-summernote/README.md +270 -0
  10. data/node_modules/angular-summernote/bower.json +49 -0
  11. data/{vendor/assets/javascripts → node_modules/angular-summernote/dist}/angular-summernote.js +0 -0
  12. data/node_modules/angular-summernote/dist/angular-summernote.min.js +2 -0
  13. data/node_modules/angular-summernote/examples/fontstyle-plugin.html +48 -0
  14. data/node_modules/angular-summernote/examples/index.html +180 -0
  15. data/node_modules/angular-summernote/examples/index2.html +60 -0
  16. data/node_modules/angular-summernote/examples/index3.html +57 -0
  17. data/node_modules/angular-summernote/gulpfile.js +115 -0
  18. data/node_modules/angular-summernote/package.json +53 -0
  19. data/node_modules/angular-summernote/src/angular-summernote.js +206 -0
  20. data/node_modules/angular-summernote/test/angular-summernote.test.js +660 -0
  21. data/node_modules/angular-summernote/test/chai.conf.js +6 -0
  22. data/node_modules/angular-summernote/test/coverage/Chrome 37.0.2062 (Mac OS X 10.9.4)/index.html +350 -0
  23. data/node_modules/angular-summernote/test/coverage/Chrome 37.0.2062 (Mac OS X 10.9.4)/prettify.css +1 -0
  24. data/node_modules/angular-summernote/test/coverage/Chrome 37.0.2062 (Mac OS X 10.9.4)/prettify.js +1 -0
  25. data/node_modules/angular-summernote/test/coverage/Chrome 37.0.2062 (Mac OS X 10.9.4)/src/angular-summernote.js.html +694 -0
  26. data/node_modules/angular-summernote/test/coverage/Chrome 37.0.2062 (Mac OS X 10.9.4)/src/index.html +350 -0
  27. data/node_modules/angular-summernote/test/karma-angular-1-2-x.conf.js +33 -0
  28. data/node_modules/angular-summernote/test/karma-angular-1-3-x.conf.js +33 -0
  29. data/node_modules/angular-summernote/test/karma-angular-1-4-x.conf.js +33 -0
  30. data/node_modules/angular-summernote/test/karma-shared.conf.js +64 -0
  31. data/node_modules/angular-summernote/test/karma.conf.js +33 -0
  32. data/{vendor/assets/javascripts/summernote/locales/de-DE.js → node_modules/angular-summernote/test/lang/summernote-de-DE.js} +2 -17
  33. data/node_modules/angular-summernote/test/mocha.conf.js +3 -0
  34. data/node_modules/angular-ui-sortable/API.md +84 -0
  35. data/node_modules/angular-ui-sortable/CONTRIBUTING.md +12 -0
  36. data/node_modules/angular-ui-sortable/LICENSE +21 -0
  37. data/node_modules/angular-ui-sortable/README.md +350 -0
  38. data/node_modules/angular-ui-sortable/bower.json +26 -0
  39. data/node_modules/angular-ui-sortable/demo/demo.css +34 -0
  40. data/node_modules/angular-ui-sortable/demo/demo.html +29 -0
  41. data/node_modules/angular-ui-sortable/demo/demo.js +41 -0
  42. data/node_modules/angular-ui-sortable/dist/sortable.js +593 -0
  43. data/node_modules/angular-ui-sortable/dist/sortable.min.js +8 -0
  44. data/node_modules/angular-ui-sortable/gruntFile.js +202 -0
  45. data/node_modules/angular-ui-sortable/package.json +48 -0
  46. data/node_modules/angular-ui-sortable/publish.js +41 -0
  47. data/{vendor/assets/javascripts/ui-sortable.js → node_modules/angular-ui-sortable/src/sortable.js} +106 -200
  48. data/node_modules/angular-ui-sortable/test/bower_overrides.json +13 -0
  49. data/node_modules/angular-ui-sortable/test/karma.conf.js +85 -0
  50. data/node_modules/angular-ui-sortable/test/libs/jquery.simulate.dragandrevert.js +60 -0
  51. data/node_modules/angular-ui-sortable/test/sortable.e2e.callbacks.attr.spec.js +199 -0
  52. data/node_modules/angular-ui-sortable/test/sortable.e2e.callbacks.spec.js +729 -0
  53. data/node_modules/angular-ui-sortable/test/sortable.e2e.directiveoptions.spec.js +554 -0
  54. data/node_modules/angular-ui-sortable/test/sortable.e2e.directives.spec.js +371 -0
  55. data/node_modules/angular-ui-sortable/test/sortable.e2e.events.spec.js +167 -0
  56. data/node_modules/angular-ui-sortable/test/sortable.e2e.multi.spec.js +1232 -0
  57. data/node_modules/angular-ui-sortable/test/sortable.e2e.nested.spec.js +186 -0
  58. data/node_modules/angular-ui-sortable/test/sortable.e2e.spec.js +895 -0
  59. data/node_modules/angular-ui-sortable/test/sortable.spec.js +440 -0
  60. data/node_modules/angular-ui-sortable/test/sortable.test-directives.js +54 -0
  61. data/node_modules/angular-ui-sortable/test/sortable.test-helper.js +114 -0
  62. data/node_modules/angular-ui-sortable/test/sortable.tests.css +12 -0
  63. data/node_modules/ng-file-upload/LICENSE +20 -0
  64. data/node_modules/ng-file-upload/README.md +616 -0
  65. data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/FileAPI.flash.swf +0 -0
  66. data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/FileAPI.js +0 -0
  67. data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/FileAPI.min.js +0 -0
  68. data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/ng-file-upload-all.js +0 -0
  69. data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/ng-file-upload-all.min.js +0 -0
  70. data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/ng-file-upload-shim.js +0 -0
  71. data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/ng-file-upload-shim.min.js +0 -0
  72. data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/ng-file-upload.js +0 -0
  73. data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/ng-file-upload.min.js +0 -0
  74. data/node_modules/ng-file-upload/index.js +2 -0
  75. data/node_modules/ng-file-upload/package.json +42 -0
  76. data/node_modules/summernote/CODE_OF_CONDUCT.md +46 -0
  77. data/node_modules/summernote/CONTRIBUTING.md +67 -0
  78. data/node_modules/summernote/ISSUE_TEMPLATE.md +14 -0
  79. data/node_modules/summernote/LICENSE +21 -0
  80. data/node_modules/summernote/PULL_REQUEST_TEMPLATE.md +28 -0
  81. data/node_modules/summernote/README.md +90 -0
  82. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/base.css +213 -0
  83. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/index.html +262 -0
  84. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/prettify.css +1 -0
  85. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/prettify.js +1 -0
  86. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/sort-arrow-sprite.png +0 -0
  87. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/sorter.js +158 -0
  88. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/Context.js.html +758 -0
  89. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/core/async.js.html +206 -0
  90. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/core/dom.js.html +3329 -0
  91. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/core/env.js.html +386 -0
  92. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/core/func.js.html +551 -0
  93. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/core/index.html +171 -0
  94. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/core/key.js.html +341 -0
  95. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/core/lists.js.html +695 -0
  96. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/core/range.js.html +2441 -0
  97. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/editing/Bullet.js.html +668 -0
  98. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/editing/History.js.html +380 -0
  99. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/editing/Style.js.html +539 -0
  100. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/editing/Table.js.html +1787 -0
  101. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/editing/Typing.js.html +335 -0
  102. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/editing/index.html +145 -0
  103. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/index.html +119 -0
  104. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/AirPopover.js.html +284 -0
  105. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/AutoLink.js.html +248 -0
  106. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/AutoSync.js.html +122 -0
  107. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Buttons.js.html +2504 -0
  108. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Clipboard.js.html +149 -0
  109. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Codeview.js.html +434 -0
  110. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Dropzone.js.html +410 -0
  111. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Editor.js.html +2648 -0
  112. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Fullscreen.js.html +218 -0
  113. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Handle.js.html +494 -0
  114. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/HelpDialog.js.html +302 -0
  115. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/HintPopover.js.html +743 -0
  116. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/ImageDialog.js.html +458 -0
  117. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/ImagePopover.js.html +239 -0
  118. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/LinkDialog.js.html +587 -0
  119. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/LinkPopover.js.html +272 -0
  120. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Placeholder.js.html +182 -0
  121. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Statusbar.js.html +191 -0
  122. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/TablePopover.js.html +278 -0
  123. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Toolbar.js.html +473 -0
  124. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/VideoDialog.js.html +680 -0
  125. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/index.html +353 -0
  126. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/renderer.js.html +263 -0
  127. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/summernote-en-US.js.html +542 -0
  128. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/bs3/index.html +106 -0
  129. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/bs3/settings.js.html +956 -0
  130. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/bs3/ui.js.html +776 -0
  131. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/bs4/index.html +106 -0
  132. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/bs4/settings.js.html +968 -0
  133. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/bs4/ui.js.html +791 -0
  134. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/index.html +93 -0
  135. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/index.html +106 -0
  136. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/settings.js.html +953 -0
  137. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/ui.js.html +1919 -0
  138. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/ui/DropdownUI.js.html +260 -0
  139. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/ui/ModalUI.js.html +167 -0
  140. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/ui/PopoverUI.js.html +347 -0
  141. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/ui/TooltipUI.js.html +344 -0
  142. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/ui/index.html +132 -0
  143. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/summernote.js.html +203 -0
  144. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/Context.spec.js.html +323 -0
  145. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/core/dom.spec.js.html +1046 -0
  146. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/core/func.spec.js.html +482 -0
  147. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/core/index.html +145 -0
  148. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/core/key.spec.js.html +140 -0
  149. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/core/lists.spec.js.html +419 -0
  150. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/core/range.spec.js.html +1286 -0
  151. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/editing/Table.spec.js.html +1724 -0
  152. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/editing/index.html +106 -0
  153. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/editing/style.spec.js.html +341 -0
  154. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/index.html +93 -0
  155. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/module/Codeview.spec.js.html +161 -0
  156. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/module/Editor.spec.js.html +1235 -0
  157. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/module/Fullscreen.spec.js.html +161 -0
  158. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/module/index.html +119 -0
  159. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/bs/module/Buttons.spec.js.html +770 -0
  160. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/bs/module/VideoDialog.spec.js.html +209 -0
  161. data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/bs/module/index.html +106 -0
  162. data/node_modules/summernote/dist/font/summernote.eot +0 -0
  163. data/node_modules/summernote/dist/font/summernote.ttf +0 -0
  164. data/node_modules/summernote/dist/font/summernote.woff +0 -0
  165. data/{vendor/assets/javascripts/summernote/locales/ar-AR.js → node_modules/summernote/dist/lang/summernote-ar-AR.js} +55 -4
  166. data/node_modules/summernote/dist/lang/summernote-ar-AR.min.js +3 -0
  167. data/{vendor/assets/javascripts/summernote/locales/bg-BG.js → node_modules/summernote/dist/lang/summernote-bg-BG.js} +60 -4
  168. data/node_modules/summernote/dist/lang/summernote-bg-BG.min.js +3 -0
  169. data/{vendor/assets/javascripts/summernote/locales/ca-ES.js → node_modules/summernote/dist/lang/summernote-ca-ES.js} +12 -4
  170. data/node_modules/summernote/dist/lang/summernote-ca-ES.min.js +3 -0
  171. data/{vendor/assets/javascripts/summernote/locales/cs-CZ.js → node_modules/summernote/dist/lang/summernote-cs-CZ.js} +50 -4
  172. data/node_modules/summernote/dist/lang/summernote-cs-CZ.min.js +3 -0
  173. data/{vendor/assets/javascripts/summernote/locales/da-DK.js → node_modules/summernote/dist/lang/summernote-da-DK.js} +46 -5
  174. data/node_modules/summernote/dist/lang/summernote-da-DK.min.js +3 -0
  175. data/node_modules/summernote/dist/lang/summernote-de-DE.js +154 -0
  176. data/node_modules/summernote/dist/lang/summernote-de-DE.min.js +3 -0
  177. data/{vendor/assets/javascripts/summernote/locales/el-GR.js → node_modules/summernote/dist/lang/summernote-el-GR.js} +11 -3
  178. data/node_modules/summernote/dist/lang/summernote-el-GR.min.js +3 -0
  179. data/{vendor/assets/javascripts/summernote/locales/es-ES.js → node_modules/summernote/dist/lang/summernote-es-ES.js} +12 -4
  180. data/node_modules/summernote/dist/lang/summernote-es-ES.min.js +3 -0
  181. data/{vendor/assets/javascripts/summernote/locales/es-EU.js → node_modules/summernote/dist/lang/summernote-es-EU.js} +55 -4
  182. data/node_modules/summernote/dist/lang/summernote-es-EU.min.js +3 -0
  183. data/{vendor/assets/javascripts/summernote/locales/fa-IR.js → node_modules/summernote/dist/lang/summernote-fa-IR.js} +55 -5
  184. data/node_modules/summernote/dist/lang/summernote-fa-IR.min.js +3 -0
  185. data/{vendor/assets/javascripts/summernote/locales/fi-FI.js → node_modules/summernote/dist/lang/summernote-fi-FI.js} +52 -3
  186. data/node_modules/summernote/dist/lang/summernote-fi-FI.min.js +3 -0
  187. data/{vendor/assets/javascripts/summernote/locales/fr-FR.js → node_modules/summernote/dist/lang/summernote-fr-FR.js} +3 -2
  188. data/node_modules/summernote/dist/lang/summernote-fr-FR.min.js +3 -0
  189. data/{vendor/assets/javascripts/summernote/locales/gl-ES.js → node_modules/summernote/dist/lang/summernote-gl-ES.js} +12 -4
  190. data/node_modules/summernote/dist/lang/summernote-gl-ES.min.js +3 -0
  191. data/{vendor/assets/javascripts/summernote/locales/he-IL.js → node_modules/summernote/dist/lang/summernote-he-IL.js} +51 -3
  192. data/node_modules/summernote/dist/lang/summernote-he-IL.min.js +3 -0
  193. data/{vendor/assets/javascripts/summernote/locales/hr-HR.js → node_modules/summernote/dist/lang/summernote-hr-HR.js} +54 -3
  194. data/node_modules/summernote/dist/lang/summernote-hr-HR.min.js +3 -0
  195. data/{vendor/assets/javascripts/summernote/locales/hu-HU.js → node_modules/summernote/dist/lang/summernote-hu-HU.js} +25 -5
  196. data/node_modules/summernote/dist/lang/summernote-hu-HU.min.js +3 -0
  197. data/{vendor/assets/javascripts/summernote/locales/id-ID.js → node_modules/summernote/dist/lang/summernote-id-ID.js} +56 -4
  198. data/node_modules/summernote/dist/lang/summernote-id-ID.min.js +3 -0
  199. data/{vendor/assets/javascripts/summernote/locales/it-IT.js → node_modules/summernote/dist/lang/summernote-it-IT.js} +55 -4
  200. data/node_modules/summernote/dist/lang/summernote-it-IT.min.js +3 -0
  201. data/{vendor/assets/javascripts/summernote/locales/ja-JP.js → node_modules/summernote/dist/lang/summernote-ja-JP.js} +32 -10
  202. data/node_modules/summernote/dist/lang/summernote-ja-JP.min.js +3 -0
  203. data/{vendor/assets/javascripts/summernote/locales/ko-KR.js → node_modules/summernote/dist/lang/summernote-ko-KR.js} +44 -4
  204. data/node_modules/summernote/dist/lang/summernote-ko-KR.min.js +3 -0
  205. data/{vendor/assets/javascripts/summernote/locales/lt-LT.js → node_modules/summernote/dist/lang/summernote-lt-LT.js} +52 -4
  206. data/node_modules/summernote/dist/lang/summernote-lt-LT.min.js +3 -0
  207. data/{vendor/assets/javascripts/summernote/locales/lt-LV.js → node_modules/summernote/dist/lang/summernote-lt-LV.js} +27 -7
  208. data/node_modules/summernote/dist/lang/summernote-lt-LV.min.js +3 -0
  209. data/{vendor/assets/javascripts/summernote/locales/mn-MN.js → node_modules/summernote/dist/lang/summernote-mn-MN.js} +43 -4
  210. data/node_modules/summernote/dist/lang/summernote-mn-MN.min.js +3 -0
  211. data/{vendor/assets/javascripts/summernote/locales/nb-NO.js → node_modules/summernote/dist/lang/summernote-nb-NO.js} +53 -3
  212. data/node_modules/summernote/dist/lang/summernote-nb-NO.min.js +3 -0
  213. data/{vendor/assets/javascripts/summernote/locales/nl-NL.js → node_modules/summernote/dist/lang/summernote-nl-NL.js} +55 -4
  214. data/node_modules/summernote/dist/lang/summernote-nl-NL.min.js +3 -0
  215. data/{vendor/assets/javascripts/summernote/locales/pl-PL.js → node_modules/summernote/dist/lang/summernote-pl-PL.js} +46 -3
  216. data/node_modules/summernote/dist/lang/summernote-pl-PL.min.js +3 -0
  217. data/{vendor/assets/javascripts/summernote/locales/pt-BR.js → node_modules/summernote/dist/lang/summernote-pt-BR.js} +25 -8
  218. data/node_modules/summernote/dist/lang/summernote-pt-BR.min.js +3 -0
  219. data/{vendor/assets/javascripts/summernote/locales/pt-PT.js → node_modules/summernote/dist/lang/summernote-pt-PT.js} +54 -3
  220. data/node_modules/summernote/dist/lang/summernote-pt-PT.min.js +3 -0
  221. data/node_modules/summernote/dist/lang/summernote-ro-RO.js +155 -0
  222. data/node_modules/summernote/dist/lang/summernote-ro-RO.min.js +3 -0
  223. data/{vendor/assets/javascripts/summernote/locales/ru-RU.js → node_modules/summernote/dist/lang/summernote-ru-RU.js} +46 -3
  224. data/node_modules/summernote/dist/lang/summernote-ru-RU.min.js +3 -0
  225. data/{vendor/assets/javascripts/summernote/locales/sk-SK.js → node_modules/summernote/dist/lang/summernote-sk-SK.js} +54 -3
  226. data/node_modules/summernote/dist/lang/summernote-sk-SK.min.js +3 -0
  227. data/{vendor/assets/javascripts/summernote/locales/sl-SI.js → node_modules/summernote/dist/lang/summernote-sl-SI.js} +53 -4
  228. data/node_modules/summernote/dist/lang/summernote-sl-SI.min.js +3 -0
  229. data/{vendor/assets/javascripts/summernote/locales/sr-RS-Latin.js → node_modules/summernote/dist/lang/summernote-sr-RS-Latin.js} +54 -3
  230. data/node_modules/summernote/dist/lang/summernote-sr-RS-Latin.min.js +3 -0
  231. data/{vendor/assets/javascripts/summernote/locales/sr-RS.js → node_modules/summernote/dist/lang/summernote-sr-RS.js} +54 -3
  232. data/node_modules/summernote/dist/lang/summernote-sr-RS.min.js +3 -0
  233. data/{vendor/assets/javascripts/summernote/locales/sv-SE.js → node_modules/summernote/dist/lang/summernote-sv-SE.js} +55 -4
  234. data/node_modules/summernote/dist/lang/summernote-sv-SE.min.js +3 -0
  235. data/{vendor/assets/javascripts/summernote/locales/ta-IN.js → node_modules/summernote/dist/lang/summernote-ta-IN.js} +46 -4
  236. data/node_modules/summernote/dist/lang/summernote-ta-IN.min.js +3 -0
  237. data/node_modules/summernote/dist/lang/summernote-th-TH.js +155 -0
  238. data/node_modules/summernote/dist/lang/summernote-th-TH.min.js +3 -0
  239. data/{vendor/assets/javascripts/summernote/locales/tr-TR.js → node_modules/summernote/dist/lang/summernote-tr-TR.js} +3 -2
  240. data/node_modules/summernote/dist/lang/summernote-tr-TR.min.js +3 -0
  241. data/{vendor/assets/javascripts/summernote/locales/uk-UA.js → node_modules/summernote/dist/lang/summernote-uk-UA.js} +48 -4
  242. data/node_modules/summernote/dist/lang/summernote-uk-UA.min.js +3 -0
  243. data/node_modules/summernote/dist/lang/summernote-uz-UZ.js +112 -0
  244. data/node_modules/summernote/dist/lang/summernote-uz-UZ.min.js +3 -0
  245. data/{vendor/assets/javascripts/summernote/locales/vi-VN.js → node_modules/summernote/dist/lang/summernote-vi-VN.js} +55 -4
  246. data/node_modules/summernote/dist/lang/summernote-vi-VN.min.js +3 -0
  247. data/{vendor/assets/javascripts/summernote/locales/zh-CN.js → node_modules/summernote/dist/lang/summernote-zh-CN.js} +20 -7
  248. data/node_modules/summernote/dist/lang/summernote-zh-CN.min.js +3 -0
  249. data/{vendor/assets/javascripts/summernote/locales/zh-TW.js → node_modules/summernote/dist/lang/summernote-zh-TW.js} +45 -3
  250. data/node_modules/summernote/dist/lang/summernote-zh-TW.min.js +3 -0
  251. data/node_modules/summernote/dist/summernote-0.8.10-dist.zip +0 -0
  252. data/node_modules/summernote/dist/summernote-bs4.css +1 -0
  253. data/node_modules/summernote/dist/summernote-bs4.js +7323 -0
  254. data/node_modules/summernote/dist/summernote-bs4.js.map +1 -0
  255. data/node_modules/summernote/dist/summernote-bs4.min.js +3 -0
  256. data/node_modules/summernote/dist/summernote-lite.css +1 -0
  257. data/node_modules/summernote/dist/summernote-lite.js +7837 -0
  258. data/node_modules/summernote/dist/summernote-lite.js.map +1 -0
  259. data/node_modules/summernote/dist/summernote.css +1 -0
  260. data/node_modules/summernote/dist/summernote.js +7315 -0
  261. data/node_modules/summernote/dist/summernote.js.map +1 -0
  262. data/node_modules/summernote/dist/summernote.min.js +3 -0
  263. data/node_modules/summernote/examples/airmode.html +35 -0
  264. data/node_modules/summernote/examples/bs3.html +60 -0
  265. data/node_modules/summernote/examples/bs4.html +57 -0
  266. data/node_modules/summernote/examples/codemirror.html +45 -0
  267. data/node_modules/summernote/examples/external-api.html +76 -0
  268. data/node_modules/summernote/examples/hint-emoji.html +61 -0
  269. data/node_modules/summernote/examples/hint-symbols_mathematical-symbols_Greek-letters.html +54 -0
  270. data/node_modules/summernote/examples/hint-userdefine.html +48 -0
  271. data/node_modules/summernote/examples/ie8.html +32 -0
  272. data/node_modules/summernote/examples/jquery-custom-event.html +119 -0
  273. data/node_modules/summernote/examples/jquery19lt.html +25 -0
  274. data/node_modules/summernote/examples/lang.html +33 -0
  275. data/node_modules/summernote/examples/link-blank.html +33 -0
  276. data/node_modules/summernote/examples/lite.html +24 -0
  277. data/node_modules/summernote/examples/nativestyle.html +32 -0
  278. data/node_modules/summernote/examples/ondialog-multitab.html +77 -0
  279. data/node_modules/summernote/examples/ondialog.html +58 -0
  280. data/node_modules/summernote/examples/plugin-hello.html +37 -0
  281. data/node_modules/summernote/examples/rtl.html +32 -0
  282. data/node_modules/summernote/examples/symbols_mathematical-symbols_Greek-letters.json +1118 -0
  283. data/node_modules/summernote/examples/textarea.html +46 -0
  284. data/node_modules/summernote/examples/toolbar-container.html +35 -0
  285. data/node_modules/summernote/examples/with-google-font.html +50 -0
  286. data/node_modules/summernote/index.html +33 -0
  287. data/node_modules/summernote/karma.conf.js +42 -0
  288. data/node_modules/summernote/lang/summernote-ar-AR.js +155 -0
  289. data/node_modules/summernote/lang/summernote-bg-BG.js +155 -0
  290. data/node_modules/summernote/lang/summernote-ca-ES.js +155 -0
  291. data/node_modules/summernote/lang/summernote-cs-CZ.js +149 -0
  292. data/node_modules/summernote/lang/summernote-da-DK.js +155 -0
  293. data/node_modules/summernote/lang/summernote-de-DE.js +154 -0
  294. data/node_modules/summernote/lang/summernote-el-GR.js +155 -0
  295. data/node_modules/summernote/lang/summernote-es-ES.js +155 -0
  296. data/node_modules/summernote/lang/summernote-es-EU.js +154 -0
  297. data/node_modules/summernote/lang/summernote-fa-IR.js +155 -0
  298. data/node_modules/summernote/lang/summernote-fi-FI.js +153 -0
  299. data/node_modules/summernote/lang/summernote-fr-FR.js +155 -0
  300. data/node_modules/summernote/lang/summernote-gl-ES.js +155 -0
  301. data/node_modules/summernote/lang/summernote-he-IL.js +155 -0
  302. data/node_modules/summernote/lang/summernote-hr-HR.js +155 -0
  303. data/node_modules/summernote/lang/summernote-hu-HU.js +155 -0
  304. data/node_modules/summernote/lang/summernote-id-ID.js +155 -0
  305. data/node_modules/summernote/lang/summernote-it-IT.js +155 -0
  306. data/node_modules/summernote/lang/summernote-ja-JP.js +155 -0
  307. data/node_modules/summernote/lang/summernote-ko-KR.js +155 -0
  308. data/node_modules/summernote/lang/summernote-lt-LT.js +155 -0
  309. data/node_modules/summernote/lang/summernote-lt-LV.js +155 -0
  310. data/node_modules/summernote/lang/summernote-mn-MN.js +157 -0
  311. data/node_modules/summernote/lang/summernote-nb-NO.js +154 -0
  312. data/node_modules/summernote/lang/summernote-nl-NL.js +155 -0
  313. data/node_modules/summernote/lang/summernote-pl-PL.js +155 -0
  314. data/node_modules/summernote/lang/summernote-pt-BR.js +155 -0
  315. data/node_modules/summernote/lang/summernote-pt-PT.js +154 -0
  316. data/node_modules/summernote/lang/summernote-ro-RO.js +155 -0
  317. data/node_modules/summernote/lang/summernote-ru-RU.js +155 -0
  318. data/node_modules/summernote/lang/summernote-sk-SK.js +153 -0
  319. data/node_modules/summernote/lang/summernote-sl-SI.js +155 -0
  320. data/node_modules/summernote/lang/summernote-sr-RS-Latin.js +155 -0
  321. data/node_modules/summernote/lang/summernote-sr-RS.js +155 -0
  322. data/node_modules/summernote/lang/summernote-sv-SE.js +155 -0
  323. data/node_modules/summernote/lang/summernote-ta-IN.js +155 -0
  324. data/node_modules/summernote/lang/summernote-th-TH.js +155 -0
  325. data/node_modules/summernote/lang/summernote-tr-TR.js +155 -0
  326. data/node_modules/summernote/lang/summernote-uk-UA.js +155 -0
  327. data/node_modules/summernote/lang/summernote-uz-UZ.js +112 -0
  328. data/node_modules/summernote/lang/summernote-vi-VN.js +155 -0
  329. data/node_modules/summernote/lang/summernote-zh-CN.js +155 -0
  330. data/node_modules/summernote/lang/summernote-zh-TW.js +155 -0
  331. data/node_modules/summernote/package.json +87 -0
  332. data/{vendor/assets/javascripts → node_modules}/summernote/plugin/databasic/summernote-ext-databasic.css +0 -0
  333. data/{vendor/assets/javascripts → node_modules}/summernote/plugin/databasic/summernote-ext-databasic.js +62 -73
  334. data/{vendor/assets/javascripts → node_modules}/summernote/plugin/hello/summernote-ext-hello.js +9 -10
  335. data/{vendor/assets/javascripts → node_modules}/summernote/plugin/specialchars/summernote-ext-specialchars.js +22 -25
  336. data/node_modules/summernote/src/icons/align-center.svg +11 -0
  337. data/node_modules/summernote/src/icons/align-indent.svg +11 -0
  338. data/node_modules/summernote/src/icons/align-justify.svg +11 -0
  339. data/node_modules/summernote/src/icons/align-left.svg +12 -0
  340. data/node_modules/summernote/src/icons/align-outdent.svg +11 -0
  341. data/node_modules/summernote/src/icons/align-right.svg +11 -0
  342. data/node_modules/summernote/src/icons/align.svg +8 -0
  343. data/node_modules/summernote/src/icons/arrow-circle-down.svg +1 -0
  344. data/node_modules/summernote/src/icons/arrow-circle-left.svg +1 -0
  345. data/node_modules/summernote/src/icons/arrow-circle-right.svg +1 -0
  346. data/node_modules/summernote/src/icons/arrow-circle-up.svg +1 -0
  347. data/node_modules/summernote/src/icons/arrows-alt.svg +11 -0
  348. data/node_modules/summernote/src/icons/arrows-h.svg +1 -0
  349. data/node_modules/summernote/src/icons/arrows-v.svg +1 -0
  350. data/node_modules/summernote/src/icons/bold.svg +11 -0
  351. data/node_modules/summernote/src/icons/caret.svg +9 -0
  352. data/node_modules/summernote/src/icons/chain-broken.svg +47 -0
  353. data/node_modules/summernote/src/icons/circle.svg +10 -0
  354. data/node_modules/summernote/src/icons/close.svg +16 -0
  355. data/node_modules/summernote/src/icons/code.svg +11 -0
  356. data/node_modules/summernote/src/icons/col-after.svg +96 -0
  357. data/node_modules/summernote/src/icons/col-before.svg +19 -0
  358. data/node_modules/summernote/src/icons/col-remove.svg +19 -0
  359. data/node_modules/summernote/src/icons/dist/font/summernote.eot +0 -0
  360. data/node_modules/summernote/src/icons/dist/font/summernote.ttf +0 -0
  361. data/node_modules/summernote/src/icons/dist/font/summernote.woff +0 -0
  362. data/node_modules/summernote/src/icons/dist/summernote.html +536 -0
  363. data/node_modules/summernote/src/icons/dist/summernote.less +511 -0
  364. data/node_modules/summernote/src/icons/eraser.svg +13 -0
  365. data/node_modules/summernote/src/icons/font.svg +11 -0
  366. data/node_modules/summernote/src/icons/frame.svg +10 -0
  367. data/node_modules/summernote/src/icons/italic.svg +11 -0
  368. data/node_modules/summernote/src/icons/link.svg +21 -0
  369. data/node_modules/summernote/src/icons/magic.svg +10 -0
  370. data/node_modules/summernote/src/icons/menu-check.svg +8 -0
  371. data/node_modules/summernote/src/icons/minus.svg +11 -0
  372. data/node_modules/summernote/src/icons/orderedlist.svg +12 -0
  373. data/node_modules/summernote/src/icons/pencil.svg +8 -0
  374. data/node_modules/summernote/src/icons/picture.svg +11 -0
  375. data/node_modules/summernote/src/icons/question.svg +10 -0
  376. data/node_modules/summernote/src/icons/redo.svg +10 -0
  377. data/node_modules/summernote/src/icons/row-above.svg +19 -0
  378. data/node_modules/summernote/src/icons/row-below.svg +19 -0
  379. data/node_modules/summernote/src/icons/row-remove.svg +19 -0
  380. data/node_modules/summernote/src/icons/special-character.svg +10 -0
  381. data/node_modules/summernote/src/icons/square.svg +10 -0
  382. data/node_modules/summernote/src/icons/strikethrough.svg +11 -0
  383. data/node_modules/summernote/src/icons/subscript.svg +11 -0
  384. data/node_modules/summernote/src/icons/summernote.svg +11 -0
  385. data/node_modules/summernote/src/icons/superscript.svg +11 -0
  386. data/node_modules/summernote/src/icons/table.svg +11 -0
  387. data/node_modules/summernote/src/icons/templates/summernote.css +110 -0
  388. data/node_modules/summernote/src/icons/templates/summernote.json +5 -0
  389. data/node_modules/summernote/src/icons/text-height.svg +11 -0
  390. data/node_modules/summernote/src/icons/trash.svg +17 -0
  391. data/node_modules/summernote/src/icons/underline.svg +11 -0
  392. data/node_modules/summernote/src/icons/undo.svg +10 -0
  393. data/node_modules/summernote/src/icons/unorderedlist.svg +9 -0
  394. data/node_modules/summernote/src/icons/video.svg +9 -0
  395. data/node_modules/summernote/src/js/base/Context.js +231 -0
  396. data/node_modules/summernote/src/js/base/core/async.js +47 -0
  397. data/node_modules/summernote/src/js/base/core/dom.js +1088 -0
  398. data/node_modules/summernote/src/js/base/core/env.js +107 -0
  399. data/node_modules/summernote/src/js/base/core/func.js +162 -0
  400. data/node_modules/summernote/src/js/base/core/key.js +92 -0
  401. data/node_modules/summernote/src/js/base/core/lists.js +210 -0
  402. data/node_modules/summernote/src/js/base/core/range.js +792 -0
  403. data/node_modules/summernote/src/js/base/editing/Bullet.js +201 -0
  404. data/node_modules/summernote/src/js/base/editing/History.js +105 -0
  405. data/node_modules/summernote/src/js/base/editing/Style.js +158 -0
  406. data/node_modules/summernote/src/js/base/editing/Table.js +574 -0
  407. data/node_modules/summernote/src/js/base/editing/Typing.js +90 -0
  408. data/node_modules/summernote/src/js/base/module/AirPopover.js +73 -0
  409. data/node_modules/summernote/src/js/base/module/AutoLink.js +61 -0
  410. data/node_modules/summernote/src/js/base/module/AutoSync.js +19 -0
  411. data/node_modules/summernote/src/js/base/module/Buttons.js +813 -0
  412. data/node_modules/summernote/src/js/base/module/Clipboard.js +28 -0
  413. data/node_modules/summernote/src/js/base/module/Codeview.js +123 -0
  414. data/node_modules/summernote/src/js/base/module/Dropzone.js +115 -0
  415. data/node_modules/summernote/src/js/base/module/Editor.js +861 -0
  416. data/node_modules/summernote/src/js/base/module/Fullscreen.js +51 -0
  417. data/node_modules/summernote/src/js/base/module/Handle.js +143 -0
  418. data/node_modules/summernote/src/js/base/module/HelpDialog.js +79 -0
  419. data/node_modules/summernote/src/js/base/module/HintPopover.js +226 -0
  420. data/node_modules/summernote/src/js/base/module/ImageDialog.js +131 -0
  421. data/node_modules/summernote/src/js/base/module/ImagePopover.js +58 -0
  422. data/node_modules/summernote/src/js/base/module/LinkDialog.js +174 -0
  423. data/node_modules/summernote/src/js/base/module/LinkPopover.js +69 -0
  424. data/node_modules/summernote/src/js/base/module/Placeholder.js +39 -0
  425. data/node_modules/summernote/src/js/base/module/Statusbar.js +42 -0
  426. data/node_modules/summernote/src/js/base/module/TablePopover.js +71 -0
  427. data/node_modules/summernote/src/js/base/module/Toolbar.js +136 -0
  428. data/node_modules/summernote/src/js/base/module/VideoDialog.js +205 -0
  429. data/node_modules/summernote/src/js/base/renderer.js +66 -0
  430. data/node_modules/summernote/src/js/base/summernote-en-US.js +159 -0
  431. data/node_modules/summernote/src/js/bs3/settings.js +297 -0
  432. data/node_modules/summernote/src/js/bs3/ui.js +237 -0
  433. data/node_modules/summernote/src/js/bs4/settings.js +301 -0
  434. data/node_modules/summernote/src/js/bs4/ui.js +242 -0
  435. data/node_modules/summernote/src/js/lite/settings.js +296 -0
  436. data/node_modules/summernote/src/js/lite/ui.js +618 -0
  437. data/node_modules/summernote/src/js/lite/ui/DropdownUI.js +65 -0
  438. data/node_modules/summernote/src/js/lite/ui/ModalUI.js +34 -0
  439. data/node_modules/summernote/src/js/lite/ui/PopoverUI.js +94 -0
  440. data/node_modules/summernote/src/js/lite/ui/TooltipUI.js +93 -0
  441. data/node_modules/summernote/src/js/summernote.js +46 -0
  442. data/node_modules/summernote/src/less/elements.less +149 -0
  443. data/node_modules/summernote/src/less/elements.scss +149 -0
  444. data/node_modules/summernote/src/less/lite-ui/all.less +15 -0
  445. data/node_modules/summernote/src/less/lite-ui/btn-group.less +51 -0
  446. data/node_modules/summernote/src/less/lite-ui/buttons.less +102 -0
  447. data/node_modules/summernote/src/less/lite-ui/common.less +20 -0
  448. data/node_modules/summernote/src/less/lite-ui/dropdown.less +39 -0
  449. data/node_modules/summernote/src/less/lite-ui/form.less +43 -0
  450. data/node_modules/summernote/src/less/lite-ui/mixins.less +1 -0
  451. data/node_modules/summernote/src/less/lite-ui/mixins/buttons.less +40 -0
  452. data/node_modules/summernote/src/less/lite-ui/modal.less +104 -0
  453. data/node_modules/summernote/src/less/lite-ui/popover.less +121 -0
  454. data/node_modules/summernote/src/less/lite-ui/toolbar.less +4 -0
  455. data/node_modules/summernote/src/less/lite-ui/tooltip.less +66 -0
  456. data/node_modules/summernote/src/less/lite-ui/variables.less +81 -0
  457. data/node_modules/summernote/src/less/summernote-bs4.less +577 -0
  458. data/node_modules/summernote/src/less/summernote-bs4.scss +560 -0
  459. data/node_modules/summernote/src/less/summernote-lite.less +601 -0
  460. data/node_modules/summernote/src/less/summernote.less +576 -0
  461. data/node_modules/summernote/src/less/summernote.scss +560 -0
  462. data/node_modules/summernote/tsconfig.json +12 -0
  463. metadata +459 -69
  464. data/vendor/assets/fonts/summernote.eot +0 -0
  465. data/vendor/assets/fonts/summernote.ttf +0 -0
  466. data/vendor/assets/fonts/summernote.woff +0 -0
  467. data/vendor/assets/javascripts/summernote/index.js +0 -1
  468. data/vendor/assets/javascripts/summernote/locales/index.js +0 -1
  469. data/vendor/assets/javascripts/summernote/locales/ro-RO.js +0 -102
  470. data/vendor/assets/javascripts/summernote/locales/th-TH.js +0 -106
  471. data/vendor/assets/javascripts/summernote/summernote-bs4.js +0 -7990
  472. data/vendor/assets/javascripts/summernote/summernote-lite.js +0 -8598
  473. data/vendor/assets/javascripts/summernote/summernote.js +0 -7987
  474. data/vendor/assets/stylesheets/summernote-bs4.css +0 -1
  475. data/vendor/assets/stylesheets/summernote-lite.css +0 -1
  476. data/vendor/assets/stylesheets/summernote.scss +0 -1
@@ -0,0 +1,13 @@
1
+ {
2
+ "jquery-simulate": {
3
+ "main": "jquery.simulate.js",
4
+ "dependencies": {
5
+ "jquery": ""
6
+ }
7
+ },
8
+ "angular": {
9
+ "dependencies": {
10
+ "jquery": ""
11
+ }
12
+ }
13
+ }
@@ -0,0 +1,85 @@
1
+ // Karma configuration
2
+ // Generated on Sat Dec 28 2013 20:27:08 GMT+0100 (CET)
3
+
4
+ 'use strict';
5
+
6
+ module.exports = function(config) {
7
+ var wiredep = require('wiredep');
8
+
9
+ var fs = require('fs');
10
+ var bowerOverrides = JSON.parse(fs.readFileSync('./test/bower_overrides.json'));
11
+
12
+ var devJSDependencies = wiredep({
13
+ devDependencies: true,
14
+ overrides: bowerOverrides
15
+ }).js;
16
+
17
+ config.set({
18
+
19
+ // base path, that will be used to resolve files and exclude
20
+ basePath: '..',
21
+
22
+
23
+ // frameworks to use
24
+ frameworks: ['jasmine'],
25
+
26
+
27
+ // list of files / patterns to load in the browser
28
+ files: devJSDependencies.concat([
29
+ 'test/libs/jquery.simulate.dragandrevert.js',
30
+ 'src/sortable.js',
31
+ 'test/sortable.test-helper.js',
32
+ 'test/sortable.test-directives.js',
33
+ 'test/*.spec.js',
34
+ 'test/sortable.tests.css'
35
+ ]),
36
+
37
+
38
+ // list of files to exclude
39
+ exclude: [
40
+
41
+ ],
42
+
43
+
44
+ // test results reporter to use
45
+ // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
46
+ reporters: ['progress'],
47
+
48
+
49
+ // web server port
50
+ port: 9876,
51
+
52
+
53
+ // enable / disable colors in the output (reporters and logs)
54
+ colors: true,
55
+
56
+
57
+ // level of logging
58
+ // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
59
+ logLevel: config.LOG_INFO,
60
+
61
+
62
+ // enable / disable watching file and executing tests whenever any file changes
63
+ autoWatch: false,
64
+
65
+
66
+ // Start these browsers, currently available:
67
+ // - Chrome
68
+ // - ChromeCanary
69
+ // - Firefox
70
+ // - Opera (has to be installed with `npm install karma-opera-launcher`)
71
+ // - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`)
72
+ // - PhantomJS
73
+ // - IE (only Windows; has to be installed with `npm install karma-ie-launcher`)
74
+ browsers: ['Chrome', 'Firefox'/*, 'PhantomJS'*/],
75
+
76
+
77
+ // If browser does not capture in given timeout [ms], kill it
78
+ captureTimeout: 60000,
79
+
80
+
81
+ // Continuous Integration mode
82
+ // if true, it capture browsers, run tests and exit
83
+ singleRun: false
84
+ });
85
+ };
@@ -0,0 +1,60 @@
1
+ ;(function($, undefined) {
2
+ function findCenter(elem) {
3
+ var offset,
4
+ document = $(elem.ownerDocument);
5
+ elem = $(elem);
6
+ offset = elem.offset();
7
+
8
+ return {
9
+ x: offset.left + elem.outerWidth() / 2 - document.scrollLeft(),
10
+ y: offset.top + elem.outerHeight() / 2 - document.scrollTop()
11
+ };
12
+ }
13
+
14
+ $.extend($.simulate.prototype, {
15
+ simulateDragAndRevert: function() {
16
+ var i = 0,
17
+ target = this.target,
18
+ options = this.options,
19
+ center = findCenter(target),
20
+ x = Math.floor(center.x),
21
+ y = Math.floor(center.y),
22
+ dx = options.dx || 0,
23
+ dy = options.dy || 0,
24
+ moves = options.moves || 3,
25
+ coord = {
26
+ clientX: x,
27
+ clientY: y
28
+ };
29
+
30
+ this.simulateEvent(target, "mousedown", coord);
31
+
32
+ for (; i < moves; i++) {
33
+ x += dx / moves;
34
+ y += dy / moves;
35
+
36
+ coord = {
37
+ clientX: Math.round(x),
38
+ clientY: Math.round(y)
39
+ };
40
+
41
+ this.simulateEvent(document, "mousemove", coord);
42
+ }
43
+
44
+ for (i = 0; i < moves; i++) {
45
+ x -= dx / moves;
46
+ y -= dy / moves;
47
+
48
+ coord = {
49
+ clientX: Math.round(x),
50
+ clientY: Math.round(y)
51
+ };
52
+
53
+ this.simulateEvent(document, "mousemove", coord);
54
+ }
55
+
56
+ this.simulateEvent(target, "mouseup", coord);
57
+ this.simulateEvent(target, "click", coord);
58
+ }
59
+ });
60
+ })(jQuery);
@@ -0,0 +1,199 @@
1
+ 'use strict';
2
+
3
+ describe('uiSortable', function() {
4
+
5
+ beforeEach(module(function($compileProvider) {
6
+ if (typeof $compileProvider.debugInfoEnabled === 'function') {
7
+ $compileProvider.debugInfoEnabled(false);
8
+ }
9
+ }));
10
+
11
+ // Ensure the sortable angular module is loaded
12
+ beforeEach(module('ui.sortable'));
13
+ beforeEach(module('ui.sortable.testHelper'));
14
+
15
+ var EXTRA_DY_PERCENTAGE, listContent, hasUndefinedProperties, beforeLiElement, afterLiElement;
16
+
17
+ beforeEach(inject(function (sortableTestHelper) {
18
+ EXTRA_DY_PERCENTAGE = sortableTestHelper.EXTRA_DY_PERCENTAGE;
19
+ listContent = sortableTestHelper.listContent;
20
+ hasUndefinedProperties = sortableTestHelper.hasUndefinedProperties;
21
+ beforeLiElement = sortableTestHelper.extraElements && sortableTestHelper.extraElements.beforeLiElement;
22
+ afterLiElement = sortableTestHelper.extraElements && sortableTestHelper.extraElements.afterLiElement;
23
+ }));
24
+
25
+ tests.description = 'Attribute Callbacks related';
26
+ function tests (useExtraElements) {
27
+
28
+ var host;
29
+
30
+ beforeEach(inject(function() {
31
+ host = $('<div id="test-host"></div>');
32
+ $('body').append(host);
33
+
34
+ if (!useExtraElements) {
35
+ beforeLiElement = afterLiElement = '';
36
+ }
37
+ }));
38
+
39
+ afterEach(function() {
40
+ host.remove();
41
+ host = null;
42
+ });
43
+
44
+ it('should cancel sorting of node "Two"', function() {
45
+ inject(function($compile, $rootScope) {
46
+ var element;
47
+ element = $compile(''.concat(
48
+ '<ul ui-sortable ui-sortable-update="update" ng-model="items">',
49
+ beforeLiElement,
50
+ '<li ng-repeat="item in items" id="s-{{$index}}">{{ item }}</li>',
51
+ afterLiElement,
52
+ '</ul>'))($rootScope);
53
+ $rootScope.$apply(function() {
54
+ $rootScope.update = function(e, ui) {
55
+ if (ui.item.sortable.model === 'Two') {
56
+ ui.item.sortable.cancel();
57
+ }
58
+ };
59
+ $rootScope.items = ['One', 'Two', 'Three'];
60
+ });
61
+
62
+ host.append(element);
63
+
64
+ var li = element.find('[ng-repeat]:eq(1)');
65
+ var dy = (1 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
66
+ li.simulate('drag', { dy: dy });
67
+ expect($rootScope.items).toEqual(['One', 'Two', 'Three']);
68
+ expect($rootScope.items).toEqual(listContent(element));
69
+ // try again
70
+ li = element.find('[ng-repeat]:eq(1)');
71
+ dy = (1 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
72
+ li.simulate('drag', { dy: dy });
73
+ expect($rootScope.items).toEqual(['One', 'Two', 'Three']);
74
+ expect($rootScope.items).toEqual(listContent(element));
75
+ // try again
76
+ li = element.find('[ng-repeat]:eq(1)');
77
+ dy = (1 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
78
+ li.simulate('drag', { dy: dy });
79
+ expect($rootScope.items).toEqual(['One', 'Two', 'Three']);
80
+ expect($rootScope.items).toEqual(listContent(element));
81
+
82
+ li = element.find('[ng-repeat]:eq(0)');
83
+ dy = (2 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
84
+ li.simulate('drag', { dy: dy });
85
+ expect($rootScope.items).toEqual(['Two', 'Three', 'One']);
86
+ expect($rootScope.items).toEqual(listContent(element));
87
+
88
+ li = element.find('[ng-repeat]:eq(2)');
89
+ dy = -(2 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
90
+ li.simulate('drag', { dy: dy });
91
+ expect($rootScope.items).toEqual(['One', 'Two', 'Three']);
92
+ expect($rootScope.items).toEqual(listContent(element));
93
+
94
+ $(element).remove();
95
+ });
96
+ });
97
+
98
+ it('should call all callbacks with the proper context', function() {
99
+ inject(function($compile, $rootScope) {
100
+ var element, callbackContexts = {};
101
+ $rootScope.$apply(function() {
102
+ $rootScope.create = function() {
103
+ callbackContexts.create = this;
104
+ };
105
+ // $rootScope.helper = function(e, item) {
106
+ // callbackContexts.helper = this;
107
+ // return item;
108
+ // };
109
+ $rootScope.start = function() {
110
+ callbackContexts.start = this;
111
+ };
112
+ $rootScope.activate = function() {
113
+ callbackContexts.activate = this;
114
+ };
115
+ $rootScope.beforeStop = function() {
116
+ callbackContexts.beforeStop = this;
117
+ };
118
+ $rootScope.update = function() {
119
+ callbackContexts.update = this;
120
+ };
121
+ $rootScope.deactivate = function() {
122
+ callbackContexts.deactivate = this;
123
+ };
124
+ $rootScope.stop = function() {
125
+ callbackContexts.stop = this;
126
+ };
127
+
128
+ // spyOn($rootScope, 'helper').and.callThrough();
129
+ spyOn($rootScope, 'create').and.callThrough();
130
+ spyOn($rootScope, 'start').and.callThrough();
131
+ spyOn($rootScope, 'activate').and.callThrough();
132
+ spyOn($rootScope, 'beforeStop').and.callThrough();
133
+ spyOn($rootScope, 'update').and.callThrough();
134
+ spyOn($rootScope, 'deactivate').and.callThrough();
135
+ spyOn($rootScope, 'stop').and.callThrough();
136
+ $rootScope.items = ['One', 'Two', 'Three'];
137
+ element = $compile(''.concat(
138
+ '<ul ui-sortable ' +
139
+ 'ui-sortable-create="create" ' +
140
+ // 'ui-sortable-helper="helper" ' +
141
+ 'ui-sortable-start="start" ' +
142
+ 'ui-sortable-activate="activate" ' +
143
+ 'ui-sortable-update="update" ' +
144
+ 'ui-sortable-before-stop="beforeStop" ' +
145
+ 'ui-sortable-deactivate="deactivate" ' +
146
+ 'ui-sortable-stop="stop" ' +
147
+ 'ng-model="items">',
148
+ beforeLiElement,
149
+ '<li ng-repeat="item in items" id="s-{{$index}}">{{ item }}</li>',
150
+ afterLiElement +
151
+ '</ul>'))($rootScope);
152
+ });
153
+
154
+ host.append(element);
155
+
156
+ $rootScope.$apply(function() {
157
+ });
158
+ var li = element.find('[ng-repeat]:eq(0)');
159
+ var dy = (2 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
160
+ li.simulate('drag', { dy: dy });
161
+ expect($rootScope.items).toEqual(['Two', 'Three', 'One']);
162
+ expect($rootScope.items).toEqual(listContent(element));
163
+
164
+ expect($rootScope.create).toHaveBeenCalled();
165
+ // expect($rootScope.helper).toHaveBeenCalled();
166
+ expect($rootScope.start).toHaveBeenCalled();
167
+ expect($rootScope.activate).toHaveBeenCalled();
168
+ expect($rootScope.beforeStop).toHaveBeenCalled();
169
+ expect($rootScope.update).toHaveBeenCalled();
170
+ expect($rootScope.deactivate).toHaveBeenCalled();
171
+ expect($rootScope.stop).toHaveBeenCalled();
172
+
173
+ expect(callbackContexts.create).toEqual(element[0]);
174
+ // expect(callbackContexts.helper).toEqual(element[0]);
175
+ expect(callbackContexts.start).toEqual(element[0]);
176
+ expect(callbackContexts.activate).toEqual(element[0]);
177
+ expect(callbackContexts.beforeStop).toEqual(element[0]);
178
+ expect(callbackContexts.update).toEqual(element[0]);
179
+ expect(callbackContexts.deactivate).toEqual(element[0]);
180
+ expect(callbackContexts.stop).toEqual(element[0]);
181
+
182
+ $(element).remove();
183
+ });
184
+ });
185
+ }
186
+
187
+ [0, 1].forEach(function(useExtraElements){
188
+ var testDescription = tests.description;
189
+
190
+ if (useExtraElements) {
191
+ testDescription += ' with extra elements';
192
+ }
193
+
194
+ describe(testDescription, function(){
195
+ tests(useExtraElements);
196
+ });
197
+ });
198
+
199
+ });
@@ -0,0 +1,729 @@
1
+ 'use strict';
2
+
3
+ describe('uiSortable', function() {
4
+
5
+ beforeEach(module(function($compileProvider) {
6
+ if (typeof $compileProvider.debugInfoEnabled === 'function') {
7
+ $compileProvider.debugInfoEnabled(false);
8
+ }
9
+ }));
10
+
11
+ // Ensure the sortable angular module is loaded
12
+ beforeEach(module('ui.sortable'));
13
+ beforeEach(module('ui.sortable.testHelper'));
14
+
15
+ var EXTRA_DY_PERCENTAGE, listContent, hasUndefinedProperties, beforeLiElement, afterLiElement;
16
+
17
+ beforeEach(inject(function (sortableTestHelper) {
18
+ EXTRA_DY_PERCENTAGE = sortableTestHelper.EXTRA_DY_PERCENTAGE;
19
+ listContent = sortableTestHelper.listContent;
20
+ hasUndefinedProperties = sortableTestHelper.hasUndefinedProperties;
21
+ beforeLiElement = sortableTestHelper.extraElements && sortableTestHelper.extraElements.beforeLiElement;
22
+ afterLiElement = sortableTestHelper.extraElements && sortableTestHelper.extraElements.afterLiElement;
23
+ }));
24
+
25
+ tests.description = 'Callbacks related';
26
+ function tests (useExtraElements) {
27
+
28
+ var host;
29
+
30
+ beforeEach(inject(function() {
31
+ host = $('<div id="test-host"></div>');
32
+ $('body').append(host);
33
+
34
+ if (!useExtraElements) {
35
+ beforeLiElement = afterLiElement = '';
36
+ }
37
+ }));
38
+
39
+ afterEach(function() {
40
+ host.remove();
41
+ host = null;
42
+ });
43
+
44
+ it('should cancel sorting of node "Two"', function() {
45
+ inject(function($compile, $rootScope) {
46
+ var element;
47
+ element = $compile(''.concat(
48
+ '<ul ui-sortable="opts" ng-model="items">',
49
+ beforeLiElement,
50
+ '<li ng-repeat="item in items" id="s-{{$index}}">{{ item }}</li>',
51
+ afterLiElement,
52
+ '</ul>'))($rootScope);
53
+ $rootScope.$apply(function() {
54
+ $rootScope.opts = {
55
+ update: function(e, ui) {
56
+ if (ui.item.sortable.model === 'Two') {
57
+ ui.item.sortable.cancel();
58
+ }
59
+ }
60
+ };
61
+ $rootScope.items = ['One', 'Two', 'Three'];
62
+ });
63
+
64
+ host.append(element);
65
+
66
+ var li = element.find('[ng-repeat]:eq(1)');
67
+ var dy = (1 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
68
+ li.simulate('drag', { dy: dy });
69
+ expect($rootScope.items).toEqual(['One', 'Two', 'Three']);
70
+ expect($rootScope.items).toEqual(listContent(element));
71
+ // try again
72
+ li = element.find('[ng-repeat]:eq(1)');
73
+ dy = (1 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
74
+ li.simulate('drag', { dy: dy });
75
+ expect($rootScope.items).toEqual(['One', 'Two', 'Three']);
76
+ expect($rootScope.items).toEqual(listContent(element));
77
+ // try again
78
+ li = element.find('[ng-repeat]:eq(1)');
79
+ dy = (1 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
80
+ li.simulate('drag', { dy: dy });
81
+ expect($rootScope.items).toEqual(['One', 'Two', 'Three']);
82
+ expect($rootScope.items).toEqual(listContent(element));
83
+
84
+ li = element.find('[ng-repeat]:eq(0)');
85
+ dy = (2 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
86
+ li.simulate('drag', { dy: dy });
87
+ expect($rootScope.items).toEqual(['Two', 'Three', 'One']);
88
+ expect($rootScope.items).toEqual(listContent(element));
89
+
90
+ li = element.find('[ng-repeat]:eq(2)');
91
+ dy = -(2 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
92
+ li.simulate('drag', { dy: dy });
93
+ expect($rootScope.items).toEqual(['One', 'Two', 'Three']);
94
+ expect($rootScope.items).toEqual(listContent(element));
95
+
96
+ $(element).remove();
97
+ });
98
+ });
99
+
100
+ it('should cancel sorting of node "Two" and "helper: function" that returns an element is used', function() {
101
+ inject(function($compile, $rootScope) {
102
+ var element;
103
+ element = $compile(''.concat(
104
+ '<ul ui-sortable="opts" ng-model="items">',
105
+ beforeLiElement,
106
+ '<li ng-repeat="item in items" id="s-{{$index}}">{{ item }}</li>',
107
+ afterLiElement +
108
+ '</ul>'))($rootScope);
109
+ $rootScope.$apply(function() {
110
+ $rootScope.opts = {
111
+ helper: function (e, item) {
112
+ return item.clone();
113
+ },
114
+ update: function(e, ui) {
115
+ if (ui.item.sortable.model === 'Two') {
116
+ ui.item.sortable.cancel();
117
+ }
118
+ }
119
+ };
120
+ $rootScope.items = ['One', 'Two', 'Three'];
121
+ });
122
+
123
+ host.append(element);
124
+
125
+ var li = element.find('[ng-repeat]:eq(1)');
126
+ var dy = (1 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
127
+ li.simulate('drag', { dy: dy });
128
+ expect($rootScope.items).toEqual(['One', 'Two', 'Three']);
129
+ expect($rootScope.items).toEqual(listContent(element));
130
+ // try again
131
+ li = element.find('[ng-repeat]:eq(1)');
132
+ dy = (1 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
133
+ li.simulate('drag', { dy: dy });
134
+ expect($rootScope.items).toEqual(['One', 'Two', 'Three']);
135
+ expect($rootScope.items).toEqual(listContent(element));
136
+ // try again
137
+ li = element.find('[ng-repeat]:eq(1)');
138
+ dy = (1 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
139
+ li.simulate('drag', { dy: dy });
140
+ expect($rootScope.items).toEqual(['One', 'Two', 'Three']);
141
+ expect($rootScope.items).toEqual(listContent(element));
142
+
143
+ li = element.find('[ng-repeat]:eq(0)');
144
+ dy = (2 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
145
+ li.simulate('drag', { dy: dy });
146
+ expect($rootScope.items).toEqual(['Two', 'Three', 'One']);
147
+ expect($rootScope.items).toEqual(listContent(element));
148
+
149
+ li = element.find('[ng-repeat]:eq(2)');
150
+ dy = -(2 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
151
+ li.simulate('drag', { dy: dy });
152
+ expect($rootScope.items).toEqual(['One', 'Two', 'Three']);
153
+ expect($rootScope.items).toEqual(listContent(element));
154
+
155
+ $(element).remove();
156
+ });
157
+ });
158
+
159
+ it('should cancel sorting of node "Two" when then helper is appended to the `body`', function() {
160
+ inject(function($compile, $rootScope) {
161
+ var element;
162
+ element = $compile(''.concat(
163
+ '<ul ui-sortable="opts" ng-model="items">',
164
+ beforeLiElement,
165
+ '<li ng-repeat="item in items" id="s-{{$index}}">{{ item }}</li>',
166
+ afterLiElement +
167
+ '</ul>'))($rootScope);
168
+ $rootScope.$apply(function() {
169
+ $rootScope.opts = {
170
+ helper: function (e, item) {
171
+ return item.clone().appendTo('body');
172
+ },
173
+ update: function(e, ui) {
174
+ if (ui.item.sortable.model === 'Two') {
175
+ ui.item.sortable.cancel();
176
+ }
177
+ }
178
+ };
179
+ $rootScope.items = ['One', 'Two', 'Three'];
180
+ });
181
+
182
+ host.append(element);
183
+
184
+ var li = element.find('[ng-repeat]:eq(1)');
185
+ var dy = (1 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
186
+ li.simulate('drag', { dy: dy });
187
+ expect($rootScope.items).toEqual(['One', 'Two', 'Three']);
188
+ expect($rootScope.items).toEqual(listContent(element));
189
+ // try again
190
+ li = element.find('[ng-repeat]:eq(1)');
191
+ dy = (1 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
192
+ li.simulate('drag', { dy: dy });
193
+ expect($rootScope.items).toEqual(['One', 'Two', 'Three']);
194
+ expect($rootScope.items).toEqual(listContent(element));
195
+ // try again
196
+ li = element.find('[ng-repeat]:eq(1)');
197
+ dy = (1 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
198
+ li.simulate('drag', { dy: dy });
199
+ expect($rootScope.items).toEqual(['One', 'Two', 'Three']);
200
+ expect($rootScope.items).toEqual(listContent(element));
201
+
202
+ li = element.find('[ng-repeat]:eq(0)');
203
+ dy = (2 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
204
+ li.simulate('drag', { dy: dy });
205
+ expect($rootScope.items).toEqual(['Two', 'Three', 'One']);
206
+ expect($rootScope.items).toEqual(listContent(element));
207
+
208
+ li = element.find('[ng-repeat]:eq(2)');
209
+ dy = -(2 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
210
+ li.simulate('drag', { dy: dy });
211
+ expect($rootScope.items).toEqual(['One', 'Two', 'Three']);
212
+ expect($rootScope.items).toEqual(listContent(element));
213
+
214
+ $(element).remove();
215
+ });
216
+ });
217
+
218
+ it('should cancel sorting of node "Two" and "helper: function" that returns a list element is used', function() {
219
+ inject(function($compile, $rootScope) {
220
+ var element;
221
+ element = $compile(''.concat(
222
+ '<ul ui-sortable="opts" ng-model="items">',
223
+ beforeLiElement,
224
+ '<li ng-repeat="item in items" id="s-{{$index}}">{{ item }}</li>',
225
+ afterLiElement +
226
+ '</ul>'))($rootScope);
227
+ $rootScope.$apply(function() {
228
+ $rootScope.opts = {
229
+ helper: function (e, item) {
230
+ return item;
231
+ },
232
+ update: function(e, ui) {
233
+ if (ui.item.sortable.model === 'Two') {
234
+ ui.item.sortable.cancel();
235
+ }
236
+ }
237
+ };
238
+ $rootScope.items = ['One', 'Two', 'Three'];
239
+ });
240
+
241
+ host.append(element);
242
+
243
+ var li = element.find('[ng-repeat]:eq(1)');
244
+ var dy = (1 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
245
+ li.simulate('drag', { dy: dy });
246
+ expect($rootScope.items).toEqual(['One', 'Two', 'Three']);
247
+ expect($rootScope.items).toEqual(listContent(element));
248
+ // try again
249
+ li = element.find('[ng-repeat]:eq(1)');
250
+ dy = (1 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
251
+ li.simulate('drag', { dy: dy });
252
+ expect($rootScope.items).toEqual(['One', 'Two', 'Three']);
253
+ expect($rootScope.items).toEqual(listContent(element));
254
+ // try again
255
+ li = element.find('[ng-repeat]:eq(1)');
256
+ dy = (1 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
257
+ li.simulate('drag', { dy: dy });
258
+ expect($rootScope.items).toEqual(['One', 'Two', 'Three']);
259
+ expect($rootScope.items).toEqual(listContent(element));
260
+
261
+ li = element.find('[ng-repeat]:eq(0)');
262
+ dy = (2 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
263
+ li.simulate('drag', { dy: dy });
264
+ expect($rootScope.items).toEqual(['Two', 'Three', 'One']);
265
+ expect($rootScope.items).toEqual(listContent(element));
266
+
267
+ li = element.find('[ng-repeat]:eq(2)');
268
+ dy = -(2 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
269
+ li.simulate('drag', { dy: dy });
270
+ expect($rootScope.items).toEqual(['One', 'Two', 'Three']);
271
+ expect($rootScope.items).toEqual(listContent(element));
272
+
273
+ $(element).remove();
274
+ });
275
+ });
276
+
277
+ it('should update model from update() callback', function() {
278
+ inject(function($compile, $rootScope) {
279
+ var element, logsElement;
280
+ element = $compile(''.concat(
281
+ '<ul ui-sortable="opts" ng-model="items">',
282
+ beforeLiElement,
283
+ '<li ng-repeat="item in items" id="s-{{$index}}">{{ item }}</li>',
284
+ afterLiElement +
285
+ '</ul>'))($rootScope);
286
+ logsElement = $compile(''.concat(
287
+ '<ul ng-model="logs">',
288
+ beforeLiElement,
289
+ '<li ng-repeat="log in logs" id="l-{{$index}}">{{ log }}</li>',
290
+ afterLiElement +
291
+ '</ul>'))($rootScope);
292
+ $rootScope.$apply(function() {
293
+ $rootScope.opts = {
294
+ update: function(e, ui) {
295
+ $rootScope.logs.push('Moved element ' + ui.item.sortable.model);
296
+ }
297
+ };
298
+ $rootScope.items = ['One', 'Two', 'Three'];
299
+ $rootScope.logs = [];
300
+ });
301
+
302
+ host.append(element).append(logsElement);
303
+
304
+ var li = element.find('[ng-repeat]:eq(1)');
305
+ var dy = (1 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
306
+ li.simulate('drag', { dy: dy });
307
+ expect($rootScope.items).toEqual(['One', 'Three', 'Two']);
308
+ expect($rootScope.logs).toEqual(['Moved element Two']);
309
+ expect($rootScope.items).toEqual(listContent(element));
310
+ expect($rootScope.logs).toEqual(listContent(logsElement));
311
+
312
+ $(element).remove();
313
+ $(logsElement).remove();
314
+ });
315
+ });
316
+
317
+ // ensure scope.apply() is called after a stop() callback
318
+ it('should update model from stop() callback', function() {
319
+ inject(function($compile, $rootScope) {
320
+ var element, logsElement;
321
+ element = $compile(''.concat(
322
+ '<ul ui-sortable="opts" ng-model="items">',
323
+ beforeLiElement,
324
+ '<li ng-repeat="item in items" id="s-{{$index}}">{{ item }}</li>',
325
+ afterLiElement +
326
+ '</ul>'))($rootScope);
327
+ logsElement = $compile(''.concat(
328
+ '<ul ng-model="logs">',
329
+ beforeLiElement,
330
+ '<li ng-repeat="log in logs" id="l-{{$index}}">{{ log }}</li>',
331
+ afterLiElement +
332
+ '</ul>'))($rootScope);
333
+ $rootScope.$apply(function() {
334
+ $rootScope.opts = {
335
+ stop: function(e, ui) {
336
+ $rootScope.logs.push('Moved element ' + ui.item.sortable.model);
337
+ }
338
+ };
339
+ $rootScope.items = ['One', 'Two', 'Three'];
340
+ $rootScope.logs = [];
341
+ });
342
+
343
+ host.append(element).append(logsElement);
344
+
345
+ var li = element.find('[ng-repeat]:eq(1)');
346
+ var dy = (1 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
347
+ li.simulate('drag', { dy: dy });
348
+ expect($rootScope.items).toEqual(['One', 'Three', 'Two']);
349
+ expect($rootScope.logs).toEqual(['Moved element Two']);
350
+ expect($rootScope.items).toEqual(listContent(element));
351
+ expect($rootScope.logs).toEqual(listContent(logsElement));
352
+
353
+ $(element).remove();
354
+ $(logsElement).remove();
355
+ });
356
+ });
357
+
358
+ it('should call the create() callback when initialized', function() {
359
+ inject(function($compile, $rootScope) {
360
+ var element;
361
+ $rootScope.$apply(function() {
362
+ $rootScope.items = ['One', 'Two', 'Three'];
363
+ $rootScope.opts = {
364
+ create: function() {
365
+
366
+ }
367
+ };
368
+ spyOn($rootScope.opts, 'create');
369
+ element = $compile(''.concat(
370
+ '<ul ui-sortable="opts" ng-model="items">',
371
+ beforeLiElement,
372
+ '<li ng-repeat="item in items" id="s-{{$index}}">{{ item }}</li>',
373
+ afterLiElement +
374
+ '</ul>'))($rootScope);
375
+ });
376
+
377
+ host.append(element);
378
+
379
+ expect($rootScope.opts.create).toHaveBeenCalled();
380
+
381
+ $(element).remove();
382
+ });
383
+ });
384
+
385
+ it('should properly set ui.item.sortable properties', function() {
386
+ inject(function($compile, $rootScope) {
387
+ var element, updateCallbackExpectations;
388
+ element = $compile(''.concat(
389
+ '<ul ui-sortable="opts" ng-model="items">',
390
+ beforeLiElement,
391
+ '<li ng-repeat="item in items" id="s-{{$index}}">{{ item }}</li>',
392
+ afterLiElement +
393
+ '</ul>'))($rootScope);
394
+ $rootScope.$apply(function() {
395
+ $rootScope.opts = {
396
+ update: function(e, ui) {
397
+ if (ui.item.sortable.model === 'Two') {
398
+ ui.item.sortable.cancel();
399
+ }
400
+ updateCallbackExpectations(ui.item.sortable);
401
+ }
402
+ };
403
+ $rootScope.items = ['One', 'Two', 'Three'];
404
+ });
405
+
406
+ host.append(element);
407
+
408
+ $rootScope.$apply(function() {
409
+ });
410
+ var li = element.find('[ng-repeat]:eq(1)');
411
+ var dy = (1 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
412
+ updateCallbackExpectations = function(uiItemSortable) {
413
+ expect(uiItemSortable.model).toEqual('Two');
414
+ expect(uiItemSortable.index).toEqual(1);
415
+ expect(uiItemSortable.source.length).toEqual(1);
416
+ expect(uiItemSortable.source[0]).toBe(host.children()[0]);
417
+ expect(uiItemSortable.sourceModel).toBe($rootScope.items);
418
+ expect(uiItemSortable.isCanceled()).toBe(true);
419
+ expect(uiItemSortable.isCustomHelperUsed()).toBe(false);
420
+ };
421
+ li.simulate('drag', { dy: dy });
422
+ expect($rootScope.items).toEqual(['One', 'Two', 'Three']);
423
+ expect($rootScope.items).toEqual(listContent(element));
424
+ updateCallbackExpectations = undefined;
425
+
426
+ li = element.find('[ng-repeat]:eq(0)');
427
+ dy = (2 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
428
+ updateCallbackExpectations = function(uiItemSortable) {
429
+ expect(uiItemSortable.model).toEqual('One');
430
+ expect(uiItemSortable.index).toEqual(0);
431
+ expect(uiItemSortable.source.length).toEqual(1);
432
+ expect(uiItemSortable.source[0]).toBe(host.children()[0]);
433
+ expect(uiItemSortable.sourceModel).toBe($rootScope.items);
434
+ expect(uiItemSortable.isCanceled()).toBe(false);
435
+ expect(uiItemSortable.isCustomHelperUsed()).toBe(false);
436
+ };
437
+ li.simulate('drag', { dy: dy });
438
+ expect($rootScope.items).toEqual(['Two', 'Three', 'One']);
439
+ expect($rootScope.items).toEqual(listContent(element));
440
+ updateCallbackExpectations = undefined;
441
+
442
+ li = element.find('[ng-repeat]:eq(2)');
443
+ dy = -(2 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
444
+ updateCallbackExpectations = function(uiItemSortable) {
445
+ expect(uiItemSortable.model).toEqual('One');
446
+ expect(uiItemSortable.index).toEqual(2);
447
+ expect(uiItemSortable.source.length).toEqual(1);
448
+ expect(uiItemSortable.source[0]).toBe(host.children()[0]);
449
+ expect(uiItemSortable.sourceModel).toBe($rootScope.items);
450
+ expect(uiItemSortable.isCanceled()).toBe(false);
451
+ expect(uiItemSortable.isCustomHelperUsed()).toBe(false);
452
+ };
453
+ li.simulate('drag', { dy: dy });
454
+ expect($rootScope.items).toEqual(['One', 'Two', 'Three']);
455
+ expect($rootScope.items).toEqual(listContent(element));
456
+ updateCallbackExpectations = undefined;
457
+
458
+ $(element).remove();
459
+ });
460
+ });
461
+
462
+ it('should call all callbacks with the proper context', function() {
463
+ inject(function($compile, $rootScope) {
464
+ var element, callbackContexts = {};
465
+ $rootScope.$apply(function() {
466
+ $rootScope.opts = {
467
+ helper: function(e, item) {
468
+ callbackContexts.helper = this;
469
+ return item;
470
+ },
471
+ create: function() {
472
+ callbackContexts.create = this;
473
+ },
474
+ start: function() {
475
+ callbackContexts.start = this;
476
+ },
477
+ activate: function() {
478
+ callbackContexts.activate = this;
479
+ },
480
+ beforeStop: function() {
481
+ callbackContexts.beforeStop = this;
482
+ },
483
+ update: function() {
484
+ callbackContexts.update = this;
485
+ },
486
+ deactivate: function() {
487
+ callbackContexts.deactivate = this;
488
+ },
489
+ stop: function() {
490
+ callbackContexts.stop = this;
491
+ }
492
+ };
493
+ spyOn($rootScope.opts, 'helper').and.callThrough();
494
+ spyOn($rootScope.opts, 'create').and.callThrough();
495
+ spyOn($rootScope.opts, 'start').and.callThrough();
496
+ spyOn($rootScope.opts, 'activate').and.callThrough();
497
+ spyOn($rootScope.opts, 'beforeStop').and.callThrough();
498
+ spyOn($rootScope.opts, 'update').and.callThrough();
499
+ spyOn($rootScope.opts, 'deactivate').and.callThrough();
500
+ spyOn($rootScope.opts, 'stop').and.callThrough();
501
+ $rootScope.items = ['One', 'Two', 'Three'];
502
+ element = $compile(''.concat(
503
+ '<ul ui-sortable="opts" ng-model="items">',
504
+ beforeLiElement,
505
+ '<li ng-repeat="item in items" id="s-{{$index}}">{{ item }}</li>',
506
+ afterLiElement +
507
+ '</ul>'))($rootScope);
508
+ });
509
+
510
+ host.append(element);
511
+
512
+ $rootScope.$apply(function() {
513
+ });
514
+ var li = element.find('[ng-repeat]:eq(0)');
515
+ var dy = (2 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
516
+ li.simulate('drag', { dy: dy });
517
+ expect($rootScope.items).toEqual(['Two', 'Three', 'One']);
518
+ expect($rootScope.items).toEqual(listContent(element));
519
+
520
+ expect($rootScope.opts.helper).toHaveBeenCalled();
521
+ expect($rootScope.opts.create).toHaveBeenCalled();
522
+ expect($rootScope.opts.start).toHaveBeenCalled();
523
+ expect($rootScope.opts.activate).toHaveBeenCalled();
524
+ expect($rootScope.opts.beforeStop).toHaveBeenCalled();
525
+ expect($rootScope.opts.update).toHaveBeenCalled();
526
+ expect($rootScope.opts.deactivate).toHaveBeenCalled();
527
+ expect($rootScope.opts.stop).toHaveBeenCalled();
528
+
529
+ expect(callbackContexts.helper).toEqual(element[0]);
530
+ expect(callbackContexts.create).toEqual(element[0]);
531
+ expect(callbackContexts.start).toEqual(element[0]);
532
+ expect(callbackContexts.activate).toEqual(element[0]);
533
+ expect(callbackContexts.beforeStop).toEqual(element[0]);
534
+ expect(callbackContexts.update).toEqual(element[0]);
535
+ expect(callbackContexts.deactivate).toEqual(element[0]);
536
+ expect(callbackContexts.stop).toEqual(element[0]);
537
+
538
+ $(element).remove();
539
+ });
540
+ });
541
+
542
+ it('should properly free ui.item.sortable object', function() {
543
+ inject(function($compile, $rootScope) {
544
+ var element, uiItem, uiItemSortable_Destroy;
545
+ element = $compile(''.concat(
546
+ '<ul ui-sortable="opts" ng-model="items">',
547
+ beforeLiElement,
548
+ '<li ng-repeat="item in items" id="s-{{$index}}">{{ item }}</li>',
549
+ afterLiElement +
550
+ '</ul>'))($rootScope);
551
+ $rootScope.$apply(function() {
552
+ $rootScope.opts = {
553
+ start: function (e, ui) {
554
+ uiItem = ui.item;
555
+ spyOn(ui.item.sortable, '_destroy').and.callThrough();
556
+ uiItemSortable_Destroy = ui.item.sortable._destroy;
557
+ },
558
+ update: function(e, ui) {
559
+ if (ui.item.sortable.model === 'Two') {
560
+ ui.item.sortable.cancel();
561
+ }
562
+ }
563
+ };
564
+ $rootScope.items = ['One', 'Two', 'Three'];
565
+ });
566
+
567
+ host.append(element);
568
+
569
+ var li = element.find('[ng-repeat]:eq(1)');
570
+ var dy = (1 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
571
+ li.simulate('drag', { dy: dy });
572
+ expect($rootScope.items).toEqual(['One', 'Two', 'Three']);
573
+ expect($rootScope.items).toEqual(listContent(element));
574
+ expect(uiItemSortable_Destroy).toHaveBeenCalled();
575
+ expect(hasUndefinedProperties(uiItem.sortable)).toBe(true);
576
+ uiItem = uiItemSortable_Destroy = undefined;
577
+
578
+
579
+ li = element.find('[ng-repeat]:eq(0)');
580
+ dy = (2 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
581
+ li.simulate('drag', { dy: dy });
582
+ expect($rootScope.items).toEqual(['Two', 'Three', 'One']);
583
+ expect($rootScope.items).toEqual(listContent(element));
584
+ expect(uiItemSortable_Destroy).toHaveBeenCalled();
585
+ expect(hasUndefinedProperties(uiItem.sortable)).toBe(true);
586
+ uiItem = uiItemSortable_Destroy = undefined;
587
+
588
+
589
+ li = element.find('[ng-repeat]:eq(2)');
590
+ dy = -(2 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
591
+ li.simulate('drag', { dy: dy });
592
+ expect($rootScope.items).toEqual(['One', 'Two', 'Three']);
593
+ expect($rootScope.items).toEqual(listContent(element));
594
+ expect(uiItemSortable_Destroy).toHaveBeenCalled();
595
+ expect(hasUndefinedProperties(uiItem.sortable)).toBe(true);
596
+ uiItem = uiItemSortable_Destroy = undefined;
597
+
598
+ $(element).remove();
599
+ });
600
+ });
601
+
602
+ it('should provide the item.sortable properties on helper callback', function() {
603
+ inject(function($compile, $rootScope) {
604
+ var element, helperItem, itemSortable_Restore, sortableAfterRestore, helperCallbackExpectations;
605
+ element = $compile(''.concat(
606
+ '<ul ui-sortable="opts" ng-model="items">',
607
+ beforeLiElement,
608
+ '<li ng-repeat="item in items" id="s-{{$index}}">{{ item }}</li>',
609
+ afterLiElement +
610
+ '</ul>'))($rootScope);
611
+ $rootScope.$apply(function() {
612
+ $rootScope.opts = {
613
+ helper: function(e, item) {
614
+ helperItem = item;
615
+
616
+ var oldRestore = item.sortable._restore;
617
+ item.sortable._restore = function () {
618
+ oldRestore.apply(this, arguments);
619
+ // hold the value of the sortable object
620
+ // right after the _restore method completes
621
+ sortableAfterRestore = item.sortable;
622
+ };
623
+
624
+ spyOn(item.sortable, '_restore').and.callThrough();
625
+ itemSortable_Restore = item.sortable._restore;
626
+ helperCallbackExpectations(item.sortable);
627
+ return item.clone();
628
+ }
629
+ };
630
+ $rootScope.items = ['One', 'Two', 'Three'];
631
+ });
632
+
633
+ host.append(element);
634
+
635
+ $rootScope.$apply(function() {
636
+ });
637
+
638
+ var li = element.find('[ng-repeat]:eq(0)');
639
+ var dy = (2 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
640
+ helperCallbackExpectations = function(helperItemSortable) {
641
+ expect(helperItemSortable.model).toEqual('One');
642
+ expect(helperItemSortable.index).toEqual(0);
643
+ expect(helperItemSortable.source.length).toEqual(1);
644
+ expect(helperItemSortable.source[0]).toBe(host.children()[0]);
645
+ expect(helperItemSortable.sourceModel).toBe($rootScope.items);
646
+ };
647
+ li.simulate('drag', { dy: dy });
648
+ expect($rootScope.items).toEqual(['Two', 'Three', 'One']);
649
+ expect($rootScope.items).toEqual(listContent(element));
650
+ expect(itemSortable_Restore).toHaveBeenCalled();
651
+ expect(hasUndefinedProperties(helperItem.sortable)).toBe(true);
652
+ // this happens after the update callback, so everything is udnefined
653
+ expect(typeof sortableAfterRestore).toBe('function');
654
+ helperItem = itemSortable_Restore = sortableAfterRestore = helperCallbackExpectations = undefined;
655
+
656
+ $(element).remove();
657
+ });
658
+ });
659
+
660
+ it('should properly reset a deleted callback option', function() {
661
+ inject(function($compile, $rootScope) {
662
+ var element, logsElement;
663
+ element = $compile(''.concat(
664
+ '<ul ui-sortable="opts" ng-model="items">',
665
+ beforeLiElement,
666
+ '<li ng-repeat="item in items" id="s-{{$index}}">{{ item }}</li>',
667
+ afterLiElement +
668
+ '</ul>'))($rootScope);
669
+ logsElement = $compile(''.concat(
670
+ '<ul ng-model="logs">',
671
+ beforeLiElement,
672
+ '<li ng-repeat="log in logs" id="l-{{$index}}">{{ log }}</li>',
673
+ afterLiElement +
674
+ '</ul>'))($rootScope);
675
+ $rootScope.$apply(function() {
676
+ $rootScope.opts = {
677
+ stop: function(e, ui) {
678
+ $rootScope.logs.push('Moved element ' + ui.item.sortable.model);
679
+ }
680
+ };
681
+ $rootScope.items = ['One', 'Two', 'Three'];
682
+ $rootScope.logs = [];
683
+ });
684
+
685
+ host.append(element).append(logsElement);
686
+
687
+ var li = element.find('[ng-repeat]:eq(1)');
688
+ var dy = (1 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
689
+ li.simulate('drag', { dy: dy });
690
+ expect($rootScope.items).toEqual(['One', 'Three', 'Two']);
691
+ expect($rootScope.logs).toEqual(['Moved element Two']);
692
+ expect($rootScope.items).toEqual(listContent(element));
693
+ expect($rootScope.logs).toEqual(listContent(logsElement));
694
+
695
+ $rootScope.$digest();
696
+
697
+ $rootScope.$apply(function() {
698
+ $rootScope.opts = {};
699
+ });
700
+
701
+ li = element.find('[ng-repeat]:eq(0)');
702
+ dy = (1 + EXTRA_DY_PERCENTAGE) * li.outerHeight();
703
+ li.simulate('drag', { dy: dy });
704
+ expect($rootScope.items).toEqual(['Three', 'One', 'Two']);
705
+ expect($rootScope.items).toEqual(listContent(element));
706
+ // the log should be the same
707
+ expect($rootScope.logs).toEqual(['Moved element Two']);
708
+ expect($rootScope.logs).toEqual(listContent(logsElement));
709
+
710
+ $(element).remove();
711
+ $(logsElement).remove();
712
+ });
713
+ });
714
+
715
+ }
716
+
717
+ [0, 1].forEach(function(useExtraElements){
718
+ var testDescription = tests.description;
719
+
720
+ if (useExtraElements) {
721
+ testDescription += ' with extra elements';
722
+ }
723
+
724
+ describe(testDescription, function(){
725
+ tests(useExtraElements);
726
+ });
727
+ });
728
+
729
+ });