1234567 |
- /*!
- * Angular Material Design
- * https://github.com/angular/material
- * @license MIT
- * v0.11.3-master-3fe7d76
- */
- !function(t,e,n){"use strict";function i(t){return{restrict:"E",compile:function(e){return e[0].setAttribute("role","list"),t}}}function r(t,n,i,r){var o=["md-checkbox","md-switch"];return{restrict:"E",controller:"MdListController",compile:function(c,a){function l(){for(var t,e,n=["md-switch","md-checkbox"],i=0;e=n[i];++i)if((t=c.find(e)[0])&&!t.hasAttribute("aria-label")){var r=c.find("p")[0];if(!r)return;t.setAttribute("aria-label","Toggle "+r.textContent)}}function s(n){var i;if("div"==n)i=e.element('<div class="md-no-style md-list-item-inner">'),i.append(c.contents()),c.addClass("md-proxy-focus");else{i=e.element('<md-button class="md-no-style"><div class="md-list-item-inner"></div></md-button>');var r=["ng-click","aria-label","ng-disabled"];e.forEach(r,function(t){c[0].hasAttribute(t)&&(i[0].setAttribute(t,c[0].getAttribute(t)),c[0].removeAttribute(t))}),i.children().eq(0).append(c.contents())}if(c[0].setAttribute("tabindex","-1"),c.append(i),b&&b.hasAttribute("ng-click")){t.expect(b,"aria-label");var o=e.element('<md-button class="md-secondary-container md-icon-button">');o.attr("ng-click",b.getAttribute("ng-click")),b.removeAttribute("ng-click"),b.setAttribute("tabindex","-1"),b.classList.remove("md-secondary"),o.append(b),b=o[0]}b&&(b.hasAttribute("ng-click")||a.ngClick&&d(b))&&(c.addClass("md-with-secondary"),c.append(b))}function d(t){return-1!=o.indexOf(t.nodeName.toLowerCase())}function u(t,c,a,l){function s(){var t=c.children();t.length&&!t[0].hasAttribute("ng-click")&&e.forEach(o,function(t){e.forEach(m.querySelectorAll(t),function(t){u.push(t)})})}function d(){(u.length||f)&&(c.addClass("md-clickable"),l.attachRipple(t,e.element(c[0].querySelector(".md-no-style"))))}var u=[],m=c[0].firstElementChild,f=m&&m.hasAttribute("ng-click");s(),d(),c.hasClass("md-proxy-focus")&&u.length&&e.forEach(u,function(n){n=e.element(n),t.mouseActive=!1,n.on("mousedown",function(){t.mouseActive=!0,r(function(){t.mouseActive=!1},100)}).on("focus",function(){t.mouseActive===!1&&c.addClass("md-focused"),n.on("blur",function e(){c.removeClass("md-focused"),n.off("blur",e)})})}),f||u.length||m&&m.addEventListener("keypress",function(t){if("INPUT"!=t.target.nodeName&&"TEXTAREA"!=t.target.nodeName){var e=t.which||t.keyCode;e==n.KEY_CODE.SPACE&&m&&(m.click(),t.preventDefault(),t.stopPropagation())}}),c.off("click"),c.off("keypress"),u.length&&m&&c.children().eq(0).on("click",function(t){var n=i.getClosest(t.target,"BUTTON");!n&&m.contains(t.target)&&e.forEach(u,function(n){t.target===n||n.contains(t.target)||e.element(n).triggerHandler("click")})})}var m,f,b=c[0].querySelector(".md-secondary");if(c[0].setAttribute("role","listitem"),a.ngClick)s("button");else{for(var h,g=0;h=o[g];++g)if(f=c[0].querySelector(h)){m=!0;break}m?s("div"):c[0].querySelector("md-button")||c.addClass("md-no-proxy")}return l(),u}}}function o(t,e,n){function i(t,e){var i={};n.attach(t,e,i)}var r=this;r.attachRipple=i}e.module("material.components.list",["material.core"]).controller("MdListController",o).directive("mdList",i).directive("mdListItem",r),i.$inject=["$mdTheming"],r.$inject=["$mdAria","$mdConstant","$mdUtil","$timeout"],o.$inject=["$scope","$element","$mdListInkRipple"]}(window,window.angular);
|