glebtv-ckeditor 4.5.10.3 → 4.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/ckeditor/config.js.erb +1 -1
- data/lib/ckeditor.rb +1 -0
- data/lib/ckeditor/version.rb +2 -2
- data/lib/generators/ckeditor/templates/active_record/carrierwave/migration.rb +1 -1
- data/lib/generators/ckeditor/templates/active_record/dragonfly/migration.rb +1 -1
- data/lib/generators/ckeditor/templates/active_record/paperclip/migration.rb +1 -1
- data/lib/generators/ckeditor/templates/active_record/refile/migration.rb +1 -1
- data/vendor/assets/javascripts/ckeditor/LICENSE.md +2 -2
- data/vendor/assets/javascripts/ckeditor/adapters/jquery.js +1 -1
- data/vendor/assets/javascripts/ckeditor/build-config.js +26 -26
- data/vendor/assets/javascripts/ckeditor/ckeditor.js +605 -576
- data/vendor/assets/javascripts/ckeditor/lang/en.js +2 -2
- data/vendor/assets/javascripts/ckeditor/lang/ru.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/CKCss/css/styles.css +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/CKCss/dialogs/ckcss.js +2 -1
- data/vendor/assets/javascripts/ckeditor/plugins/CKCss/plugin.js +3 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +6 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +3 -4
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +4 -4
- data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +4 -3
- data/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/LICENSE.md +21 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.ckeditor.css +183 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.css +341 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/comment/comment.js +206 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/comment/continuecomment.js +85 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/dialog/dialog.css +32 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/dialog/dialog.js +157 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/closebrackets.js +202 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/closetag.js +169 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/continuelist.js +51 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/matchbrackets.js +122 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/matchtags.js +66 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/trailingspace.js +27 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/brace-fold.js +105 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/comment-fold.js +59 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/foldcode.js +150 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/foldgutter.css +20 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/foldgutter.js +146 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/indent-fold.js +44 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/markdown-fold.js +49 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/xml-fold.js +182 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/format/autoFormatAll.js +43 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/format/formatting.js +226 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/anyword-hint.js +41 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/css-hint.js +60 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/html-hint.js +348 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/javascript-hint.js +155 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/show-hint.css +36 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/show-hint.js +438 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/sql-hint.js +271 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/xml-hint.js +110 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/loadmode.js +64 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/multiplex.js +123 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/multiplex_test.js +33 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/overlay.js +85 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/simple.js +213 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/jump-to-line.js +49 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/match-highlighter.js +165 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/matchesonscrollbar.css +8 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/matchesonscrollbar.js +97 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/search.js +252 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/searchcursor.js +189 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/selection/active-line.js +74 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/selection/mark-selection.js +118 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/selection/selection-pointer.js +98 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/beautify-html.js +952 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.js +2087 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.js +9109 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcode/bbcode.js +137 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcode/index.html +73 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcodemixed/bbcodemixed.js +161 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcodemixed/index.html +128 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/clike.js +785 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/index.html +360 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/scala.html +767 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/test.js +55 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/css.js +825 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/gss.html +103 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/gss_test.js +17 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/index.html +75 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/less.html +152 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/less_test.js +54 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/scss.html +157 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/scss_test.js +110 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/test.js +200 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlembedded/htmlembedded.js +28 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlembedded/index.html +60 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlmixed/htmlmixed.js +152 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlmixed/index.html +89 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/index.html +114 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/javascript.js +784 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/json-ld.html +72 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/test.js +247 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/typescript.html +61 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/php/index.html +64 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/php/php.js +234 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/php/test.js +154 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/xml/index.html +61 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/xml/test.js +51 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/xml/xml.js +394 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +30 -24
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/dracula.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/duotone-dark.css +35 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/duotone-light.css +36 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/panda-syntax.css +85 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/pastel-on-dark.css +0 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/solarized.css +21 -15
- data/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +9 -9
- data/vendor/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +12 -12
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +11 -11
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/icons_hidpi.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/iframedialog/plugin.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +28 -28
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/LICENSE +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/README.md +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/lang/LANG.js +3 -0
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/lang/en.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/lang/ru.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/plugin.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/readme.txt +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +25 -23
- data/vendor/assets/javascripts/ckeditor/plugins/link/images/anchor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/notification/lang/en.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/notification/lang/ru.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/notification/plugin.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +40 -29
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +19 -19
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/skins/moono-lisa/scayt.css +20 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/plugin.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/samples/assets/sample.css +70 -0
- data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/samples/stylesheetparser.html +85 -0
- data/vendor/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/default.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/css/wordcount.css +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/ru.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +60 -13
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/samples/wordcount.html +61 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/samples/wordcountWithMaxCount.html +110 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +9 -9
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/skins/moono-lisa/wsc.css +43 -0
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/LICENSE.md +15 -0
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/images/icon.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/lang/en.js +3 -1
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/lang/ru.js +1 -0
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/plugin.js +448 -388
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dev/icons16.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dev/icons16.svg +175 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dev/icons32.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dev/icons32.svg +167 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dev/locations.json +145 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog_ie.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog_ie8.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog_iequirks.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_gecko.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_ie.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_ie8.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_iequirks.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/arrow.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/hidpi/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/hidpi/lock-open.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/hidpi/lock.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/hidpi/refresh.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/lock-open.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/lock.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/refresh.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/spinner.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/readme.md +46 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/skin.js +7 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/icons_hidpi.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/anchor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/anchor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/lock-open.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/lock.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/refresh.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/readme.md +3 -3
- data/vendor/assets/javascripts/ckeditor/styles.js +42 -16
- metadata +161 -105
- data/app/assets/javascripts/ckeditor/config_orig.js +0 -58
- data/vendor/assets/javascripts/ckeditor/README.md +0 -39
- data/vendor/assets/javascripts/ckeditor/config.js +0 -10
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/af.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ar.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/bg.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/bn.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/bs.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ca.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/cs.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/cy.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/da.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/de.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/el.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/en-au.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/en-ca.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/en-gb.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/eo.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/es.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/et.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/eu.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/fa.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/fi.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/fo.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/fr-ca.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/fr.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/gl.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/gu.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/he.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/hi.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/hr.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/hu.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/is.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/it.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ja.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ka.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/km.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ko.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ku.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/lt.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/lv.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/mk.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/mn.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ms.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/nb.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/nl.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/no.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/pl.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/pt-br.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/pt.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ro.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/sk.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/sl.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/sr-latn.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/sr.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/sv.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/th.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/tr.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ug.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/uk.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/vi.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/zh-cn.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/zh.js +0 -12
@@ -1 +1 @@
|
|
1
|
-
.CodeMirror{font-family:monospace;height:300px;color:#000}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid #c0c0c0}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px;*zoom:1;*display:inline}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper{-webkit-user-select:none;-moz-user-select:none;user-select:none}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:none;font-variant-ligatures:none}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.CodeMirror span{*vertical-align:text-bottom}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.CodeMirror{font:13px/1.4em monospace;text-align:left}.CodeMirror .activeline{background:#e8f2ff}.CodeMirror .CodeMirror-foldmarker{color:#00f;-ms-text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;-webkit-text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.CodeMirror-matchingtag{background:#ff9600;background:rgba(255,150,0,.3)}.searchCodeButton span,.autoFormat span,.CommentSelectedRange span,.UncommentSelectedRange span{width:16px;height:16px;margin-left:6px}.searchCodeButton span{background:url("../icons/searchcode.png") no-repeat}.autoFormat span{background:url("../icons/autoformat.png") no-repeat}.CommentSelectedRange span{background:url("../icons/commentselectedrange.png") no-repeat}.UncommentSelectedRange span{background:url("../icons/uncommentselectedrange.png") no-repeat}.cke_reset_all .CodeMirror-scroll *{white-space:pre}.cke_reset_all .cm-s-cobalt *,.cke_reset_all .cm-s-erlang-dark *,.cke_reset_all .cm-s-lesser-dark *,.cke_reset_all .cm-s-monokai *,.cke_reset_all .cm-s-night *,.cke_reset_all .cm-s-rubyblue *,.cke_reset_all .cm-s-twilight *,.cke_reset_all .cm-s-xq-dark *,.cke_reset_all .cm-s-base16-dark *,.cke_reset_all .cm-s-3024-night *,.cke_reset_all .cm-s-the-matrix *,.cke_reset_all .cm-s-paraiso-dark *,.cke_reset_all .cm-s-paraiso-light *{color:inherit;font:inherit}.cm-s-cobalt .CodeMirror-selected{background:#b36539 !important}.cm-s-erlang-dark .CodeMirror-selected{background:#b36539 !important}.cm-s-lesser-dark .CodeMirror-selected{background:#45443b !important}.cm-s-monokai .CodeMirror-selected{background:#49483e !important}.cm-s-night .CodeMirror-selected{background:#447 !important}.cm-s-rubyblue .CodeMirror-selected{background:#38566f !important}.cm-s-twilight .CodeMirror-selected{background:#323232 !important}.cm-s-xq-dark .CodeMirror-selected{background:#a8f !important}.cm-s-the-matrix .CodeMirror-selected{background:#494949 !important}.cm-s-mbo .CodeMirror-selected{background:#716c62 !important}.cm-s-blackboard .activeline,.cm-s-cobalt .activeline,.cm-s-erlang-dark .activeline,.cm-s-lesser-dark .activeline,.cm-s-monokai .activeline,.cm-s-night .activeline,.cm-s-rubyblue .activeline,.cm-s-vibrant-ink .activeline,.cm-s-xq-dark .activeline,.cm-s-base16-dark .activeline,.cm-s-3024-night .activeline,.cm-s-paraiso-light .activeline,.cm-s-paraiso-dark .activeline,.cm-s-pastel-on-dark .activeline{background:#757575}.cm-s-pastel-on-dark .activeline{background:#404040}.cm-s-mbo .activeline{background:#716c62}.cm-s-twilight .activeline{background:#494949}.cm-s-the-matrix .activeline{background:#060}.CodeMirror-focused .cm-matchhighlight{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);background-position:bottom;background-repeat:repeat-x}.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px #000;-ms-box-shadow:2px 3px 5px #000;box-shadow:2px 3px 5px #000;border-radius:3px;border:1px solid #c0c0c0;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:#000;cursor:pointer}.CodeMirror-hint-active{background:#08f;color:#fff}.cm-trailingspace{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QUXCToH00Y1UgAAACFJREFUCNdjPMDBUc/AwNDAAAFMTAwMDA0OP34wQgX/AQBYgwYEx4f9lQAAAABJRU5ErkJggg==);background-position:bottom left;background-repeat:repeat-x}.CodeMirror-dialog{position:absolute;left:0;right:0;background:inherit;z-index:15;padding:.1em .8em;overflow:hidden;color:inherit}.CodeMirror-dialog-top{border-bottom:1px solid #eee;top:0}.CodeMirror-dialog-bottom{border-top:1px solid #eee;bottom:0}.CodeMirror-dialog input{border:none;outline:none;background:transparent;width:20em;color:inherit;font-family:monospace}.CodeMirror-dialog button{font-size:70%}.CodeMirror-foldmarker{color:#00f;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.CodeMirror-foldgutter{width:.7em}.CodeMirror-foldgutter-open,.CodeMirror-foldgutter-folded{cursor:pointer}.CodeMirror-foldgutter-open:after{content:"\25be "}.CodeMirror-foldgutter-folded:after{content:"\25b8 "}
|
1
|
+
.CodeMirror{font-family:monospace;height:300px;color:#000}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid #c0c0c0}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper{-webkit-user-select:none;-moz-user-select:none;user-select:none}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:none;font-variant-ligatures:none}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.CodeMirror{font:13px/1.4em monospace;text-align:left}.CodeMirror .activeline{background:#e8f2ff}.CodeMirror .CodeMirror-foldmarker{color:#00f;-ms-text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;-webkit-text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.CodeMirror-matchingtag{background:#ff9600;background:rgba(255,150,0,.3)}.searchCodeButton span,.autoFormat span,.CommentSelectedRange span,.UncommentSelectedRange span{width:16px;height:16px;margin-left:6px}.searchCodeButton span{background:url("../icons/searchcode.png") no-repeat}.autoFormat span{background:url("../icons/autoformat.png") no-repeat}.CommentSelectedRange span{background:url("../icons/commentselectedrange.png") no-repeat}.UncommentSelectedRange span{background:url("../icons/uncommentselectedrange.png") no-repeat}.cke_reset_all .CodeMirror-scroll *{white-space:pre}.cke_reset_all .cm-s-cobalt *,.cke_reset_all .cm-s-erlang-dark *,.cke_reset_all .cm-s-lesser-dark *,.cke_reset_all .cm-s-monokai *,.cke_reset_all .cm-s-night *,.cke_reset_all .cm-s-rubyblue *,.cke_reset_all .cm-s-twilight *,.cke_reset_all .cm-s-xq-dark *,.cke_reset_all .cm-s-base16-dark *,.cke_reset_all .cm-s-3024-night *,.cke_reset_all .cm-s-the-matrix *,.cke_reset_all .cm-s-paraiso-dark *,.cke_reset_all .cm-s-paraiso-light *{color:inherit;font:inherit}.cm-s-cobalt .CodeMirror-selected{background:#b36539 !important}.cm-s-erlang-dark .CodeMirror-selected{background:#b36539 !important}.cm-s-lesser-dark .CodeMirror-selected{background:#45443b !important}.cm-s-monokai .CodeMirror-selected{background:#49483e !important}.cm-s-night .CodeMirror-selected{background:#447 !important}.cm-s-rubyblue .CodeMirror-selected{background:#38566f !important}.cm-s-twilight .CodeMirror-selected{background:#323232 !important}.cm-s-xq-dark .CodeMirror-selected{background:#a8f !important}.cm-s-the-matrix .CodeMirror-selected{background:#494949 !important}.cm-s-mbo .CodeMirror-selected{background:#716c62 !important}.cm-s-blackboard .activeline,.cm-s-cobalt .activeline,.cm-s-erlang-dark .activeline,.cm-s-lesser-dark .activeline,.cm-s-monokai .activeline,.cm-s-night .activeline,.cm-s-rubyblue .activeline,.cm-s-vibrant-ink .activeline,.cm-s-xq-dark .activeline,.cm-s-base16-dark .activeline,.cm-s-3024-night .activeline,.cm-s-paraiso-light .activeline,.cm-s-paraiso-dark .activeline,.cm-s-pastel-on-dark .activeline{background:#757575}.cm-s-pastel-on-dark .activeline{background:#404040}.cm-s-mbo .activeline{background:#716c62}.cm-s-twilight .activeline{background:#494949}.cm-s-the-matrix .activeline{background:#060}.CodeMirror-focused .cm-matchhighlight{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);background-position:bottom;background-repeat:repeat-x}.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px #000;-ms-box-shadow:2px 3px 5px #000;box-shadow:2px 3px 5px #000;border-radius:3px;border:1px solid #c0c0c0;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:#000;cursor:pointer}.CodeMirror-hint-active{background:#08f;color:#fff}.cm-trailingspace{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QUXCToH00Y1UgAAACFJREFUCNdjPMDBUc/AwNDAAAFMTAwMDA0OP34wQgX/AQBYgwYEx4f9lQAAAABJRU5ErkJggg==);background-position:bottom left;background-repeat:repeat-x}.CodeMirror-dialog{position:absolute;left:0;right:0;background:inherit;z-index:15;padding:.1em .8em;overflow:hidden;color:inherit}.CodeMirror-dialog-top{border-bottom:1px solid #eee;top:0}.CodeMirror-dialog-bottom{border-top:1px solid #eee;bottom:0}.CodeMirror-dialog input{border:none;outline:none;background:transparent;width:20em;color:inherit;font-family:monospace}.CodeMirror-dialog button{font-size:70%}.CodeMirror-foldmarker{color:#00f;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.CodeMirror-foldgutter{width:.7em}.CodeMirror-foldgutter-open,.CodeMirror-foldgutter-folded{cursor:pointer}.CodeMirror-foldgutter-open:after{content:"\25be "}.CodeMirror-foldgutter-folded:after{content:"\25b8 "}
|
@@ -0,0 +1,206 @@
|
|
1
|
+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
+
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
3
|
+
|
4
|
+
(function(mod) {
|
5
|
+
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
6
|
+
mod(require("../../lib/codemirror"));
|
7
|
+
else if (typeof define == "function" && define.amd) // AMD
|
8
|
+
define(["../../lib/codemirror"], mod);
|
9
|
+
else // Plain browser env
|
10
|
+
mod(CodeMirror);
|
11
|
+
})(function(CodeMirror) {
|
12
|
+
"use strict";
|
13
|
+
|
14
|
+
var noOptions = {};
|
15
|
+
var nonWS = /[^\s\u00a0]/;
|
16
|
+
var Pos = CodeMirror.Pos;
|
17
|
+
|
18
|
+
function firstNonWS(str) {
|
19
|
+
var found = str.search(nonWS);
|
20
|
+
return found == -1 ? 0 : found;
|
21
|
+
}
|
22
|
+
|
23
|
+
CodeMirror.commands.toggleComment = function(cm) {
|
24
|
+
cm.toggleComment();
|
25
|
+
};
|
26
|
+
|
27
|
+
CodeMirror.defineExtension("toggleComment", function(options) {
|
28
|
+
if (!options) options = noOptions;
|
29
|
+
var cm = this;
|
30
|
+
var minLine = Infinity, ranges = this.listSelections(), mode = null;
|
31
|
+
for (var i = ranges.length - 1; i >= 0; i--) {
|
32
|
+
var from = ranges[i].from(), to = ranges[i].to();
|
33
|
+
if (from.line >= minLine) continue;
|
34
|
+
if (to.line >= minLine) to = Pos(minLine, 0);
|
35
|
+
minLine = from.line;
|
36
|
+
if (mode == null) {
|
37
|
+
if (cm.uncomment(from, to, options)) mode = "un";
|
38
|
+
else { cm.lineComment(from, to, options); mode = "line"; }
|
39
|
+
} else if (mode == "un") {
|
40
|
+
cm.uncomment(from, to, options);
|
41
|
+
} else {
|
42
|
+
cm.lineComment(from, to, options);
|
43
|
+
}
|
44
|
+
}
|
45
|
+
});
|
46
|
+
|
47
|
+
// Rough heuristic to try and detect lines that are part of multi-line string
|
48
|
+
function probablyInsideString(cm, pos, line) {
|
49
|
+
return /\bstring\b/.test(cm.getTokenTypeAt(Pos(pos.line, 0))) && !/^[\'\"`]/.test(line)
|
50
|
+
}
|
51
|
+
|
52
|
+
CodeMirror.defineExtension("lineComment", function(from, to, options) {
|
53
|
+
if (!options) options = noOptions;
|
54
|
+
var self = this, mode = self.getModeAt(from);
|
55
|
+
var firstLine = self.getLine(from.line);
|
56
|
+
if (firstLine == null || probablyInsideString(self, from, firstLine)) return;
|
57
|
+
|
58
|
+
var commentString = options.lineComment || mode.lineComment;
|
59
|
+
if (!commentString) {
|
60
|
+
if (options.blockCommentStart || mode.blockCommentStart) {
|
61
|
+
options.fullLines = true;
|
62
|
+
self.blockComment(from, to, options);
|
63
|
+
}
|
64
|
+
return;
|
65
|
+
}
|
66
|
+
|
67
|
+
var end = Math.min(to.ch != 0 || to.line == from.line ? to.line + 1 : to.line, self.lastLine() + 1);
|
68
|
+
var pad = options.padding == null ? " " : options.padding;
|
69
|
+
var blankLines = options.commentBlankLines || from.line == to.line;
|
70
|
+
|
71
|
+
self.operation(function() {
|
72
|
+
if (options.indent) {
|
73
|
+
var baseString = null;
|
74
|
+
for (var i = from.line; i < end; ++i) {
|
75
|
+
var line = self.getLine(i);
|
76
|
+
var whitespace = line.slice(0, firstNonWS(line));
|
77
|
+
if (baseString == null || baseString.length > whitespace.length) {
|
78
|
+
baseString = whitespace;
|
79
|
+
}
|
80
|
+
}
|
81
|
+
for (var i = from.line; i < end; ++i) {
|
82
|
+
var line = self.getLine(i), cut = baseString.length;
|
83
|
+
if (!blankLines && !nonWS.test(line)) continue;
|
84
|
+
if (line.slice(0, cut) != baseString) cut = firstNonWS(line);
|
85
|
+
self.replaceRange(baseString + commentString + pad, Pos(i, 0), Pos(i, cut));
|
86
|
+
}
|
87
|
+
} else {
|
88
|
+
for (var i = from.line; i < end; ++i) {
|
89
|
+
if (blankLines || nonWS.test(self.getLine(i)))
|
90
|
+
self.replaceRange(commentString + pad, Pos(i, 0));
|
91
|
+
}
|
92
|
+
}
|
93
|
+
});
|
94
|
+
});
|
95
|
+
|
96
|
+
CodeMirror.defineExtension("blockComment", function(from, to, options) {
|
97
|
+
if (!options) options = noOptions;
|
98
|
+
var self = this, mode = self.getModeAt(from);
|
99
|
+
var startString = options.blockCommentStart || mode.blockCommentStart;
|
100
|
+
var endString = options.blockCommentEnd || mode.blockCommentEnd;
|
101
|
+
if (!startString || !endString) {
|
102
|
+
if ((options.lineComment || mode.lineComment) && options.fullLines != false)
|
103
|
+
self.lineComment(from, to, options);
|
104
|
+
return;
|
105
|
+
}
|
106
|
+
if (/\bcomment\b/.test(self.getTokenTypeAt(Pos(from.line, 0)))) return
|
107
|
+
|
108
|
+
var end = Math.min(to.line, self.lastLine());
|
109
|
+
if (end != from.line && to.ch == 0 && nonWS.test(self.getLine(end))) --end;
|
110
|
+
|
111
|
+
var pad = options.padding == null ? " " : options.padding;
|
112
|
+
if (from.line > end) return;
|
113
|
+
|
114
|
+
self.operation(function() {
|
115
|
+
if (options.fullLines != false) {
|
116
|
+
var lastLineHasText = nonWS.test(self.getLine(end));
|
117
|
+
self.replaceRange(pad + endString, Pos(end));
|
118
|
+
self.replaceRange(startString + pad, Pos(from.line, 0));
|
119
|
+
var lead = options.blockCommentLead || mode.blockCommentLead;
|
120
|
+
if (lead != null) for (var i = from.line + 1; i <= end; ++i)
|
121
|
+
if (i != end || lastLineHasText)
|
122
|
+
self.replaceRange(lead + pad, Pos(i, 0));
|
123
|
+
} else {
|
124
|
+
self.replaceRange(endString, to);
|
125
|
+
self.replaceRange(startString, from);
|
126
|
+
}
|
127
|
+
});
|
128
|
+
});
|
129
|
+
|
130
|
+
CodeMirror.defineExtension("uncomment", function(from, to, options) {
|
131
|
+
if (!options) options = noOptions;
|
132
|
+
var self = this, mode = self.getModeAt(from);
|
133
|
+
var end = Math.min(to.ch != 0 || to.line == from.line ? to.line : to.line - 1, self.lastLine()), start = Math.min(from.line, end);
|
134
|
+
|
135
|
+
// Try finding line comments
|
136
|
+
var lineString = options.lineComment || mode.lineComment, lines = [];
|
137
|
+
var pad = options.padding == null ? " " : options.padding, didSomething;
|
138
|
+
lineComment: {
|
139
|
+
if (!lineString) break lineComment;
|
140
|
+
for (var i = start; i <= end; ++i) {
|
141
|
+
var line = self.getLine(i);
|
142
|
+
var found = line.indexOf(lineString);
|
143
|
+
if (found > -1 && !/comment/.test(self.getTokenTypeAt(Pos(i, found + 1)))) found = -1;
|
144
|
+
if (found == -1 && nonWS.test(line)) break lineComment;
|
145
|
+
if (found > -1 && nonWS.test(line.slice(0, found))) break lineComment;
|
146
|
+
lines.push(line);
|
147
|
+
}
|
148
|
+
self.operation(function() {
|
149
|
+
for (var i = start; i <= end; ++i) {
|
150
|
+
var line = lines[i - start];
|
151
|
+
var pos = line.indexOf(lineString), endPos = pos + lineString.length;
|
152
|
+
if (pos < 0) continue;
|
153
|
+
if (line.slice(endPos, endPos + pad.length) == pad) endPos += pad.length;
|
154
|
+
didSomething = true;
|
155
|
+
self.replaceRange("", Pos(i, pos), Pos(i, endPos));
|
156
|
+
}
|
157
|
+
});
|
158
|
+
if (didSomething) return true;
|
159
|
+
}
|
160
|
+
|
161
|
+
// Try block comments
|
162
|
+
var startString = options.blockCommentStart || mode.blockCommentStart;
|
163
|
+
var endString = options.blockCommentEnd || mode.blockCommentEnd;
|
164
|
+
if (!startString || !endString) return false;
|
165
|
+
var lead = options.blockCommentLead || mode.blockCommentLead;
|
166
|
+
var startLine = self.getLine(start), open = startLine.indexOf(startString)
|
167
|
+
if (open == -1) return false
|
168
|
+
var endLine = end == start ? startLine : self.getLine(end)
|
169
|
+
var close = endLine.indexOf(endString, end == start ? open + startString.length : 0);
|
170
|
+
if (close == -1 && start != end) {
|
171
|
+
endLine = self.getLine(--end);
|
172
|
+
close = endLine.indexOf(endString);
|
173
|
+
}
|
174
|
+
if (close == -1 ||
|
175
|
+
!/comment/.test(self.getTokenTypeAt(Pos(start, open + 1))) ||
|
176
|
+
!/comment/.test(self.getTokenTypeAt(Pos(end, close + 1))))
|
177
|
+
return false;
|
178
|
+
|
179
|
+
// Avoid killing block comments completely outside the selection.
|
180
|
+
// Positions of the last startString before the start of the selection, and the first endString after it.
|
181
|
+
var lastStart = startLine.lastIndexOf(startString, from.ch);
|
182
|
+
var firstEnd = lastStart == -1 ? -1 : startLine.slice(0, from.ch).indexOf(endString, lastStart + startString.length);
|
183
|
+
if (lastStart != -1 && firstEnd != -1 && firstEnd + endString.length != from.ch) return false;
|
184
|
+
// Positions of the first endString after the end of the selection, and the last startString before it.
|
185
|
+
firstEnd = endLine.indexOf(endString, to.ch);
|
186
|
+
var almostLastStart = endLine.slice(to.ch).lastIndexOf(startString, firstEnd - to.ch);
|
187
|
+
lastStart = (firstEnd == -1 || almostLastStart == -1) ? -1 : to.ch + almostLastStart;
|
188
|
+
if (firstEnd != -1 && lastStart != -1 && lastStart != to.ch) return false;
|
189
|
+
|
190
|
+
self.operation(function() {
|
191
|
+
self.replaceRange("", Pos(end, close - (pad && endLine.slice(close - pad.length, close) == pad ? pad.length : 0)),
|
192
|
+
Pos(end, close + endString.length));
|
193
|
+
var openEnd = open + startString.length;
|
194
|
+
if (pad && startLine.slice(openEnd, openEnd + pad.length) == pad) openEnd += pad.length;
|
195
|
+
self.replaceRange("", Pos(start, open), Pos(start, openEnd));
|
196
|
+
if (lead) for (var i = start + 1; i <= end; ++i) {
|
197
|
+
var line = self.getLine(i), found = line.indexOf(lead);
|
198
|
+
if (found == -1 || nonWS.test(line.slice(0, found))) continue;
|
199
|
+
var foundEnd = found + lead.length;
|
200
|
+
if (pad && line.slice(foundEnd, foundEnd + pad.length) == pad) foundEnd += pad.length;
|
201
|
+
self.replaceRange("", Pos(i, found), Pos(i, foundEnd));
|
202
|
+
}
|
203
|
+
});
|
204
|
+
return true;
|
205
|
+
});
|
206
|
+
});
|
data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/comment/continuecomment.js
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
+
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
3
|
+
|
4
|
+
(function(mod) {
|
5
|
+
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
6
|
+
mod(require("../../lib/codemirror"));
|
7
|
+
else if (typeof define == "function" && define.amd) // AMD
|
8
|
+
define(["../../lib/codemirror"], mod);
|
9
|
+
else // Plain browser env
|
10
|
+
mod(CodeMirror);
|
11
|
+
})(function(CodeMirror) {
|
12
|
+
var modes = ["clike", "css", "javascript"];
|
13
|
+
|
14
|
+
for (var i = 0; i < modes.length; ++i)
|
15
|
+
CodeMirror.extendMode(modes[i], {blockCommentContinue: " * "});
|
16
|
+
|
17
|
+
function continueComment(cm) {
|
18
|
+
if (cm.getOption("disableInput")) return CodeMirror.Pass;
|
19
|
+
var ranges = cm.listSelections(), mode, inserts = [];
|
20
|
+
for (var i = 0; i < ranges.length; i++) {
|
21
|
+
var pos = ranges[i].head, token = cm.getTokenAt(pos);
|
22
|
+
if (token.type != "comment") return CodeMirror.Pass;
|
23
|
+
var modeHere = CodeMirror.innerMode(cm.getMode(), token.state).mode;
|
24
|
+
if (!mode) mode = modeHere;
|
25
|
+
else if (mode != modeHere) return CodeMirror.Pass;
|
26
|
+
|
27
|
+
var insert = null;
|
28
|
+
if (mode.blockCommentStart && mode.blockCommentContinue) {
|
29
|
+
var end = token.string.indexOf(mode.blockCommentEnd);
|
30
|
+
var full = cm.getRange(CodeMirror.Pos(pos.line, 0), CodeMirror.Pos(pos.line, token.end)), found;
|
31
|
+
if (end != -1 && end == token.string.length - mode.blockCommentEnd.length && pos.ch >= end) {
|
32
|
+
// Comment ended, don't continue it
|
33
|
+
} else if (token.string.indexOf(mode.blockCommentStart) == 0) {
|
34
|
+
insert = full.slice(0, token.start);
|
35
|
+
if (!/^\s*$/.test(insert)) {
|
36
|
+
insert = "";
|
37
|
+
for (var j = 0; j < token.start; ++j) insert += " ";
|
38
|
+
}
|
39
|
+
} else if ((found = full.indexOf(mode.blockCommentContinue)) != -1 &&
|
40
|
+
found + mode.blockCommentContinue.length > token.start &&
|
41
|
+
/^\s*$/.test(full.slice(0, found))) {
|
42
|
+
insert = full.slice(0, found);
|
43
|
+
}
|
44
|
+
if (insert != null) insert += mode.blockCommentContinue;
|
45
|
+
}
|
46
|
+
if (insert == null && mode.lineComment && continueLineCommentEnabled(cm)) {
|
47
|
+
var line = cm.getLine(pos.line), found = line.indexOf(mode.lineComment);
|
48
|
+
if (found > -1) {
|
49
|
+
insert = line.slice(0, found);
|
50
|
+
if (/\S/.test(insert)) insert = null;
|
51
|
+
else insert += mode.lineComment + line.slice(found + mode.lineComment.length).match(/^\s*/)[0];
|
52
|
+
}
|
53
|
+
}
|
54
|
+
if (insert == null) return CodeMirror.Pass;
|
55
|
+
inserts[i] = "\n" + insert;
|
56
|
+
}
|
57
|
+
|
58
|
+
cm.operation(function() {
|
59
|
+
for (var i = ranges.length - 1; i >= 0; i--)
|
60
|
+
cm.replaceRange(inserts[i], ranges[i].from(), ranges[i].to(), "+insert");
|
61
|
+
});
|
62
|
+
}
|
63
|
+
|
64
|
+
function continueLineCommentEnabled(cm) {
|
65
|
+
var opt = cm.getOption("continueComments");
|
66
|
+
if (opt && typeof opt == "object")
|
67
|
+
return opt.continueLineComment !== false;
|
68
|
+
return true;
|
69
|
+
}
|
70
|
+
|
71
|
+
CodeMirror.defineOption("continueComments", null, function(cm, val, prev) {
|
72
|
+
if (prev && prev != CodeMirror.Init)
|
73
|
+
cm.removeKeyMap("continueComment");
|
74
|
+
if (val) {
|
75
|
+
var key = "Enter";
|
76
|
+
if (typeof val == "string")
|
77
|
+
key = val;
|
78
|
+
else if (typeof val == "object" && val.key)
|
79
|
+
key = val.key;
|
80
|
+
var map = {name: "continueComment"};
|
81
|
+
map[key] = continueComment;
|
82
|
+
cm.addKeyMap(map);
|
83
|
+
}
|
84
|
+
});
|
85
|
+
});
|
@@ -0,0 +1,32 @@
|
|
1
|
+
.CodeMirror-dialog {
|
2
|
+
position: absolute;
|
3
|
+
left: 0; right: 0;
|
4
|
+
background: inherit;
|
5
|
+
z-index: 15;
|
6
|
+
padding: .1em .8em;
|
7
|
+
overflow: hidden;
|
8
|
+
color: inherit;
|
9
|
+
}
|
10
|
+
|
11
|
+
.CodeMirror-dialog-top {
|
12
|
+
border-bottom: 1px solid #eee;
|
13
|
+
top: 0;
|
14
|
+
}
|
15
|
+
|
16
|
+
.CodeMirror-dialog-bottom {
|
17
|
+
border-top: 1px solid #eee;
|
18
|
+
bottom: 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
.CodeMirror-dialog input {
|
22
|
+
border: none;
|
23
|
+
outline: none;
|
24
|
+
background: transparent;
|
25
|
+
width: 20em;
|
26
|
+
color: inherit;
|
27
|
+
font-family: monospace;
|
28
|
+
}
|
29
|
+
|
30
|
+
.CodeMirror-dialog button {
|
31
|
+
font-size: 70%;
|
32
|
+
}
|
@@ -0,0 +1,157 @@
|
|
1
|
+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
+
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
3
|
+
|
4
|
+
// Open simple dialogs on top of an editor. Relies on dialog.css.
|
5
|
+
|
6
|
+
(function(mod) {
|
7
|
+
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
8
|
+
mod(require("../../lib/codemirror"));
|
9
|
+
else if (typeof define == "function" && define.amd) // AMD
|
10
|
+
define(["../../lib/codemirror"], mod);
|
11
|
+
else // Plain browser env
|
12
|
+
mod(CodeMirror);
|
13
|
+
})(function(CodeMirror) {
|
14
|
+
function dialogDiv(cm, template, bottom) {
|
15
|
+
var wrap = cm.getWrapperElement();
|
16
|
+
var dialog;
|
17
|
+
dialog = wrap.appendChild(document.createElement("div"));
|
18
|
+
if (bottom)
|
19
|
+
dialog.className = "CodeMirror-dialog CodeMirror-dialog-bottom";
|
20
|
+
else
|
21
|
+
dialog.className = "CodeMirror-dialog CodeMirror-dialog-top";
|
22
|
+
|
23
|
+
if (typeof template == "string") {
|
24
|
+
dialog.innerHTML = template;
|
25
|
+
} else { // Assuming it's a detached DOM element.
|
26
|
+
dialog.appendChild(template);
|
27
|
+
}
|
28
|
+
return dialog;
|
29
|
+
}
|
30
|
+
|
31
|
+
function closeNotification(cm, newVal) {
|
32
|
+
if (cm.state.currentNotificationClose)
|
33
|
+
cm.state.currentNotificationClose();
|
34
|
+
cm.state.currentNotificationClose = newVal;
|
35
|
+
}
|
36
|
+
|
37
|
+
CodeMirror.defineExtension("openDialog", function(template, callback, options) {
|
38
|
+
if (!options) options = {};
|
39
|
+
|
40
|
+
closeNotification(this, null);
|
41
|
+
|
42
|
+
var dialog = dialogDiv(this, template, options.bottom);
|
43
|
+
var closed = false, me = this;
|
44
|
+
function close(newVal) {
|
45
|
+
if (typeof newVal == 'string') {
|
46
|
+
inp.value = newVal;
|
47
|
+
} else {
|
48
|
+
if (closed) return;
|
49
|
+
closed = true;
|
50
|
+
dialog.parentNode.removeChild(dialog);
|
51
|
+
me.focus();
|
52
|
+
|
53
|
+
if (options.onClose) options.onClose(dialog);
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
var inp = dialog.getElementsByTagName("input")[0], button;
|
58
|
+
if (inp) {
|
59
|
+
inp.focus();
|
60
|
+
|
61
|
+
if (options.value) {
|
62
|
+
inp.value = options.value;
|
63
|
+
if (options.selectValueOnOpen !== false) {
|
64
|
+
inp.select();
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
68
|
+
if (options.onInput)
|
69
|
+
CodeMirror.on(inp, "input", function(e) { options.onInput(e, inp.value, close);});
|
70
|
+
if (options.onKeyUp)
|
71
|
+
CodeMirror.on(inp, "keyup", function(e) {options.onKeyUp(e, inp.value, close);});
|
72
|
+
|
73
|
+
CodeMirror.on(inp, "keydown", function(e) {
|
74
|
+
if (options && options.onKeyDown && options.onKeyDown(e, inp.value, close)) { return; }
|
75
|
+
if (e.keyCode == 27 || (options.closeOnEnter !== false && e.keyCode == 13)) {
|
76
|
+
inp.blur();
|
77
|
+
CodeMirror.e_stop(e);
|
78
|
+
close();
|
79
|
+
}
|
80
|
+
if (e.keyCode == 13) callback(inp.value, e);
|
81
|
+
});
|
82
|
+
|
83
|
+
if (options.closeOnBlur !== false) CodeMirror.on(inp, "blur", close);
|
84
|
+
} else if (button = dialog.getElementsByTagName("button")[0]) {
|
85
|
+
CodeMirror.on(button, "click", function() {
|
86
|
+
close();
|
87
|
+
me.focus();
|
88
|
+
});
|
89
|
+
|
90
|
+
if (options.closeOnBlur !== false) CodeMirror.on(button, "blur", close);
|
91
|
+
|
92
|
+
button.focus();
|
93
|
+
}
|
94
|
+
return close;
|
95
|
+
});
|
96
|
+
|
97
|
+
CodeMirror.defineExtension("openConfirm", function(template, callbacks, options) {
|
98
|
+
closeNotification(this, null);
|
99
|
+
var dialog = dialogDiv(this, template, options && options.bottom);
|
100
|
+
var buttons = dialog.getElementsByTagName("button");
|
101
|
+
var closed = false, me = this, blurring = 1;
|
102
|
+
function close() {
|
103
|
+
if (closed) return;
|
104
|
+
closed = true;
|
105
|
+
dialog.parentNode.removeChild(dialog);
|
106
|
+
me.focus();
|
107
|
+
}
|
108
|
+
buttons[0].focus();
|
109
|
+
for (var i = 0; i < buttons.length; ++i) {
|
110
|
+
var b = buttons[i];
|
111
|
+
(function(callback) {
|
112
|
+
CodeMirror.on(b, "click", function(e) {
|
113
|
+
CodeMirror.e_preventDefault(e);
|
114
|
+
close();
|
115
|
+
if (callback) callback(me);
|
116
|
+
});
|
117
|
+
})(callbacks[i]);
|
118
|
+
CodeMirror.on(b, "blur", function() {
|
119
|
+
--blurring;
|
120
|
+
setTimeout(function() { if (blurring <= 0) close(); }, 200);
|
121
|
+
});
|
122
|
+
CodeMirror.on(b, "focus", function() { ++blurring; });
|
123
|
+
}
|
124
|
+
});
|
125
|
+
|
126
|
+
/*
|
127
|
+
* openNotification
|
128
|
+
* Opens a notification, that can be closed with an optional timer
|
129
|
+
* (default 5000ms timer) and always closes on click.
|
130
|
+
*
|
131
|
+
* If a notification is opened while another is opened, it will close the
|
132
|
+
* currently opened one and open the new one immediately.
|
133
|
+
*/
|
134
|
+
CodeMirror.defineExtension("openNotification", function(template, options) {
|
135
|
+
closeNotification(this, close);
|
136
|
+
var dialog = dialogDiv(this, template, options && options.bottom);
|
137
|
+
var closed = false, doneTimer;
|
138
|
+
var duration = options && typeof options.duration !== "undefined" ? options.duration : 5000;
|
139
|
+
|
140
|
+
function close() {
|
141
|
+
if (closed) return;
|
142
|
+
closed = true;
|
143
|
+
clearTimeout(doneTimer);
|
144
|
+
dialog.parentNode.removeChild(dialog);
|
145
|
+
}
|
146
|
+
|
147
|
+
CodeMirror.on(dialog, 'click', function(e) {
|
148
|
+
CodeMirror.e_preventDefault(e);
|
149
|
+
close();
|
150
|
+
});
|
151
|
+
|
152
|
+
if (duration)
|
153
|
+
doneTimer = setTimeout(close, duration);
|
154
|
+
|
155
|
+
return close;
|
156
|
+
});
|
157
|
+
});
|