Javi Jimenez Villar 13 лет назад
Родитель
Сommit
33414a93d7

+ 7 - 4
src/modules/Lungo.Notification.coffee

@@ -87,9 +87,9 @@ Lungo.Notification = do(lng = Lungo) ->
 
   ###
   ###
-  push = (title, icon) ->
-    _show _markup(title, null, icon), "push", false
-    _hide seconds = 5
+  push = (title, icon, style) ->
+    _show _markup(title, null, icon), "push #{style}", false
+    _hide 5
 
   _init = ->
     lng.dom(SELECTOR.BODY).append MARKUP_NOTIFICATION
@@ -113,7 +113,10 @@ Lungo.Notification = do(lng = Lungo) ->
   _hide = (seconds, callback) ->
     if seconds? and seconds > 0
       setTimeout (=>
-        if callback then callback.call undefined, callback
+        if callback
+          callback.call undefined, callback
+        else
+          do hide
       ), seconds * 1000
 
   _notify = (title, description, icon, stylesheet, seconds, callback) ->

+ 4 - 2
src/stylesheets/theme/theme.widget.notification.styl

@@ -16,7 +16,8 @@
   &:not(.push)
     background-color: rgba(0,0,0,0.6)
   & .window
-    border-radius FORM_border_radius
+    &:not(.push)
+      border-radius FORM_border_radius
     &.growl
       background: rgba(0,0,0,0.75)
       & strong
@@ -45,7 +46,8 @@
         color: #fff
         border-radius FORM_border_radius FORM_border_radius 0px 0px
     &.push
-      background: rgba(0,0,0,0.65)
+      background: rgba(0,0,0,0.75)
+
     & button, & .button
       &:last-child
         border-radius 0px 0px FORM_border_radius FORM_border_radius