From 80b299e8c4f290e3b16f35eea922cac989b6e767 Mon Sep 17 00:00:00 2001 From: seshukm Date: Wed, 8 Mar 2017 11:54:56 +0530 Subject: VnfMarket place refactor IssueId : CLIENT-4 Change-Id: Ia1b076400f9c3bedf9db714099a608ece392aa59 Signed-off-by: seshukm --- .../closure/toolbar/toolbar-default-theme.css | 29 +++ .../closure/toolbar/toolbar-default-theme.min.css | 6 + .../modules/closure/toolbar/toolbar.css | 147 +++++++++++ .../modules/closure/toolbar/toolbar.js | 270 +++++++++++++++++++++ .../modules/closure/toolbar/toolbar.min.css | 6 + .../modules/closure/toolbar/toolbar.min.js | 7 + 6 files changed, 465 insertions(+) create mode 100644 vnfmarket/src/main/webapp/common/thirdparty/angular-material/modules/closure/toolbar/toolbar-default-theme.css create mode 100644 vnfmarket/src/main/webapp/common/thirdparty/angular-material/modules/closure/toolbar/toolbar-default-theme.min.css create mode 100644 vnfmarket/src/main/webapp/common/thirdparty/angular-material/modules/closure/toolbar/toolbar.css create mode 100644 vnfmarket/src/main/webapp/common/thirdparty/angular-material/modules/closure/toolbar/toolbar.js create mode 100644 vnfmarket/src/main/webapp/common/thirdparty/angular-material/modules/closure/toolbar/toolbar.min.css create mode 100644 vnfmarket/src/main/webapp/common/thirdparty/angular-material/modules/closure/toolbar/toolbar.min.js (limited to 'vnfmarket/src/main/webapp/common/thirdparty/angular-material/modules/closure/toolbar') diff --git a/vnfmarket/src/main/webapp/common/thirdparty/angular-material/modules/closure/toolbar/toolbar-default-theme.css b/vnfmarket/src/main/webapp/common/thirdparty/angular-material/modules/closure/toolbar/toolbar-default-theme.css new file mode 100644 index 00000000..09123cf1 --- /dev/null +++ b/vnfmarket/src/main/webapp/common/thirdparty/angular-material/modules/closure/toolbar/toolbar-default-theme.css @@ -0,0 +1,29 @@ +/*! + * Angular Material Design + * https://github.com/angular/material + * @license MIT + * v1.1.3 + */ +md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) { + background-color: '{{primary-color}}'; + color: '{{primary-contrast}}'; } + md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) md-icon { + color: '{{primary-contrast}}'; + fill: '{{primary-contrast}}'; } + md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) .md-button[disabled] md-icon { + color: '{{primary-contrast-0.26}}'; + fill: '{{primary-contrast-0.26}}'; } + md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent { + background-color: '{{accent-color}}'; + color: '{{accent-contrast}}'; } + md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent .md-ink-ripple { + color: '{{accent-contrast}}'; } + md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent md-icon { + color: '{{accent-contrast}}'; + fill: '{{accent-contrast}}'; } + md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent .md-button[disabled] md-icon { + color: '{{accent-contrast-0.26}}'; + fill: '{{accent-contrast-0.26}}'; } + md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-warn { + background-color: '{{warn-color}}'; + color: '{{warn-contrast}}'; } diff --git a/vnfmarket/src/main/webapp/common/thirdparty/angular-material/modules/closure/toolbar/toolbar-default-theme.min.css b/vnfmarket/src/main/webapp/common/thirdparty/angular-material/modules/closure/toolbar/toolbar-default-theme.min.css new file mode 100644 index 00000000..b0af588f --- /dev/null +++ b/vnfmarket/src/main/webapp/common/thirdparty/angular-material/modules/closure/toolbar/toolbar-default-theme.min.css @@ -0,0 +1,6 @@ +/*! + * Angular Material Design + * https://github.com/angular/material + * @license MIT + * v1.1.2-master-a9ba340 + */md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar){background-color:"{{primary-color}}";color:"{{primary-contrast}}"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) md-icon{color:"{{primary-contrast}}";fill:"{{primary-contrast}}"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) .md-button[disabled] md-icon{color:"{{primary-contrast-0.26}}";fill:"{{primary-contrast-0.26}}"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent{background-color:"{{accent-color}}";color:"{{accent-contrast}}"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent .md-ink-ripple{color:"{{accent-contrast}}"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent md-icon{color:"{{accent-contrast}}";fill:"{{accent-contrast}}"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent .md-button[disabled] md-icon{color:"{{accent-contrast-0.26}}";fill:"{{accent-contrast-0.26}}"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-warn{background-color:"{{warn-color}}";color:"{{warn-contrast}}"} \ No newline at end of file diff --git a/vnfmarket/src/main/webapp/common/thirdparty/angular-material/modules/closure/toolbar/toolbar.css b/vnfmarket/src/main/webapp/common/thirdparty/angular-material/modules/closure/toolbar/toolbar.css new file mode 100644 index 00000000..49eba119 --- /dev/null +++ b/vnfmarket/src/main/webapp/common/thirdparty/angular-material/modules/closure/toolbar/toolbar.css @@ -0,0 +1,147 @@ +/*! + * Angular Material Design + * https://github.com/angular/material + * @license MIT + * v1.1.3 + */ +md-toolbar { + box-sizing: border-box; + display: -webkit-box; + display: -webkit-flex; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -webkit-flex-direction: column; + flex-direction: column; + position: relative; + z-index: 2; + font-size: 20px; + min-height: 64px; + width: 100%; } + md-toolbar._md-toolbar-transitions { + -webkit-transition-duration: 0.5s; + transition-duration: 0.5s; + -webkit-transition-timing-function: cubic-bezier(0.35, 0, 0.25, 1); + transition-timing-function: cubic-bezier(0.35, 0, 0.25, 1); + -webkit-transition-property: background-color, fill, color; + transition-property: background-color, fill, color; } + md-toolbar.md-whiteframe-z1-add, md-toolbar.md-whiteframe-z1-remove { + -webkit-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; } + md-toolbar md-toolbar-filler { + width: 72px; } + md-toolbar *, + md-toolbar *:before, + md-toolbar *:after { + box-sizing: border-box; } + md-toolbar.ng-animate { + -webkit-transition: none; + transition: none; } + md-toolbar.md-tall { + height: 128px; + min-height: 128px; + max-height: 128px; } + md-toolbar.md-medium-tall { + height: 88px; + min-height: 88px; + max-height: 88px; } + md-toolbar.md-medium-tall .md-toolbar-tools { + height: 48px; + min-height: 48px; + max-height: 48px; } + md-toolbar > .md-indent { + margin-left: 64px; } + [dir=rtl] md-toolbar > .md-indent { + margin-left: auto; + margin-right: 64px; } + md-toolbar ~ md-content > md-list { + padding: 0; } + md-toolbar ~ md-content > md-list md-list-item:last-child md-divider { + display: none; } + +.md-toolbar-tools { + font-size: 20px; + letter-spacing: 0.005em; + box-sizing: border-box; + font-weight: 400; + display: -webkit-box; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -webkit-align-items: center; + align-items: center; + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -webkit-flex-direction: row; + flex-direction: row; + width: 100%; + height: 64px; + max-height: 64px; + padding: 0 16px; + margin: 0; } + .md-toolbar-tools h1, .md-toolbar-tools h2, .md-toolbar-tools h3 { + font-size: inherit; + font-weight: inherit; + margin: inherit; } + .md-toolbar-tools a { + color: inherit; + text-decoration: none; } + .md-toolbar-tools .fill-height { + display: -webkit-box; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -webkit-align-items: center; + align-items: center; } + .md-toolbar-tools md-checkbox { + margin: inherit; } + .md-toolbar-tools .md-button { + margin-top: 0; + margin-bottom: 0; } + .md-toolbar-tools .md-button, .md-toolbar-tools .md-button.md-icon-button md-icon { + -webkit-transition-duration: 0.5s; + transition-duration: 0.5s; + -webkit-transition-timing-function: cubic-bezier(0.35, 0, 0.25, 1); + transition-timing-function: cubic-bezier(0.35, 0, 0.25, 1); + -webkit-transition-property: background-color, fill, color; + transition-property: background-color, fill, color; } + .md-toolbar-tools .md-button.ng-animate, .md-toolbar-tools .md-button.md-icon-button md-icon.ng-animate { + -webkit-transition: none; + transition: none; } + .md-toolbar-tools > .md-button:first-child { + margin-left: -8px; } + [dir=rtl] .md-toolbar-tools > .md-button:first-child { + margin-left: auto; + margin-right: -8px; } + .md-toolbar-tools > .md-button:last-child { + margin-right: -8px; } + [dir=rtl] .md-toolbar-tools > .md-button:last-child { + margin-right: auto; + margin-left: -8px; } + .md-toolbar-tools > md-menu:last-child { + margin-right: -8px; } + [dir=rtl] .md-toolbar-tools > md-menu:last-child { + margin-right: auto; + margin-left: -8px; } + .md-toolbar-tools > md-menu:last-child > .md-button { + margin-right: 0; } + [dir=rtl] .md-toolbar-tools > md-menu:last-child > .md-button { + margin-right: auto; + margin-left: 0; } + @media screen and (-ms-high-contrast: active) { + .md-toolbar-tools { + border-bottom: 1px solid #fff; } } + +@media (min-width: 0) and (max-width: 959px) and (orientation: portrait) { + md-toolbar { + min-height: 56px; } + .md-toolbar-tools { + height: 56px; + max-height: 56px; } } + +@media (min-width: 0) and (max-width: 959px) and (orientation: landscape) { + md-toolbar { + min-height: 48px; } + .md-toolbar-tools { + height: 48px; + max-height: 48px; } } diff --git a/vnfmarket/src/main/webapp/common/thirdparty/angular-material/modules/closure/toolbar/toolbar.js b/vnfmarket/src/main/webapp/common/thirdparty/angular-material/modules/closure/toolbar/toolbar.js new file mode 100644 index 00000000..b2696747 --- /dev/null +++ b/vnfmarket/src/main/webapp/common/thirdparty/angular-material/modules/closure/toolbar/toolbar.js @@ -0,0 +1,270 @@ +/*! + * Angular Material Design + * https://github.com/angular/material + * @license MIT + * v1.1.3 + */ +goog.provide('ngmaterial.components.toolbar'); +goog.require('ngmaterial.components.content'); +goog.require('ngmaterial.core'); +/** + * @ngdoc module + * @name material.components.toolbar + */ +mdToolbarDirective['$inject'] = ["$$rAF", "$mdConstant", "$mdUtil", "$mdTheming", "$animate"]; +angular.module('material.components.toolbar', [ + 'material.core', + 'material.components.content' +]) + .directive('mdToolbar', mdToolbarDirective); + +/** + * @ngdoc directive + * @name mdToolbar + * @module material.components.toolbar + * @restrict E + * @description + * `md-toolbar` is used to place a toolbar in your app. + * + * Toolbars are usually used above a content area to display the title of the + * current page, and show relevant action buttons for that page. + * + * You can change the height of the toolbar by adding either the + * `md-medium-tall` or `md-tall` class to the toolbar. + * + * @usage + * + *
+ * + * + *
+ *

My App's Title

+ * + * + * Right Bar Button + * + *
+ * + *
+ * + * Hello! + * + *
+ *
+ * + * Note: The code above shows usage with the `md-truncate` component which provides an + * ellipsis if the title is longer than the width of the Toolbar. + * + * ## CSS & Styles + * + * The `` provides a few custom CSS classes that you may use to enhance the + * functionality of your toolbar. + * + *
+ * + * + * + * The `md-toolbar-tools` class provides quite a bit of automatic styling for your toolbar + * buttons and text. When applied, it will center the buttons and text vertically for you. + * + * + * + *
+ * + * ### Private Classes + * + * Currently, the only private class is the `md-toolbar-transitions` class. All other classes are + * considered public. + * + * @param {boolean=} md-scroll-shrink Whether the header should shrink away as + * the user scrolls down, and reveal itself as the user scrolls up. + * + * _**Note (1):** for scrollShrink to work, the toolbar must be a sibling of a + * `md-content` element, placed before it. See the scroll shrink demo._ + * + * _**Note (2):** The `md-scroll-shrink` attribute is only parsed on component + * initialization, it does not watch for scope changes._ + * + * + * @param {number=} md-shrink-speed-factor How much to change the speed of the toolbar's + * shrinking by. For example, if 0.25 is given then the toolbar will shrink + * at one fourth the rate at which the user scrolls down. Default 0.5. + * + */ + +function mdToolbarDirective($$rAF, $mdConstant, $mdUtil, $mdTheming, $animate) { + var translateY = angular.bind(null, $mdUtil.supplant, 'translate3d(0,{0}px,0)'); + + return { + template: '', + restrict: 'E', + + link: function(scope, element, attr) { + + element.addClass('_md'); // private md component indicator for styling + $mdTheming(element); + + $mdUtil.nextTick(function () { + element.addClass('_md-toolbar-transitions'); // adding toolbar transitions after digest + }, false); + + if (angular.isDefined(attr.mdScrollShrink)) { + setupScrollShrink(); + } + + function setupScrollShrink() { + + var toolbarHeight; + var contentElement; + var disableScrollShrink = angular.noop; + + // Current "y" position of scroll + // Store the last scroll top position + var y = 0; + var prevScrollTop = 0; + var shrinkSpeedFactor = attr.mdShrinkSpeedFactor || 0.5; + + var debouncedContentScroll = $$rAF.throttle(onContentScroll); + var debouncedUpdateHeight = $mdUtil.debounce(updateToolbarHeight, 5 * 1000); + + // Wait for $mdContentLoaded event from mdContent directive. + // If the mdContent element is a sibling of our toolbar, hook it up + // to scroll events. + + scope.$on('$mdContentLoaded', onMdContentLoad); + + // If the toolbar is used inside an ng-if statement, we may miss the + // $mdContentLoaded event, so we attempt to fake it if we have a + // md-content close enough. + + attr.$observe('mdScrollShrink', onChangeScrollShrink); + + // If the toolbar has ngShow or ngHide we need to update height immediately as it changed + // and not wait for $mdUtil.debounce to happen + + if (attr.ngShow) { scope.$watch(attr.ngShow, updateToolbarHeight); } + if (attr.ngHide) { scope.$watch(attr.ngHide, updateToolbarHeight); } + + // If the scope is destroyed (which could happen with ng-if), make sure + // to disable scroll shrinking again + + scope.$on('$destroy', disableScrollShrink); + + /** + * + */ + function onChangeScrollShrink(shrinkWithScroll) { + var closestContent = element.parent().find('md-content'); + + // If we have a content element, fake the call; this might still fail + // if the content element isn't a sibling of the toolbar + + if (!contentElement && closestContent.length) { + onMdContentLoad(null, closestContent); + } + + // Evaluate the expression + shrinkWithScroll = scope.$eval(shrinkWithScroll); + + // Disable only if the attribute's expression evaluates to false + if (shrinkWithScroll === false) { + disableScrollShrink(); + } else { + disableScrollShrink = enableScrollShrink(); + } + } + + /** + * + */ + function onMdContentLoad($event, newContentEl) { + // Toolbar and content must be siblings + if (newContentEl && element.parent()[0] === newContentEl.parent()[0]) { + // unhook old content event listener if exists + if (contentElement) { + contentElement.off('scroll', debouncedContentScroll); + } + + contentElement = newContentEl; + disableScrollShrink = enableScrollShrink(); + } + } + + /** + * + */ + function onContentScroll(e) { + var scrollTop = e ? e.target.scrollTop : prevScrollTop; + + debouncedUpdateHeight(); + + y = Math.min( + toolbarHeight / shrinkSpeedFactor, + Math.max(0, y + scrollTop - prevScrollTop) + ); + + element.css($mdConstant.CSS.TRANSFORM, translateY([-y * shrinkSpeedFactor])); + contentElement.css($mdConstant.CSS.TRANSFORM, translateY([(toolbarHeight - y) * shrinkSpeedFactor])); + + prevScrollTop = scrollTop; + + $mdUtil.nextTick(function() { + var hasWhiteFrame = element.hasClass('md-whiteframe-z1'); + + if (hasWhiteFrame && !y) { + $animate.removeClass(element, 'md-whiteframe-z1'); + } else if (!hasWhiteFrame && y) { + $animate.addClass(element, 'md-whiteframe-z1'); + } + }); + + } + + /** + * + */ + function enableScrollShrink() { + if (!contentElement) return angular.noop; // no md-content + + contentElement.on('scroll', debouncedContentScroll); + contentElement.attr('scroll-shrink', 'true'); + + $mdUtil.nextTick(updateToolbarHeight, false); + + return function disableScrollShrink() { + contentElement.off('scroll', debouncedContentScroll); + contentElement.attr('scroll-shrink', 'false'); + + updateToolbarHeight(); + }; + } + + /** + * + */ + function updateToolbarHeight() { + toolbarHeight = element.prop('offsetHeight'); + // Add a negative margin-top the size of the toolbar to the content el. + // The content will start transformed down the toolbarHeight amount, + // so everything looks normal. + // + // As the user scrolls down, the content will be transformed up slowly + // to put the content underneath where the toolbar was. + var margin = (-toolbarHeight * shrinkSpeedFactor) + 'px'; + + contentElement.css({ + "margin-top": margin, + "margin-bottom": margin + }); + + onContentScroll(); + } + + } + + } + }; + +} + +ngmaterial.components.toolbar = angular.module("material.components.toolbar"); \ No newline at end of file diff --git a/vnfmarket/src/main/webapp/common/thirdparty/angular-material/modules/closure/toolbar/toolbar.min.css b/vnfmarket/src/main/webapp/common/thirdparty/angular-material/modules/closure/toolbar/toolbar.min.css new file mode 100644 index 00000000..874fc2b4 --- /dev/null +++ b/vnfmarket/src/main/webapp/common/thirdparty/angular-material/modules/closure/toolbar/toolbar.min.css @@ -0,0 +1,6 @@ +/*! + * Angular Material Design + * https://github.com/angular/material + * @license MIT + * v1.1.2-master-a9ba340 + */md-toolbar{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;position:relative;z-index:2;font-size:20px;min-height:64px;width:100%}md-toolbar._md-toolbar-transitions{-webkit-transition-duration:.5s;transition-duration:.5s;-webkit-transition-timing-function:cubic-bezier(.35,0,.25,1);transition-timing-function:cubic-bezier(.35,0,.25,1);-webkit-transition-property:background-color,fill,color;transition-property:background-color,fill,color}md-toolbar.md-whiteframe-z1-add,md-toolbar.md-whiteframe-z1-remove{-webkit-transition:box-shadow .5s linear;transition:box-shadow .5s linear}md-toolbar md-toolbar-filler{width:72px}md-toolbar *,md-toolbar :after,md-toolbar :before{box-sizing:border-box}md-toolbar.ng-animate{-webkit-transition:none;transition:none}md-toolbar.md-tall{height:128px;min-height:128px;max-height:128px}md-toolbar.md-medium-tall{height:88px;min-height:88px;max-height:88px}md-toolbar.md-medium-tall .md-toolbar-tools{height:48px;min-height:48px;max-height:48px}md-toolbar>.md-indent{margin-left:64px}[dir=rtl] md-toolbar>.md-indent{margin-left:auto;margin-right:64px}md-toolbar~md-content>md-list{padding:0}md-toolbar~md-content>md-list md-list-item:last-child md-divider{display:none}.md-toolbar-tools{font-size:20px;letter-spacing:.005em;box-sizing:border-box;font-weight:400;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;width:100%;height:64px;max-height:64px;padding:0 16px;margin:0}.md-toolbar-tools h1,.md-toolbar-tools h2,.md-toolbar-tools h3{font-size:inherit;font-weight:inherit;margin:inherit}.md-toolbar-tools a{color:inherit;text-decoration:none}.md-toolbar-tools .fill-height{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.md-toolbar-tools md-checkbox{margin:inherit}.md-toolbar-tools .md-button{margin-top:0;margin-bottom:0}.md-toolbar-tools .md-button,.md-toolbar-tools .md-button.md-icon-button md-icon{-webkit-transition-duration:.5s;transition-duration:.5s;-webkit-transition-timing-function:cubic-bezier(.35,0,.25,1);transition-timing-function:cubic-bezier(.35,0,.25,1);-webkit-transition-property:background-color,fill,color;transition-property:background-color,fill,color}.md-toolbar-tools .md-button.md-icon-button md-icon.ng-animate,.md-toolbar-tools .md-button.ng-animate{-webkit-transition:none;transition:none}.md-toolbar-tools>.md-button:first-child{margin-left:-8px}[dir=rtl] .md-toolbar-tools>.md-button:first-child{margin-left:auto;margin-right:-8px}.md-toolbar-tools>.md-button:last-child{margin-right:-8px}[dir=rtl] .md-toolbar-tools>.md-button:last-child{margin-right:auto;margin-left:-8px}.md-toolbar-tools>md-menu:last-child{margin-right:-8px}[dir=rtl] .md-toolbar-tools>md-menu:last-child{margin-right:auto;margin-left:-8px}.md-toolbar-tools>md-menu:last-child>.md-button{margin-right:0}[dir=rtl] .md-toolbar-tools>md-menu:last-child>.md-button{margin-right:auto;margin-left:0}@media screen and (-ms-high-contrast:active){.md-toolbar-tools{border-bottom:1px solid #fff}}@media (min-width:0) and (max-width:959px) and (orientation:portrait){md-toolbar{min-height:56px}.md-toolbar-tools{height:56px;max-height:56px}}@media (min-width:0) and (max-width:959px) and (orientation:landscape){md-toolbar{min-height:48px}.md-toolbar-tools{height:48px;max-height:48px}} \ No newline at end of file diff --git a/vnfmarket/src/main/webapp/common/thirdparty/angular-material/modules/closure/toolbar/toolbar.min.js b/vnfmarket/src/main/webapp/common/thirdparty/angular-material/modules/closure/toolbar/toolbar.min.js new file mode 100644 index 00000000..829d2cee --- /dev/null +++ b/vnfmarket/src/main/webapp/common/thirdparty/angular-material/modules/closure/toolbar/toolbar.min.js @@ -0,0 +1,7 @@ +/*! + * Angular Material Design + * https://github.com/angular/material + * @license MIT + * v1.1.2-master-a9ba340 + */ +function mdToolbarDirective(n,o,t,a,r){var e=angular.bind(null,t.supplant,"translate3d(0,{0}px,0)");return{template:"",restrict:"E",link:function(i,l,c){function m(){function a(n){var o=l.parent().find("md-content");!f&&o.length&&m(null,o),n=i.$eval(n),n===!1?p():p=d()}function m(n,o){o&&l.parent()[0]===o.parent()[0]&&(f&&f.off("scroll",S),f=o,p=d())}function s(n){var a=n?n.target.scrollTop:$;b(),h=Math.min(g/v,Math.max(0,h+a-$)),l.css(o.CSS.TRANSFORM,e([-h*v])),f.css(o.CSS.TRANSFORM,e([(g-h)*v])),$=a,t.nextTick(function(){var n=l.hasClass("md-whiteframe-z1");n&&!h?r.removeClass(l,"md-whiteframe-z1"):!n&&h&&r.addClass(l,"md-whiteframe-z1")})}function d(){return f?(f.on("scroll",S),f.attr("scroll-shrink","true"),t.nextTick(u,!1),function(){f.off("scroll",S),f.attr("scroll-shrink","false"),u()}):angular.noop}function u(){g=l.prop("offsetHeight");var n=-g*v+"px";f.css({"margin-top":n,"margin-bottom":n}),s()}var g,f,p=angular.noop,h=0,$=0,v=c.mdShrinkSpeedFactor||.5,S=n.throttle(s),b=t.debounce(u,5e3);i.$on("$mdContentLoaded",m),c.$observe("mdScrollShrink",a),c.ngShow&&i.$watch(c.ngShow,u),c.ngHide&&i.$watch(c.ngHide,u),i.$on("$destroy",p)}l.addClass("_md"),a(l),t.nextTick(function(){l.addClass("_md-toolbar-transitions")},!1),angular.isDefined(c.mdScrollShrink)&&m()}}}goog.provide("ngmaterial.components.toolbar"),goog.require("ngmaterial.components.content"),goog.require("ngmaterial.core"),mdToolbarDirective.$inject=["$$rAF","$mdConstant","$mdUtil","$mdTheming","$animate"],angular.module("material.components.toolbar",["material.core","material.components.content"]).directive("mdToolbar",mdToolbarDirective),ngmaterial.components.toolbar=angular.module("material.components.toolbar"); \ No newline at end of file -- cgit 1.2.3-korg