fluentd-ui 0.3.13 → 0.3.14
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of fluentd-ui might be problematic. Click here for more details.
- data/ChangeLog +9 -0
- data/Gemfile.lock +47 -44
- data/README.md +4 -4
- data/app/assets/javascripts/vue/in_tail_format.js +7 -2
- data/app/assets/stylesheets/common.css.scss +16 -0
- data/app/controllers/concerns/setting_history_concern.rb +6 -0
- data/app/controllers/fluentd/settings_controller.rb +37 -8
- data/app/models/fluent_gem.rb +6 -3
- data/app/models/fluentd/agent.rb +1 -0
- data/app/models/fluentd/agent/common.rb +4 -0
- data/app/models/fluentd/agent/fluentd_gem.rb +9 -13
- data/app/models/fluentd/agent/local_common.rb +23 -0
- data/app/models/fluentd/agent/td_agent.rb +4 -0
- data/app/models/fluentd/agent/td_agent/macosx.rb +0 -4
- data/app/models/fluentd/agent/td_agent/unix.rb +0 -4
- data/app/views/fluentd/settings/edit.html.haml +1 -3
- data/app/views/fluentd/settings/histories/show.html.haml +10 -0
- data/app/views/fluentd/settings/running_backup/show.html.haml +11 -0
- data/app/views/shared/settings/_diff.html.erb +21 -0
- data/circle.yml +5 -0
- data/config/application.rb +1 -0
- data/config/locales/translation_en.yml +7 -0
- data/config/locales/translation_ja.yml +7 -0
- data/fluentd-ui.gemspec +1 -0
- data/lib/fluentd-ui.rb +5 -1
- data/lib/fluentd-ui/version.rb +1 -1
- data/spec/features/fluentd/setting/histories_spec.rb +23 -1
- data/spec/features/fluentd/setting/running_backup_spec.rb +22 -1
- data/spec/models/fluentd/agent/local_common_spec.rb +4 -2
- data/spec/models/fluentd/agent_spec.rb +1 -48
- data/spec/models/plugin_spec.rb +2 -2
- data/spec/spec_helper.rb +10 -0
- data/spec/support/fluentd_agent_common_behavior.rb +53 -0
- data/vendor/assets/javascripts/bower/.gitignore +10 -0
- data/vendor/assets/javascripts/bower/vue/.bower.json +4 -4
- data/vendor/assets/javascripts/bower/vue/bower.json +17 -0
- data/vendor/assets/javascripts/bower/vue/dist/vue.js +329 -198
- data/vendor/assets/javascripts/bower/vue/dist/vue.min.js +3 -3
- metadata +107 -291
- checksums.yaml +0 -7
- data/vendor/assets/javascripts/bower/codemirror/AUTHORS +0 -423
- data/vendor/assets/javascripts/bower/codemirror/CONTRIBUTING.md +0 -76
- data/vendor/assets/javascripts/bower/codemirror/LICENSE +0 -19
- data/vendor/assets/javascripts/bower/codemirror/README.md +0 -11
- data/vendor/assets/javascripts/bower/codemirror/addon/comment/comment.js +0 -183
- data/vendor/assets/javascripts/bower/codemirror/addon/comment/continuecomment.js +0 -85
- data/vendor/assets/javascripts/bower/codemirror/addon/dialog/dialog.css +0 -32
- data/vendor/assets/javascripts/bower/codemirror/addon/dialog/dialog.js +0 -155
- data/vendor/assets/javascripts/bower/codemirror/addon/display/fullscreen.css +0 -6
- data/vendor/assets/javascripts/bower/codemirror/addon/display/fullscreen.js +0 -41
- data/vendor/assets/javascripts/bower/codemirror/addon/display/panel.js +0 -94
- data/vendor/assets/javascripts/bower/codemirror/addon/display/placeholder.js +0 -58
- data/vendor/assets/javascripts/bower/codemirror/addon/display/rulers.js +0 -64
- data/vendor/assets/javascripts/bower/codemirror/addon/edit/closebrackets.js +0 -159
- data/vendor/assets/javascripts/bower/codemirror/addon/edit/closetag.js +0 -159
- data/vendor/assets/javascripts/bower/codemirror/addon/edit/continuelist.js +0 -51
- data/vendor/assets/javascripts/bower/codemirror/addon/edit/matchbrackets.js +0 -120
- data/vendor/assets/javascripts/bower/codemirror/addon/edit/matchtags.js +0 -66
- data/vendor/assets/javascripts/bower/codemirror/addon/edit/trailingspace.js +0 -27
- data/vendor/assets/javascripts/bower/codemirror/addon/fold/brace-fold.js +0 -105
- data/vendor/assets/javascripts/bower/codemirror/addon/fold/comment-fold.js +0 -57
- data/vendor/assets/javascripts/bower/codemirror/addon/fold/foldcode.js +0 -145
- data/vendor/assets/javascripts/bower/codemirror/addon/fold/foldgutter.css +0 -20
- data/vendor/assets/javascripts/bower/codemirror/addon/fold/foldgutter.js +0 -134
- data/vendor/assets/javascripts/bower/codemirror/addon/fold/indent-fold.js +0 -44
- data/vendor/assets/javascripts/bower/codemirror/addon/fold/markdown-fold.js +0 -49
- data/vendor/assets/javascripts/bower/codemirror/addon/fold/xml-fold.js +0 -182
- data/vendor/assets/javascripts/bower/codemirror/addon/hint/anyword-hint.js +0 -41
- data/vendor/assets/javascripts/bower/codemirror/addon/hint/css-hint.js +0 -56
- data/vendor/assets/javascripts/bower/codemirror/addon/hint/html-hint.js +0 -348
- data/vendor/assets/javascripts/bower/codemirror/addon/hint/javascript-hint.js +0 -146
- data/vendor/assets/javascripts/bower/codemirror/addon/hint/show-hint.css +0 -38
- data/vendor/assets/javascripts/bower/codemirror/addon/hint/show-hint.js +0 -389
- data/vendor/assets/javascripts/bower/codemirror/addon/hint/sql-hint.js +0 -197
- data/vendor/assets/javascripts/bower/codemirror/addon/hint/xml-hint.js +0 -110
- data/vendor/assets/javascripts/bower/codemirror/addon/lint/coffeescript-lint.js +0 -41
- data/vendor/assets/javascripts/bower/codemirror/addon/lint/css-lint.js +0 -35
- data/vendor/assets/javascripts/bower/codemirror/addon/lint/javascript-lint.js +0 -136
- data/vendor/assets/javascripts/bower/codemirror/addon/lint/json-lint.js +0 -31
- data/vendor/assets/javascripts/bower/codemirror/addon/lint/lint.css +0 -73
- data/vendor/assets/javascripts/bower/codemirror/addon/lint/lint.js +0 -204
- data/vendor/assets/javascripts/bower/codemirror/addon/lint/yaml-lint.js +0 -28
- data/vendor/assets/javascripts/bower/codemirror/addon/merge/merge.css +0 -112
- data/vendor/assets/javascripts/bower/codemirror/addon/merge/merge.js +0 -643
- data/vendor/assets/javascripts/bower/codemirror/addon/mode/loadmode.js +0 -64
- data/vendor/assets/javascripts/bower/codemirror/addon/mode/multiplex.js +0 -118
- data/vendor/assets/javascripts/bower/codemirror/addon/mode/multiplex_test.js +0 -33
- data/vendor/assets/javascripts/bower/codemirror/addon/mode/overlay.js +0 -85
- data/vendor/assets/javascripts/bower/codemirror/addon/mode/simple.js +0 -213
- data/vendor/assets/javascripts/bower/codemirror/addon/runmode/colorize.js +0 -40
- data/vendor/assets/javascripts/bower/codemirror/addon/runmode/runmode-standalone.js +0 -157
- data/vendor/assets/javascripts/bower/codemirror/addon/runmode/runmode.js +0 -72
- data/vendor/assets/javascripts/bower/codemirror/addon/runmode/runmode.node.js +0 -120
- data/vendor/assets/javascripts/bower/codemirror/addon/scroll/annotatescrollbar.js +0 -76
- data/vendor/assets/javascripts/bower/codemirror/addon/scroll/scrollpastend.js +0 -46
- data/vendor/assets/javascripts/bower/codemirror/addon/scroll/simplescrollbars.css +0 -66
- data/vendor/assets/javascripts/bower/codemirror/addon/scroll/simplescrollbars.js +0 -139
- data/vendor/assets/javascripts/bower/codemirror/addon/search/match-highlighter.js +0 -128
- data/vendor/assets/javascripts/bower/codemirror/addon/search/matchesonscrollbar.css +0 -8
- data/vendor/assets/javascripts/bower/codemirror/addon/search/matchesonscrollbar.js +0 -90
- data/vendor/assets/javascripts/bower/codemirror/addon/search/search.js +0 -164
- data/vendor/assets/javascripts/bower/codemirror/addon/search/searchcursor.js +0 -189
- data/vendor/assets/javascripts/bower/codemirror/addon/selection/active-line.js +0 -71
- data/vendor/assets/javascripts/bower/codemirror/addon/selection/mark-selection.js +0 -118
- data/vendor/assets/javascripts/bower/codemirror/addon/tern/tern.css +0 -86
- data/vendor/assets/javascripts/bower/codemirror/addon/tern/tern.js +0 -670
- data/vendor/assets/javascripts/bower/codemirror/addon/tern/worker.js +0 -44
- data/vendor/assets/javascripts/bower/codemirror/addon/wrap/hardwrap.js +0 -139
- data/vendor/assets/javascripts/bower/codemirror/keymap/emacs.js +0 -411
- data/vendor/assets/javascripts/bower/codemirror/keymap/sublime.js +0 -540
- data/vendor/assets/javascripts/bower/codemirror/keymap/vim.js +0 -4901
- data/vendor/assets/javascripts/bower/codemirror/mode/apl/apl.js +0 -175
- data/vendor/assets/javascripts/bower/codemirror/mode/asterisk/asterisk.js +0 -198
- data/vendor/assets/javascripts/bower/codemirror/mode/clike/clike.js +0 -489
- data/vendor/assets/javascripts/bower/codemirror/mode/clike/scala.html +0 -767
- data/vendor/assets/javascripts/bower/codemirror/mode/clojure/clojure.js +0 -243
- data/vendor/assets/javascripts/bower/codemirror/mode/cobol/cobol.js +0 -255
- data/vendor/assets/javascripts/bower/codemirror/mode/coffeescript/coffeescript.js +0 -369
- data/vendor/assets/javascripts/bower/codemirror/mode/commonlisp/commonlisp.js +0 -122
- data/vendor/assets/javascripts/bower/codemirror/mode/css/css.js +0 -717
- data/vendor/assets/javascripts/bower/codemirror/mode/css/less.html +0 -152
- data/vendor/assets/javascripts/bower/codemirror/mode/css/less_test.js +0 -51
- data/vendor/assets/javascripts/bower/codemirror/mode/css/scss.html +0 -157
- data/vendor/assets/javascripts/bower/codemirror/mode/css/scss_test.js +0 -110
- data/vendor/assets/javascripts/bower/codemirror/mode/css/test.js +0 -135
- data/vendor/assets/javascripts/bower/codemirror/mode/cypher/cypher.js +0 -146
- data/vendor/assets/javascripts/bower/codemirror/mode/d/d.js +0 -218
- data/vendor/assets/javascripts/bower/codemirror/mode/dart/dart.js +0 -50
- data/vendor/assets/javascripts/bower/codemirror/mode/diff/diff.js +0 -47
- data/vendor/assets/javascripts/bower/codemirror/mode/django/django.js +0 -67
- data/vendor/assets/javascripts/bower/codemirror/mode/dockerfile/dockerfile.js +0 -76
- data/vendor/assets/javascripts/bower/codemirror/mode/dtd/dtd.js +0 -142
- data/vendor/assets/javascripts/bower/codemirror/mode/dylan/dylan.js +0 -299
- data/vendor/assets/javascripts/bower/codemirror/mode/ebnf/ebnf.js +0 -195
- data/vendor/assets/javascripts/bower/codemirror/mode/ecl/ecl.js +0 -207
- data/vendor/assets/javascripts/bower/codemirror/mode/eiffel/eiffel.js +0 -162
- data/vendor/assets/javascripts/bower/codemirror/mode/erlang/erlang.js +0 -622
- data/vendor/assets/javascripts/bower/codemirror/mode/fortran/fortran.js +0 -188
- data/vendor/assets/javascripts/bower/codemirror/mode/gas/gas.js +0 -345
- data/vendor/assets/javascripts/bower/codemirror/mode/gfm/gfm.js +0 -123
- data/vendor/assets/javascripts/bower/codemirror/mode/gfm/test.js +0 -213
- data/vendor/assets/javascripts/bower/codemirror/mode/gherkin/gherkin.js +0 -178
- data/vendor/assets/javascripts/bower/codemirror/mode/go/go.js +0 -184
- data/vendor/assets/javascripts/bower/codemirror/mode/groovy/groovy.js +0 -226
- data/vendor/assets/javascripts/bower/codemirror/mode/haml/haml.js +0 -159
- data/vendor/assets/javascripts/bower/codemirror/mode/haml/test.js +0 -97
- data/vendor/assets/javascripts/bower/codemirror/mode/haskell/haskell.js +0 -267
- data/vendor/assets/javascripts/bower/codemirror/mode/haxe/haxe.js +0 -518
- data/vendor/assets/javascripts/bower/codemirror/mode/htmlembedded/htmlembedded.js +0 -86
- data/vendor/assets/javascripts/bower/codemirror/mode/htmlmixed/htmlmixed.js +0 -121
- data/vendor/assets/javascripts/bower/codemirror/mode/http/http.js +0 -113
- data/vendor/assets/javascripts/bower/codemirror/mode/idl/idl.js +0 -290
- data/vendor/assets/javascripts/bower/codemirror/mode/jade/jade.js +0 -590
- data/vendor/assets/javascripts/bower/codemirror/mode/javascript/javascript.js +0 -686
- data/vendor/assets/javascripts/bower/codemirror/mode/javascript/json-ld.html +0 -72
- data/vendor/assets/javascripts/bower/codemirror/mode/javascript/test.js +0 -200
- data/vendor/assets/javascripts/bower/codemirror/mode/javascript/typescript.html +0 -61
- data/vendor/assets/javascripts/bower/codemirror/mode/jinja2/jinja2.js +0 -142
- data/vendor/assets/javascripts/bower/codemirror/mode/julia/julia.js +0 -301
- data/vendor/assets/javascripts/bower/codemirror/mode/kotlin/kotlin.js +0 -280
- data/vendor/assets/javascripts/bower/codemirror/mode/livescript/livescript.js +0 -280
- data/vendor/assets/javascripts/bower/codemirror/mode/lua/lua.js +0 -159
- data/vendor/assets/javascripts/bower/codemirror/mode/markdown/markdown.js +0 -765
- data/vendor/assets/javascripts/bower/codemirror/mode/markdown/test.js +0 -754
- data/vendor/assets/javascripts/bower/codemirror/mode/meta.js +0 -165
- data/vendor/assets/javascripts/bower/codemirror/mode/mirc/mirc.js +0 -193
- data/vendor/assets/javascripts/bower/codemirror/mode/mllike/mllike.js +0 -205
- data/vendor/assets/javascripts/bower/codemirror/mode/modelica/modelica.js +0 -245
- data/vendor/assets/javascripts/bower/codemirror/mode/nginx/nginx.js +0 -178
- data/vendor/assets/javascripts/bower/codemirror/mode/ntriples/ntriples.js +0 -186
- data/vendor/assets/javascripts/bower/codemirror/mode/octave/octave.js +0 -135
- data/vendor/assets/javascripts/bower/codemirror/mode/pascal/pascal.js +0 -109
- data/vendor/assets/javascripts/bower/codemirror/mode/pegjs/pegjs.js +0 -114
- data/vendor/assets/javascripts/bower/codemirror/mode/perl/perl.js +0 -832
- data/vendor/assets/javascripts/bower/codemirror/mode/php/php.js +0 -226
- data/vendor/assets/javascripts/bower/codemirror/mode/php/test.js +0 -154
- data/vendor/assets/javascripts/bower/codemirror/mode/pig/pig.js +0 -188
- data/vendor/assets/javascripts/bower/codemirror/mode/properties/properties.js +0 -78
- data/vendor/assets/javascripts/bower/codemirror/mode/puppet/puppet.js +0 -220
- data/vendor/assets/javascripts/bower/codemirror/mode/python/python.js +0 -359
- data/vendor/assets/javascripts/bower/codemirror/mode/q/q.js +0 -139
- data/vendor/assets/javascripts/bower/codemirror/mode/r/r.js +0 -162
- data/vendor/assets/javascripts/bower/codemirror/mode/rpm/rpm.js +0 -101
- data/vendor/assets/javascripts/bower/codemirror/mode/rst/rst.js +0 -557
- data/vendor/assets/javascripts/bower/codemirror/mode/ruby/ruby.js +0 -285
- data/vendor/assets/javascripts/bower/codemirror/mode/ruby/test.js +0 -14
- data/vendor/assets/javascripts/bower/codemirror/mode/rust/rust.js +0 -451
- data/vendor/assets/javascripts/bower/codemirror/mode/sass/sass.js +0 -327
- data/vendor/assets/javascripts/bower/codemirror/mode/scheme/scheme.js +0 -248
- data/vendor/assets/javascripts/bower/codemirror/mode/shell/shell.js +0 -139
- data/vendor/assets/javascripts/bower/codemirror/mode/shell/test.js +0 -58
- data/vendor/assets/javascripts/bower/codemirror/mode/sieve/sieve.js +0 -193
- data/vendor/assets/javascripts/bower/codemirror/mode/slim/slim.js +0 -575
- data/vendor/assets/javascripts/bower/codemirror/mode/slim/test.js +0 -96
- data/vendor/assets/javascripts/bower/codemirror/mode/smalltalk/smalltalk.js +0 -168
- data/vendor/assets/javascripts/bower/codemirror/mode/smarty/smarty.js +0 -221
- data/vendor/assets/javascripts/bower/codemirror/mode/smartymixed/smartymixed.js +0 -197
- data/vendor/assets/javascripts/bower/codemirror/mode/solr/solr.js +0 -104
- data/vendor/assets/javascripts/bower/codemirror/mode/soy/soy.js +0 -198
- data/vendor/assets/javascripts/bower/codemirror/mode/sparql/sparql.js +0 -174
- data/vendor/assets/javascripts/bower/codemirror/mode/spreadsheet/spreadsheet.js +0 -109
- data/vendor/assets/javascripts/bower/codemirror/mode/sql/sql.js +0 -391
- data/vendor/assets/javascripts/bower/codemirror/mode/stex/stex.js +0 -251
- data/vendor/assets/javascripts/bower/codemirror/mode/stex/test.js +0 -123
- data/vendor/assets/javascripts/bower/codemirror/mode/tcl/tcl.js +0 -147
- data/vendor/assets/javascripts/bower/codemirror/mode/textile/test.js +0 -417
- data/vendor/assets/javascripts/bower/codemirror/mode/textile/textile.js +0 -469
- data/vendor/assets/javascripts/bower/codemirror/mode/tiddlywiki/tiddlywiki.css +0 -14
- data/vendor/assets/javascripts/bower/codemirror/mode/tiddlywiki/tiddlywiki.js +0 -369
- data/vendor/assets/javascripts/bower/codemirror/mode/tiki/tiki.css +0 -26
- data/vendor/assets/javascripts/bower/codemirror/mode/tiki/tiki.js +0 -323
- data/vendor/assets/javascripts/bower/codemirror/mode/toml/toml.js +0 -88
- data/vendor/assets/javascripts/bower/codemirror/mode/tornado/tornado.js +0 -68
- data/vendor/assets/javascripts/bower/codemirror/mode/turtle/turtle.js +0 -162
- data/vendor/assets/javascripts/bower/codemirror/mode/vb/vb.js +0 -274
- data/vendor/assets/javascripts/bower/codemirror/mode/vbscript/vbscript.js +0 -350
- data/vendor/assets/javascripts/bower/codemirror/mode/velocity/velocity.js +0 -201
- data/vendor/assets/javascripts/bower/codemirror/mode/verilog/test.js +0 -273
- data/vendor/assets/javascripts/bower/codemirror/mode/verilog/verilog.js +0 -364
- data/vendor/assets/javascripts/bower/codemirror/mode/xml/test.js +0 -51
- data/vendor/assets/javascripts/bower/codemirror/mode/xml/xml.js +0 -384
- data/vendor/assets/javascripts/bower/codemirror/mode/xquery/test.js +0 -67
- data/vendor/assets/javascripts/bower/codemirror/mode/xquery/xquery.js +0 -447
- data/vendor/assets/javascripts/bower/codemirror/mode/yaml/yaml.js +0 -117
- data/vendor/assets/javascripts/bower/codemirror/mode/z80/z80.js +0 -100
- data/vendor/assets/javascripts/bower/vue/LICENSE +0 -21
- data/vendor/assets/javascripts/bower/vue/src/api/child.js +0 -53
- data/vendor/assets/javascripts/bower/vue/src/api/data.js +0 -161
- data/vendor/assets/javascripts/bower/vue/src/api/dom.js +0 -211
- data/vendor/assets/javascripts/bower/vue/src/api/events.js +0 -176
- data/vendor/assets/javascripts/bower/vue/src/api/global.js +0 -146
- data/vendor/assets/javascripts/bower/vue/src/api/lifecycle.js +0 -72
- data/vendor/assets/javascripts/bower/vue/src/batcher.js +0 -65
- data/vendor/assets/javascripts/bower/vue/src/cache.js +0 -112
- data/vendor/assets/javascripts/bower/vue/src/compiler/compile.js +0 -549
- data/vendor/assets/javascripts/bower/vue/src/compiler/transclude.js +0 -146
- data/vendor/assets/javascripts/bower/vue/src/config.js +0 -79
- data/vendor/assets/javascripts/bower/vue/src/directive.js +0 -219
- data/vendor/assets/javascripts/bower/vue/src/directives/attr.js +0 -32
- data/vendor/assets/javascripts/bower/vue/src/directives/class.js +0 -18
- data/vendor/assets/javascripts/bower/vue/src/directives/cloak.js +0 -12
- data/vendor/assets/javascripts/bower/vue/src/directives/component.js +0 -196
- data/vendor/assets/javascripts/bower/vue/src/directives/el.js +0 -13
- data/vendor/assets/javascripts/bower/vue/src/directives/html.js +0 -38
- data/vendor/assets/javascripts/bower/vue/src/directives/if.js +0 -87
- data/vendor/assets/javascripts/bower/vue/src/directives/index.js +0 -22
- data/vendor/assets/javascripts/bower/vue/src/directives/model/checkbox.js +0 -25
- data/vendor/assets/javascripts/bower/vue/src/directives/model/default.js +0 -123
- data/vendor/assets/javascripts/bower/vue/src/directives/model/index.js +0 -56
- data/vendor/assets/javascripts/bower/vue/src/directives/model/radio.js +0 -26
- data/vendor/assets/javascripts/bower/vue/src/directives/model/select.js +0 -166
- data/vendor/assets/javascripts/bower/vue/src/directives/on.js +0 -59
- data/vendor/assets/javascripts/bower/vue/src/directives/partial.js +0 -44
- data/vendor/assets/javascripts/bower/vue/src/directives/ref.js +0 -24
- data/vendor/assets/javascripts/bower/vue/src/directives/repeat.js +0 -503
- data/vendor/assets/javascripts/bower/vue/src/directives/show.js +0 -8
- data/vendor/assets/javascripts/bower/vue/src/directives/style.js +0 -58
- data/vendor/assets/javascripts/bower/vue/src/directives/text.js +0 -15
- data/vendor/assets/javascripts/bower/vue/src/directives/transition.js +0 -12
- data/vendor/assets/javascripts/bower/vue/src/directives/with.js +0 -47
- data/vendor/assets/javascripts/bower/vue/src/filters/array-filters.js +0 -87
- data/vendor/assets/javascripts/bower/vue/src/filters/index.js +0 -135
- data/vendor/assets/javascripts/bower/vue/src/instance/compile.js +0 -179
- data/vendor/assets/javascripts/bower/vue/src/instance/events.js +0 -122
- data/vendor/assets/javascripts/bower/vue/src/instance/init.js +0 -76
- data/vendor/assets/javascripts/bower/vue/src/instance/scope.js +0 -217
- data/vendor/assets/javascripts/bower/vue/src/observer/array.js +0 -90
- data/vendor/assets/javascripts/bower/vue/src/observer/dep.js +0 -50
- data/vendor/assets/javascripts/bower/vue/src/observer/index.js +0 -235
- data/vendor/assets/javascripts/bower/vue/src/observer/object.js +0 -66
- data/vendor/assets/javascripts/bower/vue/src/parsers/directive.js +0 -159
- data/vendor/assets/javascripts/bower/vue/src/parsers/expression.js +0 -226
- data/vendor/assets/javascripts/bower/vue/src/parsers/path.js +0 -300
- data/vendor/assets/javascripts/bower/vue/src/parsers/template.js +0 -248
- data/vendor/assets/javascripts/bower/vue/src/parsers/text.js +0 -178
- data/vendor/assets/javascripts/bower/vue/src/transition/css.js +0 -189
- data/vendor/assets/javascripts/bower/vue/src/transition/index.js +0 -151
- data/vendor/assets/javascripts/bower/vue/src/transition/js.js +0 -43
- data/vendor/assets/javascripts/bower/vue/src/util/debug.js +0 -50
- data/vendor/assets/javascripts/bower/vue/src/util/dom.js +0 -197
- data/vendor/assets/javascripts/bower/vue/src/util/env.js +0 -74
- data/vendor/assets/javascripts/bower/vue/src/util/filter.js +0 -72
- data/vendor/assets/javascripts/bower/vue/src/util/index.js +0 -8
- data/vendor/assets/javascripts/bower/vue/src/util/lang.js +0 -175
- data/vendor/assets/javascripts/bower/vue/src/util/merge-option.js +0 -255
- data/vendor/assets/javascripts/bower/vue/src/vue.js +0 -84
- data/vendor/assets/javascripts/bower/vue/src/watcher.js +0 -240
@@ -1,56 +0,0 @@
|
|
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"), require("../../mode/css/css"));
|
7
|
-
else if (typeof define == "function" && define.amd) // AMD
|
8
|
-
define(["../../lib/codemirror", "../../mode/css/css"], mod);
|
9
|
-
else // Plain browser env
|
10
|
-
mod(CodeMirror);
|
11
|
-
})(function(CodeMirror) {
|
12
|
-
"use strict";
|
13
|
-
|
14
|
-
var pseudoClasses = {link: 1, visited: 1, active: 1, hover: 1, focus: 1,
|
15
|
-
"first-letter": 1, "first-line": 1, "first-child": 1,
|
16
|
-
before: 1, after: 1, lang: 1};
|
17
|
-
|
18
|
-
CodeMirror.registerHelper("hint", "css", function(cm) {
|
19
|
-
var cur = cm.getCursor(), token = cm.getTokenAt(cur);
|
20
|
-
var inner = CodeMirror.innerMode(cm.getMode(), token.state);
|
21
|
-
if (inner.mode.name != "css") return;
|
22
|
-
|
23
|
-
var start = token.start, end = cur.ch, word = token.string.slice(0, end - start);
|
24
|
-
if (/[^\w$_-]/.test(word)) {
|
25
|
-
word = ""; start = end = cur.ch;
|
26
|
-
}
|
27
|
-
|
28
|
-
var spec = CodeMirror.resolveMode("text/css");
|
29
|
-
|
30
|
-
var result = [];
|
31
|
-
function add(keywords) {
|
32
|
-
for (var name in keywords)
|
33
|
-
if (!word || name.lastIndexOf(word, 0) == 0)
|
34
|
-
result.push(name);
|
35
|
-
}
|
36
|
-
|
37
|
-
var st = inner.state.state;
|
38
|
-
if (st == "pseudo" || token.type == "variable-3") {
|
39
|
-
add(pseudoClasses);
|
40
|
-
} else if (st == "block" || st == "maybeprop") {
|
41
|
-
add(spec.propertyKeywords);
|
42
|
-
} else if (st == "prop" || st == "parens" || st == "at" || st == "params") {
|
43
|
-
add(spec.valueKeywords);
|
44
|
-
add(spec.colorKeywords);
|
45
|
-
} else if (st == "media" || st == "media_parens") {
|
46
|
-
add(spec.mediaTypes);
|
47
|
-
add(spec.mediaFeatures);
|
48
|
-
}
|
49
|
-
|
50
|
-
if (result.length) return {
|
51
|
-
list: result,
|
52
|
-
from: CodeMirror.Pos(cur.line, start),
|
53
|
-
to: CodeMirror.Pos(cur.line, end)
|
54
|
-
};
|
55
|
-
});
|
56
|
-
});
|
@@ -1,348 +0,0 @@
|
|
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"), require("./xml-hint"));
|
7
|
-
else if (typeof define == "function" && define.amd) // AMD
|
8
|
-
define(["../../lib/codemirror", "./xml-hint"], mod);
|
9
|
-
else // Plain browser env
|
10
|
-
mod(CodeMirror);
|
11
|
-
})(function(CodeMirror) {
|
12
|
-
"use strict";
|
13
|
-
|
14
|
-
var langs = "ab aa af ak sq am ar an hy as av ae ay az bm ba eu be bn bh bi bs br bg my ca ch ce ny zh cv kw co cr hr cs da dv nl dz en eo et ee fo fj fi fr ff gl ka de el gn gu ht ha he hz hi ho hu ia id ie ga ig ik io is it iu ja jv kl kn kr ks kk km ki rw ky kv kg ko ku kj la lb lg li ln lo lt lu lv gv mk mg ms ml mt mi mr mh mn na nv nb nd ne ng nn no ii nr oc oj cu om or os pa pi fa pl ps pt qu rm rn ro ru sa sc sd se sm sg sr gd sn si sk sl so st es su sw ss sv ta te tg th ti bo tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa cy wo fy xh yi yo za zu".split(" ");
|
15
|
-
var targets = ["_blank", "_self", "_top", "_parent"];
|
16
|
-
var charsets = ["ascii", "utf-8", "utf-16", "latin1", "latin1"];
|
17
|
-
var methods = ["get", "post", "put", "delete"];
|
18
|
-
var encs = ["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"];
|
19
|
-
var media = ["all", "screen", "print", "embossed", "braille", "handheld", "print", "projection", "screen", "tty", "tv", "speech",
|
20
|
-
"3d-glasses", "resolution [>][<][=] [X]", "device-aspect-ratio: X/Y", "orientation:portrait",
|
21
|
-
"orientation:landscape", "device-height: [X]", "device-width: [X]"];
|
22
|
-
var s = { attrs: {} }; // Simple tag, reused for a whole lot of tags
|
23
|
-
|
24
|
-
var data = {
|
25
|
-
a: {
|
26
|
-
attrs: {
|
27
|
-
href: null, ping: null, type: null,
|
28
|
-
media: media,
|
29
|
-
target: targets,
|
30
|
-
hreflang: langs
|
31
|
-
}
|
32
|
-
},
|
33
|
-
abbr: s,
|
34
|
-
acronym: s,
|
35
|
-
address: s,
|
36
|
-
applet: s,
|
37
|
-
area: {
|
38
|
-
attrs: {
|
39
|
-
alt: null, coords: null, href: null, target: null, ping: null,
|
40
|
-
media: media, hreflang: langs, type: null,
|
41
|
-
shape: ["default", "rect", "circle", "poly"]
|
42
|
-
}
|
43
|
-
},
|
44
|
-
article: s,
|
45
|
-
aside: s,
|
46
|
-
audio: {
|
47
|
-
attrs: {
|
48
|
-
src: null, mediagroup: null,
|
49
|
-
crossorigin: ["anonymous", "use-credentials"],
|
50
|
-
preload: ["none", "metadata", "auto"],
|
51
|
-
autoplay: ["", "autoplay"],
|
52
|
-
loop: ["", "loop"],
|
53
|
-
controls: ["", "controls"]
|
54
|
-
}
|
55
|
-
},
|
56
|
-
b: s,
|
57
|
-
base: { attrs: { href: null, target: targets } },
|
58
|
-
basefont: s,
|
59
|
-
bdi: s,
|
60
|
-
bdo: s,
|
61
|
-
big: s,
|
62
|
-
blockquote: { attrs: { cite: null } },
|
63
|
-
body: s,
|
64
|
-
br: s,
|
65
|
-
button: {
|
66
|
-
attrs: {
|
67
|
-
form: null, formaction: null, name: null, value: null,
|
68
|
-
autofocus: ["", "autofocus"],
|
69
|
-
disabled: ["", "autofocus"],
|
70
|
-
formenctype: encs,
|
71
|
-
formmethod: methods,
|
72
|
-
formnovalidate: ["", "novalidate"],
|
73
|
-
formtarget: targets,
|
74
|
-
type: ["submit", "reset", "button"]
|
75
|
-
}
|
76
|
-
},
|
77
|
-
canvas: { attrs: { width: null, height: null } },
|
78
|
-
caption: s,
|
79
|
-
center: s,
|
80
|
-
cite: s,
|
81
|
-
code: s,
|
82
|
-
col: { attrs: { span: null } },
|
83
|
-
colgroup: { attrs: { span: null } },
|
84
|
-
command: {
|
85
|
-
attrs: {
|
86
|
-
type: ["command", "checkbox", "radio"],
|
87
|
-
label: null, icon: null, radiogroup: null, command: null, title: null,
|
88
|
-
disabled: ["", "disabled"],
|
89
|
-
checked: ["", "checked"]
|
90
|
-
}
|
91
|
-
},
|
92
|
-
data: { attrs: { value: null } },
|
93
|
-
datagrid: { attrs: { disabled: ["", "disabled"], multiple: ["", "multiple"] } },
|
94
|
-
datalist: { attrs: { data: null } },
|
95
|
-
dd: s,
|
96
|
-
del: { attrs: { cite: null, datetime: null } },
|
97
|
-
details: { attrs: { open: ["", "open"] } },
|
98
|
-
dfn: s,
|
99
|
-
dir: s,
|
100
|
-
div: s,
|
101
|
-
dl: s,
|
102
|
-
dt: s,
|
103
|
-
em: s,
|
104
|
-
embed: { attrs: { src: null, type: null, width: null, height: null } },
|
105
|
-
eventsource: { attrs: { src: null } },
|
106
|
-
fieldset: { attrs: { disabled: ["", "disabled"], form: null, name: null } },
|
107
|
-
figcaption: s,
|
108
|
-
figure: s,
|
109
|
-
font: s,
|
110
|
-
footer: s,
|
111
|
-
form: {
|
112
|
-
attrs: {
|
113
|
-
action: null, name: null,
|
114
|
-
"accept-charset": charsets,
|
115
|
-
autocomplete: ["on", "off"],
|
116
|
-
enctype: encs,
|
117
|
-
method: methods,
|
118
|
-
novalidate: ["", "novalidate"],
|
119
|
-
target: targets
|
120
|
-
}
|
121
|
-
},
|
122
|
-
frame: s,
|
123
|
-
frameset: s,
|
124
|
-
h1: s, h2: s, h3: s, h4: s, h5: s, h6: s,
|
125
|
-
head: {
|
126
|
-
attrs: {},
|
127
|
-
children: ["title", "base", "link", "style", "meta", "script", "noscript", "command"]
|
128
|
-
},
|
129
|
-
header: s,
|
130
|
-
hgroup: s,
|
131
|
-
hr: s,
|
132
|
-
html: {
|
133
|
-
attrs: { manifest: null },
|
134
|
-
children: ["head", "body"]
|
135
|
-
},
|
136
|
-
i: s,
|
137
|
-
iframe: {
|
138
|
-
attrs: {
|
139
|
-
src: null, srcdoc: null, name: null, width: null, height: null,
|
140
|
-
sandbox: ["allow-top-navigation", "allow-same-origin", "allow-forms", "allow-scripts"],
|
141
|
-
seamless: ["", "seamless"]
|
142
|
-
}
|
143
|
-
},
|
144
|
-
img: {
|
145
|
-
attrs: {
|
146
|
-
alt: null, src: null, ismap: null, usemap: null, width: null, height: null,
|
147
|
-
crossorigin: ["anonymous", "use-credentials"]
|
148
|
-
}
|
149
|
-
},
|
150
|
-
input: {
|
151
|
-
attrs: {
|
152
|
-
alt: null, dirname: null, form: null, formaction: null,
|
153
|
-
height: null, list: null, max: null, maxlength: null, min: null,
|
154
|
-
name: null, pattern: null, placeholder: null, size: null, src: null,
|
155
|
-
step: null, value: null, width: null,
|
156
|
-
accept: ["audio/*", "video/*", "image/*"],
|
157
|
-
autocomplete: ["on", "off"],
|
158
|
-
autofocus: ["", "autofocus"],
|
159
|
-
checked: ["", "checked"],
|
160
|
-
disabled: ["", "disabled"],
|
161
|
-
formenctype: encs,
|
162
|
-
formmethod: methods,
|
163
|
-
formnovalidate: ["", "novalidate"],
|
164
|
-
formtarget: targets,
|
165
|
-
multiple: ["", "multiple"],
|
166
|
-
readonly: ["", "readonly"],
|
167
|
-
required: ["", "required"],
|
168
|
-
type: ["hidden", "text", "search", "tel", "url", "email", "password", "datetime", "date", "month",
|
169
|
-
"week", "time", "datetime-local", "number", "range", "color", "checkbox", "radio",
|
170
|
-
"file", "submit", "image", "reset", "button"]
|
171
|
-
}
|
172
|
-
},
|
173
|
-
ins: { attrs: { cite: null, datetime: null } },
|
174
|
-
kbd: s,
|
175
|
-
keygen: {
|
176
|
-
attrs: {
|
177
|
-
challenge: null, form: null, name: null,
|
178
|
-
autofocus: ["", "autofocus"],
|
179
|
-
disabled: ["", "disabled"],
|
180
|
-
keytype: ["RSA"]
|
181
|
-
}
|
182
|
-
},
|
183
|
-
label: { attrs: { "for": null, form: null } },
|
184
|
-
legend: s,
|
185
|
-
li: { attrs: { value: null } },
|
186
|
-
link: {
|
187
|
-
attrs: {
|
188
|
-
href: null, type: null,
|
189
|
-
hreflang: langs,
|
190
|
-
media: media,
|
191
|
-
sizes: ["all", "16x16", "16x16 32x32", "16x16 32x32 64x64"]
|
192
|
-
}
|
193
|
-
},
|
194
|
-
map: { attrs: { name: null } },
|
195
|
-
mark: s,
|
196
|
-
menu: { attrs: { label: null, type: ["list", "context", "toolbar"] } },
|
197
|
-
meta: {
|
198
|
-
attrs: {
|
199
|
-
content: null,
|
200
|
-
charset: charsets,
|
201
|
-
name: ["viewport", "application-name", "author", "description", "generator", "keywords"],
|
202
|
-
"http-equiv": ["content-language", "content-type", "default-style", "refresh"]
|
203
|
-
}
|
204
|
-
},
|
205
|
-
meter: { attrs: { value: null, min: null, low: null, high: null, max: null, optimum: null } },
|
206
|
-
nav: s,
|
207
|
-
noframes: s,
|
208
|
-
noscript: s,
|
209
|
-
object: {
|
210
|
-
attrs: {
|
211
|
-
data: null, type: null, name: null, usemap: null, form: null, width: null, height: null,
|
212
|
-
typemustmatch: ["", "typemustmatch"]
|
213
|
-
}
|
214
|
-
},
|
215
|
-
ol: { attrs: { reversed: ["", "reversed"], start: null, type: ["1", "a", "A", "i", "I"] } },
|
216
|
-
optgroup: { attrs: { disabled: ["", "disabled"], label: null } },
|
217
|
-
option: { attrs: { disabled: ["", "disabled"], label: null, selected: ["", "selected"], value: null } },
|
218
|
-
output: { attrs: { "for": null, form: null, name: null } },
|
219
|
-
p: s,
|
220
|
-
param: { attrs: { name: null, value: null } },
|
221
|
-
pre: s,
|
222
|
-
progress: { attrs: { value: null, max: null } },
|
223
|
-
q: { attrs: { cite: null } },
|
224
|
-
rp: s,
|
225
|
-
rt: s,
|
226
|
-
ruby: s,
|
227
|
-
s: s,
|
228
|
-
samp: s,
|
229
|
-
script: {
|
230
|
-
attrs: {
|
231
|
-
type: ["text/javascript"],
|
232
|
-
src: null,
|
233
|
-
async: ["", "async"],
|
234
|
-
defer: ["", "defer"],
|
235
|
-
charset: charsets
|
236
|
-
}
|
237
|
-
},
|
238
|
-
section: s,
|
239
|
-
select: {
|
240
|
-
attrs: {
|
241
|
-
form: null, name: null, size: null,
|
242
|
-
autofocus: ["", "autofocus"],
|
243
|
-
disabled: ["", "disabled"],
|
244
|
-
multiple: ["", "multiple"]
|
245
|
-
}
|
246
|
-
},
|
247
|
-
small: s,
|
248
|
-
source: { attrs: { src: null, type: null, media: null } },
|
249
|
-
span: s,
|
250
|
-
strike: s,
|
251
|
-
strong: s,
|
252
|
-
style: {
|
253
|
-
attrs: {
|
254
|
-
type: ["text/css"],
|
255
|
-
media: media,
|
256
|
-
scoped: null
|
257
|
-
}
|
258
|
-
},
|
259
|
-
sub: s,
|
260
|
-
summary: s,
|
261
|
-
sup: s,
|
262
|
-
table: s,
|
263
|
-
tbody: s,
|
264
|
-
td: { attrs: { colspan: null, rowspan: null, headers: null } },
|
265
|
-
textarea: {
|
266
|
-
attrs: {
|
267
|
-
dirname: null, form: null, maxlength: null, name: null, placeholder: null,
|
268
|
-
rows: null, cols: null,
|
269
|
-
autofocus: ["", "autofocus"],
|
270
|
-
disabled: ["", "disabled"],
|
271
|
-
readonly: ["", "readonly"],
|
272
|
-
required: ["", "required"],
|
273
|
-
wrap: ["soft", "hard"]
|
274
|
-
}
|
275
|
-
},
|
276
|
-
tfoot: s,
|
277
|
-
th: { attrs: { colspan: null, rowspan: null, headers: null, scope: ["row", "col", "rowgroup", "colgroup"] } },
|
278
|
-
thead: s,
|
279
|
-
time: { attrs: { datetime: null } },
|
280
|
-
title: s,
|
281
|
-
tr: s,
|
282
|
-
track: {
|
283
|
-
attrs: {
|
284
|
-
src: null, label: null, "default": null,
|
285
|
-
kind: ["subtitles", "captions", "descriptions", "chapters", "metadata"],
|
286
|
-
srclang: langs
|
287
|
-
}
|
288
|
-
},
|
289
|
-
tt: s,
|
290
|
-
u: s,
|
291
|
-
ul: s,
|
292
|
-
"var": s,
|
293
|
-
video: {
|
294
|
-
attrs: {
|
295
|
-
src: null, poster: null, width: null, height: null,
|
296
|
-
crossorigin: ["anonymous", "use-credentials"],
|
297
|
-
preload: ["auto", "metadata", "none"],
|
298
|
-
autoplay: ["", "autoplay"],
|
299
|
-
mediagroup: ["movie"],
|
300
|
-
muted: ["", "muted"],
|
301
|
-
controls: ["", "controls"]
|
302
|
-
}
|
303
|
-
},
|
304
|
-
wbr: s
|
305
|
-
};
|
306
|
-
|
307
|
-
var globalAttrs = {
|
308
|
-
accesskey: ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
309
|
-
"class": null,
|
310
|
-
contenteditable: ["true", "false"],
|
311
|
-
contextmenu: null,
|
312
|
-
dir: ["ltr", "rtl", "auto"],
|
313
|
-
draggable: ["true", "false", "auto"],
|
314
|
-
dropzone: ["copy", "move", "link", "string:", "file:"],
|
315
|
-
hidden: ["hidden"],
|
316
|
-
id: null,
|
317
|
-
inert: ["inert"],
|
318
|
-
itemid: null,
|
319
|
-
itemprop: null,
|
320
|
-
itemref: null,
|
321
|
-
itemscope: ["itemscope"],
|
322
|
-
itemtype: null,
|
323
|
-
lang: ["en", "es"],
|
324
|
-
spellcheck: ["true", "false"],
|
325
|
-
style: null,
|
326
|
-
tabindex: ["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
327
|
-
title: null,
|
328
|
-
translate: ["yes", "no"],
|
329
|
-
onclick: null,
|
330
|
-
rel: ["stylesheet", "alternate", "author", "bookmark", "help", "license", "next", "nofollow", "noreferrer", "prefetch", "prev", "search", "tag"]
|
331
|
-
};
|
332
|
-
function populate(obj) {
|
333
|
-
for (var attr in globalAttrs) if (globalAttrs.hasOwnProperty(attr))
|
334
|
-
obj.attrs[attr] = globalAttrs[attr];
|
335
|
-
}
|
336
|
-
|
337
|
-
populate(s);
|
338
|
-
for (var tag in data) if (data.hasOwnProperty(tag) && data[tag] != s)
|
339
|
-
populate(data[tag]);
|
340
|
-
|
341
|
-
CodeMirror.htmlSchema = data;
|
342
|
-
function htmlHint(cm, options) {
|
343
|
-
var local = {schemaInfo: data};
|
344
|
-
if (options) for (var opt in options) local[opt] = options[opt];
|
345
|
-
return CodeMirror.hint.xml(cm, local);
|
346
|
-
}
|
347
|
-
CodeMirror.registerHelper("hint", "html", htmlHint);
|
348
|
-
});
|
@@ -1,146 +0,0 @@
|
|
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 Pos = CodeMirror.Pos;
|
13
|
-
|
14
|
-
function forEach(arr, f) {
|
15
|
-
for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]);
|
16
|
-
}
|
17
|
-
|
18
|
-
function arrayContains(arr, item) {
|
19
|
-
if (!Array.prototype.indexOf) {
|
20
|
-
var i = arr.length;
|
21
|
-
while (i--) {
|
22
|
-
if (arr[i] === item) {
|
23
|
-
return true;
|
24
|
-
}
|
25
|
-
}
|
26
|
-
return false;
|
27
|
-
}
|
28
|
-
return arr.indexOf(item) != -1;
|
29
|
-
}
|
30
|
-
|
31
|
-
function scriptHint(editor, keywords, getToken, options) {
|
32
|
-
// Find the token at the cursor
|
33
|
-
var cur = editor.getCursor(), token = getToken(editor, cur);
|
34
|
-
if (/\b(?:string|comment)\b/.test(token.type)) return;
|
35
|
-
token.state = CodeMirror.innerMode(editor.getMode(), token.state).state;
|
36
|
-
|
37
|
-
// If it's not a 'word-style' token, ignore the token.
|
38
|
-
if (!/^[\w$_]*$/.test(token.string)) {
|
39
|
-
token = {start: cur.ch, end: cur.ch, string: "", state: token.state,
|
40
|
-
type: token.string == "." ? "property" : null};
|
41
|
-
} else if (token.end > cur.ch) {
|
42
|
-
token.end = cur.ch;
|
43
|
-
token.string = token.string.slice(0, cur.ch - token.start);
|
44
|
-
}
|
45
|
-
|
46
|
-
var tprop = token;
|
47
|
-
// If it is a property, find out what it is a property of.
|
48
|
-
while (tprop.type == "property") {
|
49
|
-
tprop = getToken(editor, Pos(cur.line, tprop.start));
|
50
|
-
if (tprop.string != ".") return;
|
51
|
-
tprop = getToken(editor, Pos(cur.line, tprop.start));
|
52
|
-
if (!context) var context = [];
|
53
|
-
context.push(tprop);
|
54
|
-
}
|
55
|
-
return {list: getCompletions(token, context, keywords, options),
|
56
|
-
from: Pos(cur.line, token.start),
|
57
|
-
to: Pos(cur.line, token.end)};
|
58
|
-
}
|
59
|
-
|
60
|
-
function javascriptHint(editor, options) {
|
61
|
-
return scriptHint(editor, javascriptKeywords,
|
62
|
-
function (e, cur) {return e.getTokenAt(cur);},
|
63
|
-
options);
|
64
|
-
};
|
65
|
-
CodeMirror.registerHelper("hint", "javascript", javascriptHint);
|
66
|
-
|
67
|
-
function getCoffeeScriptToken(editor, cur) {
|
68
|
-
// This getToken, it is for coffeescript, imitates the behavior of
|
69
|
-
// getTokenAt method in javascript.js, that is, returning "property"
|
70
|
-
// type and treat "." as indepenent token.
|
71
|
-
var token = editor.getTokenAt(cur);
|
72
|
-
if (cur.ch == token.start + 1 && token.string.charAt(0) == '.') {
|
73
|
-
token.end = token.start;
|
74
|
-
token.string = '.';
|
75
|
-
token.type = "property";
|
76
|
-
}
|
77
|
-
else if (/^\.[\w$_]*$/.test(token.string)) {
|
78
|
-
token.type = "property";
|
79
|
-
token.start++;
|
80
|
-
token.string = token.string.replace(/\./, '');
|
81
|
-
}
|
82
|
-
return token;
|
83
|
-
}
|
84
|
-
|
85
|
-
function coffeescriptHint(editor, options) {
|
86
|
-
return scriptHint(editor, coffeescriptKeywords, getCoffeeScriptToken, options);
|
87
|
-
}
|
88
|
-
CodeMirror.registerHelper("hint", "coffeescript", coffeescriptHint);
|
89
|
-
|
90
|
-
var stringProps = ("charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight " +
|
91
|
-
"toUpperCase toLowerCase split concat match replace search").split(" ");
|
92
|
-
var arrayProps = ("length concat join splice push pop shift unshift slice reverse sort indexOf " +
|
93
|
-
"lastIndexOf every some filter forEach map reduce reduceRight ").split(" ");
|
94
|
-
var funcProps = "prototype apply call bind".split(" ");
|
95
|
-
var javascriptKeywords = ("break case catch continue debugger default delete do else false finally for function " +
|
96
|
-
"if in instanceof new null return switch throw true try typeof var void while with").split(" ");
|
97
|
-
var coffeescriptKeywords = ("and break catch class continue delete do else extends false finally for " +
|
98
|
-
"if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes").split(" ");
|
99
|
-
|
100
|
-
function getCompletions(token, context, keywords, options) {
|
101
|
-
var found = [], start = token.string, global = options && options.globalScope || window;
|
102
|
-
function maybeAdd(str) {
|
103
|
-
if (str.lastIndexOf(start, 0) == 0 && !arrayContains(found, str)) found.push(str);
|
104
|
-
}
|
105
|
-
function gatherCompletions(obj) {
|
106
|
-
if (typeof obj == "string") forEach(stringProps, maybeAdd);
|
107
|
-
else if (obj instanceof Array) forEach(arrayProps, maybeAdd);
|
108
|
-
else if (obj instanceof Function) forEach(funcProps, maybeAdd);
|
109
|
-
for (var name in obj) maybeAdd(name);
|
110
|
-
}
|
111
|
-
|
112
|
-
if (context && context.length) {
|
113
|
-
// If this is a property, see if it belongs to some object we can
|
114
|
-
// find in the current environment.
|
115
|
-
var obj = context.pop(), base;
|
116
|
-
if (obj.type && obj.type.indexOf("variable") === 0) {
|
117
|
-
if (options && options.additionalContext)
|
118
|
-
base = options.additionalContext[obj.string];
|
119
|
-
if (!options || options.useGlobalScope !== false)
|
120
|
-
base = base || global[obj.string];
|
121
|
-
} else if (obj.type == "string") {
|
122
|
-
base = "";
|
123
|
-
} else if (obj.type == "atom") {
|
124
|
-
base = 1;
|
125
|
-
} else if (obj.type == "function") {
|
126
|
-
if (global.jQuery != null && (obj.string == '$' || obj.string == 'jQuery') &&
|
127
|
-
(typeof global.jQuery == 'function'))
|
128
|
-
base = global.jQuery();
|
129
|
-
else if (global._ != null && (obj.string == '_') && (typeof global._ == 'function'))
|
130
|
-
base = global._();
|
131
|
-
}
|
132
|
-
while (base != null && context.length)
|
133
|
-
base = base[context.pop().string];
|
134
|
-
if (base != null) gatherCompletions(base);
|
135
|
-
} else {
|
136
|
-
// If not, just look in the global object and any local scope
|
137
|
-
// (reading into JS mode internals to get at the local and global variables)
|
138
|
-
for (var v = token.state.localVars; v; v = v.next) maybeAdd(v.name);
|
139
|
-
for (var v = token.state.globalVars; v; v = v.next) maybeAdd(v.name);
|
140
|
-
if (!options || options.useGlobalScope !== false)
|
141
|
-
gatherCompletions(global);
|
142
|
-
forEach(keywords, maybeAdd);
|
143
|
-
}
|
144
|
-
return found;
|
145
|
-
}
|
146
|
-
});
|