From 91d1b133b37decb453cb356be65ccbce56a14dd0 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 22 Sep 2017 22:07:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E6=8F=90=E7=A4=BA=E8=AF=AD?= =?UTF-8?q?=E5=8F=8A=E7=BC=96=E8=BE=91=E5=A4=8D=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/shixuns/_form.html.erb | 2 +- app/views/shixuns/_settings_edit.html.erb | 6 +++++- app/views/shixuns/_settings_show.html.erb | 2 +- app/views/shixuns/_shixun_top.html.erb | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/views/shixuns/_form.html.erb b/app/views/shixuns/_form.html.erb index 6deb9b5b6..7d1b105ff 100644 --- a/app/views/shixuns/_form.html.erb +++ b/app/views/shixuns/_form.html.erb @@ -106,7 +106,7 @@ name="can_copy" value="1" id="can_copy" class="ml5 mr5 magic-checkbox" > - +
  • diff --git a/app/views/shixuns/_settings_edit.html.erb b/app/views/shixuns/_settings_edit.html.erb index 1e8dadbac..1b7288b19 100644 --- a/app/views/shixuns/_settings_edit.html.erb +++ b/app/views/shixuns/_settings_edit.html.erb @@ -54,7 +54,7 @@ name="can_copy" value="<%= @shixun.can_copy ? 1 : 0 %>" id="can_copy" class="ml5 mr5 magic-checkbox" > - +
  • @@ -77,6 +77,10 @@ $(this).val() == '0' ? $(this).val('1') : $(this).val("0"); }); + $("#can_copy").on("click", function(){ + $(this).val() == '0' ? $(this).val('1') : $(this).val("0"); + }); + $("#new_course_list").on('input', function(e){ throttle(search_course_list, window, e); }); diff --git a/app/views/shixuns/_settings_show.html.erb b/app/views/shixuns/_settings_show.html.erb index 1c7b6a309..15a875d70 100644 --- a/app/views/shixuns/_settings_show.html.erb +++ b/app/views/shixuns/_settings_show.html.erb @@ -62,7 +62,7 @@ name="can_copy" value="<%= @shixun.can_copy ? 1 : 0 %>" id="can_copy" disabled="disabled" class="ml5 mr5 magic-checkbox" > - +
  • diff --git a/app/views/shixuns/_shixun_top.html.erb b/app/views/shixuns/_shixun_top.html.erb index ac983ef65..1c8c75159 100644 --- a/app/views/shixuns/_shixun_top.html.erb +++ b/app/views/shixuns/_shixun_top.html.erb @@ -35,7 +35,7 @@ <% end %> 已关闭 <% end %> - <% if @shixun.can_copy || User.current.manager_of_shixun?(@shixun) %> + <% if @shixun.can_copy %> <%#= link_to "复制", copy_shixun_path(@shixun), :class => "fr shixun-task-btn task-btn-green mr15" %> 复制 <% end %>