parent
337f0ec270
commit
9bd22b1b99
|
@ -0,0 +1,32 @@
|
||||||
|
<% id = "course_resources_ul_" + obj.id.to_s%>
|
||||||
|
<ul class="messages-for-user-reply" id = '<%= id %>' >
|
||||||
|
<%= form_for "tag_for_save",:remote=>true,:header=>"Accept: application/javascript",:url=>tag_path,
|
||||||
|
:update => "tags_show",
|
||||||
|
:complete => "$(\"#put-tag-form-#{obj.class}-#{obj.id}\").hide();" do |f| %>
|
||||||
|
<%= f.text_field :name ,:id => "name",:size=>"28",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length,:style=>"width: 100px;"%>
|
||||||
|
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
||||||
|
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
||||||
|
<%= f.submit l(:button_project_tags_add),:class => "small" %>
|
||||||
|
<div class='hidden'>
|
||||||
|
<% preTags = @preTags.nil? ? [] : @preTags %>
|
||||||
|
<% preTags.each do |tag|%>
|
||||||
|
<%= link_to tag, "
|
||||||
|
javascript:(function(){
|
||||||
|
var $tagInputVal = $('#put-tag-form-"+obj.class.to_s+"-"+obj.id.to_s+"').find('#name');
|
||||||
|
var tagArr = [];
|
||||||
|
tagArr = tagArr.concat( $tagInputVal[0].value.split(',') );
|
||||||
|
tagArr = tagArr.concat('"+tag.to_s+"');
|
||||||
|
tagArr = cleanArray(tagArr);
|
||||||
|
$tagInputVal.val(tagArr.join(','));
|
||||||
|
})();
|
||||||
|
"
|
||||||
|
%>
|
||||||
|
<% end%>
|
||||||
|
</div>
|
||||||
|
<%#= link_to_function l(:button_cancel), "$(\"#put-tag-form-#{obj.class}-#{obj.id}\").hide();"%>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<%# journal.children.each do |reply|%>
|
||||||
|
<%#= render :partial => "journal_reply_items", :locals => {:reply => reply, :journal => journal, :m_reply_id => reply} %>
|
||||||
|
<%# end %>
|
||||||
|
</ul>
|
|
@ -34,42 +34,18 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% elsif object_flag == '6' %>
|
<% elsif object_flag == '6' %>
|
||||||
<span><%#= image_tag("/images/sidebar/tags.png") %></span>
|
<span><%#= image_tag("/images/sidebar/tags.png") %></span>
|
||||||
<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? %>
|
<%#= 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>
|
||||||
|
|
||||||
<div id="tags_show-<%=obj.class%>-<%=obj.id%>" style="display:inline; ">
|
<div id="tags_show-<%=obj.class%>-<%=obj.id%>" style="display:inline; ">
|
||||||
<%= render :partial => "tags/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
|
<%= render :partial => "tags/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
|
||||||
</div>
|
</div>
|
||||||
<div id="put-tag-form-<%=obj.class%>-<%=obj.id%>" style="display: none">
|
<div id="put-tag-form-<%=obj.class%>-<%=obj.id%>" style="display: none;height: 100px;">
|
||||||
<%= form_for "tag_for_save",:remote=>true,:header=>"Accept: application/javascript",:url=>tag_path,
|
<%= render :partial => "courses/course_resources_html", :locals => {:obj => obj ,:object_flag => object_flag } %>
|
||||||
:update => "tags_show",
|
</div>
|
||||||
:complete => "$(\"#put-tag-form-#{obj.class}-#{obj.id}\").hide();" do |f| %>
|
|
||||||
<%= f.text_field :name ,:id => "name",:size=>"28",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length,:style=>"width: 100px;"%>
|
|
||||||
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
|
||||||
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
|
||||||
<%= f.submit l(:button_project_tags_add),:class => "small" %>
|
|
||||||
<div class='hidden'>
|
|
||||||
<% preTags = @preTags.nil? ? [] : @preTags %>
|
|
||||||
<% preTags.each do |tag|%>
|
|
||||||
<%= link_to tag, "
|
|
||||||
javascript:(function(){
|
|
||||||
var $tagInputVal = $('#put-tag-form-"+obj.class.to_s+"-"+obj.id.to_s+"').find('#name');
|
|
||||||
var tagArr = [];
|
|
||||||
tagArr = tagArr.concat( $tagInputVal[0].value.split(',') );
|
|
||||||
tagArr = tagArr.concat('"+tag.to_s+"');
|
|
||||||
tagArr = cleanArray(tagArr);
|
|
||||||
$tagInputVal.val(tagArr.join(','));
|
|
||||||
})();
|
|
||||||
"
|
|
||||||
%>
|
|
||||||
<% end%>
|
|
||||||
</div>
|
|
||||||
<%#= link_to_function l(:button_cancel), "$(\"#put-tag-form-#{obj.class}-#{obj.id}\").hide();"%>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|
||||||
<span><%= image_tag("/images/sidebar/tags.png") %></span>
|
<span><%= image_tag("/images/sidebar/tags.png") %></span>
|
||||||
|
|
Loading…
Reference in New Issue