fix notify style

- transparent black background (neutral style)
- icons for success and error
This commit is contained in:
Felix Niklas 2015-09-30 17:52:30 +02:00
parent 4af42c094b
commit 6a3c17a722
3 changed files with 18 additions and 19 deletions

View file

@ -39,10 +39,12 @@ class App.Notify extends App.ControllerWidgetPermanent
$('#notify').noty $('#notify').noty
text: data.msg text: data.msg
type: data.type type: data.type
template: App.view('notify')
type: data.type
animation: animation:
open: 'animated fadeInDown' open: 'animated fadeInDown'
close: 'animated fadeOutDown' close: 'animated fadeOutDown'
timeout: data.timeout || 3800 timeout: false #data.timeout || 3800
closeWith: ['click'] closeWith: ['click']
destroy: (e) -> destroy: (e) ->

View file

@ -1,4 +1,9 @@
<div class="alert <%= @data.type %>"> <div class="noty_message">
<a class="close" href="#">×</a> <% if @type is 'error': %>
<%= @data.text %> <%- @Icon('diagonal-cross', 'icon-error') %>
<% end %>
<% if @type is 'success': %>
<%- @Icon('checkmark') %>
<% end %>
<span class="noty_text"></span>
</div> </div>

View file

@ -1913,11 +1913,11 @@ ol.tabs li {
} }
.icon-checkmark { .icon-checkmark {
fill: #38AE6A; fill: $supergood-color;
} }
.icon-error { .icon-error {
fill: #F35910; fill: $superbad-color;
} }
.loading.icon { .loading.icon {
@ -2243,7 +2243,6 @@ footer {
.navigation .nav-tab-name { .navigation .nav-tab-name {
text-align: left; text-align: left;
padding-bottom: 2px;
} }
.tasks-navigation .nav-tab-icon .error { .tasks-navigation .nav-tab-icon .error {
@ -6454,23 +6453,16 @@ output {
.noty_message { .noty_message {
pointer-events: auto; pointer-events: auto;
display: inline-block; display: inline-block;
background: hsl(203,65%,55%); background: rgba(0,0,0,.75);
padding: 10px 15px 8px; padding: 10px 15px 8px;
border-radius: 3px; border-radius: 3px;
color: white; color: white;
} }
&.noty_type_success .noty_message { .icon {
background: hsl(145,51%,45%); vertical-align: middle;
} margin-top: -3px;
margin-right: 5px;
&.noty_type_alert .noty_message {
color: hsl(45,98%,17%);
background: hsl(45,98%,63%);
}
&.noty_type_error .noty_message {
background: hsl(11,85%,48%);
} }
a { a {