promethee 1.4.8 → 1.4.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -6
- data/app/assets/javascripts/promethee.js +4 -0
- data/app/assets/stylesheets/promethee-edit.sass +1 -0
- data/config/initializers/assets.rb +1 -0
- data/lib/promethee/rails/version.rb +1 -1
- data/node_modules/angular-summernote/CHANGELOG.md +149 -0
- data/node_modules/angular-summernote/LICENSE-MIT +22 -0
- data/node_modules/angular-summernote/README.md +270 -0
- data/node_modules/angular-summernote/bower.json +49 -0
- data/{vendor/assets/javascripts → node_modules/angular-summernote/dist}/angular-summernote.js +0 -0
- data/node_modules/angular-summernote/dist/angular-summernote.min.js +2 -0
- data/node_modules/angular-summernote/examples/fontstyle-plugin.html +48 -0
- data/node_modules/angular-summernote/examples/index.html +180 -0
- data/node_modules/angular-summernote/examples/index2.html +60 -0
- data/node_modules/angular-summernote/examples/index3.html +57 -0
- data/node_modules/angular-summernote/gulpfile.js +115 -0
- data/node_modules/angular-summernote/package.json +53 -0
- data/node_modules/angular-summernote/src/angular-summernote.js +206 -0
- data/node_modules/angular-summernote/test/angular-summernote.test.js +660 -0
- data/node_modules/angular-summernote/test/chai.conf.js +6 -0
- data/node_modules/angular-summernote/test/coverage/Chrome 37.0.2062 (Mac OS X 10.9.4)/index.html +350 -0
- data/node_modules/angular-summernote/test/coverage/Chrome 37.0.2062 (Mac OS X 10.9.4)/prettify.css +1 -0
- data/node_modules/angular-summernote/test/coverage/Chrome 37.0.2062 (Mac OS X 10.9.4)/prettify.js +1 -0
- data/node_modules/angular-summernote/test/coverage/Chrome 37.0.2062 (Mac OS X 10.9.4)/src/angular-summernote.js.html +694 -0
- data/node_modules/angular-summernote/test/coverage/Chrome 37.0.2062 (Mac OS X 10.9.4)/src/index.html +350 -0
- data/node_modules/angular-summernote/test/karma-angular-1-2-x.conf.js +33 -0
- data/node_modules/angular-summernote/test/karma-angular-1-3-x.conf.js +33 -0
- data/node_modules/angular-summernote/test/karma-angular-1-4-x.conf.js +33 -0
- data/node_modules/angular-summernote/test/karma-shared.conf.js +64 -0
- data/node_modules/angular-summernote/test/karma.conf.js +33 -0
- data/{vendor/assets/javascripts/summernote/locales/de-DE.js → node_modules/angular-summernote/test/lang/summernote-de-DE.js} +2 -17
- data/node_modules/angular-summernote/test/mocha.conf.js +3 -0
- data/node_modules/angular-ui-sortable/API.md +84 -0
- data/node_modules/angular-ui-sortable/CONTRIBUTING.md +12 -0
- data/node_modules/angular-ui-sortable/LICENSE +21 -0
- data/node_modules/angular-ui-sortable/README.md +350 -0
- data/node_modules/angular-ui-sortable/bower.json +26 -0
- data/node_modules/angular-ui-sortable/demo/demo.css +34 -0
- data/node_modules/angular-ui-sortable/demo/demo.html +29 -0
- data/node_modules/angular-ui-sortable/demo/demo.js +41 -0
- data/node_modules/angular-ui-sortable/dist/sortable.js +593 -0
- data/node_modules/angular-ui-sortable/dist/sortable.min.js +8 -0
- data/node_modules/angular-ui-sortable/gruntFile.js +202 -0
- data/node_modules/angular-ui-sortable/package.json +48 -0
- data/node_modules/angular-ui-sortable/publish.js +41 -0
- data/{vendor/assets/javascripts/ui-sortable.js → node_modules/angular-ui-sortable/src/sortable.js} +106 -200
- data/node_modules/angular-ui-sortable/test/bower_overrides.json +13 -0
- data/node_modules/angular-ui-sortable/test/karma.conf.js +85 -0
- data/node_modules/angular-ui-sortable/test/libs/jquery.simulate.dragandrevert.js +60 -0
- data/node_modules/angular-ui-sortable/test/sortable.e2e.callbacks.attr.spec.js +199 -0
- data/node_modules/angular-ui-sortable/test/sortable.e2e.callbacks.spec.js +729 -0
- data/node_modules/angular-ui-sortable/test/sortable.e2e.directiveoptions.spec.js +554 -0
- data/node_modules/angular-ui-sortable/test/sortable.e2e.directives.spec.js +371 -0
- data/node_modules/angular-ui-sortable/test/sortable.e2e.events.spec.js +167 -0
- data/node_modules/angular-ui-sortable/test/sortable.e2e.multi.spec.js +1232 -0
- data/node_modules/angular-ui-sortable/test/sortable.e2e.nested.spec.js +186 -0
- data/node_modules/angular-ui-sortable/test/sortable.e2e.spec.js +895 -0
- data/node_modules/angular-ui-sortable/test/sortable.spec.js +440 -0
- data/node_modules/angular-ui-sortable/test/sortable.test-directives.js +54 -0
- data/node_modules/angular-ui-sortable/test/sortable.test-helper.js +114 -0
- data/node_modules/angular-ui-sortable/test/sortable.tests.css +12 -0
- data/node_modules/ng-file-upload/LICENSE +20 -0
- data/node_modules/ng-file-upload/README.md +616 -0
- data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/FileAPI.flash.swf +0 -0
- data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/FileAPI.js +0 -0
- data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/FileAPI.min.js +0 -0
- data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/ng-file-upload-all.js +0 -0
- data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/ng-file-upload-all.min.js +0 -0
- data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/ng-file-upload-shim.js +0 -0
- data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/ng-file-upload-shim.min.js +0 -0
- data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/ng-file-upload.js +0 -0
- data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/ng-file-upload.min.js +0 -0
- data/node_modules/ng-file-upload/index.js +2 -0
- data/node_modules/ng-file-upload/package.json +42 -0
- data/node_modules/summernote/CODE_OF_CONDUCT.md +46 -0
- data/node_modules/summernote/CONTRIBUTING.md +67 -0
- data/node_modules/summernote/ISSUE_TEMPLATE.md +14 -0
- data/node_modules/summernote/LICENSE +21 -0
- data/node_modules/summernote/PULL_REQUEST_TEMPLATE.md +28 -0
- data/node_modules/summernote/README.md +90 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/base.css +213 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/index.html +262 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/prettify.css +1 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/prettify.js +1 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/sort-arrow-sprite.png +0 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/sorter.js +158 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/Context.js.html +758 -0
- 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
- 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
- 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
- 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
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/core/index.html +171 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/editing/index.html +145 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/index.html +119 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/index.html +353 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/renderer.js.html +263 -0
- 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
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/bs3/index.html +106 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/bs3/settings.js.html +956 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/bs3/ui.js.html +776 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/bs4/index.html +106 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/bs4/settings.js.html +968 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/bs4/ui.js.html +791 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/index.html +93 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/index.html +106 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/settings.js.html +953 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/ui.js.html +1919 -0
- 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
- 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
- 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
- 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
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/ui/index.html +132 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/summernote.js.html +203 -0
- 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
- 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
- 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
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/core/index.html +145 -0
- 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
- 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
- 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
- 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
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/editing/index.html +106 -0
- 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
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/index.html +93 -0
- 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
- 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
- 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
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/module/index.html +119 -0
- 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
- 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
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/bs/module/index.html +106 -0
- data/node_modules/summernote/dist/font/summernote.eot +0 -0
- data/node_modules/summernote/dist/font/summernote.ttf +0 -0
- data/node_modules/summernote/dist/font/summernote.woff +0 -0
- data/{vendor/assets/javascripts/summernote/locales/ar-AR.js → node_modules/summernote/dist/lang/summernote-ar-AR.js} +55 -4
- data/node_modules/summernote/dist/lang/summernote-ar-AR.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/bg-BG.js → node_modules/summernote/dist/lang/summernote-bg-BG.js} +60 -4
- data/node_modules/summernote/dist/lang/summernote-bg-BG.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/ca-ES.js → node_modules/summernote/dist/lang/summernote-ca-ES.js} +12 -4
- data/node_modules/summernote/dist/lang/summernote-ca-ES.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/cs-CZ.js → node_modules/summernote/dist/lang/summernote-cs-CZ.js} +50 -4
- data/node_modules/summernote/dist/lang/summernote-cs-CZ.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/da-DK.js → node_modules/summernote/dist/lang/summernote-da-DK.js} +46 -5
- data/node_modules/summernote/dist/lang/summernote-da-DK.min.js +3 -0
- data/node_modules/summernote/dist/lang/summernote-de-DE.js +154 -0
- data/node_modules/summernote/dist/lang/summernote-de-DE.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/el-GR.js → node_modules/summernote/dist/lang/summernote-el-GR.js} +11 -3
- data/node_modules/summernote/dist/lang/summernote-el-GR.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/es-ES.js → node_modules/summernote/dist/lang/summernote-es-ES.js} +12 -4
- data/node_modules/summernote/dist/lang/summernote-es-ES.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/es-EU.js → node_modules/summernote/dist/lang/summernote-es-EU.js} +55 -4
- data/node_modules/summernote/dist/lang/summernote-es-EU.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/fa-IR.js → node_modules/summernote/dist/lang/summernote-fa-IR.js} +55 -5
- data/node_modules/summernote/dist/lang/summernote-fa-IR.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/fi-FI.js → node_modules/summernote/dist/lang/summernote-fi-FI.js} +52 -3
- data/node_modules/summernote/dist/lang/summernote-fi-FI.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/fr-FR.js → node_modules/summernote/dist/lang/summernote-fr-FR.js} +3 -2
- data/node_modules/summernote/dist/lang/summernote-fr-FR.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/gl-ES.js → node_modules/summernote/dist/lang/summernote-gl-ES.js} +12 -4
- data/node_modules/summernote/dist/lang/summernote-gl-ES.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/he-IL.js → node_modules/summernote/dist/lang/summernote-he-IL.js} +51 -3
- data/node_modules/summernote/dist/lang/summernote-he-IL.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/hr-HR.js → node_modules/summernote/dist/lang/summernote-hr-HR.js} +54 -3
- data/node_modules/summernote/dist/lang/summernote-hr-HR.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/hu-HU.js → node_modules/summernote/dist/lang/summernote-hu-HU.js} +25 -5
- data/node_modules/summernote/dist/lang/summernote-hu-HU.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/id-ID.js → node_modules/summernote/dist/lang/summernote-id-ID.js} +56 -4
- data/node_modules/summernote/dist/lang/summernote-id-ID.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/it-IT.js → node_modules/summernote/dist/lang/summernote-it-IT.js} +55 -4
- data/node_modules/summernote/dist/lang/summernote-it-IT.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/ja-JP.js → node_modules/summernote/dist/lang/summernote-ja-JP.js} +32 -10
- data/node_modules/summernote/dist/lang/summernote-ja-JP.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/ko-KR.js → node_modules/summernote/dist/lang/summernote-ko-KR.js} +44 -4
- data/node_modules/summernote/dist/lang/summernote-ko-KR.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/lt-LT.js → node_modules/summernote/dist/lang/summernote-lt-LT.js} +52 -4
- data/node_modules/summernote/dist/lang/summernote-lt-LT.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/lt-LV.js → node_modules/summernote/dist/lang/summernote-lt-LV.js} +27 -7
- data/node_modules/summernote/dist/lang/summernote-lt-LV.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/mn-MN.js → node_modules/summernote/dist/lang/summernote-mn-MN.js} +43 -4
- data/node_modules/summernote/dist/lang/summernote-mn-MN.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/nb-NO.js → node_modules/summernote/dist/lang/summernote-nb-NO.js} +53 -3
- data/node_modules/summernote/dist/lang/summernote-nb-NO.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/nl-NL.js → node_modules/summernote/dist/lang/summernote-nl-NL.js} +55 -4
- data/node_modules/summernote/dist/lang/summernote-nl-NL.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/pl-PL.js → node_modules/summernote/dist/lang/summernote-pl-PL.js} +46 -3
- data/node_modules/summernote/dist/lang/summernote-pl-PL.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/pt-BR.js → node_modules/summernote/dist/lang/summernote-pt-BR.js} +25 -8
- data/node_modules/summernote/dist/lang/summernote-pt-BR.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/pt-PT.js → node_modules/summernote/dist/lang/summernote-pt-PT.js} +54 -3
- data/node_modules/summernote/dist/lang/summernote-pt-PT.min.js +3 -0
- data/node_modules/summernote/dist/lang/summernote-ro-RO.js +155 -0
- data/node_modules/summernote/dist/lang/summernote-ro-RO.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/ru-RU.js → node_modules/summernote/dist/lang/summernote-ru-RU.js} +46 -3
- data/node_modules/summernote/dist/lang/summernote-ru-RU.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/sk-SK.js → node_modules/summernote/dist/lang/summernote-sk-SK.js} +54 -3
- data/node_modules/summernote/dist/lang/summernote-sk-SK.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/sl-SI.js → node_modules/summernote/dist/lang/summernote-sl-SI.js} +53 -4
- data/node_modules/summernote/dist/lang/summernote-sl-SI.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/sr-RS-Latin.js → node_modules/summernote/dist/lang/summernote-sr-RS-Latin.js} +54 -3
- data/node_modules/summernote/dist/lang/summernote-sr-RS-Latin.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/sr-RS.js → node_modules/summernote/dist/lang/summernote-sr-RS.js} +54 -3
- data/node_modules/summernote/dist/lang/summernote-sr-RS.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/sv-SE.js → node_modules/summernote/dist/lang/summernote-sv-SE.js} +55 -4
- data/node_modules/summernote/dist/lang/summernote-sv-SE.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/ta-IN.js → node_modules/summernote/dist/lang/summernote-ta-IN.js} +46 -4
- data/node_modules/summernote/dist/lang/summernote-ta-IN.min.js +3 -0
- data/node_modules/summernote/dist/lang/summernote-th-TH.js +155 -0
- data/node_modules/summernote/dist/lang/summernote-th-TH.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/tr-TR.js → node_modules/summernote/dist/lang/summernote-tr-TR.js} +3 -2
- data/node_modules/summernote/dist/lang/summernote-tr-TR.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/uk-UA.js → node_modules/summernote/dist/lang/summernote-uk-UA.js} +48 -4
- data/node_modules/summernote/dist/lang/summernote-uk-UA.min.js +3 -0
- data/node_modules/summernote/dist/lang/summernote-uz-UZ.js +112 -0
- data/node_modules/summernote/dist/lang/summernote-uz-UZ.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/vi-VN.js → node_modules/summernote/dist/lang/summernote-vi-VN.js} +55 -4
- data/node_modules/summernote/dist/lang/summernote-vi-VN.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/zh-CN.js → node_modules/summernote/dist/lang/summernote-zh-CN.js} +20 -7
- data/node_modules/summernote/dist/lang/summernote-zh-CN.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/zh-TW.js → node_modules/summernote/dist/lang/summernote-zh-TW.js} +45 -3
- data/node_modules/summernote/dist/lang/summernote-zh-TW.min.js +3 -0
- data/node_modules/summernote/dist/summernote-0.8.10-dist.zip +0 -0
- data/node_modules/summernote/dist/summernote-bs4.css +1 -0
- data/node_modules/summernote/dist/summernote-bs4.js +7323 -0
- data/node_modules/summernote/dist/summernote-bs4.js.map +1 -0
- data/node_modules/summernote/dist/summernote-bs4.min.js +3 -0
- data/node_modules/summernote/dist/summernote-lite.css +1 -0
- data/node_modules/summernote/dist/summernote-lite.js +7837 -0
- data/node_modules/summernote/dist/summernote-lite.js.map +1 -0
- data/node_modules/summernote/dist/summernote.css +1 -0
- data/node_modules/summernote/dist/summernote.js +7315 -0
- data/node_modules/summernote/dist/summernote.js.map +1 -0
- data/node_modules/summernote/dist/summernote.min.js +3 -0
- data/node_modules/summernote/examples/airmode.html +35 -0
- data/node_modules/summernote/examples/bs3.html +60 -0
- data/node_modules/summernote/examples/bs4.html +57 -0
- data/node_modules/summernote/examples/codemirror.html +45 -0
- data/node_modules/summernote/examples/external-api.html +76 -0
- data/node_modules/summernote/examples/hint-emoji.html +61 -0
- data/node_modules/summernote/examples/hint-symbols_mathematical-symbols_Greek-letters.html +54 -0
- data/node_modules/summernote/examples/hint-userdefine.html +48 -0
- data/node_modules/summernote/examples/ie8.html +32 -0
- data/node_modules/summernote/examples/jquery-custom-event.html +119 -0
- data/node_modules/summernote/examples/jquery19lt.html +25 -0
- data/node_modules/summernote/examples/lang.html +33 -0
- data/node_modules/summernote/examples/link-blank.html +33 -0
- data/node_modules/summernote/examples/lite.html +24 -0
- data/node_modules/summernote/examples/nativestyle.html +32 -0
- data/node_modules/summernote/examples/ondialog-multitab.html +77 -0
- data/node_modules/summernote/examples/ondialog.html +58 -0
- data/node_modules/summernote/examples/plugin-hello.html +37 -0
- data/node_modules/summernote/examples/rtl.html +32 -0
- data/node_modules/summernote/examples/symbols_mathematical-symbols_Greek-letters.json +1118 -0
- data/node_modules/summernote/examples/textarea.html +46 -0
- data/node_modules/summernote/examples/toolbar-container.html +35 -0
- data/node_modules/summernote/examples/with-google-font.html +50 -0
- data/node_modules/summernote/index.html +33 -0
- data/node_modules/summernote/karma.conf.js +42 -0
- data/node_modules/summernote/lang/summernote-ar-AR.js +155 -0
- data/node_modules/summernote/lang/summernote-bg-BG.js +155 -0
- data/node_modules/summernote/lang/summernote-ca-ES.js +155 -0
- data/node_modules/summernote/lang/summernote-cs-CZ.js +149 -0
- data/node_modules/summernote/lang/summernote-da-DK.js +155 -0
- data/node_modules/summernote/lang/summernote-de-DE.js +154 -0
- data/node_modules/summernote/lang/summernote-el-GR.js +155 -0
- data/node_modules/summernote/lang/summernote-es-ES.js +155 -0
- data/node_modules/summernote/lang/summernote-es-EU.js +154 -0
- data/node_modules/summernote/lang/summernote-fa-IR.js +155 -0
- data/node_modules/summernote/lang/summernote-fi-FI.js +153 -0
- data/node_modules/summernote/lang/summernote-fr-FR.js +155 -0
- data/node_modules/summernote/lang/summernote-gl-ES.js +155 -0
- data/node_modules/summernote/lang/summernote-he-IL.js +155 -0
- data/node_modules/summernote/lang/summernote-hr-HR.js +155 -0
- data/node_modules/summernote/lang/summernote-hu-HU.js +155 -0
- data/node_modules/summernote/lang/summernote-id-ID.js +155 -0
- data/node_modules/summernote/lang/summernote-it-IT.js +155 -0
- data/node_modules/summernote/lang/summernote-ja-JP.js +155 -0
- data/node_modules/summernote/lang/summernote-ko-KR.js +155 -0
- data/node_modules/summernote/lang/summernote-lt-LT.js +155 -0
- data/node_modules/summernote/lang/summernote-lt-LV.js +155 -0
- data/node_modules/summernote/lang/summernote-mn-MN.js +157 -0
- data/node_modules/summernote/lang/summernote-nb-NO.js +154 -0
- data/node_modules/summernote/lang/summernote-nl-NL.js +155 -0
- data/node_modules/summernote/lang/summernote-pl-PL.js +155 -0
- data/node_modules/summernote/lang/summernote-pt-BR.js +155 -0
- data/node_modules/summernote/lang/summernote-pt-PT.js +154 -0
- data/node_modules/summernote/lang/summernote-ro-RO.js +155 -0
- data/node_modules/summernote/lang/summernote-ru-RU.js +155 -0
- data/node_modules/summernote/lang/summernote-sk-SK.js +153 -0
- data/node_modules/summernote/lang/summernote-sl-SI.js +155 -0
- data/node_modules/summernote/lang/summernote-sr-RS-Latin.js +155 -0
- data/node_modules/summernote/lang/summernote-sr-RS.js +155 -0
- data/node_modules/summernote/lang/summernote-sv-SE.js +155 -0
- data/node_modules/summernote/lang/summernote-ta-IN.js +155 -0
- data/node_modules/summernote/lang/summernote-th-TH.js +155 -0
- data/node_modules/summernote/lang/summernote-tr-TR.js +155 -0
- data/node_modules/summernote/lang/summernote-uk-UA.js +155 -0
- data/node_modules/summernote/lang/summernote-uz-UZ.js +112 -0
- data/node_modules/summernote/lang/summernote-vi-VN.js +155 -0
- data/node_modules/summernote/lang/summernote-zh-CN.js +155 -0
- data/node_modules/summernote/lang/summernote-zh-TW.js +155 -0
- data/node_modules/summernote/package.json +87 -0
- data/{vendor/assets/javascripts → node_modules}/summernote/plugin/databasic/summernote-ext-databasic.css +0 -0
- data/{vendor/assets/javascripts → node_modules}/summernote/plugin/databasic/summernote-ext-databasic.js +62 -73
- data/{vendor/assets/javascripts → node_modules}/summernote/plugin/hello/summernote-ext-hello.js +9 -10
- data/{vendor/assets/javascripts → node_modules}/summernote/plugin/specialchars/summernote-ext-specialchars.js +22 -25
- data/node_modules/summernote/src/icons/align-center.svg +11 -0
- data/node_modules/summernote/src/icons/align-indent.svg +11 -0
- data/node_modules/summernote/src/icons/align-justify.svg +11 -0
- data/node_modules/summernote/src/icons/align-left.svg +12 -0
- data/node_modules/summernote/src/icons/align-outdent.svg +11 -0
- data/node_modules/summernote/src/icons/align-right.svg +11 -0
- data/node_modules/summernote/src/icons/align.svg +8 -0
- data/node_modules/summernote/src/icons/arrow-circle-down.svg +1 -0
- data/node_modules/summernote/src/icons/arrow-circle-left.svg +1 -0
- data/node_modules/summernote/src/icons/arrow-circle-right.svg +1 -0
- data/node_modules/summernote/src/icons/arrow-circle-up.svg +1 -0
- data/node_modules/summernote/src/icons/arrows-alt.svg +11 -0
- data/node_modules/summernote/src/icons/arrows-h.svg +1 -0
- data/node_modules/summernote/src/icons/arrows-v.svg +1 -0
- data/node_modules/summernote/src/icons/bold.svg +11 -0
- data/node_modules/summernote/src/icons/caret.svg +9 -0
- data/node_modules/summernote/src/icons/chain-broken.svg +47 -0
- data/node_modules/summernote/src/icons/circle.svg +10 -0
- data/node_modules/summernote/src/icons/close.svg +16 -0
- data/node_modules/summernote/src/icons/code.svg +11 -0
- data/node_modules/summernote/src/icons/col-after.svg +96 -0
- data/node_modules/summernote/src/icons/col-before.svg +19 -0
- data/node_modules/summernote/src/icons/col-remove.svg +19 -0
- data/node_modules/summernote/src/icons/dist/font/summernote.eot +0 -0
- data/node_modules/summernote/src/icons/dist/font/summernote.ttf +0 -0
- data/node_modules/summernote/src/icons/dist/font/summernote.woff +0 -0
- data/node_modules/summernote/src/icons/dist/summernote.html +536 -0
- data/node_modules/summernote/src/icons/dist/summernote.less +511 -0
- data/node_modules/summernote/src/icons/eraser.svg +13 -0
- data/node_modules/summernote/src/icons/font.svg +11 -0
- data/node_modules/summernote/src/icons/frame.svg +10 -0
- data/node_modules/summernote/src/icons/italic.svg +11 -0
- data/node_modules/summernote/src/icons/link.svg +21 -0
- data/node_modules/summernote/src/icons/magic.svg +10 -0
- data/node_modules/summernote/src/icons/menu-check.svg +8 -0
- data/node_modules/summernote/src/icons/minus.svg +11 -0
- data/node_modules/summernote/src/icons/orderedlist.svg +12 -0
- data/node_modules/summernote/src/icons/pencil.svg +8 -0
- data/node_modules/summernote/src/icons/picture.svg +11 -0
- data/node_modules/summernote/src/icons/question.svg +10 -0
- data/node_modules/summernote/src/icons/redo.svg +10 -0
- data/node_modules/summernote/src/icons/row-above.svg +19 -0
- data/node_modules/summernote/src/icons/row-below.svg +19 -0
- data/node_modules/summernote/src/icons/row-remove.svg +19 -0
- data/node_modules/summernote/src/icons/special-character.svg +10 -0
- data/node_modules/summernote/src/icons/square.svg +10 -0
- data/node_modules/summernote/src/icons/strikethrough.svg +11 -0
- data/node_modules/summernote/src/icons/subscript.svg +11 -0
- data/node_modules/summernote/src/icons/summernote.svg +11 -0
- data/node_modules/summernote/src/icons/superscript.svg +11 -0
- data/node_modules/summernote/src/icons/table.svg +11 -0
- data/node_modules/summernote/src/icons/templates/summernote.css +110 -0
- data/node_modules/summernote/src/icons/templates/summernote.json +5 -0
- data/node_modules/summernote/src/icons/text-height.svg +11 -0
- data/node_modules/summernote/src/icons/trash.svg +17 -0
- data/node_modules/summernote/src/icons/underline.svg +11 -0
- data/node_modules/summernote/src/icons/undo.svg +10 -0
- data/node_modules/summernote/src/icons/unorderedlist.svg +9 -0
- data/node_modules/summernote/src/icons/video.svg +9 -0
- data/node_modules/summernote/src/js/base/Context.js +231 -0
- data/node_modules/summernote/src/js/base/core/async.js +47 -0
- data/node_modules/summernote/src/js/base/core/dom.js +1088 -0
- data/node_modules/summernote/src/js/base/core/env.js +107 -0
- data/node_modules/summernote/src/js/base/core/func.js +162 -0
- data/node_modules/summernote/src/js/base/core/key.js +92 -0
- data/node_modules/summernote/src/js/base/core/lists.js +210 -0
- data/node_modules/summernote/src/js/base/core/range.js +792 -0
- data/node_modules/summernote/src/js/base/editing/Bullet.js +201 -0
- data/node_modules/summernote/src/js/base/editing/History.js +105 -0
- data/node_modules/summernote/src/js/base/editing/Style.js +158 -0
- data/node_modules/summernote/src/js/base/editing/Table.js +574 -0
- data/node_modules/summernote/src/js/base/editing/Typing.js +90 -0
- data/node_modules/summernote/src/js/base/module/AirPopover.js +73 -0
- data/node_modules/summernote/src/js/base/module/AutoLink.js +61 -0
- data/node_modules/summernote/src/js/base/module/AutoSync.js +19 -0
- data/node_modules/summernote/src/js/base/module/Buttons.js +813 -0
- data/node_modules/summernote/src/js/base/module/Clipboard.js +28 -0
- data/node_modules/summernote/src/js/base/module/Codeview.js +123 -0
- data/node_modules/summernote/src/js/base/module/Dropzone.js +115 -0
- data/node_modules/summernote/src/js/base/module/Editor.js +861 -0
- data/node_modules/summernote/src/js/base/module/Fullscreen.js +51 -0
- data/node_modules/summernote/src/js/base/module/Handle.js +143 -0
- data/node_modules/summernote/src/js/base/module/HelpDialog.js +79 -0
- data/node_modules/summernote/src/js/base/module/HintPopover.js +226 -0
- data/node_modules/summernote/src/js/base/module/ImageDialog.js +131 -0
- data/node_modules/summernote/src/js/base/module/ImagePopover.js +58 -0
- data/node_modules/summernote/src/js/base/module/LinkDialog.js +174 -0
- data/node_modules/summernote/src/js/base/module/LinkPopover.js +69 -0
- data/node_modules/summernote/src/js/base/module/Placeholder.js +39 -0
- data/node_modules/summernote/src/js/base/module/Statusbar.js +42 -0
- data/node_modules/summernote/src/js/base/module/TablePopover.js +71 -0
- data/node_modules/summernote/src/js/base/module/Toolbar.js +136 -0
- data/node_modules/summernote/src/js/base/module/VideoDialog.js +205 -0
- data/node_modules/summernote/src/js/base/renderer.js +66 -0
- data/node_modules/summernote/src/js/base/summernote-en-US.js +159 -0
- data/node_modules/summernote/src/js/bs3/settings.js +297 -0
- data/node_modules/summernote/src/js/bs3/ui.js +237 -0
- data/node_modules/summernote/src/js/bs4/settings.js +301 -0
- data/node_modules/summernote/src/js/bs4/ui.js +242 -0
- data/node_modules/summernote/src/js/lite/settings.js +296 -0
- data/node_modules/summernote/src/js/lite/ui.js +618 -0
- data/node_modules/summernote/src/js/lite/ui/DropdownUI.js +65 -0
- data/node_modules/summernote/src/js/lite/ui/ModalUI.js +34 -0
- data/node_modules/summernote/src/js/lite/ui/PopoverUI.js +94 -0
- data/node_modules/summernote/src/js/lite/ui/TooltipUI.js +93 -0
- data/node_modules/summernote/src/js/summernote.js +46 -0
- data/node_modules/summernote/src/less/elements.less +149 -0
- data/node_modules/summernote/src/less/elements.scss +149 -0
- data/node_modules/summernote/src/less/lite-ui/all.less +15 -0
- data/node_modules/summernote/src/less/lite-ui/btn-group.less +51 -0
- data/node_modules/summernote/src/less/lite-ui/buttons.less +102 -0
- data/node_modules/summernote/src/less/lite-ui/common.less +20 -0
- data/node_modules/summernote/src/less/lite-ui/dropdown.less +39 -0
- data/node_modules/summernote/src/less/lite-ui/form.less +43 -0
- data/node_modules/summernote/src/less/lite-ui/mixins.less +1 -0
- data/node_modules/summernote/src/less/lite-ui/mixins/buttons.less +40 -0
- data/node_modules/summernote/src/less/lite-ui/modal.less +104 -0
- data/node_modules/summernote/src/less/lite-ui/popover.less +121 -0
- data/node_modules/summernote/src/less/lite-ui/toolbar.less +4 -0
- data/node_modules/summernote/src/less/lite-ui/tooltip.less +66 -0
- data/node_modules/summernote/src/less/lite-ui/variables.less +81 -0
- data/node_modules/summernote/src/less/summernote-bs4.less +577 -0
- data/node_modules/summernote/src/less/summernote-bs4.scss +560 -0
- data/node_modules/summernote/src/less/summernote-lite.less +601 -0
- data/node_modules/summernote/src/less/summernote.less +576 -0
- data/node_modules/summernote/src/less/summernote.scss +560 -0
- data/node_modules/summernote/tsconfig.json +12 -0
- metadata +459 -69
- data/vendor/assets/fonts/summernote.eot +0 -0
- data/vendor/assets/fonts/summernote.ttf +0 -0
- data/vendor/assets/fonts/summernote.woff +0 -0
- data/vendor/assets/javascripts/summernote/index.js +0 -1
- data/vendor/assets/javascripts/summernote/locales/index.js +0 -1
- data/vendor/assets/javascripts/summernote/locales/ro-RO.js +0 -102
- data/vendor/assets/javascripts/summernote/locales/th-TH.js +0 -106
- data/vendor/assets/javascripts/summernote/summernote-bs4.js +0 -7990
- data/vendor/assets/javascripts/summernote/summernote-lite.js +0 -8598
- data/vendor/assets/javascripts/summernote/summernote.js +0 -7987
- data/vendor/assets/stylesheets/summernote-bs4.css +0 -1
- data/vendor/assets/stylesheets/summernote-lite.css +0 -1
- data/vendor/assets/stylesheets/summernote.scss +0 -1
@@ -0,0 +1,26 @@
|
|
1
|
+
{
|
2
|
+
"name": "angular-ui-sortable",
|
3
|
+
"description": "This directive allows you to jQueryUI Sortable.",
|
4
|
+
"author": "https://github.com/angular-ui/ui-sortable/graphs/contributors",
|
5
|
+
"license": "MIT",
|
6
|
+
"homepage": "http://angular-ui.github.com",
|
7
|
+
"main": "./src/sortable.js",
|
8
|
+
"ignore": [
|
9
|
+
"**/.*",
|
10
|
+
"node_modules",
|
11
|
+
"bower_components",
|
12
|
+
"test*",
|
13
|
+
"demo*",
|
14
|
+
"gruntFile.js",
|
15
|
+
"package.json"
|
16
|
+
],
|
17
|
+
"dependencies": {
|
18
|
+
"angular": ">=1.2.x",
|
19
|
+
"jquery": ">=3.1.x",
|
20
|
+
"jquery-ui": ">=1.12.x"
|
21
|
+
},
|
22
|
+
"devDependencies": {
|
23
|
+
"angular-mocks": ">=1.2.x",
|
24
|
+
"jquery-simulate": "latest"
|
25
|
+
}
|
26
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
.section {
|
2
|
+
margin-top: 30px;
|
3
|
+
margin-bottom: 30px;
|
4
|
+
}
|
5
|
+
|
6
|
+
.list {
|
7
|
+
border: 1px solid #000;
|
8
|
+
border-radius: 15px;
|
9
|
+
list-style: none outside none;
|
10
|
+
margin: 10px;
|
11
|
+
padding: 10px;
|
12
|
+
}
|
13
|
+
|
14
|
+
.item {
|
15
|
+
padding: 5px 10px;
|
16
|
+
margin: 5px 0;
|
17
|
+
border: 2px solid #444;
|
18
|
+
border-radius: 5px;
|
19
|
+
background-color: #EA8A8A;
|
20
|
+
|
21
|
+
font-size: 1.1em;
|
22
|
+
font-weight: bold;
|
23
|
+
text-align: center;
|
24
|
+
cursor: move;
|
25
|
+
}
|
26
|
+
|
27
|
+
|
28
|
+
/*** Extra ***/
|
29
|
+
|
30
|
+
.logList {
|
31
|
+
min-height: 200px;
|
32
|
+
border: 5px solid #000;
|
33
|
+
border-radius: 15px;
|
34
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<section ng-app="sortableApp">
|
2
|
+
<h1>Sortable items</h1>
|
3
|
+
<div ng-controller="sortableController" class="section row">
|
4
|
+
<div class="col-sm-offset-2 col-sm-4">
|
5
|
+
<ul ui-sortable="sortableOptions" ng-model="list" class="list">
|
6
|
+
<li ng-repeat="item in list" class="item">{{item.text}}</li>
|
7
|
+
</ul>
|
8
|
+
</div>
|
9
|
+
<div class="col-sm-4">
|
10
|
+
<ul class="list logList">
|
11
|
+
<li ng-repeat="entry in sortingLog" class="logItem">{{entry.Text}}</li>
|
12
|
+
</ul>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
<h1>Connected items</h1>
|
17
|
+
<div ng-controller="connectedController" class="section row connectedItemsExample">
|
18
|
+
<div class="col-sm-offset-2 col-sm-4">
|
19
|
+
<ul ui-sortable="sortableOptions" ng-model="leftArray" class="list">
|
20
|
+
<li ng-repeat="item in leftArray" class="item">{{item.text}}</li>
|
21
|
+
</ul>
|
22
|
+
</div>
|
23
|
+
<div class="col-sm-4">
|
24
|
+
<ul ui-sortable="sortableOptions" ng-model="rightArray" class="list">
|
25
|
+
<li ng-repeat="item in rightArray" class="item">{{item.text}}</li>
|
26
|
+
</ul>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
</section>
|
@@ -0,0 +1,41 @@
|
|
1
|
+
|
2
|
+
var myapp = angular.module('sortableApp', ['ui.sortable']);
|
3
|
+
|
4
|
+
myapp.buildArray = function(name, size) {
|
5
|
+
var i, array = [];
|
6
|
+
for (i = 1; i <= size; i++){
|
7
|
+
array.push({
|
8
|
+
text: name + ' ' + i ,
|
9
|
+
value: i
|
10
|
+
});
|
11
|
+
}
|
12
|
+
|
13
|
+
return array;
|
14
|
+
};
|
15
|
+
|
16
|
+
myapp.controller('sortableController', function ($scope) {
|
17
|
+
'use strict';
|
18
|
+
|
19
|
+
$scope.list = myapp.buildArray('Item', 5);
|
20
|
+
|
21
|
+
$scope.sortingLog = [];
|
22
|
+
|
23
|
+
$scope.sortableOptions = {
|
24
|
+
// called after a node is dropped
|
25
|
+
stop: function(e, ui) {
|
26
|
+
var logEntry = {
|
27
|
+
ID: $scope.sortingLog.length + 1,
|
28
|
+
Text: 'Moved element: ' + ui.item.scope().item.text
|
29
|
+
};
|
30
|
+
$scope.sortingLog.push(logEntry);
|
31
|
+
}
|
32
|
+
};
|
33
|
+
});
|
34
|
+
|
35
|
+
myapp.controller('connectedController', function ($scope) {
|
36
|
+
$scope.leftArray = myapp.buildArray('Left', 5);
|
37
|
+
$scope.rightArray = myapp.buildArray('Right', 7);
|
38
|
+
$scope.sortableOptions = {
|
39
|
+
connectWith: '.connectedItemsExample .list'
|
40
|
+
};
|
41
|
+
});
|
@@ -0,0 +1,593 @@
|
|
1
|
+
/**
|
2
|
+
* angular-ui-sortable - This directive allows you to jQueryUI Sortable.
|
3
|
+
* @version v0.17.2 - 2017-11-25
|
4
|
+
* @link http://angular-ui.github.com
|
5
|
+
* @license MIT
|
6
|
+
*/
|
7
|
+
|
8
|
+
(function(window, angular, undefined) {
|
9
|
+
'use strict';
|
10
|
+
/*
|
11
|
+
jQuery UI Sortable plugin wrapper
|
12
|
+
|
13
|
+
@param [ui-sortable] {object} Options to pass to $.fn.sortable() merged onto ui.config
|
14
|
+
*/
|
15
|
+
angular.module('ui.sortable', [])
|
16
|
+
.value('uiSortableConfig',{
|
17
|
+
// the default for jquery-ui sortable is "> *", we need to restrict this to
|
18
|
+
// ng-repeat items
|
19
|
+
// if the user uses
|
20
|
+
items: '> [ng-repeat],> [data-ng-repeat],> [x-ng-repeat]'
|
21
|
+
})
|
22
|
+
.directive('uiSortable', [
|
23
|
+
'uiSortableConfig', '$timeout', '$log',
|
24
|
+
function(uiSortableConfig, $timeout, $log) {
|
25
|
+
return {
|
26
|
+
require:'?ngModel',
|
27
|
+
scope: {
|
28
|
+
ngModel:'=',
|
29
|
+
uiSortable:'=',
|
30
|
+
////Expression bindings from html.
|
31
|
+
create:'&uiSortableCreate',
|
32
|
+
// helper:'&uiSortableHelper',
|
33
|
+
start:'&uiSortableStart',
|
34
|
+
activate:'&uiSortableActivate',
|
35
|
+
// sort:'&uiSortableSort',
|
36
|
+
// change:'&uiSortableChange',
|
37
|
+
// over:'&uiSortableOver',
|
38
|
+
// out:'&uiSortableOut',
|
39
|
+
beforeStop:'&uiSortableBeforeStop',
|
40
|
+
update:'&uiSortableUpdate',
|
41
|
+
remove:'&uiSortableRemove',
|
42
|
+
receive:'&uiSortableReceive',
|
43
|
+
deactivate:'&uiSortableDeactivate',
|
44
|
+
stop:'&uiSortableStop'
|
45
|
+
},
|
46
|
+
link: function(scope, element, attrs, ngModel) {
|
47
|
+
var savedNodes;
|
48
|
+
var helper;
|
49
|
+
|
50
|
+
function combineCallbacks(first, second){
|
51
|
+
var firstIsFunc = typeof first === 'function';
|
52
|
+
var secondIsFunc = typeof second === 'function';
|
53
|
+
if(firstIsFunc && secondIsFunc) {
|
54
|
+
return function() {
|
55
|
+
first.apply(this, arguments);
|
56
|
+
second.apply(this, arguments);
|
57
|
+
};
|
58
|
+
} else if (secondIsFunc) {
|
59
|
+
return second;
|
60
|
+
}
|
61
|
+
return first;
|
62
|
+
}
|
63
|
+
|
64
|
+
function getSortableWidgetInstance(element) {
|
65
|
+
// this is a fix to support jquery-ui prior to v1.11.x
|
66
|
+
// otherwise we should be using `element.sortable('instance')`
|
67
|
+
var data = element.data('ui-sortable');
|
68
|
+
if (data && typeof data === 'object' && data.widgetFullName === 'ui-sortable') {
|
69
|
+
return data;
|
70
|
+
}
|
71
|
+
return null;
|
72
|
+
}
|
73
|
+
|
74
|
+
function patchSortableOption(key, value) {
|
75
|
+
if (callbacks[key]) {
|
76
|
+
if( key === 'stop' ){
|
77
|
+
// call apply after stop
|
78
|
+
value = combineCallbacks(
|
79
|
+
value, function() { scope.$apply(); });
|
80
|
+
|
81
|
+
value = combineCallbacks(value, afterStop);
|
82
|
+
}
|
83
|
+
// wrap the callback
|
84
|
+
value = combineCallbacks(callbacks[key], value);
|
85
|
+
} else if (wrappers[key]) {
|
86
|
+
value = wrappers[key](value);
|
87
|
+
}
|
88
|
+
|
89
|
+
// patch the options that need to have values set
|
90
|
+
if (!value && (key === 'items' || key === 'ui-model-items')) {
|
91
|
+
value = uiSortableConfig.items;
|
92
|
+
}
|
93
|
+
|
94
|
+
return value;
|
95
|
+
}
|
96
|
+
|
97
|
+
function patchUISortableOptions(newOpts, oldOpts, sortableWidgetInstance) {
|
98
|
+
|
99
|
+
function addDummyOptionKey(value, key) {
|
100
|
+
if (!(key in opts)) {
|
101
|
+
// add the key in the opts object so that
|
102
|
+
// the patch function detects and handles it
|
103
|
+
opts[key] = null;
|
104
|
+
}
|
105
|
+
}
|
106
|
+
// for this directive to work we have to attach some callbacks
|
107
|
+
angular.forEach(callbacks, addDummyOptionKey);
|
108
|
+
|
109
|
+
// only initialize it in case we have to
|
110
|
+
// update some options of the sortable
|
111
|
+
var optsDiff = null;
|
112
|
+
|
113
|
+
if (oldOpts) {
|
114
|
+
// reset deleted options to default
|
115
|
+
var defaultOptions;
|
116
|
+
angular.forEach(oldOpts, function(oldValue, key) {
|
117
|
+
if (!newOpts || !(key in newOpts)) {
|
118
|
+
if (key in directiveOpts) {
|
119
|
+
if (key === 'ui-floating') {
|
120
|
+
opts[key] = 'auto';
|
121
|
+
} else {
|
122
|
+
opts[key] = patchSortableOption(key, undefined);
|
123
|
+
}
|
124
|
+
return;
|
125
|
+
}
|
126
|
+
|
127
|
+
if (!defaultOptions) {
|
128
|
+
defaultOptions = angular.element.ui.sortable().options;
|
129
|
+
}
|
130
|
+
var defaultValue = defaultOptions[key];
|
131
|
+
defaultValue = patchSortableOption(key, defaultValue);
|
132
|
+
|
133
|
+
if (!optsDiff) {
|
134
|
+
optsDiff = {};
|
135
|
+
}
|
136
|
+
optsDiff[key] = defaultValue;
|
137
|
+
opts[key] = defaultValue;
|
138
|
+
}
|
139
|
+
});
|
140
|
+
}
|
141
|
+
|
142
|
+
newOpts = angular.extend({}, newOpts);
|
143
|
+
// update changed options
|
144
|
+
// handle the custom option of the directive first
|
145
|
+
angular.forEach(newOpts, function(value, key) {
|
146
|
+
if (key in directiveOpts) {
|
147
|
+
if (key === 'ui-floating' && (value === false || value === true) && sortableWidgetInstance) {
|
148
|
+
sortableWidgetInstance.floating = value;
|
149
|
+
}
|
150
|
+
|
151
|
+
if (key === 'ui-preserve-size' && (value === false || value === true)) {
|
152
|
+
var userProvidedHelper = opts.helper;
|
153
|
+
newOpts.helper = function(e, item) {
|
154
|
+
if (opts['ui-preserve-size'] === true) {
|
155
|
+
item.children().each(function () {
|
156
|
+
var $el = angular.element(this);
|
157
|
+
|
158
|
+
// Preserve the with of the element
|
159
|
+
$el.width($el.width());
|
160
|
+
});
|
161
|
+
}
|
162
|
+
return (userProvidedHelper || function(e, item) {
|
163
|
+
return item;
|
164
|
+
}).apply(this, arguments);
|
165
|
+
};
|
166
|
+
}
|
167
|
+
|
168
|
+
opts[key] = patchSortableOption(key, value);
|
169
|
+
}
|
170
|
+
});
|
171
|
+
|
172
|
+
// handle the normal option of the directive
|
173
|
+
angular.forEach(newOpts, function(value, key) {
|
174
|
+
if (key in directiveOpts) {
|
175
|
+
// the custom option of the directive are already handled
|
176
|
+
return;
|
177
|
+
}
|
178
|
+
|
179
|
+
value = patchSortableOption(key, value);
|
180
|
+
|
181
|
+
if (!optsDiff) {
|
182
|
+
optsDiff = {};
|
183
|
+
}
|
184
|
+
optsDiff[key] = value;
|
185
|
+
opts[key] = value;
|
186
|
+
});
|
187
|
+
|
188
|
+
return optsDiff;
|
189
|
+
}
|
190
|
+
|
191
|
+
function getPlaceholderElement (element) {
|
192
|
+
var placeholder = element.sortable('option','placeholder');
|
193
|
+
|
194
|
+
// placeholder.element will be a function if the placeholder, has
|
195
|
+
// been created (placeholder will be an object). If it hasn't
|
196
|
+
// been created, either placeholder will be false if no
|
197
|
+
// placeholder class was given or placeholder.element will be
|
198
|
+
// undefined if a class was given (placeholder will be a string)
|
199
|
+
if (placeholder && placeholder.element && typeof placeholder.element === 'function') {
|
200
|
+
var result = placeholder.element();
|
201
|
+
// workaround for jquery ui 1.9.x,
|
202
|
+
// not returning jquery collection
|
203
|
+
result = angular.element(result);
|
204
|
+
return result;
|
205
|
+
}
|
206
|
+
return null;
|
207
|
+
}
|
208
|
+
|
209
|
+
function getPlaceholderExcludesludes (element, placeholder) {
|
210
|
+
// exact match with the placeholder's class attribute to handle
|
211
|
+
// the case that multiple connected sortables exist and
|
212
|
+
// the placeholder option equals the class of sortable items
|
213
|
+
var notCssSelector = opts['ui-model-items'].replace(/[^,]*>/g, '');
|
214
|
+
var excludes = element.find('[class="' + placeholder.attr('class') + '"]:not(' + notCssSelector + ')');
|
215
|
+
return excludes;
|
216
|
+
}
|
217
|
+
|
218
|
+
function hasSortingHelper (element, ui) {
|
219
|
+
var helperOption = element.sortable('option','helper');
|
220
|
+
return helperOption === 'clone' || (typeof helperOption === 'function' && ui.item.sortable.isCustomHelperUsed());
|
221
|
+
}
|
222
|
+
|
223
|
+
function getSortingHelper (element, ui/*, savedNodes*/) {
|
224
|
+
var result = null;
|
225
|
+
if (hasSortingHelper(element, ui) &&
|
226
|
+
element.sortable( 'option', 'appendTo' ) === 'parent') {
|
227
|
+
// The .ui-sortable-helper element (that's the default class name)
|
228
|
+
result = helper;
|
229
|
+
}
|
230
|
+
return result;
|
231
|
+
}
|
232
|
+
|
233
|
+
// thanks jquery-ui
|
234
|
+
function isFloating (item) {
|
235
|
+
return (/left|right/).test(item.css('float')) || (/inline|table-cell/).test(item.css('display'));
|
236
|
+
}
|
237
|
+
|
238
|
+
function getElementContext(elementScopes, element) {
|
239
|
+
for (var i = 0; i < elementScopes.length; i++) {
|
240
|
+
var c = elementScopes[i];
|
241
|
+
if (c.element[0] === element[0]) {
|
242
|
+
return c;
|
243
|
+
}
|
244
|
+
}
|
245
|
+
}
|
246
|
+
|
247
|
+
function afterStop(e, ui) {
|
248
|
+
ui.item.sortable._destroy();
|
249
|
+
}
|
250
|
+
|
251
|
+
// return the index of ui.item among the items
|
252
|
+
// we can't just do ui.item.index() because there it might have siblings
|
253
|
+
// which are not items
|
254
|
+
function getItemIndex(item) {
|
255
|
+
return item.parent()
|
256
|
+
.find(opts['ui-model-items'])
|
257
|
+
.index(item);
|
258
|
+
}
|
259
|
+
|
260
|
+
var opts = {};
|
261
|
+
|
262
|
+
// directive specific options
|
263
|
+
var directiveOpts = {
|
264
|
+
'ui-floating': undefined,
|
265
|
+
'ui-model-items': uiSortableConfig.items,
|
266
|
+
'ui-preserve-size': undefined
|
267
|
+
};
|
268
|
+
|
269
|
+
var callbacks = {
|
270
|
+
create: null,
|
271
|
+
start: null,
|
272
|
+
activate: null,
|
273
|
+
// sort: null,
|
274
|
+
// change: null,
|
275
|
+
// over: null,
|
276
|
+
// out: null,
|
277
|
+
beforeStop: null,
|
278
|
+
update: null,
|
279
|
+
remove: null,
|
280
|
+
receive: null,
|
281
|
+
deactivate: null,
|
282
|
+
stop: null
|
283
|
+
};
|
284
|
+
|
285
|
+
var wrappers = {
|
286
|
+
helper: null
|
287
|
+
};
|
288
|
+
|
289
|
+
angular.extend(opts, directiveOpts, uiSortableConfig, scope.uiSortable);
|
290
|
+
|
291
|
+
if (!angular.element.fn || !angular.element.fn.jquery) {
|
292
|
+
$log.error('ui.sortable: jQuery should be included before AngularJS!');
|
293
|
+
return;
|
294
|
+
}
|
295
|
+
|
296
|
+
function wireUp () {
|
297
|
+
// When we add or remove elements, we need the sortable to 'refresh'
|
298
|
+
// so it can find the new/removed elements.
|
299
|
+
scope.$watchCollection('ngModel', function() {
|
300
|
+
// Timeout to let ng-repeat modify the DOM
|
301
|
+
$timeout(function() {
|
302
|
+
// ensure that the jquery-ui-sortable widget instance
|
303
|
+
// is still bound to the directive's element
|
304
|
+
if (!!getSortableWidgetInstance(element)) {
|
305
|
+
element.sortable('refresh');
|
306
|
+
}
|
307
|
+
}, 0, false);
|
308
|
+
});
|
309
|
+
|
310
|
+
callbacks.start = function(e, ui) {
|
311
|
+
if (opts['ui-floating'] === 'auto') {
|
312
|
+
// since the drag has started, the element will be
|
313
|
+
// absolutely positioned, so we check its siblings
|
314
|
+
var siblings = ui.item.siblings();
|
315
|
+
var sortableWidgetInstance = getSortableWidgetInstance(angular.element(e.target));
|
316
|
+
sortableWidgetInstance.floating = isFloating(siblings);
|
317
|
+
}
|
318
|
+
|
319
|
+
// Save the starting position of dragged item
|
320
|
+
var index = getItemIndex(ui.item);
|
321
|
+
ui.item.sortable = {
|
322
|
+
model: ngModel.$modelValue[index],
|
323
|
+
index: index,
|
324
|
+
source: element,
|
325
|
+
sourceList: ui.item.parent(),
|
326
|
+
sourceModel: ngModel.$modelValue,
|
327
|
+
cancel: function () {
|
328
|
+
ui.item.sortable._isCanceled = true;
|
329
|
+
},
|
330
|
+
isCanceled: function () {
|
331
|
+
return ui.item.sortable._isCanceled;
|
332
|
+
},
|
333
|
+
isCustomHelperUsed: function () {
|
334
|
+
return !!ui.item.sortable._isCustomHelperUsed;
|
335
|
+
},
|
336
|
+
_isCanceled: false,
|
337
|
+
_isCustomHelperUsed: ui.item.sortable._isCustomHelperUsed,
|
338
|
+
_destroy: function () {
|
339
|
+
angular.forEach(ui.item.sortable, function(value, key) {
|
340
|
+
ui.item.sortable[key] = undefined;
|
341
|
+
});
|
342
|
+
},
|
343
|
+
_connectedSortables: [],
|
344
|
+
_getElementContext: function (element) {
|
345
|
+
return getElementContext(this._connectedSortables, element);
|
346
|
+
}
|
347
|
+
};
|
348
|
+
};
|
349
|
+
|
350
|
+
callbacks.activate = function(e, ui) {
|
351
|
+
var isSourceContext = ui.item.sortable.source === element;
|
352
|
+
var savedNodesOrigin = isSourceContext ?
|
353
|
+
ui.item.sortable.sourceList :
|
354
|
+
element;
|
355
|
+
var elementContext = {
|
356
|
+
element: element,
|
357
|
+
scope: scope,
|
358
|
+
isSourceContext: isSourceContext,
|
359
|
+
savedNodesOrigin: savedNodesOrigin
|
360
|
+
};
|
361
|
+
// save the directive's scope so that it is accessible from ui.item.sortable
|
362
|
+
ui.item.sortable._connectedSortables.push(elementContext);
|
363
|
+
|
364
|
+
// We need to make a copy of the current element's contents so
|
365
|
+
// we can restore it after sortable has messed it up.
|
366
|
+
// This is inside activate (instead of start) in order to save
|
367
|
+
// both lists when dragging between connected lists.
|
368
|
+
savedNodes = savedNodesOrigin.contents();
|
369
|
+
helper = ui.helper;
|
370
|
+
|
371
|
+
// If this list has a placeholder (the connected lists won't),
|
372
|
+
// don't inlcude it in saved nodes.
|
373
|
+
var placeholder = getPlaceholderElement(element);
|
374
|
+
if (placeholder && placeholder.length) {
|
375
|
+
var excludes = getPlaceholderExcludesludes(element, placeholder);
|
376
|
+
savedNodes = savedNodes.not(excludes);
|
377
|
+
}
|
378
|
+
};
|
379
|
+
|
380
|
+
callbacks.update = function(e, ui) {
|
381
|
+
// Save current drop position but only if this is not a second
|
382
|
+
// update that happens when moving between lists because then
|
383
|
+
// the value will be overwritten with the old value
|
384
|
+
if (!ui.item.sortable.received) {
|
385
|
+
ui.item.sortable.dropindex = getItemIndex(ui.item);
|
386
|
+
var droptarget = ui.item.parent().closest('[ui-sortable], [data-ui-sortable], [x-ui-sortable]');
|
387
|
+
ui.item.sortable.droptarget = droptarget;
|
388
|
+
ui.item.sortable.droptargetList = ui.item.parent();
|
389
|
+
|
390
|
+
var droptargetContext = ui.item.sortable._getElementContext(droptarget);
|
391
|
+
ui.item.sortable.droptargetModel = droptargetContext.scope.ngModel;
|
392
|
+
|
393
|
+
// Cancel the sort (let ng-repeat do the sort for us)
|
394
|
+
// Don't cancel if this is the received list because it has
|
395
|
+
// already been canceled in the other list, and trying to cancel
|
396
|
+
// here will mess up the DOM.
|
397
|
+
element.sortable('cancel');
|
398
|
+
}
|
399
|
+
|
400
|
+
// Put the nodes back exactly the way they started (this is very
|
401
|
+
// important because ng-repeat uses comment elements to delineate
|
402
|
+
// the start and stop of repeat sections and sortable doesn't
|
403
|
+
// respect their order (even if we cancel, the order of the
|
404
|
+
// comments are still messed up).
|
405
|
+
var sortingHelper = !ui.item.sortable.received && getSortingHelper(element, ui, savedNodes);
|
406
|
+
if (sortingHelper && sortingHelper.length) {
|
407
|
+
// Restore all the savedNodes except from the sorting helper element.
|
408
|
+
// That way it will be garbage collected.
|
409
|
+
savedNodes = savedNodes.not(sortingHelper);
|
410
|
+
}
|
411
|
+
var elementContext = ui.item.sortable._getElementContext(element);
|
412
|
+
savedNodes.appendTo(elementContext.savedNodesOrigin);
|
413
|
+
|
414
|
+
// If this is the target connected list then
|
415
|
+
// it's safe to clear the restored nodes since:
|
416
|
+
// update is currently running and
|
417
|
+
// stop is not called for the target list.
|
418
|
+
if (ui.item.sortable.received) {
|
419
|
+
savedNodes = null;
|
420
|
+
}
|
421
|
+
|
422
|
+
// If received is true (an item was dropped in from another list)
|
423
|
+
// then we add the new item to this list otherwise wait until the
|
424
|
+
// stop event where we will know if it was a sort or item was
|
425
|
+
// moved here from another list
|
426
|
+
if (ui.item.sortable.received && !ui.item.sortable.isCanceled()) {
|
427
|
+
scope.$apply(function () {
|
428
|
+
ngModel.$modelValue.splice(ui.item.sortable.dropindex, 0,
|
429
|
+
ui.item.sortable.moved);
|
430
|
+
});
|
431
|
+
scope.$emit('ui-sortable:moved', ui);
|
432
|
+
}
|
433
|
+
};
|
434
|
+
|
435
|
+
callbacks.stop = function(e, ui) {
|
436
|
+
// If the received flag hasn't be set on the item, this is a
|
437
|
+
// normal sort, if dropindex is set, the item was moved, so move
|
438
|
+
// the items in the list.
|
439
|
+
var wasMoved = ('dropindex' in ui.item.sortable) &&
|
440
|
+
!ui.item.sortable.isCanceled();
|
441
|
+
|
442
|
+
if (wasMoved && !ui.item.sortable.received) {
|
443
|
+
|
444
|
+
scope.$apply(function () {
|
445
|
+
ngModel.$modelValue.splice(
|
446
|
+
ui.item.sortable.dropindex, 0,
|
447
|
+
ngModel.$modelValue.splice(ui.item.sortable.index, 1)[0]);
|
448
|
+
});
|
449
|
+
scope.$emit('ui-sortable:moved', ui);
|
450
|
+
} else if (!wasMoved &&
|
451
|
+
!angular.equals(element.contents().toArray(), savedNodes.toArray())) {
|
452
|
+
// if the item was not moved
|
453
|
+
// and the DOM element order has changed,
|
454
|
+
// then restore the elements
|
455
|
+
// so that the ngRepeat's comment are correct.
|
456
|
+
|
457
|
+
var sortingHelper = getSortingHelper(element, ui, savedNodes);
|
458
|
+
if (sortingHelper && sortingHelper.length) {
|
459
|
+
// Restore all the savedNodes except from the sorting helper element.
|
460
|
+
// That way it will be garbage collected.
|
461
|
+
savedNodes = savedNodes.not(sortingHelper);
|
462
|
+
}
|
463
|
+
var elementContext = ui.item.sortable._getElementContext(element);
|
464
|
+
savedNodes.appendTo(elementContext.savedNodesOrigin);
|
465
|
+
}
|
466
|
+
|
467
|
+
// It's now safe to clear the savedNodes and helper
|
468
|
+
// since stop is the last callback.
|
469
|
+
savedNodes = null;
|
470
|
+
helper = null;
|
471
|
+
};
|
472
|
+
|
473
|
+
callbacks.receive = function(e, ui) {
|
474
|
+
// An item was dropped here from another list, set a flag on the
|
475
|
+
// item.
|
476
|
+
ui.item.sortable.received = true;
|
477
|
+
};
|
478
|
+
|
479
|
+
callbacks.remove = function(e, ui) {
|
480
|
+
// Workaround for a problem observed in nested connected lists.
|
481
|
+
// There should be an 'update' event before 'remove' when moving
|
482
|
+
// elements. If the event did not fire, cancel sorting.
|
483
|
+
if (!('dropindex' in ui.item.sortable)) {
|
484
|
+
element.sortable('cancel');
|
485
|
+
ui.item.sortable.cancel();
|
486
|
+
}
|
487
|
+
|
488
|
+
// Remove the item from this list's model and copy data into item,
|
489
|
+
// so the next list can retrive it
|
490
|
+
if (!ui.item.sortable.isCanceled()) {
|
491
|
+
scope.$apply(function () {
|
492
|
+
ui.item.sortable.moved = ngModel.$modelValue.splice(
|
493
|
+
ui.item.sortable.index, 1)[0];
|
494
|
+
});
|
495
|
+
}
|
496
|
+
};
|
497
|
+
|
498
|
+
// setup attribute handlers
|
499
|
+
angular.forEach(callbacks, function(value, key) {
|
500
|
+
callbacks[key] = combineCallbacks(callbacks[key],
|
501
|
+
function () {
|
502
|
+
var attrHandler = scope[key];
|
503
|
+
var attrHandlerFn;
|
504
|
+
if (typeof attrHandler === 'function' &&
|
505
|
+
('uiSortable' + key.substring(0,1).toUpperCase() + key.substring(1)).length &&
|
506
|
+
typeof (attrHandlerFn = attrHandler()) === 'function') {
|
507
|
+
attrHandlerFn.apply(this, arguments);
|
508
|
+
}
|
509
|
+
});
|
510
|
+
});
|
511
|
+
|
512
|
+
|
513
|
+
wrappers.helper = function (inner) {
|
514
|
+
if (inner && typeof inner === 'function') {
|
515
|
+
return function (e, item) {
|
516
|
+
var oldItemSortable = item.sortable;
|
517
|
+
var index = getItemIndex(item);
|
518
|
+
item.sortable = {
|
519
|
+
model: ngModel.$modelValue[index],
|
520
|
+
index: index,
|
521
|
+
source: element,
|
522
|
+
sourceList: item.parent(),
|
523
|
+
sourceModel: ngModel.$modelValue,
|
524
|
+
_restore: function () {
|
525
|
+
angular.forEach(item.sortable, function(value, key) {
|
526
|
+
item.sortable[key] = undefined;
|
527
|
+
});
|
528
|
+
|
529
|
+
item.sortable = oldItemSortable;
|
530
|
+
}
|
531
|
+
};
|
532
|
+
|
533
|
+
var innerResult = inner.apply(this, arguments);
|
534
|
+
item.sortable._restore();
|
535
|
+
item.sortable._isCustomHelperUsed = item !== innerResult;
|
536
|
+
return innerResult;
|
537
|
+
};
|
538
|
+
}
|
539
|
+
return inner;
|
540
|
+
};
|
541
|
+
|
542
|
+
scope.$watchCollection('uiSortable', function(newOpts, oldOpts) {
|
543
|
+
// ensure that the jquery-ui-sortable widget instance
|
544
|
+
// is still bound to the directive's element
|
545
|
+
var sortableWidgetInstance = getSortableWidgetInstance(element);
|
546
|
+
if (!!sortableWidgetInstance) {
|
547
|
+
var optsDiff = patchUISortableOptions(newOpts, oldOpts, sortableWidgetInstance);
|
548
|
+
|
549
|
+
if (optsDiff) {
|
550
|
+
element.sortable('option', optsDiff);
|
551
|
+
}
|
552
|
+
}
|
553
|
+
}, true);
|
554
|
+
|
555
|
+
patchUISortableOptions(opts);
|
556
|
+
}
|
557
|
+
|
558
|
+
function init () {
|
559
|
+
if (ngModel) {
|
560
|
+
wireUp();
|
561
|
+
} else {
|
562
|
+
$log.info('ui.sortable: ngModel not provided!', element);
|
563
|
+
}
|
564
|
+
|
565
|
+
// Create sortable
|
566
|
+
element.sortable(opts);
|
567
|
+
}
|
568
|
+
|
569
|
+
function initIfEnabled () {
|
570
|
+
if (scope.uiSortable && scope.uiSortable.disabled) {
|
571
|
+
return false;
|
572
|
+
}
|
573
|
+
|
574
|
+
init();
|
575
|
+
|
576
|
+
// Stop Watcher
|
577
|
+
initIfEnabled.cancelWatcher();
|
578
|
+
initIfEnabled.cancelWatcher = angular.noop;
|
579
|
+
|
580
|
+
return true;
|
581
|
+
}
|
582
|
+
|
583
|
+
initIfEnabled.cancelWatcher = angular.noop;
|
584
|
+
|
585
|
+
if (!initIfEnabled()) {
|
586
|
+
initIfEnabled.cancelWatcher = scope.$watch('uiSortable.disabled', initIfEnabled);
|
587
|
+
}
|
588
|
+
}
|
589
|
+
};
|
590
|
+
}
|
591
|
+
]);
|
592
|
+
|
593
|
+
})(window, window.angular);
|