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,42 @@
|
|
1
|
+
import $ from 'jquery';
|
2
|
+
const EDITABLE_PADDING = 24;
|
3
|
+
|
4
|
+
export default class Statusbar {
|
5
|
+
constructor(context) {
|
6
|
+
this.$document = $(document);
|
7
|
+
this.$statusbar = context.layoutInfo.statusbar;
|
8
|
+
this.$editable = context.layoutInfo.editable;
|
9
|
+
this.options = context.options;
|
10
|
+
}
|
11
|
+
|
12
|
+
initialize() {
|
13
|
+
if (this.options.airMode || this.options.disableResizeEditor) {
|
14
|
+
this.destroy();
|
15
|
+
return;
|
16
|
+
}
|
17
|
+
|
18
|
+
this.$statusbar.on('mousedown', (event) => {
|
19
|
+
event.preventDefault();
|
20
|
+
event.stopPropagation();
|
21
|
+
|
22
|
+
const editableTop = this.$editable.offset().top - this.$document.scrollTop();
|
23
|
+
const onMouseMove = (event) => {
|
24
|
+
let height = event.clientY - (editableTop + EDITABLE_PADDING);
|
25
|
+
|
26
|
+
height = (this.options.minheight > 0) ? Math.max(height, this.options.minheight) : height;
|
27
|
+
height = (this.options.maxHeight > 0) ? Math.min(height, this.options.maxHeight) : height;
|
28
|
+
|
29
|
+
this.$editable.height(height);
|
30
|
+
};
|
31
|
+
|
32
|
+
this.$document.on('mousemove', onMouseMove).one('mouseup', () => {
|
33
|
+
this.$document.off('mousemove', onMouseMove);
|
34
|
+
});
|
35
|
+
});
|
36
|
+
}
|
37
|
+
|
38
|
+
destroy() {
|
39
|
+
this.$statusbar.off();
|
40
|
+
this.$statusbar.addClass('locked');
|
41
|
+
}
|
42
|
+
}
|
@@ -0,0 +1,71 @@
|
|
1
|
+
import $ from 'jquery';
|
2
|
+
import env from '../core/env';
|
3
|
+
import lists from '../core/lists';
|
4
|
+
import dom from '../core/dom';
|
5
|
+
|
6
|
+
export default class TablePopover {
|
7
|
+
constructor(context) {
|
8
|
+
this.context = context;
|
9
|
+
|
10
|
+
this.ui = $.summernote.ui;
|
11
|
+
this.options = context.options;
|
12
|
+
this.events = {
|
13
|
+
'summernote.mousedown': (we, e) => {
|
14
|
+
this.update(e.target);
|
15
|
+
},
|
16
|
+
'summernote.keyup summernote.scroll summernote.change': () => {
|
17
|
+
this.update();
|
18
|
+
},
|
19
|
+
'summernote.disable': () => {
|
20
|
+
this.hide();
|
21
|
+
}
|
22
|
+
};
|
23
|
+
}
|
24
|
+
|
25
|
+
shouldInitialize() {
|
26
|
+
return !lists.isEmpty(this.options.popover.table);
|
27
|
+
}
|
28
|
+
|
29
|
+
initialize() {
|
30
|
+
this.$popover = this.ui.popover({
|
31
|
+
className: 'note-table-popover'
|
32
|
+
}).render().appendTo(this.options.container);
|
33
|
+
const $content = this.$popover.find('.popover-content,.note-popover-content');
|
34
|
+
|
35
|
+
this.context.invoke('buttons.build', $content, this.options.popover.table);
|
36
|
+
|
37
|
+
// [workaround] Disable Firefox's default table editor
|
38
|
+
if (env.isFF) {
|
39
|
+
document.execCommand('enableInlineTableEditing', false, false);
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
destroy() {
|
44
|
+
this.$popover.remove();
|
45
|
+
}
|
46
|
+
|
47
|
+
update(target) {
|
48
|
+
if (this.context.isDisabled()) {
|
49
|
+
return false;
|
50
|
+
}
|
51
|
+
|
52
|
+
const isCell = dom.isCell(target);
|
53
|
+
|
54
|
+
if (isCell) {
|
55
|
+
const pos = dom.posFromPlaceholder(target);
|
56
|
+
this.$popover.css({
|
57
|
+
display: 'block',
|
58
|
+
left: pos.left,
|
59
|
+
top: pos.top
|
60
|
+
});
|
61
|
+
} else {
|
62
|
+
this.hide();
|
63
|
+
}
|
64
|
+
|
65
|
+
return isCell;
|
66
|
+
}
|
67
|
+
|
68
|
+
hide() {
|
69
|
+
this.$popover.hide();
|
70
|
+
}
|
71
|
+
}
|
@@ -0,0 +1,136 @@
|
|
1
|
+
import $ from 'jquery';
|
2
|
+
export default class Toolbar {
|
3
|
+
constructor(context) {
|
4
|
+
this.context = context;
|
5
|
+
|
6
|
+
this.$window = $(window);
|
7
|
+
this.$document = $(document);
|
8
|
+
|
9
|
+
this.ui = $.summernote.ui;
|
10
|
+
this.$note = context.layoutInfo.note;
|
11
|
+
this.$editor = context.layoutInfo.editor;
|
12
|
+
this.$toolbar = context.layoutInfo.toolbar;
|
13
|
+
this.options = context.options;
|
14
|
+
|
15
|
+
this.followScroll = this.followScroll.bind(this);
|
16
|
+
}
|
17
|
+
|
18
|
+
shouldInitialize() {
|
19
|
+
return !this.options.airMode;
|
20
|
+
}
|
21
|
+
|
22
|
+
initialize() {
|
23
|
+
this.options.toolbar = this.options.toolbar || [];
|
24
|
+
|
25
|
+
if (!this.options.toolbar.length) {
|
26
|
+
this.$toolbar.hide();
|
27
|
+
} else {
|
28
|
+
this.context.invoke('buttons.build', this.$toolbar, this.options.toolbar);
|
29
|
+
}
|
30
|
+
|
31
|
+
if (this.options.toolbarContainer) {
|
32
|
+
this.$toolbar.appendTo(this.options.toolbarContainer);
|
33
|
+
}
|
34
|
+
|
35
|
+
this.changeContainer(false);
|
36
|
+
|
37
|
+
this.$note.on('summernote.keyup summernote.mouseup summernote.change', () => {
|
38
|
+
this.context.invoke('buttons.updateCurrentStyle');
|
39
|
+
});
|
40
|
+
|
41
|
+
this.context.invoke('buttons.updateCurrentStyle');
|
42
|
+
if (this.options.followingToolbar) {
|
43
|
+
this.$window.on('scroll resize', this.followScroll);
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
destroy() {
|
48
|
+
this.$toolbar.children().remove();
|
49
|
+
|
50
|
+
if (this.options.followingToolbar) {
|
51
|
+
this.$window.off('scroll resize', this.followScroll);
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
followScroll() {
|
56
|
+
if (this.$editor.hasClass('fullscreen')) {
|
57
|
+
return false;
|
58
|
+
}
|
59
|
+
|
60
|
+
const $toolbarWrapper = this.$toolbar.parent('.note-toolbar-wrapper');
|
61
|
+
const editorHeight = this.$editor.outerHeight();
|
62
|
+
const editorWidth = this.$editor.width();
|
63
|
+
|
64
|
+
const toolbarHeight = this.$toolbar.height();
|
65
|
+
$toolbarWrapper.css({
|
66
|
+
height: toolbarHeight
|
67
|
+
});
|
68
|
+
|
69
|
+
// check if the web app is currently using another static bar
|
70
|
+
let otherBarHeight = 0;
|
71
|
+
if (this.options.otherStaticBar) {
|
72
|
+
otherBarHeight = $(this.options.otherStaticBar).outerHeight();
|
73
|
+
}
|
74
|
+
|
75
|
+
const currentOffset = this.$document.scrollTop();
|
76
|
+
const editorOffsetTop = this.$editor.offset().top;
|
77
|
+
const editorOffsetBottom = editorOffsetTop + editorHeight;
|
78
|
+
const activateOffset = editorOffsetTop - otherBarHeight;
|
79
|
+
const deactivateOffsetBottom = editorOffsetBottom - otherBarHeight - toolbarHeight;
|
80
|
+
|
81
|
+
if ((currentOffset > activateOffset) && (currentOffset < deactivateOffsetBottom)) {
|
82
|
+
this.$toolbar.css({
|
83
|
+
position: 'fixed',
|
84
|
+
top: otherBarHeight,
|
85
|
+
width: editorWidth
|
86
|
+
});
|
87
|
+
} else {
|
88
|
+
this.$toolbar.css({
|
89
|
+
position: 'relative',
|
90
|
+
top: 0,
|
91
|
+
width: '100%'
|
92
|
+
});
|
93
|
+
}
|
94
|
+
}
|
95
|
+
|
96
|
+
changeContainer(isFullscreen) {
|
97
|
+
if (isFullscreen) {
|
98
|
+
this.$toolbar.prependTo(this.$editor);
|
99
|
+
} else {
|
100
|
+
if (this.options.toolbarContainer) {
|
101
|
+
this.$toolbar.appendTo(this.options.toolbarContainer);
|
102
|
+
}
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
updateFullscreen(isFullscreen) {
|
107
|
+
this.ui.toggleBtnActive(this.$toolbar.find('.btn-fullscreen'), isFullscreen);
|
108
|
+
|
109
|
+
this.changeContainer(isFullscreen);
|
110
|
+
}
|
111
|
+
|
112
|
+
updateCodeview(isCodeview) {
|
113
|
+
this.ui.toggleBtnActive(this.$toolbar.find('.btn-codeview'), isCodeview);
|
114
|
+
if (isCodeview) {
|
115
|
+
this.deactivate();
|
116
|
+
} else {
|
117
|
+
this.activate();
|
118
|
+
}
|
119
|
+
}
|
120
|
+
|
121
|
+
activate(isIncludeCodeview) {
|
122
|
+
let $btn = this.$toolbar.find('button');
|
123
|
+
if (!isIncludeCodeview) {
|
124
|
+
$btn = $btn.not('.btn-codeview');
|
125
|
+
}
|
126
|
+
this.ui.toggleBtn($btn, true);
|
127
|
+
}
|
128
|
+
|
129
|
+
deactivate(isIncludeCodeview) {
|
130
|
+
let $btn = this.$toolbar.find('button');
|
131
|
+
if (!isIncludeCodeview) {
|
132
|
+
$btn = $btn.not('.btn-codeview');
|
133
|
+
}
|
134
|
+
this.ui.toggleBtn($btn, false);
|
135
|
+
}
|
136
|
+
}
|
@@ -0,0 +1,205 @@
|
|
1
|
+
import $ from 'jquery';
|
2
|
+
import env from '../core/env';
|
3
|
+
import key from '../core/key';
|
4
|
+
|
5
|
+
export default class VideoDialog {
|
6
|
+
constructor(context) {
|
7
|
+
this.context = context;
|
8
|
+
|
9
|
+
this.ui = $.summernote.ui;
|
10
|
+
this.$body = $(document.body);
|
11
|
+
this.$editor = context.layoutInfo.editor;
|
12
|
+
this.options = context.options;
|
13
|
+
this.lang = this.options.langInfo;
|
14
|
+
}
|
15
|
+
|
16
|
+
initialize() {
|
17
|
+
const $container = this.options.dialogsInBody ? this.$body : this.$editor;
|
18
|
+
|
19
|
+
const body = [
|
20
|
+
'<div class="form-group note-form-group row-fluid">',
|
21
|
+
`<label class="note-form-label">${this.lang.video.url} <small class="text-muted">${this.lang.video.providers}</small></label>`,
|
22
|
+
'<input class="note-video-url form-control note-form-control note-input" type="text" />',
|
23
|
+
'</div>'
|
24
|
+
].join('');
|
25
|
+
const buttonClass = 'btn btn-primary note-btn note-btn-primary note-video-btn';
|
26
|
+
const footer = `<button type="submit" href="#" class="${buttonClass}" disabled>${this.lang.video.insert}</button>`;
|
27
|
+
|
28
|
+
this.$dialog = this.ui.dialog({
|
29
|
+
title: this.lang.video.insert,
|
30
|
+
fade: this.options.dialogsFade,
|
31
|
+
body: body,
|
32
|
+
footer: footer
|
33
|
+
}).render().appendTo($container);
|
34
|
+
}
|
35
|
+
|
36
|
+
destroy() {
|
37
|
+
this.ui.hideDialog(this.$dialog);
|
38
|
+
this.$dialog.remove();
|
39
|
+
}
|
40
|
+
|
41
|
+
bindEnterKey($input, $btn) {
|
42
|
+
$input.on('keypress', (event) => {
|
43
|
+
if (event.keyCode === key.code.ENTER) {
|
44
|
+
event.preventDefault();
|
45
|
+
$btn.trigger('click');
|
46
|
+
}
|
47
|
+
});
|
48
|
+
}
|
49
|
+
|
50
|
+
createVideoNode(url) {
|
51
|
+
// video url patterns(youtube, instagram, vimeo, dailymotion, youku, mp4, ogg, webm)
|
52
|
+
const ytRegExp = /^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/;
|
53
|
+
const ytMatch = url.match(ytRegExp);
|
54
|
+
|
55
|
+
const igRegExp = /(?:www\.|\/\/)instagram\.com\/p\/(.[a-zA-Z0-9_-]*)/;
|
56
|
+
const igMatch = url.match(igRegExp);
|
57
|
+
|
58
|
+
const vRegExp = /\/\/vine\.co\/v\/([a-zA-Z0-9]+)/;
|
59
|
+
const vMatch = url.match(vRegExp);
|
60
|
+
|
61
|
+
const vimRegExp = /\/\/(player\.)?vimeo\.com\/([a-z]*\/)*(\d+)[?]?.*/;
|
62
|
+
const vimMatch = url.match(vimRegExp);
|
63
|
+
|
64
|
+
const dmRegExp = /.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/;
|
65
|
+
const dmMatch = url.match(dmRegExp);
|
66
|
+
|
67
|
+
const youkuRegExp = /\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/;
|
68
|
+
const youkuMatch = url.match(youkuRegExp);
|
69
|
+
|
70
|
+
const qqRegExp = /\/\/v\.qq\.com.*?vid=(.+)/;
|
71
|
+
const qqMatch = url.match(qqRegExp);
|
72
|
+
|
73
|
+
const qqRegExp2 = /\/\/v\.qq\.com\/x?\/?(page|cover).*?\/([^\/]+)\.html\??.*/;
|
74
|
+
const qqMatch2 = url.match(qqRegExp2);
|
75
|
+
|
76
|
+
const mp4RegExp = /^.+.(mp4|m4v)$/;
|
77
|
+
const mp4Match = url.match(mp4RegExp);
|
78
|
+
|
79
|
+
const oggRegExp = /^.+.(ogg|ogv)$/;
|
80
|
+
const oggMatch = url.match(oggRegExp);
|
81
|
+
|
82
|
+
const webmRegExp = /^.+.(webm)$/;
|
83
|
+
const webmMatch = url.match(webmRegExp);
|
84
|
+
|
85
|
+
let $video;
|
86
|
+
if (ytMatch && ytMatch[1].length === 11) {
|
87
|
+
const youtubeId = ytMatch[1];
|
88
|
+
$video = $('<iframe>')
|
89
|
+
.attr('frameborder', 0)
|
90
|
+
.attr('src', '//www.youtube.com/embed/' + youtubeId)
|
91
|
+
.attr('width', '640').attr('height', '360');
|
92
|
+
} else if (igMatch && igMatch[0].length) {
|
93
|
+
$video = $('<iframe>')
|
94
|
+
.attr('frameborder', 0)
|
95
|
+
.attr('src', 'https://instagram.com/p/' + igMatch[1] + '/embed/')
|
96
|
+
.attr('width', '612').attr('height', '710')
|
97
|
+
.attr('scrolling', 'no')
|
98
|
+
.attr('allowtransparency', 'true');
|
99
|
+
} else if (vMatch && vMatch[0].length) {
|
100
|
+
$video = $('<iframe>')
|
101
|
+
.attr('frameborder', 0)
|
102
|
+
.attr('src', vMatch[0] + '/embed/simple')
|
103
|
+
.attr('width', '600').attr('height', '600')
|
104
|
+
.attr('class', 'vine-embed');
|
105
|
+
} else if (vimMatch && vimMatch[3].length) {
|
106
|
+
$video = $('<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>')
|
107
|
+
.attr('frameborder', 0)
|
108
|
+
.attr('src', '//player.vimeo.com/video/' + vimMatch[3])
|
109
|
+
.attr('width', '640').attr('height', '360');
|
110
|
+
} else if (dmMatch && dmMatch[2].length) {
|
111
|
+
$video = $('<iframe>')
|
112
|
+
.attr('frameborder', 0)
|
113
|
+
.attr('src', '//www.dailymotion.com/embed/video/' + dmMatch[2])
|
114
|
+
.attr('width', '640').attr('height', '360');
|
115
|
+
} else if (youkuMatch && youkuMatch[1].length) {
|
116
|
+
$video = $('<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>')
|
117
|
+
.attr('frameborder', 0)
|
118
|
+
.attr('height', '498')
|
119
|
+
.attr('width', '510')
|
120
|
+
.attr('src', '//player.youku.com/embed/' + youkuMatch[1]);
|
121
|
+
} else if ((qqMatch && qqMatch[1].length) || (qqMatch2 && qqMatch2[2].length)) {
|
122
|
+
const vid = ((qqMatch && qqMatch[1].length) ? qqMatch[1] : qqMatch2[2]);
|
123
|
+
$video = $('<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>')
|
124
|
+
.attr('frameborder', 0)
|
125
|
+
.attr('height', '310')
|
126
|
+
.attr('width', '500')
|
127
|
+
.attr('src', 'http://v.qq.com/iframe/player.html?vid=' + vid + '&auto=0');
|
128
|
+
} else if (mp4Match || oggMatch || webmMatch) {
|
129
|
+
$video = $('<video controls>')
|
130
|
+
.attr('src', url)
|
131
|
+
.attr('width', '640').attr('height', '360');
|
132
|
+
} else {
|
133
|
+
// this is not a known video link. Now what, Cat? Now what?
|
134
|
+
return false;
|
135
|
+
}
|
136
|
+
|
137
|
+
$video.addClass('note-video-clip');
|
138
|
+
|
139
|
+
return $video[0];
|
140
|
+
}
|
141
|
+
|
142
|
+
show() {
|
143
|
+
const text = this.context.invoke('editor.getSelectedText');
|
144
|
+
this.context.invoke('editor.saveRange');
|
145
|
+
this.showVideoDialog(text).then((url) => {
|
146
|
+
// [workaround] hide dialog before restore range for IE range focus
|
147
|
+
this.ui.hideDialog(this.$dialog);
|
148
|
+
this.context.invoke('editor.restoreRange');
|
149
|
+
|
150
|
+
// build node
|
151
|
+
const $node = this.createVideoNode(url);
|
152
|
+
|
153
|
+
if ($node) {
|
154
|
+
// insert video node
|
155
|
+
this.context.invoke('editor.insertNode', $node);
|
156
|
+
}
|
157
|
+
}).fail(() => {
|
158
|
+
this.context.invoke('editor.restoreRange');
|
159
|
+
});
|
160
|
+
}
|
161
|
+
|
162
|
+
/**
|
163
|
+
* show image dialog
|
164
|
+
*
|
165
|
+
* @param {jQuery} $dialog
|
166
|
+
* @return {Promise}
|
167
|
+
*/
|
168
|
+
showVideoDialog(text) {
|
169
|
+
return $.Deferred((deferred) => {
|
170
|
+
const $videoUrl = this.$dialog.find('.note-video-url');
|
171
|
+
const $videoBtn = this.$dialog.find('.note-video-btn');
|
172
|
+
|
173
|
+
this.ui.onDialogShown(this.$dialog, () => {
|
174
|
+
this.context.triggerEvent('dialog.shown');
|
175
|
+
|
176
|
+
$videoUrl.val(text).on('input', () => {
|
177
|
+
this.ui.toggleBtn($videoBtn, $videoUrl.val());
|
178
|
+
});
|
179
|
+
|
180
|
+
if (!env.isSupportTouch) {
|
181
|
+
$videoUrl.trigger('focus');
|
182
|
+
}
|
183
|
+
|
184
|
+
$videoBtn.click((event) => {
|
185
|
+
event.preventDefault();
|
186
|
+
|
187
|
+
deferred.resolve($videoUrl.val());
|
188
|
+
});
|
189
|
+
|
190
|
+
this.bindEnterKey($videoUrl, $videoBtn);
|
191
|
+
});
|
192
|
+
|
193
|
+
this.ui.onDialogHidden(this.$dialog, () => {
|
194
|
+
$videoUrl.off('input');
|
195
|
+
$videoBtn.off('click');
|
196
|
+
|
197
|
+
if (deferred.state() === 'pending') {
|
198
|
+
deferred.reject();
|
199
|
+
}
|
200
|
+
});
|
201
|
+
|
202
|
+
this.ui.showDialog(this.$dialog);
|
203
|
+
});
|
204
|
+
}
|
205
|
+
}
|