修改标签的显示js
This commit is contained in:
parent
9a7160178c
commit
cd3f4ef8d3
|
@ -251,7 +251,7 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def toggle_link(name, id, options={})
|
def toggle_link(name, id, options={})
|
||||||
onclick = "$('##{id}').toggle(); "
|
onclick = "$('##{id}').slideToggle(); "
|
||||||
onclick << (options[:focus] ? "$('##{options[:focus]}').focus(); " : "this.blur(); ")
|
onclick << (options[:focus] ? "$('##{options[:focus]}').focus(); " : "this.blur(); ")
|
||||||
onclick << "return false;"
|
onclick << "return false;"
|
||||||
link_to(name, "#", :onclick => onclick)
|
link_to(name, "#", :onclick => onclick)
|
||||||
|
|
|
@ -11,12 +11,12 @@
|
||||||
<div id="put-tag-form-issue" style="display: none">
|
<div id="put-tag-form-issue" style="display: none">
|
||||||
<%= form_for "tag_for_save",:remote=>true,:url=>tag_path,
|
<%= form_for "tag_for_save",:remote=>true,:url=>tag_path,
|
||||||
:update => "tags_show",
|
:update => "tags_show",
|
||||||
:complete => '$("#put-tag-form-issue").hide();' do |f| %>
|
:complete => '$("#put-tag-form-issue").slideUp();' do |f| %>
|
||||||
<%= f.text_field :name ,:id => "name-issue",:size=>"30" %>
|
<%= f.text_field :name ,:id => "name-issue",:size=>"30" %>
|
||||||
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
||||||
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
||||||
<%= f.submit "add"%>
|
<%= f.submit "add"%>
|
||||||
<%= link_to_function l(:button_cancel), '$("#put-tag-form-issue").hide();'%>
|
<%= link_to_function l(:button_cancel), '$("#put-tag-form-issue").slideUp();'%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -29,12 +29,12 @@
|
||||||
<div id="put-tag-form" style="display: none">
|
<div id="put-tag-form" style="display: none">
|
||||||
<%= form_for "tag_for_save",:remote=>true,:url=>tag_path,
|
<%= form_for "tag_for_save",:remote=>true,:url=>tag_path,
|
||||||
:update => "tags_show",
|
:update => "tags_show",
|
||||||
:complete => '$("#put-tag-form").hide();' do |f| %>
|
:complete => '$("#put-tag-form").slideUp();' do |f| %>
|
||||||
<%= f.text_field :name ,:id => "name",:size=>"28"%>
|
<%= f.text_field :name ,:id => "name",:size=>"28"%>
|
||||||
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
||||||
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
||||||
<%= f.submit "add"%>
|
<%= f.submit "add"%>
|
||||||
<%= link_to_function l(:button_cancel), '$("#put-tag-form").hide();'%>
|
<%= link_to_function l(:button_cancel), '$("#put-tag-form").slideUp();'%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
<span>
|
<span>
|
||||||
<%= link_to (image_tag "/images/sidebar/add.png"), 'javascript:void(0);',
|
<%= link_to (image_tag "/images/sidebar/add.png"), 'javascript:void(0);',
|
||||||
:class => "tags_icona",
|
:class => "tags_icona",
|
||||||
:onclick=>"$('#put-tag-form-#{obj.class}-#{obj.id}').toggle(); readmore(this);" if User.current.logged? %>
|
:onclick=>"$('#put-tag-form-#{obj.class}-#{obj.id}').slideToggle(); 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? %>
|
<%#= 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>
|
</span>
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
<div id="put-tag-form" style="display: none">
|
<div id="put-tag-form" style="display: none">
|
||||||
<%= form_for "tag_for_save",:remote=>true,:url=>tag_path,
|
<%= form_for "tag_for_save",:remote=>true,:url=>tag_path,
|
||||||
:update => "tags_show",
|
:update => "tags_show",
|
||||||
:complete => '$("#put-tag-form").hide();' do |f| %>
|
:complete => '$("#put-tag-form").slideUp();' do |f| %>
|
||||||
<%= f.text_field :name ,:id => "tags_name",:size=>"28",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length %>
|
<%= f.text_field :name ,:id => "tags_name",:size=>"28",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length %>
|
||||||
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
||||||
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
||||||
|
@ -80,7 +80,7 @@
|
||||||
<a href="#" onclick='$("#tags_name").parent().submit();' class="ButtonColor m3p10" >
|
<a href="#" onclick='$("#tags_name").parent().submit();' class="ButtonColor m3p10" >
|
||||||
<%= l(:button_project_tags_add)%>
|
<%= l(:button_project_tags_add)%>
|
||||||
</a>
|
</a>
|
||||||
<%= link_to_function l(:button_cancel), '$("#put-tag-form").hide();',:class=>'ButtonColor m3p10'%>
|
<%= link_to_function l(:button_cancel), '$("#put-tag-form").slideUp();',:class=>'ButtonColor m3p10'%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in New Issue