plate-lang 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/.bowerrc +3 -0
- data/.codeclimate.yml +7 -0
- data/.gitignore +25 -0
- data/.ruby-version +1 -0
- data/.travis.yml +4 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +10 -0
- data/LICENSE.txt +21 -0
- data/README.md +64 -0
- data/Rakefile +36 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/bower.json +10 -0
- data/circle.yml +4 -0
- data/exe/plate +6 -0
- data/lib/plate/cli.rb +97 -0
- data/lib/plate/compiler.rb +244 -0
- data/lib/plate/grammar.y +145 -0
- data/lib/plate/lexer.rb +138 -0
- data/lib/plate/nodes.rb +107 -0
- data/lib/plate/parser.rb +568 -0
- data/lib/plate/version.rb +3 -0
- data/lib/plate.rb +14 -0
- data/plate-lang.gemspec +30 -0
- data/skeleton/app/assets/css/app.css +21 -0
- data/skeleton/app/assets/js/app.js +15 -0
- data/skeleton/app/index.html +26 -0
- data/skeleton/app/vendor/.keep +0 -0
- data/skeleton/vendor/bootstrap/.bower.json +44 -0
- data/skeleton/vendor/bootstrap/Gruntfile.js +531 -0
- data/skeleton/vendor/bootstrap/LICENSE +21 -0
- data/skeleton/vendor/bootstrap/README.md +137 -0
- data/skeleton/vendor/bootstrap/bower.json +34 -0
- data/skeleton/vendor/bootstrap/dist/css/bootstrap-theme.css +587 -0
- data/skeleton/vendor/bootstrap/dist/css/bootstrap-theme.css.map +1 -0
- data/skeleton/vendor/bootstrap/dist/css/bootstrap-theme.min.css +5 -0
- data/skeleton/vendor/bootstrap/dist/css/bootstrap.css +6800 -0
- data/skeleton/vendor/bootstrap/dist/css/bootstrap.css.map +1 -0
- data/skeleton/vendor/bootstrap/dist/css/bootstrap.min.css +5 -0
- data/skeleton/vendor/bootstrap/dist/fonts/glyphicons-halflings-regular.eot +0 -0
- data/skeleton/vendor/bootstrap/dist/fonts/glyphicons-halflings-regular.svg +288 -0
- data/skeleton/vendor/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/skeleton/vendor/bootstrap/dist/fonts/glyphicons-halflings-regular.woff +0 -0
- data/skeleton/vendor/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/skeleton/vendor/bootstrap/dist/js/bootstrap.js +2363 -0
- data/skeleton/vendor/bootstrap/dist/js/bootstrap.min.js +7 -0
- data/skeleton/vendor/bootstrap/dist/js/npm.js +13 -0
- data/skeleton/vendor/bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
- data/skeleton/vendor/bootstrap/fonts/glyphicons-halflings-regular.svg +288 -0
- data/skeleton/vendor/bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/skeleton/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
- data/skeleton/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/skeleton/vendor/bootstrap/grunt/.jshintrc +7 -0
- data/skeleton/vendor/bootstrap/grunt/bs-commonjs-generator.js +30 -0
- data/skeleton/vendor/bootstrap/grunt/bs-glyphicons-data-generator.js +42 -0
- data/skeleton/vendor/bootstrap/grunt/bs-lessdoc-parser.js +237 -0
- data/skeleton/vendor/bootstrap/grunt/bs-raw-files-generator.js +44 -0
- data/skeleton/vendor/bootstrap/grunt/configBridge.json +46 -0
- data/skeleton/vendor/bootstrap/grunt/sauce_browsers.yml +82 -0
- data/skeleton/vendor/bootstrap/js/.jscsrc +42 -0
- data/skeleton/vendor/bootstrap/js/.jshintrc +15 -0
- data/skeleton/vendor/bootstrap/js/affix.js +162 -0
- data/skeleton/vendor/bootstrap/js/alert.js +94 -0
- data/skeleton/vendor/bootstrap/js/button.js +120 -0
- data/skeleton/vendor/bootstrap/js/carousel.js +237 -0
- data/skeleton/vendor/bootstrap/js/collapse.js +211 -0
- data/skeleton/vendor/bootstrap/js/dropdown.js +165 -0
- data/skeleton/vendor/bootstrap/js/modal.js +337 -0
- data/skeleton/vendor/bootstrap/js/popover.js +108 -0
- data/skeleton/vendor/bootstrap/js/scrollspy.js +172 -0
- data/skeleton/vendor/bootstrap/js/tab.js +155 -0
- data/skeleton/vendor/bootstrap/js/tooltip.js +514 -0
- data/skeleton/vendor/bootstrap/js/transition.js +59 -0
- data/skeleton/vendor/bootstrap/less/.csscomb.json +304 -0
- data/skeleton/vendor/bootstrap/less/.csslintrc +19 -0
- data/skeleton/vendor/bootstrap/less/alerts.less +73 -0
- data/skeleton/vendor/bootstrap/less/badges.less +66 -0
- data/skeleton/vendor/bootstrap/less/bootstrap.less +56 -0
- data/skeleton/vendor/bootstrap/less/breadcrumbs.less +26 -0
- data/skeleton/vendor/bootstrap/less/button-groups.less +244 -0
- data/skeleton/vendor/bootstrap/less/buttons.less +166 -0
- data/skeleton/vendor/bootstrap/less/carousel.less +269 -0
- data/skeleton/vendor/bootstrap/less/close.less +34 -0
- data/skeleton/vendor/bootstrap/less/code.less +69 -0
- data/skeleton/vendor/bootstrap/less/component-animations.less +33 -0
- data/skeleton/vendor/bootstrap/less/dropdowns.less +216 -0
- data/skeleton/vendor/bootstrap/less/forms.less +607 -0
- data/skeleton/vendor/bootstrap/less/glyphicons.less +305 -0
- data/skeleton/vendor/bootstrap/less/grid.less +84 -0
- data/skeleton/vendor/bootstrap/less/input-groups.less +167 -0
- data/skeleton/vendor/bootstrap/less/jumbotron.less +52 -0
- data/skeleton/vendor/bootstrap/less/labels.less +64 -0
- data/skeleton/vendor/bootstrap/less/list-group.less +130 -0
- data/skeleton/vendor/bootstrap/less/media.less +66 -0
- data/skeleton/vendor/bootstrap/less/mixins/alerts.less +14 -0
- data/skeleton/vendor/bootstrap/less/mixins/background-variant.less +9 -0
- data/skeleton/vendor/bootstrap/less/mixins/border-radius.less +18 -0
- data/skeleton/vendor/bootstrap/less/mixins/buttons.less +68 -0
- data/skeleton/vendor/bootstrap/less/mixins/center-block.less +7 -0
- data/skeleton/vendor/bootstrap/less/mixins/clearfix.less +22 -0
- data/skeleton/vendor/bootstrap/less/mixins/forms.less +85 -0
- data/skeleton/vendor/bootstrap/less/mixins/gradients.less +59 -0
- data/skeleton/vendor/bootstrap/less/mixins/grid-framework.less +91 -0
- data/skeleton/vendor/bootstrap/less/mixins/grid.less +122 -0
- data/skeleton/vendor/bootstrap/less/mixins/hide-text.less +21 -0
- data/skeleton/vendor/bootstrap/less/mixins/image.less +33 -0
- data/skeleton/vendor/bootstrap/less/mixins/labels.less +12 -0
- data/skeleton/vendor/bootstrap/less/mixins/list-group.less +30 -0
- data/skeleton/vendor/bootstrap/less/mixins/nav-divider.less +10 -0
- data/skeleton/vendor/bootstrap/less/mixins/nav-vertical-align.less +9 -0
- data/skeleton/vendor/bootstrap/less/mixins/opacity.less +8 -0
- data/skeleton/vendor/bootstrap/less/mixins/pagination.less +24 -0
- data/skeleton/vendor/bootstrap/less/mixins/panels.less +24 -0
- data/skeleton/vendor/bootstrap/less/mixins/progress-bar.less +10 -0
- data/skeleton/vendor/bootstrap/less/mixins/reset-filter.less +8 -0
- data/skeleton/vendor/bootstrap/less/mixins/reset-text.less +18 -0
- data/skeleton/vendor/bootstrap/less/mixins/resize.less +6 -0
- data/skeleton/vendor/bootstrap/less/mixins/responsive-visibility.less +15 -0
- data/skeleton/vendor/bootstrap/less/mixins/size.less +10 -0
- data/skeleton/vendor/bootstrap/less/mixins/tab-focus.less +9 -0
- data/skeleton/vendor/bootstrap/less/mixins/table-row.less +28 -0
- data/skeleton/vendor/bootstrap/less/mixins/text-emphasis.less +9 -0
- data/skeleton/vendor/bootstrap/less/mixins/text-overflow.less +8 -0
- data/skeleton/vendor/bootstrap/less/mixins/vendor-prefixes.less +227 -0
- data/skeleton/vendor/bootstrap/less/mixins.less +40 -0
- data/skeleton/vendor/bootstrap/less/modals.less +150 -0
- data/skeleton/vendor/bootstrap/less/navbar.less +660 -0
- data/skeleton/vendor/bootstrap/less/navs.less +242 -0
- data/skeleton/vendor/bootstrap/less/normalize.less +424 -0
- data/skeleton/vendor/bootstrap/less/pager.less +54 -0
- data/skeleton/vendor/bootstrap/less/pagination.less +89 -0
- data/skeleton/vendor/bootstrap/less/panels.less +271 -0
- data/skeleton/vendor/bootstrap/less/popovers.less +131 -0
- data/skeleton/vendor/bootstrap/less/print.less +101 -0
- data/skeleton/vendor/bootstrap/less/progress-bars.less +87 -0
- data/skeleton/vendor/bootstrap/less/responsive-embed.less +35 -0
- data/skeleton/vendor/bootstrap/less/responsive-utilities.less +194 -0
- data/skeleton/vendor/bootstrap/less/scaffolding.less +161 -0
- data/skeleton/vendor/bootstrap/less/tables.less +234 -0
- data/skeleton/vendor/bootstrap/less/theme.less +291 -0
- data/skeleton/vendor/bootstrap/less/thumbnails.less +36 -0
- data/skeleton/vendor/bootstrap/less/tooltip.less +101 -0
- data/skeleton/vendor/bootstrap/less/type.less +302 -0
- data/skeleton/vendor/bootstrap/less/utilities.less +55 -0
- data/skeleton/vendor/bootstrap/less/variables.less +867 -0
- data/skeleton/vendor/bootstrap/less/wells.less +29 -0
- data/skeleton/vendor/bootstrap/package.js +25 -0
- data/skeleton/vendor/bootstrap/package.json +87 -0
- data/skeleton/vendor/bootswatch/.bower.json +52 -0
- data/skeleton/vendor/bootswatch/.bowerrc +5 -0
- data/skeleton/vendor/bootswatch/LICENSE +21 -0
- data/skeleton/vendor/bootswatch/README.md +59 -0
- data/skeleton/vendor/bootswatch/bower.json +42 -0
- data/skeleton/vendor/bootswatch/cerulean/_bootswatch.scss +131 -0
- data/skeleton/vendor/bootswatch/cerulean/_variables.scss +868 -0
- data/skeleton/vendor/bootswatch/cerulean/bootstrap.css +6944 -0
- data/skeleton/vendor/bootswatch/cerulean/bootstrap.min.css +11 -0
- data/skeleton/vendor/bootswatch/cerulean/bootswatch.less +131 -0
- data/skeleton/vendor/bootswatch/cerulean/thumbnail.png +0 -0
- data/skeleton/vendor/bootswatch/cerulean/variables.less +867 -0
- data/skeleton/vendor/bootswatch/cosmo/_bootswatch.scss +261 -0
- data/skeleton/vendor/bootswatch/cosmo/_variables.scss +868 -0
- data/skeleton/vendor/bootswatch/cosmo/bootstrap.css +6979 -0
- data/skeleton/vendor/bootswatch/cosmo/bootstrap.min.css +11 -0
- data/skeleton/vendor/bootswatch/cosmo/bootswatch.less +261 -0
- data/skeleton/vendor/bootswatch/cosmo/thumbnail.png +0 -0
- data/skeleton/vendor/bootswatch/cosmo/variables.less +867 -0
- data/skeleton/vendor/bootswatch/cyborg/_bootswatch.scss +234 -0
- data/skeleton/vendor/bootswatch/cyborg/_variables.scss +868 -0
- data/skeleton/vendor/bootswatch/cyborg/bootstrap.css +6963 -0
- data/skeleton/vendor/bootswatch/cyborg/bootstrap.min.css +11 -0
- data/skeleton/vendor/bootswatch/cyborg/bootswatch.less +234 -0
- data/skeleton/vendor/bootswatch/cyborg/thumbnail.png +0 -0
- data/skeleton/vendor/bootswatch/cyborg/variables.less +867 -0
- data/skeleton/vendor/bootswatch/darkly/_bootswatch.scss +346 -0
- data/skeleton/vendor/bootswatch/darkly/_variables.scss +868 -0
- data/skeleton/vendor/bootswatch/darkly/bootstrap.css +7086 -0
- data/skeleton/vendor/bootswatch/darkly/bootstrap.min.css +11 -0
- data/skeleton/vendor/bootswatch/darkly/bootswatch.less +346 -0
- data/skeleton/vendor/bootswatch/darkly/thumbnail.png +0 -0
- data/skeleton/vendor/bootswatch/darkly/variables.less +867 -0
- data/skeleton/vendor/bootswatch/flatly/_bootswatch.scss +329 -0
- data/skeleton/vendor/bootswatch/flatly/_variables.scss +868 -0
- data/skeleton/vendor/bootswatch/flatly/bootstrap.css +7065 -0
- data/skeleton/vendor/bootswatch/flatly/bootstrap.min.css +11 -0
- data/skeleton/vendor/bootswatch/flatly/bootswatch.less +329 -0
- data/skeleton/vendor/bootswatch/flatly/thumbnail.png +0 -0
- data/skeleton/vendor/bootswatch/flatly/variables.less +867 -0
- data/skeleton/vendor/bootswatch/fonts/glyphicons-halflings-regular.eot +0 -0
- data/skeleton/vendor/bootswatch/fonts/glyphicons-halflings-regular.svg +288 -0
- data/skeleton/vendor/bootswatch/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/skeleton/vendor/bootswatch/fonts/glyphicons-halflings-regular.woff +0 -0
- data/skeleton/vendor/bootswatch/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/skeleton/vendor/bootswatch/journal/_bootswatch.scss +144 -0
- data/skeleton/vendor/bootswatch/journal/_variables.scss +868 -0
- data/skeleton/vendor/bootswatch/journal/bootstrap.css +6891 -0
- data/skeleton/vendor/bootswatch/journal/bootstrap.min.css +11 -0
- data/skeleton/vendor/bootswatch/journal/bootswatch.less +144 -0
- data/skeleton/vendor/bootswatch/journal/thumbnail.png +0 -0
- data/skeleton/vendor/bootswatch/journal/variables.less +867 -0
- data/skeleton/vendor/bootswatch/lumen/_bootswatch.scss +520 -0
- data/skeleton/vendor/bootswatch/lumen/_variables.scss +868 -0
- data/skeleton/vendor/bootswatch/lumen/bootstrap.css +7216 -0
- data/skeleton/vendor/bootswatch/lumen/bootstrap.min.css +11 -0
- data/skeleton/vendor/bootswatch/lumen/bootswatch.less +520 -0
- data/skeleton/vendor/bootswatch/lumen/thumbnail.png +0 -0
- data/skeleton/vendor/bootswatch/lumen/variables.less +867 -0
- data/skeleton/vendor/bootswatch/paper/_bootswatch.scss +585 -0
- data/skeleton/vendor/bootswatch/paper/_variables.scss +868 -0
- data/skeleton/vendor/bootswatch/paper/bootstrap.css +7502 -0
- data/skeleton/vendor/bootswatch/paper/bootstrap.min.css +11 -0
- data/skeleton/vendor/bootswatch/paper/bootswatch.less +585 -0
- data/skeleton/vendor/bootswatch/paper/thumbnail.png +0 -0
- data/skeleton/vendor/bootswatch/paper/variables.less +867 -0
- data/skeleton/vendor/bootswatch/readable/_bootswatch.scss +182 -0
- data/skeleton/vendor/bootswatch/readable/_variables.scss +868 -0
- data/skeleton/vendor/bootswatch/readable/bootstrap.css +6915 -0
- data/skeleton/vendor/bootswatch/readable/bootstrap.min.css +11 -0
- data/skeleton/vendor/bootswatch/readable/bootswatch.less +182 -0
- data/skeleton/vendor/bootswatch/readable/thumbnail.png +0 -0
- data/skeleton/vendor/bootswatch/readable/variables.less +867 -0
- data/skeleton/vendor/bootswatch/sandstone/_bootswatch.scss +194 -0
- data/skeleton/vendor/bootswatch/sandstone/_variables.scss +868 -0
- data/skeleton/vendor/bootswatch/sandstone/bootstrap.css +6953 -0
- data/skeleton/vendor/bootswatch/sandstone/bootstrap.min.css +11 -0
- data/skeleton/vendor/bootswatch/sandstone/bootswatch.less +194 -0
- data/skeleton/vendor/bootswatch/sandstone/thumbnail.png +0 -0
- data/skeleton/vendor/bootswatch/sandstone/variables.less +867 -0
- data/skeleton/vendor/bootswatch/simplex/_bootswatch.scss +169 -0
- data/skeleton/vendor/bootswatch/simplex/_variables.scss +868 -0
- data/skeleton/vendor/bootswatch/simplex/bootstrap.css +6953 -0
- data/skeleton/vendor/bootswatch/simplex/bootstrap.min.css +11 -0
- data/skeleton/vendor/bootswatch/simplex/bootswatch.less +169 -0
- data/skeleton/vendor/bootswatch/simplex/thumbnail.png +0 -0
- data/skeleton/vendor/bootswatch/simplex/variables.less +867 -0
- data/skeleton/vendor/bootswatch/slate/_bootswatch.scss +441 -0
- data/skeleton/vendor/bootswatch/slate/_variables.scss +868 -0
- data/skeleton/vendor/bootswatch/slate/bootstrap.css +7301 -0
- data/skeleton/vendor/bootswatch/slate/bootstrap.min.css +11 -0
- data/skeleton/vendor/bootswatch/slate/bootswatch.less +441 -0
- data/skeleton/vendor/bootswatch/slate/thumbnail.png +0 -0
- data/skeleton/vendor/bootswatch/slate/variables.less +867 -0
- data/skeleton/vendor/bootswatch/spacelab/_bootswatch.scss +137 -0
- data/skeleton/vendor/bootswatch/spacelab/_variables.scss +868 -0
- data/skeleton/vendor/bootswatch/spacelab/bootstrap.css +6998 -0
- data/skeleton/vendor/bootswatch/spacelab/bootstrap.min.css +11 -0
- data/skeleton/vendor/bootswatch/spacelab/bootswatch.less +137 -0
- data/skeleton/vendor/bootswatch/spacelab/thumbnail.png +0 -0
- data/skeleton/vendor/bootswatch/spacelab/variables.less +867 -0
- data/skeleton/vendor/bootswatch/superhero/_bootswatch.scss +356 -0
- data/skeleton/vendor/bootswatch/superhero/_variables.scss +868 -0
- data/skeleton/vendor/bootswatch/superhero/bootstrap.css +7048 -0
- data/skeleton/vendor/bootswatch/superhero/bootstrap.min.css +11 -0
- data/skeleton/vendor/bootswatch/superhero/bootswatch.less +356 -0
- data/skeleton/vendor/bootswatch/superhero/thumbnail.png +0 -0
- data/skeleton/vendor/bootswatch/superhero/variables.less +867 -0
- data/skeleton/vendor/bootswatch/united/_bootswatch.scss +55 -0
- data/skeleton/vendor/bootswatch/united/_variables.scss +868 -0
- data/skeleton/vendor/bootswatch/united/bootstrap.css +6813 -0
- data/skeleton/vendor/bootswatch/united/bootstrap.min.css +11 -0
- data/skeleton/vendor/bootswatch/united/bootswatch.less +55 -0
- data/skeleton/vendor/bootswatch/united/thumbnail.png +0 -0
- data/skeleton/vendor/bootswatch/united/variables.less +867 -0
- data/skeleton/vendor/bootswatch/yeti/_bootswatch.scss +437 -0
- data/skeleton/vendor/bootswatch/yeti/_variables.scss +868 -0
- data/skeleton/vendor/bootswatch/yeti/bootstrap.css +7107 -0
- data/skeleton/vendor/bootswatch/yeti/bootstrap.min.css +11 -0
- data/skeleton/vendor/bootswatch/yeti/bootswatch.less +437 -0
- data/skeleton/vendor/bootswatch/yeti/thumbnail.png +0 -0
- data/skeleton/vendor/bootswatch/yeti/variables.less +867 -0
- data/skeleton/vendor/font-awesome/.bower.json +36 -0
- data/skeleton/vendor/font-awesome/.gitignore +33 -0
- data/skeleton/vendor/font-awesome/.npmignore +42 -0
- data/skeleton/vendor/font-awesome/HELP-US-OUT.txt +7 -0
- data/skeleton/vendor/font-awesome/bower.json +22 -0
- data/skeleton/vendor/font-awesome/css/font-awesome.css +2026 -0
- data/skeleton/vendor/font-awesome/css/font-awesome.css.map +7 -0
- data/skeleton/vendor/font-awesome/css/font-awesome.min.css +4 -0
- data/skeleton/vendor/font-awesome/fonts/FontAwesome.otf +0 -0
- data/skeleton/vendor/font-awesome/fonts/fontawesome-webfont.eot +0 -0
- data/skeleton/vendor/font-awesome/fonts/fontawesome-webfont.svg +640 -0
- data/skeleton/vendor/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
- data/skeleton/vendor/font-awesome/fonts/fontawesome-webfont.woff +0 -0
- data/skeleton/vendor/font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
- data/skeleton/vendor/font-awesome/less/animated.less +34 -0
- data/skeleton/vendor/font-awesome/less/bordered-pulled.less +25 -0
- data/skeleton/vendor/font-awesome/less/core.less +12 -0
- data/skeleton/vendor/font-awesome/less/fixed-width.less +6 -0
- data/skeleton/vendor/font-awesome/less/font-awesome.less +17 -0
- data/skeleton/vendor/font-awesome/less/icons.less +677 -0
- data/skeleton/vendor/font-awesome/less/larger.less +13 -0
- data/skeleton/vendor/font-awesome/less/list.less +19 -0
- data/skeleton/vendor/font-awesome/less/mixins.less +26 -0
- data/skeleton/vendor/font-awesome/less/path.less +15 -0
- data/skeleton/vendor/font-awesome/less/rotated-flipped.less +20 -0
- data/skeleton/vendor/font-awesome/less/stacked.less +20 -0
- data/skeleton/vendor/font-awesome/less/variables.less +688 -0
- data/skeleton/vendor/font-awesome/scss/_animated.scss +34 -0
- data/skeleton/vendor/font-awesome/scss/_bordered-pulled.scss +25 -0
- data/skeleton/vendor/font-awesome/scss/_core.scss +12 -0
- data/skeleton/vendor/font-awesome/scss/_fixed-width.scss +6 -0
- data/skeleton/vendor/font-awesome/scss/_icons.scss +677 -0
- data/skeleton/vendor/font-awesome/scss/_larger.scss +13 -0
- data/skeleton/vendor/font-awesome/scss/_list.scss +19 -0
- data/skeleton/vendor/font-awesome/scss/_mixins.scss +26 -0
- data/skeleton/vendor/font-awesome/scss/_path.scss +15 -0
- data/skeleton/vendor/font-awesome/scss/_rotated-flipped.scss +20 -0
- data/skeleton/vendor/font-awesome/scss/_stacked.scss +20 -0
- data/skeleton/vendor/font-awesome/scss/_variables.scss +688 -0
- data/skeleton/vendor/font-awesome/scss/font-awesome.scss +17 -0
- data/skeleton/vendor/google-code-prettify/.bower.json +26 -0
- data/skeleton/vendor/google-code-prettify/CHANGES.html +172 -0
- data/skeleton/vendor/google-code-prettify/COPYING +191 -0
- data/skeleton/vendor/google-code-prettify/README-zh-Hans.html +143 -0
- data/skeleton/vendor/google-code-prettify/README.html +233 -0
- data/skeleton/vendor/google-code-prettify/README.md +54 -0
- data/skeleton/vendor/google-code-prettify/bin/prettify.min.css +1 -0
- data/skeleton/vendor/google-code-prettify/bin/prettify.min.js +30 -0
- data/skeleton/vendor/google-code-prettify/bin/run_prettify.min.js +34 -0
- data/skeleton/vendor/google-code-prettify/bower.json +16 -0
- data/skeleton/vendor/google-code-prettify/examples/quine.html +55 -0
- data/skeleton/vendor/google-code-prettify/src/lang-apollo.js +51 -0
- data/skeleton/vendor/google-code-prettify/src/lang-basic.js +32 -0
- data/skeleton/vendor/google-code-prettify/src/lang-clj.js +64 -0
- data/skeleton/vendor/google-code-prettify/src/lang-css.js +159 -0
- data/skeleton/vendor/google-code-prettify/src/lang-dart.js +88 -0
- data/skeleton/vendor/google-code-prettify/src/lang-erlang.js +92 -0
- data/skeleton/vendor/google-code-prettify/src/lang-go.js +58 -0
- data/skeleton/vendor/google-code-prettify/src/lang-hs.js +101 -0
- data/skeleton/vendor/google-code-prettify/src/lang-lisp.js +94 -0
- data/skeleton/vendor/google-code-prettify/src/lang-llvm.js +61 -0
- data/skeleton/vendor/google-code-prettify/src/lang-lua.js +59 -0
- data/skeleton/vendor/google-code-prettify/src/lang-matlab.js +180 -0
- data/skeleton/vendor/google-code-prettify/src/lang-ml.js +56 -0
- data/skeleton/vendor/google-code-prettify/src/lang-mumps.js +139 -0
- data/skeleton/vendor/google-code-prettify/src/lang-n.js +65 -0
- data/skeleton/vendor/google-code-prettify/src/lang-pascal.js +32 -0
- data/skeleton/vendor/google-code-prettify/src/lang-proto.js +35 -0
- data/skeleton/vendor/google-code-prettify/src/lang-r.js +57 -0
- data/skeleton/vendor/google-code-prettify/src/lang-rd.js +47 -0
- data/skeleton/vendor/google-code-prettify/src/lang-scala.js +54 -0
- data/skeleton/vendor/google-code-prettify/src/lang-sql.js +58 -0
- data/skeleton/vendor/google-code-prettify/src/lang-tcl.js +62 -0
- data/skeleton/vendor/google-code-prettify/src/lang-tex.js +46 -0
- data/skeleton/vendor/google-code-prettify/src/lang-vb.js +66 -0
- data/skeleton/vendor/google-code-prettify/src/lang-vhdl.js +34 -0
- data/skeleton/vendor/google-code-prettify/src/lang-wiki.js +53 -0
- data/skeleton/vendor/google-code-prettify/src/lang-xq.js +67 -0
- data/skeleton/vendor/google-code-prettify/src/lang-yaml.js +27 -0
- data/skeleton/vendor/google-code-prettify/src/prettify.css +52 -0
- data/skeleton/vendor/google-code-prettify/src/prettify.js +1655 -0
- data/skeleton/vendor/google-code-prettify/src/run_prettify.js +1905 -0
- data/skeleton/vendor/google-code-prettify/styles/demo.html +61 -0
- data/skeleton/vendor/google-code-prettify/styles/desert.css +34 -0
- data/skeleton/vendor/google-code-prettify/styles/doxy.css +64 -0
- data/skeleton/vendor/google-code-prettify/styles/index.html +89 -0
- data/skeleton/vendor/google-code-prettify/styles/sons-of-obsidian.css +118 -0
- data/skeleton/vendor/google-code-prettify/styles/sunburst.css +51 -0
- data/skeleton/vendor/jquery/.bower.json +38 -0
- data/skeleton/vendor/jquery/MIT-LICENSE.txt +21 -0
- data/skeleton/vendor/jquery/bower.json +28 -0
- data/skeleton/vendor/jquery/dist/jquery.js +9210 -0
- data/skeleton/vendor/jquery/dist/jquery.min.js +5 -0
- data/skeleton/vendor/jquery/dist/jquery.min.map +1 -0
- data/skeleton/vendor/jquery/src/ajax/jsonp.js +89 -0
- data/skeleton/vendor/jquery/src/ajax/load.js +75 -0
- data/skeleton/vendor/jquery/src/ajax/parseJSON.js +13 -0
- data/skeleton/vendor/jquery/src/ajax/parseXML.js +28 -0
- data/skeleton/vendor/jquery/src/ajax/script.js +64 -0
- data/skeleton/vendor/jquery/src/ajax/var/nonce.js +5 -0
- data/skeleton/vendor/jquery/src/ajax/var/rquery.js +3 -0
- data/skeleton/vendor/jquery/src/ajax/xhr.js +136 -0
- data/skeleton/vendor/jquery/src/ajax.js +786 -0
- data/skeleton/vendor/jquery/src/attributes/attr.js +141 -0
- data/skeleton/vendor/jquery/src/attributes/classes.js +158 -0
- data/skeleton/vendor/jquery/src/attributes/prop.js +94 -0
- data/skeleton/vendor/jquery/src/attributes/support.js +35 -0
- data/skeleton/vendor/jquery/src/attributes/val.js +161 -0
- data/skeleton/vendor/jquery/src/attributes.js +11 -0
- data/skeleton/vendor/jquery/src/callbacks.js +205 -0
- data/skeleton/vendor/jquery/src/core/access.js +60 -0
- data/skeleton/vendor/jquery/src/core/init.js +123 -0
- data/skeleton/vendor/jquery/src/core/parseHTML.js +39 -0
- data/skeleton/vendor/jquery/src/core/ready.js +97 -0
- data/skeleton/vendor/jquery/src/core/var/rsingleTag.js +4 -0
- data/skeleton/vendor/jquery/src/core.js +502 -0
- data/skeleton/vendor/jquery/src/css/addGetHookIf.js +22 -0
- data/skeleton/vendor/jquery/src/css/curCSS.js +57 -0
- data/skeleton/vendor/jquery/src/css/defaultDisplay.js +70 -0
- data/skeleton/vendor/jquery/src/css/hiddenVisibleSelectors.js +15 -0
- data/skeleton/vendor/jquery/src/css/support.js +96 -0
- data/skeleton/vendor/jquery/src/css/swap.js +28 -0
- data/skeleton/vendor/jquery/src/css/var/cssExpand.js +3 -0
- data/skeleton/vendor/jquery/src/css/var/getStyles.js +12 -0
- data/skeleton/vendor/jquery/src/css/var/isHidden.js +13 -0
- data/skeleton/vendor/jquery/src/css/var/rmargin.js +3 -0
- data/skeleton/vendor/jquery/src/css/var/rnumnonpx.js +5 -0
- data/skeleton/vendor/jquery/src/css.js +450 -0
- data/skeleton/vendor/jquery/src/data/Data.js +181 -0
- data/skeleton/vendor/jquery/src/data/accepts.js +20 -0
- data/skeleton/vendor/jquery/src/data/var/data_priv.js +5 -0
- data/skeleton/vendor/jquery/src/data/var/data_user.js +5 -0
- data/skeleton/vendor/jquery/src/data.js +178 -0
- data/skeleton/vendor/jquery/src/deferred.js +149 -0
- data/skeleton/vendor/jquery/src/deprecated.js +13 -0
- data/skeleton/vendor/jquery/src/dimensions.js +50 -0
- data/skeleton/vendor/jquery/src/effects/Tween.js +114 -0
- data/skeleton/vendor/jquery/src/effects/animatedSelector.js +13 -0
- data/skeleton/vendor/jquery/src/effects.js +648 -0
- data/skeleton/vendor/jquery/src/event/ajax.js +13 -0
- data/skeleton/vendor/jquery/src/event/alias.js +39 -0
- data/skeleton/vendor/jquery/src/event/support.js +9 -0
- data/skeleton/vendor/jquery/src/event.js +868 -0
- data/skeleton/vendor/jquery/src/exports/amd.js +24 -0
- data/skeleton/vendor/jquery/src/exports/global.js +32 -0
- data/skeleton/vendor/jquery/src/intro.js +44 -0
- data/skeleton/vendor/jquery/src/jquery.js +37 -0
- data/skeleton/vendor/jquery/src/manipulation/_evalUrl.js +18 -0
- data/skeleton/vendor/jquery/src/manipulation/support.js +32 -0
- data/skeleton/vendor/jquery/src/manipulation/var/rcheckableType.js +3 -0
- data/skeleton/vendor/jquery/src/manipulation.js +580 -0
- data/skeleton/vendor/jquery/src/offset.js +207 -0
- data/skeleton/vendor/jquery/src/outro.js +1 -0
- data/skeleton/vendor/jquery/src/queue/delay.js +22 -0
- data/skeleton/vendor/jquery/src/queue.js +142 -0
- data/skeleton/vendor/jquery/src/selector-native.js +172 -0
- data/skeleton/vendor/jquery/src/selector-sizzle.js +14 -0
- data/skeleton/vendor/jquery/src/selector.js +1 -0
- data/skeleton/vendor/jquery/src/serialize.js +111 -0
- data/skeleton/vendor/jquery/src/sizzle/dist/sizzle.js +2067 -0
- data/skeleton/vendor/jquery/src/sizzle/dist/sizzle.min.js +3 -0
- data/skeleton/vendor/jquery/src/sizzle/dist/sizzle.min.map +1 -0
- data/skeleton/vendor/jquery/src/traversing/findFilter.js +100 -0
- data/skeleton/vendor/jquery/src/traversing/var/rneedsContext.js +6 -0
- data/skeleton/vendor/jquery/src/traversing.js +199 -0
- data/skeleton/vendor/jquery/src/var/arr.js +3 -0
- data/skeleton/vendor/jquery/src/var/class2type.js +4 -0
- data/skeleton/vendor/jquery/src/var/concat.js +5 -0
- data/skeleton/vendor/jquery/src/var/hasOwn.js +5 -0
- data/skeleton/vendor/jquery/src/var/indexOf.js +5 -0
- data/skeleton/vendor/jquery/src/var/pnum.js +3 -0
- data/skeleton/vendor/jquery/src/var/push.js +5 -0
- data/skeleton/vendor/jquery/src/var/rnotwhite.js +3 -0
- data/skeleton/vendor/jquery/src/var/slice.js +5 -0
- data/skeleton/vendor/jquery/src/var/strundefined.js +3 -0
- data/skeleton/vendor/jquery/src/var/support.js +4 -0
- data/skeleton/vendor/jquery/src/var/toString.js +5 -0
- data/skeleton/vendor/jquery/src/wrap.js +79 -0
- data/skeleton/vendor/vue/.bower.json +29 -0
- data/skeleton/vendor/vue/LICENSE +21 -0
- data/skeleton/vendor/vue/bower.json +16 -0
- data/skeleton/vendor/vue/build/banner.js +8 -0
- data/skeleton/vendor/vue/build/grunt-tasks/build.js +50 -0
- data/skeleton/vendor/vue/build/grunt-tasks/casper.js +26 -0
- data/skeleton/vendor/vue/build/grunt-tasks/codecov.js +18 -0
- data/skeleton/vendor/vue/build/grunt-tasks/open.js +11 -0
- data/skeleton/vendor/vue/build/grunt-tasks/release.js +84 -0
- data/skeleton/vendor/vue/build/saucelabs.config.js +79 -0
- data/skeleton/vendor/vue/build/webpack.build.dev.config.js +20 -0
- data/skeleton/vendor/vue/build/webpack.build.prod.config.js +25 -0
- data/skeleton/vendor/vue/build/webpack.dev.config.js +10 -0
- data/skeleton/vendor/vue/build/webpack.test.config.js +13 -0
- data/skeleton/vendor/vue/circle.yml +4 -0
- data/skeleton/vendor/vue/dist/vue.js +9863 -0
- data/skeleton/vendor/vue/dist/vue.min.js +8 -0
- data/skeleton/vendor/vue/perf/bench.html +2 -0
- data/skeleton/vendor/vue/perf/bench.js +87 -0
- data/skeleton/vendor/vue/src/api/child.js +49 -0
- data/skeleton/vendor/vue/src/api/data.js +154 -0
- data/skeleton/vendor/vue/src/api/dom.js +226 -0
- data/skeleton/vendor/vue/src/api/events.js +174 -0
- data/skeleton/vendor/vue/src/api/global.js +119 -0
- data/skeleton/vendor/vue/src/api/lifecycle.js +68 -0
- data/skeleton/vendor/vue/src/batcher.js +98 -0
- data/skeleton/vendor/vue/src/cache.js +112 -0
- data/skeleton/vendor/vue/src/compiler/compile-props.js +183 -0
- data/skeleton/vendor/vue/src/compiler/compile.js +631 -0
- data/skeleton/vendor/vue/src/compiler/index.js +4 -0
- data/skeleton/vendor/vue/src/compiler/transclude.js +144 -0
- data/skeleton/vendor/vue/src/config.js +124 -0
- data/skeleton/vendor/vue/src/directive.js +224 -0
- data/skeleton/vendor/vue/src/directives/attr.js +51 -0
- data/skeleton/vendor/vue/src/directives/class.js +70 -0
- data/skeleton/vendor/vue/src/directives/cloak.js +10 -0
- data/skeleton/vendor/vue/src/directives/component.js +300 -0
- data/skeleton/vendor/vue/src/directives/el.js +12 -0
- data/skeleton/vendor/vue/src/directives/html.js +40 -0
- data/skeleton/vendor/vue/src/directives/if.js +126 -0
- data/skeleton/vendor/vue/src/directives/index.js +24 -0
- data/skeleton/vendor/vue/src/directives/model/checkbox.js +24 -0
- data/skeleton/vendor/vue/src/directives/model/index.js +76 -0
- data/skeleton/vendor/vue/src/directives/model/radio.js +26 -0
- data/skeleton/vendor/vue/src/directives/model/select.js +199 -0
- data/skeleton/vendor/vue/src/directives/model/text.js +159 -0
- data/skeleton/vendor/vue/src/directives/on.js +60 -0
- data/skeleton/vendor/vue/src/directives/prop.js +62 -0
- data/skeleton/vendor/vue/src/directives/ref.js +22 -0
- data/skeleton/vendor/vue/src/directives/repeat.js +754 -0
- data/skeleton/vendor/vue/src/directives/show.js +8 -0
- data/skeleton/vendor/vue/src/directives/style.js +110 -0
- data/skeleton/vendor/vue/src/directives/text.js +14 -0
- data/skeleton/vendor/vue/src/directives/transition.js +26 -0
- data/skeleton/vendor/vue/src/element-directives/content.js +111 -0
- data/skeleton/vendor/vue/src/element-directives/index.js +2 -0
- data/skeleton/vendor/vue/src/element-directives/partial.js +73 -0
- data/skeleton/vendor/vue/src/filters/array-filters.js +85 -0
- data/skeleton/vendor/vue/src/filters/index.js +137 -0
- data/skeleton/vendor/vue/src/instance/compile.js +196 -0
- data/skeleton/vendor/vue/src/instance/events.js +139 -0
- data/skeleton/vendor/vue/src/instance/init.js +89 -0
- data/skeleton/vendor/vue/src/instance/misc.js +93 -0
- data/skeleton/vendor/vue/src/instance/scope.js +282 -0
- data/skeleton/vendor/vue/src/observer/array.js +92 -0
- data/skeleton/vendor/vue/src/observer/dep.js +61 -0
- data/skeleton/vendor/vue/src/observer/index.js +212 -0
- data/skeleton/vendor/vue/src/observer/object.js +82 -0
- data/skeleton/vendor/vue/src/parsers/directive.js +179 -0
- data/skeleton/vendor/vue/src/parsers/expression.js +264 -0
- data/skeleton/vendor/vue/src/parsers/path.js +348 -0
- data/skeleton/vendor/vue/src/parsers/template.js +264 -0
- data/skeleton/vendor/vue/src/parsers/text.js +176 -0
- data/skeleton/vendor/vue/src/transition/index.js +128 -0
- data/skeleton/vendor/vue/src/transition/queue.js +35 -0
- data/skeleton/vendor/vue/src/transition/transition.js +308 -0
- data/skeleton/vendor/vue/src/util/component.js +124 -0
- data/skeleton/vendor/vue/src/util/debug.js +64 -0
- data/skeleton/vendor/vue/src/util/dom.js +262 -0
- data/skeleton/vendor/vue/src/util/env.js +85 -0
- data/skeleton/vendor/vue/src/util/index.js +9 -0
- data/skeleton/vendor/vue/src/util/lang.js +289 -0
- data/skeleton/vendor/vue/src/util/options.js +353 -0
- data/skeleton/vendor/vue/src/vue.js +89 -0
- data/skeleton/vendor/vue/src/watcher.js +292 -0
- data/tmp/.keep +0 -0
- metadata +677 -0
@@ -0,0 +1,786 @@
|
|
1
|
+
define([
|
2
|
+
"./core",
|
3
|
+
"./var/rnotwhite",
|
4
|
+
"./ajax/var/nonce",
|
5
|
+
"./ajax/var/rquery",
|
6
|
+
"./core/init",
|
7
|
+
"./ajax/parseJSON",
|
8
|
+
"./ajax/parseXML",
|
9
|
+
"./deferred"
|
10
|
+
], function( jQuery, rnotwhite, nonce, rquery ) {
|
11
|
+
|
12
|
+
var
|
13
|
+
rhash = /#.*$/,
|
14
|
+
rts = /([?&])_=[^&]*/,
|
15
|
+
rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
|
16
|
+
// #7653, #8125, #8152: local protocol detection
|
17
|
+
rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
|
18
|
+
rnoContent = /^(?:GET|HEAD)$/,
|
19
|
+
rprotocol = /^\/\//,
|
20
|
+
rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,
|
21
|
+
|
22
|
+
/* Prefilters
|
23
|
+
* 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
|
24
|
+
* 2) These are called:
|
25
|
+
* - BEFORE asking for a transport
|
26
|
+
* - AFTER param serialization (s.data is a string if s.processData is true)
|
27
|
+
* 3) key is the dataType
|
28
|
+
* 4) the catchall symbol "*" can be used
|
29
|
+
* 5) execution will start with transport dataType and THEN continue down to "*" if needed
|
30
|
+
*/
|
31
|
+
prefilters = {},
|
32
|
+
|
33
|
+
/* Transports bindings
|
34
|
+
* 1) key is the dataType
|
35
|
+
* 2) the catchall symbol "*" can be used
|
36
|
+
* 3) selection will start with transport dataType and THEN go to "*" if needed
|
37
|
+
*/
|
38
|
+
transports = {},
|
39
|
+
|
40
|
+
// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
|
41
|
+
allTypes = "*/".concat( "*" ),
|
42
|
+
|
43
|
+
// Document location
|
44
|
+
ajaxLocation = window.location.href,
|
45
|
+
|
46
|
+
// Segment location into parts
|
47
|
+
ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
|
48
|
+
|
49
|
+
// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
|
50
|
+
function addToPrefiltersOrTransports( structure ) {
|
51
|
+
|
52
|
+
// dataTypeExpression is optional and defaults to "*"
|
53
|
+
return function( dataTypeExpression, func ) {
|
54
|
+
|
55
|
+
if ( typeof dataTypeExpression !== "string" ) {
|
56
|
+
func = dataTypeExpression;
|
57
|
+
dataTypeExpression = "*";
|
58
|
+
}
|
59
|
+
|
60
|
+
var dataType,
|
61
|
+
i = 0,
|
62
|
+
dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];
|
63
|
+
|
64
|
+
if ( jQuery.isFunction( func ) ) {
|
65
|
+
// For each dataType in the dataTypeExpression
|
66
|
+
while ( (dataType = dataTypes[i++]) ) {
|
67
|
+
// Prepend if requested
|
68
|
+
if ( dataType[0] === "+" ) {
|
69
|
+
dataType = dataType.slice( 1 ) || "*";
|
70
|
+
(structure[ dataType ] = structure[ dataType ] || []).unshift( func );
|
71
|
+
|
72
|
+
// Otherwise append
|
73
|
+
} else {
|
74
|
+
(structure[ dataType ] = structure[ dataType ] || []).push( func );
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
78
|
+
};
|
79
|
+
}
|
80
|
+
|
81
|
+
// Base inspection function for prefilters and transports
|
82
|
+
function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
|
83
|
+
|
84
|
+
var inspected = {},
|
85
|
+
seekingTransport = ( structure === transports );
|
86
|
+
|
87
|
+
function inspect( dataType ) {
|
88
|
+
var selected;
|
89
|
+
inspected[ dataType ] = true;
|
90
|
+
jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
|
91
|
+
var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
|
92
|
+
if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
|
93
|
+
options.dataTypes.unshift( dataTypeOrTransport );
|
94
|
+
inspect( dataTypeOrTransport );
|
95
|
+
return false;
|
96
|
+
} else if ( seekingTransport ) {
|
97
|
+
return !( selected = dataTypeOrTransport );
|
98
|
+
}
|
99
|
+
});
|
100
|
+
return selected;
|
101
|
+
}
|
102
|
+
|
103
|
+
return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
|
104
|
+
}
|
105
|
+
|
106
|
+
// A special extend for ajax options
|
107
|
+
// that takes "flat" options (not to be deep extended)
|
108
|
+
// Fixes #9887
|
109
|
+
function ajaxExtend( target, src ) {
|
110
|
+
var key, deep,
|
111
|
+
flatOptions = jQuery.ajaxSettings.flatOptions || {};
|
112
|
+
|
113
|
+
for ( key in src ) {
|
114
|
+
if ( src[ key ] !== undefined ) {
|
115
|
+
( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
|
116
|
+
}
|
117
|
+
}
|
118
|
+
if ( deep ) {
|
119
|
+
jQuery.extend( true, target, deep );
|
120
|
+
}
|
121
|
+
|
122
|
+
return target;
|
123
|
+
}
|
124
|
+
|
125
|
+
/* Handles responses to an ajax request:
|
126
|
+
* - finds the right dataType (mediates between content-type and expected dataType)
|
127
|
+
* - returns the corresponding response
|
128
|
+
*/
|
129
|
+
function ajaxHandleResponses( s, jqXHR, responses ) {
|
130
|
+
|
131
|
+
var ct, type, finalDataType, firstDataType,
|
132
|
+
contents = s.contents,
|
133
|
+
dataTypes = s.dataTypes;
|
134
|
+
|
135
|
+
// Remove auto dataType and get content-type in the process
|
136
|
+
while ( dataTypes[ 0 ] === "*" ) {
|
137
|
+
dataTypes.shift();
|
138
|
+
if ( ct === undefined ) {
|
139
|
+
ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
143
|
+
// Check if we're dealing with a known content-type
|
144
|
+
if ( ct ) {
|
145
|
+
for ( type in contents ) {
|
146
|
+
if ( contents[ type ] && contents[ type ].test( ct ) ) {
|
147
|
+
dataTypes.unshift( type );
|
148
|
+
break;
|
149
|
+
}
|
150
|
+
}
|
151
|
+
}
|
152
|
+
|
153
|
+
// Check to see if we have a response for the expected dataType
|
154
|
+
if ( dataTypes[ 0 ] in responses ) {
|
155
|
+
finalDataType = dataTypes[ 0 ];
|
156
|
+
} else {
|
157
|
+
// Try convertible dataTypes
|
158
|
+
for ( type in responses ) {
|
159
|
+
if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
|
160
|
+
finalDataType = type;
|
161
|
+
break;
|
162
|
+
}
|
163
|
+
if ( !firstDataType ) {
|
164
|
+
firstDataType = type;
|
165
|
+
}
|
166
|
+
}
|
167
|
+
// Or just use first one
|
168
|
+
finalDataType = finalDataType || firstDataType;
|
169
|
+
}
|
170
|
+
|
171
|
+
// If we found a dataType
|
172
|
+
// We add the dataType to the list if needed
|
173
|
+
// and return the corresponding response
|
174
|
+
if ( finalDataType ) {
|
175
|
+
if ( finalDataType !== dataTypes[ 0 ] ) {
|
176
|
+
dataTypes.unshift( finalDataType );
|
177
|
+
}
|
178
|
+
return responses[ finalDataType ];
|
179
|
+
}
|
180
|
+
}
|
181
|
+
|
182
|
+
/* Chain conversions given the request and the original response
|
183
|
+
* Also sets the responseXXX fields on the jqXHR instance
|
184
|
+
*/
|
185
|
+
function ajaxConvert( s, response, jqXHR, isSuccess ) {
|
186
|
+
var conv2, current, conv, tmp, prev,
|
187
|
+
converters = {},
|
188
|
+
// Work with a copy of dataTypes in case we need to modify it for conversion
|
189
|
+
dataTypes = s.dataTypes.slice();
|
190
|
+
|
191
|
+
// Create converters map with lowercased keys
|
192
|
+
if ( dataTypes[ 1 ] ) {
|
193
|
+
for ( conv in s.converters ) {
|
194
|
+
converters[ conv.toLowerCase() ] = s.converters[ conv ];
|
195
|
+
}
|
196
|
+
}
|
197
|
+
|
198
|
+
current = dataTypes.shift();
|
199
|
+
|
200
|
+
// Convert to each sequential dataType
|
201
|
+
while ( current ) {
|
202
|
+
|
203
|
+
if ( s.responseFields[ current ] ) {
|
204
|
+
jqXHR[ s.responseFields[ current ] ] = response;
|
205
|
+
}
|
206
|
+
|
207
|
+
// Apply the dataFilter if provided
|
208
|
+
if ( !prev && isSuccess && s.dataFilter ) {
|
209
|
+
response = s.dataFilter( response, s.dataType );
|
210
|
+
}
|
211
|
+
|
212
|
+
prev = current;
|
213
|
+
current = dataTypes.shift();
|
214
|
+
|
215
|
+
if ( current ) {
|
216
|
+
|
217
|
+
// There's only work to do if current dataType is non-auto
|
218
|
+
if ( current === "*" ) {
|
219
|
+
|
220
|
+
current = prev;
|
221
|
+
|
222
|
+
// Convert response if prev dataType is non-auto and differs from current
|
223
|
+
} else if ( prev !== "*" && prev !== current ) {
|
224
|
+
|
225
|
+
// Seek a direct converter
|
226
|
+
conv = converters[ prev + " " + current ] || converters[ "* " + current ];
|
227
|
+
|
228
|
+
// If none found, seek a pair
|
229
|
+
if ( !conv ) {
|
230
|
+
for ( conv2 in converters ) {
|
231
|
+
|
232
|
+
// If conv2 outputs current
|
233
|
+
tmp = conv2.split( " " );
|
234
|
+
if ( tmp[ 1 ] === current ) {
|
235
|
+
|
236
|
+
// If prev can be converted to accepted input
|
237
|
+
conv = converters[ prev + " " + tmp[ 0 ] ] ||
|
238
|
+
converters[ "* " + tmp[ 0 ] ];
|
239
|
+
if ( conv ) {
|
240
|
+
// Condense equivalence converters
|
241
|
+
if ( conv === true ) {
|
242
|
+
conv = converters[ conv2 ];
|
243
|
+
|
244
|
+
// Otherwise, insert the intermediate dataType
|
245
|
+
} else if ( converters[ conv2 ] !== true ) {
|
246
|
+
current = tmp[ 0 ];
|
247
|
+
dataTypes.unshift( tmp[ 1 ] );
|
248
|
+
}
|
249
|
+
break;
|
250
|
+
}
|
251
|
+
}
|
252
|
+
}
|
253
|
+
}
|
254
|
+
|
255
|
+
// Apply converter (if not an equivalence)
|
256
|
+
if ( conv !== true ) {
|
257
|
+
|
258
|
+
// Unless errors are allowed to bubble, catch and return them
|
259
|
+
if ( conv && s[ "throws" ] ) {
|
260
|
+
response = conv( response );
|
261
|
+
} else {
|
262
|
+
try {
|
263
|
+
response = conv( response );
|
264
|
+
} catch ( e ) {
|
265
|
+
return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
|
266
|
+
}
|
267
|
+
}
|
268
|
+
}
|
269
|
+
}
|
270
|
+
}
|
271
|
+
}
|
272
|
+
|
273
|
+
return { state: "success", data: response };
|
274
|
+
}
|
275
|
+
|
276
|
+
jQuery.extend({
|
277
|
+
|
278
|
+
// Counter for holding the number of active queries
|
279
|
+
active: 0,
|
280
|
+
|
281
|
+
// Last-Modified header cache for next request
|
282
|
+
lastModified: {},
|
283
|
+
etag: {},
|
284
|
+
|
285
|
+
ajaxSettings: {
|
286
|
+
url: ajaxLocation,
|
287
|
+
type: "GET",
|
288
|
+
isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
|
289
|
+
global: true,
|
290
|
+
processData: true,
|
291
|
+
async: true,
|
292
|
+
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
|
293
|
+
/*
|
294
|
+
timeout: 0,
|
295
|
+
data: null,
|
296
|
+
dataType: null,
|
297
|
+
username: null,
|
298
|
+
password: null,
|
299
|
+
cache: null,
|
300
|
+
throws: false,
|
301
|
+
traditional: false,
|
302
|
+
headers: {},
|
303
|
+
*/
|
304
|
+
|
305
|
+
accepts: {
|
306
|
+
"*": allTypes,
|
307
|
+
text: "text/plain",
|
308
|
+
html: "text/html",
|
309
|
+
xml: "application/xml, text/xml",
|
310
|
+
json: "application/json, text/javascript"
|
311
|
+
},
|
312
|
+
|
313
|
+
contents: {
|
314
|
+
xml: /xml/,
|
315
|
+
html: /html/,
|
316
|
+
json: /json/
|
317
|
+
},
|
318
|
+
|
319
|
+
responseFields: {
|
320
|
+
xml: "responseXML",
|
321
|
+
text: "responseText",
|
322
|
+
json: "responseJSON"
|
323
|
+
},
|
324
|
+
|
325
|
+
// Data converters
|
326
|
+
// Keys separate source (or catchall "*") and destination types with a single space
|
327
|
+
converters: {
|
328
|
+
|
329
|
+
// Convert anything to text
|
330
|
+
"* text": String,
|
331
|
+
|
332
|
+
// Text to html (true = no transformation)
|
333
|
+
"text html": true,
|
334
|
+
|
335
|
+
// Evaluate text as a json expression
|
336
|
+
"text json": jQuery.parseJSON,
|
337
|
+
|
338
|
+
// Parse text as xml
|
339
|
+
"text xml": jQuery.parseXML
|
340
|
+
},
|
341
|
+
|
342
|
+
// For options that shouldn't be deep extended:
|
343
|
+
// you can add your own custom options here if
|
344
|
+
// and when you create one that shouldn't be
|
345
|
+
// deep extended (see ajaxExtend)
|
346
|
+
flatOptions: {
|
347
|
+
url: true,
|
348
|
+
context: true
|
349
|
+
}
|
350
|
+
},
|
351
|
+
|
352
|
+
// Creates a full fledged settings object into target
|
353
|
+
// with both ajaxSettings and settings fields.
|
354
|
+
// If target is omitted, writes into ajaxSettings.
|
355
|
+
ajaxSetup: function( target, settings ) {
|
356
|
+
return settings ?
|
357
|
+
|
358
|
+
// Building a settings object
|
359
|
+
ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
|
360
|
+
|
361
|
+
// Extending ajaxSettings
|
362
|
+
ajaxExtend( jQuery.ajaxSettings, target );
|
363
|
+
},
|
364
|
+
|
365
|
+
ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
|
366
|
+
ajaxTransport: addToPrefiltersOrTransports( transports ),
|
367
|
+
|
368
|
+
// Main method
|
369
|
+
ajax: function( url, options ) {
|
370
|
+
|
371
|
+
// If url is an object, simulate pre-1.5 signature
|
372
|
+
if ( typeof url === "object" ) {
|
373
|
+
options = url;
|
374
|
+
url = undefined;
|
375
|
+
}
|
376
|
+
|
377
|
+
// Force options to be an object
|
378
|
+
options = options || {};
|
379
|
+
|
380
|
+
var transport,
|
381
|
+
// URL without anti-cache param
|
382
|
+
cacheURL,
|
383
|
+
// Response headers
|
384
|
+
responseHeadersString,
|
385
|
+
responseHeaders,
|
386
|
+
// timeout handle
|
387
|
+
timeoutTimer,
|
388
|
+
// Cross-domain detection vars
|
389
|
+
parts,
|
390
|
+
// To know if global events are to be dispatched
|
391
|
+
fireGlobals,
|
392
|
+
// Loop variable
|
393
|
+
i,
|
394
|
+
// Create the final options object
|
395
|
+
s = jQuery.ajaxSetup( {}, options ),
|
396
|
+
// Callbacks context
|
397
|
+
callbackContext = s.context || s,
|
398
|
+
// Context for global events is callbackContext if it is a DOM node or jQuery collection
|
399
|
+
globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
|
400
|
+
jQuery( callbackContext ) :
|
401
|
+
jQuery.event,
|
402
|
+
// Deferreds
|
403
|
+
deferred = jQuery.Deferred(),
|
404
|
+
completeDeferred = jQuery.Callbacks("once memory"),
|
405
|
+
// Status-dependent callbacks
|
406
|
+
statusCode = s.statusCode || {},
|
407
|
+
// Headers (they are sent all at once)
|
408
|
+
requestHeaders = {},
|
409
|
+
requestHeadersNames = {},
|
410
|
+
// The jqXHR state
|
411
|
+
state = 0,
|
412
|
+
// Default abort message
|
413
|
+
strAbort = "canceled",
|
414
|
+
// Fake xhr
|
415
|
+
jqXHR = {
|
416
|
+
readyState: 0,
|
417
|
+
|
418
|
+
// Builds headers hashtable if needed
|
419
|
+
getResponseHeader: function( key ) {
|
420
|
+
var match;
|
421
|
+
if ( state === 2 ) {
|
422
|
+
if ( !responseHeaders ) {
|
423
|
+
responseHeaders = {};
|
424
|
+
while ( (match = rheaders.exec( responseHeadersString )) ) {
|
425
|
+
responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
|
426
|
+
}
|
427
|
+
}
|
428
|
+
match = responseHeaders[ key.toLowerCase() ];
|
429
|
+
}
|
430
|
+
return match == null ? null : match;
|
431
|
+
},
|
432
|
+
|
433
|
+
// Raw string
|
434
|
+
getAllResponseHeaders: function() {
|
435
|
+
return state === 2 ? responseHeadersString : null;
|
436
|
+
},
|
437
|
+
|
438
|
+
// Caches the header
|
439
|
+
setRequestHeader: function( name, value ) {
|
440
|
+
var lname = name.toLowerCase();
|
441
|
+
if ( !state ) {
|
442
|
+
name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
|
443
|
+
requestHeaders[ name ] = value;
|
444
|
+
}
|
445
|
+
return this;
|
446
|
+
},
|
447
|
+
|
448
|
+
// Overrides response content-type header
|
449
|
+
overrideMimeType: function( type ) {
|
450
|
+
if ( !state ) {
|
451
|
+
s.mimeType = type;
|
452
|
+
}
|
453
|
+
return this;
|
454
|
+
},
|
455
|
+
|
456
|
+
// Status-dependent callbacks
|
457
|
+
statusCode: function( map ) {
|
458
|
+
var code;
|
459
|
+
if ( map ) {
|
460
|
+
if ( state < 2 ) {
|
461
|
+
for ( code in map ) {
|
462
|
+
// Lazy-add the new callback in a way that preserves old ones
|
463
|
+
statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
|
464
|
+
}
|
465
|
+
} else {
|
466
|
+
// Execute the appropriate callbacks
|
467
|
+
jqXHR.always( map[ jqXHR.status ] );
|
468
|
+
}
|
469
|
+
}
|
470
|
+
return this;
|
471
|
+
},
|
472
|
+
|
473
|
+
// Cancel the request
|
474
|
+
abort: function( statusText ) {
|
475
|
+
var finalText = statusText || strAbort;
|
476
|
+
if ( transport ) {
|
477
|
+
transport.abort( finalText );
|
478
|
+
}
|
479
|
+
done( 0, finalText );
|
480
|
+
return this;
|
481
|
+
}
|
482
|
+
};
|
483
|
+
|
484
|
+
// Attach deferreds
|
485
|
+
deferred.promise( jqXHR ).complete = completeDeferred.add;
|
486
|
+
jqXHR.success = jqXHR.done;
|
487
|
+
jqXHR.error = jqXHR.fail;
|
488
|
+
|
489
|
+
// Remove hash character (#7531: and string promotion)
|
490
|
+
// Add protocol if not provided (prefilters might expect it)
|
491
|
+
// Handle falsy url in the settings object (#10093: consistency with old signature)
|
492
|
+
// We also use the url parameter if available
|
493
|
+
s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" )
|
494
|
+
.replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
|
495
|
+
|
496
|
+
// Alias method option to type as per ticket #12004
|
497
|
+
s.type = options.method || options.type || s.method || s.type;
|
498
|
+
|
499
|
+
// Extract dataTypes list
|
500
|
+
s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];
|
501
|
+
|
502
|
+
// A cross-domain request is in order when we have a protocol:host:port mismatch
|
503
|
+
if ( s.crossDomain == null ) {
|
504
|
+
parts = rurl.exec( s.url.toLowerCase() );
|
505
|
+
s.crossDomain = !!( parts &&
|
506
|
+
( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
|
507
|
+
( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
|
508
|
+
( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
|
509
|
+
);
|
510
|
+
}
|
511
|
+
|
512
|
+
// Convert data if not already a string
|
513
|
+
if ( s.data && s.processData && typeof s.data !== "string" ) {
|
514
|
+
s.data = jQuery.param( s.data, s.traditional );
|
515
|
+
}
|
516
|
+
|
517
|
+
// Apply prefilters
|
518
|
+
inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
|
519
|
+
|
520
|
+
// If request was aborted inside a prefilter, stop there
|
521
|
+
if ( state === 2 ) {
|
522
|
+
return jqXHR;
|
523
|
+
}
|
524
|
+
|
525
|
+
// We can fire global events as of now if asked to
|
526
|
+
// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
|
527
|
+
fireGlobals = jQuery.event && s.global;
|
528
|
+
|
529
|
+
// Watch for a new set of requests
|
530
|
+
if ( fireGlobals && jQuery.active++ === 0 ) {
|
531
|
+
jQuery.event.trigger("ajaxStart");
|
532
|
+
}
|
533
|
+
|
534
|
+
// Uppercase the type
|
535
|
+
s.type = s.type.toUpperCase();
|
536
|
+
|
537
|
+
// Determine if request has content
|
538
|
+
s.hasContent = !rnoContent.test( s.type );
|
539
|
+
|
540
|
+
// Save the URL in case we're toying with the If-Modified-Since
|
541
|
+
// and/or If-None-Match header later on
|
542
|
+
cacheURL = s.url;
|
543
|
+
|
544
|
+
// More options handling for requests with no content
|
545
|
+
if ( !s.hasContent ) {
|
546
|
+
|
547
|
+
// If data is available, append data to url
|
548
|
+
if ( s.data ) {
|
549
|
+
cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
|
550
|
+
// #9682: remove data so that it's not used in an eventual retry
|
551
|
+
delete s.data;
|
552
|
+
}
|
553
|
+
|
554
|
+
// Add anti-cache in url if needed
|
555
|
+
if ( s.cache === false ) {
|
556
|
+
s.url = rts.test( cacheURL ) ?
|
557
|
+
|
558
|
+
// If there is already a '_' parameter, set its value
|
559
|
+
cacheURL.replace( rts, "$1_=" + nonce++ ) :
|
560
|
+
|
561
|
+
// Otherwise add one to the end
|
562
|
+
cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++;
|
563
|
+
}
|
564
|
+
}
|
565
|
+
|
566
|
+
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
|
567
|
+
if ( s.ifModified ) {
|
568
|
+
if ( jQuery.lastModified[ cacheURL ] ) {
|
569
|
+
jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
|
570
|
+
}
|
571
|
+
if ( jQuery.etag[ cacheURL ] ) {
|
572
|
+
jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
|
573
|
+
}
|
574
|
+
}
|
575
|
+
|
576
|
+
// Set the correct header, if data is being sent
|
577
|
+
if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
|
578
|
+
jqXHR.setRequestHeader( "Content-Type", s.contentType );
|
579
|
+
}
|
580
|
+
|
581
|
+
// Set the Accepts header for the server, depending on the dataType
|
582
|
+
jqXHR.setRequestHeader(
|
583
|
+
"Accept",
|
584
|
+
s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
|
585
|
+
s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
|
586
|
+
s.accepts[ "*" ]
|
587
|
+
);
|
588
|
+
|
589
|
+
// Check for headers option
|
590
|
+
for ( i in s.headers ) {
|
591
|
+
jqXHR.setRequestHeader( i, s.headers[ i ] );
|
592
|
+
}
|
593
|
+
|
594
|
+
// Allow custom headers/mimetypes and early abort
|
595
|
+
if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
|
596
|
+
// Abort if not done already and return
|
597
|
+
return jqXHR.abort();
|
598
|
+
}
|
599
|
+
|
600
|
+
// Aborting is no longer a cancellation
|
601
|
+
strAbort = "abort";
|
602
|
+
|
603
|
+
// Install callbacks on deferreds
|
604
|
+
for ( i in { success: 1, error: 1, complete: 1 } ) {
|
605
|
+
jqXHR[ i ]( s[ i ] );
|
606
|
+
}
|
607
|
+
|
608
|
+
// Get transport
|
609
|
+
transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
|
610
|
+
|
611
|
+
// If no transport, we auto-abort
|
612
|
+
if ( !transport ) {
|
613
|
+
done( -1, "No Transport" );
|
614
|
+
} else {
|
615
|
+
jqXHR.readyState = 1;
|
616
|
+
|
617
|
+
// Send global event
|
618
|
+
if ( fireGlobals ) {
|
619
|
+
globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
|
620
|
+
}
|
621
|
+
// Timeout
|
622
|
+
if ( s.async && s.timeout > 0 ) {
|
623
|
+
timeoutTimer = setTimeout(function() {
|
624
|
+
jqXHR.abort("timeout");
|
625
|
+
}, s.timeout );
|
626
|
+
}
|
627
|
+
|
628
|
+
try {
|
629
|
+
state = 1;
|
630
|
+
transport.send( requestHeaders, done );
|
631
|
+
} catch ( e ) {
|
632
|
+
// Propagate exception as error if not done
|
633
|
+
if ( state < 2 ) {
|
634
|
+
done( -1, e );
|
635
|
+
// Simply rethrow otherwise
|
636
|
+
} else {
|
637
|
+
throw e;
|
638
|
+
}
|
639
|
+
}
|
640
|
+
}
|
641
|
+
|
642
|
+
// Callback for when everything is done
|
643
|
+
function done( status, nativeStatusText, responses, headers ) {
|
644
|
+
var isSuccess, success, error, response, modified,
|
645
|
+
statusText = nativeStatusText;
|
646
|
+
|
647
|
+
// Called once
|
648
|
+
if ( state === 2 ) {
|
649
|
+
return;
|
650
|
+
}
|
651
|
+
|
652
|
+
// State is "done" now
|
653
|
+
state = 2;
|
654
|
+
|
655
|
+
// Clear timeout if it exists
|
656
|
+
if ( timeoutTimer ) {
|
657
|
+
clearTimeout( timeoutTimer );
|
658
|
+
}
|
659
|
+
|
660
|
+
// Dereference transport for early garbage collection
|
661
|
+
// (no matter how long the jqXHR object will be used)
|
662
|
+
transport = undefined;
|
663
|
+
|
664
|
+
// Cache response headers
|
665
|
+
responseHeadersString = headers || "";
|
666
|
+
|
667
|
+
// Set readyState
|
668
|
+
jqXHR.readyState = status > 0 ? 4 : 0;
|
669
|
+
|
670
|
+
// Determine if successful
|
671
|
+
isSuccess = status >= 200 && status < 300 || status === 304;
|
672
|
+
|
673
|
+
// Get response data
|
674
|
+
if ( responses ) {
|
675
|
+
response = ajaxHandleResponses( s, jqXHR, responses );
|
676
|
+
}
|
677
|
+
|
678
|
+
// Convert no matter what (that way responseXXX fields are always set)
|
679
|
+
response = ajaxConvert( s, response, jqXHR, isSuccess );
|
680
|
+
|
681
|
+
// If successful, handle type chaining
|
682
|
+
if ( isSuccess ) {
|
683
|
+
|
684
|
+
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
|
685
|
+
if ( s.ifModified ) {
|
686
|
+
modified = jqXHR.getResponseHeader("Last-Modified");
|
687
|
+
if ( modified ) {
|
688
|
+
jQuery.lastModified[ cacheURL ] = modified;
|
689
|
+
}
|
690
|
+
modified = jqXHR.getResponseHeader("etag");
|
691
|
+
if ( modified ) {
|
692
|
+
jQuery.etag[ cacheURL ] = modified;
|
693
|
+
}
|
694
|
+
}
|
695
|
+
|
696
|
+
// if no content
|
697
|
+
if ( status === 204 || s.type === "HEAD" ) {
|
698
|
+
statusText = "nocontent";
|
699
|
+
|
700
|
+
// if not modified
|
701
|
+
} else if ( status === 304 ) {
|
702
|
+
statusText = "notmodified";
|
703
|
+
|
704
|
+
// If we have data, let's convert it
|
705
|
+
} else {
|
706
|
+
statusText = response.state;
|
707
|
+
success = response.data;
|
708
|
+
error = response.error;
|
709
|
+
isSuccess = !error;
|
710
|
+
}
|
711
|
+
} else {
|
712
|
+
// Extract error from statusText and normalize for non-aborts
|
713
|
+
error = statusText;
|
714
|
+
if ( status || !statusText ) {
|
715
|
+
statusText = "error";
|
716
|
+
if ( status < 0 ) {
|
717
|
+
status = 0;
|
718
|
+
}
|
719
|
+
}
|
720
|
+
}
|
721
|
+
|
722
|
+
// Set data for the fake xhr object
|
723
|
+
jqXHR.status = status;
|
724
|
+
jqXHR.statusText = ( nativeStatusText || statusText ) + "";
|
725
|
+
|
726
|
+
// Success/Error
|
727
|
+
if ( isSuccess ) {
|
728
|
+
deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
|
729
|
+
} else {
|
730
|
+
deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
|
731
|
+
}
|
732
|
+
|
733
|
+
// Status-dependent callbacks
|
734
|
+
jqXHR.statusCode( statusCode );
|
735
|
+
statusCode = undefined;
|
736
|
+
|
737
|
+
if ( fireGlobals ) {
|
738
|
+
globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
|
739
|
+
[ jqXHR, s, isSuccess ? success : error ] );
|
740
|
+
}
|
741
|
+
|
742
|
+
// Complete
|
743
|
+
completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
|
744
|
+
|
745
|
+
if ( fireGlobals ) {
|
746
|
+
globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
|
747
|
+
// Handle the global AJAX counter
|
748
|
+
if ( !( --jQuery.active ) ) {
|
749
|
+
jQuery.event.trigger("ajaxStop");
|
750
|
+
}
|
751
|
+
}
|
752
|
+
}
|
753
|
+
|
754
|
+
return jqXHR;
|
755
|
+
},
|
756
|
+
|
757
|
+
getJSON: function( url, data, callback ) {
|
758
|
+
return jQuery.get( url, data, callback, "json" );
|
759
|
+
},
|
760
|
+
|
761
|
+
getScript: function( url, callback ) {
|
762
|
+
return jQuery.get( url, undefined, callback, "script" );
|
763
|
+
}
|
764
|
+
});
|
765
|
+
|
766
|
+
jQuery.each( [ "get", "post" ], function( i, method ) {
|
767
|
+
jQuery[ method ] = function( url, data, callback, type ) {
|
768
|
+
// Shift arguments if data argument was omitted
|
769
|
+
if ( jQuery.isFunction( data ) ) {
|
770
|
+
type = type || callback;
|
771
|
+
callback = data;
|
772
|
+
data = undefined;
|
773
|
+
}
|
774
|
+
|
775
|
+
return jQuery.ajax({
|
776
|
+
url: url,
|
777
|
+
type: method,
|
778
|
+
dataType: type,
|
779
|
+
data: data,
|
780
|
+
success: callback
|
781
|
+
});
|
782
|
+
};
|
783
|
+
});
|
784
|
+
|
785
|
+
return jQuery;
|
786
|
+
});
|