diff --git a/bower.json b/bower.json index 4f1f70d..fec3513 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "vc-angular-recaptcha", - "version": "2.1.0", + "version": "2.1.1", "keywords": ["angular", "captcha", "recaptcha", "vividcortex", "human", "form", "validation", "signup", "security", "login"], "main": "release/angular-recaptcha.js", "ignore": [ diff --git a/package.json b/package.json index 97014b4..a8189b2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-recaptcha", - "version": "2.1.0", + "version": "2.1.1", "description": "An AngularJS module to ease usage of reCaptcha inside a form", "author": "VividCortex", "license": "MIT", diff --git a/release/angular-recaptcha.js b/release/angular-recaptcha.js index ee61576..679862a 100644 --- a/release/angular-recaptcha.js +++ b/release/angular-recaptcha.js @@ -1,5 +1,5 @@ /** - * angular-recaptcha build:2015-01-08 + * angular-recaptcha build:2015-01-09 * https://github.com/vividcortex/angular-recaptcha * Copyright (c) 2015 VividCortex **/ @@ -119,7 +119,7 @@ scope: { response: '=?ngModel', key: '=', - theme: '?=', + theme: '=?', onCreate: '&', onSuccess: '&', onExpire: '&' diff --git a/release/angular-recaptcha.min.js b/release/angular-recaptcha.min.js index 62aada4..8bdd703 100644 --- a/release/angular-recaptcha.min.js +++ b/release/angular-recaptcha.min.js @@ -1,7 +1,7 @@ /** - * angular-recaptcha build:2015-01-08 + * angular-recaptcha build:2015-01-09 * https://github.com/vividcortex/angular-recaptcha * Copyright (c) 2015 VividCortex **/ -!function(a){"use strict";a.module("vcRecaptcha",[])}(angular),function(a){"use strict";var b=a.module("vcRecaptcha");b.service("vcRecaptchaService",["$window","$q",function(b,c){function d(){return f?c.when(f):h}function e(){if(!f)throw new Error("reCaptcha has not been loaded yet.")}var f,g=c.defer(),h=g.promise;return b.vcRecapthaApiLoaded=function(){f=b.grecaptcha,g.resolve(f)},a.isDefined(b.grecaptcha)&&b.vcRecapthaApiLoaded(),{create:function(a,b,c,e){return e.callback=c,e.sitekey=b,d().then(function(b){return b.render(a,e)})},reload:function(a){e(),f.reset(a)},getResponse:function(a){return e(),f.getResponse(a)}}}])}(angular),function(a){"use strict";function b(){throw new Error('You need to set the "key" attribute to your public reCaptcha key. If you don\'t have a key, please get one from https://www.google.com/recaptcha/admin/create')}var c=a.module("vcRecaptcha");c.directive("vcRecaptcha",["$timeout","vcRecaptchaService",function(a,c){return{restrict:"A",require:"?^^form",scope:{response:"=?ngModel",key:"=",theme:"?=",onCreate:"&",onSuccess:"&",onExpire:"&"},link:function(d,e,f,g){f.hasOwnProperty("key")||b(),d.widgetId=null;var h=d.$watch("key",function(i){if(i){40!==i.length&&b();var j=function(b){a(function(){g&&g.$setValidity("recaptcha",!0),d.response=b,d.onSuccess({response:b,widgetId:d.widgetId})}),a(function(){g&&g.$setValidity("recaptcha",!1),d.response="",d.onExpire({widgetId:d.widgetId})},12e4)};c.create(e[0],i,j,{theme:d.theme||f.theme||null}).then(function(a){g&&g.$setValidity("recaptcha",!1),d.widgetId=a,d.onCreate({widgetId:a})}),h()}})}}}])}(angular); \ No newline at end of file +!function(a){"use strict";a.module("vcRecaptcha",[])}(angular),function(a){"use strict";var b=a.module("vcRecaptcha");b.service("vcRecaptchaService",["$window","$q",function(b,c){function d(){return f?c.when(f):h}function e(){if(!f)throw new Error("reCaptcha has not been loaded yet.")}var f,g=c.defer(),h=g.promise;return b.vcRecapthaApiLoaded=function(){f=b.grecaptcha,g.resolve(f)},a.isDefined(b.grecaptcha)&&b.vcRecapthaApiLoaded(),{create:function(a,b,c,e){return e.callback=c,e.sitekey=b,d().then(function(b){return b.render(a,e)})},reload:function(a){e(),f.reset(a)},getResponse:function(a){return e(),f.getResponse(a)}}}])}(angular),function(a){"use strict";function b(){throw new Error('You need to set the "key" attribute to your public reCaptcha key. If you don\'t have a key, please get one from https://www.google.com/recaptcha/admin/create')}var c=a.module("vcRecaptcha");c.directive("vcRecaptcha",["$timeout","vcRecaptchaService",function(a,c){return{restrict:"A",require:"?^^form",scope:{response:"=?ngModel",key:"=",theme:"=?",onCreate:"&",onSuccess:"&",onExpire:"&"},link:function(d,e,f,g){f.hasOwnProperty("key")||b(),d.widgetId=null;var h=d.$watch("key",function(i){if(i){40!==i.length&&b();var j=function(b){a(function(){g&&g.$setValidity("recaptcha",!0),d.response=b,d.onSuccess({response:b,widgetId:d.widgetId})}),a(function(){g&&g.$setValidity("recaptcha",!1),d.response="",d.onExpire({widgetId:d.widgetId})},12e4)};c.create(e[0],i,j,{theme:d.theme||f.theme||null}).then(function(a){g&&g.$setValidity("recaptcha",!1),d.widgetId=a,d.onCreate({widgetId:a})}),h()}})}}}])}(angular); \ No newline at end of file