Ver Fonte

Homepage CSS and Popout etc

Homepage Calendar CSS
Homepage Notice Added
Popout button added
causefx há 8 anos atrás
pai
commit
d05462443f
7 ficheiros alterados com 141 adições e 54 exclusões
  1. 4 2
      bower_components/fullcalendar/dist/fullcalendar.js
  2. 6 2
      config/configDefaults.php
  3. 11 0
      css/style.css
  4. 1 1
      functions.php
  5. 61 43
      homepage.php
  6. 10 0
      index.php
  7. 48 6
      settings.php

+ 4 - 2
bower_components/fullcalendar/dist/fullcalendar.js

@@ -6656,8 +6656,10 @@ DayGrid.mixin({
 		if (seg.isStart) {
 			timeText = this.getEventTimeText(event);
 			if (timeText) {
-				timeHtml = '<span class="fc-time">' + htmlEscape(timeText) + '</span>';
-			}
+				timeHtml = '<span class="fc-time">' + htmlEscape(timeText) + '</span><br/>';
+			}else{
+       timeHtml = '<br/>';
+   }
 		}
 
 		titleHtml =

+ 6 - 2
config/configDefaults.php

@@ -71,6 +71,10 @@ return array(
 	"homepageCustomHTML1Auth" => false,
 	"git_branch" => "master",
 	"git_check" => true,
-    "speedTest" => false,
-    "smtpHostType" => "tls",
+ "speedTest" => false,
+ "smtpHostType" => "tls",
+ "homepageNoticeTitle" => "",
+ "homepageNoticeMessage" => "",
+ "homepageNoticeType" => "",
+ "homepageNoticeAuth" => "false",
 );

+ 11 - 0
css/style.css

@@ -1267,6 +1267,7 @@ body {
 .member-info {
   font-weight: 400;
   margin-top: 10px;
+  overflow: hidden;
 }
 
 .member-info img {
@@ -2155,6 +2156,13 @@ table.dataTable.no-footer, table.dataTable thead th, table.dataTable thead td {
     -moz-background-clip: padding;
     background-clip: padding-box;
 }
+@media (min-width: 768px) {
+    .fc-title {
+     text-overflow: ellipsis;
+     white-space: nowrap;
+     overflow: hidden;   
+    }
+}
 
 .fc-calendar .fc-toolbar {
   background: #63A8EB;
@@ -6146,6 +6154,9 @@ label {
   }.mdi-fullscreen {
     display: none !important;
   }
+  .mdi-window-restore {
+    display: none !important;
+  }    
   /*Remove margins from content block*/
   .content {
     margin: 0;

+ 1 - 1
functions.php

@@ -2,7 +2,7 @@
 
 // ===================================
 // Define Version
- define('INSTALLEDVERSION', '1.37');
+ define('INSTALLEDVERSION', '1.375');
 // ===================================
 
 // Debugging output functions

+ 61 - 43
homepage.php

@@ -228,12 +228,27 @@ endif; ?>
             <div id="content" class="container-fluid">
 <!-- <button id="numBnt">Numerical</button> -->
                 <br/>
-
-				 <?php if (qualifyUser(HOMEPAGECUSTOMHTML1AUTH) && HOMEPAGECUSTOMHTML1) { ?>
-				<div>
-					<?php echo HOMEPAGECUSTOMHTML1; ?>
-				</div>
+ 
+                <?php if (qualifyUser(HOMEPAGENOTICEAUTH) && HOMEPAGENOTICETITLE && HOMEPAGENOTICETYPE && HOMEPAGENOTICEMESSAGE) { ?>
+                <div class="row">
+                    <div class="col-lg-12">
+                        <div class="content-box big-box box-shadow panel-box panel-<?php echo HOMEPAGENOTICETYPE; ?>">
+                            <div class="content-title i-block">
+                                <h4 class="zero-m"><strong><?php echo HOMEPAGENOTICETITLE; ?></strong></h4>
+                                <div class="content-tools i-block pull-right">
+                                    <a class="close-btn">
+                                        <i class="fa fa-times"></i>
+                                    </a>
+                                </div>
+                            </div>
+                            <p><?php echo HOMEPAGENOTICEMESSAGE; ?></p>
+                        </div>
+                    </div>
+                </div>
                 <?php } ?>
+                
+                <?php if (qualifyUser(HOMEPAGECUSTOMHTML1AUTH) && HOMEPAGECUSTOMHTML1) { echo "<div>" . HOMEPAGECUSTOMHTML1 . "</div>"; } ?>
+
                 <?php if(SPEEDTEST == "true"){ ?>
                 <style type="text/css">
 
@@ -498,23 +513,26 @@ endif; ?>
             </div>    
         </div>
         <script>
-		function localStorageSupport() {
-			return (('localStorage' in window) && window['localStorage'] !== null)
-		}
+        $('.close-btn').click(function(e){
+            var closedBox = $(this).closest('div.content-box').remove();
+            e.preventDefault();
+        });
+
+        function localStorageSupport() {
+            return (('localStorage' in window) && window['localStorage'] !== null)
+        }
 		
         $( document ).ready(function() {
-             $('.repeat-btn').click(function(){
+            $('.repeat-btn').click(function(){
                 var refreshBox = $(this).closest('div.content-box');
                 $("<div class='refresh-preloader'><div class='la-timer la-dark'><div></div></div></div>").appendTo(refreshBox).fadeIn(300);
-
                 setTimeout(function(){
-                  var refreshPreloader = refreshBox.find('.refresh-preloader'),
-                      deletedRefreshBox = refreshPreloader.fadeOut(300, function(){
-                      refreshPreloader.remove();
-                  });
+                    var refreshPreloader = refreshBox.find('.refresh-preloader'),
+                    deletedRefreshBox = refreshPreloader.fadeOut(300, function(){
+                        refreshPreloader.remove();
+                    });
                 },1500);
-
-              });
+            });
 
             $("body").niceScroll({
                 railpadding: {top:0,right:0,left:0,bottom:0},
@@ -534,32 +552,32 @@ endif; ?>
             // check if browser support HTML5 local storage
 			
             <?php if((NZBGETURL != "" && qualifyUser(NZBGETHOMEAUTH)) || (SABNZBDURL != "" && qualifyUser(SABNZBDHOMEAUTH))){ ?>
-			var queueRefresh = 30000;
-			var historyRefresh = 120000; // This really doesn't need to happen that often
-			
-			var queueLoad = function() {
-				<?php if(SABNZBDURL != "") { echo '$("tbody.dl-queue.sabnzbd").load("ajax.php?a=sabnzbd-update&list=queue");'; } ?>
-				<?php if(NZBGETURL != "") { echo '$("tbody.dl-queue.nzbget").load("ajax.php?a=nzbget-update&list=listgroups");'; } ?>
-			};
-			
-			var historyLoad = function() {
-				<?php if(SABNZBDURL != "") { echo '$("tbody.dl-history.sabnzbd").load("ajax.php?a=sabnzbd-update&list=history");'; } ?>
-				<?php if(NZBGETURL != "") { echo '$("tbody.dl-history.nzbget").load("ajax.php?a=nzbget-update&list=history");'; } ?>
-			};
-			
-			// Initial Loads
-			queueLoad();
-			historyLoad();
-			
-			// Interval Loads
-			var queueInterval = setInterval(queueLoad, queueRefresh);
-			var historyInterval = setInterval(historyLoad, historyRefresh);
-			
-			// Manual Load
-			$("#getDownloader").click(function() {
-				queueLoad();
-				historyLoad();
-			});
+            var queueRefresh = 30000;
+            var historyRefresh = 120000; // This really doesn't need to happen that often
+
+            var queueLoad = function() {
+            <?php if(SABNZBDURL != "") { echo '$("tbody.dl-queue.sabnzbd").load("ajax.php?a=sabnzbd-update&list=queue");'; } ?>
+            <?php if(NZBGETURL != "") { echo '$("tbody.dl-queue.nzbget").load("ajax.php?a=nzbget-update&list=listgroups");'; } ?>
+            };
+
+            var historyLoad = function() {
+            <?php if(SABNZBDURL != "") { echo '$("tbody.dl-history.sabnzbd").load("ajax.php?a=sabnzbd-update&list=history");'; } ?>
+            <?php if(NZBGETURL != "") { echo '$("tbody.dl-history.nzbget").load("ajax.php?a=nzbget-update&list=history");'; } ?>
+            };
+
+            // Initial Loads
+            queueLoad();
+			         historyLoad();
+
+            // Interval Loads
+            var queueInterval = setInterval(queueLoad, queueRefresh);
+            var historyInterval = setInterval(historyLoad, historyRefresh);
+
+            // Manual Load
+            $("#getDownloader").click(function() {
+                queueLoad();
+                historyLoad();
+            });
             <?php } ?>
         });
         </script>
@@ -600,7 +618,7 @@ endif; ?>
 
                     editable: false,
                     droppable: false,
-					timeFormat: '<?php echo CALTIMEFORMAT; ?>',
+					               timeFormat: '<?php echo CALTIMEFORMAT; ?>',
                 });
             });
             $('#imagetype_selector').on('change',function(){

+ 10 - 0
index.php

@@ -635,6 +635,11 @@ endif; ?>
                                 <i class="mdi mdi-refresh"></i>
                             </a>
                         </li>
+                        <li class="dropdown some-btn">
+                            <a id="popout" class="popout">
+                                <i class="mdi mdi-window-restore"></i>
+                            </a>
+                        </li>
                         <li style="display: none" id="splitView" class="dropdown some-btn">
                             <a class="spltView">
                                 <i class="mdi mdi-window-close"></i>
@@ -1345,6 +1350,11 @@ endif; ?>
 
             },500);
         });
+        $('#popout').on('click tap', function(){
+            var activeFrame = $('#content').find('.active').children('iframe');
+            console.log(activeFrame.attr('src'));
+            window.open(activeFrame.attr('src'), '_blank');
+        });    
         $('#reload').on('contextmenu', function(e){
 
             $("i[class^='mdi mdi-refresh']").attr("class", "mdi mdi-refresh fa-spin");

+ 48 - 6
settings.php

@@ -619,12 +619,12 @@ echo buildSettings(
 						'value' => HOMEPAGEAUTHNEEDED,
 						'options' => $userTypes,
 					),
-                    array(
-                        'type' => 'checkbox',
-                        'labelTranslate' => 'SPEED_TEST',
-                        'name' => 'speedTest',
-                        'value' => SPEEDTEST,
-                    ),
+    array(
+        'type' => 'checkbox',
+        'labelTranslate' => 'SPEED_TEST',
+        'name' => 'speedTest',
+        'value' => SPEEDTEST,
+    ),
 					/*
 					array(
 						'type' => 'custom',
@@ -1003,6 +1003,48 @@ echo buildSettings(
 					),
 				),
 			),
+   array(
+				'title' => 'Notice',
+				'id' => 'notice',
+				'image' => 'images/pin.png',
+				'fields' => array(
+					array(
+						'type' => $userSelectType,
+						'labelTranslate' => 'SHOW_ON_HOMEPAGE',
+						'name' => 'homepageNoticeAuth',
+						'value' => HOMEPAGENOTICEAUTH,
+						'options' => $userTypes,
+					),
+     array(
+						'type' => $userSelectType,
+						'labelTranslate' => 'NOTICE_COLOR',
+						'name' => 'homepageNoticeType',
+						'value' => HOMEPAGENOTICETYPE,
+						'options' => array(
+         'Green' => 'success',
+         'Blue' => 'primary',
+         'Gray' => 'gray',
+         'Red' => 'danger',
+         'Yellow' => 'warning',
+         'Light Blue' => 'info',
+        ),
+					),
+     array(
+						'type' => 'text',
+						'labelTranslate' => 'NOTICE_TITLE',
+						'name' => 'homepageNoticeTitle',
+						'value' => HOMEPAGENOTICETITLE,
+					),
+					array(
+						'type' => 'textarea',
+						'labelTranslate' => 'NOTICE_MESSAGE',
+						'name' => 'homepageNoticeMessage',
+						'value' => HOMEPAGENOTICEMESSAGE,
+      'rows' => 5,
+						'style' => 'background: #000; color: #FFF;',
+					),
+				),
+			),
 			array(
 				'title' => 'Custom HTML 1',
 				'id' => 'customhtml1',