Skip to content

Commit

Permalink
fix for root project error: t4t5/sweetalert#127
Browse files Browse the repository at this point in the history
  • Loading branch information
ekaram committed Oct 7, 2015
1 parent 863ac0a commit 23971e5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
6 changes: 4 additions & 2 deletions SweetAlert.js
Expand Up @@ -55,8 +55,10 @@ angular.module('oitozero.ngSweetAlert', [])
},
close: function() {
$rootScope.$evalAsync(function(){
swal.close();
});
swal.close();
window.onkeydown = null;
window.onfocus = null;
});
}
};

Expand Down
10 changes: 9 additions & 1 deletion SweetAlert.min.js
@@ -1 +1,9 @@
"use strict";angular.module("oitozero.ngSweetAlert",[]).factory("SweetAlert",["$rootScope",function($rootScope){var swal=window.swal,self={swal:function(arg1,arg2,arg3){$rootScope.$evalAsync(function(){"function"==typeof arg2?swal(arg1,function(isConfirm){$rootScope.$evalAsync(function(){arg2(isConfirm)})},arg3):swal(arg1,arg2,arg3)})},success:function(title,message){$rootScope.$evalAsync(function(){swal(title,message,"success")})},error:function(title,message){$rootScope.$evalAsync(function(){swal(title,message,"error")})},warning:function(title,message){$rootScope.$evalAsync(function(){swal(title,message,"warning")})},info:function(title,message){$rootScope.$evalAsync(function(){swal(title,message,"info")})}};return self}]);
/**
@fileOverview
@toc
*/
"use strict"
angular.module("oitozero.ngSweetAlert",[]).factory("SweetAlert",["$rootScope",function(n){var o=window.swal,c={swal:function(c,t,u){n.$evalAsync(function(){"function"==typeof t?o(c,function(o){n.$evalAsync(function(){t(o)})},u):o(c,t,u)})},success:function(c,t){n.$evalAsync(function(){o(c,t,"success")})},error:function(c,t){n.$evalAsync(function(){o(c,t,"error")})},warning:function(c,t){n.$evalAsync(function(){o(c,t,"warning")})},info:function(c,t){n.$evalAsync(function(){o(c,t,"info")})},showInputError:function(c){n.$evalAsync(function(){o.showInputError(c)})},close:function(){n.$evalAsync(function(){o.close(),window.onkeydown=null,window.onfocus=null})}}
return c}])

0 comments on commit 23971e5

Please sign in to comment.