没有连接点击不刷新页面

This commit is contained in:
huang 2016-05-20 19:52:42 +08:00
parent e10bc46361
commit baf7e1dbc0
2 changed files with 17 additions and 3 deletions

View File

@ -15,7 +15,7 @@
</li> </li>
<li class="resource-list-name fl"> <li class="resource-list-name fl">
<% if attach.is_public == 0 && attach.get_apply_resource_status(attach.id, attach.author_id) != 2 %> <% if attach.is_public == 0 && attach.get_apply_resource_status(attach.id, attach.author_id) != 2 %>
<a href="" style="cursor: default" class = "resourcesBlack resource-list-middle hidden mw280" title="<%= attach.filename %>"><%= attach.filename %> </a> <a style="cursor: default" class = "resourcesBlack resource-list-middle hidden mw280" title="<%= attach.filename %>"><%= attach.filename %> </a>
<% else %> <% else %>
<%= link_to truncate(attach.filename, :length => 30), download_named_attachment_path(attach.id, attach.filename), :title => attach.filename, :class => 'resourcesBlack resource-list-middle hidden mw280' %> <%= link_to truncate(attach.filename, :length => 30), download_named_attachment_path(attach.id, attach.filename), :title => attach.filename, :class => 'resourcesBlack resource-list-middle hidden mw280' %>
<% end %> <% end %>

View File

@ -6,8 +6,22 @@
<ul class="subjectRow"> <ul class="subjectRow">
<li class="subjectName fl hidden"> <li class="subjectName fl hidden">
<label> <label>
<% if attach.is_public == 0 && (@type == "6" || @type == "2") && attach.author != User.current && attach.get_apply_resource_status(attach.id, attach.author_id) != 2 %>
<input name="checkbox1[]" type="checkbox" disabled="disabled" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="mr5" style="vertical-align:middle;" />
<% else %>
<input name="checkbox1[]" type="checkbox" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="mr5" style="vertical-align:middle;" /> <input name="checkbox1[]" type="checkbox" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="mr5" style="vertical-align:middle;" />
<span><%= link_to truncate(attach.filename, :length => 30), download_named_attachment_path(attach.id, attach.filename), :title => attach.filename%></span> <% end %>
<span>
<% if attach.is_public == 0 && attach.get_apply_resource_status(attach.id, attach.author_id) != 2 %>
<a href="" style="cursor: default" title="<%= attach.filename %>"><%= attach.filename %> </a>
<% else %>
<%= link_to truncate(attach.filename, :length => 30), download_named_attachment_path(attach.id, attach.filename), :title => attach.filename%>
<% end %>
</span>
<% if attach.is_public == 0 && (@type == "6" || @type == "2") && attach.author != User.current %>
<img src="/images/locked.png" alt="私有" title="私有" class="resource-list-middle" height="16" width="16">
<% end %>
</label> </label>
</li> </li>
<li class="subjectType fl"><%= get_resource_type(attach.container_type)%></li> <li class="subjectType fl"><%= get_resource_type(attach.container_type)%></li>