Skip to content

Commit fcb3750

Browse files
committed
Updated to v2.0.0
1 parent 02ed4d5 commit fcb3750

File tree

4 files changed

+26
-12
lines changed

4 files changed

+26
-12
lines changed

toastr.css

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
.toast-title {
1+
/*
2+
* Toastr
3+
* Version 2.0.0
4+
* Copyright 2012 John Papa and Hans Fjällemark.
5+
* All Rights Reserved.
6+
* Use, reproduction, distribution, and modification of this code is subject to the terms and
7+
* conditions of the MIT license, available at http://www.opensource.org/licenses/mit-license.php
8+
*
9+
* Author: John Papa and Hans Fjällemark
10+
* Project: https://github.com/CodeSeven/toastr
11+
*/
12+
.toast-title {
213
font-weight: bold;
314
}
415
.toast-message {
@@ -13,10 +24,7 @@
1324
color: #cccccc;
1425
text-decoration: none;
1526
}
16-
/*
17-
https://github.com/twitter/bootstrap/blob/master/less/close.less
18-
https://github.com/twitter/bootstrap/blob/master/less/alerts.less
19-
*/
27+
2028
.toast-close-button {
2129
position: relative;
2230
right: -0.3em;
@@ -40,6 +48,7 @@
4048
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40);
4149
filter: alpha(opacity=40);
4250
}
51+
4352
/*Additional properties for button version
4453
iOS requires the button element instead of an anchor tag.
4554
If you want the anchor version, it requires `href="#"`.*/

toastr.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/*
2+
* Toastr
3+
* Version 2.0.0
24
* Copyright 2012 John Papa and Hans Fjällemark.
35
* All Rights Reserved.
46
* Use, reproduction, distribution, and modification of this code is subject to the terms and
@@ -10,7 +12,7 @@
1012
; (function (define) {
1113
define(['jquery'], function ($) {
1214
return (function () {
13-
var version = '2.0.0rc1';
15+
var version = '2.0.0';
1416
var $container;
1517
var listener;
1618
var toastId = 0;
@@ -209,9 +211,12 @@
209211
if (!options.onclick && options.tapToDismiss) {
210212
$toastElement.click(hideToast);
211213
}
212-
if(options.closeButton && $closeElement){
213-
$closeElement.click(function(){ hideToast(true); });
214-
}
214+
if (options.closeButton && $closeElement) {
215+
$closeElement.click(function (event) {
216+
event.stopPropogation();
217+
hideToast(true);
218+
});
219+
}
215220

216221
if (options.onclick) {
217222
$toastElement.click(function () {

toastr.min.js

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

0 commit comments

Comments
 (0)