Explorar el Código

Fix tab resize on window resize

Fix tab resize on window resize
causefx hace 9 años
padre
commit
2f9058604e
Se han modificado 3 ficheros con 81 adiciones y 19 borrados
  1. 24 0
      index.php
  2. 0 0
      js/tabs.min.js
  3. 57 19
      settings.php

+ 24 - 0
index.php

@@ -400,6 +400,30 @@ if(empty($defaulttab)){ $defaulttab = "tab1";}
                     
                 });
                 
+                <?php if(!isset($groupCount)): ?>
+                
+                $(window).resize(function () {
+                    
+                    if (/*_base.lastWindowHeight !== $(window).height() ||*/ _base.lastWindowWidth !== $(window).width()) {
+                        
+                        clearInterval(_base.resizeWindowIntervalId);
+                        
+                        _base.resizeWindowIntervalId = setTimeout(function () {
+                            
+                            _base.lastWindowHeight = $(window).height();
+                            
+                            _base.lastWindowWidth = $(window).width();
+                            
+                            
+                            methods.checkWidth(_base);
+                        
+                        }, _base.settings.responsiveDelay);
+                    }
+                    
+                });
+                
+                <?php endif;?>
+                
             });
             
 

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
js/tabs.min.js


+ 57 - 19
settings.php

@@ -12,30 +12,31 @@ try {
 
 }
 
-function githubVersion (){
+$html = "https://github.com/causefx/iDashboard-PHP/releases/latest";
     
-    $html = "https://github.com/causefx/iDashboard-PHP/releases/latest";
-    
-    $doc = new DOMDocument();
-    
-    $doc->loadHTMLFile($html);
-    
-    $xpath = new DomXpath($doc);
+$doc = new DOMDocument();
 
-    $version = $xpath->query('//span[@class="css-truncate-target"]')->item(0)->nodeValue;
-    
-    if(!isset($version)){
+$doc->loadHTMLFile($html);
+
+$xpath = new DomXpath($doc);
+
+$githubChanges = $xpath->query('//div[@class="markdown-body"]//p')->item(0)->nodeValue;
+
+$githubVersion = $xpath->query('//span[@class="css-truncate-target"]')->item(0)->nodeValue;
+
+if(!isset($githubVersion)){
+
+    $githubVersion = "null";
 
-        $version = "null";
-    }
-    
-    return $version;
-        
 }
 
-$githubVersion = githubVersion();
+if(!isset($githubChanges)){
 
-$currentVersion = "1.07";
+    $githubChanges = "null";
+
+}
+
+$currentVersion = "1.08";
 
 foreach ($config as $keyname => $section) {
     
@@ -63,7 +64,7 @@ if($currentVersion == $githubVersion){
     
 }elseif($currentVersion < $githubVersion){
     
-    $versionText = "New Version is out <a href=\"https://github.com/causefx/iDashboard-PHP/archive/master.zip\"> Download Here</a>";
+    $versionText = "New Version is out <a class=\"btn btn-success btn-sm\" href=\"https://github.com/causefx/iDashboard-PHP/archive/master.zip\" role=\"button\">Download Now</a> <button type=\"button\" class=\"btn btn-success btn-sm\" data-toggle=\"modal\" data-target=\"#changes\">View Changes</button>";
     $versionIcon = "times";
     $versionColor = "#d9534f";
     
@@ -514,6 +515,43 @@ if(array_key_exists('category-0', $_POST) == true){
             </div>
 
         </form>
+        
+        <div class="modal fade" id="changes" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
+            
+            <div class="modal-dialog" role="document">
+            
+                <div class="modal-content">
+                
+                    <div class="modal-header">
+                    
+                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+                        
+                            <span aria-hidden="true">×</span>
+                        
+                        </button>
+                        
+                        <h4 class="modal-title" id="myModalLabel">New Changes/Fixes</h4>
+                        
+                    </div>
+                        
+                    <div class="modal-body">
+                    
+                        <?=$githubChanges;?>
+                    
+                    </div>
+                        
+                    <div class="modal-footer">
+                    
+                        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
+
+                        
+                    </div>
+                    
+                </div>
+                
+            </div>
+            
+        </div>
 
         <script type="text/javascript" src="https://code.jquery.com/jquery-1.4.3.min.js"></script>
 

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio