From 1b9bde2284d5bc3c00742a21e0d342ddfce186fe Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 15 Sep 2015 10:33:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=B5=84=E6=BA=90=E7=9A=84?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E5=BA=93=E5=8F=AF=E7=82=B9=E5=87=BB=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/tags/update_tag_name.js.erb | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 app/views/tags/update_tag_name.js.erb diff --git a/app/views/tags/update_tag_name.js.erb b/app/views/tags/update_tag_name.js.erb new file mode 100644 index 000000000..b72b0c33f --- /dev/null +++ b/app/views/tags/update_tag_name.js.erb @@ -0,0 +1,40 @@ +//本js使用的新的tag显示方法 +<% if @obj_flag == '3'%> +$('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name', + :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); +//$('#put-tag-form-issue').hide(); +$('#name-issue').val(""); +<% elsif @obj_flag == '1'%> +$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_user_new_name', + :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); +$('#tags_name3').val(""); +<% elsif @obj_flag == '2'%> +$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_project_new_name', + :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); +$('#tags_name2').val(""); +<% elsif @obj_flag == '6'%> +<%if @course%> +$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty(); +$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_list', + :locals => {:obj => @obj,:object_flag => @obj_flag,:select_tag_name => @select_tag_name}) %>'); +$("#files_tag").html("<%= escape_javascript(render :partial => "files/tag_yun", :locals => {:tag_list => @tag_list,:course => @course,:tag_name => @select_tag_name}) %>"); +<%else%> +$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty(); +$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/course_attachment_tag_name', + :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); +<%end%> + +$("#tags_name_<%=@obj.id%>").val(""); +$("#add_tag_<%=@obj.id%>").hide(); +<% elsif @obj_flag == '9'%> +$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/new_tag_name', + :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); +$('#tags_name').val(""); +<% elsif @obj_flag == '10'%> +//$("#put-tag-form-<%#=@obj.class%>-<%#=@obj.id%>").hide(); +<% else%> +$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name', + :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); +$('#tags_name').val(""); +//$('#put-tag-form').hide(); +<% end %> \ No newline at end of file