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;}