active_admin_pro 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +20 -0
- data/README.md +5 -0
- data/Rakefile +34 -0
- data/app/assets/javascripts/active_admin_pro.js +41 -0
- data/app/assets/javascripts/active_admin_pro/actions/new.js +8 -0
- data/app/assets/javascripts/active_admin_pro/actions/show.js +12 -0
- data/app/assets/javascripts/active_admin_pro/components/codemirror_input.js +92 -0
- data/app/assets/javascripts/active_admin_pro/components/flashes.js +9 -0
- data/app/assets/javascripts/active_admin_pro/components/link.js +23 -0
- data/app/assets/javascripts/active_admin_pro/components/phone_input.js +52 -0
- data/app/assets/javascripts/active_admin_pro/components/select_input.js +31 -0
- data/app/assets/javascripts/active_admin_pro/components/sortable_handle.js +8 -0
- data/app/assets/javascripts/active_admin_pro/components/summernote_input.js +132 -0
- data/app/assets/javascripts/active_admin_pro/components/text_input.js +47 -0
- data/app/assets/javascripts/active_admin_pro/components/time_zone_input.js +51 -0
- data/app/assets/javascripts/active_admin_pro/components/title_to_slug.js +16 -0
- data/app/assets/stylesheets/active_admin_pro.scss +20 -0
- data/app/assets/stylesheets/active_admin_pro/breakpoints.scss +3 -0
- data/app/assets/stylesheets/active_admin_pro/components/_input_variables.scss +9 -0
- data/app/assets/stylesheets/active_admin_pro/components/actions.scss +13 -0
- data/app/assets/stylesheets/active_admin_pro/components/boolean_input.scss +13 -0
- data/app/assets/stylesheets/active_admin_pro/components/button.scss +7 -0
- data/app/assets/stylesheets/active_admin_pro/components/check_boxes_input.scss +38 -0
- data/app/assets/stylesheets/active_admin_pro/components/codemirror_input.scss +53 -0
- data/app/assets/stylesheets/active_admin_pro/components/comments.scss +17 -0
- data/app/assets/stylesheets/active_admin_pro/components/datepicker.scss +108 -0
- data/app/assets/stylesheets/active_admin_pro/components/dialog.scss +66 -0
- data/app/assets/stylesheets/active_admin_pro/components/dropdown_menu_button.scss +40 -0
- data/app/assets/stylesheets/active_admin_pro/components/fieldset.scss +26 -0
- data/app/assets/stylesheets/active_admin_pro/components/file_input.scss +27 -0
- data/app/assets/stylesheets/active_admin_pro/components/has_many_fields.scss +4 -0
- data/app/assets/stylesheets/active_admin_pro/components/inline_errors.scss +7 -0
- data/app/assets/stylesheets/active_admin_pro/components/link.scss +16 -0
- data/app/assets/stylesheets/active_admin_pro/components/panel.scss +62 -0
- data/app/assets/stylesheets/active_admin_pro/components/phone_input.scss +31 -0
- data/app/assets/stylesheets/active_admin_pro/components/radio_input.scss +38 -0
- data/app/assets/stylesheets/active_admin_pro/components/segmented_control.scss +41 -0
- data/app/assets/stylesheets/active_admin_pro/components/select_input.scss +42 -0
- data/app/assets/stylesheets/active_admin_pro/components/sortable_handle.scss +21 -0
- data/app/assets/stylesheets/active_admin_pro/components/string_input.scss +85 -0
- data/app/assets/stylesheets/active_admin_pro/components/summernote_input.scss +190 -0
- data/app/assets/stylesheets/active_admin_pro/components/table.scss +100 -0
- data/app/assets/stylesheets/active_admin_pro/components/text_input.scss +55 -0
- data/app/assets/stylesheets/active_admin_pro/functions/color.scss +130 -0
- data/app/assets/stylesheets/active_admin_pro/functions/text-color.scss +35 -0
- data/app/assets/stylesheets/active_admin_pro/layout/actions/comments.scss +14 -0
- data/app/assets/stylesheets/active_admin_pro/layout/actions/index.scss +88 -0
- data/app/assets/stylesheets/active_admin_pro/layout/actions/show.scss +25 -0
- data/app/assets/stylesheets/active_admin_pro/layout/body.scss +60 -0
- data/app/assets/stylesheets/active_admin_pro/layout/desktop/action_items.scss +32 -0
- data/app/assets/stylesheets/active_admin_pro/layout/desktop/actions/comments.scss +10 -0
- data/app/assets/stylesheets/active_admin_pro/layout/desktop/active_admin_content.scss +22 -0
- data/app/assets/stylesheets/active_admin_pro/layout/desktop/breadcrumbs.scss +57 -0
- data/app/assets/stylesheets/active_admin_pro/layout/desktop/navigation.scss +197 -0
- data/app/assets/stylesheets/active_admin_pro/layout/desktop/sidebar.scss +5 -0
- data/app/assets/stylesheets/active_admin_pro/layout/desktop/title_bar.scss +24 -0
- data/app/assets/stylesheets/active_admin_pro/layout/desktop/wrapper.scss +5 -0
- data/app/assets/stylesheets/active_admin_pro/layout/filters.scss +41 -0
- data/app/assets/stylesheets/active_admin_pro/layout/flashes.scss +52 -0
- data/app/assets/stylesheets/active_admin_pro/layout/footer.scss +3 -0
- data/app/assets/stylesheets/active_admin_pro/layout/mobile/actions/index.scss +7 -0
- data/app/assets/stylesheets/active_admin_pro/layout/tablet/actions/dashboard.scss +105 -0
- data/app/assets/stylesheets/active_admin_pro/layout/tablet/actions/index.scss +20 -0
- data/app/assets/stylesheets/active_admin_pro/layout/tablet/actions/show.scss +78 -0
- data/app/assets/stylesheets/active_admin_pro/layout/tablet/active_admin_content.scss +9 -0
- data/app/assets/stylesheets/active_admin_pro/layout/tablet/flashes.scss +5 -0
- data/app/assets/stylesheets/active_admin_pro/layout/tablet/navigation.scss +48 -0
- data/app/assets/stylesheets/active_admin_pro/layout/tablet/title_bar.scss +53 -0
- data/app/assets/stylesheets/active_admin_pro/mixins/button.scss +48 -0
- data/app/assets/stylesheets/active_admin_pro/variables.scss +10 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon.scss +87 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/_bourbon-deprecated-upcoming.scss +411 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_border-color.scss +26 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_border-radius.scss +48 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_border-style.scss +25 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_border-width.scss +25 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_buttons.scss +64 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_clearfix.scss +25 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_ellipsis.scss +30 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_font-stacks.scss +31 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_hide-text.scss +27 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_margin.scss +26 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_padding.scss +26 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_position.scss +48 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_prefixer.scss +66 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_retina-image.scss +25 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_size.scss +51 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_text-inputs.scss +113 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_timing-functions.scss +34 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_triangle.scss +63 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_word-wrap.scss +29 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_animation.scss +43 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_appearance.scss +3 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_backface-visibility.scss +3 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_background-image.scss +42 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_background.scss +55 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_border-image.scss +59 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_calc.scss +4 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_columns.scss +47 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_filter.scss +4 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_flex-box.scss +287 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_font-face.scss +24 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_font-feature-settings.scss +4 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_hidpi-media-query.scss +10 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_hyphens.scss +4 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_image-rendering.scss +14 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_keyframes.scss +36 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_linear-gradient.scss +38 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_perspective.scss +8 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_placeholder.scss +8 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_radial-gradient.scss +39 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_selection.scss +42 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_text-decoration.scss +19 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_transform.scss +15 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_transition.scss +71 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_user-select.scss +3 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_assign-inputs.scss +11 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_contains-falsy.scss +20 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_contains.scss +26 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_is-length.scss +11 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_is-light.scss +21 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_is-number.scss +11 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_is-size.scss +13 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_modular-scale.scss +69 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_px-to-em.scss +13 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_px-to-rem.scss +15 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_shade.scss +24 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_strip-units.scss +17 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_tint.scss +24 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_transition-property-name.scss +22 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_unpack.scss +27 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_convert-units.scss +21 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_directional-values.scss +96 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_font-source-declaration.scss +43 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_gradient-positions-parser.scss +13 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_linear-angle-parser.scss +25 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_linear-gradient-parser.scss +41 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_linear-positions-parser.scss +61 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_linear-side-corner-parser.scss +31 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_radial-arg-parser.scss +69 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_radial-gradient-parser.scss +50 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_radial-positions-parser.scss +18 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_render-gradients.scss +26 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_shape-size-stripper.scss +10 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_str-to-num.scss +50 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/settings/_asset-pipeline.scss +7 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/settings/_prefixer.scss +9 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/settings/_px-to-em.scss +1 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat.scss +22 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/_neat-helpers.scss +8 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/functions/_new-breakpoint.scss +49 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/functions/_private.scss +108 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_box-sizing.scss +11 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_direction-context.scss +31 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_display-context.scss +26 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_fill-parent.scss +22 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_media.scss +92 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_omega.scss +91 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_outer-container.scss +36 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_pad.scss +23 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_private.scss +35 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_row.scss +53 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_shift.scss +48 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_span-columns.scss +90 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_to-deprecate.scss +105 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_visual-grid.scss +40 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/settings/_disable-warnings.scss +11 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/settings/_grid.scss +53 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/settings/_visual-grid.scss +25 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/normalize.css +423 -0
- data/app/assets/stylesheets/codemirror/themes/activeadmin_pro.scss +117 -0
- data/app/inputs/codemirror_input.rb +27 -0
- data/app/inputs/datepicker_input.rb +16 -0
- data/app/inputs/phone_input.rb +5 -0
- data/app/inputs/summernote_input.rb +5 -0
- data/app/inputs/time_zone_input.rb +43 -0
- data/app/models/activeadmin_pro/summernote_image.rb +5 -0
- data/config/initializers/active_admin.rb +50 -0
- data/config/locales/en.yml +55 -0
- data/lib/active_admin_pro/admin_user/admin_user.rb +52 -0
- data/lib/active_admin_pro/engine.rb +8 -0
- data/lib/active_admin_pro/summernote_image/summernote_image.rb +61 -0
- data/lib/active_admin_pro/user/user.rb +53 -0
- data/lib/active_admin_pro/version.rb +3 -0
- data/lib/activeadmin_pro.rb +9 -0
- data/lib/generators/activeadmin_pro/install_generator.rb +14 -0
- data/lib/tasks/activeadmin_pro_tasks.rake +4 -0
- data/spec/spec_helper.rb +34 -0
- data/vendor/assets/javascripts/bootstrap.js +1243 -0
- data/vendor/assets/javascripts/codemirror.js +8887 -0
- data/vendor/assets/javascripts/codemirror/addons/comment/comment.js +183 -0
- data/vendor/assets/javascripts/codemirror/addons/comment/continuecomment.js +85 -0
- data/vendor/assets/javascripts/codemirror/addons/dialog/dialog.css +32 -0
- data/vendor/assets/javascripts/codemirror/addons/dialog/dialog.js +157 -0
- data/vendor/assets/javascripts/codemirror/addons/display/autorefresh.js +47 -0
- data/vendor/assets/javascripts/codemirror/addons/display/fullscreen.css +6 -0
- data/vendor/assets/javascripts/codemirror/addons/display/fullscreen.js +41 -0
- data/vendor/assets/javascripts/codemirror/addons/display/panel.js +112 -0
- data/vendor/assets/javascripts/codemirror/addons/display/placeholder.js +60 -0
- data/vendor/assets/javascripts/codemirror/addons/display/rulers.js +63 -0
- data/vendor/assets/javascripts/codemirror/addons/edit/closebrackets.js +195 -0
- data/vendor/assets/javascripts/codemirror/addons/edit/closetag.js +169 -0
- data/vendor/assets/javascripts/codemirror/addons/edit/continuelist.js +51 -0
- data/vendor/assets/javascripts/codemirror/addons/edit/matchbrackets.js +120 -0
- data/vendor/assets/javascripts/codemirror/addons/edit/matchtags.js +66 -0
- data/vendor/assets/javascripts/codemirror/addons/edit/trailingspace.js +27 -0
- data/vendor/assets/javascripts/codemirror/addons/fold/brace-fold.js +105 -0
- data/vendor/assets/javascripts/codemirror/addons/fold/comment-fold.js +57 -0
- data/vendor/assets/javascripts/codemirror/addons/fold/foldcode.js +149 -0
- data/vendor/assets/javascripts/codemirror/addons/fold/foldgutter.css +20 -0
- data/vendor/assets/javascripts/codemirror/addons/fold/foldgutter.js +146 -0
- data/vendor/assets/javascripts/codemirror/addons/fold/indent-fold.js +44 -0
- data/vendor/assets/javascripts/codemirror/addons/fold/markdown-fold.js +49 -0
- data/vendor/assets/javascripts/codemirror/addons/fold/xml-fold.js +182 -0
- data/vendor/assets/javascripts/codemirror/addons/hint/anyword-hint.js +41 -0
- data/vendor/assets/javascripts/codemirror/addons/hint/css-hint.js +60 -0
- data/vendor/assets/javascripts/codemirror/addons/hint/html-hint.js +348 -0
- data/vendor/assets/javascripts/codemirror/addons/hint/javascript-hint.js +146 -0
- data/vendor/assets/javascripts/codemirror/addons/hint/show-hint.css +38 -0
- data/vendor/assets/javascripts/codemirror/addons/hint/show-hint.js +386 -0
- data/vendor/assets/javascripts/codemirror/addons/hint/sql-hint.js +254 -0
- data/vendor/assets/javascripts/codemirror/addons/hint/xml-hint.js +110 -0
- data/vendor/assets/javascripts/codemirror/addons/lint/coffeescript-lint.js +41 -0
- data/vendor/assets/javascripts/codemirror/addons/lint/css-lint.js +35 -0
- data/vendor/assets/javascripts/codemirror/addons/lint/html-lint.js +46 -0
- data/vendor/assets/javascripts/codemirror/addons/lint/javascript-lint.js +136 -0
- data/vendor/assets/javascripts/codemirror/addons/lint/json-lint.js +31 -0
- data/vendor/assets/javascripts/codemirror/addons/lint/lint.css +73 -0
- data/vendor/assets/javascripts/codemirror/addons/lint/lint.js +231 -0
- data/vendor/assets/javascripts/codemirror/addons/lint/yaml-lint.js +28 -0
- data/vendor/assets/javascripts/codemirror/addons/merge/merge.css +112 -0
- data/vendor/assets/javascripts/codemirror/addons/merge/merge.js +775 -0
- data/vendor/assets/javascripts/codemirror/addons/mode/loadmode.js +64 -0
- data/vendor/assets/javascripts/codemirror/addons/mode/multiplex.js +123 -0
- data/vendor/assets/javascripts/codemirror/addons/mode/multiplex_test.js +33 -0
- data/vendor/assets/javascripts/codemirror/addons/mode/overlay.js +85 -0
- data/vendor/assets/javascripts/codemirror/addons/mode/simple.js +213 -0
- data/vendor/assets/javascripts/codemirror/addons/runmode/colorize.js +40 -0
- data/vendor/assets/javascripts/codemirror/addons/runmode/runmode-standalone.js +157 -0
- data/vendor/assets/javascripts/codemirror/addons/runmode/runmode.js +72 -0
- data/vendor/assets/javascripts/codemirror/addons/runmode/runmode.node.js +178 -0
- data/vendor/assets/javascripts/codemirror/addons/scroll/annotatescrollbar.js +115 -0
- data/vendor/assets/javascripts/codemirror/addons/scroll/scrollpastend.js +46 -0
- data/vendor/assets/javascripts/codemirror/addons/scroll/simplescrollbars.css +66 -0
- data/vendor/assets/javascripts/codemirror/addons/scroll/simplescrollbars.js +147 -0
- data/vendor/assets/javascripts/codemirror/addons/search/match-highlighter.js +128 -0
- data/vendor/assets/javascripts/codemirror/addons/search/matchesonscrollbar.css +8 -0
- data/vendor/assets/javascripts/codemirror/addons/search/matchesonscrollbar.js +97 -0
- data/vendor/assets/javascripts/codemirror/addons/search/search.js +228 -0
- data/vendor/assets/javascripts/codemirror/addons/search/searchcursor.js +189 -0
- data/vendor/assets/javascripts/codemirror/addons/selection/active-line.js +71 -0
- data/vendor/assets/javascripts/codemirror/addons/selection/mark-selection.js +118 -0
- data/vendor/assets/javascripts/codemirror/addons/selection/selection-pointer.js +98 -0
- data/vendor/assets/javascripts/codemirror/addons/tern/tern.css +87 -0
- data/vendor/assets/javascripts/codemirror/addons/tern/tern.js +700 -0
- data/vendor/assets/javascripts/codemirror/addons/tern/worker.js +44 -0
- data/vendor/assets/javascripts/codemirror/addons/wrap/hardwrap.js +139 -0
- data/vendor/assets/javascripts/codemirror/modes/coffeescript.js +366 -0
- data/vendor/assets/javascripts/codemirror/modes/css.js +823 -0
- data/vendor/assets/javascripts/codemirror/modes/diff.js +47 -0
- data/vendor/assets/javascripts/codemirror/modes/dockerfile.js +79 -0
- data/vendor/assets/javascripts/codemirror/modes/gfm.js +130 -0
- data/vendor/assets/javascripts/codemirror/modes/go.js +185 -0
- data/vendor/assets/javascripts/codemirror/modes/haml.js +159 -0
- data/vendor/assets/javascripts/codemirror/modes/handlebars.js +53 -0
- data/vendor/assets/javascripts/codemirror/modes/htmlembedded.js +28 -0
- data/vendor/assets/javascripts/codemirror/modes/htmlmixed.js +150 -0
- data/vendor/assets/javascripts/codemirror/modes/javascript.js +708 -0
- data/vendor/assets/javascripts/codemirror/modes/markdown.js +792 -0
- data/vendor/assets/javascripts/codemirror/modes/nginx.js +178 -0
- data/vendor/assets/javascripts/codemirror/modes/php.js +234 -0
- data/vendor/assets/javascripts/codemirror/modes/python.js +358 -0
- data/vendor/assets/javascripts/codemirror/modes/ruby.js +285 -0
- data/vendor/assets/javascripts/codemirror/modes/rust.js +58 -0
- data/vendor/assets/javascripts/codemirror/modes/sass.js +414 -0
- data/vendor/assets/javascripts/codemirror/modes/shell.js +139 -0
- data/vendor/assets/javascripts/codemirror/modes/xml.js +385 -0
- data/vendor/assets/javascripts/codemirror/modes/yaml.js +117 -0
- data/vendor/assets/javascripts/intl-tel-input.js +963 -0
- data/vendor/assets/javascripts/intl-tel-utils.js +480 -0
- data/vendor/assets/javascripts/slug.js +212 -0
- data/vendor/assets/javascripts/summernote.js +6939 -0
- data/vendor/assets/stylesheets/codemirror.css +334 -0
- data/vendor/assets/stylesheets/codemirror/themes/base16-dark.css +38 -0
- data/vendor/assets/stylesheets/codemirror/themes/base16-light.css +38 -0
- data/vendor/assets/stylesheets/codemirror/themes/dracula.css +41 -0
- data/vendor/assets/stylesheets/codemirror/themes/material.css +53 -0
- data/vendor/assets/stylesheets/codemirror/themes/monokai.css +35 -0
- data/vendor/assets/stylesheets/codemirror/themes/solarized.css +163 -0
- data/vendor/assets/stylesheets/codemirror/themes/vibrant-ink.css +34 -0
- data/vendor/assets/stylesheets/intl-tel-input.scss +1054 -0
- data/vendor/assets/stylesheets/summernote-bs3.css +5425 -0
- data/vendor/assets/stylesheets/summernote.css +1 -0
- metadata +604 -0
@@ -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 start = Pos(iter.line, iter.ch);
|
144
|
+
var close = findMatchingClose(iter, openTag[2]);
|
145
|
+
return close && {from: start, to: close.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
|
+
});
|