todo_rails 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/todo_rails/version.rb +1 -1
- data/vendor/assets/bower.json +8 -0
- data/vendor/assets/bower_components/angular-animate/README.md +68 -0
- data/vendor/assets/bower_components/angular-animate/angular-animate.js +3721 -0
- data/vendor/assets/bower_components/angular-animate/angular-animate.min.js +52 -0
- data/vendor/assets/bower_components/angular-animate/angular-animate.min.js.map +8 -0
- data/vendor/assets/bower_components/angular-animate/bower.json +9 -0
- data/vendor/assets/bower_components/angular-animate/index.js +2 -0
- data/vendor/assets/bower_components/angular-animate/package.json +26 -0
- data/vendor/assets/bower_components/angular-aria/README.md +67 -0
- data/vendor/assets/bower_components/angular-aria/angular-aria.js +393 -0
- data/vendor/assets/bower_components/angular-aria/angular-aria.min.js +13 -0
- data/vendor/assets/bower_components/angular-aria/angular-aria.min.js.map +8 -0
- data/vendor/assets/bower_components/angular-aria/bower.json +9 -0
- data/vendor/assets/bower_components/angular-aria/index.js +2 -0
- data/vendor/assets/bower_components/angular-aria/package.json +27 -0
- data/vendor/assets/bower_components/angular-material/CHANGELOG.md +1599 -0
- data/vendor/assets/bower_components/angular-material/LICENSE +21 -0
- data/vendor/assets/bower_components/angular-material/README.md +211 -0
- data/vendor/assets/bower_components/angular-material/angular-material-mocks.js +77 -0
- data/vendor/assets/bower_components/angular-material/angular-material.css +7183 -0
- data/vendor/assets/bower_components/angular-material/angular-material.js +15406 -0
- data/vendor/assets/bower_components/angular-material/angular-material.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/angular-material.min.js +14 -0
- data/vendor/assets/bower_components/angular-material/bower.json +14 -0
- data/vendor/assets/bower_components/angular-material/demos/bottomSheet/demoBasicUsage/img/icons/copy.svg +1 -0
- data/vendor/assets/bower_components/angular-material/demos/bottomSheet/demoBasicUsage/img/icons/copy2.svg +1 -0
- data/vendor/assets/bower_components/angular-material/demos/bottomSheet/demoBasicUsage/img/icons/facebook.svg +1 -0
- data/vendor/assets/bower_components/angular-material/demos/bottomSheet/demoBasicUsage/img/icons/hangout.svg +1 -0
- data/vendor/assets/bower_components/angular-material/demos/bottomSheet/demoBasicUsage/img/icons/mail.svg +1 -0
- data/vendor/assets/bower_components/angular-material/demos/bottomSheet/demoBasicUsage/img/icons/message.svg +1 -0
- data/vendor/assets/bower_components/angular-material/demos/bottomSheet/demoBasicUsage/img/icons/print.svg +1 -0
- data/vendor/assets/bower_components/angular-material/demos/bottomSheet/demoBasicUsage/img/icons/share-arrow.svg +1 -0
- data/vendor/assets/bower_components/angular-material/demos/bottomSheet/demoBasicUsage/img/icons/twitter.svg +2 -0
- data/vendor/assets/bower_components/angular-material/demos/bottomSheet/demoBasicUsage/img/icons/upload.svg +1 -0
- data/vendor/assets/bower_components/angular-material/demos/chips/demoBasicUsage/style.scss +39 -0
- data/vendor/assets/bower_components/angular-material/demos/chips/demoContactChips/style.scss +47 -0
- data/vendor/assets/bower_components/angular-material/demos/gridList/demoBasicUsage/style.scss +75 -0
- data/vendor/assets/bower_components/angular-material/demos/gridList/demoDynamicTiles/style.scss +78 -0
- data/vendor/assets/bower_components/angular-material/demos/gridList/demoResponsiveUsage/style.scss +0 -0
- data/vendor/assets/bower_components/angular-material/demos/icon/demoLoadSvgIconsFromUrl/img/icons/addShoppingCart.svg +1 -0
- data/vendor/assets/bower_components/angular-material/demos/icon/demoLoadSvgIconsFromUrl/img/icons/android.svg +1 -0
- data/vendor/assets/bower_components/angular-material/demos/icon/demoLoadSvgIconsFromUrl/img/icons/cake.svg +1 -0
- data/vendor/assets/bower_components/angular-material/demos/icon/demoSvgIconSets/assets/cake.svg +1 -0
- data/vendor/assets/bower_components/angular-material/demos/icon/demoSvgIconSets/assets/core-icons.svg +26 -0
- data/vendor/assets/bower_components/angular-material/demos/icon/demoSvgIconSets/assets/social-icons.svg +26 -0
- data/vendor/assets/bower_components/angular-material/demos/icon/demoSvgIconsFromURL/img/icons/addShoppingCart.svg +1 -0
- data/vendor/assets/bower_components/angular-material/demos/icon/demoSvgIconsFromURL/img/icons/android.svg +1 -0
- data/vendor/assets/bower_components/angular-material/demos/icon/demoSvgIconsFromURL/img/icons/cake.svg +1 -0
- data/vendor/assets/bower_components/angular-material/demos/icon/demoUsingTemplateCache/assets/android.svg +1 -0
- data/vendor/assets/bower_components/angular-material/demos/icon/demoUsingTemplateCache/assets/cake.svg +1 -0
- data/vendor/assets/bower_components/angular-material/demos/icon/demoUsingTemplateCache/assets/core-icons.svg +26 -0
- data/vendor/assets/bower_components/angular-material/demos/input/demoIcons/icons/ic_email_24px.svg +4 -0
- data/vendor/assets/bower_components/angular-material/demos/input/demoIcons/icons/ic_person_24px.svg +4 -0
- data/vendor/assets/bower_components/angular-material/demos/input/demoIcons/icons/ic_phone_24px.svg +4 -0
- data/vendor/assets/bower_components/angular-material/demos/input/demoIcons/icons/ic_place_24px.svg +4 -0
- data/vendor/assets/bower_components/angular-material/demos/input/demoIcons/style.scss +18 -0
- data/vendor/assets/bower_components/angular-material/demos/list/demoListControls/img/100-0.jpeg +0 -0
- data/vendor/assets/bower_components/angular-material/demos/list/demoListControls/img/100-1.jpeg +0 -0
- data/vendor/assets/bower_components/angular-material/demos/list/demoListControls/img/100-2.jpeg +0 -0
- data/vendor/assets/bower_components/angular-material/demos/tabs/demoDynamicHeight/style.scss +13 -0
- data/vendor/assets/bower_components/angular-material/demos/tabs/demoDynamicTabs/style.scss +44 -0
- data/vendor/assets/bower_components/angular-material/demos/tabs/demoStaticTabs/style.scss +25 -0
- data/vendor/assets/bower_components/angular-material/demos/toolbar/demoBasicUsage/img/icons/favorite.svg +4 -0
- data/vendor/assets/bower_components/angular-material/demos/toolbar/demoBasicUsage/img/icons/menu.svg +4 -0
- data/vendor/assets/bower_components/angular-material/demos/toolbar/demoBasicUsage/img/icons/more_vert.svg +4 -0
- data/vendor/assets/bower_components/angular-material/index.js +12 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/autocomplete/autocomplete-default-theme.css +24 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/autocomplete/autocomplete.css +220 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/autocomplete/autocomplete.js +951 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/backdrop/backdrop-default-theme.css +9 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/backdrop/backdrop.css +59 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/backdrop/backdrop.js +38 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/bottomSheet/bottomSheet-default-theme.css +16 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/bottomSheet/bottomSheet.css +170 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/bottomSheet/bottomSheet.js +267 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/button/button-default-theme.css +94 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/button/button.css +158 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/button/button.js +135 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/card/card-default-theme.css +12 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/card/card.css +34 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/card/card.js +84 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/checkbox/checkbox-default-theme.css +47 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/checkbox/checkbox.css +124 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/checkbox/checkbox.js +166 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/chips/chips-default-theme.css +24 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/chips/chips.css +131 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/chips/chips.js +949 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/content/content-default-theme.css +9 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/content/content.css +20 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/content/content.js +84 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/core/core.css +2594 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/core/core.js +3772 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/core/default-theme.js +4 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/dialog/dialog-default-theme.css +12 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/dialog/dialog.css +111 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/dialog/dialog.js +713 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/divider/divider-default-theme.css +9 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/divider/divider.css +14 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/divider/divider.js +45 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/fabActions/fabActions.js +57 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/fabSpeedDial/fabSpeedDial.css +100 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/fabSpeedDial/fabSpeedDial.js +236 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/fabToolbar/fabToolbar.css +74 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/fabToolbar/fabToolbar.js +218 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/fabTrigger/fabTrigger.js +54 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/gridList/gridList-default-theme.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/gridList/gridList.css +68 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/gridList/gridList.js +762 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/icon/icon-default-theme.css +15 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/icon/icon.css +20 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/icon/icon.js +783 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/input/input-default-theme.css +46 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/input/input.css +162 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/input/input.js +371 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/list/list-default-theme.css +23 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/list/list.css +147 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/list/list.js +273 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/menu/menu-default-theme.css +11 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/menu/menu.css +121 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/menu/menu.js +620 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/progressCircular/progressCircular-default-theme.css +36 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/progressCircular/progressCircular.css +1409 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/progressCircular/progressCircular.js +109 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/progressLinear/progressLinear-default-theme.css +27 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/progressLinear/progressLinear.css +287 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/progressLinear/progressLinear.js +126 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/radioButton/radioButton-default-theme.css +47 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/radioButton/radioButton.css +91 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/radioButton/radioButton.js +312 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/select/select-default-theme.css +42 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/select/select.css +170 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/select/select.js +1055 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/sidenav/sidenav-default-theme.css +9 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/sidenav/sidenav.css +99 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/sidenav/sidenav.js +424 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/slider/slider-default-theme.css +56 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/slider/slider.css +220 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/slider/slider.js +403 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/sticky/sticky.css +21 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/sticky/sticky.js +315 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/subheader/subheader-default-theme.css +16 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/subheader/subheader.css +63 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/subheader/subheader.js +93 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/swipe/swipe.js +72 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/switch/switch-default-theme.css +33 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/switch/switch.css +110 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/switch/switch.js +169 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/tabs/tabs-arrow.svg +7 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/tabs/tabs-default-theme.css +82 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/tabs/tabs.css +274 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/tabs/tabs.js +1060 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/textField/textField-default-theme.css +30 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/textField/textField.css +111 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/textField/textField.js +145 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/toast/toast-default-theme.css +18 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/toast/toast.css +119 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/toast/toast.js +265 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/toolbar/toolbar-default-theme.css +20 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/toolbar/toolbar.css +83 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/toolbar/toolbar.js +169 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/tooltip/tooltip-default-theme.css +11 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/tooltip/tooltip.css +72 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/tooltip/tooltip.js +267 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/whiteframe/whiteframe.css +25 -0
- data/vendor/assets/bower_components/angular-material/modules/closure/whiteframe/whiteframe.js +15 -0
- data/vendor/assets/bower_components/angular-material/modules/css/angular-material-layout.css +2375 -0
- data/vendor/assets/bower_components/angular-material/modules/js/autocomplete/autocomplete-default-theme.css +24 -0
- data/vendor/assets/bower_components/angular-material/modules/js/autocomplete/autocomplete-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/autocomplete/autocomplete.css +220 -0
- data/vendor/assets/bower_components/angular-material/modules/js/autocomplete/autocomplete.js +951 -0
- data/vendor/assets/bower_components/angular-material/modules/js/autocomplete/autocomplete.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/autocomplete/autocomplete.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/autocomplete/bower.json +8 -0
- data/vendor/assets/bower_components/angular-material/modules/js/backdrop/backdrop-default-theme.css +9 -0
- data/vendor/assets/bower_components/angular-material/modules/js/backdrop/backdrop-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/backdrop/backdrop.css +59 -0
- data/vendor/assets/bower_components/angular-material/modules/js/backdrop/backdrop.js +39 -0
- data/vendor/assets/bower_components/angular-material/modules/js/backdrop/backdrop.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/backdrop/backdrop.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/backdrop/bower.json +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/bottomSheet/bottomSheet-default-theme.css +16 -0
- data/vendor/assets/bower_components/angular-material/modules/js/bottomSheet/bottomSheet-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/bottomSheet/bottomSheet.css +170 -0
- data/vendor/assets/bower_components/angular-material/modules/js/bottomSheet/bottomSheet.js +267 -0
- data/vendor/assets/bower_components/angular-material/modules/js/bottomSheet/bottomSheet.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/bottomSheet/bottomSheet.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/bottomSheet/bower.json +8 -0
- data/vendor/assets/bower_components/angular-material/modules/js/button/bower.json +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/button/button-default-theme.css +94 -0
- data/vendor/assets/bower_components/angular-material/modules/js/button/button-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/button/button.css +158 -0
- data/vendor/assets/bower_components/angular-material/modules/js/button/button.js +136 -0
- data/vendor/assets/bower_components/angular-material/modules/js/button/button.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/button/button.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/card/bower.json +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/card/card-default-theme.css +12 -0
- data/vendor/assets/bower_components/angular-material/modules/js/card/card-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/card/card.css +34 -0
- data/vendor/assets/bower_components/angular-material/modules/js/card/card.js +85 -0
- data/vendor/assets/bower_components/angular-material/modules/js/card/card.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/card/card.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/checkbox/bower.json +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/checkbox/checkbox-default-theme.css +47 -0
- data/vendor/assets/bower_components/angular-material/modules/js/checkbox/checkbox-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/checkbox/checkbox.css +124 -0
- data/vendor/assets/bower_components/angular-material/modules/js/checkbox/checkbox.js +167 -0
- data/vendor/assets/bower_components/angular-material/modules/js/checkbox/checkbox.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/checkbox/checkbox.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/chips/bower.json +8 -0
- data/vendor/assets/bower_components/angular-material/modules/js/chips/chips-default-theme.css +24 -0
- data/vendor/assets/bower_components/angular-material/modules/js/chips/chips-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/chips/chips.css +131 -0
- data/vendor/assets/bower_components/angular-material/modules/js/chips/chips.js +949 -0
- data/vendor/assets/bower_components/angular-material/modules/js/chips/chips.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/chips/chips.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/content/bower.json +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/content/content-default-theme.css +9 -0
- data/vendor/assets/bower_components/angular-material/modules/js/content/content-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/content/content.css +20 -0
- data/vendor/assets/bower_components/angular-material/modules/js/content/content.js +85 -0
- data/vendor/assets/bower_components/angular-material/modules/js/content/content.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/content/content.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/core/bower.json +8 -0
- data/vendor/assets/bower_components/angular-material/modules/js/core/core.css +2594 -0
- data/vendor/assets/bower_components/angular-material/modules/js/core/core.js +3772 -0
- data/vendor/assets/bower_components/angular-material/modules/js/core/core.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/core/core.min.js +10 -0
- data/vendor/assets/bower_components/angular-material/modules/js/core/default-theme.js +4 -0
- data/vendor/assets/bower_components/angular-material/modules/js/dialog/bower.json +8 -0
- data/vendor/assets/bower_components/angular-material/modules/js/dialog/dialog-default-theme.css +12 -0
- data/vendor/assets/bower_components/angular-material/modules/js/dialog/dialog-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/dialog/dialog.css +111 -0
- data/vendor/assets/bower_components/angular-material/modules/js/dialog/dialog.js +713 -0
- data/vendor/assets/bower_components/angular-material/modules/js/dialog/dialog.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/dialog/dialog.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/divider/bower.json +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/divider/divider-default-theme.css +9 -0
- data/vendor/assets/bower_components/angular-material/modules/js/divider/divider-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/divider/divider.css +14 -0
- data/vendor/assets/bower_components/angular-material/modules/js/divider/divider.js +46 -0
- data/vendor/assets/bower_components/angular-material/modules/js/divider/divider.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/divider/divider.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/fabActions/bower.json +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/fabActions/fabActions.js +58 -0
- data/vendor/assets/bower_components/angular-material/modules/js/fabActions/fabActions.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/fabSpeedDial/bower.json +9 -0
- data/vendor/assets/bower_components/angular-material/modules/js/fabSpeedDial/fabSpeedDial.css +100 -0
- data/vendor/assets/bower_components/angular-material/modules/js/fabSpeedDial/fabSpeedDial.js +235 -0
- data/vendor/assets/bower_components/angular-material/modules/js/fabSpeedDial/fabSpeedDial.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/fabSpeedDial/fabSpeedDial.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/fabToolbar/bower.json +9 -0
- data/vendor/assets/bower_components/angular-material/modules/js/fabToolbar/fabToolbar.css +74 -0
- data/vendor/assets/bower_components/angular-material/modules/js/fabToolbar/fabToolbar.js +217 -0
- data/vendor/assets/bower_components/angular-material/modules/js/fabToolbar/fabToolbar.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/fabToolbar/fabToolbar.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/fabTrigger/bower.json +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/fabTrigger/fabTrigger.js +55 -0
- data/vendor/assets/bower_components/angular-material/modules/js/fabTrigger/fabTrigger.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/gridList/bower.json +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/gridList/gridList.css +68 -0
- data/vendor/assets/bower_components/angular-material/modules/js/gridList/gridList.js +763 -0
- data/vendor/assets/bower_components/angular-material/modules/js/gridList/gridList.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/gridList/gridList.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/icon/bower.json +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/icon/icon-default-theme.css +15 -0
- data/vendor/assets/bower_components/angular-material/modules/js/icon/icon-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/icon/icon.css +20 -0
- data/vendor/assets/bower_components/angular-material/modules/js/icon/icon.js +784 -0
- data/vendor/assets/bower_components/angular-material/modules/js/icon/icon.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/icon/icon.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/input/bower.json +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/input/input-default-theme.css +46 -0
- data/vendor/assets/bower_components/angular-material/modules/js/input/input-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/input/input.css +162 -0
- data/vendor/assets/bower_components/angular-material/modules/js/input/input.js +372 -0
- data/vendor/assets/bower_components/angular-material/modules/js/input/input.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/input/input.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/list/bower.json +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/list/list-default-theme.css +23 -0
- data/vendor/assets/bower_components/angular-material/modules/js/list/list-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/list/list.css +147 -0
- data/vendor/assets/bower_components/angular-material/modules/js/list/list.js +274 -0
- data/vendor/assets/bower_components/angular-material/modules/js/list/list.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/list/list.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/menu/bower.json +8 -0
- data/vendor/assets/bower_components/angular-material/modules/js/menu/menu-default-theme.css +11 -0
- data/vendor/assets/bower_components/angular-material/modules/js/menu/menu-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/menu/menu.css +121 -0
- data/vendor/assets/bower_components/angular-material/modules/js/menu/menu.js +620 -0
- data/vendor/assets/bower_components/angular-material/modules/js/menu/menu.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/menu/menu.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/progressCircular/bower.json +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/progressCircular/progressCircular-default-theme.css +36 -0
- data/vendor/assets/bower_components/angular-material/modules/js/progressCircular/progressCircular-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/progressCircular/progressCircular.css +1409 -0
- data/vendor/assets/bower_components/angular-material/modules/js/progressCircular/progressCircular.js +110 -0
- data/vendor/assets/bower_components/angular-material/modules/js/progressCircular/progressCircular.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/progressCircular/progressCircular.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/progressLinear/bower.json +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/progressLinear/progressLinear-default-theme.css +27 -0
- data/vendor/assets/bower_components/angular-material/modules/js/progressLinear/progressLinear-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/progressLinear/progressLinear.css +287 -0
- data/vendor/assets/bower_components/angular-material/modules/js/progressLinear/progressLinear.js +127 -0
- data/vendor/assets/bower_components/angular-material/modules/js/progressLinear/progressLinear.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/progressLinear/progressLinear.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/radioButton/bower.json +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/radioButton/radioButton-default-theme.css +47 -0
- data/vendor/assets/bower_components/angular-material/modules/js/radioButton/radioButton-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/radioButton/radioButton.css +91 -0
- data/vendor/assets/bower_components/angular-material/modules/js/radioButton/radioButton.js +313 -0
- data/vendor/assets/bower_components/angular-material/modules/js/radioButton/radioButton.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/radioButton/radioButton.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/select/bower.json +8 -0
- data/vendor/assets/bower_components/angular-material/modules/js/select/select-default-theme.css +42 -0
- data/vendor/assets/bower_components/angular-material/modules/js/select/select-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/select/select.css +170 -0
- data/vendor/assets/bower_components/angular-material/modules/js/select/select.js +1055 -0
- data/vendor/assets/bower_components/angular-material/modules/js/select/select.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/select/select.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/sidenav/bower.json +8 -0
- data/vendor/assets/bower_components/angular-material/modules/js/sidenav/sidenav-default-theme.css +9 -0
- data/vendor/assets/bower_components/angular-material/modules/js/sidenav/sidenav-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/sidenav/sidenav.css +99 -0
- data/vendor/assets/bower_components/angular-material/modules/js/sidenav/sidenav.js +424 -0
- data/vendor/assets/bower_components/angular-material/modules/js/sidenav/sidenav.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/sidenav/sidenav.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/slider/bower.json +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/slider/slider-default-theme.css +56 -0
- data/vendor/assets/bower_components/angular-material/modules/js/slider/slider-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/slider/slider.css +220 -0
- data/vendor/assets/bower_components/angular-material/modules/js/slider/slider.js +404 -0
- data/vendor/assets/bower_components/angular-material/modules/js/slider/slider.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/slider/slider.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/sticky/bower.json +8 -0
- data/vendor/assets/bower_components/angular-material/modules/js/sticky/sticky.css +21 -0
- data/vendor/assets/bower_components/angular-material/modules/js/sticky/sticky.js +315 -0
- data/vendor/assets/bower_components/angular-material/modules/js/sticky/sticky.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/sticky/sticky.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/subheader/bower.json +8 -0
- data/vendor/assets/bower_components/angular-material/modules/js/subheader/subheader-default-theme.css +16 -0
- data/vendor/assets/bower_components/angular-material/modules/js/subheader/subheader-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/subheader/subheader.css +63 -0
- data/vendor/assets/bower_components/angular-material/modules/js/subheader/subheader.js +93 -0
- data/vendor/assets/bower_components/angular-material/modules/js/subheader/subheader.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/subheader/subheader.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/swipe/bower.json +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/swipe/swipe.js +73 -0
- data/vendor/assets/bower_components/angular-material/modules/js/swipe/swipe.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/switch/bower.json +8 -0
- data/vendor/assets/bower_components/angular-material/modules/js/switch/switch-default-theme.css +33 -0
- data/vendor/assets/bower_components/angular-material/modules/js/switch/switch-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/switch/switch.css +110 -0
- data/vendor/assets/bower_components/angular-material/modules/js/switch/switch.js +169 -0
- data/vendor/assets/bower_components/angular-material/modules/js/switch/switch.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/switch/switch.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/tabs/bower.json +8 -0
- data/vendor/assets/bower_components/angular-material/modules/js/tabs/tabs-default-theme.css +82 -0
- data/vendor/assets/bower_components/angular-material/modules/js/tabs/tabs-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/tabs/tabs.css +274 -0
- data/vendor/assets/bower_components/angular-material/modules/js/tabs/tabs.js +1060 -0
- data/vendor/assets/bower_components/angular-material/modules/js/tabs/tabs.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/tabs/tabs.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/textField/bower.json +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/textField/textField-default-theme.css +30 -0
- data/vendor/assets/bower_components/angular-material/modules/js/textField/textField-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/textField/textField.css +111 -0
- data/vendor/assets/bower_components/angular-material/modules/js/textField/textField.js +143 -0
- data/vendor/assets/bower_components/angular-material/modules/js/textField/textField.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/textField/textField.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/toast/bower.json +8 -0
- data/vendor/assets/bower_components/angular-material/modules/js/toast/toast-default-theme.css +18 -0
- data/vendor/assets/bower_components/angular-material/modules/js/toast/toast-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/toast/toast.css +119 -0
- data/vendor/assets/bower_components/angular-material/modules/js/toast/toast.js +265 -0
- data/vendor/assets/bower_components/angular-material/modules/js/toast/toast.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/toast/toast.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/toolbar/bower.json +8 -0
- data/vendor/assets/bower_components/angular-material/modules/js/toolbar/toolbar-default-theme.css +20 -0
- data/vendor/assets/bower_components/angular-material/modules/js/toolbar/toolbar-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/toolbar/toolbar.css +83 -0
- data/vendor/assets/bower_components/angular-material/modules/js/toolbar/toolbar.js +169 -0
- data/vendor/assets/bower_components/angular-material/modules/js/toolbar/toolbar.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/toolbar/toolbar.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/tooltip/bower.json +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/tooltip/tooltip-default-theme.css +11 -0
- data/vendor/assets/bower_components/angular-material/modules/js/tooltip/tooltip-default-theme.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/tooltip/tooltip.css +72 -0
- data/vendor/assets/bower_components/angular-material/modules/js/tooltip/tooltip.js +268 -0
- data/vendor/assets/bower_components/angular-material/modules/js/tooltip/tooltip.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/tooltip/tooltip.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/modules/js/whiteframe/bower.json +5 -0
- data/vendor/assets/bower_components/angular-material/modules/js/whiteframe/whiteframe.css +25 -0
- data/vendor/assets/bower_components/angular-material/modules/js/whiteframe/whiteframe.js +16 -0
- data/vendor/assets/bower_components/angular-material/modules/js/whiteframe/whiteframe.min.css +6 -0
- data/vendor/assets/bower_components/angular-material/modules/js/whiteframe/whiteframe.min.js +7 -0
- data/vendor/assets/bower_components/angular-material/package.json +48 -0
- data/vendor/assets/bower_components/angular/README.md +64 -0
- data/vendor/assets/bower_components/angular/angular-csp.css +21 -0
- data/vendor/assets/bower_components/angular/angular.js +28364 -0
- data/vendor/assets/bower_components/angular/angular.min.js +290 -0
- data/vendor/assets/bower_components/angular/angular.min.js.gzip +0 -0
- data/vendor/assets/bower_components/angular/angular.min.js.map +8 -0
- data/vendor/assets/bower_components/angular/bower.json +8 -0
- data/vendor/assets/bower_components/angular/index.js +2 -0
- data/vendor/assets/bower_components/angular/package.json +25 -0
- data/vendor/assets/bower_components/lodash/LICENSE +22 -0
- data/vendor/assets/bower_components/lodash/bower.json +19 -0
- data/vendor/assets/bower_components/lodash/lodash.js +12351 -0
- data/vendor/assets/bower_components/lodash/lodash.min.js +99 -0
- data/vendor/assets/bower_components/restangular/CHANGELOG.md +18 -0
- data/vendor/assets/bower_components/restangular/CONTRIBUTE.md +31 -0
- data/vendor/assets/bower_components/restangular/Gruntfile.js +149 -0
- data/vendor/assets/bower_components/restangular/README.md +1336 -0
- data/vendor/assets/bower_components/restangular/bower.json +19 -0
- data/vendor/assets/bower_components/restangular/dist/restangular.js +1355 -0
- data/vendor/assets/bower_components/restangular/dist/restangular.min.js +6 -0
- data/vendor/assets/bower_components/restangular/dist/restangular.zip +0 -0
- data/vendor/assets/bower_components/restangular/karma.conf.js +74 -0
- data/vendor/assets/bower_components/restangular/karma.underscore.conf.js +74 -0
- data/vendor/assets/bower_components/restangular/license.md +21 -0
- data/vendor/assets/bower_components/restangular/package.json +55 -0
- data/vendor/assets/bower_components/restangular/src/restangular.js +1350 -0
- data/vendor/assets/bower_components/restangular/test/restangularSpec.js +1136 -0
- metadata +424 -1
@@ -0,0 +1,121 @@
|
|
1
|
+
/*!
|
2
|
+
* Angular Material Design
|
3
|
+
* https://github.com/angular/material
|
4
|
+
* @license MIT
|
5
|
+
* v0.10.0
|
6
|
+
*/
|
7
|
+
/* mixin definition ; sets LTR and RTL within the same style call */
|
8
|
+
.md-open-menu-container {
|
9
|
+
position: fixed;
|
10
|
+
left: 0;
|
11
|
+
top: 0;
|
12
|
+
z-index: 99;
|
13
|
+
opacity: 0; }
|
14
|
+
.md-open-menu-container md-menu-divider {
|
15
|
+
margin-top: 4px;
|
16
|
+
margin-bottom: 4px;
|
17
|
+
height: 1px;
|
18
|
+
width: 100%; }
|
19
|
+
.md-open-menu-container md-menu-content > * {
|
20
|
+
opacity: 0; }
|
21
|
+
.md-open-menu-container:not(.md-clickable) {
|
22
|
+
pointer-events: none; }
|
23
|
+
.md-open-menu-container.md-active {
|
24
|
+
opacity: 1;
|
25
|
+
transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
|
26
|
+
transition-duration: 200ms; }
|
27
|
+
.md-open-menu-container.md-active > md-menu-content > * {
|
28
|
+
opacity: 1;
|
29
|
+
transition: all 0.3s cubic-bezier(0.55, 0, 0.55, 0.2);
|
30
|
+
transition-duration: 200ms;
|
31
|
+
transition-delay: 100ms; }
|
32
|
+
.md-open-menu-container.md-leave {
|
33
|
+
opacity: 0;
|
34
|
+
transition: all 0.3s cubic-bezier(0.55, 0, 0.55, 0.2);
|
35
|
+
transition-duration: 250ms; }
|
36
|
+
|
37
|
+
md-menu-content {
|
38
|
+
display: -webkit-flex;
|
39
|
+
display: -ms-flexbox;
|
40
|
+
display: flex;
|
41
|
+
-webkit-flex-direction: column;
|
42
|
+
-ms-flex-direction: column;
|
43
|
+
flex-direction: column;
|
44
|
+
padding: 8px 0; }
|
45
|
+
md-menu-content.md-dense md-menu-item {
|
46
|
+
height: 32px; }
|
47
|
+
|
48
|
+
md-menu-item {
|
49
|
+
display: -webkit-flex;
|
50
|
+
display: -ms-flexbox;
|
51
|
+
display: flex;
|
52
|
+
-webkit-flex-direction: row;
|
53
|
+
-ms-flex-direction: row;
|
54
|
+
flex-direction: row;
|
55
|
+
height: 48px;
|
56
|
+
-webkit-align-content: center;
|
57
|
+
-ms-flex-line-pack: center;
|
58
|
+
align-content: center;
|
59
|
+
-webkit-justify-content: flex-start;
|
60
|
+
-ms-flex-pack: start;
|
61
|
+
justify-content: flex-start; }
|
62
|
+
md-menu-item > * {
|
63
|
+
width: 100%;
|
64
|
+
margin: auto 0;
|
65
|
+
padding-left: 16px;
|
66
|
+
padding-right: 16px; }
|
67
|
+
md-menu-item > .md-button {
|
68
|
+
border-radius: 0;
|
69
|
+
margin: auto 0;
|
70
|
+
font-size: 15px;
|
71
|
+
text-transform: none;
|
72
|
+
font-weight: 400;
|
73
|
+
text-align: start;
|
74
|
+
height: 100%;
|
75
|
+
padding-left: 16px;
|
76
|
+
padding-right: 16px;
|
77
|
+
display: -webkit-flex;
|
78
|
+
display: -ms-flexbox;
|
79
|
+
display: flex; }
|
80
|
+
md-menu-item > .md-button md-icon {
|
81
|
+
margin: auto 16px auto 0; }
|
82
|
+
md-menu-item > .md-button p {
|
83
|
+
margin: auto;
|
84
|
+
-webkit-flex: 1;
|
85
|
+
-ms-flex: 1;
|
86
|
+
flex: 1; }
|
87
|
+
|
88
|
+
.md-menu {
|
89
|
+
padding: 8px 0; }
|
90
|
+
|
91
|
+
md-toolbar .md-menu {
|
92
|
+
height: auto;
|
93
|
+
margin: auto; }
|
94
|
+
|
95
|
+
@media (max-width: 599px) {
|
96
|
+
md-menu-content {
|
97
|
+
min-width: 112px; }
|
98
|
+
md-menu-content[width="3"] {
|
99
|
+
min-width: 168px; }
|
100
|
+
md-menu-content[width="4"] {
|
101
|
+
min-width: 224px; }
|
102
|
+
md-menu-content[width="5"] {
|
103
|
+
min-width: 280px; }
|
104
|
+
md-menu-content[width="6"] {
|
105
|
+
min-width: 336px; }
|
106
|
+
md-menu-content[width="7"] {
|
107
|
+
min-width: 392px; } }
|
108
|
+
|
109
|
+
@media (min-width: 600px) {
|
110
|
+
md-menu-content {
|
111
|
+
min-width: 96px; }
|
112
|
+
md-menu-content[width="3"] {
|
113
|
+
min-width: 192px; }
|
114
|
+
md-menu-content[width="4"] {
|
115
|
+
min-width: 256px; }
|
116
|
+
md-menu-content[width="5"] {
|
117
|
+
min-width: 320px; }
|
118
|
+
md-menu-content[width="6"] {
|
119
|
+
min-width: 384px; }
|
120
|
+
md-menu-content[width="7"] {
|
121
|
+
min-width: 448px; } }
|
@@ -0,0 +1,620 @@
|
|
1
|
+
/*!
|
2
|
+
* Angular Material Design
|
3
|
+
* https://github.com/angular/material
|
4
|
+
* @license MIT
|
5
|
+
* v0.10.0
|
6
|
+
*/
|
7
|
+
goog.provide('ng.material.components.menu');
|
8
|
+
goog.require('ng.material.components.backdrop');
|
9
|
+
goog.require('ng.material.core');
|
10
|
+
/**
|
11
|
+
* @ngdoc module
|
12
|
+
* @name material.components.menu
|
13
|
+
*/
|
14
|
+
|
15
|
+
angular.module('material.components.menu', [
|
16
|
+
'material.core',
|
17
|
+
'material.components.backdrop'
|
18
|
+
])
|
19
|
+
.directive('mdMenu', MenuDirective)
|
20
|
+
.controller('mdMenuCtrl', MenuController);
|
21
|
+
|
22
|
+
/**
|
23
|
+
* @ngdoc directive
|
24
|
+
* @name mdMenu
|
25
|
+
* @module material.components.menu
|
26
|
+
* @restrict E
|
27
|
+
* @description
|
28
|
+
*
|
29
|
+
* Menus are elements that open when clicked. They are useful for displaying
|
30
|
+
* additional options within the context of an action.
|
31
|
+
*
|
32
|
+
* Every `md-menu` must specify exactly two child elements. The first element is what is
|
33
|
+
* left in the DOM and is used to open the menu. This element is called the trigger element.
|
34
|
+
* The trigger element's scope has access to `$mdOpenMenu()`
|
35
|
+
* which it may call to open the menu.
|
36
|
+
*
|
37
|
+
* The second element is the `md-menu-content` element which represents the
|
38
|
+
* contents of the menu when it is open. Typically this will contain `md-menu-item`s,
|
39
|
+
* but you can do custom content as well.
|
40
|
+
*
|
41
|
+
* <hljs lang="html">
|
42
|
+
* <md-menu>
|
43
|
+
* <!-- Trigger element is a md-button with an icon -->
|
44
|
+
* <md-button ng-click="$mdOpenMenu()" class="md-icon-button" aria-label="Open sample menu">
|
45
|
+
* <md-icon md-svg-icon="call:phone"></md-icon>
|
46
|
+
* </md-button>
|
47
|
+
* <md-menu-content>
|
48
|
+
* <md-menu-item><md-button ng-click="doSomething()">Do Something</md-button></md-menu-item>
|
49
|
+
* </md-menu-content>
|
50
|
+
* </md-menu>
|
51
|
+
* </hljs>
|
52
|
+
|
53
|
+
* ## Sizing Menus
|
54
|
+
*
|
55
|
+
* The width of the menu when it is open may be specified by specifying a `width`
|
56
|
+
* attribute on the `md-menu-content` element.
|
57
|
+
* See the [Material Design Spec](http://www.google.com/design/spec/components/menus.html#menus-specs)
|
58
|
+
* for more information.
|
59
|
+
*
|
60
|
+
*
|
61
|
+
* ## Aligning Menus
|
62
|
+
*
|
63
|
+
* When a menu opens, it is important that the content aligns with the trigger element.
|
64
|
+
* Failure to align menus can result in jarring experiences for users as content
|
65
|
+
* suddenly shifts. To help with this, `md-menu` provides serveral APIs to help
|
66
|
+
* with alignment.
|
67
|
+
*
|
68
|
+
* ### Target Mode
|
69
|
+
*
|
70
|
+
* By default, `md-menu` will attempt to align the `md-menu-content` by aligning
|
71
|
+
* designated child elements in both the trigger and the menu content.
|
72
|
+
*
|
73
|
+
* To specify the alignment element in the `trigger` you can use the `md-menu-origin`
|
74
|
+
* attribute on a child element. If no `md-menu-origin` is specified, the `md-menu`
|
75
|
+
* will be used as the origin element.
|
76
|
+
*
|
77
|
+
* Similarly, the `md-menu-content` may specify a `md-menu-align-target` for a
|
78
|
+
* `md-menu-item` to specify the node that it should try and align with.
|
79
|
+
*
|
80
|
+
* In this example code, we specify an icon to be our origin element, and an
|
81
|
+
* icon in our menu content to be our alignment target. This ensures that both
|
82
|
+
* icons are aligned when the menu opens.
|
83
|
+
*
|
84
|
+
* <hljs lang="html">
|
85
|
+
* <md-menu>
|
86
|
+
* <md-button ng-click="$mdOpenMenu()" class="md-icon-button" aria-label="Open some menu">
|
87
|
+
* <md-icon md-menu-origin md-svg-icon="call:phone"></md-icon>
|
88
|
+
* </md-button>
|
89
|
+
* <md-menu-content>
|
90
|
+
* <md-menu-item>
|
91
|
+
* <md-button ng-click="doSomething()" aria-label="Do something">
|
92
|
+
* <md-icon md-menu-align-target md-svg-icon="call:phone"></md-icon>
|
93
|
+
* Do Something
|
94
|
+
* </md-button>
|
95
|
+
* </md-menu-item>
|
96
|
+
* </md-menu-content>
|
97
|
+
* </md-menu>
|
98
|
+
* </hljs>
|
99
|
+
*
|
100
|
+
* Sometimes we want to specify alignment on the right side of an element, for example
|
101
|
+
* if we have a menu on the right side a toolbar, we want to right align our menu content.
|
102
|
+
*
|
103
|
+
* We can specify the origin by using the `md-position-mode` attribute on both
|
104
|
+
* the `x` and `y` axis. Right now only the `x-axis` has more than one option.
|
105
|
+
* You may specify the default mode of `target target` or
|
106
|
+
* `target-right target` to specify a right-oriented alignment target. See the
|
107
|
+
* position section of the demos for more examples.
|
108
|
+
*
|
109
|
+
* ### Menu Offsets
|
110
|
+
*
|
111
|
+
* It is sometimes unavoidable to need to have a deeper level of control for
|
112
|
+
* the positioning of a menu to ensure perfect alignment. `md-menu` provides
|
113
|
+
* the `md-offset` attribute to allow pixel level specificty of adjusting the
|
114
|
+
* exact positioning.
|
115
|
+
*
|
116
|
+
* This offset is provided in the format of `x y` or `n` where `n` will be used
|
117
|
+
* in both the `x` and `y` axis.
|
118
|
+
*
|
119
|
+
* For example, to move a menu by `2px` from the top, we can use:
|
120
|
+
* <hljs lang="html">
|
121
|
+
* <md-menu md-offset="2 0">
|
122
|
+
* <!-- menu-content -->
|
123
|
+
* </md-menu>
|
124
|
+
* </hljs>
|
125
|
+
*
|
126
|
+
* @usage
|
127
|
+
* <hljs lang="html">
|
128
|
+
* <md-menu>
|
129
|
+
* <md-button ng-click="$mdOpenMenu()" class="md-icon-button">
|
130
|
+
* <md-icon md-svg-icon="call:phone"></md-icon>
|
131
|
+
* </md-button>
|
132
|
+
* <md-menu-content>
|
133
|
+
* <md-menu-item><md-button ng-click="doSomething()">Do Something</md-button></md-menu-item>
|
134
|
+
* </md-menu-content>
|
135
|
+
* </md-menu>
|
136
|
+
* </hljs>
|
137
|
+
*
|
138
|
+
* @param {string} md-position-mode The position mode in the form of
|
139
|
+
`x`, `y`. Default value is `target`,`target`. Right now the `x` axis
|
140
|
+
also suppports `target-right`.
|
141
|
+
* @param {string} md-offset An offset to apply to the dropdown after positioning
|
142
|
+
`x`, `y`. Default value is `0`,`0`.
|
143
|
+
*
|
144
|
+
*/
|
145
|
+
|
146
|
+
function MenuDirective($mdMenu) {
|
147
|
+
return {
|
148
|
+
restrict: 'E',
|
149
|
+
require: 'mdMenu',
|
150
|
+
controller: 'mdMenuCtrl', // empty function to be built by link
|
151
|
+
scope: true,
|
152
|
+
compile: compile
|
153
|
+
};
|
154
|
+
|
155
|
+
function compile(templateElement) {
|
156
|
+
templateElement.addClass('md-menu');
|
157
|
+
var triggerElement = templateElement.children()[0];
|
158
|
+
if (!triggerElement.hasAttribute('ng-click')) {
|
159
|
+
triggerElement = triggerElement.querySelector('[ng-click]');
|
160
|
+
}
|
161
|
+
triggerElement && triggerElement.setAttribute('aria-haspopup', 'true');
|
162
|
+
if (templateElement.children().length != 2) {
|
163
|
+
throw Error('Invalid HTML for md-menu. Expected two children elements.');
|
164
|
+
}
|
165
|
+
return link;
|
166
|
+
}
|
167
|
+
|
168
|
+
function link(scope, element, attrs, mdMenuCtrl) {
|
169
|
+
|
170
|
+
// Move everything into a md-menu-container and pass it to the controller
|
171
|
+
var menuContainer = angular.element(
|
172
|
+
'<div class="md-open-menu-container md-whiteframe-z2"></div>'
|
173
|
+
);
|
174
|
+
var menuContents = element.children()[1];
|
175
|
+
menuContainer.append(menuContents);
|
176
|
+
mdMenuCtrl.init(menuContainer);
|
177
|
+
|
178
|
+
scope.$on('$destroy', function() {
|
179
|
+
if (mdMenuCtrl.isOpen) {
|
180
|
+
menuContainer.remove();
|
181
|
+
mdMenuCtrl.close();
|
182
|
+
}
|
183
|
+
});
|
184
|
+
|
185
|
+
}
|
186
|
+
}
|
187
|
+
MenuDirective.$inject = ["$mdMenu"];
|
188
|
+
|
189
|
+
function MenuController($mdMenu, $attrs, $element, $scope) {
|
190
|
+
|
191
|
+
var menuContainer;
|
192
|
+
var ctrl = this;
|
193
|
+
var triggerElement;
|
194
|
+
|
195
|
+
// Called by our linking fn to provide access to the menu-content
|
196
|
+
// element removed during link
|
197
|
+
this.init = function(setMenuContainer) {
|
198
|
+
menuContainer = setMenuContainer;
|
199
|
+
triggerElement = $element[0].querySelector('[ng-click]');
|
200
|
+
};
|
201
|
+
|
202
|
+
// Uses the $mdMenu interim element service to open the menu contents
|
203
|
+
this.open = function openMenu() {
|
204
|
+
ctrl.isOpen = true;
|
205
|
+
triggerElement.setAttribute('aria-expanded', 'true');
|
206
|
+
$mdMenu.show({
|
207
|
+
mdMenuCtrl: ctrl,
|
208
|
+
element: menuContainer,
|
209
|
+
target: $element[0]
|
210
|
+
});
|
211
|
+
};
|
212
|
+
// Expose a open function to the child scope for html to use
|
213
|
+
$scope.$mdOpenMenu = this.open;
|
214
|
+
|
215
|
+
// Use the $mdMenu interim element service to close the menu contents
|
216
|
+
this.close = function closeMenu(skipFocus) {
|
217
|
+
ctrl.isOpen = false;
|
218
|
+
triggerElement.setAttribute('aria-expanded', 'false');
|
219
|
+
$mdMenu.hide();
|
220
|
+
|
221
|
+
if (!skipFocus) {
|
222
|
+
$element.children()[0].focus();
|
223
|
+
}
|
224
|
+
};
|
225
|
+
|
226
|
+
// Build a nice object out of our string attribute which specifies the
|
227
|
+
// target mode for left and top positioning
|
228
|
+
this.positionMode = function() {
|
229
|
+
var attachment = ($attrs.mdPositionMode || 'target').split(' ');
|
230
|
+
|
231
|
+
// If attachment is a single item, duplicate it for our second value.
|
232
|
+
// ie. 'target' -> 'target target'
|
233
|
+
if (attachment.length == 1) {
|
234
|
+
attachment.push(attachment[0]);
|
235
|
+
}
|
236
|
+
|
237
|
+
return {
|
238
|
+
left: attachment[0],
|
239
|
+
top: attachment[1]
|
240
|
+
};
|
241
|
+
};
|
242
|
+
|
243
|
+
// Build a nice object out of our string attribute which specifies
|
244
|
+
// the offset of top and left in pixels.
|
245
|
+
this.offsets = function() {
|
246
|
+
var offsets = ($attrs.mdOffset || '0 0').split(' ').map(parseFloat);
|
247
|
+
if (offsets.length == 2) {
|
248
|
+
return {
|
249
|
+
left: offsets[0],
|
250
|
+
top: offsets[1]
|
251
|
+
};
|
252
|
+
} else if (offsets.length == 1) {
|
253
|
+
return {
|
254
|
+
top: offsets[0],
|
255
|
+
left: offsets[0]
|
256
|
+
};
|
257
|
+
} else {
|
258
|
+
throw Error('Invalid offsets specified. Please follow format <x, y> or <n>');
|
259
|
+
}
|
260
|
+
};
|
261
|
+
}
|
262
|
+
MenuController.$inject = ["$mdMenu", "$attrs", "$element", "$scope"];
|
263
|
+
|
264
|
+
angular.module('material.components.menu')
|
265
|
+
.provider('$mdMenu', MenuProvider);
|
266
|
+
|
267
|
+
/*
|
268
|
+
* Interim element provider for the menu.
|
269
|
+
* Handles behavior for a menu while it is open, including:
|
270
|
+
* - handling animating the menu opening/closing
|
271
|
+
* - handling key/mouse events on the menu element
|
272
|
+
* - handling enabling/disabling scroll while the menu is open
|
273
|
+
* - handling redrawing during resizes and orientation changes
|
274
|
+
*
|
275
|
+
*/
|
276
|
+
|
277
|
+
function MenuProvider($$interimElementProvider) {
|
278
|
+
var MENU_EDGE_MARGIN = 8;
|
279
|
+
|
280
|
+
menuDefaultOptions.$inject = ["$$rAF", "$window", "$mdUtil", "$mdTheming", "$timeout", "$mdConstant", "$document"];
|
281
|
+
return $$interimElementProvider('$mdMenu')
|
282
|
+
.setDefaults({
|
283
|
+
methods: ['target'],
|
284
|
+
options: menuDefaultOptions
|
285
|
+
});
|
286
|
+
|
287
|
+
/* ngInject */
|
288
|
+
function menuDefaultOptions($$rAF, $window, $mdUtil, $mdTheming, $timeout, $mdConstant, $document) {
|
289
|
+
return {
|
290
|
+
parent: 'body',
|
291
|
+
onShow: onShow,
|
292
|
+
onRemove: onRemove,
|
293
|
+
hasBackdrop: true,
|
294
|
+
disableParentScroll: true,
|
295
|
+
skipCompile: true,
|
296
|
+
themable: true
|
297
|
+
};
|
298
|
+
|
299
|
+
/**
|
300
|
+
* Boilerplate interimElement onShow function
|
301
|
+
* Handles inserting the menu into the DOM, positioning it, and wiring up
|
302
|
+
* various interaction events
|
303
|
+
*/
|
304
|
+
function onShow(scope, element, opts) {
|
305
|
+
|
306
|
+
// Sanitize and set defaults on opts
|
307
|
+
buildOpts(opts);
|
308
|
+
|
309
|
+
// Wire up theming on our menu element
|
310
|
+
$mdTheming.inherit(opts.menuContentEl, opts.target);
|
311
|
+
|
312
|
+
// Register various listeners to move menu on resize/orientation change
|
313
|
+
handleResizing();
|
314
|
+
|
315
|
+
// Disable scrolling
|
316
|
+
if (opts.disableParentScroll) {
|
317
|
+
opts.restoreScroll = $mdUtil.disableScrollAround(opts.element);
|
318
|
+
}
|
319
|
+
|
320
|
+
// Only activate click listeners after a short time to stop accidental double taps/clicks
|
321
|
+
// from clicking the wrong item
|
322
|
+
$timeout(activateInteraction, 75, false);
|
323
|
+
|
324
|
+
if (opts.backdrop) {
|
325
|
+
$mdTheming.inherit(opts.backdrop, opts.parent);
|
326
|
+
opts.parent.append(opts.backdrop);
|
327
|
+
}
|
328
|
+
showMenu();
|
329
|
+
|
330
|
+
// Return the promise for when our menu is done animating in
|
331
|
+
return $mdUtil.transitionEndPromise(element, {timeout: 350});
|
332
|
+
|
333
|
+
/** Check for valid opts and set some sane defaults */
|
334
|
+
function buildOpts() {
|
335
|
+
if (!opts.target) {
|
336
|
+
throw Error(
|
337
|
+
'$mdMenu.show() expected a target to animate from in options.target'
|
338
|
+
);
|
339
|
+
}
|
340
|
+
angular.extend(opts, {
|
341
|
+
alreadyOpen: false,
|
342
|
+
isRemoved: false,
|
343
|
+
target: angular.element(opts.target), //make sure it's not a naked dom node
|
344
|
+
parent: angular.element(opts.parent),
|
345
|
+
menuContentEl: angular.element(element[0].querySelector('md-menu-content')),
|
346
|
+
backdrop: opts.hasBackdrop && angular.element('<md-backdrop class="md-menu-backdrop md-click-catcher">')
|
347
|
+
});
|
348
|
+
}
|
349
|
+
|
350
|
+
/** Wireup various resize listeners for screen changes */
|
351
|
+
function handleResizing() {
|
352
|
+
opts.resizeFn = function() {
|
353
|
+
positionMenu(element, opts);
|
354
|
+
};
|
355
|
+
angular.element($window).on('resize', opts.resizeFn);
|
356
|
+
angular.element($window).on('orientationchange', opts.resizeFn);
|
357
|
+
}
|
358
|
+
|
359
|
+
/**
|
360
|
+
* Place the menu into the DOM and call positioning related functions
|
361
|
+
*/
|
362
|
+
function showMenu() {
|
363
|
+
opts.parent.append(element);
|
364
|
+
|
365
|
+
element.removeClass('md-leave');
|
366
|
+
// Kick off our animation/positioning but first, wait a few frames
|
367
|
+
// so all of our computed positions/sizes are accurate
|
368
|
+
$$rAF(function() {
|
369
|
+
$$rAF(function() {
|
370
|
+
positionMenu(element, opts);
|
371
|
+
// Wait a frame before fading in menu (md-active) so that we don't trigger
|
372
|
+
// transitions on the menu position changing
|
373
|
+
$$rAF(function() {
|
374
|
+
element.addClass('md-active');
|
375
|
+
opts.alreadyOpen = true;
|
376
|
+
element[0].style[$mdConstant.CSS.TRANSFORM] = '';
|
377
|
+
});
|
378
|
+
});
|
379
|
+
});
|
380
|
+
}
|
381
|
+
|
382
|
+
|
383
|
+
/**
|
384
|
+
* Activate interaction on the menu. Wire up keyboard listerns for
|
385
|
+
* clicks, keypresses, backdrop closing, etc.
|
386
|
+
*/
|
387
|
+
function activateInteraction() {
|
388
|
+
element.addClass('md-clickable');
|
389
|
+
|
390
|
+
// close on backdrop click
|
391
|
+
opts.backdrop && opts.backdrop.on('click', function(e) {
|
392
|
+
e.preventDefault();
|
393
|
+
e.stopPropagation();
|
394
|
+
opts.mdMenuCtrl.close(true);
|
395
|
+
});
|
396
|
+
|
397
|
+
// Wire up keyboard listeners.
|
398
|
+
// Close on escape, focus next item on down arrow, focus prev item on up
|
399
|
+
opts.menuContentEl.on('keydown', function(ev) {
|
400
|
+
scope.$apply(function() {
|
401
|
+
switch (ev.keyCode) {
|
402
|
+
case $mdConstant.KEY_CODE.ESCAPE: opts.mdMenuCtrl.close(); break;
|
403
|
+
case $mdConstant.KEY_CODE.UP_ARROW: focusMenuItem(ev, opts.menuContentEl, opts, -1); break;
|
404
|
+
case $mdConstant.KEY_CODE.DOWN_ARROW: focusMenuItem(ev, opts.menuContentEl, opts, 1); break;
|
405
|
+
}
|
406
|
+
});
|
407
|
+
});
|
408
|
+
|
409
|
+
// Close menu on menu item click, if said menu-item is not disabled
|
410
|
+
opts.menuContentEl.on('click', function(e) {
|
411
|
+
var target = e.target;
|
412
|
+
// Traverse up the event until we get to the menuContentEl to see if
|
413
|
+
// there is an ng-click and that the ng-click is not disabled
|
414
|
+
do {
|
415
|
+
if (target && target.hasAttribute('ng-click')) {
|
416
|
+
if (!target.hasAttribute('disabled')) {
|
417
|
+
close();
|
418
|
+
}
|
419
|
+
break;
|
420
|
+
}
|
421
|
+
} while ((target = target.parentNode) && target != opts.menuContentEl)
|
422
|
+
|
423
|
+
function close() {
|
424
|
+
scope.$apply(function() {
|
425
|
+
opts.mdMenuCtrl.close();
|
426
|
+
});
|
427
|
+
}
|
428
|
+
});
|
429
|
+
|
430
|
+
// kick off initial focus in the menu on the first element
|
431
|
+
var focusTarget = opts.menuContentEl[0].querySelector('[md-menu-focus-target]');
|
432
|
+
if (!focusTarget) focusTarget = opts.menuContentEl[0].firstElementChild.firstElementChild;
|
433
|
+
focusTarget.focus();
|
434
|
+
}
|
435
|
+
}
|
436
|
+
|
437
|
+
/**
|
438
|
+
* Takes a keypress event and focuses the next/previous menu
|
439
|
+
* item from the emitting element
|
440
|
+
* @param {event} e - The origin keypress event
|
441
|
+
* @param {angular.element} menuEl - The menu element
|
442
|
+
* @param {object} opts - The interim element options for the mdMenu
|
443
|
+
* @param {number} direction - The direction to move in (+1 = next, -1 = prev)
|
444
|
+
*/
|
445
|
+
function focusMenuItem(e, menuEl, opts, direction) {
|
446
|
+
var currentItem = $mdUtil.getClosest(e.target, 'MD-MENU-ITEM');
|
447
|
+
|
448
|
+
var items = $mdUtil.nodesToArray(menuEl[0].children);
|
449
|
+
var currentIndex = items.indexOf(currentItem);
|
450
|
+
|
451
|
+
// Traverse through our elements in the specified direction (+/-1) and try to
|
452
|
+
// focus them until we find one that accepts focus
|
453
|
+
for (var i = currentIndex + direction; i >= 0 && i < items.length; i = i + direction) {
|
454
|
+
var focusTarget = items[i].firstElementChild || items[i];
|
455
|
+
var didFocus = attemptFocus(focusTarget);
|
456
|
+
if (didFocus) {
|
457
|
+
break;
|
458
|
+
}
|
459
|
+
}
|
460
|
+
}
|
461
|
+
|
462
|
+
/**
|
463
|
+
* Attempts to focus an element. Checks whether that element is the currently
|
464
|
+
* focused element after attempting.
|
465
|
+
* @param {HTMLElement} el - the element to attempt focus on
|
466
|
+
* @returns {bool} - whether the element was successfully focused
|
467
|
+
*/
|
468
|
+
function attemptFocus(el) {
|
469
|
+
if (el && el.getAttribute('tabindex') != -1) {
|
470
|
+
el.focus();
|
471
|
+
if ($document[0].activeElement == el) {
|
472
|
+
return true;
|
473
|
+
} else {
|
474
|
+
return false;
|
475
|
+
}
|
476
|
+
}
|
477
|
+
}
|
478
|
+
|
479
|
+
/**
|
480
|
+
* Boilerplate interimElement onRemove function
|
481
|
+
* Handles removing the menu from the DOM, cleaning up the element
|
482
|
+
* and removing various listeners
|
483
|
+
*/
|
484
|
+
function onRemove(scope, element, opts) {
|
485
|
+
opts.isRemoved = true;
|
486
|
+
element.addClass('md-leave')
|
487
|
+
.removeClass('md-clickable');
|
488
|
+
|
489
|
+
// Disable resizing handlers
|
490
|
+
angular.element($window).off('resize', opts.resizeFn);
|
491
|
+
angular.element($window).off('orientationchange', opts.resizeFn);
|
492
|
+
opts.resizeFn = undefined;
|
493
|
+
|
494
|
+
// Wait for animate out, then remove from the DOM
|
495
|
+
return $mdUtil.transitionEndPromise(element, { timeout: 350 }).then(function() {
|
496
|
+
element.removeClass('md-active');
|
497
|
+
opts.backdrop && opts.backdrop.remove();
|
498
|
+
if (element[0].parentNode === opts.parent[0]) {
|
499
|
+
opts.parent[0].removeChild(element[0]);
|
500
|
+
}
|
501
|
+
opts.restoreScroll && opts.restoreScroll();
|
502
|
+
});
|
503
|
+
}
|
504
|
+
|
505
|
+
/**
|
506
|
+
* Computes menu position and sets the style on the menu container
|
507
|
+
* @param {HTMLElement} el - the menu container element
|
508
|
+
* @param {object} opts - the interim element options object
|
509
|
+
*/
|
510
|
+
function positionMenu(el, opts) {
|
511
|
+
if (opts.isRemoved) return;
|
512
|
+
|
513
|
+
var containerNode = el[0],
|
514
|
+
openMenuNode = el[0].firstElementChild,
|
515
|
+
openMenuNodeRect = openMenuNode.getBoundingClientRect(),
|
516
|
+
boundryNode = opts.parent[0],
|
517
|
+
boundryNodeRect = boundryNode.getBoundingClientRect();
|
518
|
+
|
519
|
+
var originNode = opts.target[0].querySelector('[md-menu-origin]') || opts.target[0],
|
520
|
+
originNodeRect = originNode.getBoundingClientRect();
|
521
|
+
|
522
|
+
|
523
|
+
var bounds = {
|
524
|
+
left: boundryNodeRect.left + MENU_EDGE_MARGIN,
|
525
|
+
top: boundryNodeRect.top + MENU_EDGE_MARGIN,
|
526
|
+
bottom: boundryNodeRect.bottom - MENU_EDGE_MARGIN,
|
527
|
+
right: boundryNodeRect.right - MENU_EDGE_MARGIN
|
528
|
+
};
|
529
|
+
|
530
|
+
|
531
|
+
var alignTarget, alignTargetRect, existingOffsets;
|
532
|
+
var positionMode = opts.mdMenuCtrl.positionMode();
|
533
|
+
|
534
|
+
if (positionMode.top == 'target' || positionMode.left == 'target' || positionMode.left == 'target-right') {
|
535
|
+
// TODO: Allow centering on an arbitrary node, for now center on first menu-item's child
|
536
|
+
alignTarget = openMenuNode.firstElementChild.firstElementChild || openMenuNode.firstElementChild;
|
537
|
+
alignTarget = alignTarget.querySelector('[md-menu-align-target]') || alignTarget;
|
538
|
+
alignTargetRect = alignTarget.getBoundingClientRect();
|
539
|
+
|
540
|
+
existingOffsets = {
|
541
|
+
top: parseFloat(containerNode.style.top || 0),
|
542
|
+
left: parseFloat(containerNode.style.left || 0)
|
543
|
+
};
|
544
|
+
}
|
545
|
+
|
546
|
+
var position = { };
|
547
|
+
var transformOrigin = 'top ';
|
548
|
+
|
549
|
+
switch (positionMode.top) {
|
550
|
+
case 'target':
|
551
|
+
position.top = existingOffsets.top + originNodeRect.top - alignTargetRect.top;
|
552
|
+
break;
|
553
|
+
// Future support for mdMenuBar
|
554
|
+
// case 'top':
|
555
|
+
// position.top = originNodeRect.top;
|
556
|
+
// break;
|
557
|
+
// case 'bottom':
|
558
|
+
// position.top = originNodeRect.top + originNodeRect.height;
|
559
|
+
// break;
|
560
|
+
default:
|
561
|
+
throw new Error('Invalid target mode "' + positionMode.top + '" specified for md-menu on Y axis.');
|
562
|
+
}
|
563
|
+
|
564
|
+
switch (positionMode.left) {
|
565
|
+
case 'target':
|
566
|
+
position.left = existingOffsets.left + originNodeRect.left - alignTargetRect.left;
|
567
|
+
transformOrigin += 'left';
|
568
|
+
break;
|
569
|
+
case 'target-right':
|
570
|
+
position.left = originNodeRect.right - openMenuNodeRect.width + (openMenuNodeRect.right - alignTargetRect.right);
|
571
|
+
transformOrigin += 'right';
|
572
|
+
break;
|
573
|
+
// Future support for mdMenuBar
|
574
|
+
// case 'left':
|
575
|
+
// position.left = originNodeRect.left;
|
576
|
+
// transformOrigin += 'left';
|
577
|
+
// break;
|
578
|
+
// case 'right':
|
579
|
+
// position.left = originNodeRect.right - containerNode.offsetWidth;
|
580
|
+
// transformOrigin += 'right';
|
581
|
+
// break;
|
582
|
+
default:
|
583
|
+
throw new Error('Invalid target mode "' + positionMode.left + '" specified for md-menu on X axis.');
|
584
|
+
}
|
585
|
+
|
586
|
+
var offsets = opts.mdMenuCtrl.offsets();
|
587
|
+
position.top += offsets.top;
|
588
|
+
position.left += offsets.left;
|
589
|
+
|
590
|
+
clamp(position);
|
591
|
+
|
592
|
+
el.css({
|
593
|
+
top: position.top + 'px',
|
594
|
+
left: position.left + 'px'
|
595
|
+
});
|
596
|
+
|
597
|
+
containerNode.style[$mdConstant.CSS.TRANSFORM_ORIGIN] = transformOrigin;
|
598
|
+
|
599
|
+
// Animate a scale out if we aren't just repositioning
|
600
|
+
if (!opts.alreadyOpen) {
|
601
|
+
containerNode.style[$mdConstant.CSS.TRANSFORM] = 'scale(' +
|
602
|
+
Math.min(originNodeRect.width / containerNode.offsetWidth, 1.0) + ',' +
|
603
|
+
Math.min(originNodeRect.height / containerNode.offsetHeight, 1.0) +
|
604
|
+
')';
|
605
|
+
}
|
606
|
+
|
607
|
+
/**
|
608
|
+
* Clamps the repositioning of the menu within the confines of
|
609
|
+
* bounding element (often the screen/body)
|
610
|
+
*/
|
611
|
+
function clamp(pos) {
|
612
|
+
pos.top = Math.max(Math.min(pos.top, bounds.bottom - containerNode.offsetHeight), bounds.top);
|
613
|
+
pos.left = Math.max(Math.min(pos.left, bounds.right - containerNode.offsetWidth), bounds.left);
|
614
|
+
}
|
615
|
+
}
|
616
|
+
}
|
617
|
+
}
|
618
|
+
MenuProvider.$inject = ["$$interimElementProvider"];
|
619
|
+
|
620
|
+
ng.material.components.menu = angular.module("material.components.menu");
|