From f3fefe50f1135a37ab3838dda7bd3147eebd35ec Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 23 Mar 2015 18:40:58 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=A2=9E=E5=8A=A0flash=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=A0=B7=E5=BC=8F=202=E3=80=81=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=80=81=E5=B8=88=E5=88=9B=E5=BB=BA=E4=BD=9C=E4=B8=9A=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E7=9A=84js=203=E3=80=81=E4=BF=AE=E6=94=B9=E8=80=81?= =?UTF-8?q?=E5=B8=88=E5=88=9B=E5=BB=BA=E4=BD=9C=E4=B8=9A=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/attachments/_form.html.erb | 2 +- app/views/bids/_new_homework_form.html.erb | 63 ++++++++++++---------- app/views/courses/new_homework.html.erb | 7 +-- public/javascripts/course.js | 4 +- public/stylesheets/public.css | 47 ++++++++++++++++ 5 files changed, 85 insertions(+), 38 deletions(-) diff --git a/app/views/attachments/_form.html.erb b/app/views/attachments/_form.html.erb index 034cbdf1a..8b22ea417 100644 --- a/app/views/attachments/_form.html.erb +++ b/app/views/attachments/_form.html.erb @@ -31,7 +31,7 @@ <%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %> - <%= button_tag "文件浏览", :type=>"button", :onclick=>"_file.click()",:onmouseover => 'this.focus()',:class => 'sb' %> + <%= button_tag "文件浏览", :type=>"button", :onclick=>"_file.click()",:onmouseover => 'this.focus()',:class => 'sub_btn' %> <%= file_field_tag 'attachments[dummy][file]', :id => '_file', :class => 'file_selector', diff --git a/app/views/bids/_new_homework_form.html.erb b/app/views/bids/_new_homework_form.html.erb index 3150d6b6a..ae091159a 100644 --- a/app/views/bids/_new_homework_form.html.erb +++ b/app/views/bids/_new_homework_form.html.erb @@ -6,36 +6,41 @@
diff --git a/app/views/courses/new_homework.html.erb b/app/views/courses/new_homework.html.erb index 04456c4d2..29e09e18d 100644 --- a/app/views/courses/new_homework.html.erb +++ b/app/views/courses/new_homework.html.erb @@ -1,8 +1,3 @@ <%= labelled_form_for @homework, :url => {:controller => 'bids', :action => 'create_homework',:course_id => "#{params[:id] || params[:course_id]}"} do |f| %> - <%= render :partial => 'bids/new_homework_form', :locals => { :f => f } %> -
  • - <%= l(:button_create)%> - <%= link_to l(:button_cancel), homework_course_path(@course), :class => "blue_btn grey_btn fl c_white"%> -
    -
  • + <%= render :partial => 'bids/new_homework_form', :locals => { :bid_id => "new_bid" } %> <% end %> \ No newline at end of file diff --git a/public/javascripts/course.js b/public/javascripts/course.js index fdcac6601..f6bc4933c 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -116,10 +116,10 @@ $(function(){ }); }); -function submit_new_bid() +function submit_new_bid(id) { if(regex_bid_name()&®ex_evaluation_num()) { - $("#new_bid").submit(); + $("#"+id).submit(); } } \ No newline at end of file diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index d2528510c..7f2641b42 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -214,6 +214,53 @@ html>body #ajax-indicator { position: fixed; } padding-left: 26px; vertical-align: bottom; } +/***** end Ajax indicator ******/ + +/***** Flash & error messages ****/ +#errorExplanation, div.flash, .nodata, .warning, .conflict { + padding: 4px 4px 4px 30px; + margin-bottom: 12px; + font-size: 1.1em; + border: 2px solid; +} + +div.flash {margin-top: 8px;} + +div.flash.error, #errorExplanation { + background: url(../images/exclamation.png) 8px 50% no-repeat; + background-color: #ffe3e3; + border-color: #dd0000; + color: #880000; +} + +div.flash.notice { + background: url(../images/true.png) 8px 5px no-repeat; + background-color: #dfffdf; + border-color: #9fcf9f; + color: #005f00; +} + +div.flash.warning, .conflict { + background: url(../images/warning.png) 8px 5px no-repeat; + background-color: #FFEBC1; + border-color: #FDBF3B; + color: #A6750C; + text-align: left; +} + +.nodata, .warning { + text-align: center; + background-color: #FFEBC1; + border-color: #FDBF3B; + color: #A6750C; +} + +#errorExplanation ul { font-size: 0.9em;} +#errorExplanation h2, #errorExplanation p { display: none; } + +.conflict-details {font-size:80%;} +/***** end Flash & error messages ****/ + /*弹出框*/ .black_overlay{display:none;position:fixed;top:0px;left:0px;width:100%;height:100%;background-color:black;z-index:1001;-moz-opacity:0.8;opacity:.80;filter:alpha(opacity=80);} .white_content{display:none;position:fixed;top:15%;left:30%;width:420px;height: auto; margin-bottom:20px;padding:16px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;}