From 26e35c82bf4929567034435c0109654c84b102cb Mon Sep 17 00:00:00 2001 From: Chad von Nau Date: Tue, 9 Feb 2016 13:40:37 -0800 Subject: [PATCH] Release 0.4.7 --- bower.json | 2 +- dist/angular-shims-placeholder.js | 4 ++-- dist/angular-shims-placeholder.min.js | 4 ++-- package.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bower.json b/bower.json index 2dd9883..51e324e 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "angular-shims-placeholder", "description": "Angular directive to emulate the `placeholder` attribute on text and password input fields for old browsers, such as IE9, IE8, and below", - "version": "0.4.6", + "version": "0.4.7", "homepage": "https://github.com/cvn/angular-shims-placeholder", "authors": [ { diff --git a/dist/angular-shims-placeholder.js b/dist/angular-shims-placeholder.js index ff7e0de..e73bdbb 100644 --- a/dist/angular-shims-placeholder.js +++ b/dist/angular-shims-placeholder.js @@ -1,6 +1,6 @@ -/*! angular-shims-placeholder - v0.4.6 - 2015-10-21 +/*! angular-shims-placeholder - v0.4.7 - 2016-02-09 * https://github.com/cvn/angular-shims-placeholder -* Copyright (c) 2015 Chad von Nau; Licensed MIT */ +* Copyright (c) 2016 Chad von Nau; Licensed MIT */ (function(angular, document, undefined) { 'use strict'; diff --git a/dist/angular-shims-placeholder.min.js b/dist/angular-shims-placeholder.min.js index 7e35c5d..c11fcfd 100644 --- a/dist/angular-shims-placeholder.min.js +++ b/dist/angular-shims-placeholder.min.js @@ -1,4 +1,4 @@ -/*! angular-shims-placeholder - v0.4.6 - 2015-10-21 +/*! angular-shims-placeholder - v0.4.7 - 2016-02-09 * https://github.com/cvn/angular-shims-placeholder -* Copyright (c) 2015 Chad von Nau; Licensed MIT */ +* Copyright (c) 2016 Chad von Nau; Licensed MIT */ !function(a,b,c){"use strict";a.module("ng.shims.placeholder",[]).service("placeholderSniffer",["$document",function(a){this.emptyClassName="empty",this.hasPlaceholder=function(){var b=a[0].createElement("input");return void 0!==b.placeholder}}]).directive("placeholder",["$timeout","$document","$interpolate","$injector","placeholderSniffer",function(d,e,f,g,h){if(h.hasPlaceholder())return{};var i=!1,j=parseFloat(a.version.full);try{var k=g.get("$animate")}catch(l){}return{restrict:"A",require:"?ngModel",priority:j>=1.2?110:-10,link:function(g,l,m,n){function o(a){var b=l.val();l.hasClass(O)&&b&&b===N||p(function(){q(b)},a)}function p(a,c){b.documentMode<=11&&c?d(a,0):a()}function q(a){a||0===a||u(J)?(l.removeClass(O),l.val(a)):(l.addClass(O),l.val(M?"":N)),M&&(x(),k&&y())}function r(){return n?g.$eval(m.ngModel)||"":s()||""}function s(){var a=l.val();return a===m.placeholder&&(a=""),a}function t(a,b){l.hasClass(O)&&l.val()===N&&l.val(""),N=a,o(b)}function u(a){var c=!1;try{c=a===b.activeElement}catch(d){}return c}function v(a,b,c,d){c?a.attr(b,d):a.removeAttr(b)}function w(){H=a.element(''),A(),C(H),H.addClass(O).bind("focus",F),J.parentNode.insertBefore(H[0],J);for(var b=[m.ngDisabled,m.ngReadonly,m.ngRequired,m.ngShow,m.ngHide],c=0;c=1.3?k.addClass(l,"").then(x):k.addClass(l,"",x)}function z(){k?y():x()}function A(){H.val(N),H.attr("class",l.attr("class")||"").attr("style",l.attr("style")||"").prop("disabled",l.prop("disabled")).prop("readOnly",l.prop("readOnly")).prop("required",l.prop("required")),v(H,"unselectable","on"===l.attr("unselectable"),"on"),v(H,"tabindex",l.attr("tabindex")!==c,l.attr("tabindex"))}function B(a){j>=1.2?a.removeClass(P):a.css("display","")}function C(a){j>=1.2?a.addClass(P):a.css("display","none")}function D(){C(l),B(H)}function E(){C(H),B(l)}function F(){E(),J.focus()}function G(){var a="undefined"!=typeof m.ngShow,b="undefined"!=typeof m.ngHide;return a||b?a&&!g.$eval(m.ngShow)||b&&g.$eval(m.ngHide):!1}var H,I=r(),J=l[0],K=J.nodeName.toLowerCase(),L="input"===K||"textarea"===K,M="password"===m.type,N=m.placeholder||"",O=h.emptyClassName,P="ng-hide";L&&(m.$observe("placeholder",function(a){t(a)}),M&&w(),q(I),l.bind("focus",function(){l.hasClass(O)&&(l.val(""),l.removeClass(O),J.select())}),l.bind("blur",o),n||l.bind("change",function(a){t(f(l.attr("placeholder")||"")(g),a)}),n&&(n.$render=function(){q(n.$viewValue),u(J)&&!l.val()&&J.select()}),i||(e.bind("selectstart",function(b){var c=a.element(b.target);c.hasClass(O)&&c.prop("disabled")&&b.preventDefault()}),i=!0))}}}])}(window.angular,window.document); \ No newline at end of file diff --git a/package.json b/package.json index 301167f..2e5869f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "angular-shims-placeholder", "description": "Angular directive to emulate the `placeholder` attribute on text and password input fields for old browsers, such as IE9, IE8, and below", - "version": "0.4.6", + "version": "0.4.7", "homepage": "https://github.com/cvn/angular-shims-placeholder", "author": { "name": "Chad von Nau",