Modified:home page load more fixed for recent and featured videos
This commit is contained in:
parent
eb098d449a
commit
bda6df39e6
2 changed files with 20 additions and 9 deletions
|
@ -269,18 +269,12 @@ function homePageVideos(qlist_items) {
|
||||||
$(main_object).text("Loading..");
|
$(main_object).text("Loading..");
|
||||||
if (loadType != 'count') {
|
if (loadType != 'count') {
|
||||||
if (loadMode == 'featured') {
|
if (loadMode == 'featured') {
|
||||||
for (var i = 0; i < featuredFound; i++) {
|
|
||||||
$(document).find('#featured_pre').append('<div class="item-video col-lg-6 col-md-6 col-sm-6 col-xs-12"><div style="height:200px" class="thumb-video background-masker clearfix"></div></div>');
|
|
||||||
}
|
|
||||||
var currWidth = $(window).width();
|
var currWidth = $(window).width();
|
||||||
if (loadHit >= 2 && currWidth > 767) {
|
if (loadHit >= 2 && currWidth > 767) {
|
||||||
var moveTo = $( ".featAppending" ).last().offset().top;
|
var moveTo = $( ".featAppending" ).last().offset().top;
|
||||||
thakkiLoading(moveTo);
|
thakkiLoading(moveTo);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (var i = 0; i < recentFound; i++) {
|
|
||||||
$(document).find('#recent_pre').append('<div class="item-video col-lg-4 col-md-4 col-sm-4 col-xs-6"><div class="thumb-video background-masker clearfix"></div><div class="loadingInfo video-info relative clearfix"><div class="background-masker heading clearfix"></div><div class="background-masker paragraph clearfix"></div><div class="background-masker clearfix views-date"></div></div></div>');
|
|
||||||
}
|
|
||||||
preLoadingBlock();
|
preLoadingBlock();
|
||||||
var currWidth = $(window).width();
|
var currWidth = $(window).width();
|
||||||
if (loadHit >= 2 && currWidth > 767) {
|
if (loadHit >= 2 && currWidth > 767) {
|
||||||
|
@ -299,11 +293,17 @@ function homePageVideos(qlist_items) {
|
||||||
if (loadHit == 1) {
|
if (loadHit == 1) {
|
||||||
//alert(loadMode);
|
//alert(loadMode);
|
||||||
if (loadMode == 'featured') {
|
if (loadMode == 'featured') {
|
||||||
|
for (var i = 0; i < featuredFound; i++) {
|
||||||
|
$(document).find('#featured_pre').append('<div class="item-video col-lg-6 col-md-6 col-sm-6 col-xs-12"><div style="height:200px" class="thumb-video background-masker clearfix"></div></div>');
|
||||||
|
}
|
||||||
$('#featured_load_more').hide();
|
$('#featured_load_more').hide();
|
||||||
$('#featured_pre').hide();
|
$('#featured_pre').hide();
|
||||||
$("#featured_vid_sec").html('<div class="break2"></div><span class="well well-info btn-block">'+langCo+'</span>');
|
$("#featured_vid_sec").html('<div class="break2"></div><span class="well well-info btn-block">'+langCo+'</span>');
|
||||||
return false;
|
return false;
|
||||||
} else if (loadMode == 'recent') {
|
} else if (loadMode == 'recent') {
|
||||||
|
for (var i = 0; i < recentFound; i++) {
|
||||||
|
$(document).find('#recent_pre').append('<div class="item-video col-lg-4 col-md-4 col-sm-4 col-xs-6"><div class="thumb-video background-masker clearfix"></div><div class="loadingInfo video-info relative clearfix"><div class="background-masker heading clearfix"></div><div class="background-masker paragraph clearfix"></div><div class="background-masker clearfix views-date"></div></div></div>');
|
||||||
|
}
|
||||||
$('#recent_load_more').remove();
|
$('#recent_load_more').remove();
|
||||||
$('#recent_pre').remove();
|
$('#recent_pre').remove();
|
||||||
$("#recent_vids_sec").html('<div class="break2"></div><span class="well well-info btn-block">'+noRecent+'</span>');
|
$("#recent_vids_sec").html('<div class="break2"></div><span class="well well-info btn-block">'+noRecent+'</span>');
|
||||||
|
@ -318,9 +318,16 @@ function homePageVideos(qlist_items) {
|
||||||
$('#recent_pre').html('');
|
$('#recent_pre').html('');
|
||||||
$(data).appendTo('#recent_vids_sec').fadeIn('slow');
|
$(data).appendTo('#recent_vids_sec').fadeIn('slow');
|
||||||
recentSect = $('#container').find('#total_videos_recent').text();
|
recentSect = $('#container').find('#total_videos_recent').text();
|
||||||
if (loadHit == 1 && recentSect <= 2) {
|
recentSect = parseInt(recentSect);
|
||||||
|
loadHit = parseInt(loadHit);
|
||||||
|
loadLimit = parseInt(loadLimit);
|
||||||
|
|
||||||
|
if (loadHit == 1 && loadLimit >= recentSect) {
|
||||||
|
moreRecent = false;
|
||||||
|
}else if (loadHit * loadLimit >= recentSect) {
|
||||||
moreRecent = false;
|
moreRecent = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (moreRecent == true) {
|
if (moreRecent == true) {
|
||||||
$(document).find('#recent-loadmore').append('<div class="clearfix text-center"><button id="recent_load_more" class="btn btn-loadmore" loadtype="video" loadmode="recent" loadlimit="'+loadLimit+'" loadhit="'+newloadHit+'">'+loadMoreLang+'</button></div>');
|
$(document).find('#recent-loadmore').append('<div class="clearfix text-center"><button id="recent_load_more" class="btn btn-loadmore" loadtype="video" loadmode="recent" loadlimit="'+loadLimit+'" loadhit="'+newloadHit+'">'+loadMoreLang+'</button></div>');
|
||||||
}
|
}
|
||||||
|
@ -331,12 +338,16 @@ function homePageVideos(qlist_items) {
|
||||||
$(data).appendTo('#featured_vid_sec').fadeIn('slow');
|
$(data).appendTo('#featured_vid_sec').fadeIn('slow');
|
||||||
featuredSect = $('#container').find('#total_videos_featured').text();
|
featuredSect = $('#container').find('#total_videos_featured').text();
|
||||||
|
|
||||||
|
loadLimit = parseInt(loadLimit);
|
||||||
|
featuredSect = parseInt(featuredSect);
|
||||||
|
loadHit = parseInt(loadHit);
|
||||||
|
|
||||||
if (loadHit == 1 && loadLimit >= featuredSect) {
|
if (loadHit == 1 && loadLimit >= featuredSect) {
|
||||||
moreFeatured = false;
|
moreFeatured = false;
|
||||||
} else if (loadHit * loadLimit >= featuredSect) {
|
} else if (loadHit * loadLimit >= featuredSect) {
|
||||||
moreFeatured = false;
|
moreFeatured = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (moreFeatured == true) {
|
if (moreFeatured == true) {
|
||||||
$(document).find('#featured-loadmore').append('<div class="clearfix text-center"><button id="featured_load_more" class="btn btn-loadmore" loadtype="video" loadmode="featured" loadlimit="'+loadLimit+'" loadhit="'+newloadHit+'">'+loadMoreLang+'</button></div>');
|
$(document).find('#featured-loadmore').append('<div class="clearfix text-center"><button id="featured_load_more" class="btn btn-loadmore" loadtype="video" loadmode="featured" loadlimit="'+loadLimit+'" loadhit="'+newloadHit+'">'+loadMoreLang+'</button></div>');
|
||||||
}
|
}
|
||||||
|
|
2
upload/styles/cb_28/theme/js/custom.min.js
vendored
2
upload/styles/cb_28/theme/js/custom.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue