浏览代码

recent cleanup

causefx 8 年之前
父节点
当前提交
8331751846
共有 2 个文件被更改,包括 42 次插入17 次删除
  1. 35 9
      js/custom.js
  2. 7 8
      js/functions.js

+ 35 - 9
js/custom.js

@@ -97,23 +97,49 @@ function pageLoad(){
             dots:false,
     	    responsive:{
     	        0:{
-    	            items:1,
-                    center:true,
-                    stagePadding: 50
+    	            items:2
     	        },
-    	        480:{
-    	            items:2,
-                    center:true,
-                    stagePadding: 50
+    	        500:{
+    	            items:3
     	        },
-    	        700:{
+    	        650:{
     	            items:4
     	        },
-    	        960:{
+    	        800:{
+    	            items:5
+    	        },
+    	        950:{
     	            items:6
     	        },
     	        1100:{
     	            items:7
+    	        },
+    	        1250:{
+    	            items:8
+    	        },
+    	        1400:{
+    	            items:9
+    	        },
+    	        1550:{
+    	            items:10
+    	        },
+    	        1700:{
+    	            items:11
+    	        },
+    	        1850:{
+    	            items:12
+    	        },
+    	        2000:{
+    	            items:13
+    	        },
+    	        2150:{
+    	            items:14
+    	        },
+    	        2300:{
+    	            items:15
+    	        },
+    	        2450:{
+    	            items:16
     	        }
     	    }
     	})

+ 7 - 8
js/functions.js

@@ -1893,12 +1893,12 @@ function buildPlexRecentItem(array){
 	return items;
 }
 function buildPlexStream(array){
-	var streams = array.content.length;
-	return `
+	var streams = (typeof array !== 'undefined') ? array.content.length : false;
+	return (streams) ? `
 	<div id="plexStreams" data-check="`+escape(JSON.stringify(array.content))+`">
 		<div class="row el-element-overlay m-b-20">
 		    <div class="col-md-12">
-		        <h4 lang="en">Active Plex Streams `+streams+`</h4>
+		        <h4 class="pull-left" lang="en">Active Plex Stream(s): </h4><h4 class="pull-left">&nbsp;<span class="label label-primary m-l-5">`+streams+`</span></h4>
 		        <hr>
 		    </div>
 		    <!-- .cards -->
@@ -1907,11 +1907,11 @@ function buildPlexStream(array){
 		</div>
 	</div>
 	<div class="clearfix"></div>
-	`;
+	` : '';
 }
 function buildPlexRecent(array){
-	var recent = array.content.length;
-	return `
+	var recent = (typeof array !== 'undefined') ? true : false;
+	return (recent) ? `
 	<div id="plexRecent" data-check="`+escape(JSON.stringify(array.content))+`" class="row">
         <div class="col-lg-12">
             <div class="panel panel-default">
@@ -1920,12 +1920,11 @@ function buildPlexRecent(array){
                     <div class="owl-carousel owl-theme recent-items">
 						`+buildPlexRecentItem(array.content)+`
                     </div>
-					<div id="recent-hidden" class="hide"></div>
                 </div>
             </div>
         </div>
     </div>
-	`;
+	` : '';
 }
 function plexStream(){
 	ajaxloader(".content-wrap","in");