sw2at-ui 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +5 -0
- data/Gemfile +21 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +19 -0
- data/Rakefile +51 -0
- data/VERSION +1 -0
- data/app/assets/images/swat/loading-green.gif +0 -0
- data/app/assets/javascripts/swat/.bowerrc +3 -0
- data/app/assets/javascripts/swat/app/app.coffee +38 -0
- data/app/assets/javascripts/swat/app/controllers/revision.coffee +25 -0
- data/app/assets/javascripts/swat/app/controllers/revisions.coffee +10 -0
- data/app/assets/javascripts/swat/app/controllers/root.coffee +8 -0
- data/app/assets/javascripts/swat/app/factories/response.coffee +9 -0
- data/app/assets/javascripts/swat/app/factories/revision_model.coffee +20 -0
- data/app/assets/javascripts/swat/app/services/revision.coffee +16 -0
- data/app/assets/javascripts/swat/app/services/test_case.coffee +8 -0
- data/app/assets/javascripts/swat/application.coffee +5 -0
- data/app/assets/javascripts/swat/bower.json +16 -0
- data/app/assets/javascripts/swat/bower_components/angular/angular-csp.css +21 -0
- data/app/assets/javascripts/swat/bower_components/angular/angular.js +28133 -0
- data/app/assets/javascripts/swat/bower_components/angular/angular.min.js +289 -0
- data/app/assets/javascripts/swat/bower_components/angular/index.js +2 -0
- data/app/assets/javascripts/swat/bower_components/angular-animate/angular-animate.js +2137 -0
- data/app/assets/javascripts/swat/bower_components/angular-animate/angular-animate.min.js +33 -0
- data/app/assets/javascripts/swat/bower_components/angular-aria/angular-aria.js +339 -0
- data/app/assets/javascripts/swat/bower_components/angular-aria/angular-aria.min.js +12 -0
- data/app/assets/javascripts/swat/bower_components/angular-bootstrap/ui-bootstrap-csp.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-bootstrap/ui-bootstrap-tpls.js +4840 -0
- data/app/assets/javascripts/swat/bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js +10 -0
- data/app/assets/javascripts/swat/bower_components/angular-bootstrap/ui-bootstrap.js +4461 -0
- data/app/assets/javascripts/swat/bower_components/angular-bootstrap/ui-bootstrap.min.js +9 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/LICENSE.txt +21 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/angular-material.css +6228 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/angular-material.js +8602 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/angular-material.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/angular-material.min.js +277 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/default-theme.css +394 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/backdrop/backdrop-default-theme.css +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/backdrop/backdrop.css +54 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/backdrop/backdrop.js +40 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/bottomSheet/bottomSheet-default-theme.css +15 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/bottomSheet/bottomSheet.css +161 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/bottomSheet/bottomSheet.js +263 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/button/button-default-theme.css +49 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/button/button.css +134 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/button/button.js +101 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/card/card-default-theme.css +10 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/card/card.css +26 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/card/card.js +60 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/checkbox/checkbox-default-theme.css +38 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/checkbox/checkbox.css +78 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/checkbox/checkbox.js +135 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/content/content-default-theme.css +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/content/content.css +24 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/content/content.js +87 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/core/core.css +2736 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/core/core.js +3090 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/core/default-theme.js +1 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/dialog/dialog-default-theme.css +11 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/dialog/dialog.css +75 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/dialog/dialog.js +500 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/divider/divider-default-theme.css +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/divider/divider.css +12 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/divider/divider.js +50 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/icon/icon.css +24 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/icon/icon.js +52 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/input/input-default-theme.css +39 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/input/input.css +113 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/input/input.js +355 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/list/list.css +56 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/list/list.js +96 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/menu/menu.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/menu/menu.js +29 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/progressCircular/progressCircular-default-theme.css +35 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/progressCircular/progressCircular.css +1395 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/progressCircular/progressCircular.js +129 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/progressLinear/progressLinear-default-theme.css +26 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/progressLinear/progressLinear.css +366 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/progressLinear/progressLinear.js +130 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/radioButton/radioButton-default-theme.css +39 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/radioButton/radioButton.css +66 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/radioButton/radioButton.js +302 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/sidenav/sidenav-default-theme.css +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/sidenav/sidenav.css +86 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/sidenav/sidenav.js +320 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/slider/slider-default-theme.css +55 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/slider/slider.css +210 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/slider/slider.js +391 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/sticky/sticky.css +20 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/sticky/sticky.js +314 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/subheader/subheader-default-theme.css +15 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/subheader/subheader.css +62 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/subheader/subheader.js +89 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/swipe/swipe.js +79 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/switch/switch-default-theme.css +29 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/switch/switch.css +81 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/switch/switch.js +171 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/tabs/tabs-default-theme.css +34 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/tabs/tabs.css +171 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/tabs/tabs.js +1009 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/textField/textField-default-theme.css +29 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/textField/textField.css +72 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/textField/textField.js +145 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/toast/toast-default-theme.css +17 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/toast/toast.css +110 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/toast/toast.js +236 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/toolbar/toolbar-default-theme.css +17 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/toolbar/toolbar.css +69 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/toolbar/toolbar.js +161 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/tooltip/tooltip-default-theme.css +10 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/tooltip/tooltip.css +133 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/tooltip/tooltip.js +199 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/whiteframe/whiteframe.css +20 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/whiteframe/whiteframe.js +17 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/css/angular-material-layout.css +2582 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/backdrop/backdrop-default-theme.css +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/backdrop/backdrop-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/backdrop/backdrop.css +54 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/backdrop/backdrop.js +38 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/backdrop/backdrop.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/backdrop/backdrop.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/backdrop/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/bottomSheet/bottomSheet-default-theme.css +15 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/bottomSheet/bottomSheet-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/bottomSheet/bottomSheet.css +188 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/bottomSheet/bottomSheet.js +293 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/bottomSheet/bottomSheet.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/bottomSheet/bottomSheet.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/bottomSheet/bower.json +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/button/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/button/button-default-theme.css +42 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/button/button-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/button/button.css +132 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/button/button.js +94 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/button/button.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/button/button.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/card/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/card/card-default-theme.css +10 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/card/card-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/card/card.css +31 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/card/card.js +58 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/card/card.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/card/card.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/checkbox/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/checkbox/checkbox-default-theme.css +38 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/checkbox/checkbox-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/checkbox/checkbox.css +79 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/checkbox/checkbox.js +133 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/checkbox/checkbox.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/checkbox/checkbox.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/content/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/content/content-default-theme.css +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/content/content-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/content/content.css +24 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/content/content.js +60 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/content/content.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/content/content.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/core/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/core/core.css +3067 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/core/core.js +2780 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/core/core.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/core/core.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/core/default-theme.js +1 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/dialog/bower.json +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/dialog/dialog-default-theme.css +11 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/dialog/dialog-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/dialog/dialog.css +88 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/dialog/dialog.js +495 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/dialog/dialog.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/dialog/dialog.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/divider/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/divider/divider-default-theme.css +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/divider/divider-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/divider/divider.css +12 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/divider/divider.js +48 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/divider/divider.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/divider/divider.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/icon/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/icon/icon.css +24 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/icon/icon.js +50 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/icon/icon.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/icon/icon.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/input/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/input/input-default-theme.css +40 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/input/input-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/input/input.css +102 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/input/input.js +333 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/input/input.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/input/input.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/list/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/list/list.css +61 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/list/list.js +94 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/list/list.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/list/list.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/menu/bower.json +5 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/menu/menu.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/menu/menu.js +27 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/menu/menu.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/menu/menu.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressCircular/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressCircular/progressCircular-default-theme.css +35 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressCircular/progressCircular-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressCircular/progressCircular.css +1445 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressCircular/progressCircular.js +127 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressCircular/progressCircular.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressCircular/progressCircular.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressLinear/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressLinear/progressLinear-default-theme.css +28 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressLinear/progressLinear-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressLinear/progressLinear.css +368 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressLinear/progressLinear.js +128 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressLinear/progressLinear.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressLinear/progressLinear.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/radioButton/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/radioButton/radioButton-default-theme.css +39 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/radioButton/radioButton-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/radioButton/radioButton.css +67 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/radioButton/radioButton.js +296 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/radioButton/radioButton.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/radioButton/radioButton.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/sidenav/bower.json +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/sidenav/sidenav-default-theme.css +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/sidenav/sidenav-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/sidenav/sidenav.css +90 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/sidenav/sidenav.js +302 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/sidenav/sidenav.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/sidenav/sidenav.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/slider/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/slider/slider-default-theme.css +55 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/slider/slider-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/slider/slider.css +218 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/slider/slider.js +411 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/slider/slider.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/slider/slider.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/sticky/bower.json +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/sticky/sticky.css +20 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/sticky/sticky.js +309 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/sticky/sticky.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/sticky/sticky.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/subheader/bower.json +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/subheader/subheader-default-theme.css +15 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/subheader/subheader-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/subheader/subheader.css +61 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/subheader/subheader.js +86 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/subheader/subheader.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/subheader/subheader.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/swipe/bower.json +5 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/swipe/swipe.js +213 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/swipe/swipe.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/switch/bower.json +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/switch/switch-default-theme.css +29 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/switch/switch-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/switch/switch.css +77 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/switch/switch.js +144 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/switch/switch.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/switch/switch.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tabs/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tabs/tabs-default-theme.css +34 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tabs/tabs-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tabs/tabs.css +181 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tabs/tabs.js +992 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tabs/tabs.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tabs/tabs.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/textField/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/textField/textField-default-theme.css +29 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/textField/textField-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/textField/textField.css +76 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/textField/textField.js +143 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/textField/textField.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/textField/textField.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toast/bower.json +9 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toast/toast-default-theme.css +17 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toast/toast-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toast/toast.css +115 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toast/toast.js +235 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toast/toast.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toast/toast.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toolbar/bower.json +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toolbar/toolbar-default-theme.css +17 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toolbar/toolbar-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toolbar/toolbar.css +78 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toolbar/toolbar.js +158 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toolbar/toolbar.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toolbar/toolbar.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tooltip/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tooltip/tooltip-default-theme.css +10 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tooltip/tooltip-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tooltip/tooltip.css +136 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tooltip/tooltip.js +197 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tooltip/tooltip.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tooltip/tooltip.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/whiteframe/bower.json +5 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/whiteframe/whiteframe.css +20 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/whiteframe/whiteframe.js +15 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/whiteframe/whiteframe.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/whiteframe/whiteframe.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-resource/angular-resource.js +668 -0
- data/app/assets/javascripts/swat/bower_components/angular-resource/angular-resource.min.js +13 -0
- data/app/assets/javascripts/swat/bower_components/angular-resource/index.js +2 -0
- data/app/assets/javascripts/swat/bower_components/angular-route/angular-route.js +991 -0
- data/app/assets/javascripts/swat/bower_components/angular-route/angular-route.min.js +15 -0
- data/app/assets/javascripts/swat/bower_components/angular-route/index.js +2 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/LICENSE.txt +21 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/api/angular-ui-router.d.ts +126 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/release/angular-ui-router.js +4370 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/release/angular-ui-router.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/src/common.js +292 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/src/resolve.js +252 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/src/state.js +1465 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/src/stateDirectives.js +285 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/src/stateFilters.js +39 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/src/templateFactory.js +110 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/src/urlMatcherFactory.js +1050 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/src/urlRouter.js +427 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/src/view.js +71 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/src/viewDirective.js +303 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/src/viewScroll.js +52 -0
- data/app/assets/javascripts/swat/bower_components/lodash/lodash.js +12235 -0
- data/app/assets/javascripts/swat/bower_components/lodash/lodash.min.js +98 -0
- data/app/assets/javascripts/swat/bower_components/ng-clip/.editorconfig +10 -0
- data/app/assets/javascripts/swat/bower_components/ng-clip/.gitignore +3 -0
- data/app/assets/javascripts/swat/bower_components/ng-clip/Gruntfile.js +96 -0
- data/app/assets/javascripts/swat/bower_components/ng-clip/dest/ng-clip.min.js +2 -0
- data/app/assets/javascripts/swat/bower_components/ng-clip/example/bootstrap-tooltip.html +49 -0
- data/app/assets/javascripts/swat/bower_components/ng-clip/example/index.html +68 -0
- data/app/assets/javascripts/swat/bower_components/ng-clip/example/ng-repeat.html +44 -0
- data/app/assets/javascripts/swat/bower_components/ng-clip/npm-debug.log +145 -0
- data/app/assets/javascripts/swat/bower_components/ng-clip/src/ngClip.js +84 -0
- data/app/assets/javascripts/swat/bower_components/zeroclipboard/dist/.jshintrc +70 -0
- data/app/assets/javascripts/swat/bower_components/zeroclipboard/dist/ZeroClipboard.Core.js +2017 -0
- data/app/assets/javascripts/swat/bower_components/zeroclipboard/dist/ZeroClipboard.Core.min.js +10 -0
- data/app/assets/javascripts/swat/bower_components/zeroclipboard/dist/ZeroClipboard.js +2581 -0
- data/app/assets/javascripts/swat/bower_components/zeroclipboard/dist/ZeroClipboard.min.js +10 -0
- data/app/assets/javascripts/swat/bower_components/zeroclipboard/dist/ZeroClipboard.swf +0 -0
- data/app/assets/javascripts/swat/bower_components.coffee +12 -0
- data/app/assets/stylesheets/swat/application.sass +59 -0
- data/app/assets/stylesheets/swat/default-theme.css +394 -0
- data/app/assets/stylesheets/swat/font-awesome.css +1801 -0
- data/app/assets/stylesheets/swat/fonts/FontAwesome.otf +0 -0
- data/app/assets/stylesheets/swat/fonts/fontawesome-webfont.eot +0 -0
- data/app/assets/stylesheets/swat/fonts/fontawesome-webfont.svg +565 -0
- data/app/assets/stylesheets/swat/fonts/fontawesome-webfont.ttf +0 -0
- data/app/assets/stylesheets/swat/fonts/fontawesome-webfont.woff +0 -0
- data/app/assets/stylesheets/swat/fonts/fontawesome-webfont.woff2 +0 -0
- data/app/assets/stylesheets/swat/swat_theme.sass +177 -0
- data/app/controllers/swat/api/revisions_controller.rb +27 -0
- data/app/controllers/swat/api/test_cases_controller.rb +20 -0
- data/app/controllers/swat/application_controller.rb +4 -0
- data/app/controllers/swat/info/states_controller.rb +12 -0
- data/app/controllers/swat/pages/base_pages_controller.rb +7 -0
- data/app/controllers/swat/pages/revisions_controller.rb +8 -0
- data/app/controllers/swat/revisions_controller.rb +4 -0
- data/app/helpers/swat/application_helper.rb +4 -0
- data/app/models/concerns/root_revision_ext.rb +14 -0
- data/app/models/full_revision.rb +88 -0
- data/app/models/revision.rb +84 -0
- data/app/models/revision_status_calculator.rb +98 -0
- data/app/models/test_case.rb +25 -0
- data/app/views/layouts/swat/application.slim +36 -0
- data/app/views/layouts/swat/page.slim +2 -0
- data/app/views/swat/application/index.slim +0 -0
- data/app/views/swat/pages/revisions/index.slim +25 -0
- data/app/views/swat/pages/revisions/show.slim +43 -0
- data/app/views/swat/shared/_footer.slim +5 -0
- data/app/views/swat/shared/_header.slim +9 -0
- data/bin/rails +12 -0
- data/config/routes.rb +38 -0
- data/fixtures/firebase_collection.rb +97 -0
- data/lib/sw2at-ui.rb +19 -0
- data/lib/swat/engine.rb +5 -0
- data/lib/swat/ui/config.rb +28 -0
- data/lib/swat/ui/rspec_commands.rb +191 -0
- data/lib/swat/ui/rspec_setup.rb +42 -0
- data/lib/swat/ui/stats_collector.rb +90 -0
- data/lib/swat/ui/version.rb +5 -0
- data/lib/tasks/swat_tasks.rake +36 -0
- data/spec/lib/commands_spec.rb +88 -0
- data/spec/models/calculator_spec.rb +130 -0
- data/spec/models/full_revision_spec.rb +263 -0
- data/spec/models/revision_spec.rb +59 -0
- data/spec/models/testcase_spec.rb +94 -0
- data/spec/spec_helper.rb +45 -0
- data/sw2at-ui.gemspec +465 -0
- data/test/helper.rb +34 -0
- data/test/test_sw2at-ui.rb +7 -0
- metadata +628 -0
@@ -0,0 +1,427 @@
|
|
1
|
+
/**
|
2
|
+
* @ngdoc object
|
3
|
+
* @name ui.router.router.$urlRouterProvider
|
4
|
+
*
|
5
|
+
* @requires ui.router.util.$urlMatcherFactoryProvider
|
6
|
+
* @requires $locationProvider
|
7
|
+
*
|
8
|
+
* @description
|
9
|
+
* `$urlRouterProvider` has the responsibility of watching `$location`.
|
10
|
+
* When `$location` changes it runs through a list of rules one by one until a
|
11
|
+
* match is found. `$urlRouterProvider` is used behind the scenes anytime you specify
|
12
|
+
* a url in a state configuration. All urls are compiled into a UrlMatcher object.
|
13
|
+
*
|
14
|
+
* There are several methods on `$urlRouterProvider` that make it useful to use directly
|
15
|
+
* in your module config.
|
16
|
+
*/
|
17
|
+
$UrlRouterProvider.$inject = ['$locationProvider', '$urlMatcherFactoryProvider'];
|
18
|
+
function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) {
|
19
|
+
var rules = [], otherwise = null, interceptDeferred = false, listener;
|
20
|
+
|
21
|
+
// Returns a string that is a prefix of all strings matching the RegExp
|
22
|
+
function regExpPrefix(re) {
|
23
|
+
var prefix = /^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(re.source);
|
24
|
+
return (prefix != null) ? prefix[1].replace(/\\(.)/g, "$1") : '';
|
25
|
+
}
|
26
|
+
|
27
|
+
// Interpolates matched values into a String.replace()-style pattern
|
28
|
+
function interpolate(pattern, match) {
|
29
|
+
return pattern.replace(/\$(\$|\d{1,2})/, function (m, what) {
|
30
|
+
return match[what === '$' ? 0 : Number(what)];
|
31
|
+
});
|
32
|
+
}
|
33
|
+
|
34
|
+
/**
|
35
|
+
* @ngdoc function
|
36
|
+
* @name ui.router.router.$urlRouterProvider#rule
|
37
|
+
* @methodOf ui.router.router.$urlRouterProvider
|
38
|
+
*
|
39
|
+
* @description
|
40
|
+
* Defines rules that are used by `$urlRouterProvider` to find matches for
|
41
|
+
* specific URLs.
|
42
|
+
*
|
43
|
+
* @example
|
44
|
+
* <pre>
|
45
|
+
* var app = angular.module('app', ['ui.router.router']);
|
46
|
+
*
|
47
|
+
* app.config(function ($urlRouterProvider) {
|
48
|
+
* // Here's an example of how you might allow case insensitive urls
|
49
|
+
* $urlRouterProvider.rule(function ($injector, $location) {
|
50
|
+
* var path = $location.path(),
|
51
|
+
* normalized = path.toLowerCase();
|
52
|
+
*
|
53
|
+
* if (path !== normalized) {
|
54
|
+
* return normalized;
|
55
|
+
* }
|
56
|
+
* });
|
57
|
+
* });
|
58
|
+
* </pre>
|
59
|
+
*
|
60
|
+
* @param {object} rule Handler function that takes `$injector` and `$location`
|
61
|
+
* services as arguments. You can use them to return a valid path as a string.
|
62
|
+
*
|
63
|
+
* @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance
|
64
|
+
*/
|
65
|
+
this.rule = function (rule) {
|
66
|
+
if (!isFunction(rule)) throw new Error("'rule' must be a function");
|
67
|
+
rules.push(rule);
|
68
|
+
return this;
|
69
|
+
};
|
70
|
+
|
71
|
+
/**
|
72
|
+
* @ngdoc object
|
73
|
+
* @name ui.router.router.$urlRouterProvider#otherwise
|
74
|
+
* @methodOf ui.router.router.$urlRouterProvider
|
75
|
+
*
|
76
|
+
* @description
|
77
|
+
* Defines a path that is used when an invalid route is requested.
|
78
|
+
*
|
79
|
+
* @example
|
80
|
+
* <pre>
|
81
|
+
* var app = angular.module('app', ['ui.router.router']);
|
82
|
+
*
|
83
|
+
* app.config(function ($urlRouterProvider) {
|
84
|
+
* // if the path doesn't match any of the urls you configured
|
85
|
+
* // otherwise will take care of routing the user to the
|
86
|
+
* // specified url
|
87
|
+
* $urlRouterProvider.otherwise('/index');
|
88
|
+
*
|
89
|
+
* // Example of using function rule as param
|
90
|
+
* $urlRouterProvider.otherwise(function ($injector, $location) {
|
91
|
+
* return '/a/valid/url';
|
92
|
+
* });
|
93
|
+
* });
|
94
|
+
* </pre>
|
95
|
+
*
|
96
|
+
* @param {string|object} rule The url path you want to redirect to or a function
|
97
|
+
* rule that returns the url path. The function version is passed two params:
|
98
|
+
* `$injector` and `$location` services, and must return a url string.
|
99
|
+
*
|
100
|
+
* @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance
|
101
|
+
*/
|
102
|
+
this.otherwise = function (rule) {
|
103
|
+
if (isString(rule)) {
|
104
|
+
var redirect = rule;
|
105
|
+
rule = function () { return redirect; };
|
106
|
+
}
|
107
|
+
else if (!isFunction(rule)) throw new Error("'rule' must be a function");
|
108
|
+
otherwise = rule;
|
109
|
+
return this;
|
110
|
+
};
|
111
|
+
|
112
|
+
|
113
|
+
function handleIfMatch($injector, handler, match) {
|
114
|
+
if (!match) return false;
|
115
|
+
var result = $injector.invoke(handler, handler, { $match: match });
|
116
|
+
return isDefined(result) ? result : true;
|
117
|
+
}
|
118
|
+
|
119
|
+
/**
|
120
|
+
* @ngdoc function
|
121
|
+
* @name ui.router.router.$urlRouterProvider#when
|
122
|
+
* @methodOf ui.router.router.$urlRouterProvider
|
123
|
+
*
|
124
|
+
* @description
|
125
|
+
* Registers a handler for a given url matching. if handle is a string, it is
|
126
|
+
* treated as a redirect, and is interpolated according to the syntax of match
|
127
|
+
* (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise).
|
128
|
+
*
|
129
|
+
* If the handler is a function, it is injectable. It gets invoked if `$location`
|
130
|
+
* matches. You have the option of inject the match object as `$match`.
|
131
|
+
*
|
132
|
+
* The handler can return
|
133
|
+
*
|
134
|
+
* - **falsy** to indicate that the rule didn't match after all, then `$urlRouter`
|
135
|
+
* will continue trying to find another one that matches.
|
136
|
+
* - **string** which is treated as a redirect and passed to `$location.url()`
|
137
|
+
* - **void** or any **truthy** value tells `$urlRouter` that the url was handled.
|
138
|
+
*
|
139
|
+
* @example
|
140
|
+
* <pre>
|
141
|
+
* var app = angular.module('app', ['ui.router.router']);
|
142
|
+
*
|
143
|
+
* app.config(function ($urlRouterProvider) {
|
144
|
+
* $urlRouterProvider.when($state.url, function ($match, $stateParams) {
|
145
|
+
* if ($state.$current.navigable !== state ||
|
146
|
+
* !equalForKeys($match, $stateParams) {
|
147
|
+
* $state.transitionTo(state, $match, false);
|
148
|
+
* }
|
149
|
+
* });
|
150
|
+
* });
|
151
|
+
* </pre>
|
152
|
+
*
|
153
|
+
* @param {string|object} what The incoming path that you want to redirect.
|
154
|
+
* @param {string|object} handler The path you want to redirect your user to.
|
155
|
+
*/
|
156
|
+
this.when = function (what, handler) {
|
157
|
+
var redirect, handlerIsString = isString(handler);
|
158
|
+
if (isString(what)) what = $urlMatcherFactory.compile(what);
|
159
|
+
|
160
|
+
if (!handlerIsString && !isFunction(handler) && !isArray(handler))
|
161
|
+
throw new Error("invalid 'handler' in when()");
|
162
|
+
|
163
|
+
var strategies = {
|
164
|
+
matcher: function (what, handler) {
|
165
|
+
if (handlerIsString) {
|
166
|
+
redirect = $urlMatcherFactory.compile(handler);
|
167
|
+
handler = ['$match', function ($match) { return redirect.format($match); }];
|
168
|
+
}
|
169
|
+
return extend(function ($injector, $location) {
|
170
|
+
return handleIfMatch($injector, handler, what.exec($location.path(), $location.search()));
|
171
|
+
}, {
|
172
|
+
prefix: isString(what.prefix) ? what.prefix : ''
|
173
|
+
});
|
174
|
+
},
|
175
|
+
regex: function (what, handler) {
|
176
|
+
if (what.global || what.sticky) throw new Error("when() RegExp must not be global or sticky");
|
177
|
+
|
178
|
+
if (handlerIsString) {
|
179
|
+
redirect = handler;
|
180
|
+
handler = ['$match', function ($match) { return interpolate(redirect, $match); }];
|
181
|
+
}
|
182
|
+
return extend(function ($injector, $location) {
|
183
|
+
return handleIfMatch($injector, handler, what.exec($location.path()));
|
184
|
+
}, {
|
185
|
+
prefix: regExpPrefix(what)
|
186
|
+
});
|
187
|
+
}
|
188
|
+
};
|
189
|
+
|
190
|
+
var check = { matcher: $urlMatcherFactory.isMatcher(what), regex: what instanceof RegExp };
|
191
|
+
|
192
|
+
for (var n in check) {
|
193
|
+
if (check[n]) return this.rule(strategies[n](what, handler));
|
194
|
+
}
|
195
|
+
|
196
|
+
throw new Error("invalid 'what' in when()");
|
197
|
+
};
|
198
|
+
|
199
|
+
/**
|
200
|
+
* @ngdoc function
|
201
|
+
* @name ui.router.router.$urlRouterProvider#deferIntercept
|
202
|
+
* @methodOf ui.router.router.$urlRouterProvider
|
203
|
+
*
|
204
|
+
* @description
|
205
|
+
* Disables (or enables) deferring location change interception.
|
206
|
+
*
|
207
|
+
* If you wish to customize the behavior of syncing the URL (for example, if you wish to
|
208
|
+
* defer a transition but maintain the current URL), call this method at configuration time.
|
209
|
+
* Then, at run time, call `$urlRouter.listen()` after you have configured your own
|
210
|
+
* `$locationChangeSuccess` event handler.
|
211
|
+
*
|
212
|
+
* @example
|
213
|
+
* <pre>
|
214
|
+
* var app = angular.module('app', ['ui.router.router']);
|
215
|
+
*
|
216
|
+
* app.config(function ($urlRouterProvider) {
|
217
|
+
*
|
218
|
+
* // Prevent $urlRouter from automatically intercepting URL changes;
|
219
|
+
* // this allows you to configure custom behavior in between
|
220
|
+
* // location changes and route synchronization:
|
221
|
+
* $urlRouterProvider.deferIntercept();
|
222
|
+
*
|
223
|
+
* }).run(function ($rootScope, $urlRouter, UserService) {
|
224
|
+
*
|
225
|
+
* $rootScope.$on('$locationChangeSuccess', function(e) {
|
226
|
+
* // UserService is an example service for managing user state
|
227
|
+
* if (UserService.isLoggedIn()) return;
|
228
|
+
*
|
229
|
+
* // Prevent $urlRouter's default handler from firing
|
230
|
+
* e.preventDefault();
|
231
|
+
*
|
232
|
+
* UserService.handleLogin().then(function() {
|
233
|
+
* // Once the user has logged in, sync the current URL
|
234
|
+
* // to the router:
|
235
|
+
* $urlRouter.sync();
|
236
|
+
* });
|
237
|
+
* });
|
238
|
+
*
|
239
|
+
* // Configures $urlRouter's listener *after* your custom listener
|
240
|
+
* $urlRouter.listen();
|
241
|
+
* });
|
242
|
+
* </pre>
|
243
|
+
*
|
244
|
+
* @param {boolean} defer Indicates whether to defer location change interception. Passing
|
245
|
+
no parameter is equivalent to `true`.
|
246
|
+
*/
|
247
|
+
this.deferIntercept = function (defer) {
|
248
|
+
if (defer === undefined) defer = true;
|
249
|
+
interceptDeferred = defer;
|
250
|
+
};
|
251
|
+
|
252
|
+
/**
|
253
|
+
* @ngdoc object
|
254
|
+
* @name ui.router.router.$urlRouter
|
255
|
+
*
|
256
|
+
* @requires $location
|
257
|
+
* @requires $rootScope
|
258
|
+
* @requires $injector
|
259
|
+
* @requires $browser
|
260
|
+
*
|
261
|
+
* @description
|
262
|
+
*
|
263
|
+
*/
|
264
|
+
this.$get = $get;
|
265
|
+
$get.$inject = ['$location', '$rootScope', '$injector', '$browser'];
|
266
|
+
function $get( $location, $rootScope, $injector, $browser) {
|
267
|
+
|
268
|
+
var baseHref = $browser.baseHref(), location = $location.url(), lastPushedUrl;
|
269
|
+
|
270
|
+
function appendBasePath(url, isHtml5, absolute) {
|
271
|
+
if (baseHref === '/') return url;
|
272
|
+
if (isHtml5) return baseHref.slice(0, -1) + url;
|
273
|
+
if (absolute) return baseHref.slice(1) + url;
|
274
|
+
return url;
|
275
|
+
}
|
276
|
+
|
277
|
+
// TODO: Optimize groups of rules with non-empty prefix into some sort of decision tree
|
278
|
+
function update(evt) {
|
279
|
+
if (evt && evt.defaultPrevented) return;
|
280
|
+
var ignoreUpdate = lastPushedUrl && $location.url() === lastPushedUrl;
|
281
|
+
lastPushedUrl = undefined;
|
282
|
+
// TODO: Re-implement this in 1.0 for https://github.com/angular-ui/ui-router/issues/1573
|
283
|
+
//if (ignoreUpdate) return true;
|
284
|
+
|
285
|
+
function check(rule) {
|
286
|
+
var handled = rule($injector, $location);
|
287
|
+
|
288
|
+
if (!handled) return false;
|
289
|
+
if (isString(handled)) $location.replace().url(handled);
|
290
|
+
return true;
|
291
|
+
}
|
292
|
+
var n = rules.length, i;
|
293
|
+
|
294
|
+
for (i = 0; i < n; i++) {
|
295
|
+
if (check(rules[i])) return;
|
296
|
+
}
|
297
|
+
// always check otherwise last to allow dynamic updates to the set of rules
|
298
|
+
if (otherwise) check(otherwise);
|
299
|
+
}
|
300
|
+
|
301
|
+
function listen() {
|
302
|
+
listener = listener || $rootScope.$on('$locationChangeSuccess', update);
|
303
|
+
return listener;
|
304
|
+
}
|
305
|
+
|
306
|
+
if (!interceptDeferred) listen();
|
307
|
+
|
308
|
+
return {
|
309
|
+
/**
|
310
|
+
* @ngdoc function
|
311
|
+
* @name ui.router.router.$urlRouter#sync
|
312
|
+
* @methodOf ui.router.router.$urlRouter
|
313
|
+
*
|
314
|
+
* @description
|
315
|
+
* Triggers an update; the same update that happens when the address bar url changes, aka `$locationChangeSuccess`.
|
316
|
+
* This method is useful when you need to use `preventDefault()` on the `$locationChangeSuccess` event,
|
317
|
+
* perform some custom logic (route protection, auth, config, redirection, etc) and then finally proceed
|
318
|
+
* with the transition by calling `$urlRouter.sync()`.
|
319
|
+
*
|
320
|
+
* @example
|
321
|
+
* <pre>
|
322
|
+
* angular.module('app', ['ui.router'])
|
323
|
+
* .run(function($rootScope, $urlRouter) {
|
324
|
+
* $rootScope.$on('$locationChangeSuccess', function(evt) {
|
325
|
+
* // Halt state change from even starting
|
326
|
+
* evt.preventDefault();
|
327
|
+
* // Perform custom logic
|
328
|
+
* var meetsRequirement = ...
|
329
|
+
* // Continue with the update and state transition if logic allows
|
330
|
+
* if (meetsRequirement) $urlRouter.sync();
|
331
|
+
* });
|
332
|
+
* });
|
333
|
+
* </pre>
|
334
|
+
*/
|
335
|
+
sync: function() {
|
336
|
+
update();
|
337
|
+
},
|
338
|
+
|
339
|
+
listen: function() {
|
340
|
+
return listen();
|
341
|
+
},
|
342
|
+
|
343
|
+
update: function(read) {
|
344
|
+
if (read) {
|
345
|
+
location = $location.url();
|
346
|
+
return;
|
347
|
+
}
|
348
|
+
if ($location.url() === location) return;
|
349
|
+
|
350
|
+
$location.url(location);
|
351
|
+
$location.replace();
|
352
|
+
},
|
353
|
+
|
354
|
+
push: function(urlMatcher, params, options) {
|
355
|
+
var url = urlMatcher.format(params || {});
|
356
|
+
|
357
|
+
// Handle the special hash param, if needed
|
358
|
+
if (url !== null && params && params['#']) {
|
359
|
+
url += '#' + params['#'];
|
360
|
+
}
|
361
|
+
|
362
|
+
$location.url(url);
|
363
|
+
lastPushedUrl = options && options.$$avoidResync ? $location.url() : undefined;
|
364
|
+
if (options && options.replace) $location.replace();
|
365
|
+
},
|
366
|
+
|
367
|
+
/**
|
368
|
+
* @ngdoc function
|
369
|
+
* @name ui.router.router.$urlRouter#href
|
370
|
+
* @methodOf ui.router.router.$urlRouter
|
371
|
+
*
|
372
|
+
* @description
|
373
|
+
* A URL generation method that returns the compiled URL for a given
|
374
|
+
* {@link ui.router.util.type:UrlMatcher `UrlMatcher`}, populated with the provided parameters.
|
375
|
+
*
|
376
|
+
* @example
|
377
|
+
* <pre>
|
378
|
+
* $bob = $urlRouter.href(new UrlMatcher("/about/:person"), {
|
379
|
+
* person: "bob"
|
380
|
+
* });
|
381
|
+
* // $bob == "/about/bob";
|
382
|
+
* </pre>
|
383
|
+
*
|
384
|
+
* @param {UrlMatcher} urlMatcher The `UrlMatcher` object which is used as the template of the URL to generate.
|
385
|
+
* @param {object=} params An object of parameter values to fill the matcher's required parameters.
|
386
|
+
* @param {object=} options Options object. The options are:
|
387
|
+
*
|
388
|
+
* - **`absolute`** - {boolean=false}, If true will generate an absolute url, e.g. "http://www.example.com/fullurl".
|
389
|
+
*
|
390
|
+
* @returns {string} Returns the fully compiled URL, or `null` if `params` fail validation against `urlMatcher`
|
391
|
+
*/
|
392
|
+
href: function(urlMatcher, params, options) {
|
393
|
+
if (!urlMatcher.validates(params)) return null;
|
394
|
+
|
395
|
+
var isHtml5 = $locationProvider.html5Mode();
|
396
|
+
if (angular.isObject(isHtml5)) {
|
397
|
+
isHtml5 = isHtml5.enabled;
|
398
|
+
}
|
399
|
+
|
400
|
+
var url = urlMatcher.format(params);
|
401
|
+
options = options || {};
|
402
|
+
|
403
|
+
if (!isHtml5 && url !== null) {
|
404
|
+
url = "#" + $locationProvider.hashPrefix() + url;
|
405
|
+
}
|
406
|
+
|
407
|
+
// Handle special hash param, if needed
|
408
|
+
if (url !== null && params && params['#']) {
|
409
|
+
url += '#' + params['#'];
|
410
|
+
}
|
411
|
+
|
412
|
+
url = appendBasePath(url, isHtml5, options.absolute);
|
413
|
+
|
414
|
+
if (!options.absolute || !url) {
|
415
|
+
return url;
|
416
|
+
}
|
417
|
+
|
418
|
+
var slash = (!isHtml5 && url ? '/' : ''), port = $location.port();
|
419
|
+
port = (port === 80 || port === 443 ? '' : ':' + port);
|
420
|
+
|
421
|
+
return [$location.protocol(), '://', $location.host(), port, slash, url].join('');
|
422
|
+
}
|
423
|
+
};
|
424
|
+
}
|
425
|
+
}
|
426
|
+
|
427
|
+
angular.module('ui.router.router').provider('$urlRouter', $UrlRouterProvider);
|
@@ -0,0 +1,71 @@
|
|
1
|
+
|
2
|
+
$ViewProvider.$inject = [];
|
3
|
+
function $ViewProvider() {
|
4
|
+
|
5
|
+
this.$get = $get;
|
6
|
+
/**
|
7
|
+
* @ngdoc object
|
8
|
+
* @name ui.router.state.$view
|
9
|
+
*
|
10
|
+
* @requires ui.router.util.$templateFactory
|
11
|
+
* @requires $rootScope
|
12
|
+
*
|
13
|
+
* @description
|
14
|
+
*
|
15
|
+
*/
|
16
|
+
$get.$inject = ['$rootScope', '$templateFactory'];
|
17
|
+
function $get( $rootScope, $templateFactory) {
|
18
|
+
return {
|
19
|
+
// $view.load('full.viewName', { template: ..., controller: ..., resolve: ..., async: false, params: ... })
|
20
|
+
/**
|
21
|
+
* @ngdoc function
|
22
|
+
* @name ui.router.state.$view#load
|
23
|
+
* @methodOf ui.router.state.$view
|
24
|
+
*
|
25
|
+
* @description
|
26
|
+
*
|
27
|
+
* @param {string} name name
|
28
|
+
* @param {object} options option object.
|
29
|
+
*/
|
30
|
+
load: function load(name, options) {
|
31
|
+
var result, defaults = {
|
32
|
+
template: null, controller: null, view: null, locals: null, notify: true, async: true, params: {}
|
33
|
+
};
|
34
|
+
options = extend(defaults, options);
|
35
|
+
|
36
|
+
if (options.view) {
|
37
|
+
result = $templateFactory.fromConfig(options.view, options.params, options.locals);
|
38
|
+
}
|
39
|
+
if (result && options.notify) {
|
40
|
+
/**
|
41
|
+
* @ngdoc event
|
42
|
+
* @name ui.router.state.$state#$viewContentLoading
|
43
|
+
* @eventOf ui.router.state.$view
|
44
|
+
* @eventType broadcast on root scope
|
45
|
+
* @description
|
46
|
+
*
|
47
|
+
* Fired once the view **begins loading**, *before* the DOM is rendered.
|
48
|
+
*
|
49
|
+
* @param {Object} event Event object.
|
50
|
+
* @param {Object} viewConfig The view config properties (template, controller, etc).
|
51
|
+
*
|
52
|
+
* @example
|
53
|
+
*
|
54
|
+
* <pre>
|
55
|
+
* $scope.$on('$viewContentLoading',
|
56
|
+
* function(event, viewConfig){
|
57
|
+
* // Access to all the view config properties.
|
58
|
+
* // and one special property 'targetView'
|
59
|
+
* // viewConfig.targetView
|
60
|
+
* });
|
61
|
+
* </pre>
|
62
|
+
*/
|
63
|
+
$rootScope.$broadcast('$viewContentLoading', options);
|
64
|
+
}
|
65
|
+
return result;
|
66
|
+
}
|
67
|
+
};
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
angular.module('ui.router.state').provider('$view', $ViewProvider);
|