Sfoglia il codice sorgente

added today to calendar on desktop
fix margin at bottom iframe with new top bar
removed image alt from grav
added scroll to requesting and results

causefx 8 anni fa
parent
commit
508f01471f
5 ha cambiato i file con 52 aggiunte e 21 eliminazioni
  1. 2 2
      api/functions/homepage-connect-functions.php
  2. 10 10
      api/pages/homepage.php
  3. 10 1
      css/organizr.css
  4. 8 1
      js/custom.js
  5. 22 7
      js/functions.js

+ 2 - 2
api/functions/homepage-connect-functions.php

@@ -172,7 +172,7 @@ function resolveEmbyItem($itemDetails)
 	$embyItem['uid'] = $item['Id'];
 	$embyItem['imageType'] = (isset($item['ImageTags']['Primary']) ? "Primary" : false);
 	$embyItem['elapsed'] = isset($itemDetails['PlayState']['PositionTicks']) && $itemDetails['PlayState']['PositionTicks'] !== '0' ? (int)$itemDetails['PlayState']['PositionTicks'] : null;
-    $embyItem['duration'] = isset($itemDetails['NowPlayingItem']['RunTimeTicks']) ? (int)$itemDetails['NowPlayingItem']['RunTimeTicks'] : (int)(isset($item['RunTimeTicks']) ? $item['RunTimeTicks'] : '');
+	$embyItem['duration'] = isset($itemDetails['NowPlayingItem']['RunTimeTicks']) ? (int)$itemDetails['NowPlayingItem']['RunTimeTicks'] : (int)(isset($item['RunTimeTicks']) ? $item['RunTimeTicks'] : '');
 	$embyItem['watched'] = ($embyItem['elapsed'] && $embyItem['duration'] ? floor(($embyItem['elapsed'] / $embyItem['duration']) * 100) : 0);
 	$embyItem['transcoded'] = isset($itemDetails['TranscodingInfo']['CompletionPercentage']) ? floor((int)$itemDetails['TranscodingInfo']['CompletionPercentage']) : 100;
 	$embyItem['stream'] = @$itemDetails['PlayState']['PlayMethod'];
@@ -240,7 +240,7 @@ function resolveEmbyItem($itemDetails)
 		'rating' => @(string)$item['CommunityRating'],
 		'duration' => @(string)$item['RunTimeTicks'],
 		'originallyAvailableAt' => @(string)$item['PremiereDate'],
-        'year' => (string)isset($item['ProductionYear']) ? $item['ProductionYear'] : '',
+		'year' => (string)isset($item['ProductionYear']) ? $item['ProductionYear'] : '',
 		//'studio' => (string)$item['studio'],
 		'tagline' => @(string)$item['Taglines'][0],
 		'genres' => ($item['Genres']) ? $genres : '',

+ 10 - 10
api/pages/homepage.php

@@ -1,6 +1,6 @@
 <?php
