dlegr250_material_design 0.2.26 → 0.2.27
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9758420d2761277350bc75918a4b1da07370315
|
4
|
+
data.tar.gz: 87eb1e9b5ac4829881cee9fd71eaaee87d57f705
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa8413a88889558faeff012f81067b57f597a9ac3a3e0c0d06553395b693961c7c6d5b8f3577fd9f7993cea1e9c999af441589debeb309dbfd92a0e477bb40a8
|
7
|
+
data.tar.gz: 326a9ecfa843b861099f2c6f7f173c42f42ee4739445286bb2779b3825a0345f267ce9c1bab607c8cda7b5432434ba38c7144440b8b009e8cda5aa4fa0127196
|
@@ -15,15 +15,16 @@ class App.MD.Snackbar
|
|
15
15
|
App.MD.Snackbar.create($("body").data("snackbar"))
|
16
16
|
|
17
17
|
if $("body").data("snackbar-error").length > 0
|
18
|
-
App.MD.Snackbar.create($("body").data("snackbar-error"), {
|
18
|
+
App.MD.Snackbar.create($("body").data("snackbar-error"), { cssClass: "snackbar-error" })
|
19
19
|
|
20
20
|
@create: (text, options = {}) ->
|
21
21
|
@text = text
|
22
22
|
|
23
23
|
# Set options to override defaults
|
24
24
|
@duration = options["duration"] || 5000
|
25
|
+
@animationDuration = options["animationDuration"] || 150
|
25
26
|
@delay = options["delay"] || 250
|
26
|
-
@
|
27
|
+
@cssClass = options["cssClass"] || ""
|
27
28
|
|
28
29
|
if @visible
|
29
30
|
# Force hide current one via animation
|
@@ -46,13 +47,13 @@ class App.MD.Snackbar
|
|
46
47
|
@element().html(@text)
|
47
48
|
@parent().addClass("has-animating-snackbar")
|
48
49
|
setTimeout (=>
|
49
|
-
@element().addClass(@
|
50
|
+
@element().addClass(@cssClass).addClass("visible")
|
50
51
|
$(".fab").addClass("move-with-snackbar")
|
51
52
|
), 50
|
52
53
|
|
53
54
|
setTimeout (=>
|
54
55
|
@parent().removeClass("has-animating-snackbar")
|
55
|
-
),
|
56
|
+
), @animationDuration
|
56
57
|
|
57
58
|
@hide: () ->
|
58
59
|
clearTimeout(@timeout)
|
@@ -62,7 +63,7 @@ class App.MD.Snackbar
|
|
62
63
|
|
63
64
|
setTimeout (=>
|
64
65
|
@parent().removeClass("has-animating-snackbar")
|
65
|
-
),
|
66
|
+
), @animationDuration
|
66
67
|
|
67
68
|
@element: () ->
|
68
69
|
$("#snackbar")
|