From e9ba8a4494228647a632c76a29bad4921cf20f9b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 12 Aug 2007 11:25:25 +0000 Subject: [PATCH] Changed AR error messages style (same as flash errors). Fixed flash styles for IE6. git-svn-id: http://redmine.rubyforge.org/svn/trunk@610 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 2 +- app/views/layouts/base.rhtml | 6 ++-- public/images/alert.png | Bin 581 -> 0 bytes public/images/false.png | Bin 689 -> 588 bytes public/stylesheets/application.css | 47 ++++++----------------------- 5 files changed, 15 insertions(+), 40 deletions(-) delete mode 100644 public/images/alert.png diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2293fcdc0..cdf69d76c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -211,7 +211,7 @@ module ApplicationHelper end content_tag("div", content_tag( - options[:header_tag] || "h2", lwr(:gui_validation_error, full_messages.length) + " :" + options[:header_tag] || "span", lwr(:gui_validation_error, full_messages.length) + ":" ) + content_tag("ul", full_messages.collect { |msg| content_tag("li", msg) }), "id" => options[:id] || "errorExplanation", "class" => options[:class] || "errorExplanation" diff --git a/app/views/layouts/base.rhtml b/app/views/layouts/base.rhtml index 7f29327e0..2b9619f23 100644 --- a/app/views/layouts/base.rhtml +++ b/app/views/layouts/base.rhtml @@ -138,8 +138,10 @@
- <%= content_tag('div', flash[:error], :id => 'flash', :class => 'error') if flash[:error] %> - <%= content_tag('div', flash[:notice], :id => 'flash', :class => 'notice') if flash[:notice] %> +
+ <%= content_tag('div', flash[:error], :class => 'error') if flash[:error] %> + <%= content_tag('div', flash[:notice], :class => 'notice') if flash[:notice] %> +
<%= yield %>
diff --git a/public/images/alert.png b/public/images/alert.png deleted file mode 100644 index 7cc6e4aee7d16da6fec084da74004e8ac988b49b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 581 zcmWkpT}V@582(n7b7MFq*_1BM0WTbpoMVtpk(xSmM>ocC7wLsG*331g(OD84O0+2& zClVQqa7lmbqS|88`lCS?F^KY9NS%JbufXUFg1(~g!<4>`@ILRu^SnH~?>p=Fby-Yx zCIEoN)7>fRY~6-&r`{X(SN7@D72*!SP6}k!fa521mvknI?{F zX85KS?oi7Cj@ifY9ET^)l=NhI+~akZzcZAZE10S4YlFH~ajLst0>E6o4a3Un`7Pbt zb;9L!0g%6J-U^oK`mMh=;06>BLNLY%AqXK-RZUSeQP5acv)f@JLG^(sLe>uLMra4n z3N#}?vWy*o@IXr^)l3?(0B16gcMvDgiUqAuAf*y?@-PvFatJ$&R9~Sen76`07G^V~ z-ADu$Nm1xv$pDW^MH+I_sFMf|DhU{BSW~GaBB7mPOyvQZ&?`hB#DbG1C9IZcQYIk* zi2{)ZXhxxFnJ5y?CP}GCR5kzM(~$n4Aujs*z>%--x5YhArz>#wW9(AIHsRmnUiewP z{0w&7Zm1EatuO!3@%ex`8y;`n%t@85FUm~yg1xP$cJ;^KwXPSb`X@I=ds_G2{1#t4 zXIdXao57j&skzi5xwk-szc z)RdUR#WMd&=&q&Am3;8%bDejvyUOjE|9w>`>;|uvuKCd9t>Nk5@WuLnzjh35R9WB1 R>9Bq`@VI@Qx%Oj|{{e+$2zLMg diff --git a/public/images/false.png b/public/images/false.png index 09e7d88fbd0a29ed35319feb3fc91b760fe69302..e308ddcd66d8d715148bb4ea14353ec4634670b2 100644 GIT binary patch delta 574 zcmV-E0>S;U1DZyWNB?KATcr^ zVQ>3%ATls8Hy|-HIx;XiF*G16FflMNlb|>j00007bV*G`2iFJ;3l%0%r2a+#000Sa zNLh0L01FZT01FZU(%pXi00004XF*Lt006O%3;baP0002eP=8ERMgRZ*_wVn9 zLdKk&*4Ea}&d$BPy|tyKr9wizb93+B-uL(S&SPW7007Pa0KE_pwL(JP-rl`qW3>UP{O7~h?_hV!CN=nXBQr2^G?`v!KdwchUg#VP3-g9&R zoSfEUWB;Y4|E;a(jEvr#obS%g|FyN=l$6#=O6Plf)@y6dT3XgxTIaR3jIIbL00001 zbW%=J06^y0W&i*Hwn;=mRCwBLk6RakKoo@wxi!rsmw$$Y+$LlaB|`51|1X)D^2B~Q z>)U7Tb@q{@Us-Qi%vCm|>+SwHGko4(V_~?*BsrZgL7Ju>;D#45?X@V58Gi-<001BJ|6u?C00eVFNmK|32nc)#WQYI&02y>eSaefwW^{L9 za%BK_cXuvnZfkR6VQ^(GZ*pgw?mQX*00KivL_t(Ijir&xOVn``#XtAwDC#t(Gl~yF ztuTzl2ZA(+Em}xe;3`_BMHd1z>xgrbwjKB~Gh0eSp&Uy| z;c!(|ZdOUj!+(CScYS$z`Ez9`G;qA3A%No$2nPMDv$N-)nRzcue|A?$FD~{e97bkf zhTre^mNhp&h`R3T(Ta+ITo-mYZ((8D#>hxI@K4~!*jWF{)YRS7jEwC<$Dtq)$STOr zMy|UnEa3al(D+p;yeGtk&CPos2M6nGYHQ1r9A~?DaeonFF)TkHOHM{+OpK4u{$5yU z{VzmGbVBxgp8r`4k03L6PKS{R{^6p}KnRIRp~}l*FD#FZ8*NqX;Mrng_X{ zX*2bjjdnu%egP-$q|fY08Ju&rwuk{SU~T8DOPrL-vtZ!9nI~}r2cXC7Vi7bQg4DHy z#zYYT$A93=33zM?Z~&6vW&nKgrWg>0m1&41x&e|>;Or^L0@47Fv-1`H#A#93n1t7p z(B;BXqHqdi-rCM$S<<=(Uig8!P+D6=fQFCAc7Qfyb?AovTcq9DoPQgmhj0000< KMNUMnLSTY8oj5lD diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 732d02753..fec62b92c 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -315,36 +315,6 @@ table.list tbody th { color: #777; } -/********** Validation error messages *************/ -#errorExplanation { - width: 400px; - border: 0; - padding: 7px; - padding-bottom: 3px; - margin-bottom: 0px; -} - -#errorExplanation h2 { - text-align: left; - font-weight: bold; - padding: 5px 5px 10px 26px; - font-size: 1em; - margin: -7px; - background: url(../images/alert.png) no-repeat 6px 6px; -} - -#errorExplanation p { - color: #333; - margin-bottom: 0; - padding: 5px; -} - -#errorExplanation ul li { - font-size: 1em; - list-style: none; - margin-left: -16px; -} - /*========== Drop down menu ==============*/ div.menu { background-color: #FFFFFF; @@ -696,24 +666,27 @@ padding-left: 26px; vertical-align: bottom; } -/***** Flash messages ****/ -#flash { +/***** Flash & error messages ****/ +#flash div, #errorExplanation { padding: 4px 4px 4px 30px; margin-bottom: 16px; - font-size: 1.2em; + font-size: 1.1em; border: 2px solid; } -#flash.error { - background: url(../images/false.png) 8px 50% no-repeat; +#flash div.error, #errorExplanation { + background: url(../images/false.png) 8px 5px no-repeat; background-color: #ffe3e3; border-color: #dd0000; color: #550000; } -#flash.notice { - background: url(../images/true.png) 8px 50% no-repeat; +#flash div.notice { + background: url(../images/true.png) 8px 5px no-repeat; background-color: #dfffdf; border-color: #9fcf9f; color: #005f00; } + +#errorExplanation ul { margin-bottom: 0px; } +#errorExplanation ul li { list-style: none; margin-left: -16px;}