Skip to content

Commit

Permalink
v1.1.2
Browse files Browse the repository at this point in the history
Solved bug in Notify
  • Loading branch information
yagopv committed Dec 1, 2013
1 parent 82bb733 commit cc6a8c1
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 28 deletions.
2 changes: 1 addition & 1 deletion dist/css/Stashy.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Stashy v1.1.1 by @yperezva
* Stashy v1.1.2 by @yperezva
* Copyright 2013 Yago Pérez Vázquez
* Licensed under http://http://opensource.org/licenses/MIT
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/css/Stashy.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 17 additions & 7 deletions dist/js/Stashy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Stashy v1.1.1 by @yperezva
* Stashy v1.1.2 by @yperezva
* Copyright 2013 Yago Pérez Vázquez
* Licensed under http://http://opensource.org/licenses/MIT
*/
Expand Down Expand Up @@ -1621,11 +1621,15 @@ window.Modernizr = (function( window, document, undefined ) {
hide = function() {
self.element.addClass("fadeOut");
setTimeout(function() {
self.element.remove();
//Check for self because activeDurantion can be enabled
if (self) {
self.element.remove();
self = null;
}
if (toastC.children().length == 0) {
toastC.remove();
}
self = null;

}, self.options.animDuration == "fast" ? 1000 : 2000);
};
this.element.addClass((radius ? "radius" : " ") + " " + "fadeIn");
Expand All @@ -1649,11 +1653,14 @@ window.Modernizr = (function( window, document, undefined ) {
hide = function() {
self.element.addClass(positionY == "top" ? "fadeOutUp" : "fadeOutDown");
setTimeout(function() {
self.element.remove();
//Check for self because activeDurantion can be enabled
if (self) {
self.element.remove();
self = null;
}
if (barC.children().length == 0) {
barC.remove();
}
self = null;
}, self.options.animDuration == "fast" ? 1000 : 2000);
};
this.element.addClass(positionY == "top" ? "fadeInDown" : "fadeInUp");
Expand All @@ -1676,8 +1683,11 @@ window.Modernizr = (function( window, document, undefined ) {
hide = function() {
self.element.addClass(positionX == "left" ? "fadeOutLeft" : "fadeOutRight");
setTimeout(function() {
self.element.remove();
self = null;
//Check for self because activeDurantion can be enabled
if (self) {
self.element.remove();
self = null;
}
}, self.options.animDuration == "fast" ? 1000 : 2000);
};
this.element.addClass("panel " + positionX)
Expand Down
4 changes: 2 additions & 2 deletions dist/js/Stashy.min.js

Large diffs are not rendered by default.

22 changes: 16 additions & 6 deletions docs/public/Scripts/Stashy.js
Original file line number Diff line number Diff line change
Expand Up @@ -1615,11 +1615,15 @@ window.Modernizr = (function( window, document, undefined ) {
hide = function() {
self.element.addClass("fadeOut");
setTimeout(function() {
self.element.remove();
//Check for self because activeDurantion can be enabled
if (self) {
self.element.remove();
self = null;
}
if (toastC.children().length == 0) {
toastC.remove();
}
self = null;

}, self.options.animDuration == "fast" ? 1000 : 2000);
};
this.element.addClass((radius ? "radius" : " ") + " " + "fadeIn");
Expand All @@ -1643,11 +1647,14 @@ window.Modernizr = (function( window, document, undefined ) {
hide = function() {
self.element.addClass(positionY == "top" ? "fadeOutUp" : "fadeOutDown");
setTimeout(function() {
self.element.remove();
//Check for self because activeDurantion can be enabled
if (self) {
self.element.remove();
self = null;
}
if (barC.children().length == 0) {
barC.remove();
}
self = null;
}, self.options.animDuration == "fast" ? 1000 : 2000);
};
this.element.addClass(positionY == "top" ? "fadeInDown" : "fadeInUp");
Expand All @@ -1670,8 +1677,11 @@ window.Modernizr = (function( window, document, undefined ) {
hide = function() {
self.element.addClass(positionX == "left" ? "fadeOutLeft" : "fadeOutRight");
setTimeout(function() {
self.element.remove();
self = null;
//Check for self because activeDurantion can be enabled
if (self) {
self.element.remove();
self = null;
}
}, self.options.animDuration == "fast" ? 1000 : 2000);
};
this.element.addClass("panel " + positionX)
Expand Down
2 changes: 1 addition & 1 deletion docs/public/Scripts/vendor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Stashy",
"version": "1.1.1",
"version": "1.1.2",
"private": true,
"author" : "Yago Pérez Vázquez",
"scripts": {
Expand Down
22 changes: 16 additions & 6 deletions src/Stashy.Notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,15 @@
hide = function() {
self.element.addClass("fadeOut");
setTimeout(function() {
self.element.remove();
//Check for self because activeDurantion can be enabled
if (self) {
self.element.remove();
self = null;
}
if (toastC.children().length == 0) {
toastC.remove();
}
self = null;

}, self.options.animDuration == "fast" ? 1000 : 2000);
};
this.element.addClass((radius ? "radius" : " ") + " " + "fadeIn");
Expand All @@ -118,11 +122,14 @@
hide = function() {
self.element.addClass(positionY == "top" ? "fadeOutUp" : "fadeOutDown");
setTimeout(function() {
self.element.remove();
//Check for self because activeDurantion can be enabled
if (self) {
self.element.remove();
self = null;
}
if (barC.children().length == 0) {
barC.remove();
}
self = null;
}, self.options.animDuration == "fast" ? 1000 : 2000);
};
this.element.addClass(positionY == "top" ? "fadeInDown" : "fadeInUp");
Expand All @@ -145,8 +152,11 @@
hide = function() {
self.element.addClass(positionX == "left" ? "fadeOutLeft" : "fadeOutRight");
setTimeout(function() {
self.element.remove();
self = null;
//Check for self because activeDurantion can be enabled
if (self) {
self.element.remove();
self = null;
}
}, self.options.animDuration == "fast" ? 1000 : 2000);
};
this.element.addClass("panel " + positionX)
Expand Down
10 changes: 7 additions & 3 deletions tests/components/notify.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
<input type="radio" name="component" value="bar" /> <span>Bar</span>
<input type="radio" name="component" value="panel" /> <span>Panel</span>
</div>
<input type="text" name="activeDuration" value="" placeholder="Enter active duration" />
</form>
<button type="button">Show!!</button>
</div>
Expand All @@ -102,7 +103,8 @@
style : c.style,
contentType : c.contentType,
animDuration : c.animDuration,
closeArea : c.closeArea
closeArea : c.closeArea,
activeDuration : parseInt(c.activeDuration)
}).toast(c.positionX, c.positionY, c.radius ? true : false);
} else {
if (c.component == "bar") {
Expand All @@ -113,7 +115,8 @@
style : c.style,
contentType : c.contentType,
animDuration : c.animDuration,
closeArea : c.closeArea
closeArea : c.closeArea,
activeDuration : parseInt(c.activeDuration)
}).bar(c.positionY);
} else {
Stashy.Notify({
Expand All @@ -123,7 +126,8 @@
style : c.style,
contentType : c.contentType,
animDuration : c.animDuration,
closeArea : c.closeArea
closeArea : c.closeArea,
activeDuration : parseInt(c.activeDuration)
}).panel(c.positionX);
}
}
Expand Down

0 comments on commit cc6a8c1

Please sign in to comment.