소스 검색

Default value for error or success notification

soyjavi 13 년 전
부모
커밋
399c8976dc
2개의 변경된 파일11개의 추가작업 그리고 6개의 파일을 삭제
  1. 2 2
      src/modules/Lungo.Notification.coffee
  2. 9 4
      src/stylesheets/theme/theme.widget.notification.styl

+ 2 - 2
src/modules/Lungo.Notification.coffee

@@ -73,13 +73,13 @@ Lungo.Notification = do(lng = Lungo) ->
 
   ###
   ###
-  success = (title, description, icon, seconds, callback) ->
+  success = (title, description, icon = "ok", seconds, callback) ->
     _notify title, description, icon, "success", seconds, callback
 
 
   ###
   ###
-  error = (title, description, icon, seconds, callback) ->
+  error = (title, description, icon = "remove-sign", seconds, callback) ->
     _notify title, description, icon, "error", seconds, callback
 
 

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

@@ -17,7 +17,7 @@
       border-radius FORM_border_radius FORM_border_radius 0 0
     &.growl
       border-radius BORDER_radius
-      background-color: COLOR
+      background-color: rgba(0,0,0,0.8)
       & strong
         color: darken(#fff, 25%)
         font-weight: 700
@@ -29,6 +29,7 @@
       & button, .button
         background-color: #fff
         color: THEME
+
         font-weight: 400
     &.html
       background-color: lighten(COLOR, 95%)
@@ -41,15 +42,19 @@
 
     &.error, &.success
       background-color: COLOR
-      border-bottom solid 0.4em
+      border-bottom: solid 0.4em
       color: #fff
       & small
         color: darken(#fff, 25%)
 
     &.error
-      border-color: DANGER
+      border-bottom-color: DANGER
+      & > .icon
+        color: DANGER
     &.success
-      border-color: SUCCESS
+      border-bottom-color: SUCCESS
+      & > .icon
+        color: SUCCESS
 
     &.html
       & .title