promethee 1.4.13 → 1.4.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/app/assets/javascripts/promethee.js +0 -1
- data/app/assets/stylesheets/promethee-edit.sass +0 -1
- data/app/views/promethee/components/aside/_show.html.erb +4 -1
- data/lib/promethee/rails/version.rb +1 -1
- metadata +16 -389
- data/node_modules/summernote/CODE_OF_CONDUCT.md +0 -46
- data/node_modules/summernote/CONTRIBUTING.md +0 -67
- data/node_modules/summernote/ISSUE_TEMPLATE.md +0 -14
- data/node_modules/summernote/LICENSE +0 -21
- data/node_modules/summernote/PULL_REQUEST_TEMPLATE.md +0 -28
- data/node_modules/summernote/README.md +0 -90
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/base.css +0 -213
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/index.html +0 -262
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/prettify.css +0 -1
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/prettify.js +0 -1
- 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 +0 -158
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/Context.js.html +0 -758
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/core/async.js.html +0 -206
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/core/dom.js.html +0 -3329
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/core/env.js.html +0 -386
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/core/func.js.html +0 -551
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/core/index.html +0 -171
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/core/key.js.html +0 -341
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/core/lists.js.html +0 -695
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/core/range.js.html +0 -2441
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/editing/Bullet.js.html +0 -668
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/editing/History.js.html +0 -380
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/editing/Style.js.html +0 -539
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/editing/Table.js.html +0 -1787
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/editing/Typing.js.html +0 -335
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/editing/index.html +0 -145
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/index.html +0 -119
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/AirPopover.js.html +0 -284
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/AutoLink.js.html +0 -248
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/AutoSync.js.html +0 -122
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Buttons.js.html +0 -2504
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Clipboard.js.html +0 -149
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Codeview.js.html +0 -434
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Dropzone.js.html +0 -410
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Editor.js.html +0 -2648
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Fullscreen.js.html +0 -218
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Handle.js.html +0 -494
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/HelpDialog.js.html +0 -302
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/HintPopover.js.html +0 -743
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/ImageDialog.js.html +0 -458
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/ImagePopover.js.html +0 -239
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/LinkDialog.js.html +0 -587
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/LinkPopover.js.html +0 -272
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Placeholder.js.html +0 -182
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Statusbar.js.html +0 -191
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/TablePopover.js.html +0 -278
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Toolbar.js.html +0 -473
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/VideoDialog.js.html +0 -680
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/index.html +0 -353
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/renderer.js.html +0 -263
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/summernote-en-US.js.html +0 -542
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/bs3/index.html +0 -106
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/bs3/settings.js.html +0 -956
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/bs3/ui.js.html +0 -776
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/bs4/index.html +0 -106
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/bs4/settings.js.html +0 -968
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/bs4/ui.js.html +0 -791
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/index.html +0 -93
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/index.html +0 -106
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/settings.js.html +0 -953
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/ui.js.html +0 -1919
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/ui/DropdownUI.js.html +0 -260
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/ui/ModalUI.js.html +0 -167
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/ui/PopoverUI.js.html +0 -347
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/ui/TooltipUI.js.html +0 -344
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/ui/index.html +0 -132
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/summernote.js.html +0 -203
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/Context.spec.js.html +0 -323
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/core/dom.spec.js.html +0 -1046
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/core/func.spec.js.html +0 -482
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/core/index.html +0 -145
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/core/key.spec.js.html +0 -140
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/core/lists.spec.js.html +0 -419
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/core/range.spec.js.html +0 -1286
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/editing/Table.spec.js.html +0 -1724
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/editing/index.html +0 -106
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/editing/style.spec.js.html +0 -341
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/index.html +0 -93
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/module/Codeview.spec.js.html +0 -161
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/module/Editor.spec.js.html +0 -1235
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/module/Fullscreen.spec.js.html +0 -161
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/module/index.html +0 -119
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/bs/module/Buttons.spec.js.html +0 -770
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/bs/module/VideoDialog.spec.js.html +0 -209
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/bs/module/index.html +0 -106
- 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/node_modules/summernote/dist/lang/summernote-ar-AR.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-ar-AR.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-bg-BG.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-bg-BG.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-ca-ES.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-ca-ES.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-cs-CZ.js +0 -149
- data/node_modules/summernote/dist/lang/summernote-cs-CZ.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-da-DK.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-da-DK.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-de-DE.js +0 -154
- data/node_modules/summernote/dist/lang/summernote-de-DE.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-el-GR.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-el-GR.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-es-ES.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-es-ES.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-es-EU.js +0 -154
- data/node_modules/summernote/dist/lang/summernote-es-EU.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-fa-IR.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-fa-IR.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-fi-FI.js +0 -153
- data/node_modules/summernote/dist/lang/summernote-fi-FI.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-fr-FR.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-fr-FR.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-gl-ES.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-gl-ES.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-he-IL.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-he-IL.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-hr-HR.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-hr-HR.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-hu-HU.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-hu-HU.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-id-ID.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-id-ID.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-it-IT.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-it-IT.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-ja-JP.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-ja-JP.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-ko-KR.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-ko-KR.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-lt-LT.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-lt-LT.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-lt-LV.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-lt-LV.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-mn-MN.js +0 -157
- data/node_modules/summernote/dist/lang/summernote-mn-MN.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-nb-NO.js +0 -154
- data/node_modules/summernote/dist/lang/summernote-nb-NO.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-nl-NL.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-nl-NL.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-pl-PL.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-pl-PL.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-pt-BR.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-pt-BR.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-pt-PT.js +0 -154
- data/node_modules/summernote/dist/lang/summernote-pt-PT.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-ro-RO.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-ro-RO.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-ru-RU.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-ru-RU.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-sk-SK.js +0 -153
- data/node_modules/summernote/dist/lang/summernote-sk-SK.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-sl-SI.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-sl-SI.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-sr-RS-Latin.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-sr-RS-Latin.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-sr-RS.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-sr-RS.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-sv-SE.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-sv-SE.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-ta-IN.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-ta-IN.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-th-TH.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-th-TH.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-tr-TR.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-tr-TR.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-uk-UA.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-uk-UA.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-uz-UZ.js +0 -112
- data/node_modules/summernote/dist/lang/summernote-uz-UZ.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-vi-VN.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-vi-VN.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-zh-CN.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-zh-CN.min.js +0 -3
- data/node_modules/summernote/dist/lang/summernote-zh-TW.js +0 -155
- data/node_modules/summernote/dist/lang/summernote-zh-TW.min.js +0 -3
- data/node_modules/summernote/dist/summernote-0.8.10-dist.zip +0 -0
- data/node_modules/summernote/dist/summernote-bs4.css +0 -1
- data/node_modules/summernote/dist/summernote-bs4.js +0 -7323
- data/node_modules/summernote/dist/summernote-bs4.js.map +0 -1
- data/node_modules/summernote/dist/summernote-bs4.min.js +0 -3
- data/node_modules/summernote/dist/summernote-lite.css +0 -1
- data/node_modules/summernote/dist/summernote-lite.js +0 -7837
- data/node_modules/summernote/dist/summernote-lite.js.map +0 -1
- data/node_modules/summernote/dist/summernote.css +0 -1
- data/node_modules/summernote/dist/summernote.js +0 -7315
- data/node_modules/summernote/dist/summernote.js.map +0 -1
- data/node_modules/summernote/dist/summernote.min.js +0 -3
- data/node_modules/summernote/examples/airmode.html +0 -35
- data/node_modules/summernote/examples/bs3.html +0 -60
- data/node_modules/summernote/examples/bs4.html +0 -57
- data/node_modules/summernote/examples/codemirror.html +0 -45
- data/node_modules/summernote/examples/external-api.html +0 -76
- data/node_modules/summernote/examples/hint-emoji.html +0 -61
- data/node_modules/summernote/examples/hint-symbols_mathematical-symbols_Greek-letters.html +0 -54
- data/node_modules/summernote/examples/hint-userdefine.html +0 -48
- data/node_modules/summernote/examples/ie8.html +0 -32
- data/node_modules/summernote/examples/jquery-custom-event.html +0 -119
- data/node_modules/summernote/examples/jquery19lt.html +0 -25
- data/node_modules/summernote/examples/lang.html +0 -33
- data/node_modules/summernote/examples/link-blank.html +0 -33
- data/node_modules/summernote/examples/lite.html +0 -24
- data/node_modules/summernote/examples/nativestyle.html +0 -32
- data/node_modules/summernote/examples/ondialog-multitab.html +0 -77
- data/node_modules/summernote/examples/ondialog.html +0 -58
- data/node_modules/summernote/examples/plugin-hello.html +0 -37
- data/node_modules/summernote/examples/rtl.html +0 -32
- data/node_modules/summernote/examples/symbols_mathematical-symbols_Greek-letters.json +0 -1118
- data/node_modules/summernote/examples/textarea.html +0 -46
- data/node_modules/summernote/examples/toolbar-container.html +0 -35
- data/node_modules/summernote/examples/with-google-font.html +0 -50
- data/node_modules/summernote/index.html +0 -33
- data/node_modules/summernote/karma.conf.js +0 -42
- data/node_modules/summernote/lang/summernote-ar-AR.js +0 -155
- data/node_modules/summernote/lang/summernote-bg-BG.js +0 -155
- data/node_modules/summernote/lang/summernote-ca-ES.js +0 -155
- data/node_modules/summernote/lang/summernote-cs-CZ.js +0 -149
- data/node_modules/summernote/lang/summernote-da-DK.js +0 -155
- data/node_modules/summernote/lang/summernote-de-DE.js +0 -154
- data/node_modules/summernote/lang/summernote-el-GR.js +0 -155
- data/node_modules/summernote/lang/summernote-es-ES.js +0 -155
- data/node_modules/summernote/lang/summernote-es-EU.js +0 -154
- data/node_modules/summernote/lang/summernote-fa-IR.js +0 -155
- data/node_modules/summernote/lang/summernote-fi-FI.js +0 -153
- data/node_modules/summernote/lang/summernote-fr-FR.js +0 -155
- data/node_modules/summernote/lang/summernote-gl-ES.js +0 -155
- data/node_modules/summernote/lang/summernote-he-IL.js +0 -155
- data/node_modules/summernote/lang/summernote-hr-HR.js +0 -155
- data/node_modules/summernote/lang/summernote-hu-HU.js +0 -155
- data/node_modules/summernote/lang/summernote-id-ID.js +0 -155
- data/node_modules/summernote/lang/summernote-it-IT.js +0 -155
- data/node_modules/summernote/lang/summernote-ja-JP.js +0 -155
- data/node_modules/summernote/lang/summernote-ko-KR.js +0 -155
- data/node_modules/summernote/lang/summernote-lt-LT.js +0 -155
- data/node_modules/summernote/lang/summernote-lt-LV.js +0 -155
- data/node_modules/summernote/lang/summernote-mn-MN.js +0 -157
- data/node_modules/summernote/lang/summernote-nb-NO.js +0 -154
- data/node_modules/summernote/lang/summernote-nl-NL.js +0 -155
- data/node_modules/summernote/lang/summernote-pl-PL.js +0 -155
- data/node_modules/summernote/lang/summernote-pt-BR.js +0 -155
- data/node_modules/summernote/lang/summernote-pt-PT.js +0 -154
- data/node_modules/summernote/lang/summernote-ro-RO.js +0 -155
- data/node_modules/summernote/lang/summernote-ru-RU.js +0 -155
- data/node_modules/summernote/lang/summernote-sk-SK.js +0 -153
- data/node_modules/summernote/lang/summernote-sl-SI.js +0 -155
- data/node_modules/summernote/lang/summernote-sr-RS-Latin.js +0 -155
- data/node_modules/summernote/lang/summernote-sr-RS.js +0 -155
- data/node_modules/summernote/lang/summernote-sv-SE.js +0 -155
- data/node_modules/summernote/lang/summernote-ta-IN.js +0 -155
- data/node_modules/summernote/lang/summernote-th-TH.js +0 -155
- data/node_modules/summernote/lang/summernote-tr-TR.js +0 -155
- data/node_modules/summernote/lang/summernote-uk-UA.js +0 -155
- data/node_modules/summernote/lang/summernote-uz-UZ.js +0 -112
- data/node_modules/summernote/lang/summernote-vi-VN.js +0 -155
- data/node_modules/summernote/lang/summernote-zh-CN.js +0 -155
- data/node_modules/summernote/lang/summernote-zh-TW.js +0 -155
- data/node_modules/summernote/package.json +0 -87
- data/node_modules/summernote/plugin/databasic/summernote-ext-databasic.css +0 -16
- data/node_modules/summernote/plugin/databasic/summernote-ext-databasic.js +0 -292
- data/node_modules/summernote/plugin/hello/summernote-ext-hello.js +0 -81
- data/node_modules/summernote/plugin/specialchars/summernote-ext-specialchars.js +0 -312
- data/node_modules/summernote/src/icons/align-center.svg +0 -11
- data/node_modules/summernote/src/icons/align-indent.svg +0 -11
- data/node_modules/summernote/src/icons/align-justify.svg +0 -11
- data/node_modules/summernote/src/icons/align-left.svg +0 -12
- data/node_modules/summernote/src/icons/align-outdent.svg +0 -11
- data/node_modules/summernote/src/icons/align-right.svg +0 -11
- data/node_modules/summernote/src/icons/align.svg +0 -8
- data/node_modules/summernote/src/icons/arrow-circle-down.svg +0 -1
- data/node_modules/summernote/src/icons/arrow-circle-left.svg +0 -1
- data/node_modules/summernote/src/icons/arrow-circle-right.svg +0 -1
- data/node_modules/summernote/src/icons/arrow-circle-up.svg +0 -1
- data/node_modules/summernote/src/icons/arrows-alt.svg +0 -11
- data/node_modules/summernote/src/icons/arrows-h.svg +0 -1
- data/node_modules/summernote/src/icons/arrows-v.svg +0 -1
- data/node_modules/summernote/src/icons/bold.svg +0 -11
- data/node_modules/summernote/src/icons/caret.svg +0 -9
- data/node_modules/summernote/src/icons/chain-broken.svg +0 -47
- data/node_modules/summernote/src/icons/circle.svg +0 -10
- data/node_modules/summernote/src/icons/close.svg +0 -16
- data/node_modules/summernote/src/icons/code.svg +0 -11
- data/node_modules/summernote/src/icons/col-after.svg +0 -96
- data/node_modules/summernote/src/icons/col-before.svg +0 -19
- data/node_modules/summernote/src/icons/col-remove.svg +0 -19
- 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 +0 -536
- data/node_modules/summernote/src/icons/dist/summernote.less +0 -511
- data/node_modules/summernote/src/icons/eraser.svg +0 -13
- data/node_modules/summernote/src/icons/font.svg +0 -11
- data/node_modules/summernote/src/icons/frame.svg +0 -10
- data/node_modules/summernote/src/icons/italic.svg +0 -11
- data/node_modules/summernote/src/icons/link.svg +0 -21
- data/node_modules/summernote/src/icons/magic.svg +0 -10
- data/node_modules/summernote/src/icons/menu-check.svg +0 -8
- data/node_modules/summernote/src/icons/minus.svg +0 -11
- data/node_modules/summernote/src/icons/orderedlist.svg +0 -12
- data/node_modules/summernote/src/icons/pencil.svg +0 -8
- data/node_modules/summernote/src/icons/picture.svg +0 -11
- data/node_modules/summernote/src/icons/question.svg +0 -10
- data/node_modules/summernote/src/icons/redo.svg +0 -10
- data/node_modules/summernote/src/icons/row-above.svg +0 -19
- data/node_modules/summernote/src/icons/row-below.svg +0 -19
- data/node_modules/summernote/src/icons/row-remove.svg +0 -19
- data/node_modules/summernote/src/icons/special-character.svg +0 -10
- data/node_modules/summernote/src/icons/square.svg +0 -10
- data/node_modules/summernote/src/icons/strikethrough.svg +0 -11
- data/node_modules/summernote/src/icons/subscript.svg +0 -11
- data/node_modules/summernote/src/icons/summernote.svg +0 -11
- data/node_modules/summernote/src/icons/superscript.svg +0 -11
- data/node_modules/summernote/src/icons/table.svg +0 -11
- data/node_modules/summernote/src/icons/templates/summernote.css +0 -110
- data/node_modules/summernote/src/icons/templates/summernote.json +0 -5
- data/node_modules/summernote/src/icons/text-height.svg +0 -11
- data/node_modules/summernote/src/icons/trash.svg +0 -17
- data/node_modules/summernote/src/icons/underline.svg +0 -11
- data/node_modules/summernote/src/icons/undo.svg +0 -10
- data/node_modules/summernote/src/icons/unorderedlist.svg +0 -9
- data/node_modules/summernote/src/icons/video.svg +0 -9
- data/node_modules/summernote/src/js/base/Context.js +0 -231
- data/node_modules/summernote/src/js/base/core/async.js +0 -47
- data/node_modules/summernote/src/js/base/core/dom.js +0 -1088
- data/node_modules/summernote/src/js/base/core/env.js +0 -107
- data/node_modules/summernote/src/js/base/core/func.js +0 -162
- data/node_modules/summernote/src/js/base/core/key.js +0 -92
- data/node_modules/summernote/src/js/base/core/lists.js +0 -210
- data/node_modules/summernote/src/js/base/core/range.js +0 -792
- data/node_modules/summernote/src/js/base/editing/Bullet.js +0 -201
- data/node_modules/summernote/src/js/base/editing/History.js +0 -105
- data/node_modules/summernote/src/js/base/editing/Style.js +0 -158
- data/node_modules/summernote/src/js/base/editing/Table.js +0 -574
- data/node_modules/summernote/src/js/base/editing/Typing.js +0 -90
- data/node_modules/summernote/src/js/base/module/AirPopover.js +0 -73
- data/node_modules/summernote/src/js/base/module/AutoLink.js +0 -61
- data/node_modules/summernote/src/js/base/module/AutoSync.js +0 -19
- data/node_modules/summernote/src/js/base/module/Buttons.js +0 -813
- data/node_modules/summernote/src/js/base/module/Clipboard.js +0 -28
- data/node_modules/summernote/src/js/base/module/Codeview.js +0 -123
- data/node_modules/summernote/src/js/base/module/Dropzone.js +0 -115
- data/node_modules/summernote/src/js/base/module/Editor.js +0 -861
- data/node_modules/summernote/src/js/base/module/Fullscreen.js +0 -51
- data/node_modules/summernote/src/js/base/module/Handle.js +0 -143
- data/node_modules/summernote/src/js/base/module/HelpDialog.js +0 -79
- data/node_modules/summernote/src/js/base/module/HintPopover.js +0 -226
- data/node_modules/summernote/src/js/base/module/ImageDialog.js +0 -131
- data/node_modules/summernote/src/js/base/module/ImagePopover.js +0 -58
- data/node_modules/summernote/src/js/base/module/LinkDialog.js +0 -174
- data/node_modules/summernote/src/js/base/module/LinkPopover.js +0 -69
- data/node_modules/summernote/src/js/base/module/Placeholder.js +0 -39
- data/node_modules/summernote/src/js/base/module/Statusbar.js +0 -42
- data/node_modules/summernote/src/js/base/module/TablePopover.js +0 -71
- data/node_modules/summernote/src/js/base/module/Toolbar.js +0 -136
- data/node_modules/summernote/src/js/base/module/VideoDialog.js +0 -205
- data/node_modules/summernote/src/js/base/renderer.js +0 -66
- data/node_modules/summernote/src/js/base/summernote-en-US.js +0 -159
- data/node_modules/summernote/src/js/bs3/settings.js +0 -297
- data/node_modules/summernote/src/js/bs3/ui.js +0 -237
- data/node_modules/summernote/src/js/bs4/settings.js +0 -301
- data/node_modules/summernote/src/js/bs4/ui.js +0 -242
- data/node_modules/summernote/src/js/lite/settings.js +0 -296
- data/node_modules/summernote/src/js/lite/ui.js +0 -618
- data/node_modules/summernote/src/js/lite/ui/DropdownUI.js +0 -65
- data/node_modules/summernote/src/js/lite/ui/ModalUI.js +0 -34
- data/node_modules/summernote/src/js/lite/ui/PopoverUI.js +0 -94
- data/node_modules/summernote/src/js/lite/ui/TooltipUI.js +0 -93
- data/node_modules/summernote/src/js/summernote.js +0 -46
- data/node_modules/summernote/src/less/elements.less +0 -149
- data/node_modules/summernote/src/less/elements.scss +0 -149
- data/node_modules/summernote/src/less/lite-ui/all.less +0 -15
- data/node_modules/summernote/src/less/lite-ui/btn-group.less +0 -51
- data/node_modules/summernote/src/less/lite-ui/buttons.less +0 -102
- data/node_modules/summernote/src/less/lite-ui/common.less +0 -20
- data/node_modules/summernote/src/less/lite-ui/dropdown.less +0 -39
- data/node_modules/summernote/src/less/lite-ui/form.less +0 -43
- data/node_modules/summernote/src/less/lite-ui/mixins.less +0 -1
- data/node_modules/summernote/src/less/lite-ui/mixins/buttons.less +0 -40
- data/node_modules/summernote/src/less/lite-ui/modal.less +0 -104
- data/node_modules/summernote/src/less/lite-ui/popover.less +0 -121
- data/node_modules/summernote/src/less/lite-ui/toolbar.less +0 -4
- data/node_modules/summernote/src/less/lite-ui/tooltip.less +0 -66
- data/node_modules/summernote/src/less/lite-ui/variables.less +0 -81
- data/node_modules/summernote/src/less/summernote-bs4.less +0 -577
- data/node_modules/summernote/src/less/summernote-bs4.scss +0 -560
- data/node_modules/summernote/src/less/summernote-lite.less +0 -601
- data/node_modules/summernote/src/less/summernote.less +0 -576
- data/node_modules/summernote/src/less/summernote.scss +0 -560
- data/node_modules/summernote/tsconfig.json +0 -12
@@ -1,42 +0,0 @@
|
|
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
|
-
}
|
@@ -1,71 +0,0 @@
|
|
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
|
-
}
|
@@ -1,136 +0,0 @@
|
|
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
|
-
}
|
@@ -1,205 +0,0 @@
|
|
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
|
-
}
|