angular-stackables
Advanced tools
Comparing version 0.0.24 to 0.0.25
{ | ||
"name": "angular-stackables", | ||
"version": "0.0.24", | ||
"version": "0.0.25", | ||
"description": "AngularJS stackable widgets built on HTML5 dialog.", | ||
@@ -11,3 +11,3 @@ "authors": [ | ||
"dependencies": { | ||
"angular": "1.3.0-beta.19", | ||
"angular": "1.3.0-rc.0", | ||
"dialog-polyfill": "0.2.0" | ||
@@ -14,0 +14,0 @@ }, |
{ | ||
"name": "angular-stackables", | ||
"version": "0.0.24", | ||
"version": "0.0.25", | ||
"dependencies": {} | ||
} |
@@ -38,5 +38,6 @@ /*! | ||
var open = false; | ||
self.isOpen = false; | ||
var body = angular.element('body'); | ||
var dialog = element[0]; | ||
var parent; | ||
@@ -47,3 +48,3 @@ // get z-index of parent dialog, if any | ||
// no dialog parent; move dialog to body to simplify z-indexing | ||
body.append(dialog); | ||
parent = body; | ||
} else { | ||
@@ -62,7 +63,8 @@ // ensure element is above parent dialog | ||
if(!usePolyfill) { | ||
parentDialog.append(dialog); | ||
parent = parentDialog; | ||
} else { | ||
body.append(dialog); | ||
parent = body; | ||
} | ||
} | ||
dialog.remove(); | ||
@@ -86,3 +88,3 @@ // use polyfill if necessary | ||
e.stopPropagation(); | ||
scope.show = open = false; | ||
scope.show = self.isOpen = false; | ||
var count = body.data('stackables') - 1; | ||
@@ -105,3 +107,4 @@ body.data('stackables', count); | ||
if(value) { | ||
if(!open) { | ||
if(!self.isOpen) { | ||
parent.append(dialog); | ||
if(!!scope.modal) { | ||
@@ -113,3 +116,3 @@ dialog.showModal(); | ||
} | ||
open = true; | ||
self.isOpen = true; | ||
scope.stackable.error = scope.stackable.result = undefined; | ||
@@ -119,3 +122,3 @@ var count = body.data('stackables') || 0; | ||
} | ||
} else if(open) { | ||
} else if(self.isOpen) { | ||
// schedule dialog close to avoid $digest already in progress | ||
@@ -125,4 +128,5 @@ // as 'close' event handler may be called from here or externally | ||
dialog.close(); | ||
dialog.remove(); | ||
}); | ||
open = false; | ||
self.isOpen = false; | ||
} | ||
@@ -133,7 +137,8 @@ }); | ||
// ensure dialog is closed | ||
if(open) { | ||
if(self.isOpen) { | ||
setTimeout(function() { | ||
dialog.close(); | ||
dialog.remove(); | ||
}); | ||
open = false; | ||
self.isOpen = false; | ||
} | ||
@@ -140,0 +145,0 @@ dialog.removeEventListener('cancel', cancelListener); |
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
25962
7
734