commit
5259831224
@ -0,0 +1,8 @@
|
||||
<% if !@save_flag && @save_message %>
|
||||
$("#error_show").html("<%= @save_message.join(', ') %>");
|
||||
<% elsif @message && @message != "" %>
|
||||
$("#error_show").html("<%= @message.html_safe %>");
|
||||
<% else %>
|
||||
closeModal();
|
||||
location.reload();
|
||||
<% end %>
|
@ -0,0 +1,31 @@
|
||||
<div id="popbox_upload" style="margin-top: -30px;margin-left: -20px;margin-right: -10px;">
|
||||
<div class="upload_con">
|
||||
<h2>将此资源引入组织资源栏目</h2>
|
||||
<% if error == '403' %>
|
||||
<div class="upload_box">
|
||||
<div style="color: red;">您没有权限引用此资源</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="upload_box">
|
||||
<div id="error_show" style="color: red;"></div>
|
||||
<%= form_tag attachments_add_exist_file_to_org_subfield_path,
|
||||
method: :post,
|
||||
remote: true,
|
||||
id: "relation_file_form" do %>
|
||||
<%= hidden_field_tag(:file_id, file.id) %>
|
||||
<%= content_tag('div', org_subfields_check_box_tags('org_subfields[org_subfield][]',org_subfield.organization.org_subfields.where("field_type='Resource'"),file), :id => 'org_subfields')%>
|
||||
<a id="submit_quote" href="javascript:void(0)" class="blue_btn fl c_white" onclick="submit_quote();">引 用</a><a href="javascript:void(0)" class="blue_btn grey_btn fl c_white" onclick="closeModal();">取 消</a>
|
||||
<% end -%>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function submit_quote()
|
||||
{
|
||||
$('#submit_quote').parent().submit();
|
||||
}
|
||||
</script>
|
@ -0,0 +1,45 @@
|
||||
<% if org_subfield %>
|
||||
<span class="files_tag_icon" >
|
||||
<a title=""
|
||||
onclick="search_org_subfield_tag_attachment('<%= search_org_subfield_tag_attachment_org_subfield_files_path(org_subfield)%>','','<%= @q%>','<%= org_subfield.id%>');"
|
||||
>全部</a></span>
|
||||
<% end %>
|
||||
<% unless tag_list.nil?%>
|
||||
<% tag_list.each do |k,v|%>
|
||||
<% if tag_name && tag_name == k%>
|
||||
<!-- 鼠标不能移动是因为 href="javascript:void(0);"导致的 -->
|
||||
<span> <a class="files_tag_select" ondblclick="rename_tag($(this),'<%= k %>','',<%= 6 %>);"><%= k%>(<%= v%>)</a></span>
|
||||
<% else%>
|
||||
<span class="files_tag_icon" >
|
||||
<a title="双击可编辑"
|
||||
onclick="search_org_subfield_tag_attachment('<%= search_org_subfield_tag_attachment_org_subfield_files_path(org_subfield)%>','<%= k %>','<%= @q %>','<%= org_subfield.id %>');"
|
||||
ondblclick="rename_tag($(this),'<%= k %>','',<%= 6 %>);"><%= k%>(<%= v%>)</a></span>
|
||||
<% end%>
|
||||
<% end%>
|
||||
<% end%>
|
||||
|
||||
<script>
|
||||
var clickFunction = null; //单击事件函数
|
||||
var isdb = false; //是否双击
|
||||
function search_org_subfield_tag_attachment(url,tag_name,q,org_subfield_id,sort) {
|
||||
//alert("111");
|
||||
//clearTimeout(clickFunction);
|
||||
clickFunction = setTimeout(function () {
|
||||
search_func();
|
||||
}, 500);
|
||||
function search_func() {
|
||||
if (isdb != false) return;
|
||||
$.get(
|
||||
url,
|
||||
{
|
||||
tag_name: tag_name,
|
||||
q: q,
|
||||
org_subfield_id: org_subfield_id
|
||||
},
|
||||
function (data) {
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
</script>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue