Comparing version 0.2.2 to 0.2.3
{ | ||
"name": "ngDialog", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"homepage": "https://github.com/likeastore/ngDialog", | ||
@@ -5,0 +5,0 @@ "description": "Modal dialogs and popups provider for Angular.js applications", |
@@ -150,2 +150,3 @@ /* | ||
$body.addClass('ngdialog-open').append($dialog); | ||
$rootScope.$broadcast('ngDialog.opened', $dialog); | ||
}); | ||
@@ -174,4 +175,2 @@ | ||
$rootScope.$broadcast('ngDialog.opened', $dialog); | ||
return publicMethods; | ||
@@ -178,0 +177,0 @@ }); |
@@ -1,2 +0,2 @@ | ||
/*! ng-dialog - v0.2.2 (https://github.com/likeastore/ngDialog) */ | ||
!function(a,b){"use strict";var c=b.module("ngDialog",[]),d=b.element,e=b.isDefined,f=(document.body||document.documentElement).style,g=e(f.animation)||e(f.WebkitAnimation)||e(f.MozAnimation)||e(f.MsAnimation)||e(f.OAnimation),h="animationend webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend";c.provider("ngDialog",function(){var c,e=this.defaults={className:"ngdialog-theme-default",plain:!1,showClose:!0,closeByDocument:!0,closeByEscape:!0},f=0,i=0,j={};this.$get=["$document","$templateCache","$compile","$q","$http","$rootScope","$timeout",function(k,l,m,n,o,p,q){var r=k.find("body"),s={onDocumentKeydown:function(a){27===a.keyCode&&t.close()},closeDialog:function(b){var d=b.attr("id");"undefined"!=typeof a.Hammer?a.Hammer(b[0]).off("tap",c):b.unbind("click"),1===i&&r.unbind("keydown"),b.hasClass("ngdialog-closing")||(i-=1),g?b.unbind(h).bind(h,function(){b.scope().$destroy(),b.remove(),0===i&&r.removeClass("ngdialog-open")}).addClass("ngdialog-closing"):(b.scope().$destroy(),b.remove(),0===i&&r.removeClass("ngdialog-open")),j[d]&&(j[d].resolve({id:d,$dialog:b,remainingDialogs:i}),delete j[d]),p.$broadcast("ngDialog.closed",b)}},t={open:function(g){function h(a){return a?b.isString(a)&&u.plain?a:l.get(a)||o.get(a,{cache:!0}):"Empty template"}var k=this,u=b.copy(e);g=g||{},b.extend(u,g),f+=1,k.latestID="ngdialog"+f;var v;j[k.latestID]=v=n.defer();var w,x=b.isObject(u.scope)?u.scope.$new():p.$new();return n.when(h(u.template)).then(function(e){return e=b.isString(e)?e:e.data&&b.isString(e.data)?e.data:"",l.put(u.template,e),u.showClose&&(e+='<div class="ngdialog-close"></div>'),k.$result=w=d('<div id="ngdialog'+f+'" class="ngdialog"></div>'),w.html('<div class="ngdialog-overlay"></div><div class="ngdialog-content">'+e+"</div>"),u.controller&&b.isString(u.controller)&&w.attr("ng-controller",u.controller),u.className&&w.addClass(u.className),u.data&&b.isString(u.data)&&(x.ngDialogData="{"===u.data.replace(/^\s*/,"")[0]?b.fromJson(u.data):u.data),x.closeThisDialog=function(){s.closeDialog(w)},q(function(){m(w)(x),r.addClass("ngdialog-open").append(w)}),u.closeByEscape&&r.bind("keydown",s.onDocumentKeydown),c=function(a){var b=u.closeByDocument?d(a.target).hasClass("ngdialog-overlay"):!1,c=d(a.target).hasClass("ngdialog-close");(b||c)&&t.close(w.attr("id"))},"undefined"!=typeof a.Hammer?a.Hammer(w[0]).on("tap",c):w.bind("click",c),i+=1,p.$broadcast("ngDialog.opened",w),t}),{id:"ngdialog"+f,closePromise:v.promise,close:function(){s.closeDialog(w)}}},openConfirm:function(a){var c=n.defer(),d={closeByEscape:!1,closeByDocument:!1};b.extend(d,a),d.scope=b.isObject(d.scope)?d.scope.$new():p.$new(),d.scope.confirm=function(a){c.resolve(a),e.close()};var e=t.open(d);return e.closePromise.then(function(){c.reject()}),c.promise},close:function(a){var b=d(document.getElementById(a));return b.length?s.closeDialog(b):t.closeAll(),t},closeAll:function(){var a=document.querySelectorAll(".ngdialog");b.forEach(a,function(a){s.closeDialog(d(a))})}};return t}]}),c.directive("ngDialog",["ngDialog",function(a){return{restrict:"A",scope:{ngDialogScope:"="},link:function(c,d,e){d.on("click",function(d){d.preventDefault();var f=b.isDefined(c.ngDialogScope)?c.ngDialogScope:"noScope";b.isDefined(e.ngDialogClosePrevious)&&a.close(e.ngDialogClosePrevious),a.open({template:e.ngDialog,className:e.ngDialogClass,controller:e.ngDialogController,scope:f,data:e.ngDialogData,showClose:"false"===e.ngDialogShowClose?!1:!0,closeByDocument:"false"===e.ngDialogCloseByDocument?!1:!0,closeByEscape:"false"===e.ngDialogCloseByEscape?!1:!0})})}}}])}(window,window.angular); | ||
/*! ng-dialog - v0.2.3 (https://github.com/likeastore/ngDialog) */ | ||
!function(a,b){"use strict";var c=b.module("ngDialog",[]),d=b.element,e=b.isDefined,f=(document.body||document.documentElement).style,g=e(f.animation)||e(f.WebkitAnimation)||e(f.MozAnimation)||e(f.MsAnimation)||e(f.OAnimation),h="animationend webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend";c.provider("ngDialog",function(){var c,e=this.defaults={className:"ngdialog-theme-default",plain:!1,showClose:!0,closeByDocument:!0,closeByEscape:!0},f=0,i=0,j={};this.$get=["$document","$templateCache","$compile","$q","$http","$rootScope","$timeout",function(k,l,m,n,o,p,q){var r=k.find("body"),s={onDocumentKeydown:function(a){27===a.keyCode&&t.close()},closeDialog:function(b){var d=b.attr("id");"undefined"!=typeof a.Hammer?a.Hammer(b[0]).off("tap",c):b.unbind("click"),1===i&&r.unbind("keydown"),b.hasClass("ngdialog-closing")||(i-=1),g?b.unbind(h).bind(h,function(){b.scope().$destroy(),b.remove(),0===i&&r.removeClass("ngdialog-open")}).addClass("ngdialog-closing"):(b.scope().$destroy(),b.remove(),0===i&&r.removeClass("ngdialog-open")),j[d]&&(j[d].resolve({id:d,$dialog:b,remainingDialogs:i}),delete j[d]),p.$broadcast("ngDialog.closed",b)}},t={open:function(g){function h(a){return a?b.isString(a)&&u.plain?a:l.get(a)||o.get(a,{cache:!0}):"Empty template"}var k=this,u=b.copy(e);g=g||{},b.extend(u,g),f+=1,k.latestID="ngdialog"+f;var v;j[k.latestID]=v=n.defer();var w,x=b.isObject(u.scope)?u.scope.$new():p.$new();return n.when(h(u.template)).then(function(e){return e=b.isString(e)?e:e.data&&b.isString(e.data)?e.data:"",l.put(u.template,e),u.showClose&&(e+='<div class="ngdialog-close"></div>'),k.$result=w=d('<div id="ngdialog'+f+'" class="ngdialog"></div>'),w.html('<div class="ngdialog-overlay"></div><div class="ngdialog-content">'+e+"</div>"),u.controller&&b.isString(u.controller)&&w.attr("ng-controller",u.controller),u.className&&w.addClass(u.className),u.data&&b.isString(u.data)&&(x.ngDialogData="{"===u.data.replace(/^\s*/,"")[0]?b.fromJson(u.data):u.data),x.closeThisDialog=function(){s.closeDialog(w)},q(function(){m(w)(x),r.addClass("ngdialog-open").append(w),p.$broadcast("ngDialog.opened",w)}),u.closeByEscape&&r.bind("keydown",s.onDocumentKeydown),c=function(a){var b=u.closeByDocument?d(a.target).hasClass("ngdialog-overlay"):!1,c=d(a.target).hasClass("ngdialog-close");(b||c)&&t.close(w.attr("id"))},"undefined"!=typeof a.Hammer?a.Hammer(w[0]).on("tap",c):w.bind("click",c),i+=1,t}),{id:"ngdialog"+f,closePromise:v.promise,close:function(){s.closeDialog(w)}}},openConfirm:function(a){var c=n.defer(),d={closeByEscape:!1,closeByDocument:!1};b.extend(d,a),d.scope=b.isObject(d.scope)?d.scope.$new():p.$new(),d.scope.confirm=function(a){c.resolve(a),e.close()};var e=t.open(d);return e.closePromise.then(function(){c.reject()}),c.promise},close:function(a){var b=d(document.getElementById(a));return b.length?s.closeDialog(b):t.closeAll(),t},closeAll:function(){var a=document.querySelectorAll(".ngdialog");b.forEach(a,function(a){s.closeDialog(d(a))})}};return t}]}),c.directive("ngDialog",["ngDialog",function(a){return{restrict:"A",scope:{ngDialogScope:"="},link:function(c,d,e){d.on("click",function(d){d.preventDefault();var f=b.isDefined(c.ngDialogScope)?c.ngDialogScope:"noScope";b.isDefined(e.ngDialogClosePrevious)&&a.close(e.ngDialogClosePrevious),a.open({template:e.ngDialog,className:e.ngDialogClass,controller:e.ngDialogController,scope:f,data:e.ngDialogData,showClose:"false"===e.ngDialogShowClose?!1:!0,closeByDocument:"false"===e.ngDialogCloseByDocument?!1:!0,closeByEscape:"false"===e.ngDialogCloseByEscape?!1:!0})})}}}])}(window,window.angular); |
{ | ||
"name": "ng-dialog", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"homepage": "https://github.com/likeastore/ngDialog", | ||
@@ -5,0 +5,0 @@ "description": "Modal dialogs and popups provider for Angular.js applications", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package