try_api 0.0.18 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/try_api/application.js.coffee +9 -37
- data/app/assets/javascripts/try_api/param.directive.js.coffee +4 -4
- data/app/assets/javascripts/try_api/url.directive.js.coffee +10 -3
- data/app/assets/stylesheets/try_api/application.css.sass +20 -10
- data/app/models/try_api/base.rb +54 -10
- data/app/models/try_api/config_parser.rb +1 -6
- data/app/models/try_api/example_response.rb +10 -9
- data/app/models/try_api/header.rb +0 -10
- data/app/models/try_api/menu_item.rb +1 -18
- data/app/models/try_api/method.rb +4 -47
- data/app/models/try_api/parameter.rb +1 -22
- data/app/models/try_api/project.rb +1 -17
- data/app/views/layouts/try_api/application.html.erb +10 -2
- data/app/views/try_api/pages/index.html +4 -5
- data/lib/generators/try_api/install_generator.rb +1 -13
- data/lib/generators/try_api/templates/try_api/base.yml +141 -0
- data/lib/generators/try_api/templates/try_api/variables.yml +5 -0
- data/lib/try_api/version.rb +1 -1
- metadata +4 -217
- data/app/assets/javascripts/try_api/bower_components/angular-bootstrap/README.md +0 -120
- data/app/assets/javascripts/try_api/bower_components/angular-bootstrap/bower.json +0 -19
- data/app/assets/javascripts/try_api/bower_components/angular-bootstrap/index.js +0 -2
- data/app/assets/javascripts/try_api/bower_components/angular-bootstrap/package.json +0 -23
- data/app/assets/javascripts/try_api/bower_components/angular-bootstrap/ui-bootstrap-csp.css +0 -115
- data/app/assets/javascripts/try_api/bower_components/angular-bootstrap/ui-bootstrap-tpls.js +0 -7476
- data/app/assets/javascripts/try_api/bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js +0 -10
- data/app/assets/javascripts/try_api/bower_components/angular-bootstrap/ui-bootstrap.js +0 -7109
- data/app/assets/javascripts/try_api/bower_components/angular-bootstrap/ui-bootstrap.min.js +0 -10
- data/app/assets/javascripts/try_api/bower_components/angular-highlightjs/LICENSE.txt +0 -20
- data/app/assets/javascripts/try_api/bower_components/angular-highlightjs/README.md +0 -186
- data/app/assets/javascripts/try_api/bower_components/angular-highlightjs/angular-highlightjs.js +0 -520
- data/app/assets/javascripts/try_api/bower_components/angular-highlightjs/angular-highlightjs.min.js +0 -6
- data/app/assets/javascripts/try_api/bower_components/angular-highlightjs/bower.json +0 -22
- data/app/assets/javascripts/try_api/bower_components/angular-highlightjs/build/angular-highlightjs.js +0 -520
- data/app/assets/javascripts/try_api/bower_components/angular-highlightjs/build/angular-highlightjs.min.js +0 -6
- data/app/assets/javascripts/try_api/bower_components/angular-highlightjs/src/angular-highlightjs.js +0 -501
- data/app/assets/javascripts/try_api/bower_components/angular-ladda/CHANGELOG.md +0 -71
- data/app/assets/javascripts/try_api/bower_components/angular-ladda/LICENSE.txt +0 -22
- data/app/assets/javascripts/try_api/bower_components/angular-ladda/README.md +0 -203
- data/app/assets/javascripts/try_api/bower_components/angular-ladda/bower.json +0 -36
- data/app/assets/javascripts/try_api/bower_components/angular-ladda/dist/angular-ladda.js +0 -99
- data/app/assets/javascripts/try_api/bower_components/angular-ladda/dist/angular-ladda.min.js +0 -2
- data/app/assets/javascripts/try_api/bower_components/angular-ladda/package.json +0 -51
- data/app/assets/javascripts/try_api/bower_components/angular-ladda/src/angular-ladda.js +0 -98
- data/app/assets/javascripts/try_api/bower_components/angular/LICENSE.md +0 -21
- data/app/assets/javascripts/try_api/bower_components/angular/README.md +0 -64
- data/app/assets/javascripts/try_api/bower_components/angular/angular-csp.css +0 -21
- data/app/assets/javascripts/try_api/bower_components/angular/angular.js +0 -31768
- data/app/assets/javascripts/try_api/bower_components/angular/angular.min.js +0 -318
- data/app/assets/javascripts/try_api/bower_components/angular/bower.json +0 -9
- data/app/assets/javascripts/try_api/bower_components/angular/index.js +0 -2
- data/app/assets/javascripts/try_api/bower_components/angular/package.json +0 -25
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/README.md +0 -25
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/bower.json +0 -27
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/css/font-awesome.css +0 -2199
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/css/font-awesome.min.css +0 -4
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/fonts/FontAwesome.otf +0 -0
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/fonts/fontawesome-webfont.eot +0 -0
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/fonts/fontawesome-webfont.svg +0 -685
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/fonts/fontawesome-webfont.ttf +0 -0
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/fonts/fontawesome-webfont.woff +0 -0
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/less/animated.less +0 -34
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/less/bordered-pulled.less +0 -25
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/less/core.less +0 -12
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/less/fixed-width.less +0 -6
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/less/font-awesome.less +0 -18
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/less/icons.less +0 -733
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/less/larger.less +0 -13
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/less/list.less +0 -19
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/less/mixins.less +0 -60
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/less/path.less +0 -15
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/less/rotated-flipped.less +0 -20
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/less/screen-reader.less +0 -5
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/less/stacked.less +0 -20
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/less/variables.less +0 -744
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/package.json +0 -14
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/scss/_animated.scss +0 -34
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/scss/_bordered-pulled.scss +0 -25
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/scss/_core.scss +0 -12
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/scss/_fixed-width.scss +0 -6
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/scss/_icons.scss +0 -733
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/scss/_larger.scss +0 -13
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/scss/_list.scss +0 -19
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/scss/_mixins.scss +0 -60
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/scss/_path.scss +0 -15
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/scss/_rotated-flipped.scss +0 -20
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/scss/_screen-reader.scss +0 -5
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/scss/_stacked.scss +0 -20
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/scss/_variables.scss +0 -744
- data/app/assets/javascripts/try_api/bower_components/components-font-awesome/scss/font-awesome.scss +0 -18
- data/app/assets/javascripts/try_api/bower_components/highlightjs/LICENSE.txt +0 -24
- data/app/assets/javascripts/try_api/bower_components/highlightjs/README.md +0 -12
- data/app/assets/javascripts/try_api/bower_components/highlightjs/bower.json +0 -14
- data/app/assets/javascripts/try_api/bower_components/highlightjs/component.json +0 -12
- data/app/assets/javascripts/try_api/bower_components/highlightjs/composer.json +0 -26
- data/app/assets/javascripts/try_api/bower_components/highlightjs/highlight.pack.js +0 -15387
- data/app/assets/javascripts/try_api/bower_components/highlightjs/highlight.pack.min.js +0 -13
- data/app/assets/javascripts/try_api/bower_components/highlightjs/package.json +0 -8
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/agate.css +0 -108
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/androidstudio.css +0 -66
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/arduino-light.css +0 -88
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/arta.css +0 -73
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/ascetic.css +0 -45
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-cave-dark.css +0 -83
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-cave-light.css +0 -85
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-cave.dark.css +0 -113
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-cave.light.css +0 -113
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-dune-dark.css +0 -69
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-dune-light.css +0 -69
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-dune.dark.css +0 -94
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-dune.light.css +0 -94
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-estuary-dark.css +0 -84
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-estuary-light.css +0 -84
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-estuary.dark.css +0 -113
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-estuary.light.css +0 -113
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-forest-dark.css +0 -69
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-forest-light.css +0 -69
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-forest.dark.css +0 -94
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-forest.light.css +0 -94
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-heath-dark.css +0 -69
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-heath-light.css +0 -69
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-heath.dark.css +0 -94
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-heath.light.css +0 -94
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-lakeside-dark.css +0 -69
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-lakeside-light.css +0 -69
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-lakeside.dark.css +0 -94
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-lakeside.light.css +0 -94
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-plateau-dark.css +0 -84
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-plateau-light.css +0 -84
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-plateau.dark.css +0 -113
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-plateau.light.css +0 -113
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-savanna-dark.css +0 -84
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-savanna-light.css +0 -84
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-savanna.dark.css +0 -113
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-savanna.light.css +0 -113
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-seaside-dark.css +0 -69
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-seaside-light.css +0 -69
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-seaside.dark.css +0 -94
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-seaside.light.css +0 -94
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-sulphurpool-dark.css +0 -69
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-sulphurpool-light.css +0 -69
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-sulphurpool.dark.css +0 -94
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atelier-sulphurpool.light.css +0 -94
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atom-one-dark.css +0 -95
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/atom-one-light.css +0 -95
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/brown-paper.css +0 -64
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/brown-papersq.png +0 -0
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/brown_paper.css +0 -103
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/brown_papersq.png +0 -0
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/codepen-embed.css +0 -60
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/color-brewer.css +0 -71
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/darcula.css +0 -77
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/dark.css +0 -63
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/darkula.css +0 -6
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/default.css +0 -99
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/docco.css +0 -97
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/dracula.css +0 -76
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/far.css +0 -71
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/foundation.css +0 -88
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/github-gist.css +0 -71
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/github.css +0 -99
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/googlecode.css +0 -89
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/grayscale.css +0 -101
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/gruvbox-dark.css +0 -108
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/gruvbox-light.css +0 -108
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/hopscotch.css +0 -83
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/hybrid.css +0 -102
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/idea.css +0 -97
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/ir-black.css +0 -73
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/ir_black.css +0 -106
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/kimbie.dark.css +0 -74
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/kimbie.light.css +0 -74
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/magula.css +0 -70
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/mono-blue.css +0 -59
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/monokai-sublime.css +0 -83
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/monokai.css +0 -70
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/monokai_sublime.css +0 -154
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/obsidian.css +0 -88
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/ocean.css +0 -74
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/paraiso-dark.css +0 -72
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/paraiso-light.css +0 -72
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/paraiso.dark.css +0 -96
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/paraiso.light.css +0 -96
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/pojoaque.css +0 -83
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/pojoaque.jpg +0 -0
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/purebasic.css +0 -96
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/qtcreator_dark.css +0 -83
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/qtcreator_light.css +0 -83
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/railscasts.css +0 -106
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/rainbow.css +0 -85
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/school-book.css +0 -72
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/school-book.png +0 -0
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/school_book.css +0 -111
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/school_book.png +0 -0
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/solarized-dark.css +0 -84
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/solarized-light.css +0 -84
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/solarized_dark.css +0 -107
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/solarized_light.css +0 -107
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/sunburst.css +0 -102
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/tomorrow-night-blue.css +0 -75
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/tomorrow-night-bright.css +0 -74
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/tomorrow-night-eighties.css +0 -74
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/tomorrow-night.css +0 -75
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/tomorrow.css +0 -72
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/vs.css +0 -68
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/xcode.css +0 -93
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/xt256.css +0 -92
- data/app/assets/javascripts/try_api/bower_components/highlightjs/styles/zenburn.css +0 -80
- data/app/assets/javascripts/try_api/bower_components/ladda/Gruntfile.js +0 -114
- data/app/assets/javascripts/try_api/bower_components/ladda/LICENSE.txt +0 -19
- data/app/assets/javascripts/try_api/bower_components/ladda/README.md +0 -142
- data/app/assets/javascripts/try_api/bower_components/ladda/bower.json +0 -14
- data/app/assets/javascripts/try_api/bower_components/ladda/css/demo.css +0 -60
- data/app/assets/javascripts/try_api/bower_components/ladda/css/ladda-themed.scss +0 -81
- data/app/assets/javascripts/try_api/bower_components/ladda/css/ladda.scss +0 -486
- data/app/assets/javascripts/try_api/bower_components/ladda/dist/ladda-themeless.min.css +0 -7
- data/app/assets/javascripts/try_api/bower_components/ladda/dist/ladda.jquery.min.js +0 -8
- data/app/assets/javascripts/try_api/bower_components/ladda/dist/ladda.min.css +0 -9
- data/app/assets/javascripts/try_api/bower_components/ladda/dist/ladda.min.js +0 -8
- data/app/assets/javascripts/try_api/bower_components/ladda/dist/spin.min.js +0 -1
- data/app/assets/javascripts/try_api/bower_components/ladda/index.html +0 -185
- data/app/assets/javascripts/try_api/bower_components/ladda/js/ladda.jquery.js +0 -46
- data/app/assets/javascripts/try_api/bower_components/ladda/js/ladda.js +0 -459
- data/app/assets/javascripts/try_api/bower_components/ladda/js/spin.js +0 -354
- data/app/assets/javascripts/try_api/bower_components/ladda/test/bootstrap.html +0 -6302
- data/app/assets/javascripts/try_api/bower_components/ladda/test/bootstrap.jquery.html +0 -6306
- data/app/assets/javascripts/try_api/bower_components/ladda/test/form.html +0 -38
- data/app/assets/javascripts/try_api/bower_components/spin.js/LICENSE.txt +0 -21
- data/app/assets/javascripts/try_api/bower_components/spin.js/README.md +0 -21
- data/app/assets/javascripts/try_api/bower_components/spin.js/bower.json +0 -18
- data/app/assets/javascripts/try_api/bower_components/spin.js/jquery.spin.js +0 -80
- data/app/assets/javascripts/try_api/bower_components/spin.js/spin.js +0 -337
- data/lib/generators/try_api/templates/config/try_api.yml +0 -344
@@ -1,38 +0,0 @@
|
|
1
|
-
<!doctype html>
|
2
|
-
<html lang="en">
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8">
|
5
|
-
|
6
|
-
<title>Ladda: Form test</title>
|
7
|
-
|
8
|
-
<link rel="stylesheet" href="../css/demo.css">
|
9
|
-
<link rel="stylesheet" href="../dist/ladda.min.css">
|
10
|
-
|
11
|
-
</head>
|
12
|
-
<body>
|
13
|
-
|
14
|
-
<article class="examples">
|
15
|
-
|
16
|
-
<div class="intro">
|
17
|
-
<h1>Ladda From Validation</h1>
|
18
|
-
<p>
|
19
|
-
This page can be used to test that Ladda does NOT start spinning when submitting an invalid form.
|
20
|
-
</p>
|
21
|
-
<form action="">
|
22
|
-
<input type="email" required placeholder="Email address..." style="font-size: 1em; padding: 14px;">
|
23
|
-
<button type="submit" class="btn btn-primary ladda-button" data-color="green" data-style="expand-left"><span class="ladda-label">Submit</span></button>
|
24
|
-
</form>
|
25
|
-
</div>
|
26
|
-
|
27
|
-
</article>
|
28
|
-
<script src="../dist/spin.min.js"></script>
|
29
|
-
<script src="../dist/ladda.min.js"></script>
|
30
|
-
|
31
|
-
<script>
|
32
|
-
Ladda.bind( 'button[type=submit]' );
|
33
|
-
</script>
|
34
|
-
|
35
|
-
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
|
36
|
-
|
37
|
-
</body>
|
38
|
-
</html>
|
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License
|
2
|
-
|
3
|
-
Copyright (c) 2011-2014 Felix Gnass [fgnass at neteye dot de]
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# spin.js
|
2
|
-
|
3
|
-
An animated CSS3 loading spinner with VML fallback for IE.
|
4
|
-
|
5
|
-
* No images, no external CSS
|
6
|
-
* No dependencies
|
7
|
-
* Highly configurable
|
8
|
-
* Resolution independent
|
9
|
-
* Uses VML as fallback in old IEs
|
10
|
-
* Uses @keyframe animations, falling back to setTimeout()
|
11
|
-
* Works in all major browsers, including IE6
|
12
|
-
* Small footprint (~1.9K gzipped)
|
13
|
-
* MIT License
|
14
|
-
|
15
|
-
## Usage
|
16
|
-
|
17
|
-
```javascript
|
18
|
-
new Spinner({color:'#fff', lines: 12}).spin(target);
|
19
|
-
```
|
20
|
-
|
21
|
-
For an interactive demo and a list of all supported options please refer to the [project's homepage](http://fgnass.github.io/spin.js/).
|
@@ -1,18 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "spin.js",
|
3
|
-
"version": "2.0.1",
|
4
|
-
"main": "spin.js",
|
5
|
-
"dependencies": {},
|
6
|
-
"readme": "README.md",
|
7
|
-
"repository": {
|
8
|
-
"type": "git",
|
9
|
-
"url": "git://github.com/fgnass/spin.js.git"
|
10
|
-
},
|
11
|
-
"ignore": [
|
12
|
-
"Gruntfile.js",
|
13
|
-
"site",
|
14
|
-
"bower.json",
|
15
|
-
"component.json",
|
16
|
-
"package.json"
|
17
|
-
]
|
18
|
-
}
|
@@ -1,80 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright (c) 2011-2014 Felix Gnass
|
3
|
-
* Licensed under the MIT license
|
4
|
-
*/
|
5
|
-
|
6
|
-
/*
|
7
|
-
|
8
|
-
Basic Usage:
|
9
|
-
============
|
10
|
-
|
11
|
-
$('#el').spin(); // Creates a default Spinner using the text color of #el.
|
12
|
-
$('#el').spin({ ... }); // Creates a Spinner using the provided options.
|
13
|
-
|
14
|
-
$('#el').spin(false); // Stops and removes the spinner.
|
15
|
-
|
16
|
-
Using Presets:
|
17
|
-
==============
|
18
|
-
|
19
|
-
$('#el').spin('small'); // Creates a 'small' Spinner using the text color of #el.
|
20
|
-
$('#el').spin('large', '#fff'); // Creates a 'large' white Spinner.
|
21
|
-
|
22
|
-
Adding a custom preset:
|
23
|
-
=======================
|
24
|
-
|
25
|
-
$.fn.spin.presets.flower = {
|
26
|
-
lines: 9,
|
27
|
-
length: 10,
|
28
|
-
width: 20,
|
29
|
-
radius: 0
|
30
|
-
}
|
31
|
-
|
32
|
-
$('#el').spin('flower', 'red');
|
33
|
-
|
34
|
-
*/
|
35
|
-
|
36
|
-
(function(factory) {
|
37
|
-
|
38
|
-
if (typeof exports == 'object') {
|
39
|
-
// CommonJS
|
40
|
-
factory(require('jquery'), require('spin.js'))
|
41
|
-
}
|
42
|
-
else if (typeof define == 'function' && define.amd) {
|
43
|
-
// AMD, register as anonymous module
|
44
|
-
define(['jquery', 'spin'], factory)
|
45
|
-
}
|
46
|
-
else {
|
47
|
-
// Browser globals
|
48
|
-
if (!window.Spinner) throw new Error('Spin.js not present')
|
49
|
-
factory(window.jQuery, window.Spinner)
|
50
|
-
}
|
51
|
-
|
52
|
-
}(function($, Spinner) {
|
53
|
-
|
54
|
-
$.fn.spin = function(opts, color) {
|
55
|
-
|
56
|
-
return this.each(function() {
|
57
|
-
var $this = $(this),
|
58
|
-
data = $this.data();
|
59
|
-
|
60
|
-
if (data.spinner) {
|
61
|
-
data.spinner.stop();
|
62
|
-
delete data.spinner;
|
63
|
-
}
|
64
|
-
if (opts !== false) {
|
65
|
-
opts = $.extend(
|
66
|
-
{ color: color || $this.css('color') },
|
67
|
-
$.fn.spin.presets[opts] || opts
|
68
|
-
)
|
69
|
-
data.spinner = new Spinner(opts).spin(this)
|
70
|
-
}
|
71
|
-
})
|
72
|
-
}
|
73
|
-
|
74
|
-
$.fn.spin.presets = {
|
75
|
-
tiny: { lines: 8, length: 2, width: 2, radius: 3 },
|
76
|
-
small: { lines: 8, length: 4, width: 3, radius: 5 },
|
77
|
-
large: { lines: 10, length: 8, width: 4, radius: 8 }
|
78
|
-
}
|
79
|
-
|
80
|
-
}));
|
@@ -1,337 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright (c) 2011-2014 Felix Gnass
|
3
|
-
* Licensed under the MIT license
|
4
|
-
*/
|
5
|
-
(function(root, factory) {
|
6
|
-
|
7
|
-
/* CommonJS */
|
8
|
-
if (typeof exports == 'object') module.exports = factory()
|
9
|
-
|
10
|
-
/* AMD module */
|
11
|
-
else if (typeof define == 'function' && define.amd) define(factory)
|
12
|
-
|
13
|
-
/* Browser global */
|
14
|
-
else root.Spinner = factory()
|
15
|
-
}
|
16
|
-
(this, function() {
|
17
|
-
"use strict";
|
18
|
-
|
19
|
-
var prefixes = ['webkit', 'Moz', 'ms', 'O'] /* Vendor prefixes */
|
20
|
-
, animations = {} /* Animation rules keyed by their name */
|
21
|
-
, useCssAnimations /* Whether to use CSS animations or setTimeout */
|
22
|
-
|
23
|
-
/**
|
24
|
-
* Utility function to create elements. If no tag name is given,
|
25
|
-
* a DIV is created. Optionally properties can be passed.
|
26
|
-
*/
|
27
|
-
function createEl(tag, prop) {
|
28
|
-
var el = document.createElement(tag || 'div')
|
29
|
-
, n
|
30
|
-
|
31
|
-
for(n in prop) el[n] = prop[n]
|
32
|
-
return el
|
33
|
-
}
|
34
|
-
|
35
|
-
/**
|
36
|
-
* Appends children and returns the parent.
|
37
|
-
*/
|
38
|
-
function ins(parent /* child1, child2, ...*/) {
|
39
|
-
for (var i=1, n=arguments.length; i<n; i++)
|
40
|
-
parent.appendChild(arguments[i])
|
41
|
-
|
42
|
-
return parent
|
43
|
-
}
|
44
|
-
|
45
|
-
/**
|
46
|
-
* Insert a new stylesheet to hold the @keyframe or VML rules.
|
47
|
-
*/
|
48
|
-
var sheet = (function() {
|
49
|
-
var el = createEl('style', {type : 'text/css'})
|
50
|
-
ins(document.getElementsByTagName('head')[0], el)
|
51
|
-
return el.sheet || el.styleSheet
|
52
|
-
}())
|
53
|
-
|
54
|
-
/**
|
55
|
-
* Creates an opacity keyframe animation rule and returns its name.
|
56
|
-
* Since most mobile Webkits have timing issues with animation-delay,
|
57
|
-
* we create separate rules for each line/segment.
|
58
|
-
*/
|
59
|
-
function addAnimation(alpha, trail, i, lines) {
|
60
|
-
var name = ['opacity', trail, ~~(alpha*100), i, lines].join('-')
|
61
|
-
, start = 0.01 + i/lines * 100
|
62
|
-
, z = Math.max(1 - (1-alpha) / trail * (100-start), alpha)
|
63
|
-
, prefix = useCssAnimations.substring(0, useCssAnimations.indexOf('Animation')).toLowerCase()
|
64
|
-
, pre = prefix && '-' + prefix + '-' || ''
|
65
|
-
|
66
|
-
if (!animations[name]) {
|
67
|
-
sheet.insertRule(
|
68
|
-
'@' + pre + 'keyframes ' + name + '{' +
|
69
|
-
'0%{opacity:' + z + '}' +
|
70
|
-
start + '%{opacity:' + alpha + '}' +
|
71
|
-
(start+0.01) + '%{opacity:1}' +
|
72
|
-
(start+trail) % 100 + '%{opacity:' + alpha + '}' +
|
73
|
-
'100%{opacity:' + z + '}' +
|
74
|
-
'}', sheet.cssRules.length)
|
75
|
-
|
76
|
-
animations[name] = 1
|
77
|
-
}
|
78
|
-
|
79
|
-
return name
|
80
|
-
}
|
81
|
-
|
82
|
-
/**
|
83
|
-
* Tries various vendor prefixes and returns the first supported property.
|
84
|
-
*/
|
85
|
-
function vendor(el, prop) {
|
86
|
-
var s = el.style
|
87
|
-
, pp
|
88
|
-
, i
|
89
|
-
|
90
|
-
prop = prop.charAt(0).toUpperCase() + prop.slice(1)
|
91
|
-
for(i=0; i<prefixes.length; i++) {
|
92
|
-
pp = prefixes[i]+prop
|
93
|
-
if(s[pp] !== undefined) return pp
|
94
|
-
}
|
95
|
-
if(s[prop] !== undefined) return prop
|
96
|
-
}
|
97
|
-
|
98
|
-
/**
|
99
|
-
* Sets multiple style properties at once.
|
100
|
-
*/
|
101
|
-
function css(el, prop) {
|
102
|
-
for (var n in prop)
|
103
|
-
el.style[vendor(el, n)||n] = prop[n]
|
104
|
-
|
105
|
-
return el
|
106
|
-
}
|
107
|
-
|
108
|
-
/**
|
109
|
-
* Fills in default values.
|
110
|
-
*/
|
111
|
-
function merge(obj) {
|
112
|
-
for (var i=1; i < arguments.length; i++) {
|
113
|
-
var def = arguments[i]
|
114
|
-
for (var n in def)
|
115
|
-
if (obj[n] === undefined) obj[n] = def[n]
|
116
|
-
}
|
117
|
-
return obj
|
118
|
-
}
|
119
|
-
|
120
|
-
/**
|
121
|
-
* Returns the line color from the given string or array.
|
122
|
-
*/
|
123
|
-
function getColor(color, idx) {
|
124
|
-
return typeof color == 'string' ? color : color[idx % color.length]
|
125
|
-
}
|
126
|
-
|
127
|
-
// Built-in defaults
|
128
|
-
|
129
|
-
var defaults = {
|
130
|
-
lines: 12, // The number of lines to draw
|
131
|
-
length: 7, // The length of each line
|
132
|
-
width: 5, // The line thickness
|
133
|
-
radius: 10, // The radius of the inner circle
|
134
|
-
rotate: 0, // Rotation offset
|
135
|
-
corners: 1, // Roundness (0..1)
|
136
|
-
color: '#000', // #rgb or #rrggbb
|
137
|
-
direction: 1, // 1: clockwise, -1: counterclockwise
|
138
|
-
speed: 1, // Rounds per second
|
139
|
-
trail: 100, // Afterglow percentage
|
140
|
-
opacity: 1/4, // Opacity of the lines
|
141
|
-
fps: 20, // Frames per second when using setTimeout()
|
142
|
-
zIndex: 2e9, // Use a high z-index by default
|
143
|
-
className: 'spinner', // CSS class to assign to the element
|
144
|
-
top: '50%', // center vertically
|
145
|
-
left: '50%', // center horizontally
|
146
|
-
position: 'absolute' // element position
|
147
|
-
}
|
148
|
-
|
149
|
-
/** The constructor */
|
150
|
-
function Spinner(o) {
|
151
|
-
this.opts = merge(o || {}, Spinner.defaults, defaults)
|
152
|
-
}
|
153
|
-
|
154
|
-
// Global defaults that override the built-ins:
|
155
|
-
Spinner.defaults = {}
|
156
|
-
|
157
|
-
merge(Spinner.prototype, {
|
158
|
-
|
159
|
-
/**
|
160
|
-
* Adds the spinner to the given target element. If this instance is already
|
161
|
-
* spinning, it is automatically removed from its previous target b calling
|
162
|
-
* stop() internally.
|
163
|
-
*/
|
164
|
-
spin: function(target) {
|
165
|
-
this.stop()
|
166
|
-
|
167
|
-
var self = this
|
168
|
-
, o = self.opts
|
169
|
-
, el = self.el = css(createEl(0, {className: o.className}), {position: o.position, width: 0, zIndex: o.zIndex})
|
170
|
-
|
171
|
-
css(el, {
|
172
|
-
left: o.left,
|
173
|
-
top: o.top
|
174
|
-
})
|
175
|
-
|
176
|
-
if (target) {
|
177
|
-
target.insertBefore(el, target.firstChild||null)
|
178
|
-
}
|
179
|
-
|
180
|
-
el.setAttribute('role', 'progressbar')
|
181
|
-
self.lines(el, self.opts)
|
182
|
-
|
183
|
-
if (!useCssAnimations) {
|
184
|
-
// No CSS animation support, use setTimeout() instead
|
185
|
-
var i = 0
|
186
|
-
, start = (o.lines - 1) * (1 - o.direction) / 2
|
187
|
-
, alpha
|
188
|
-
, fps = o.fps
|
189
|
-
, f = fps/o.speed
|
190
|
-
, ostep = (1-o.opacity) / (f*o.trail / 100)
|
191
|
-
, astep = f/o.lines
|
192
|
-
|
193
|
-
;(function anim() {
|
194
|
-
i++;
|
195
|
-
for (var j = 0; j < o.lines; j++) {
|
196
|
-
alpha = Math.max(1 - (i + (o.lines - j) * astep) % f * ostep, o.opacity)
|
197
|
-
|
198
|
-
self.opacity(el, j * o.direction + start, alpha, o)
|
199
|
-
}
|
200
|
-
self.timeout = self.el && setTimeout(anim, ~~(1000/fps))
|
201
|
-
})()
|
202
|
-
}
|
203
|
-
return self
|
204
|
-
},
|
205
|
-
|
206
|
-
/**
|
207
|
-
* Stops and removes the Spinner.
|
208
|
-
*/
|
209
|
-
stop: function() {
|
210
|
-
var el = this.el
|
211
|
-
if (el) {
|
212
|
-
clearTimeout(this.timeout)
|
213
|
-
if (el.parentNode) el.parentNode.removeChild(el)
|
214
|
-
this.el = undefined
|
215
|
-
}
|
216
|
-
return this
|
217
|
-
},
|
218
|
-
|
219
|
-
/**
|
220
|
-
* Internal method that draws the individual lines. Will be overwritten
|
221
|
-
* in VML fallback mode below.
|
222
|
-
*/
|
223
|
-
lines: function(el, o) {
|
224
|
-
var i = 0
|
225
|
-
, start = (o.lines - 1) * (1 - o.direction) / 2
|
226
|
-
, seg
|
227
|
-
|
228
|
-
function fill(color, shadow) {
|
229
|
-
return css(createEl(), {
|
230
|
-
position: 'absolute',
|
231
|
-
width: (o.length+o.width) + 'px',
|
232
|
-
height: o.width + 'px',
|
233
|
-
background: color,
|
234
|
-
boxShadow: shadow,
|
235
|
-
transformOrigin: 'left',
|
236
|
-
transform: 'rotate(' + ~~(360/o.lines*i+o.rotate) + 'deg) translate(' + o.radius+'px' +',0)',
|
237
|
-
borderRadius: (o.corners * o.width>>1) + 'px'
|
238
|
-
})
|
239
|
-
}
|
240
|
-
|
241
|
-
for (; i < o.lines; i++) {
|
242
|
-
seg = css(createEl(), {
|
243
|
-
position: 'absolute',
|
244
|
-
top: 1+~(o.width/2) + 'px',
|
245
|
-
transform: o.hwaccel ? 'translate3d(0,0,0)' : '',
|
246
|
-
opacity: o.opacity,
|
247
|
-
animation: useCssAnimations && addAnimation(o.opacity, o.trail, start + i * o.direction, o.lines) + ' ' + 1/o.speed + 's linear infinite'
|
248
|
-
})
|
249
|
-
|
250
|
-
if (o.shadow) ins(seg, css(fill('#000', '0 0 4px ' + '#000'), {top: 2+'px'}))
|
251
|
-
ins(el, ins(seg, fill(getColor(o.color, i), '0 0 1px rgba(0,0,0,.1)')))
|
252
|
-
}
|
253
|
-
return el
|
254
|
-
},
|
255
|
-
|
256
|
-
/**
|
257
|
-
* Internal method that adjusts the opacity of a single line.
|
258
|
-
* Will be overwritten in VML fallback mode below.
|
259
|
-
*/
|
260
|
-
opacity: function(el, i, val) {
|
261
|
-
if (i < el.childNodes.length) el.childNodes[i].style.opacity = val
|
262
|
-
}
|
263
|
-
|
264
|
-
})
|
265
|
-
|
266
|
-
|
267
|
-
function initVML() {
|
268
|
-
|
269
|
-
/* Utility function to create a VML tag */
|
270
|
-
function vml(tag, attr) {
|
271
|
-
return createEl('<' + tag + ' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">', attr)
|
272
|
-
}
|
273
|
-
|
274
|
-
// No CSS transforms but VML support, add a CSS rule for VML elements:
|
275
|
-
sheet.addRule('.spin-vml', 'behavior:url(#default#VML)')
|
276
|
-
|
277
|
-
Spinner.prototype.lines = function(el, o) {
|
278
|
-
var r = o.length+o.width
|
279
|
-
, s = 2*r
|
280
|
-
|
281
|
-
function grp() {
|
282
|
-
return css(
|
283
|
-
vml('group', {
|
284
|
-
coordsize: s + ' ' + s,
|
285
|
-
coordorigin: -r + ' ' + -r
|
286
|
-
}),
|
287
|
-
{ width: s, height: s }
|
288
|
-
)
|
289
|
-
}
|
290
|
-
|
291
|
-
var margin = -(o.width+o.length)*2 + 'px'
|
292
|
-
, g = css(grp(), {position: 'absolute', top: margin, left: margin})
|
293
|
-
, i
|
294
|
-
|
295
|
-
function seg(i, dx, filter) {
|
296
|
-
ins(g,
|
297
|
-
ins(css(grp(), {rotation: 360 / o.lines * i + 'deg', left: ~~dx}),
|
298
|
-
ins(css(vml('roundrect', {arcsize: o.corners}), {
|
299
|
-
width: r,
|
300
|
-
height: o.width,
|
301
|
-
left: o.radius,
|
302
|
-
top: -o.width>>1,
|
303
|
-
filter: filter
|
304
|
-
}),
|
305
|
-
vml('fill', {color: getColor(o.color, i), opacity: o.opacity}),
|
306
|
-
vml('stroke', {opacity: 0}) // transparent stroke to fix color bleeding upon opacity change
|
307
|
-
)
|
308
|
-
)
|
309
|
-
)
|
310
|
-
}
|
311
|
-
|
312
|
-
if (o.shadow)
|
313
|
-
for (i = 1; i <= o.lines; i++)
|
314
|
-
seg(i, -2, 'progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)')
|
315
|
-
|
316
|
-
for (i = 1; i <= o.lines; i++) seg(i)
|
317
|
-
return ins(el, g)
|
318
|
-
}
|
319
|
-
|
320
|
-
Spinner.prototype.opacity = function(el, i, val, o) {
|
321
|
-
var c = el.firstChild
|
322
|
-
o = o.shadow && o.lines || 0
|
323
|
-
if (c && i+o < c.childNodes.length) {
|
324
|
-
c = c.childNodes[i+o]; c = c && c.firstChild; c = c && c.firstChild
|
325
|
-
if (c) c.opacity = val
|
326
|
-
}
|
327
|
-
}
|
328
|
-
}
|
329
|
-
|
330
|
-
var probe = css(createEl('group'), {behavior: 'url(#default#VML)'})
|
331
|
-
|
332
|
-
if (!vendor(probe, 'transform') && probe.adj) initVML()
|
333
|
-
else useCssAnimations = vendor(probe, 'animation')
|
334
|
-
|
335
|
-
return Spinner
|
336
|
-
|
337
|
-
}));
|