use icons from icon font for flash msgs

pull/722/head
Christian Ratz 11 years ago
parent 9c187506ba
commit 8891d17efc
  1. 14
      app/assets/stylesheets/default/application.css.erb
  2. 7
      app/assets/stylesheets/fonts/openproject_icon_font.css.sass
  3. 4
      app/helpers/application_helper.rb

@ -528,7 +528,7 @@ div#tab-content-members fieldset div.select-boxes .select2-container {
/***** Flash & error messages ****/
#errorExplanation, div.flash, .nodata, .warning {
padding: 4px 4px 4px 30px;
padding: 4px;
margin-bottom: 12px;
border: 2px solid;
margin: 0 0 10px;
@ -570,7 +570,7 @@ div.flash.error a:hover, div.flash.warning a:hover, div.flash.notice a:hover, #e
color: #A6750C;
}
#errorExplanation ul { font-size: 0.9em;}
#errorExplanation ul { font-size: 0.9em; margin-left: 30px;}
#errorExplanation h2, #errorExplanation p { display: none; }
/***** Ajax indicator ******/
@ -2206,23 +2206,19 @@ div.flash {
}
div.flash.error, #errorExplanation {
background: #FAAA96 url(<%= asset_path 'webalys/error.png' %>) 8px 50% no-repeat;
background-color: #FAAA96;
border: none;
color: #000000;
}
#errorExplanation {
background-position: 12px 50%;
}
div.flash.notice {
background: #C8F0BE url(<%= asset_path 'webalys/check.png' %>) 11px 6px no-repeat;
background-color: #C8F0BE;
border: none;
color: #000000;
}
div.flash.warning { /* orange */
background: #FFC38C url(<%= asset_path 'webalys/warning.png' %>) 9px 5px no-repeat;
background-color: #FFC38C;
border: none;
color: #000000;
text-align: left;

@ -110,6 +110,11 @@ $link_hover_color: #008BD0
.icon5:before
@include icon5-rules
#errorExplanation:before
@include icon-common
@include icon-rules
float: left
#context-menu .icon:before,
.icon-context:before
@include icon-context-rules
@ -151,6 +156,7 @@ dt.changeset:before,
.icon-duplicate:before
content: "\e00b"
#errorExplanation:before,
.icon-error:before
content: "\e00c"
@ -726,6 +732,7 @@ dt.reply:before,
.icon-yes2:before
content: "\e0c7"
.icon-notice:before,
.icon-yes:before
content: "\e0c8"

@ -266,9 +266,9 @@ module ApplicationHelper
# Renders flash messages
def render_flash_messages
if User.current.impaired?
flash.map { |k,v| content_tag('div', content_tag('a', join_flash_messages(v), :href => 'javascript:;'), :class => "flash #{k}") }.join.html_safe
flash.map { |k,v| content_tag('div', content_tag('a', join_flash_messages(v), :href => 'javascript:;'), :class => "flash #{k} icon icon-#{k}") }.join.html_safe
else
flash.map { |k,v| content_tag('div', join_flash_messages(v), :class => "flash #{k}") }.join.html_safe
flash.map { |k,v| content_tag('div', join_flash_messages(v), :class => "flash #{k} icon icon-#{k}") }.join.html_safe
end
end

Loading…
Cancel
Save