- <%= render :partial => 'files/new_style_attachment_list',:locals => {:course => course} %>
+ <%= render :partial => 'files/new_style_attachment_list',:locals => {:container => course} %>
-
+
确 定
diff --git a/app/views/homework_common/start_anonymous_comment.js.erb b/app/views/homework_common/start_anonymous_comment.js.erb
index b0424bf7a..ea63ea12c 100644
--- a/app/views/homework_common/start_anonymous_comment.js.erb
+++ b/app/views/homework_common/start_anonymous_comment.js.erb
@@ -1,12 +1,19 @@
<% if @statue == 1%>
-alert('启动成功');
-$("#<%= @homework.id %>_start_anonymous_comment").replaceWith('<%= escape_javascript(link_to "关闭匿评", alert_anonymous_comment_homework_common_path(@homework), remote: true, id:"#{@homework.id}_stop_anonymous_comment",:class => "postOptionLink")%>');
+ alert('启动成功');
+ <% if @user_activity_id == -1 %>
+ $("#homework_common_<%= @homework.id %>").replaceWith("<%= escape_javascript(render :partial => "users/user_homework_detail",:locals => {:homework_common => @homework, :is_in_course => @is_in_course})%>");
+ init_activity_KindEditor_data(<%= @homework.id%>,"","87%");
+ <% else %>
+ $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_homework', :locals => {:activity => @homework,:user_activity_id =>@user_activity_id,:course_activity=>@course_activity}) %>");
+ init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%");
+ <% end %>
+/*$("#<%#= @homework.id %>_start_anonymous_comment").replaceWith('<%#= escape_javascript(link_to "关闭匿评", alert_anonymous_comment_homework_common_path(@homework), remote: true, id:"#{@homework.id}_stop_anonymous_comment",:class => "postOptionLink")%>');*/
<% elsif @statue == 2 %>
-alert('启动失败\n作业总数大于等于2份时才能启动匿评');
+ alert('启动失败\n作业总数大于等于2份时才能启动匿评');
<% elsif @statue == 3%>
-alert("已开启匿评,请务重复开启");
+ alert("已开启匿评,请务重复开启");
<% elsif @statue == 4%>
-alert("您没有权限开启匿评");
+ alert("您没有权限开启匿评");
<% elsif @statue == 5%>
-alert("作业提交截止之后才能启动匿评");
+ alert("作业提交截止之后才能启动匿评");
<% end %>
\ No newline at end of file
diff --git a/app/views/homework_common/stop_anonymous_comment.js.erb b/app/views/homework_common/stop_anonymous_comment.js.erb
index 4725d5731..214a157dc 100644
--- a/app/views/homework_common/stop_anonymous_comment.js.erb
+++ b/app/views/homework_common/stop_anonymous_comment.js.erb
@@ -1,2 +1,10 @@
-$("#<%= @homework.id %>_stop_anonymous_comment").replaceWith('');
-alert('关闭成功');
\ No newline at end of file
+alert('关闭成功');
+<% if @user_activity_id == -1 %>
+$("#homework_common_<%= @homework.id %>").replaceWith("<%= escape_javascript(render :partial => "users/user_homework_detail",:locals => {:homework_common => @homework, :is_in_course => @is_in_course})%>");
+init_activity_KindEditor_data(<%= @homework.id%>,"","87%");
+<% else %>
+$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_homework', :locals => {:activity => @homework,:user_activity_id =>@user_activity_id,:course_activity=>@course_activity}) %>");
+init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%");
+<% end %>
+/*
+$("#<%#= @homework.id %>_stop_anonymous_comment").replaceWith('');*/
diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb
index e06db1d0f..d2186118d 100644
--- a/app/views/layouts/base_projects.html.erb
+++ b/app/views/layouts/base_projects.html.erb
@@ -226,7 +226,7 @@
function project_files_upload()
{
- $('#ajax-modal').html('<%= escape_javascript(render :partial => 'files/upload_show_project',:locals => {:project => @project}) %>');
+ $('#ajax-modal').html('<%= escape_javascript(render :partial => 'projects/upload_project_files_on_navbar',:locals => {:container => @project}) %>');
showModal('ajax-modal', '513px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before(" ");
diff --git a/app/views/memos/edit.html.erb b/app/views/memos/edit.html.erb
index d26ebdbf8..cace5bcc8 100644
--- a/app/views/memos/edit.html.erb
+++ b/app/views/memos/edit.html.erb
@@ -7,10 +7,11 @@
$("#error").html('主题不能超过50个字符').show();
return;
}
-// if(memo_content.html().trim().length > 5000 ){
-// $("#error").html('内容不能超过5000个字符').show();
-// return;
-// }
+ if(memo_content.html().length > 20000){
+ $("#error").html("内容 过长(最长为 20000 个字符)").show();
+ $("html,body").animate({scrollTop:$("#error").offset().top},1000)
+ return false;
+ }
memo_content.sync();
$("#edit_memo").submit();
}else if($("textarea[name='memo[subject]']").val().trim() == "" && !memo_content.isEmpty() ){
diff --git a/app/views/projects/_upload_project_files_list.html.erb b/app/views/projects/_upload_project_files_list.html.erb
new file mode 100644
index 000000000..59da30012
--- /dev/null
+++ b/app/views/projects/_upload_project_files_list.html.erb
@@ -0,0 +1,35 @@
+
+<% checkBox = (@course.present? && @course.is_public?) ? 'public' : 'private'%>
+<%= l(:label_browse) %>
+ <%= file_field_tag 'attachments[dummy][file]',
+ :id => "_file#{container.id}",
+ :class => ie8? ? '':'file_selector',
+ :multiple => true,
+ :onchange => "addInputFiles_board(this, '#{container.id}');",
+ :style => ie8? ? '': 'display:none',
+ :data => {
+ :max_file_size => Setting.attachment_max_size.to_i.kilobytes,
+ :max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
+ :max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
+ :upload_path => uploads_path(:format => 'js'),
+ :description_placeholder => l(:label_optional_description),
+ :field_is_public => l(:field_is_public),
+ :are_you_sure => l(:text_are_you_sure),
+ :file_count => l(:label_file_count),
+ :delete_all_files => l(:text_are_you_sure_all)
+ } %>
+
+
+
+
+ <%= l(:label_no_file_uploaded)%>
+
+(<%= l(:label_max_size) %>:
+<%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
+
\ No newline at end of file
diff --git a/app/views/projects/_upload_project_files_on_navbar.html.erb b/app/views/projects/_upload_project_files_on_navbar.html.erb
new file mode 100644
index 000000000..591e159f1
--- /dev/null
+++ b/app/views/projects/_upload_project_files_on_navbar.html.erb
@@ -0,0 +1,30 @@
+
+
+
+
<%= l(:label_upload_files)%>
+
+ <%= error_messages_for 'attachment' %>
+
<%= l(:label_file_upload_error_messages)%>
+
+ <%= form_tag(project_files_path(container), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %>
+
+
+ <%= render :partial => 'projects/upload_project_files_list',:locals => {:container => container} %>
+
+
<%= l(:button_cancel)%>
+
<%= l(:button_confirm)%>
+ <% end %>
+
+
+
+ <% content_for :header_tags do %>
+ <%= javascript_include_tag 'attachments' %>
+ <% end %>
+
+
+
\ No newline at end of file
diff --git a/app/views/projects/settings/_new_repositories.html.erb b/app/views/projects/settings/_new_repositories.html.erb
index 4ac5424f9..43535153d 100644
--- a/app/views/projects/settings/_new_repositories.html.erb
+++ b/app/views/projects/settings/_new_repositories.html.erb
@@ -73,8 +73,7 @@
<%=h repository.scm_name %>
<%if repository.scm_name=="Git"%>
<% rep_url = "http://" + repository.login.to_s + '_'+ repository.identifier.to_s + "@" + ip.to_s + h( repository.url.slice(project_path_cut, repository.url.length)) %>
-
+
diff --git a/app/views/student_work/_add_score.html.erb b/app/views/student_work/_add_score.html.erb
index 961f351de..0258b3b83 100644
--- a/app/views/student_work/_add_score.html.erb
+++ b/app/views/student_work/_add_score.html.erb
@@ -16,7 +16,7 @@
<%= render :partial => 'student_work/student_work_attachment_form', :locals => {:work => work,:score => score} %>
<%end%>
- 提交
+ 提交
<% end%>
\ No newline at end of file
diff --git a/app/views/student_work/_evaluation_un_title.html.erb b/app/views/student_work/_evaluation_un_title.html.erb
index 26c69d225..4ed0a538a 100644
--- a/app/views/student_work/_evaluation_un_title.html.erb
+++ b/app/views/student_work/_evaluation_un_title.html.erb
@@ -1,6 +1,6 @@
- 作品名称
+ 作品名称
姓名
学号
diff --git a/app/views/student_work/_evaluation_un_work.html.erb b/app/views/student_work/_evaluation_un_work.html.erb
index 6996ed6a6..ebe3d4cc6 100644
--- a/app/views/student_work/_evaluation_un_work.html.erb
+++ b/app/views/student_work/_evaluation_un_work.html.erb
@@ -28,7 +28,7 @@
<% if student_work.created_at && @homework.end_time%>
<%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M")%>
- <% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %>
+ <% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(format_time(student_work.created_at)).strftime("%Y-%m-%d") %>
[迟交]
<% end %>
<% end %>
@@ -80,5 +80,6 @@
<% end%>
+ 点击查看详情
diff --git a/app/views/student_work/_evaluation_work.html.erb b/app/views/student_work/_evaluation_work.html.erb
index 4a6a4eb68..81d868a50 100644
--- a/app/views/student_work/_evaluation_work.html.erb
+++ b/app/views/student_work/_evaluation_work.html.erb
@@ -1,62 +1,63 @@
-
-
- <% is_my_work = student_work.user == User.current%>
-
-
- <% if is_my_work%>
-
- <%= image_tag(url_to_avatar(student_work.user),width:"40", height: "40") %>
-
-
- <% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
-
- <%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word width285"%>
-
-
-
-
-
- <%= student_work.user.show_name%>
-
-
- <%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
-
-
-
- <% else%>
-
- <%= image_tag(url_to_avatar(""),width:"40", height: "40") %>
-
-
-
- <%= link_to "匿名的作品", student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word width285"%>
-
-
-
-
-
- <% end%>
-
-
-
-
- <%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M")%>
- <% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %>
- [迟交]
- <% end %>
-
-
-
- <% my_score = student_work_score(student_work,User.current) %>
-
- <%= my_score.nil? ? "--" : format("%.1f",my_score.score)%>
-
-
-
+
+
+ <% is_my_work = student_work.user == User.current%>
+
+
+ <% if is_my_work%>
+
+ <%= image_tag(url_to_avatar(student_work.user),width:"40", height: "40") %>
+
+
+ <% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
+
+ <%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word width285"%>
+
+
+
+
+
+ <%= student_work.user.show_name%>
+
+
+ <%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
+
+
+
+ <% else%>
+
+ <%= image_tag(url_to_avatar(""),width:"40", height: "40") %>
+
+
+
+ <%= link_to "匿名的作品", student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word width285"%>
+
+
+
+
+
+ <% end%>
+
+
+
+
+ <%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M")%>
+ <% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(format_time(student_work.created_at)).strftime("%Y-%m-%d") %>
+ [迟交]
+ <% end %>
+
+
+
+ <% my_score = student_work_score(student_work,User.current) %>
+
+ <%= my_score.nil? ? "--" : format("%.1f",my_score.score)%>
+
+ 点击查看详情
+
+
diff --git a/app/views/student_work/_programing_work_show.html.erb b/app/views/student_work/_programing_work_show.html.erb
index b5ff8f064..fd541c643 100644
--- a/app/views/student_work/_programing_work_show.html.erb
+++ b/app/views/student_work/_programing_work_show.html.erb
@@ -3,21 +3,21 @@
- <% @work.student_work_tests.each_with_index do |test, index| %>
+ <% work.student_work_tests.each_with_index do |test, index| %>
- 第<%= @work.student_work_tests.count - index%>次测试
+ 第<%= work.student_work_tests.count - index%>次测试
<%= test.created_at.to_s(:db) %>
@@ -79,24 +79,24 @@
<% end%>
- <% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && @work.user != User.current )%>
+ <% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && work.user != User.current )%>
-
- <%= render :partial => 'add_score',:locals => {:work => @work,:score => @score}%>
+
+ <%= render :partial => 'add_score',:locals => {:work => work,:score => score}%>
<% end%>
-
- <%@student_work_scores.each do |score|%>
-
- <%= render :partial => 'student_work_score',:locals => {:score => score,:is_last => score == @student_work_scores.last}%>
+
+ <%student_work_scores.each do |student_score|%>
+
+ <%= render :partial => 'student_work_score',:locals => {:score => student_score,:is_last => student_score == student_work_scores.last}%>
<% end%>
-
收起
+
收起
\ No newline at end of file
diff --git a/app/views/student_work/_show.html.erb b/app/views/student_work/_show.html.erb
index cfc4129a8..286d5eb39 100644
--- a/app/views/student_work/_show.html.erb
+++ b/app/views/student_work/_show.html.erb
@@ -3,21 +3,21 @@
上交时间:
- <%=format_time @work.created_at %>
+ <%=format_time work.created_at %>
- <% if @work.user == User.current && @homework.homework_detail_manual.comment_status == 1 %>
+ <% if work.user == User.current && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d") %>
- <%= link_to("", student_work_path(@work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del") %>
+ <%= link_to("", student_work_path(work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del") %>
- <%= link_to "",edit_student_work_path(@work),:class => "pic_edit"%>
+ <%= link_to "",edit_student_work_path(work),:class => "pic_edit"%>
<% end%>
- <% if @homework.homework_detail_manual.comment_status == 3 && @work.user != User.current%>
+ <% if @homework.homework_detail_manual.comment_status == 3 && work.user != User.current%>
-
+
<%= render :partial => 'student_work_praise' %>
<% end%>
@@ -25,50 +25,50 @@
- <% if @work.project%>
+ <% if work.project%>
关联项目:
- <%= link_to( @work.project.name, project_path(@work.project.id), :class => "linkBlue" )%>
+ <%= link_to( work.project.name, project_path(work.project.id), :class => "linkBlue" )%>
<% end%>
内容:
- <%= text_format(@work.description) if @work.description%>
+ <%= text_format(work.description) if work.description%>
附件:
- <% if @work.attachments.empty?%>
+ <% if work.attachments.empty?%>
尚未提交附件
<% else%>
- <%= render :partial => 'work_attachments_status', :locals => {:attachments => @work.attachments, :status => @homework.homework_detail_manual.comment_status} %>
+ <%= render :partial => 'work_attachments_status', :locals => {:attachments => work.attachments, :status => @homework.homework_detail_manual.comment_status} %>
<% end%>
- <% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && @work.user != User.current )%>
+ <% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && work.user != User.current )%>
-
- <%= render :partial => 'add_score',:locals => {:work => @work,:score => @score}%>
+
+ <%= render :partial => 'add_score',:locals => {:work => work,:score => score}%>
<% end%>
-
- <%@student_work_scores.each do |score|%>
-
- <%= render :partial => 'student_work_score',:locals => {:score => score,:is_last => score == @student_work_scores.last}%>
+
+ <%student_work_scores.each do |student_score|%>
+
+ <%= render :partial => 'student_work_score',:locals => {:score => student_score,:is_last => student_score == student_work_scores.last}%>
<% end%>
-
收起
+
收起
\ No newline at end of file
diff --git a/app/views/student_work/_student_work_list.html.erb b/app/views/student_work/_student_work_list.html.erb
index e23fcceda..64f097114 100644
--- a/app/views/student_work/_student_work_list.html.erb
+++ b/app/views/student_work/_student_work_list.html.erb
@@ -1,11 +1,11 @@
-
+
作品
- (<%= @student_work_count%>)
+ (已有<%= @student_work_count%>人提交)
<% if !@is_teacher && @stundet_works.empty?%>
- 未提交
+ 您尚未提交作品
<% end %>
<%if @is_teacher || @homework.homework_detail_manual.comment_status == 3%>
@@ -35,6 +35,14 @@
<%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work}%>
<% end%>
-
+
+ <% if student_work.user == User.current && !@is_evaluation %>
+ <% if @homework.homework_type == 2%>
+ <%=render :partial => 'programing_work_show', :locals=> {:work => student_work, :score =>student_work_score(student_work,User.current),:student_work_scores => student_work.student_works_scores.order("updated_at desc")} %>
+ <% else %>
+ <%=render :partial => 'show' , :locals=> {:work => student_work, :score =>student_work_score(student_work,User.current),:student_work_scores => student_work.student_works_scores.order("updated_at desc")} %>
+ <% end %>
+ <% end %>
+
<% end%>
\ No newline at end of file
diff --git a/app/views/student_work/_work_information.html.erb b/app/views/student_work/_work_information.html.erb
new file mode 100644
index 000000000..f8a55a03d
--- /dev/null
+++ b/app/views/student_work/_work_information.html.erb
@@ -0,0 +1,33 @@
+
+
+
请您确认刚刚上传的作品信息
+
+ 作品名称: <%=@student_work.name%>
+
+
+ 作品描述: <%=@student_work.description%>
+
+
+ 附 件:
+ <% if @student_work.attachments.empty? %>
+ <%= "无附件"%>
+ <% else %>
+
+ <%= render :partial => 'work_attachments_status', :locals => {:attachments => @student_work.attachments, :status => 2} %>
+
+ <% end %>
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/student_work/create.js.erb b/app/views/student_work/create.js.erb
new file mode 100644
index 000000000..42b1db8b8
--- /dev/null
+++ b/app/views/student_work/create.js.erb
@@ -0,0 +1,16 @@
+<% if @submit_result%>
+ $('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/work_information') %>');
+ showModal('ajax-modal', '500px');
+ $('#ajax-modal').siblings().remove();
+ $('#ajax-modal').before("
" +
+ " ");
+ $('#ajax-modal').parent().css("top","").css("left","");
+ $('#ajax-modal').parent().addClass("anonymos");
+<% else %>
+ window.location.href = '<%= new_student_work_url(:homework => @homework.id)%>';
+<% end %>
+
+function clickCanel() {
+ hideModal('#popbox02');
+ window.location.href = '<%= student_work_index_url(:homework => @homework.id)%>';
+}
\ No newline at end of file
diff --git a/app/views/student_work/edit.html.erb b/app/views/student_work/edit.html.erb
index 25a65f039..517a238b0 100644
--- a/app/views/student_work/edit.html.erb
+++ b/app/views/student_work/edit.html.erb
@@ -26,7 +26,7 @@
- <%= labelled_form_for @work,:html => { :multipart => true } do |f|%>
+ <%= labelled_form_for @work,:html => { :multipart => true },:remote=>true do |f|%>
提示:作品名称和描述中不要出现真实的姓名信息
@@ -52,7 +52,7 @@
-
确定
+
确定
或
<%= link_to "取消", student_work_index_path(:homework => @homework), :class => "fr mr10 mt3"%>
@@ -60,3 +60,12 @@
<% end%>
+
\ No newline at end of file
diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb
index 78f11737b..b0e70c9b0 100644
--- a/app/views/student_work/index.html.erb
+++ b/app/views/student_work/index.html.erb
@@ -120,14 +120,31 @@
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/app/views/student_work/show.js.erb b/app/views/student_work/show.js.erb
index e6b99c146..d61c4b9a1 100644
--- a/app/views/student_work/show.js.erb
+++ b/app/views/student_work/show.js.erb
@@ -3,9 +3,9 @@ if($("#about_hwork_<%= @work.id%>").children().length > 0){
}
else{
<% if @homework.homework_type == 2%>
- $("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'programing_work_show') %>");
+ $("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'programing_work_show',:locals => {:work =>@work,:score =>@score,:student_work_scores => @student_work_scores}) %>");
<% else%>
- $("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'show') %>");
+ $("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'show',:locals => {:work =>@work,:score =>@score,:student_work_scores => @student_work_scores}) %>");
<% end%>
$('#score_<%= @work.id%>').peSlider({range: 'min'});
}
\ No newline at end of file
diff --git a/app/views/student_work/update.js.erb b/app/views/student_work/update.js.erb
new file mode 100644
index 000000000..79733db31
--- /dev/null
+++ b/app/views/student_work/update.js.erb
@@ -0,0 +1,16 @@
+<% if @submit_result%>
+$('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/work_information') %>');
+showModal('ajax-modal', '500px');
+$('#ajax-modal').siblings().remove();
+$('#ajax-modal').before("" +
+ " ");
+$('#ajax-modal').parent().css("top","").css("left","");
+$('#ajax-modal').parent().addClass("anonymos");
+<% else %>
+window.location.href = '<%= edit_student_work_url(@work)%>';
+<% end %>
+
+function clickCanel() {
+ hideModal('#popbox02');
+ window.location.href = '<%= student_work_index_url(:homework => @homework.id)%>';
+}
\ No newline at end of file
diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb
index 77f7d97dd..38a4d6edd 100644
--- a/app/views/users/_course_homework.html.erb
+++ b/app/views/users/_course_homework.html.erb
@@ -13,25 +13,31 @@
<% end %> TO
<%= link_to activity.course.name.to_s+" | 课程作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course), :class => "newsBlue ml15"%>
-
+
<%= link_to activity.name.to_s, student_work_index_path(:homework => activity.id,:host=> Setting.host_course), :class => "postGrey"%>
<% if activity.homework_detail_manual%>
<% if activity.homework_detail_manual.comment_status == 1%>
<% if activity.anonymous_comment == 0%>
-
未开启匿评
+
未开启匿评
+ <% else %>
+
匿评已禁用
<% end %>
-
作品提交中
+
作品提交中
<% elsif activity.homework_detail_manual.comment_status == 2%>
<% if activity.anonymous_comment == 0%>
-
匿评中
+
匿评中
+ <% else %>
+
匿评已禁用
<% end %>
-
教师教辅评阅中
+
教师评阅中
<% elsif activity.homework_detail_manual.comment_status == 3%>
<% if activity.anonymous_comment == 0%>
-
匿评已结束
+
匿评已结束
+ <% else %>
+
匿评已禁用
<% end %>
-
教师教辅评阅中
+
教师评阅中
<% end%>
<% end%>
@@ -52,7 +58,7 @@
<% end %>
-
截止时间:<%= activity.end_time.to_s %>
+
截止时间:<%= activity.end_time.to_s %> 23:59
@@ -87,7 +93,7 @@
<%= link_to("匿评设置", start_evaluation_set_homework_common_path(activity),:class => "postOptionLink", :remote => true) if activity.homework_detail_manual.comment_status == 1%>
- <%= homework_anonymous_comment activity %>
+ <%= homework_anonymous_comment activity,-1,user_activity_id,course_activity %>
<% end %>
<% if activity.anonymous_comment == 0 && (comment_status == 0 || comment_status == 1)%>
@@ -161,6 +167,7 @@
<%= form_for('new_form',:url => {:controller => 'words', :action => 'leave_homework_message', :id => activity.id},:method => "post", :remote => true) do |f|%>
<%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %>
+ <%= hidden_field_tag 'course_activity',params[:course_activity],:value =>course_activity %>
发送
diff --git a/app/views/users/_resources_list.html.erb b/app/views/users/_resources_list.html.erb
index f134e8f42..6f47e3535 100644
--- a/app/views/users/_resources_list.html.erb
+++ b/app/views/users/_resources_list.html.erb
@@ -5,7 +5,7 @@
<% else %>
<% attachments.each do |attach| %>
-
+
+
+
<% end %>
<% end %>
diff --git a/app/views/users/_user_homework_detail.html.erb b/app/views/users/_user_homework_detail.html.erb
index 3d841b087..0c2a28e5c 100644
--- a/app/views/users/_user_homework_detail.html.erb
+++ b/app/views/users/_user_homework_detail.html.erb
@@ -10,28 +10,34 @@
TO
<%= link_to homework_common.course.name, course_path(homework_common.course_id), :class => "newsBlue ml15"%>
-
+
<%= link_to homework_common.name,student_work_index_path(:homework => homework_common.id),:class => "postGrey"%>
<% if homework_common.homework_detail_manual%>
<% if homework_common.homework_detail_manual.comment_status == 0 %>
- 未发布
+ 未发布
<% elsif homework_common.homework_detail_manual.comment_status == 1%>
<% if homework_common.anonymous_comment == 0%>
- 未开启匿评
+ 未开启匿评
+ <% else %>
+ 匿评已禁用
<% end %>
- 作品提交中
+ 作品提交中
<% elsif homework_common.homework_detail_manual.comment_status == 2%>
<% if homework_common.anonymous_comment == 0%>
- 匿评中
+ 匿评中
+ <% else %>
+ 匿评已禁用
<% end %>
- 教师教辅评阅中
+ 教师评阅中
<% elsif homework_common.homework_detail_manual.comment_status == 3%>
<% if homework_common.anonymous_comment == 0%>
- 匿评已结束
+ 匿评已结束
+ <% else %>
+ 匿评已禁用
<% end %>
- 教师教辅评阅中
+ 教师评阅中
<% end%>
<% end%>
@@ -50,14 +56,14 @@
<%= homework_common.language_name%>
<% end %>
+
+ <%= l(:label_end_time)%>:<%= homework_common.end_time%> 23:59
+
<% if homework_common.homework_detail_manual.comment_status == 0 %>
-
- <%= l(:label_publish_time)%>:<%= homework_common.publish_time%>
+
+ <%= l(:label_publish_time)%>:<%= homework_common.publish_time%> 00:00
<% end %>
-
- <%= l(:label_end_time)%>:<%= homework_common.end_time%>
-
@@ -92,9 +98,9 @@
<%= link_to("匿评设置", start_evaluation_set_homework_common_path(homework_common),:class => "postOptionLink", :remote => true)%>
<% end %>
- <% if homework_common.anonymous_comment == 0 &&(comment_status == 0 || comment_status == 1)%>
+ <% if homework_common.anonymous_comment == 0%>
- <%= homework_anonymous_comment homework_common %>
+ <%= homework_anonymous_comment(homework_common, is_in_course) %>
<% end %>
<% if homework_common.anonymous_comment == 0 && (comment_status == 0 || comment_status == 1)%>
diff --git a/app/views/users/_user_message_course.html.erb b/app/views/users/_user_message_course.html.erb
index b05afc63b..da649663d 100644
--- a/app/views/users/_user_message_course.html.erb
+++ b/app/views/users/_user_message_course.html.erb
@@ -66,9 +66,10 @@
课程名称:<%= ma.course_message.course.name %>
(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)
作业标题:<%= ma.course_message.name %>
-
提交截止:<%= ma.course_message.end_time %> 24点
-
匿评开始:<%= ma.course_message.homework_detail_manual.evaluation_start %> 24点
-
匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %> 24点
+
发布时间:<%= DateTime.parse(ma.course_message.created_at.to_s).strftime('%Y-%m-%d %H:%M').to_s %>
+
提交截止:<%= ma.course_message.end_time %> 23:59
+
匿评开始:<%= ma.course_message.homework_detail_manual.evaluation_start %> 23:59
+
匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %> 23:59
迟交扣分:<%= ma.course_message.late_penalty %>分
缺评扣分:<%= ma.course_message.homework_detail_manual.absence_penalty %>分
@@ -81,9 +82,9 @@
课程名称:<%= ma.course_message.course.name %>
(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)
作业标题:<%= ma.course_message.name %>
-
提交截止:<%= ma.course_message.end_time %> 24点
-
匿评开始:<%= ma.course_message.homework_detail_manual.evaluation_start %> 24点
-
匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %> 24点
+
提交截止:<%= ma.course_message.end_time %> 23:59
+
匿评开始:<%= ma.course_message.homework_detail_manual.evaluation_start %> 23:59
+
匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %> 23:59
迟交扣分:<%= ma.course_message.late_penalty %>分
缺评扣分:<%= ma.course_message.homework_detail_manual.absence_penalty %>分
@@ -116,9 +117,9 @@
课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)
作业标题:<%= ma.course_message.name %>
- 提交截止:<%= ma.course_message.end_time %> 24点
- 匿评开始:<%= ma.course_message.homework_detail_manual.evaluation_start %> 24点
- 匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %> 24点
+ 提交截止:<%= ma.course_message.end_time %> 23:59
+ 匿评开始:<%= ma.course_message.homework_detail_manual.evaluation_start %> 23:59
+ 匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %> 23:59
迟交扣分:<%= ma.course_message.late_penalty %>分
缺评扣分:<%= ma.course_message.homework_detail_manual.absence_penalty %>分
请抓紧时间提交您的作品,谢谢!
@@ -154,7 +155,7 @@
课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)
作业标题:<%= ma.course_message.name %>
缺评扣分:<%= ma.course_message.homework_detail_manual.absence_penalty %>分
- 匿评截止:<%= ma.course_message.homework_detail_manual.evaluation_end %> 24点
+ 匿评截止:<%= ma.course_message.homework_detail_manual.evaluation_end %> 23:59
<% unless User.current.allowed_to?(:as_teacher, ma.course_message.course)%>
请您尽早完成匿评!如果您在截止日期前未完成匿评,您的最终成绩将被扣除<%= ma.course_message.homework_detail_manual.absence_penalty %>分乘以缺评份数。
@@ -215,7 +216,7 @@
失败原因:提交作品的人数低于2人
课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年' + ma.course_message.course.term %>)
作业标题:<%= ma.course_message.name %>
-
提交截止:<%= ma.course_message.end_time%> 24点
+
提交截止:<%= ma.course_message.end_time%> 23:59
<%= time_tag(ma.created_at).html_safe %>
@@ -314,7 +315,7 @@
<% end %>
- 本次作业将在<%= ma.course_message.student_work.homework_common.homework_detail_manual.evaluation_end %> 24点结束匿评,到时您将可以看到所有其他同学的作品啦!大家可以进一步互相学习。 期待您取得更大的进步!
+ 本次作业将在<%= ma.course_message.student_work.homework_common.homework_detail_manual.evaluation_end %> 23:59结束匿评,到时您将可以看到所有其他同学的作品啦!大家可以进一步互相学习。 期待您取得更大的进步!
<% end %>
@@ -380,7 +381,7 @@
<%= link_to image_tag(url_to_avatar(ma.course_message.homework_common.user), :width => "30", :height => "30"), user_path(ma.course_message.homework_common.user) %>
- <%=link_to ma.course_message.homework_common.user.show_name, user_path(ma.course_message.homework_common.user), :class => "newsBlue homepageNewsPublisher" %>
+ <%=link_to ma.course_message.homework_common.user.show_name+"老师", user_path(ma.course_message.homework_common.user), :class => "newsBlue homepageNewsPublisher" %>
">发布的作业:
@@ -397,7 +398,7 @@
课程名称:<%= ma.course_message.homework_common.course.name %>(<%= ma.course_message.homework_common.course.time.to_s + '年' + ma.course_message.homework_common.course.term %>)
作业标题:<%= ma.course_message.homework_common.name %>
- 提交截止:<%= ma.course_message.homework_common.end_time %> 24:00
+ 提交截止:<%= ma.course_message.homework_common.end_time %> 23:59
提交时间:<%= format_time(ma.course_message.created_at) %>
迟交扣分:<%= ma.course_message.homework_common.late_penalty %>分
diff --git a/app/views/users/import_resources_to_homework.js.erb b/app/views/users/import_resources_to_homework.js.erb
index c929f48e5..804b4ec44 100644
--- a/app/views/users/import_resources_to_homework.js.erb
+++ b/app/views/users/import_resources_to_homework.js.erb
@@ -2,7 +2,7 @@
<% @attachments.each do |attachment| %>
$("#attachments_fields").append(
''+
- '<%= text_field_tag("attachments[p#{attachment.id}][filename]", attachment.filename, :class => "filename link_file", :readonly=>"readonly")%>'+
+ '<%= text_field_tag("attachments[p#{attachment.id}][filename]", attachment.filename, :class => "upload_filename link_file", :readonly=>"readonly")%>'+
'<%= text_field_tag("attachments[p#{attachment.id}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => "description", :style=>"display: inline-block;") %>'+
'<%= l(:field_is_public)%>: '+
'<%= check_box_tag("attachments[p#{attachment.id}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => "is_public")%>'+
diff --git a/app/views/users/new_user_commit_homework.html.erb b/app/views/users/new_user_commit_homework.html.erb
index c3a736058..0e2648509 100644
--- a/app/views/users/new_user_commit_homework.html.erb
+++ b/app/views/users/new_user_commit_homework.html.erb
@@ -112,7 +112,7 @@
<% if test.status.to_i == -2 %>
-
<%= test.results.first %>
+
<%= test.results.first %>
<% else %>
diff --git a/app/views/users/user_commit_homework.html.erb b/app/views/users/user_commit_homework.html.erb
index a7416cf40..6f14ce05d 100644
--- a/app/views/users/user_commit_homework.html.erb
+++ b/app/views/users/user_commit_homework.html.erb
@@ -86,7 +86,7 @@
<% if test.status.to_i == -2 %>
-
<%= test.results.first %>
+
<%= test.results.first %>
<% else %>
diff --git a/app/views/users/user_resource.html.erb b/app/views/users/user_resource.html.erb
index 5c6339e59..f6bb3c8cb 100644
--- a/app/views/users/user_resource.html.erb
+++ b/app/views/users/user_resource.html.erb
@@ -145,7 +145,6 @@
var id; //资源id
var sendType; //发送到课程 1 发送到项目 2
var lastSendType; //保存上次发送的发送类型
- var last_op
$("#resources_list").mousedown(function(e) {
//如果是右键的话
if (3 == e.which) {
@@ -180,28 +179,6 @@
last_line = line;
}
});
-
- //鼠标经过时,背景颜色设为灰色
- $("#resources_list").mouseover(function(e){
- pageX = e.clientX;
- pageY = e.clientY;
- var ele = document.elementFromPoint(pageX,pageY);
- line = $(ele).parent();
- if(last_op != null){
- last_op.children().css("background-color", 'white');
- restore();
- last_op == null;
- }
- //如果当前的tag是li,那么还要li的父级元素
- if(line.get(0).tagName === 'LI'){
- line = line.parent();
- }
- //将当前的元素的所有子元素的背景色改为蓝色
- line.children().css("background-color", '#e1e1e1');
- //将当前元素赋给 上一个对象 保存起来。
- last_op = line;
- });
-
//元素包含关系计算
var contains = function(root, el) {
if (root.compareDocumentPosition)
diff --git a/app/views/words/leave_homework_message.js.erb b/app/views/words/leave_homework_message.js.erb
index 91525c889..08fed725c 100644
--- a/app/views/words/leave_homework_message.js.erb
+++ b/app/views/words/leave_homework_message.js.erb
@@ -1,5 +1,5 @@
<% if @user_activity_id %>
- $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_homework', :locals => {:activity => @homework_common,:user_activity_id =>@user_activity_id}) %>");
+ $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_homework', :locals => {:activity => @homework_common,:user_activity_id =>@user_activity_id,:course_activity => @course_activity}) %>");
init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%");
<% elsif @homework_common_id && @is_in_course %>
$("#homework_common_<%= @homework_common_id %>").replaceWith("<%= escape_javascript(render :partial => 'users/user_homework_detail', :locals => {:homework_common => @homework_common,:is_in_course => @is_in_course}) %>");
diff --git a/config/application.rb b/config/application.rb
index 90cc299c6..6e4a2983a 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -41,7 +41,7 @@ module RedmineApp
config.active_record.store_full_sti_class = true
config.active_record.default_timezone = :local
-
+ config.time_zone = 'Beijing'
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'
diff --git a/config/locales/commons/zh.yml b/config/locales/commons/zh.yml
index 3b5e9790e..ee361cc2f 100644
--- a/config/locales/commons/zh.yml
+++ b/config/locales/commons/zh.yml
@@ -354,7 +354,7 @@ zh:
# 意见反馈
#
label_feedback: 意见反馈
- label_feedback_tips: "欢迎反馈网站问题,课程中遇到的问题请反馈给相关老师!"
+ label_feedback_tips: "请在此提问平台问题,或直接加入师姐答疑群,谢谢!"
label_technical_support: "QQ 在线支持:"
label_feedback_success: "您的意见已经反馈到公共贴吧的新手讨论吧,我们会第一时间解决您的问题,谢谢支持!"
label_feedback_value: "该帖来自用户反馈:)"
diff --git a/db/migrate/20151109073857_delete_journals_activity.rb b/db/migrate/20151109073857_delete_journals_activity.rb
new file mode 100644
index 000000000..ae7074c9c
--- /dev/null
+++ b/db/migrate/20151109073857_delete_journals_activity.rb
@@ -0,0 +1,40 @@
+class DeleteJournalsActivity < ActiveRecord::Migration
+ def up
+ UserActivity.all.each do |activity|
+ if activity.act_type == 'JournalsForMessage'
+ if activity.act
+ unless activity.act.m_parent_id.nil?
+ parent_act = UserActivity.where("act_id = #{activity.act.m_parent_id} and act_type='JournalsForMessage' and container_type='Principal'").first
+ if parent_act
+ parent_act.created_at = activity.act.parent.children.maximum("created_on")
+ parent_act.save
+ activity.destroy
+ end
+ end
+ else
+ activity.destroy
+ end
+ end
+ end
+
+ PrincipalActivity.all.each do |activity|
+ if activity.principal_act_type == 'JournalsForMessage'
+ if activity.principal_act
+ unless activity.principal_act.m_parent_id.nil?
+ parent_act = PrincipalActivity.where("principal_act_id = #{activity.principal_act.m_parent_id} and principal_act_type='JournalsForMessage'").first
+ if parent_act
+ parent_act.created_at = activity.principal_act.parent.children.maximum("created_on")
+ parent_act.save
+ activity.destroy
+ end
+ end
+ else
+ activity.destroy
+ end
+ end
+ end
+ end
+
+ def down
+ end
+end
diff --git a/db/migrate/20151109080256_alter_user_activities_update.rb b/db/migrate/20151109080256_alter_user_activities_update.rb
new file mode 100644
index 000000000..6e77c411f
--- /dev/null
+++ b/db/migrate/20151109080256_alter_user_activities_update.rb
@@ -0,0 +1,16 @@
+class AlterUserActivitiesUpdate < ActiveRecord::Migration
+ def up
+ count = UserActivity.all.count / 30 + 2
+ transaction do
+ for i in 1 ... count do i
+ UserActivity.page(i).per(30).each do |activity|
+ activity.updated_at = activity.created_at
+ activity.save
+ end
+ end
+ end
+ end
+
+ def down
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index b7e1bfa1c..7898b3f4d 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20151102090519) do
+ActiveRecord::Schema.define(:version => 20151109080256) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
diff --git a/lib/tasks/gitlab_to_git.rake b/lib/tasks/gitlab_to_git.rake
deleted file mode 100644
index 8b7f7279e..000000000
--- a/lib/tasks/gitlab_to_git.rake
+++ /dev/null
@@ -1,11 +0,0 @@
-#coding=utf-8
-
-namespace :rep_fault do
- desc "set ossean's type value"
- task :rep_update => :environment do
- rep = Repository.find(400)
- rep.type = "Repository::Git"
- rep.save
- end
-
-end
\ No newline at end of file
diff --git a/lib/tasks/sync_gitlab_user.rake b/lib/tasks/sync_gitlab_user.rake
new file mode 100644
index 000000000..c932ca36c
--- /dev/null
+++ b/lib/tasks/sync_gitlab_user.rake
@@ -0,0 +1,39 @@
+#coding=utf-8
+
+namespace :gitlab do
+ desc "sync gitlab's users which lost in last sync"
+ task :add_gid => :environment do
+ users = User.find_by_sql("select * from users where gid is null")
+ s = Trustie::Gitlab::Sync.new
+ g = Gitlab.client
+ users.each do |user|
+ us = g.get("/users?search=#{user.mail}")
+ puts user.mail
+ if us.blank?
+ puts "55555555555555555"
+ s.sync_user(user)
+ else
+ # 解决查询的时候出现多值的情况,比如:123@163.com和g123@163.com
+ puts "66666666666666666666"
+ puts user.id
+ if Array === us
+ us.each do |u|
+ if u.email == user.mail
+ user.gid = u.id
+ user.save
+ end
+ end
+ end
+ end
+ end
+ end
+
+ task :sync_members => :environment do
+ projects = Project.all
+ s = Trustie::Gitlab::Sync.new
+ projects.each do |project|
+ puts project.id
+ s.only_members(project.first)
+ end
+ end
+end
\ No newline at end of file
diff --git a/lib/tasks/sync_sigle_rep.rake b/lib/tasks/sync_sigle_rep.rake
index b99221c83..591dcce84 100644
--- a/lib/tasks/sync_sigle_rep.rake
+++ b/lib/tasks/sync_sigle_rep.rake
@@ -3,19 +3,27 @@
namespace :sync_rep do
desc "sync some projects which just have sigle repository"
task :sigle => :environment do
- projects = Project.all
+ projects = Project.where("user_id !=?",12)
projects.each do |project|
# 针对类型为Git并且只有一个版本库的项目
if project.repositories && project.repositories.count == 1 && project.repositories.first.type == "Repository::Git"
rep = project.repositories.first
- s = Trustie::Gitlab::Sync.new
- s.sync_project(project, path: rep.identifier, import_url: rep.url)
- rep.type = 'Repository::Gitlab'
- rep.save
- puts "*************************************"
- puts project.id
- puts rep.id
- puts rep.identifier
+ count = Repository.find_by_sql("SELECT * FROM `repositories` where identifier = '#{rep.identifier}'").count
+ puts count
+ unless count > 1
+ rep.identifier
+ puts "################################"
+ puts project.id
+ puts rep.id
+ s = Trustie::Gitlab::Sync.new
+ s.sync_project(project, path: rep.identifier, import_url: rep.url)
+ rep.type = 'Repository::Gitlab'
+ rep.save
+ puts "*************************************"
+ puts project.id
+ puts rep.id
+ puts rep.identifier
+ end
end
end
end
diff --git a/lib/trustie/gitlab/helper.rb b/lib/trustie/gitlab/helper.rb
index 57c333875..61c1fbd17 100644
--- a/lib/trustie/gitlab/helper.rb
+++ b/lib/trustie/gitlab/helper.rb
@@ -3,46 +3,46 @@
module Trustie
module Gitlab
module Helper
- def change_password(uid, en_pwd, salt)
- return unless uid
- options = {:encrypted_password=>en_pwd, :password_salt=>salt}
- self.g.put("/users/ext/#{uid}", :body => options)
- # g.edit_user(uid, :encrypted_password=>en_pwd, :password_salt=>salt)
- end
+ def change_password(uid, en_pwd, salt)
+ return unless uid
+ options = {:encrypted_password=>en_pwd, :password_salt=>salt}
+ self.g.put("/users/ext/#{uid}", :body => options)
+ # g.edit_user(uid, :encrypted_password=>en_pwd, :password_salt=>salt)
+ end
- def find_user(user)
- us = self.g.get("/users?search=#{user.mail}")
- if Array === us
- us.each do |u|
- return u if u.email == user.mail
- end
+ def find_user(user)
+ us = self.g.get("/users?search=#{user.mail}")
+ if Array === us
+ us.each do |u|
+ return u if u.email == user.mail
end
- return nil
end
+ return nil
+ end
- def add_user(user)
- u = nil
- begin
- u = find_user(user)
- unless u
- u = self.g.create_user(user.mail,
- user.hashed_password,
- name: user.show_name,
- username: user.login,
- confirm: "true")
- user.gid = u.id
- end
- change_password(u.id, user.hashed_password, user.salt)
- rescue => e
- puts e
- end
- return u
+ def add_user(user)
+ u = nil
+ begin
+ u = find_user(user)
+ unless u
+ u = self.g.create_user(user.mail,
+ user.hashed_password,
+ name: user.show_name,
+ username: user.login,
+ confirm: "true")
+ user.gid = u.id
+ end
+ change_password(u.id, user.hashed_password, user.salt)
+ rescue => e
+ puts e
end
+ return u
+ end
- def del_user(user)
- return unless user.gid
- self.g.delete_user(user.gid)
- end
+ def del_user(user)
+ return unless user.gid
+ self.g.delete_user(user.gid)
+ end
end
end
diff --git a/lib/trustie/gitlab/sync.rb b/lib/trustie/gitlab/sync.rb
index 8c84984ee..a303b22fb 100644
--- a/lib/trustie/gitlab/sync.rb
+++ b/lib/trustie/gitlab/sync.rb
@@ -69,6 +69,11 @@ module Trustie
# import url http://xianbo_trustie2:1234@repository.trustie.net/xianbo/trustie2.git
# can use password
+ puts "@@@@@@@@@@@@@@@@@@@@@@@"
+ puts path
+ puts project.description
+ puts gid
+ puts import_url
gproject = self.g.create_project(path,
path: path,
description: project.description,
@@ -81,6 +86,7 @@ module Trustie
user_id: gid,
import_url: import_url
)
+ puts "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
project.gpid = gproject.id
project.save!
puts "Successfully created #{project.name}"
@@ -100,6 +106,20 @@ module Trustie
end
end
+ def only_members(project)
+ project.members.each do |m|
+ begin
+ gid = m.user.gid
+ unless gid
+ gid = sync_user(m.user).id
+ end
+ self.g.add_team_member(project.gpid, gid, UserLevel::DEVELOPER)
+ rescue => e
+ puts e
+ end
+ end
+ end
+
def remove_project
end
end
diff --git a/public/images/course/arrow_up.jpg b/public/images/course/arrow_up.jpg
index bbf348fe1..7bcfa859c 100644
Binary files a/public/images/course/arrow_up.jpg and b/public/images/course/arrow_up.jpg differ
diff --git a/public/images/course/arrow_up2.jpg b/public/images/course/arrow_up2.jpg
new file mode 100644
index 000000000..bbf348fe1
Binary files /dev/null and b/public/images/course/arrow_up2.jpg differ
diff --git a/public/javascripts/course.js b/public/javascripts/course.js
index 90d085ea3..84e087c49 100644
--- a/public/javascripts/course.js
+++ b/public/javascripts/course.js
@@ -663,7 +663,7 @@ function regex_homework_end_publish_time()
var myDate = new Date();
if($.trim($("#homework_publish_time").val()) == "")
{
- $("#homework_publish_time").val(myDate.toLocaleDateString());
+ $("#homework_publish_time").val(formate_date(myDate));
}
var publish_time = Date.parse($("#homework_publish_time").val());
var end_time = Date.parse($("#homework_end_time").val());
@@ -695,6 +695,21 @@ function regex_homework_end_time()
}
}
+function formate_date(date){
+ var str = "";
+ var year = date.getFullYear();
+ var month = date.getMonth() + 1;
+ var day = date.getDate();
+ if(month < 10) {
+ month = '0' + month;
+ }
+ if(day < 10) {
+ day = '0' + day;
+ }
+ str = year + '-' + month + '-' + day;
+ return str;
+}
+
//验证发送到课程
function regex_course_id(){
var course_id = $("#course_id").val();
@@ -939,13 +954,19 @@ function regexStudentWorkDescription()
function new_student_work()
{
if(regexStudentWorkName()&®exStudentWorkDescription())
- {$("#new_student_work").submit();}
+ {
+ $("#new_student_work").submit();
+ $("#ajax-indicator").hide();
+ }
}
function edit_student_work(id)
{
if(regexStudentWorkName()&®exStudentWorkDescription())
- {$("#edit_student_work_" + id).submit();}
+ {
+ $("#edit_student_work_" + id).submit();
+ $("#ajax-indicator").hide();
+ }
}
//
diff --git a/public/javascripts/feedback.js b/public/javascripts/feedback.js
index b30c8f91d..97209131e 100644
--- a/public/javascripts/feedback.js
+++ b/public/javascripts/feedback.js
@@ -1,5 +1,10 @@
(function($){
$.fn.fix = function(options){
+ var u = navigator.userAgent;
+ if((u.indexOf('Android') > -1 || u.indexOf('Linux') > -1 ||u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1)){
+ $("#scrollsidebar").css("display","none");
+ return;
+ }
var defaults = {
float : 'right',
minStatue : true,
@@ -73,6 +78,11 @@ function cookieget(n)
$(function(){
+ var u = navigator.userAgent;
+ if((u.indexOf('Android') > -1 || u.indexOf('Linux') > -1 ||u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1)){
+ $("#scrollsidebar").css("display","none");
+ return;
+ }
$(".closeSidebar").click(function(){
$(".show_btn").css("display","none");
$("#scrollsidebar").css("display","none");
@@ -109,4 +119,30 @@ $(function(){
$("#textCount").text(50-$("#subject").val().length)
}
});
-});
\ No newline at end of file
+});
+
+//var browser={
+// versions:function(){
+// var u = navigator.userAgent, app = navigator.appVersion;
+// return {//移动终端浏览器版本信息
+// trident: u.indexOf('Trident') > -1, //IE内核
+// presto: u.indexOf('Presto') > -1, //opera内核
+// webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
+// gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
+// mobile: !!u.match(/AppleWebKit.*Mobile.*/)||!!u.match(/AppleWebKit/), //是否为移动终端
+// ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
+// android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或者uc浏览器
+// iPhone: u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1, //是否为iPhone或者QQHD浏览器
+// iPad: u.indexOf('iPad') > -1, //是否iPad
+// webApp: u.indexOf('Safari') == -1 //是否web应该程序,没有头部与底部
+// };
+// }(),
+// language:(navigator.browserLanguage || navigator.language).toLowerCase()
+//}
+//document.writeln("语言版本: "+browser.language);
+//document.writeln(" 是否为移动终端: "+browser.versions.mobile);
+//document.writeln(" ios终端: "+browser.versions.ios);
+//document.writeln(" android终端: "+browser.versions.android);
+//document.writeln(" 是否为iPhone: "+browser.versions.iPhone);
+//document.writeln(" 是否iPad: "+browser.versions.iPad);
+//document.writeln(navigator.userAgent);
\ No newline at end of file
diff --git a/public/javascripts/new_user.js b/public/javascripts/new_user.js
index e99abd4f1..a0647b592 100644
--- a/public/javascripts/new_user.js
+++ b/public/javascripts/new_user.js
@@ -97,7 +97,7 @@ function regex_homework_end_publish_time()
var myDate = new Date();
if($.trim($("#homework_publish_time").val()) == "")
{
- $("#homework_publish_time").val(myDate.toLocaleDateString());
+ $("#homework_publish_time").val(formate_date(myDate));
}
var end_time = Date.parse($("#homework_end_time").val());
var publish_time = Date.parse($("#homework_publish_time").val());
@@ -129,6 +129,21 @@ function regex_homework_end_time()
}
}
+function formate_date(date){
+ var str = "";
+ var year = date.getFullYear();
+ var month = date.getMonth() + 1;
+ var day = date.getDate();
+ if(month < 10) {
+ month = '0' + month;
+ }
+ if(day < 10) {
+ day = '0' + day;
+ }
+ str = year + '-' + month + '-' + day;
+ return str;
+}
+
//验证发送到课程
function regex_course_id(){
var course_id = $("#course_id").val();
@@ -235,13 +250,19 @@ function regex_evaluation_num(){
function new_student_work()
{
if(regexStudentWorkName()&®exStudentWorkDescription())
- {$("#new_student_work").submit();}
+ {
+ $("#new_student_work").submit();
+ $("#ajax-indicator").hide();
+ }
}
function edit_student_work(id)
{
if(regexStudentWorkName()&®exStudentWorkDescription())
- {$("#edit_student_work_" + id).submit();}
+ {
+ $("#edit_student_work_" + id).submit();
+ $("#ajax-indicator").hide();
+ }
}
//验证作品名称
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index 317a21d02..48c6a2d88 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -33,7 +33,7 @@ a:hover.news_foot{ color:#787b7e; border:1px solid #d4d4d4;}
.ctt2{clear:both; }
.hworkListBanner {width:720px; height:40px; background:#eaeaea; margin-bottom:10px;}
.hworkListContainer {float:left; clear:both; width:720px;}
-.showHwork{ border:2px solid #269ac9; width:696px; padding:10px; color:#666666; padding-bottom:0px; }
+.showHwork{ border:1px solid #eaeaea; width:696px; padding:10px; color:#666666; padding-bottom:0px; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); }
.showHworkP{ width:630px; float:left;}
.showHwork ul li {margin-bottom: 5px;}
.hworkPingText{ float:left; border:1px solid #e4e4e4; padding:5px; width:618px; height:35px;}
@@ -41,12 +41,15 @@ a:hover.news_foot{ color:#787b7e; border:1px solid #d4d4d4;}
.pingBoxTit{ float:left; width:625px; margin-left:10px;}
.pingText{border:1px solid #CCCCCC; margin:5px; padding:5px; width:610px; height:20px; }
.pingBackTit{ float:left; width:573px; margin-left:10px; }
-.hworkUl{ height:30px; border-bottom:1px solid #eaeaea; line-height:30px; vertical-align:middle;}
+.hworkUl{ height:30px; border-bottom:1px solid #eaeaea; line-height:30px; vertical-align:middle; background-color: #f6f6f6;}
.hworkH30 {height:30px !important; line-height:30px !important;}
-.hworkListRow {height:65px; border-bottom:1px solid #eaeaea; line-height:65px; vertical-align:middle;}
+.hworkListRow {height:65px; border-bottom:1px dashed #eaeaea; line-height:65px; vertical-align:middle; position: relative;}
.hworkListRow:hover {background-color:#f6f6f7;}
.hworkUl li{ float:left;}
.hworkListRow li{ float:left;}
+.hworkTip{position:absolute; padding:3px 5px; border:1px solid #eaeaea; display:block; right:-108px; top:20px; background-color:#ffffff; line-height:20px; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5);}
+.hworkTip em {display:block; border-width:8px; position:absolute; bottom:4px; left:-16px; border-style:dashed solid dashed dashed; border-color:transparent #eaeaea transparent transparent; font-size:0; line-height:0;}
+.hworkTip span {display:block; border-width:8px; position:absolute; bottom:4px; left:-15px; border-style:dashed solid dashed dashed; border-color:transparent #FFF transparent transparent; font-size:0; line-height:0;}
.hworkList340 {width:335px; text-align:left; height:50px; line-height:50px;padding-left:5px;}
.hworkList80 {width:80px; text-align:center;}
.hworkList50 {width:50px; text-align:center;}
@@ -71,9 +74,9 @@ a.hworkSearchIcon:hover {background:url(../images/nav_icon.png) -49px -1px no-re
.classSplit {border:1px solid #e7e7e7; height:27px; line-height:27px; display:inline-block; margin-left:10px; padding-left:5px; cursor:pointer; outline:none; width:95px; max-width:95px;}
.classList {width:45px; border:1px solid #e7e7e7; float:left; position:absolute; background-color:#ffffff; left:-1px;}
.hworkPortrait {float:left; width:40px;}
-.HomeworkNameTitle{width: 285px;text-align: center;margin-left: 50px;}
+.HomeworkNameTitle{width: 285px;text-align: left;margin-left: 50px;}
.HomeworkStuTitle{width: 80px;text-align: center;}
-.StudentName{display: table-cell;width: 115px;vertical-align: middle;text-align: center;height: 40px;}
+.StudentName{display: table-cell;width: 115px;vertical-align: middle;text-align: left;height: 40px;}
.width385{width: 385px;}
.width505{width: 505px;}
.width165{width: 165px;}
@@ -81,6 +84,7 @@ a.hworkSearchIcon:hover {background:url(../images/nav_icon.png) -49px -1px no-re
.width525{width: 525px;}
.width285{width: 285px;}
.mr95{margin-right: 95px;}
+.mr140 {margin-right: 140px;}
.ml100{margin-left: 100px;}
.mt16{margin-top: 16px;}
.pr10{padding-right: 10px;}
@@ -178,7 +182,9 @@ a.f_grey:hover {color:#000000;}
/*.upbtn{ margin:42px 0 0 10px; border:none; color:#999; width:150px;}*/
.red_btn_cir{ background:#e74c3c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
.green_btn_cir{ background:#28be6c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
-.grey_btn_cir{ background:#b2b2b2; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
+.green_homework_btn_cir{ background:#28be6c; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
+.grey_btn_cir{ background:#b2b2b2; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
+.grey_homework_btn_cir{ background:#b2b2b2; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
.blue_btn_cir{ background:#3498db; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
.orange_btn_cir{ background:#e67e22; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
.sticky_btn_cir{ background:#269ac9; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
@@ -477,7 +483,7 @@ a.xls{ margin-left:5px; color:#136b3b;}
/* 开启匿评弹框 */
.anonymos{width:480px;height:180px;position:fixed !important;z-index:100;left:50%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
.anonymos_work {position:fixed !important;left:60%;top:60%;margin:-215px 0 0 -300px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
-.ni_con { width:425px; margin:25px 30px;}
+.ni_con { width:425px; margin:25px 30px;font-family:"微软雅黑","宋体";}
.ni_con h2{ display:block; height:40px; width:425px; text-align:center; color:#3a3a3a;}
.ni_con p{ color:#808181; }
.ni_con a:hover{ text-decoration:none;}
@@ -488,6 +494,14 @@ a:hover.tijiao{ background:#0f99a9;}
.ni_con_work { width:300px; margin:25px 20px;}
.ni_con_work p{ color:#808181; }
a.xls{ margin-left:5px; color:#136b3b;}
+.grey_c{ color:#808181;}
+
+.disable_btn { height:46px; display:block; width:90px; color:#fff; background:#d0d2d0; text-align:center; padding-top:4px; margin-right:15px;}
+a.term_btn{ height:38px; display:block; width:90px; color:#fff; background:#269ac9; text-align:center; padding-top:12px; margin-right:15px;}
+a:hover.term_btn{ background:#297fb8;}
+p.c_black{ color:#000000;}
+a.exit { height:24px; display:block; width:80px; color:#000000; background:#c3c3c3; text-align:center; padding-top:4px;}
+.lh22{ line-height: 22px;}
/* 学生列表*/
.st_list{ width:670px;}
.st_search{ }
@@ -835,7 +849,7 @@ a:hover.icon_remove{background:url(images/icons.png) -20px -338px no-repeat;}
a.hwork_center{ display:block; width:60px; text-align:center; margin-right:5px;}
.show_hwork{ border:2px solid #64bdd9; width:646px; padding:10px; color:#666666; padding-bottom:0px; }
.show_hwork ul li{ margin-bottom:5px;}
-.show_hwork_arrow{ position:relative; top:2px; left:165px;background:url(../images/course/arrow_up.jpg) 0 0 no-repeat; width:20px; height:11px;}
+.show_hwork_arrow{ position:relative; top:1px; left:165px;background:url(../images/course/arrow_up.jpg) 0 0 no-repeat; width:20px; height:11px;}
.tit_fb{ font-weight:bold; width:66px; text-align:right; display:block; float:left;}
.ml160{ margin-left:160px;}
.show_hwork_p{ width:630px; float:left;}
@@ -889,6 +903,8 @@ a.work_list_tit{width:580px; display:block; overflow:hidden; font-size:14px; f
.c_w{ color:#fff;}
.filename { background: url(../images/pic_file.png) 0 -25px no-repeat;color: #3ca5c6;max-width: 150px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;}
+ .ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;}
+ .ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;}
.upload_filename{ background: url(../images/pic_file.png) 0 -20px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;}
.evaluation{position: relative;}
.evaluation_submit{position: absolute;right: 0px;bottom: 0px;}
@@ -966,7 +982,8 @@ a:hover.icon_remove{background:url(../images/course/icons.png) -20px -338px no-r
.ProResultCon{ padding:10px; color:#888888; line-height:24px; border-bottom:1px solid #dddddd; }
.W50{ width:50px;}
.W200{ width:200px;}
-.m_w480{max-width: 480px;}
+.m_w460{max-width: 460px;}
+.m_w505{max-width: 505px;}
.m_w500{max-width: 500px;}
.m_w530{max-width: 530px;}
.ProResultTable{ color:#888888;}
diff --git a/public/stylesheets/css.css b/public/stylesheets/css.css
index 6114c1b4d..b740436f9 100644
--- a/public/stylesheets/css.css
+++ b/public/stylesheets/css.css
@@ -152,11 +152,12 @@ a:hover.tijiao{ background:#0f99a9 !important;}
/* 匿名评分弹框 */
.alert_praise{width:480px;height:200px;position:fixed;z-index:100;left:50%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
.alert .close02{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-490px;background:url(images/close.png) no-repeat;cursor:pointer;}
-.ni_con { width:425px; margin:25px 30px;}
+.ni_con { width:425px; margin:25px 30px;font-family:"微软雅黑","宋体";}
.ni_con h2{ display:block; height:40px; width:188px; margin:0 auto;}
.ni_con p{ color:#808181;}
.ni_con a:hover{ text-decoration:none;}
+.grey_c{ color:#808181;}
/*弹框*/
.black_overlay{display:none;position:absolute;top:0%;left:0%;width:100%;height:100%;background-color:black;z-index:1001;-moz-opacity:0.3;opacity:.30;filter:alpha(opacity=30);}
.upload_box{display:none;position:absolute;top:25%;left:35%;width:30%;height: auto;padding:5px;border:3px solid #15bccf; background:#fff;z-index:1002;overflow:auto;}
diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css
index 6a296b941..f21a4b1fd 100644
--- a/public/stylesheets/new_user.css
+++ b/public/stylesheets/new_user.css
@@ -213,6 +213,8 @@ a.bBlue {background-color:#3498db;}
a.bBlue:hover {background-color:#297fb8;}
a.submit_btn {border:1px solid #3498db; padding:3px 10px; border-radius:3px; color:#3498db;}
a.submit_btn:hover {background-color:#3498db; color:#ffffff;}
+a.submit_btn2 {background-color: #269ac9; padding: 3px 5px; color: #ffffff;}
+a.submit_btn2:hover {background-color: #297fb8;}
/****翻页***/
.wlist{float:right;}
@@ -293,8 +295,10 @@ a:hover.bgreen_n_btn{background:#08a384;}
.more_btn{-moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #9DCEFF; color:#9DCEFF; border-radius:3px; padding:0px 3px;}
.upbtn{ margin:42px 0 0 10px; border:none; color:#999; width:150px;}
.red_btn_cir{ background:#e74c3c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
-.green_btn_cir{ background:#28be6c; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
-.grey_btn_cir{ background:#b2b2b2; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
+.green_btn_cir{ background:#28be6c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
+.green_homework_btn_cir{ background:#28be6c; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
+.grey_btn_cir{ background:#b2b2b2; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
+.grey_homework_btn_cir{ background:#b2b2b2; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
.blue_btn_cir{ background:#3498db; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
.orange_btn_cir{ background:#e67e22; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
.sticky_btn_cir{ background:#269ac9; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
@@ -397,7 +401,8 @@ a.resourcesBlack {font-size:12px; color:#4c4c4c;white-space: nowrap;text-align:
a.resourcesBlack:hover {font-size:12px; color:#000000;}
.resourcesListCheckbox {width:20px; height:40px; line-height:40px; text-align:center; vertical-align:middle;}
.resourcesCheckbox {padding:0px; margin:0px; margin-top:14px; width:12px; height:12px;}
-.resourcesList {width:710px; height:39px; background-color:#ffffff; border-bottom:1px dashed #eaeaea; color:#9a9a9a; font-size:12px; margin-left:auto; margin-right:auto;}
+.resourcesList {width:710px; height:39px; background-color:#ffffff; color:#9a9a9a; font-size:12px; margin-left:auto; margin-right:auto;} /*border-bottom:1px dashed #eaeaea;*/
+.resourcesListDashLine {width:710px;border-bottom:1px dashed #eaeaea !important; margin-left:auto; margin-right:auto; padding-bottom: 2px} /*border-bottom:1px dashed #eaeaea;*/
.resourcesListOption {width:710px; height:40px; line-height:40px; vertical-align:middle; margin-left:auto; margin-right:auto; background-color:#f6f6f6;}
.resourcesCheckAll {width:20px; height:40px; line-height:40px; text-align:center; vertical-align:middle; float:left;}
.resourcesSelectSend {float:right;}
@@ -1073,7 +1078,8 @@ a:hover.icon_remove{background:url(../images/course/icons.png) -20px -338px no-r
.ProResultCon{ padding:10px; color:#888888; line-height:24px; border-bottom:1px solid #dddddd; }
.W50{ width:50px;}
.W200{ width:200px;}
-.m_w480{max-width: 480px;}
+.m_w460{max-width: 460px;}
+.m_w505{max-width: 505px;}
.m_w530{max-width: 530px;}
.ProResultTable{ color:#888888;}
.T_C{ text-align:center;}
@@ -1147,6 +1153,8 @@ img.ui-datepicker-trigger {
text-overflow: ellipsis;
margin-bottom: 3px;
}
+ .ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;}
+ .ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;}
.upload_filename{ background: url(../images/pic_file.png) 0 -25px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;}
.message_title{border: 1px solid #9C9C9C;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #fff; max-width:400px;word-wrap:break-word; word-break:break-all;}
.message_title_red{border: 1px solid #484848;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #fff;background-image: -moz-linear-gradient(top, #fff, #E0E0E0);}
@@ -1292,17 +1300,17 @@ a:hover.SetUpIcon{background: url(../images/homepage_icon.png) 0px -486px no-rep
/* 开启匿评弹框 */
.anonymos{width:480px;height:180px;position:fixed !important;z-index:100;left:50%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
.anonymos_work {position:fixed !important;left:60%;top:60%;margin:-215px 0 0 -300px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
-.ni_con { width:425px; margin:25px 30px;}
+.ni_con { width:425px; margin:15px;font-family:"微软雅黑","宋体";}
.ni_con h2{ display:block; height:40px; width:425px; text-align:center; color:#3a3a3a;}
.ni_con p{ color:#808181; }
.ni_con a:hover{ text-decoration:none;}
.ni_btn{ width:190px; margin:15px auto; line-height:1.9;}
-a.tijiao{ height:28px; display:block; width:80px; color:#fff; background:#15bccf; text-align:center; padding-top:4px; float:left; margin-right:15px;}
-a:hover.tijiao{ background:#0f99a9;}
+a.tijiao{ height:28px; display:block; width:80px; color:#fff; background:#269ac9; text-align:center; padding-top:4px; float:left; margin-right:15px;}
+a:hover.tijiao{ background:#297fb8;}
.c_pink{ color:#e65d5e;}
.ni_con_work { width:300px; margin:25px 20px;}
.ni_con_work p{ color:#808181; }
-
+.grey_c{ color:#808181;}
a.link_file_a{ background:url(../images/pic_file.png) 0 2px no-repeat; padding-left:20px; }
a:hover.link_file_a{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;}
.link_file_a{ display:block; max-width:450px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css
index 4594d0c51..e7a24b151 100644
--- a/public/stylesheets/project.css
+++ b/public/stylesheets/project.css
@@ -369,6 +369,8 @@ span.add_attachment {font-size: 80%;line-height: 2.5em;}
#attachments_fields .ajax-loading input.filename {background:url(../images/loading.gif) no-repeat 0px 50%;}
.reply_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #ccc; color:#999; border-radius:3px; padding:2px 10px; margin-bottom:10px;display: block;margin-left: 470px;}
.reply_btn:hover{ background:#999; color:#fff; }
+ .ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;}
+ .ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;}
.upload_filename{ background: url(../images/pic_file.png) 0 -22px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;}
.attachments_fields input.description {margin-left:4px; width:100px; }
.attachments_fields span .boldSpan{display:block; white-space:nowrap; font-family:'微软雅黑';}