Fetching all recent videos via ajax
This commit is contained in:
parent
781946fd40
commit
5ecf741921
1 changed files with 16 additions and 14 deletions
|
@ -39,38 +39,33 @@
|
|||
<!-- ******************************************* -->
|
||||
<!-- ************ EDITORS BLOCK END ************ -->
|
||||
<!-- ******************************************* -->
|
||||
{$limit = '2'}
|
||||
{$featured=$cbvid->get_videos(["featured"=>"yes","limit"=>$limit])}
|
||||
{if $featured}
|
||||
<section id="featured_vid_sec" class="clearfix featured-videos">
|
||||
<h1>{lang code="Featured Videos"}</h1>
|
||||
<div class="clearfix row">
|
||||
{foreach from=$featured item=video}
|
||||
<div id="featured_vid_sec" class="clearfix row">
|
||||
<!-- {foreach from=$featured item=video}
|
||||
<div class="item-video col-lg-6 col-md-6 col-sm-6 col-xs-12">
|
||||
{include file="$style_dir/blocks/videos/video.html" display_type='featuredVideos'}
|
||||
</div>
|
||||
{/foreach}
|
||||
{/foreach} -->
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
<button id="featured_load_more" class="btn btn-primary btn-block" loadtype="video" loadmode="featured" loadlimit="2" loadhit="2">Load More</button>
|
||||
<button id="featured_load_more" class="btn btn-primary btn-block" loadtype="video" loadmode="featured" loadlimit="2" loadhit="1">Load More</button>
|
||||
</div>
|
||||
</section>
|
||||
{else}
|
||||
<div class="well well-info">No Videos Found !</div>
|
||||
{/if}
|
||||
|
||||
{$videos=get_videos(["order" =>"date_added DESC", "limit" =>6])}
|
||||
|
||||
<!-- {$videos=get_videos(["order" =>"date_added DESC", "limit" =>6])} -->
|
||||
<section id="recent_vids_sec" class="clearfix videos">
|
||||
<h1>{lang code="Recent Videos"}</h1>
|
||||
<div class="clearfix row">
|
||||
{foreach $videos as $video}
|
||||
<!-- {foreach $videos as $video}
|
||||
<div class="item-video col-lg-4 col-md-4 col-sm-4 col-xs-6">
|
||||
{include file="$style_dir/blocks/videos/video.html" display_type='homeVideos'}
|
||||
</div>
|
||||
{/foreach}
|
||||
{/foreach} -->
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
<button id="recent_load_more" class="btn btn-primary col-md-12 col-sm-12" loadtype="video" loadmode="recent" loadlimit="8" loadhit="2">Load More</button>
|
||||
<button id="recent_load_more" class="btn btn-primary col-md-12 col-sm-12" loadtype="video" loadmode="recent" loadlimit="8" loadhit="1">Load More</button>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
@ -338,4 +333,11 @@
|
|||
$('#qlist_main').fadeOut('slow');
|
||||
$('#qlist_main').remove();
|
||||
});
|
||||
|
||||
$(document).ready(function(){
|
||||
$('#featured_load_more').trigger("click");
|
||||
$('#featured_load_more').hide();
|
||||
$('#recent_load_more').trigger("click");
|
||||
$('#recent_load_more').hide();
|
||||
});
|
||||
</script>
|
Loading…
Add table
Reference in a new issue