locomotivecms 4.1.1 → 4.2.0.alpha1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/README.md +4 -3
- data/Rakefile +4 -0
- data/app/api/locomotive/api.rb +1 -1
- data/app/assets/config/locomotive_manifest.js +2 -0
- data/app/assets/javascripts/locomotive.js +2 -2
- data/app/assets/stylesheets/locomotive/account.scss +0 -1
- data/app/assets/stylesheets/locomotive/application.scss +0 -1
- data/app/assets/stylesheets/locomotive/live_editing_error.scss +0 -1
- data/app/assets/stylesheets/locomotive/live_editing_iframe.scss +0 -1
- data/app/controllers/locomotive/base_controller.rb +1 -1
- data/app/controllers/locomotive/concerns/authorization_controller.rb +1 -1
- data/app/controllers/locomotive/concerns/redirect_to_main_host_controller.rb +1 -1
- data/app/controllers/locomotive/concerns/site_dispatcher_controller.rb +1 -1
- data/app/controllers/locomotive/errors_controller.rb +1 -1
- data/app/controllers/locomotive/my_account_controller.rb +1 -1
- data/app/controllers/locomotive/passwords_controller.rb +3 -1
- data/app/controllers/locomotive/registrations_controller.rb +3 -1
- data/app/controllers/locomotive/sessions_controller.rb +3 -1
- data/app/controllers/locomotive/sites_controller.rb +1 -1
- data/app/helpers/locomotive/base_helper.rb +2 -2
- data/app/helpers/locomotive/custom_fields_helper.rb +2 -2
- data/app/helpers/locomotive/shared/activities_helper.rb +1 -1
- data/app/inputs/locomotive/api_key_input.rb +1 -1
- data/app/mailers/locomotive/notifications.rb +1 -1
- data/app/models/locomotive/account.rb +1 -1
- data/app/models/locomotive/concerns/account/api_key.rb +1 -1
- data/app/models/locomotive/concerns/content_entry/csv.rb +1 -1
- data/app/models/locomotive/concerns/content_entry/slug.rb +5 -5
- data/app/models/locomotive/concerns/content_type/entry_template.rb +3 -3
- data/app/models/locomotive/concerns/page/templatized.rb +1 -1
- data/app/models/locomotive/concerns/shared/json_attribute.rb +21 -2
- data/app/models/locomotive/concerns/site/routes.rb +1 -1
- data/app/models/locomotive/content_entry.rb +2 -2
- data/app/models/locomotive/page.rb +3 -3
- data/app/models/locomotive/section.rb +1 -1
- data/app/models/locomotive/snippet.rb +1 -1
- data/app/models/locomotive/translation.rb +1 -1
- data/app/services/locomotive/content_entry_import_service.rb +1 -1
- data/app/services/locomotive/content_entry_service.rb +2 -2
- data/app/services/locomotive/content_type_service.rb +13 -3
- data/app/services/locomotive/custom_field_service.rb +2 -2
- data/app/services/locomotive/editor_service.rb +1 -1
- data/app/uploaders/locomotive/base_uploader.rb +0 -10
- data/app/views/locomotive/dashboard/_activity.html.slim +1 -1
- data/app/views/locomotive/page_content/_edit.json.jbuilder +50 -0
- data/app/views/locomotive/page_content/edit.html.erb +1 -1
- data/app/views/locomotive/page_content/edit.json.jbuilder +52 -50
- data/config/initializers/devise.rb +5 -2
- data/lib/generators/locomotive/install/templates/locomotive.rb +0 -5
- data/lib/locomotive/action_controller/responder.rb +1 -1
- data/lib/locomotive/configuration.rb +2 -2
- data/lib/locomotive/dependencies.rb +0 -2
- data/lib/locomotive/engine.rb +14 -2
- data/lib/locomotive/mongoid/patches.rb +25 -65
- data/lib/locomotive/steam/services/api_entry_submission_service.rb +1 -0
- data/lib/locomotive/version.rb +1 -1
- data/vendor/assets/javascripts/locomotive/codemirror/addons/comment/comment.js +203 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/comment/continuecomment.js +85 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/dialog/dialog.js +157 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/display/autorefresh.js +47 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/display/fullscreen.js +41 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/display/panel.js +112 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/display/placeholder.js +62 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/display/rulers.js +51 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/edit/closebrackets.js +195 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/edit/closetag.js +169 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/edit/continuelist.js +51 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/edit/matchbrackets.js +120 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/edit/matchtags.js +66 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/edit/trailingspace.js +27 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/brace-fold.js +105 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/comment-fold.js +59 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/foldcode.js +150 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/foldgutter.js +146 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/indent-fold.js +44 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/markdown-fold.js +49 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/xml-fold.js +182 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/anyword-hint.js +41 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/css-hint.js +60 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/html-hint.js +348 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/javascript-hint.js +146 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/show-hint.js +437 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/sql-hint.js +271 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/xml-hint.js +110 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/coffeescript-lint.js +41 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/css-lint.js +35 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/html-lint.js +46 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/javascript-lint.js +136 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/json-lint.js +31 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/lint.js +239 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/yaml-lint.js +28 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/merge/merge.js +773 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/mode/loadmode.js +64 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/mode/multiplex.js +123 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/mode/overlay.js +85 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/mode/simple.js +213 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/runmode/colorize.js +40 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/runmode/runmode-standalone.js +157 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/runmode/runmode.js +72 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/runmode/runmode.node.js +179 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/scroll/annotatescrollbar.js +118 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/scroll/scrollpastend.js +48 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/scroll/simplescrollbars.js +152 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/search/jump-to-line.js +49 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/search/match-highlighter.js +146 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/search/matchesonscrollbar.js +97 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/search/search.js +249 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/search/searchcursor.js +189 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/selection/active-line.js +74 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/selection/mark-selection.js +118 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/selection/selection-pointer.js +98 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/tern/tern.js +701 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/tern/worker.js +44 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/wrap/hardwrap.js +144 -0
- data/vendor/assets/javascripts/locomotive/codemirror/keymaps/emacs.js +412 -0
- data/vendor/assets/javascripts/locomotive/codemirror/keymaps/sublime.js +580 -0
- data/vendor/assets/javascripts/locomotive/codemirror/keymaps/vim.js +5065 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/apl.js +174 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/asciiarmor.js +73 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/asn.1.js +204 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/asterisk.js +196 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/brainfuck.js +85 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/clike.js +786 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/clojure.js +306 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/cmake.js +97 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/cobol.js +255 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/coffeescript.js +355 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/commonlisp.js +123 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/crystal.js +391 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/css.js +825 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/cypher.js +146 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/d.js +218 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/dart.js +157 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/diff.js +47 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/django.js +356 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/dockerfile.js +79 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/dtd.js +142 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/dylan.js +344 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/ebnf.js +195 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/ecl.js +206 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/eiffel.js +160 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/elm.js +205 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/erlang.js +618 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/factor.js +83 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/fcl.js +173 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/forth.js +180 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/fortran.js +188 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/gas.js +345 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/gfm.js +130 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/gherkin.js +178 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/go.js +185 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/groovy.js +230 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/haml.js +161 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/handlebars.js +62 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/haskell-literate.js +43 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/haskell.js +267 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/haxe.js +515 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/htmlembedded.js +28 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/htmlmixed.js +152 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/http.js +113 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/idl.js +290 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/jade.js +590 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/javascript.js +748 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/jinja2.js +142 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/jsx.js +147 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/julia.js +392 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/livescript.js +280 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/lua.js +159 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/markdown.js +797 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/mathematica.js +176 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/mbox.js +129 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/mirc.js +193 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/mllike.js +205 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/modelica.js +245 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/mscgen.js +169 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/mumps.js +148 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/nginx.js +178 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/nsis.js +95 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/ntriples.js +186 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/octave.js +135 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/oz.js +252 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/pascal.js +109 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/pegjs.js +114 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/perl.js +837 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/php.js +234 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/pig.js +178 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/powershell.js +396 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/properties.js +78 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/protobuf.js +68 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/puppet.js +220 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/python.js +340 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/q.js +139 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/r.js +164 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/rpm.js +109 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/rst.js +557 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/ruby.js +285 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/rust.js +71 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/sas.js +315 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/sass.js +414 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/scheme.js +249 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/shell.js +139 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/sieve.js +193 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/slim.js +575 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/smalltalk.js +168 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/smarty.js +225 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/solr.js +104 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/soy.js +199 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/sparql.js +180 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/spreadsheet.js +112 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/sql.js +413 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/stex.js +251 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/stylus.js +769 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/swift.js +202 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/tcl.js +139 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/textile.js +469 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/tiddlywiki.js +308 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/tiki.js +312 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/toml.js +88 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/tornado.js +68 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/troff.js +84 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/ttcn-cfg.js +214 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/ttcn.js +283 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/turtle.js +162 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/twig.js +141 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/vb.js +276 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/vbscript.js +350 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/velocity.js +201 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/verilog.js +537 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/vhdl.js +189 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/vue.js +69 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/webidl.js +195 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/xml.js +394 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/xquery.js +437 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/yacas.js +204 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/yaml-frontmatter.js +68 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/yaml.js +117 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/z80.js +116 -0
- data/vendor/assets/javascripts/locomotive/codemirror.js +8922 -0
- data/vendor/assets/javascripts/locomotive/select2.js +436 -175
- data/vendor/assets/javascripts/locomotive/wysihtml5x-toolbar.js +1346 -564
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/dialog/dialog.css +32 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/display/fullscreen.css +6 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/fold/foldgutter.css +20 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/hint/show-hint.css +37 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/lint/lint.css +73 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/merge/merge.css +113 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/scroll/simplescrollbars.css +66 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/search/matchesonscrollbar.css +8 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/tern/tern.css +87 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/modes/tiddlywiki.css +14 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/modes/tiki.css +26 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/3024-day.css +41 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/3024-night.css +39 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/abcdef.css +32 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/ambiance-mobile.css +5 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/ambiance.css +74 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/base16-dark.css +38 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/base16-light.css +38 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/bespin.css +34 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/blackboard.css +32 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/cobalt.css +25 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/colorforth.css +33 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/dracula.css +41 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/eclipse.css +23 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/elegant.css +13 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/erlang-dark.css +34 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/hopscotch.css +34 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/icecoder.css +43 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/isotope.css +34 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/lesser-dark.css +47 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/liquibyte.css +95 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/material.css +53 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/mbo.css +37 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/mdn-like.css +46 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/midnight.css +45 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/monokai.css +36 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/neat.css +12 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/neo.css +43 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/night.css +27 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/paraiso-dark.css +38 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/paraiso-light.css +38 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/pastel-on-dark.css +53 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/railscasts.css +34 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/rubyblue.css +25 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/seti.css +44 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/solarized.css +169 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/the-matrix.css +30 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/tomorrow-night-bright.css +35 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/tomorrow-night-eighties.css +38 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/ttcn.css +64 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/twilight.css +32 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/vibrant-ink.css +34 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/xq-dark.css +53 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/xq-light.css +43 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/yeti.css +44 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/zenburn.css +37 -0
- data/vendor/assets/stylesheets/locomotive/codemirror.css +347 -0
- data/vendor/assets/stylesheets/locomotive/select2.css +3 -6
- metadata +349 -128
@@ -0,0 +1,182 @@
|
|
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 Pos = CodeMirror.Pos;
|
15
|
+
function cmp(a, b) { return a.line - b.line || a.ch - b.ch; }
|
16
|
+
|
17
|
+
var nameStartChar = "A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
|
18
|
+
var nameChar = nameStartChar + "\-\:\.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
|
19
|
+
var xmlTagStart = new RegExp("<(/?)([" + nameStartChar + "][" + nameChar + "]*)", "g");
|
20
|
+
|
21
|
+
function Iter(cm, line, ch, range) {
|
22
|
+
this.line = line; this.ch = ch;
|
23
|
+
this.cm = cm; this.text = cm.getLine(line);
|
24
|
+
this.min = range ? range.from : cm.firstLine();
|
25
|
+
this.max = range ? range.to - 1 : cm.lastLine();
|
26
|
+
}
|
27
|
+
|
28
|
+
function tagAt(iter, ch) {
|
29
|
+
var type = iter.cm.getTokenTypeAt(Pos(iter.line, ch));
|
30
|
+
return type && /\btag\b/.test(type);
|
31
|
+
}
|
32
|
+
|
33
|
+
function nextLine(iter) {
|
34
|
+
if (iter.line >= iter.max) return;
|
35
|
+
iter.ch = 0;
|
36
|
+
iter.text = iter.cm.getLine(++iter.line);
|
37
|
+
return true;
|
38
|
+
}
|
39
|
+
function prevLine(iter) {
|
40
|
+
if (iter.line <= iter.min) return;
|
41
|
+
iter.text = iter.cm.getLine(--iter.line);
|
42
|
+
iter.ch = iter.text.length;
|
43
|
+
return true;
|
44
|
+
}
|
45
|
+
|
46
|
+
function toTagEnd(iter) {
|
47
|
+
for (;;) {
|
48
|
+
var gt = iter.text.indexOf(">", iter.ch);
|
49
|
+
if (gt == -1) { if (nextLine(iter)) continue; else return; }
|
50
|
+
if (!tagAt(iter, gt + 1)) { iter.ch = gt + 1; continue; }
|
51
|
+
var lastSlash = iter.text.lastIndexOf("/", gt);
|
52
|
+
var selfClose = lastSlash > -1 && !/\S/.test(iter.text.slice(lastSlash + 1, gt));
|
53
|
+
iter.ch = gt + 1;
|
54
|
+
return selfClose ? "selfClose" : "regular";
|
55
|
+
}
|
56
|
+
}
|
57
|
+
function toTagStart(iter) {
|
58
|
+
for (;;) {
|
59
|
+
var lt = iter.ch ? iter.text.lastIndexOf("<", iter.ch - 1) : -1;
|
60
|
+
if (lt == -1) { if (prevLine(iter)) continue; else return; }
|
61
|
+
if (!tagAt(iter, lt + 1)) { iter.ch = lt; continue; }
|
62
|
+
xmlTagStart.lastIndex = lt;
|
63
|
+
iter.ch = lt;
|
64
|
+
var match = xmlTagStart.exec(iter.text);
|
65
|
+
if (match && match.index == lt) return match;
|
66
|
+
}
|
67
|
+
}
|
68
|
+
|
69
|
+
function toNextTag(iter) {
|
70
|
+
for (;;) {
|
71
|
+
xmlTagStart.lastIndex = iter.ch;
|
72
|
+
var found = xmlTagStart.exec(iter.text);
|
73
|
+
if (!found) { if (nextLine(iter)) continue; else return; }
|
74
|
+
if (!tagAt(iter, found.index + 1)) { iter.ch = found.index + 1; continue; }
|
75
|
+
iter.ch = found.index + found[0].length;
|
76
|
+
return found;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
function toPrevTag(iter) {
|
80
|
+
for (;;) {
|
81
|
+
var gt = iter.ch ? iter.text.lastIndexOf(">", iter.ch - 1) : -1;
|
82
|
+
if (gt == -1) { if (prevLine(iter)) continue; else return; }
|
83
|
+
if (!tagAt(iter, gt + 1)) { iter.ch = gt; continue; }
|
84
|
+
var lastSlash = iter.text.lastIndexOf("/", gt);
|
85
|
+
var selfClose = lastSlash > -1 && !/\S/.test(iter.text.slice(lastSlash + 1, gt));
|
86
|
+
iter.ch = gt + 1;
|
87
|
+
return selfClose ? "selfClose" : "regular";
|
88
|
+
}
|
89
|
+
}
|
90
|
+
|
91
|
+
function findMatchingClose(iter, tag) {
|
92
|
+
var stack = [];
|
93
|
+
for (;;) {
|
94
|
+
var next = toNextTag(iter), end, startLine = iter.line, startCh = iter.ch - (next ? next[0].length : 0);
|
95
|
+
if (!next || !(end = toTagEnd(iter))) return;
|
96
|
+
if (end == "selfClose") continue;
|
97
|
+
if (next[1]) { // closing tag
|
98
|
+
for (var i = stack.length - 1; i >= 0; --i) if (stack[i] == next[2]) {
|
99
|
+
stack.length = i;
|
100
|
+
break;
|
101
|
+
}
|
102
|
+
if (i < 0 && (!tag || tag == next[2])) return {
|
103
|
+
tag: next[2],
|
104
|
+
from: Pos(startLine, startCh),
|
105
|
+
to: Pos(iter.line, iter.ch)
|
106
|
+
};
|
107
|
+
} else { // opening tag
|
108
|
+
stack.push(next[2]);
|
109
|
+
}
|
110
|
+
}
|
111
|
+
}
|
112
|
+
function findMatchingOpen(iter, tag) {
|
113
|
+
var stack = [];
|
114
|
+
for (;;) {
|
115
|
+
var prev = toPrevTag(iter);
|
116
|
+
if (!prev) return;
|
117
|
+
if (prev == "selfClose") { toTagStart(iter); continue; }
|
118
|
+
var endLine = iter.line, endCh = iter.ch;
|
119
|
+
var start = toTagStart(iter);
|
120
|
+
if (!start) return;
|
121
|
+
if (start[1]) { // closing tag
|
122
|
+
stack.push(start[2]);
|
123
|
+
} else { // opening tag
|
124
|
+
for (var i = stack.length - 1; i >= 0; --i) if (stack[i] == start[2]) {
|
125
|
+
stack.length = i;
|
126
|
+
break;
|
127
|
+
}
|
128
|
+
if (i < 0 && (!tag || tag == start[2])) return {
|
129
|
+
tag: start[2],
|
130
|
+
from: Pos(iter.line, iter.ch),
|
131
|
+
to: Pos(endLine, endCh)
|
132
|
+
};
|
133
|
+
}
|
134
|
+
}
|
135
|
+
}
|
136
|
+
|
137
|
+
CodeMirror.registerHelper("fold", "xml", function(cm, start) {
|
138
|
+
var iter = new Iter(cm, start.line, 0);
|
139
|
+
for (;;) {
|
140
|
+
var openTag = toNextTag(iter), end;
|
141
|
+
if (!openTag || iter.line != start.line || !(end = toTagEnd(iter))) return;
|
142
|
+
if (!openTag[1] && end != "selfClose") {
|
143
|
+
var startPos = Pos(iter.line, iter.ch);
|
144
|
+
var endPos = findMatchingClose(iter, openTag[2]);
|
145
|
+
return endPos && {from: startPos, to: endPos.from};
|
146
|
+
}
|
147
|
+
}
|
148
|
+
});
|
149
|
+
CodeMirror.findMatchingTag = function(cm, pos, range) {
|
150
|
+
var iter = new Iter(cm, pos.line, pos.ch, range);
|
151
|
+
if (iter.text.indexOf(">") == -1 && iter.text.indexOf("<") == -1) return;
|
152
|
+
var end = toTagEnd(iter), to = end && Pos(iter.line, iter.ch);
|
153
|
+
var start = end && toTagStart(iter);
|
154
|
+
if (!end || !start || cmp(iter, pos) > 0) return;
|
155
|
+
var here = {from: Pos(iter.line, iter.ch), to: to, tag: start[2]};
|
156
|
+
if (end == "selfClose") return {open: here, close: null, at: "open"};
|
157
|
+
|
158
|
+
if (start[1]) { // closing tag
|
159
|
+
return {open: findMatchingOpen(iter, start[2]), close: here, at: "close"};
|
160
|
+
} else { // opening tag
|
161
|
+
iter = new Iter(cm, to.line, to.ch, range);
|
162
|
+
return {open: here, close: findMatchingClose(iter, start[2]), at: "open"};
|
163
|
+
}
|
164
|
+
};
|
165
|
+
|
166
|
+
CodeMirror.findEnclosingTag = function(cm, pos, range) {
|
167
|
+
var iter = new Iter(cm, pos.line, pos.ch, range);
|
168
|
+
for (;;) {
|
169
|
+
var open = findMatchingOpen(iter);
|
170
|
+
if (!open) break;
|
171
|
+
var forward = new Iter(cm, pos.line, pos.ch, range);
|
172
|
+
var close = findMatchingClose(forward, open.tag);
|
173
|
+
if (close) return {open: open, close: close};
|
174
|
+
}
|
175
|
+
};
|
176
|
+
|
177
|
+
// Used by addon/edit/closetag.js
|
178
|
+
CodeMirror.scanForClosingTag = function(cm, pos, name, end) {
|
179
|
+
var iter = new Iter(cm, pos.line, pos.ch, end ? {from: 0, to: end} : null);
|
180
|
+
return findMatchingClose(iter, name);
|
181
|
+
};
|
182
|
+
});
|
@@ -0,0 +1,41 @@
|
|
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 WORD = /[\w$]+/, RANGE = 500;
|
15
|
+
|
16
|
+
CodeMirror.registerHelper("hint", "anyword", function(editor, options) {
|
17
|
+
var word = options && options.word || WORD;
|
18
|
+
var range = options && options.range || RANGE;
|
19
|
+
var cur = editor.getCursor(), curLine = editor.getLine(cur.line);
|
20
|
+
var end = cur.ch, start = end;
|
21
|
+
while (start && word.test(curLine.charAt(start - 1))) --start;
|
22
|
+
var curWord = start != end && curLine.slice(start, end);
|
23
|
+
|
24
|
+
var list = options && options.list || [], seen = {};
|
25
|
+
var re = new RegExp(word.source, "g");
|
26
|
+
for (var dir = -1; dir <= 1; dir += 2) {
|
27
|
+
var line = cur.line, endLine = Math.min(Math.max(line + dir * range, editor.firstLine()), editor.lastLine()) + dir;
|
28
|
+
for (; line != endLine; line += dir) {
|
29
|
+
var text = editor.getLine(line), m;
|
30
|
+
while (m = re.exec(text)) {
|
31
|
+
if (line == cur.line && m[0] === curWord) continue;
|
32
|
+
if ((!curWord || m[0].lastIndexOf(curWord, 0) == 0) && !Object.prototype.hasOwnProperty.call(seen, m[0])) {
|
33
|
+
seen[m[0]] = true;
|
34
|
+
list.push(m[0]);
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
return {list: list, from: CodeMirror.Pos(cur.line, start), to: CodeMirror.Pos(cur.line, end)};
|
40
|
+
});
|
41
|
+
});
|
@@ -0,0 +1,60 @@
|
|
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
|
+
if (token.type == "keyword" && "!important".indexOf(token.string) == 0)
|
24
|
+
return {list: ["!important"], from: CodeMirror.Pos(cur.line, token.start),
|
25
|
+
to: CodeMirror.Pos(cur.line, token.end)};
|
26
|
+
|
27
|
+
var start = token.start, end = cur.ch, word = token.string.slice(0, end - start);
|
28
|
+
if (/[^\w$_-]/.test(word)) {
|
29
|
+
word = ""; start = end = cur.ch;
|
30
|
+
}
|
31
|
+
|
32
|
+
var spec = CodeMirror.resolveMode("text/css");
|
33
|
+
|
34
|
+
var result = [];
|
35
|
+
function add(keywords) {
|
36
|
+
for (var name in keywords)
|
37
|
+
if (!word || name.lastIndexOf(word, 0) == 0)
|
38
|
+
result.push(name);
|
39
|
+
}
|
40
|
+
|
41
|
+
var st = inner.state.state;
|
42
|
+
if (st == "pseudo" || token.type == "variable-3") {
|
43
|
+
add(pseudoClasses);
|
44
|
+
} else if (st == "block" || st == "maybeprop") {
|
45
|
+
add(spec.propertyKeywords);
|
46
|
+
} else if (st == "prop" || st == "parens" || st == "at" || st == "params") {
|
47
|
+
add(spec.valueKeywords);
|
48
|
+
add(spec.colorKeywords);
|
49
|
+
} else if (st == "media" || st == "media_parens") {
|
50
|
+
add(spec.mediaTypes);
|
51
|
+
add(spec.mediaFeatures);
|
52
|
+
}
|
53
|
+
|
54
|
+
if (result.length) return {
|
55
|
+
list: result,
|
56
|
+
from: CodeMirror.Pos(cur.line, start),
|
57
|
+
to: CodeMirror.Pos(cur.line, end)
|
58
|
+
};
|
59
|
+
});
|
60
|
+
});
|
@@ -0,0 +1,348 @@
|
|
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
|
+
});
|