Fix bug.
This commit is contained in:
parent
95b077b1e4
commit
8f6bee5a8b
|
@ -324,7 +324,7 @@ class Admin::GalleriesController < OrbitAdminController
|
|||
@color_save = 'transparent'
|
||||
end
|
||||
if request.xhr?
|
||||
render :partial => "album", :collection => @albums
|
||||
render :partial => "albums"
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<%= render :partial => "album", :collection => @albums %>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
if( params()['keywords']){
|
||||
$('#edit-order-btn').css("display",'none');
|
||||
}else{
|
||||
$('#edit-order-btn').css("display",'');
|
||||
}
|
||||
max_page = <%= (@fiter_albums.length/@limit_count).ceil rescue 1 %>
|
||||
if( max_page > 1 && max_page >= page_no){
|
||||
$("#edit-order-btn").hide();
|
||||
}
|
||||
})
|
||||
</script>
|
|
@ -10,6 +10,9 @@
|
|||
var page_no = 2
|
||||
var catch_flag = true
|
||||
var max_page = <%= (@fiter_albums.length/@limit_count).ceil rescue 1 %>
|
||||
if( max_page > 1){
|
||||
$("#edit-order-btn").hide();
|
||||
}
|
||||
$('.bottomnav').ready(function(){
|
||||
function load_html_func(){
|
||||
$('#load_html').text("<%= t('gallery.wait_time') %>")
|
||||
|
@ -27,7 +30,8 @@
|
|||
page_no++
|
||||
catch_flag = true
|
||||
if (max_page < page_no){
|
||||
$('#load_html').hide()
|
||||
$("#edit-order-btn").show();
|
||||
$('#load_html').hide();
|
||||
}
|
||||
$('#load_html').text("<%= t('gallery.load_html') %>")
|
||||
},
|
||||
|
@ -61,7 +65,7 @@
|
|||
<div class="rgbody" style='float: left;'>
|
||||
<ul id="orbit_gallery" class="gallery clearfix" data-gallery-id="gallery"
|
||||
style='display: inline-flex;flex-wrap: wrap;'>
|
||||
<%= render :partial => "album", :collection => @albums %>
|
||||
<%= render :partial => "albums"%>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="bottomnav clearfix">
|
||||
|
@ -75,5 +79,5 @@
|
|||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= render :partial => "album", :collection => @albums %>
|
||||
<%= render :partial => "albums" %>
|
||||
<% end %>
|
Loading…
Reference in New Issue