diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 88c07a227..e68c21f4e 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -45,6 +45,16 @@ class ShixunsController < ApplicationController @collaborators = @shixun.collaborators end + def collaborators_delete + user_id = params[:c_id] + shixun_member = ShixunMember.where(:user_id => user_id, :shixun_id => @shixun.id, :role => 2).first + shixun_member.delete + @collaborators = @shixun.collaborators + respond_to do |format| + format.js + end + end + # 已存在的成员不添加 def add_collaborators if !params[:search].nil? diff --git a/app/views/shixuns/_collaborators_list.html.erb b/app/views/shixuns/_collaborators_list.html.erb index bf2097b33..114c5ce64 100644 --- a/app/views/shixuns/_collaborators_list.html.erb +++ b/app/views/shixuns/_collaborators_list.html.erb @@ -3,7 +3,9 @@ <%= image_tag(url_to_avatar(collaborators.user), :width => 60, :height => 60,:class => 'panel-list-img mr15 mt5') %> <% end %> \ No newline at end of file diff --git a/app/views/shixuns/collaborators_delete.js.erb b/app/views/shixuns/collaborators_delete.js.erb new file mode 100644 index 000000000..f367b9c1a --- /dev/null +++ b/app/views/shixuns/collaborators_delete.js.erb @@ -0,0 +1 @@ +$("#collaborators_list").html("<%= j(render :partial => 'shixuns/collaborators_list') %>"); \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 3100e3f42..4902fcbef 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -37,6 +37,7 @@ RedmineApp::Application.routes.draw do get 'statistics' get 'propaedeutics' get 'collaborators' + delete 'collaborators_delete' match 'add_collaborators', :via => [:get, :post] post 'shixun_members_added' get 'shixun_monitor' diff --git a/public/javascripts/edu/application.js b/public/javascripts/edu/application.js index 9c646d3a6..9f948042c 100644 --- a/public/javascripts/edu/application.js +++ b/public/javascripts/edu/application.js @@ -157,7 +157,7 @@ function delete_confirm_box(url, str){ function delete_confirm_box_2(url, str){ var htmlvalue = '

提示

'+ '

' + str + '

取消'+ - '确定
'; + '确定'; pop_box_new(htmlvalue, 480, 140); } diff --git a/public/stylesheets/css/taskstyle.css b/public/stylesheets/css/taskstyle.css index 8b141befe..5df176a87 100644 --- a/public/stylesheets/css/taskstyle.css +++ b/public/stylesheets/css/taskstyle.css @@ -65,7 +65,7 @@ a.rightbar-pause{ color:#29bd8b; font-size: 18px; margin-right:15px; margin-top: .task-popup-text-center{ text-align: center; color: #666;} .task-popup-title{ border-bottom: 1px solid #eee; padding:10px 15px; } .task-popup-content{ padding:15px;} -.task-popup-submit{ margin:15px auto; width: 200px;} +.task-popup-submit{ margin:15px auto; width: 120px;} /* TPM */ .task-header{ width: 100%;min-width:1200px; background:url("/images/task/task-bg-header.png") 0 0 repeat-x; height: 100px;} .task-header-info{ width: 1200px; margin: 0 auto; color:#fff; padding:30px 0;}