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,285 @@
|
|
1
|
+
function parseStateRef(ref, current) {
|
2
|
+
var preparsed = ref.match(/^\s*({[^}]*})\s*$/), parsed;
|
3
|
+
if (preparsed) ref = current + '(' + preparsed[1] + ')';
|
4
|
+
parsed = ref.replace(/\n/g, " ").match(/^([^(]+?)\s*(\((.*)\))?$/);
|
5
|
+
if (!parsed || parsed.length !== 4) throw new Error("Invalid state ref '" + ref + "'");
|
6
|
+
return { state: parsed[1], paramExpr: parsed[3] || null };
|
7
|
+
}
|
8
|
+
|
9
|
+
function stateContext(el) {
|
10
|
+
var stateData = el.parent().inheritedData('$uiView');
|
11
|
+
|
12
|
+
if (stateData && stateData.state && stateData.state.name) {
|
13
|
+
return stateData.state;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
/**
|
18
|
+
* @ngdoc directive
|
19
|
+
* @name ui.router.state.directive:ui-sref
|
20
|
+
*
|
21
|
+
* @requires ui.router.state.$state
|
22
|
+
* @requires $timeout
|
23
|
+
*
|
24
|
+
* @restrict A
|
25
|
+
*
|
26
|
+
* @description
|
27
|
+
* A directive that binds a link (`<a>` tag) to a state. If the state has an associated
|
28
|
+
* URL, the directive will automatically generate & update the `href` attribute via
|
29
|
+
* the {@link ui.router.state.$state#methods_href $state.href()} method. Clicking
|
30
|
+
* the link will trigger a state transition with optional parameters.
|
31
|
+
*
|
32
|
+
* Also middle-clicking, right-clicking, and ctrl-clicking on the link will be
|
33
|
+
* handled natively by the browser.
|
34
|
+
*
|
35
|
+
* You can also use relative state paths within ui-sref, just like the relative
|
36
|
+
* paths passed to `$state.go()`. You just need to be aware that the path is relative
|
37
|
+
* to the state that the link lives in, in other words the state that loaded the
|
38
|
+
* template containing the link.
|
39
|
+
*
|
40
|
+
* You can specify options to pass to {@link ui.router.state.$state#go $state.go()}
|
41
|
+
* using the `ui-sref-opts` attribute. Options are restricted to `location`, `inherit`,
|
42
|
+
* and `reload`.
|
43
|
+
*
|
44
|
+
* @example
|
45
|
+
* Here's an example of how you'd use ui-sref and how it would compile. If you have the
|
46
|
+
* following template:
|
47
|
+
* <pre>
|
48
|
+
* <a ui-sref="home">Home</a> | <a ui-sref="about">About</a> | <a ui-sref="{page: 2}">Next page</a>
|
49
|
+
*
|
50
|
+
* <ul>
|
51
|
+
* <li ng-repeat="contact in contacts">
|
52
|
+
* <a ui-sref="contacts.detail({ id: contact.id })">{{ contact.name }}</a>
|
53
|
+
* </li>
|
54
|
+
* </ul>
|
55
|
+
* </pre>
|
56
|
+
*
|
57
|
+
* Then the compiled html would be (assuming Html5Mode is off and current state is contacts):
|
58
|
+
* <pre>
|
59
|
+
* <a href="#/home" ui-sref="home">Home</a> | <a href="#/about" ui-sref="about">About</a> | <a href="#/contacts?page=2" ui-sref="{page: 2}">Next page</a>
|
60
|
+
*
|
61
|
+
* <ul>
|
62
|
+
* <li ng-repeat="contact in contacts">
|
63
|
+
* <a href="#/contacts/1" ui-sref="contacts.detail({ id: contact.id })">Joe</a>
|
64
|
+
* </li>
|
65
|
+
* <li ng-repeat="contact in contacts">
|
66
|
+
* <a href="#/contacts/2" ui-sref="contacts.detail({ id: contact.id })">Alice</a>
|
67
|
+
* </li>
|
68
|
+
* <li ng-repeat="contact in contacts">
|
69
|
+
* <a href="#/contacts/3" ui-sref="contacts.detail({ id: contact.id })">Bob</a>
|
70
|
+
* </li>
|
71
|
+
* </ul>
|
72
|
+
*
|
73
|
+
* <a ui-sref="home" ui-sref-opts="{reload: true}">Home</a>
|
74
|
+
* </pre>
|
75
|
+
*
|
76
|
+
* @param {string} ui-sref 'stateName' can be any valid absolute or relative state
|
77
|
+
* @param {Object} ui-sref-opts options to pass to {@link ui.router.state.$state#go $state.go()}
|
78
|
+
*/
|
79
|
+
$StateRefDirective.$inject = ['$state', '$timeout'];
|
80
|
+
function $StateRefDirective($state, $timeout) {
|
81
|
+
var allowedOptions = ['location', 'inherit', 'reload', 'absolute'];
|
82
|
+
|
83
|
+
return {
|
84
|
+
restrict: 'A',
|
85
|
+
require: ['?^uiSrefActive', '?^uiSrefActiveEq'],
|
86
|
+
link: function(scope, element, attrs, uiSrefActive) {
|
87
|
+
var ref = parseStateRef(attrs.uiSref, $state.current.name);
|
88
|
+
var params = null, url = null, base = stateContext(element) || $state.$current;
|
89
|
+
// SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.
|
90
|
+
var hrefKind = Object.prototype.toString.call(element.prop('href')) === '[object SVGAnimatedString]' ?
|
91
|
+
'xlink:href' : 'href';
|
92
|
+
var newHref = null, isAnchor = element.prop("tagName").toUpperCase() === "A";
|
93
|
+
var isForm = element[0].nodeName === "FORM";
|
94
|
+
var attr = isForm ? "action" : hrefKind, nav = true;
|
95
|
+
|
96
|
+
var options = { relative: base, inherit: true };
|
97
|
+
var optionsOverride = scope.$eval(attrs.uiSrefOpts) || {};
|
98
|
+
|
99
|
+
angular.forEach(allowedOptions, function(option) {
|
100
|
+
if (option in optionsOverride) {
|
101
|
+
options[option] = optionsOverride[option];
|
102
|
+
}
|
103
|
+
});
|
104
|
+
|
105
|
+
var update = function(newVal) {
|
106
|
+
if (newVal) params = angular.copy(newVal);
|
107
|
+
if (!nav) return;
|
108
|
+
|
109
|
+
newHref = $state.href(ref.state, params, options);
|
110
|
+
|
111
|
+
var activeDirective = uiSrefActive[1] || uiSrefActive[0];
|
112
|
+
if (activeDirective) {
|
113
|
+
activeDirective.$$addStateInfo(ref.state, params);
|
114
|
+
}
|
115
|
+
if (newHref === null) {
|
116
|
+
nav = false;
|
117
|
+
return false;
|
118
|
+
}
|
119
|
+
attrs.$set(attr, newHref);
|
120
|
+
};
|
121
|
+
|
122
|
+
if (ref.paramExpr) {
|
123
|
+
scope.$watch(ref.paramExpr, function(newVal, oldVal) {
|
124
|
+
if (newVal !== params) update(newVal);
|
125
|
+
}, true);
|
126
|
+
params = angular.copy(scope.$eval(ref.paramExpr));
|
127
|
+
}
|
128
|
+
update();
|
129
|
+
|
130
|
+
if (isForm) return;
|
131
|
+
|
132
|
+
element.bind("click", function(e) {
|
133
|
+
var button = e.which || e.button;
|
134
|
+
if ( !(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || element.attr('target')) ) {
|
135
|
+
// HACK: This is to allow ng-clicks to be processed before the transition is initiated:
|
136
|
+
var transition = $timeout(function() {
|
137
|
+
$state.go(ref.state, params, options);
|
138
|
+
});
|
139
|
+
e.preventDefault();
|
140
|
+
|
141
|
+
// if the state has no URL, ignore one preventDefault from the <a> directive.
|
142
|
+
var ignorePreventDefaultCount = isAnchor && !newHref ? 1: 0;
|
143
|
+
e.preventDefault = function() {
|
144
|
+
if (ignorePreventDefaultCount-- <= 0)
|
145
|
+
$timeout.cancel(transition);
|
146
|
+
};
|
147
|
+
}
|
148
|
+
});
|
149
|
+
}
|
150
|
+
};
|
151
|
+
}
|
152
|
+
|
153
|
+
/**
|
154
|
+
* @ngdoc directive
|
155
|
+
* @name ui.router.state.directive:ui-sref-active
|
156
|
+
*
|
157
|
+
* @requires ui.router.state.$state
|
158
|
+
* @requires ui.router.state.$stateParams
|
159
|
+
* @requires $interpolate
|
160
|
+
*
|
161
|
+
* @restrict A
|
162
|
+
*
|
163
|
+
* @description
|
164
|
+
* A directive working alongside ui-sref to add classes to an element when the
|
165
|
+
* related ui-sref directive's state is active, and removing them when it is inactive.
|
166
|
+
* The primary use-case is to simplify the special appearance of navigation menus
|
167
|
+
* relying on `ui-sref`, by having the "active" state's menu button appear different,
|
168
|
+
* distinguishing it from the inactive menu items.
|
169
|
+
*
|
170
|
+
* ui-sref-active can live on the same element as ui-sref or on a parent element. The first
|
171
|
+
* ui-sref-active found at the same level or above the ui-sref will be used.
|
172
|
+
*
|
173
|
+
* Will activate when the ui-sref's target state or any child state is active. If you
|
174
|
+
* need to activate only when the ui-sref target state is active and *not* any of
|
175
|
+
* it's children, then you will use
|
176
|
+
* {@link ui.router.state.directive:ui-sref-active-eq ui-sref-active-eq}
|
177
|
+
*
|
178
|
+
* @example
|
179
|
+
* Given the following template:
|
180
|
+
* <pre>
|
181
|
+
* <ul>
|
182
|
+
* <li ui-sref-active="active" class="item">
|
183
|
+
* <a href ui-sref="app.user({user: 'bilbobaggins'})">@bilbobaggins</a>
|
184
|
+
* </li>
|
185
|
+
* </ul>
|
186
|
+
* </pre>
|
187
|
+
*
|
188
|
+
*
|
189
|
+
* When the app state is "app.user" (or any children states), and contains the state parameter "user" with value "bilbobaggins",
|
190
|
+
* the resulting HTML will appear as (note the 'active' class):
|
191
|
+
* <pre>
|
192
|
+
* <ul>
|
193
|
+
* <li ui-sref-active="active" class="item active">
|
194
|
+
* <a ui-sref="app.user({user: 'bilbobaggins'})" href="/users/bilbobaggins">@bilbobaggins</a>
|
195
|
+
* </li>
|
196
|
+
* </ul>
|
197
|
+
* </pre>
|
198
|
+
*
|
199
|
+
* The class name is interpolated **once** during the directives link time (any further changes to the
|
200
|
+
* interpolated value are ignored).
|
201
|
+
*
|
202
|
+
* Multiple classes may be specified in a space-separated format:
|
203
|
+
* <pre>
|
204
|
+
* <ul>
|
205
|
+
* <li ui-sref-active='class1 class2 class3'>
|
206
|
+
* <a ui-sref="app.user">link</a>
|
207
|
+
* </li>
|
208
|
+
* </ul>
|
209
|
+
* </pre>
|
210
|
+
*/
|
211
|
+
|
212
|
+
/**
|
213
|
+
* @ngdoc directive
|
214
|
+
* @name ui.router.state.directive:ui-sref-active-eq
|
215
|
+
*
|
216
|
+
* @requires ui.router.state.$state
|
217
|
+
* @requires ui.router.state.$stateParams
|
218
|
+
* @requires $interpolate
|
219
|
+
*
|
220
|
+
* @restrict A
|
221
|
+
*
|
222
|
+
* @description
|
223
|
+
* The same as {@link ui.router.state.directive:ui-sref-active ui-sref-active} but will only activate
|
224
|
+
* when the exact target state used in the `ui-sref` is active; no child states.
|
225
|
+
*
|
226
|
+
*/
|
227
|
+
$StateRefActiveDirective.$inject = ['$state', '$stateParams', '$interpolate'];
|
228
|
+
function $StateRefActiveDirective($state, $stateParams, $interpolate) {
|
229
|
+
return {
|
230
|
+
restrict: "A",
|
231
|
+
controller: ['$scope', '$element', '$attrs', function ($scope, $element, $attrs) {
|
232
|
+
var states = [], activeClass;
|
233
|
+
|
234
|
+
// There probably isn't much point in $observing this
|
235
|
+
// uiSrefActive and uiSrefActiveEq share the same directive object with some
|
236
|
+
// slight difference in logic routing
|
237
|
+
activeClass = $interpolate($attrs.uiSrefActiveEq || $attrs.uiSrefActive || '', false)($scope);
|
238
|
+
|
239
|
+
// Allow uiSref to communicate with uiSrefActive[Equals]
|
240
|
+
this.$$addStateInfo = function (newState, newParams) {
|
241
|
+
var state = $state.get(newState, stateContext($element));
|
242
|
+
|
243
|
+
states.push({
|
244
|
+
state: state || { name: newState },
|
245
|
+
params: newParams
|
246
|
+
});
|
247
|
+
|
248
|
+
update();
|
249
|
+
};
|
250
|
+
|
251
|
+
$scope.$on('$stateChangeSuccess', update);
|
252
|
+
|
253
|
+
// Update route state
|
254
|
+
function update() {
|
255
|
+
if (anyMatch()) {
|
256
|
+
$element.addClass(activeClass);
|
257
|
+
} else {
|
258
|
+
$element.removeClass(activeClass);
|
259
|
+
}
|
260
|
+
}
|
261
|
+
|
262
|
+
function anyMatch() {
|
263
|
+
for (var i = 0; i < states.length; i++) {
|
264
|
+
if (isMatch(states[i].state, states[i].params)) {
|
265
|
+
return true;
|
266
|
+
}
|
267
|
+
}
|
268
|
+
return false;
|
269
|
+
}
|
270
|
+
|
271
|
+
function isMatch(state, params) {
|
272
|
+
if (typeof $attrs.uiSrefActiveEq !== 'undefined') {
|
273
|
+
return $state.is(state.name, params);
|
274
|
+
} else {
|
275
|
+
return $state.includes(state.name, params);
|
276
|
+
}
|
277
|
+
}
|
278
|
+
}]
|
279
|
+
};
|
280
|
+
}
|
281
|
+
|
282
|
+
angular.module('ui.router.state')
|
283
|
+
.directive('uiSref', $StateRefDirective)
|
284
|
+
.directive('uiSrefActive', $StateRefActiveDirective)
|
285
|
+
.directive('uiSrefActiveEq', $StateRefActiveDirective);
|
@@ -0,0 +1,39 @@
|
|
1
|
+
/**
|
2
|
+
* @ngdoc filter
|
3
|
+
* @name ui.router.state.filter:isState
|
4
|
+
*
|
5
|
+
* @requires ui.router.state.$state
|
6
|
+
*
|
7
|
+
* @description
|
8
|
+
* Translates to {@link ui.router.state.$state#methods_is $state.is("stateName")}.
|
9
|
+
*/
|
10
|
+
$IsStateFilter.$inject = ['$state'];
|
11
|
+
function $IsStateFilter($state) {
|
12
|
+
var isFilter = function (state) {
|
13
|
+
return $state.is(state);
|
14
|
+
};
|
15
|
+
isFilter.$stateful = true;
|
16
|
+
return isFilter;
|
17
|
+
}
|
18
|
+
|
19
|
+
/**
|
20
|
+
* @ngdoc filter
|
21
|
+
* @name ui.router.state.filter:includedByState
|
22
|
+
*
|
23
|
+
* @requires ui.router.state.$state
|
24
|
+
*
|
25
|
+
* @description
|
26
|
+
* Translates to {@link ui.router.state.$state#methods_includes $state.includes('fullOrPartialStateName')}.
|
27
|
+
*/
|
28
|
+
$IncludedByStateFilter.$inject = ['$state'];
|
29
|
+
function $IncludedByStateFilter($state) {
|
30
|
+
var includesFilter = function (state) {
|
31
|
+
return $state.includes(state);
|
32
|
+
};
|
33
|
+
includesFilter.$stateful = true;
|
34
|
+
return includesFilter;
|
35
|
+
}
|
36
|
+
|
37
|
+
angular.module('ui.router.state')
|
38
|
+
.filter('isState', $IsStateFilter)
|
39
|
+
.filter('includedByState', $IncludedByStateFilter);
|
@@ -0,0 +1,110 @@
|
|
1
|
+
/**
|
2
|
+
* @ngdoc object
|
3
|
+
* @name ui.router.util.$templateFactory
|
4
|
+
*
|
5
|
+
* @requires $http
|
6
|
+
* @requires $templateCache
|
7
|
+
* @requires $injector
|
8
|
+
*
|
9
|
+
* @description
|
10
|
+
* Service. Manages loading of templates.
|
11
|
+
*/
|
12
|
+
$TemplateFactory.$inject = ['$http', '$templateCache', '$injector'];
|
13
|
+
function $TemplateFactory( $http, $templateCache, $injector) {
|
14
|
+
|
15
|
+
/**
|
16
|
+
* @ngdoc function
|
17
|
+
* @name ui.router.util.$templateFactory#fromConfig
|
18
|
+
* @methodOf ui.router.util.$templateFactory
|
19
|
+
*
|
20
|
+
* @description
|
21
|
+
* Creates a template from a configuration object.
|
22
|
+
*
|
23
|
+
* @param {object} config Configuration object for which to load a template.
|
24
|
+
* The following properties are search in the specified order, and the first one
|
25
|
+
* that is defined is used to create the template:
|
26
|
+
*
|
27
|
+
* @param {string|object} config.template html string template or function to
|
28
|
+
* load via {@link ui.router.util.$templateFactory#fromString fromString}.
|
29
|
+
* @param {string|object} config.templateUrl url to load or a function returning
|
30
|
+
* the url to load via {@link ui.router.util.$templateFactory#fromUrl fromUrl}.
|
31
|
+
* @param {Function} config.templateProvider function to invoke via
|
32
|
+
* {@link ui.router.util.$templateFactory#fromProvider fromProvider}.
|
33
|
+
* @param {object} params Parameters to pass to the template function.
|
34
|
+
* @param {object} locals Locals to pass to `invoke` if the template is loaded
|
35
|
+
* via a `templateProvider`. Defaults to `{ params: params }`.
|
36
|
+
*
|
37
|
+
* @return {string|object} The template html as a string, or a promise for
|
38
|
+
* that string,or `null` if no template is configured.
|
39
|
+
*/
|
40
|
+
this.fromConfig = function (config, params, locals) {
|
41
|
+
return (
|
42
|
+
isDefined(config.template) ? this.fromString(config.template, params) :
|
43
|
+
isDefined(config.templateUrl) ? this.fromUrl(config.templateUrl, params) :
|
44
|
+
isDefined(config.templateProvider) ? this.fromProvider(config.templateProvider, params, locals) :
|
45
|
+
null
|
46
|
+
);
|
47
|
+
};
|
48
|
+
|
49
|
+
/**
|
50
|
+
* @ngdoc function
|
51
|
+
* @name ui.router.util.$templateFactory#fromString
|
52
|
+
* @methodOf ui.router.util.$templateFactory
|
53
|
+
*
|
54
|
+
* @description
|
55
|
+
* Creates a template from a string or a function returning a string.
|
56
|
+
*
|
57
|
+
* @param {string|object} template html template as a string or function that
|
58
|
+
* returns an html template as a string.
|
59
|
+
* @param {object} params Parameters to pass to the template function.
|
60
|
+
*
|
61
|
+
* @return {string|object} The template html as a string, or a promise for that
|
62
|
+
* string.
|
63
|
+
*/
|
64
|
+
this.fromString = function (template, params) {
|
65
|
+
return isFunction(template) ? template(params) : template;
|
66
|
+
};
|
67
|
+
|
68
|
+
/**
|
69
|
+
* @ngdoc function
|
70
|
+
* @name ui.router.util.$templateFactory#fromUrl
|
71
|
+
* @methodOf ui.router.util.$templateFactory
|
72
|
+
*
|
73
|
+
* @description
|
74
|
+
* Loads a template from the a URL via `$http` and `$templateCache`.
|
75
|
+
*
|
76
|
+
* @param {string|Function} url url of the template to load, or a function
|
77
|
+
* that returns a url.
|
78
|
+
* @param {Object} params Parameters to pass to the url function.
|
79
|
+
* @return {string|Promise.<string>} The template html as a string, or a promise
|
80
|
+
* for that string.
|
81
|
+
*/
|
82
|
+
this.fromUrl = function (url, params) {
|
83
|
+
if (isFunction(url)) url = url(params);
|
84
|
+
if (url == null) return null;
|
85
|
+
else return $http
|
86
|
+
.get(url, { cache: $templateCache, headers: { Accept: 'text/html' }})
|
87
|
+
.then(function(response) { return response.data; });
|
88
|
+
};
|
89
|
+
|
90
|
+
/**
|
91
|
+
* @ngdoc function
|
92
|
+
* @name ui.router.util.$templateFactory#fromProvider
|
93
|
+
* @methodOf ui.router.util.$templateFactory
|
94
|
+
*
|
95
|
+
* @description
|
96
|
+
* Creates a template by invoking an injectable provider function.
|
97
|
+
*
|
98
|
+
* @param {Function} provider Function to invoke via `$injector.invoke`
|
99
|
+
* @param {Object} params Parameters for the template.
|
100
|
+
* @param {Object} locals Locals to pass to `invoke`. Defaults to
|
101
|
+
* `{ params: params }`.
|
102
|
+
* @return {string|Promise.<string>} The template html as a string, or a promise
|
103
|
+
* for that string.
|
104
|
+
*/
|
105
|
+
this.fromProvider = function (provider, params, locals) {
|
106
|
+
return $injector.invoke(provider, null, locals || { params: params });
|
107
|
+
};
|
108
|
+
}
|
109
|
+
|
110
|
+
angular.module('ui.router.util').service('$templateFactory', $TemplateFactory);
|