#1289修复输入标签内容并点击“增加”后,标签的内容还在文本框中的BUG
解决方案:新增标签后增加js代码设置输入框内值为空
This commit is contained in:
parent
65b80959a6
commit
4ceb0e8789
|
@ -12,10 +12,16 @@
|
|||
#end%>
|
||||
<!-- 3 代表的是issue 当是issue是 处理方式与前2个对象不同 -->
|
||||
<% if object_flag == '3' %>
|
||||
<span><%= image_tag("/images/sidebar/tags.png") %></span>
|
||||
<span class="font_title_tag"><%= l(:label_tag) %>:</span>
|
||||
<span>
|
||||
<%= image_tag("/images/sidebar/tags.png") %>
|
||||
</span>
|
||||
<span class="font_title_tag">
|
||||
<%= l(:label_tag) %>:
|
||||
</span>
|
||||
<% if User.current.logged? %>
|
||||
<span> <%= toggle_link (image_tag "/images/sidebar/add.png"), 'put-tag-form-issue', {:focus => 'name-issue'} %></span>
|
||||
<span>
|
||||
<%= toggle_link (image_tag "/images/sidebar/add.png"), 'put-tag-form-issue', {:focus => 'name-issue'} %>
|
||||
</span>
|
||||
<% end %>
|
||||
|
||||
<div id="tags_show_issue">
|
||||
|
@ -36,7 +42,9 @@
|
|||
<% elsif object_flag == '6' %>
|
||||
<span><%#= image_tag("/images/sidebar/tags.png") %></span>
|
||||
<span>
|
||||
<%= link_to (image_tag "/images/sidebar/add.png"), 'javascript:void(0);', :class => "tags_icona", :onclick=>"$('#put-tag-form-#{obj.class}-#{obj.id}').toggle(); readmore(this);" if User.current.logged? %>
|
||||
<%= link_to (image_tag "/images/sidebar/add.png"), 'javascript:void(0);',
|
||||
:class => "tags_icona",
|
||||
:onclick=>"$('#put-tag-form-#{obj.class}-#{obj.id}').toggle(); readmore(this);" if User.current.logged? %>
|
||||
<%#= toggle_link (image_tag "/images/sidebar/add.png"), "put-tag-form-#{obj.class}-#{obj.id}", {:focus => "put-tag-form-#{obj.class}-#{obj.id} #name"} if User.current.logged? %>
|
||||
</span>
|
||||
|
||||
|
@ -47,14 +55,17 @@
|
|||
<%= render :partial => "courses/course_resources_html", :locals => {:obj => obj ,:object_flag => object_flag } %>
|
||||
</div>
|
||||
<% else %>
|
||||
|
||||
<span><%= image_tag("/images/sidebar/tags.png") %></span>
|
||||
<span class="font_title_tag"><%= l(:label_tag) %>:</span>
|
||||
|
||||
<span>
|
||||
<%= image_tag("/images/sidebar/tags.png") %>
|
||||
</span>
|
||||
<span class="font_title_tag">
|
||||
<%= l(:label_tag) %>:
|
||||
</span>
|
||||
<% if User.current.logged? %>
|
||||
<span><%= toggle_link (image_tag "/images/sidebar/add.png"), 'put-tag-form', {:focus => 'tags_name'} %></span>
|
||||
<span>
|
||||
<%= toggle_link (image_tag "/images/sidebar/add.png"), 'put-tag-form', {:focus => 'tags_name'} %>
|
||||
</span>
|
||||
<% end %>
|
||||
|
||||
<div id="tags_show">
|
||||
<%= render :partial => "tags/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<% 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();
|
||||
|
@ -8,13 +7,12 @@ $('#name-issue').val("");
|
|||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||
//$("#put-tag-form-<%=@obj.class%>-<%=@obj.id%>").hide();
|
||||
//$("#put-tag-form-<%#=@obj.class%>-<%#=@obj.id%>").hide();
|
||||
$("#put-tag-form-<%=@obj.class%>-<%=@obj.id%> #name").val("");
|
||||
<% else %>
|
||||
|
||||
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||
$('#put-tag-form #name').val("");
|
||||
$('#tags_name').val("");
|
||||
//$('#put-tag-form').hide();
|
||||
<% end %>
|
||||
|
||||
|
|
Loading…
Reference in New Issue