Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
10518afa84
|
@ -14,9 +14,10 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
<div class="for_img_thumbnails">
|
||||||
<% curse_attachments.each do |file| %>
|
<% curse_attachments.each do |file| %>
|
||||||
<div class="re_con_box">
|
<div class="re_con_box">
|
||||||
<div class=" ">
|
<div class="">
|
||||||
<%= link_to_attachment file, :download => true,:text => truncate(file.filename,length: 35, omission: '...'), :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "c_dblue f_14 f_b f_l" %>
|
<%= link_to_attachment file, :download => true,:text => truncate(file.filename,length: 35, omission: '...'), :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "c_dblue f_14 f_b f_l" %>
|
||||||
<% if User.current.logged? %>
|
<% if User.current.logged? %>
|
||||||
<% if (is_course_teacher(User.current,@course) || file.author_id == User.current.id) && course_contains_attachment?(@course,file) %>
|
<% if (is_course_teacher(User.current,@course) || file.author_id == User.current.id) && course_contains_attachment?(@course,file) %>
|
||||||
|
@ -50,6 +51,7 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div><!---re_con_box end-->
|
</div><!---re_con_box end-->
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</div>
|
||||||
<ul class="wlist">
|
<ul class="wlist">
|
||||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => @is_remote, :flag => true%>
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => @is_remote, :flag => true%>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -632,7 +632,12 @@ function img_thumbnails() {
|
||||||
if (/\.(jpg|png|gif|bmp|jpeg|PNG|BMP|GIF|JPG|JPEG)$/.test(href_value)) {
|
if (/\.(jpg|png|gif|bmp|jpeg|PNG|BMP|GIF|JPG|JPEG)$/.test(href_value)) {
|
||||||
$(element).colorbox({rel:'nofollow'});
|
$(element).colorbox({rel:'nofollow'});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
$('.for_img_thumbnails').find('a').each(function(index, element) {
|
||||||
|
var href_value = $(element).attr('href');
|
||||||
|
if (/\.(jpg|png|gif|bmp|jpeg|PNG|BMP|GIF|JPG|JPEG)$/.test(href_value)) {
|
||||||
|
$(element).colorbox({rel:'nofollow'});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$(document).ready(img_thumbnails);
|
$(document).ready(img_thumbnails);
|
||||||
|
|
Loading…
Reference in New Issue