Skip to content

Commit 11cbc18

Browse files
Fixes #20 by using correct id on timeout. Also removed extra banner appending.
1 parent 553b043 commit 11cbc18

File tree

9 files changed

+24
-195
lines changed

9 files changed

+24
-195
lines changed

Gruntfile.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ module.exports = function (grunt) {
3030
' Licensed MIT */\n',
3131
// Task configuration.
3232
concat: {
33-
options: {
34-
banner: '<%= banner %>',
35-
stripBanners: true
36-
},
3733
basic: {
3834
src: [distPath + 'angular-flash.js'],
3935
dest: distPath + 'angular-flash.js'

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-flash-alert",
3-
"version": "2.2.0",
3+
"version": "2.2.1",
44
"homepage": "https://github.com/sachinchoolur/angular-flash",
55
"authors": [
66
"Sachin N <[email protected]>"

dist/angular-flash.css

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/*! angular-flash - v2.2.0 - 2016-02-10
2-
* https://github.com/sachinchoolur/angular-flash
3-
* Copyright (c) 2016 Sachin; Licensed MIT */
41
.alert {
52
padding: 15px;
63
margin-bottom: 20px;
@@ -95,13 +92,14 @@
9592
filter: alpha(opacity=50);
9693
opacity: .5;
9794
}
95+
9896
div.close {
9997
-webkit-appearance: none;
10098
padding: 0;
10199
cursor: pointer;
102100
background: transparent;
103101
border: 0;
104-
font-size: 1.7em;
102+
font-size: 1.7em;
105103
}
106104
.sr-only {
107105
position: absolute;

dist/angular-flash.js

Lines changed: 2 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angular-flash.js.map

Lines changed: 1 addition & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angular-flash.min.css

Lines changed: 10 additions & 161 deletions
Original file line numberDiff line numberDiff line change
@@ -1,141 +1,7 @@
1-
/*! angular-flash - v2.2.0 - 2016-02-10
2-
* https://github.com/sachinchoolur/angular-flash
3-
* Copyright (c) 2016 Sachin; Licensed MIT */
41
.alert .alert-link, .close {
52
font-weight: 700
63
}
74

8-
button.close, div.close {
9-
-webkit-appearance: none;
10-
cursor: pointer
11-
}
12-
13-
div.close {
14-
padding: 0;
15-
background: 0 0;
16-
border: 0;
17-
font-size: 1.7em
18-
}
19-
20-
/*! angular-flash - v2.2.0 - 2016-02-06
21-
* https://github.com/sachinchoolur/angular-flash
22-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.2.0 - 2016-02-06
23-
* https://github.com/sachinchoolur/angular-flash
24-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.2.0 - 2016-02-06
25-
* https://github.com/sachinchoolur/angular-flash
26-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
27-
* https://github.com/sachinchoolur/angular-flash
28-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
29-
* https://github.com/sachinchoolur/angular-flash
30-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
31-
* https://github.com/sachinchoolur/angular-flash
32-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
33-
* https://github.com/sachinchoolur/angular-flash
34-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
35-
* https://github.com/sachinchoolur/angular-flash
36-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
37-
* https://github.com/sachinchoolur/angular-flash
38-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
39-
* https://github.com/sachinchoolur/angular-flash
40-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
41-
* https://github.com/sachinchoolur/angular-flash
42-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
43-
* https://github.com/sachinchoolur/angular-flash
44-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
45-
* https://github.com/sachinchoolur/angular-flash
46-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
47-
* https://github.com/sachinchoolur/angular-flash
48-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
49-
* https://github.com/sachinchoolur/angular-flash
50-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
51-
* https://github.com/sachinchoolur/angular-flash
52-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
53-
* https://github.com/sachinchoolur/angular-flash
54-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
55-
* https://github.com/sachinchoolur/angular-flash
56-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
57-
* https://github.com/sachinchoolur/angular-flash
58-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
59-
* https://github.com/sachinchoolur/angular-flash
60-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
61-
* https://github.com/sachinchoolur/angular-flash
62-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
63-
* https://github.com/sachinchoolur/angular-flash
64-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
65-
* https://github.com/sachinchoolur/angular-flash
66-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
67-
* https://github.com/sachinchoolur/angular-flash
68-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
69-
* https://github.com/sachinchoolur/angular-flash
70-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
71-
* https://github.com/sachinchoolur/angular-flash
72-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
73-
* https://github.com/sachinchoolur/angular-flash
74-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
75-
* https://github.com/sachinchoolur/angular-flash
76-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
77-
* https://github.com/sachinchoolur/angular-flash
78-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-06
79-
* https://github.com/sachinchoolur/angular-flash
80-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.1.0 - 2016-02-05
81-
* https://github.com/sachinchoolur/angular-flash
82-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-02-01
83-
* https://github.com/sachinchoolur/angular-flash
84-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-02-01
85-
* https://github.com/sachinchoolur/angular-flash
86-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-02-01
87-
* https://github.com/sachinchoolur/angular-flash
88-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-02-01
89-
* https://github.com/sachinchoolur/angular-flash
90-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-02-01
91-
* https://github.com/sachinchoolur/angular-flash
92-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-02-01
93-
* https://github.com/sachinchoolur/angular-flash
94-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-02-01
95-
* https://github.com/sachinchoolur/angular-flash
96-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-02-01
97-
* https://github.com/sachinchoolur/angular-flash
98-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-02-01
99-
* https://github.com/sachinchoolur/angular-flash
100-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-02-01
101-
* https://github.com/sachinchoolur/angular-flash
102-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-02-01
103-
* https://github.com/sachinchoolur/angular-flash
104-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-02-01
105-
* https://github.com/sachinchoolur/angular-flash
106-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-01-21
107-
* https://github.com/sachinchoolur/angular-flash
108-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-01-21
109-
* https://github.com/sachinchoolur/angular-flash
110-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-01-17
111-
* https://github.com/sachinchoolur/angular-flash
112-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-01-17
113-
* https://github.com/sachinchoolur/angular-flash
114-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-01-17
115-
* https://github.com/sachinchoolur/angular-flash
116-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-01-17
117-
* https://github.com/sachinchoolur/angular-flash
118-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-01-17
119-
* https://github.com/sachinchoolur/angular-flash
120-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-01-17
121-
* https://github.com/sachinchoolur/angular-flash
122-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-01-17
123-
* https://github.com/sachinchoolur/angular-flash
124-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-01-17
125-
* https://github.com/sachinchoolur/angular-flash
126-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-01-17
127-
* https://github.com/sachinchoolur/angular-flash
128-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-01-17
129-
* https://github.com/sachinchoolur/angular-flash
130-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-01-17
131-
* https://github.com/sachinchoolur/angular-flash
132-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-01-17
133-
* https://github.com/sachinchoolur/angular-flash
134-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-01-17
135-
* https://github.com/sachinchoolur/angular-flash
136-
* Copyright (c) 2016 Sachin; Licensed MIT *//*! angular-flash - v2.0.0 - 2016-01-17
137-
* https://github.com/sachinchoolur/angular-flash
138-
* Copyright (c) 2016 Sachin; Licensed MIT */
1395
.alert {
1406
padding: 15px;
1417
margin-bottom: 20px;
@@ -219,6 +85,11 @@ div.close {
21985
border-top-color: #e4b9c0
22086
}
22187

88+
.sr-only, div.close {
89+
padding: 0;
90+
border: 0
91+
}
92+
22293
.alert-danger .alert-link {
22394
color: #843534
22495
}
@@ -241,40 +112,18 @@ div.close {
241112
opacity: .5
242113
}
243114

244-
button.close {
245-
padding: 0;
115+
div.close {
116+
-webkit-appearance: none;
117+
cursor: pointer;
246118
background: 0 0;
247-
border: 0
119+
font-size: 1.7em
248120
}
249121

250122
.sr-only {
251123
position: absolute;
252124
width: 1px;
253125
height: 1px;
254-
padding: 0;
255126
margin: -1px;
256127
overflow: hidden;
257-
clip: rect(0, 0, 0, 0);
258-
border: 0
259-
}
260-
261-
.alertIn, .alertOut {
262-
-webkit-transition: -webkit-transform .22s cubic-bezier(.25, 0, .25, 1), opacity .22s cubic-bezier(.25, 0, .25, 1);
263-
-moz-transition: -moz-transform .22s cubic-bezier(.25, 0, .25, 1), opacity .22s cubic-bezier(.25, 0, .25, 1);
264-
-o-transition: -o-transform .22s cubic-bezier(.25, 0, .25, 1), opacity .22s cubic-bezier(.25, 0, .25, 1);
265-
transition: transform .22s cubic-bezier(.25, 0, .25, 1), opacity .22s cubic-bezier(.25, 0, .25, 1)
266-
}
267-
268-
.alertIn.ng-hide-remove, .alertOut.ng-hide-add.ng-hide-add-active {
269-
opacity: 0;
270-
-webkit-transform: translate3d(100px, 0, 0);
271-
transform: translate3d(100px, 0, 0);
272-
display: block !important
273-
}
274-
275-
.alertIn.ng-hide-remove.ng-hide-remove-active, .alertOut.ng-hide-add {
276-
opacity: 1;
277-
display: block !important;
278-
-webkit-transform: translate3d(0, 0, 0);
279-
transform: translate3d(0, 0, 0)
128+
clip: rect(0, 0, 0, 0)
280129
}

dist/angular-flash.min.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! angular-flash - v2.2.0 - 2016-02-10
1+
/*! angular-flash - v2.2.0 - 2016-02-22
22
* https://github.com/sachinchoolur/angular-flash
33
* Copyright (c) 2016 Sachin; Licensed MIT */
44
"use strict";
@@ -57,8 +57,8 @@ app.run(["$rootScope", function(a) {
5757
config: h,
5858
id: e++
5959
}, k.showClose = "undefined" != typeof i ? i : d.defaultShowClose, d.defaultTimeout && "undefined" == typeof g ? k.timeout = d.defaultTimeout : g && (k.timeout = g), a.flashes.push(k), k.timeout && (k.timeoutObj = b(function(a) {
60-
j.dismiss(a)
61-
}, k.timeout, !0, k.id)), k.id
60+
j.dismiss(k.id)
61+
}, k.timeout)), k.id
6262
}, d.pause = function(c) {
6363
a.flashes[c].timeoutObj && b.cancel(a.flashes[c].timeoutObj)
6464
}, d.dismiss = function(b) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-flash-alert",
3-
"version": "2.2.0",
3+
"version": "2.2.1",
44
"description": "Flash message for AngularJS and Bootstrap",
55
"keywords": [
66
"angular-flash",

src/angular-flash.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! angular-flash - v2.2.0 - 2016-02-06
1+
/*! angular-flash - v2.2.1 - 2016-02-06
22
* https://github.com/sachinchoolur/angular-flash
33
* Copyright (c) 2016 Sachin; Licensed MIT */
44

@@ -101,9 +101,9 @@ app.factory('Flash', [
101101
}
102102
$rootScope.flashes.push(flash);
103103
if (flash.timeout) {
104-
flash.timeoutObj = $timeout(function(id) {
105-
$this.dismiss(id);
106-
}, flash.timeout, true, flash.id);
104+
flash.timeoutObj = $timeout(function() {
105+
$this.dismiss(flash.id);
106+
}, flash.timeout);
107107
}
108108
return flash.id;
109109
};

0 commit comments

Comments
 (0)