Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions dist/angular-flash.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**!
/**!
* @license angular-flash v0.1.13
* Copyright (c) 2013 William L. Bunselmeyer. https://github.com/wmluke/angular-flash
* License: MIT
Expand Down Expand Up @@ -39,11 +39,31 @@
});
}

this.clean = function () {
this.getCount = function () {
var c = 0;
if(_info){
++c;
}
if(_success){
++c;
}
if(_warn){
++c;
}
if(_error){
++c;
}
return c;
};

this.clean = function (keepDisplayed) {
_success = null;
_info = null;
_warn = null;
_error = null;
if(!keepDisplayed){
_notify(null, ''); // buffix - remove already displayed messages
}
_type = null;
};

Expand Down Expand Up @@ -183,6 +203,8 @@
if (!isBlank(attr.activeClass)) {
element.removeClass(attr.activeClass);
}
$scope.flash = {}; // bugfix https://github.com/wmluke/angular-flash/issues/34
element.css({display : 'none'}); // bugfix for close button
};

$scope.$on('$destroy', function () {
Expand Down Expand Up @@ -213,6 +235,8 @@
element.addClass(attr.activeClass);
}

element.css({display : 'block'}); // bugfix for close button

if (!message) {
$scope.hide();
return;
Expand Down
5 changes: 3 additions & 2 deletions dist/angular-flash.min.js

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

4 changes: 4 additions & 0 deletions src/directives/flash-alert-directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
if (!isBlank(attr.activeClass)) {
element.removeClass(attr.activeClass);
}
$scope.flash = {}; // bugfix https://github.com/wmluke/angular-flash/issues/34
element.css({display : 'none'}); // bugfix for close button
};

$scope.$on('$destroy', function () {
Expand Down Expand Up @@ -53,6 +55,8 @@
element.addClass(attr.activeClass);
}

element.css({display : 'block'}); // bugfix for close button

if (!message) {
$scope.hide();
return;
Expand Down
22 changes: 21 additions & 1 deletion src/services/flash-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,31 @@
});
}

this.clean = function () {
this.getCount = function () {
var c = 0;
if(_info){
++c;
}
if(_success){
++c;
}
if(_warn){
++c;
}
if(_error){
++c;
}
return c;
};

this.clean = function (keepDisplayed) {
_success = null;
_info = null;
_warn = null;
_error = null;
if(!keepDisplayed){
_notify(null, ''); // buffix - remove already displayed messages
}
_type = null;
};

Expand Down