From 2f0895c2c2e49a0351851306a86740ae9f0b8026 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Wed, 2 Dec 2015 13:40:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E9=80=81=E8=B5=84=E6=BA=90=E6=88=90?= =?UTF-8?q?=E5=8A=9F=E7=BB=99=E5=87=BA=E6=8F=90=E7=A4=BA=20=E5=8F=91?= =?UTF-8?q?=E9=80=81=E8=B5=84=E6=BA=90=E9=BB=98=E8=AE=A4=E4=B8=BA=E5=8F=91?= =?UTF-8?q?=E9=80=81=E8=AF=BE=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/add_exist_file_to_course.js.erb | 1 + app/views/users/add_exist_file_to_project.js.erb | 1 + app/views/users/user_resource.html.erb | 8 ++++---- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/views/users/add_exist_file_to_course.js.erb b/app/views/users/add_exist_file_to_course.js.erb index c61790c40..95f7784f7 100644 --- a/app/views/users/add_exist_file_to_course.js.erb +++ b/app/views/users/add_exist_file_to_course.js.erb @@ -5,5 +5,6 @@ $("#res_count").html(0); $("#checkboxAll").attr('checked',false); $("#res_all_count").html(<%= @atta_count%>); closePopUp(); +alert("发送成功") <% else%> <% end %> \ No newline at end of file diff --git a/app/views/users/add_exist_file_to_project.js.erb b/app/views/users/add_exist_file_to_project.js.erb index c61790c40..95f7784f7 100644 --- a/app/views/users/add_exist_file_to_project.js.erb +++ b/app/views/users/add_exist_file_to_project.js.erb @@ -5,5 +5,6 @@ $("#res_count").html(0); $("#checkboxAll").attr('checked',false); $("#res_all_count").html(<%= @atta_count%>); closePopUp(); +alert("发送成功") <% else%> <% end %> \ No newline at end of file diff --git a/app/views/users/user_resource.html.erb b/app/views/users/user_resource.html.erb index 3af9c29fd..0c0f4af08 100644 --- a/app/views/users/user_resource.html.erb +++ b/app/views/users/user_resource.html.erb @@ -143,7 +143,7 @@ //资源名称的链接 var res_link; var id; //资源id - var sendType; //发送到课程 1 发送到项目 2 + var sendType = '1'; //发送到课程 1 发送到项目 2 var lastSendType; //保存上次发送的发送类型 $("#resources_list").mousedown(function(e) { //如果是右键的话 @@ -309,15 +309,15 @@ document.oncontextmenu = function() {return true;} line.children().css("background-color",'white'); id = line.children().last().html(); - if (lastSendType === '1'){ //如果已经发送过一次了,那么就应该沿用上次发送的类型。 + if (lastSendType === '2'){ //如果已经发送过一次了,那么就应该沿用上次发送的类型。 $.ajax({ type: 'get', - url: '<%= search_user_course_user_path(@user)%>' + '?send_id=' + id + url: '<%= search_user_project_user_path(@user)%>' + '?send_id=' + id }); }else{ $.ajax({ type: 'get', - url: '<%= search_user_project_user_path(@user)%>' + '?send_id=' + id + url: '<%= search_user_course_user_path(@user)%>' + '?send_id=' + id }); } }