Sha256: 90b81c6e6e36703cb151acb46582054703cd42aa52764c67dc30a32680434ca7
Contents?: true
Size: 1.63 KB
Versions: 6
Compression:
Stored size: 1.63 KB
Contents
/*! * Angular Material Design * https://github.com/angular/material * @license MIT * v0.10.0 */ !function(e,n,i){"use strict";function t(e,i,t,c,d,o,a){function s(i,s){return s.type="checkbox",s.tabindex=s.tabindex||"0",i.attr("role",s.type),function(i,s,u,l){function m(e,n,t){u[e]&&i.$watch(u[e],function(e){t[e]&&s.attr(n,t[e])})}function f(e){var n=e.which||e.keyCode;(n===c.KEY_CODE.SPACE||n===c.KEY_CODE.ENTER)&&(e.preventDefault(),s.hasClass("md-focused")||s.addClass("md-focused"),p(e))}function p(e){s[0].hasAttribute("disabled")||i.$apply(function(){var n=u.ngChecked?u.checked:!l.$viewValue;l.$setViewValue(n,e&&e.type),l.$render()})}function v(){l.$viewValue?s.addClass(r):s.removeClass(r)}l=l||o.fakeNgModel(),d(s),u.ngChecked&&i.$watch(i.$eval.bind(i,u.ngChecked),l.$setViewValue.bind(l)),m("ngDisabled","tabindex",{"true":"-1","false":u.tabindex}),t.expectWithText(s,"aria-label"),e.link.pre(i,{on:n.noop,0:{}},u,[l]),i.mouseActive=!1,s.on("click",p).on("keypress",f).on("mousedown",function(){i.mouseActive=!0,a(function(){i.mouseActive=!1},100)}).on("focus",function(){i.mouseActive===!1&&s.addClass("md-focused")}).on("blur",function(){s.removeClass("md-focused")}),l.$render=v}}e=e[0];var r="md-checked";return{restrict:"E",transclude:!0,require:"?ngModel",priority:210,template:'<div class="md-container" md-ink-ripple md-ink-ripple-checkbox><div class="md-icon"></div></div><div ng-transclude class="md-label"></div>',compile:s}}n.module("material.components.checkbox",["material.core"]).directive("mdCheckbox",t),t.$inject=["inputDirective","$mdInkRipple","$mdAria","$mdConstant","$mdTheming","$mdUtil","$timeout"]}(window,window.angular);
Version data entries
6 entries across 6 versions & 1 rubygems