From 0f92a2e3cb2e97cecc374834b45914b64bdaf0ab Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 26 Jun 2015 14:29:03 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E9=99=84=E4=BB=B6=E7=BB=99?=
=?UTF-8?q?=E5=87=BA=E4=BD=BF=E7=94=A8winrar=E8=A7=A3=E5=8E=8B=E7=9A=84?=
=?UTF-8?q?=E6=8F=90=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/student_work/index.html.erb | 13 +++++++++++--
public/javascripts/course.js | 12 ++++++++++++
2 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb
index 015fb8e48..e0d1f8bad 100644
--- a/app/views/student_work/index.html.erb
+++ b/app/views/student_work/index.html.erb
@@ -55,11 +55,20 @@
<% if @is_teacher%>
<% if @homework.student_works.empty?%>
- <%= link_to "附件", "javascript:void(0)", class: "down_btn fr", :onclick => "alert('没有学生提交作业,无法下载附件')" %>
+ <%= link_to "附件", "javascript:void(0)", class: "down_btn fr zip_download_alert", :onclick => "alert('没有学生提交作业,无法下载附件')" %>
<% else%>
<%= link_to "附件", zipdown_assort_path(obj_class: @homework.class, obj_id: @homework, format: :json),
- remote: true, class: "down_btn fr", :id => "download_homework_attachments" %>
+ remote: true, class: "down_btn fr zip_download_alert", :id => "download_homework_attachments" %>
<% end%>
+
+ 使用
+ winzip
+ 工具进行解压可能会导致
+ 下载文件乱码
+ ,建议您使用
+ winrar
+ 工具进行解压
+
<%= link_to l(:label_list), student_work_index_path(:homework => @homework.id,:order => @order, :sort => @b_sort, :name => @name, :format => 'xls'),:class=>'down_btn fr'%>
导出全部:
diff --git a/public/javascripts/course.js b/public/javascripts/course.js
index 50dc89de8..f73ab7bf6 100644
--- a/public/javascripts/course.js
+++ b/public/javascripts/course.js
@@ -797,6 +797,18 @@ $(function(){
});
$("#about_project label").eq(1).remove();
+
+ //附件下载提示
+ $(".zip_download_alert").bind("mouseover",function(e){
+ //alert($(this).html());
+ $(this).next("div").show();
+ $(this).next("div").css("top",e.pageY);
+ $(this).next("div").css("left",e.pageX);
+ });
+ $(".zip_download_alert").bind("mouseout",function(e){
+ //alert($(this).html());
+ $(this).next("div").hide();
+ });
});
//匿评弹框取消按钮