-if(file_exists('config'.DIRECTORY_SEPARATOR.'config.php')){
-$pageHomepage = '
+if (file_exists('config' . DIRECTORY_SEPARATOR . 'config.php')) {
+	$pageHomepage = '
 <script>
 !function($) {
     "use strict";
@@ -26,19 +26,19 @@ $pageHomepage = '
 
         var $this = this;
         $this.$calendarObj = $this.$calendar.fullCalendar({
-            defaultView: (activeInfo.mobile) ? "list" : "'.$GLOBALS['calendarDefault'].'",
-            firstDay: "'.$GLOBALS['calendarFirstDay'].'",
-            timeFormat: "'.$GLOBALS['calendarTimeFormat'].'",
+            defaultView: (activeInfo.mobile) ? "list" : "' . $GLOBALS['calendarDefault'] . '",
+            firstDay: "' . $GLOBALS['calendarFirstDay'] . '",
+            timeFormat: "' . $GLOBALS['calendarTimeFormat'] . '",
             handleWindowResize: true,
             header: {
                left: "prev,next",
                center: "title",
-               right: (activeInfo.mobile) ? "" : "month,basicWeek,basicDay,list",
+               right: (activeInfo.mobile) ? "" : "today,month,basicWeek,basicDay,list",
             },
             views: {
-               basicDay: { buttonText: window.lang.translate("Day"), eventLimit: '.$GLOBALS['calendarLimit'].' },
-               basicWeek: { buttonText: window.lang.translate("Week"), eventLimit: '.$GLOBALS['calendarLimit'].' },
-               month: { buttonText: window.lang.translate("Month"), eventLimit: '.$GLOBALS['calendarLimit'].' },
+               basicDay: { buttonText: window.lang.translate("Day"), eventLimit: ' . $GLOBALS['calendarLimit'] . ' },
+               basicWeek: { buttonText: window.lang.translate("Week"), eventLimit: ' . $GLOBALS['calendarLimit'] . ' },
+               month: { buttonText: window.lang.translate("Month"), eventLimit: ' . $GLOBALS['calendarLimit'] . ' },
                today: { buttonText: window.lang.translate("Today") },
                list: { buttonText: window.lang.translate("List"), duration: {months: 1} },
             },
@@ -73,7 +73,7 @@ function($) {
 }(window.jQuery);
 </script>
 <div class="container-fluid p-t-30" id="homepage-items">
-    '.buildHomepage().'
+    ' . buildHomepage() . '
 </div>
 <div id="open-youtube" class="white-popup mfp-with-anim mfp-hide">
     <div class="col-md-8 col-md-offset-2 youtube-div">  </div>

+ 10 - 1
css/organizr.css

@@ -21,7 +21,7 @@
 
 .iframe {
     width: 100%;
-    height: calc(100vh - 60px);
+    height: calc(100vh - 40px);
     position: inherit;
     display: block;
 }
@@ -799,4 +799,13 @@ input.has-success {
     background: transparent;
     border-bottom: 1px solid;
     border-color: rgba(120,130,140,.13);
+}
+.resultBox-outside {
+    max-height: 96vh;
+}
+.resultBox-inside {
+    height: 100%;
+    max-height: 85vh;
+    overflow-x: hidden;
+    overflow-y: scroll;
 }

+ 8 - 1
js/custom.js

@@ -291,7 +291,14 @@ function doneTypingMediaSearch () {
         var response = JSON.parse(data);
         $('.mediaSearch-div').html('');
         $('.mediaSearch-div').html(buildMediaResults(response.data,server,query));
-        $('.openResults').trigger('click');
+        if(bowser.mobile !== true){
+            $('.resultBox-inside').slimScroll({
+                height: '100%',
+                position: 'right',
+                size: "5px",
+                color: '#dcdcdc'
+            });
+        }
     }).fail(function(xhr) {
         console.error("Organizr Function: API Connection Failed");
     })

+ 22 - 7
js/functions.js

@@ -1113,7 +1113,7 @@ function userMenu(user){
 	if (user.data.user.loggedin === true) {
 		menuList += `
 			<li class="dropdown">
-				<a class="dropdown-toggle profile-pic" data-toggle="dropdown" href="javascript:void(0)"><img alt="user-img" class="img-circle" src="`+user.data.user.image+`" width="36"><b class="hidden-xs">`+user.data.user.username+`</b><span class="caret"></span></a>
+				<a class="dropdown-toggle profile-pic" data-toggle="dropdown" href="javascript:void(0)"><img alt="" class="img-circle" src="`+user.data.user.image+`" width="36"><b class="hidden-xs">`+user.data.user.username+`</b><span class="caret"></span></a>
 				<ul class="dropdown-menu dropdown-user animated flipInY">
 					<li>
 						<div class="dw-user-box">
@@ -1134,7 +1134,7 @@ function userMenu(user){
 	}else{
 		menuList += `
 			<li class="dropdown">
-					<a class="dropdown-toggle profile-pic" data-toggle="dropdown" href="javascript:void(0)"><img alt="user-img" class="img-circle" src="`+user.data.user.image+`" width="36"><b class="hidden-xs">`+user.data.user.username+`</b><span class="caret"></span></a>
+					<a class="dropdown-toggle profile-pic" data-toggle="dropdown" href="javascript:void(0)"><img alt="" class="img-circle" src="`+user.data.user.image+`" width="36"><b class="hidden-xs">`+user.data.user.username+`</b><span class="caret"></span></a>
 					<ul class="dropdown-menu dropdown-user animated flipInY">
 						<li>
 							<div class="dw-user-box">
@@ -2682,7 +2682,7 @@ function buildRequest(array){
     </div>
 	<div id="new-request" class="white-popup mfp-with-anim mfp-hide">
 		<div class="col-md-8 col-md-offset-2">
-			<div class="white-box m-b-0 search-div">
+			<div class="white-box m-b-0 search-div resultBox-outside">
 				<div class="form-group m-b-0">
 					<div id="request-input-div" class="input-group">
 						<input id="request-input" lang="en" placeholder="Request Show or Movie" type="text" class="form-control inline-focus">
@@ -2703,7 +2703,7 @@ function buildRequest(array){
                     </div>
 					<div class="clearfix"></div>
 				</div>
-				<div id="request-results" class="row el-element-overlay"></div>
+				<div id="request-results" class="row el-element-overlay resultBox-inside"></div>
 			</div>
 		</div>
 	</div>
@@ -2836,6 +2836,14 @@ function doneTyping () {
 	$('#request-page').val(page);
 	requestSearch(title, page).success(function(data) {
 		$('#request-results').html(buildRequestResult(data,'',title,page,true));
+        if(bowser.mobile !== true){
+            $('.resultBox-inside').slimScroll({
+                height: '100%',
+                position: 'right',
+                size: "5px",
+                color: '#dcdcdc'
+            });
+        }
 		$('.mfp-wrap').animate({
 			scrollTop:  '0'
 		}, 500);
@@ -2854,6 +2862,14 @@ function requestList (list, type, page=1) {
 			var results = data.items;
 		}
 		$('#request-results').html(buildRequestResult(data, type, list, page));
+        if(bowser.mobile !== true){
+            $('.resultBox-inside').slimScroll({
+                height: '100%',
+                position: 'right',
+                size: "5px",
+                color: '#dcdcdc'
+            });
+        }
 		$('.mfp-wrap').animate({
 			scrollTop: '0'
 		}, 500);
@@ -3662,17 +3678,16 @@ function organizrSpecialSettings(array){
 		<li class=""><a class="waves-effect waves-light inline-popups" href="#mediaSearch-area" data-effect="mfp-zoom-out"> <i class="ti-search"></i></a></li>
 		`;
 		var searchBoxResults = `
-		<a class="inline-popups hidden openResults" href="#mediaSearch-area" data-effect="mfp-zoom-out"></a>
 		<div id="mediaSearch-area" class="white-popup mfp-with-anim mfp-hide">
 			<div class="col-md-8 col-md-offset-2">
-				<div class="white-box m-b-0">
+				<div class="white-box m-b-0 resultBox-outside">
 					<div class="form-group m-b-0">
 
 							<input id="mediaSearchQuery" data-server="`+array.settings.homepage.search.type+`" lang="en" placeholder="Search My Media" type="text" class="form-control inline-focus">
 
 						<div class="clearfix"></div>
 					</div>
-					<div class="row el-element-overlay mediaSearch-div"></div>
+					<div class="row el-element-overlay mediaSearch-div resultBox-inside"></div>
 				</div>
 			</div>
 		</div>