manto07m 4 rokov pred
rodič
commit
34f711c274

+ 6 - 0
api-detail.php

@@ -24,6 +24,12 @@ if (!isset($_SESSION['loggedin'])) {
 		var searchURL = window.location.search;
 		searchURL = searchURL.substring(1, searchURL.length);
 		object = decodeURIComponent(searchURL.split("&")[0].split("=")[1]);
+		if(object == 'undefined'){
+			window.location.href = "./api-list.php";
+			console.log("in " + object);
+		}else{
+			console.log("not in: "+object);
+		}
 
 		$.ajax({
 			url: "./script/php/api_group_detail.php",

+ 2 - 1
assets/javascripts/pages/examples.mediagallery.js

@@ -1,10 +1,11 @@
 (function ($) {	
 	$("#switch").click(function () {
 		if ($(this).hasClass('btn-default')) {
+			$(".fixed").scrollTop(0);
 			$("#caret").css('transform', 'rotate(180deg)')
 			$(this).removeClass('btn-default');
 			$(this).addClass('btn-primary');
-			$("#filter-content").fadeIn();
+			$("#filter-content").fadeIn();			
 		} else {
 			$("#caret").css('transform', 'rotate(0deg)')
 			$(this).addClass('btn-default');

+ 1 - 1
script/js/global.js

@@ -529,7 +529,7 @@ vm.component('isotope-item', {
             
         </div>
         <a class="name" v-bind:href="hrefLink(id)">{{name}}</a>
-        <div class="mg-description"><small style="display:none;">{{detail}}</small><small class="operate" style="display:none;">{{operate}}</small><small class="source" style="display:none;">{{source}}</small><small class="software" class="pull-right text-muted" >{{software}}</small></div>
+        <div class="mg-description"><small style="display:none;">{{detail}}</small><small class="operate" style="display:none;">{{operate}}</small><small class="source" style="display:none;">{{source}}</small><small class="pull-right text-muted software" >{{software}}</small></div>
     </div>
 </div>`,
 });

+ 6 - 4
script/php/getTree.php

@@ -1,11 +1,13 @@
 <?php
 
-$root = '../../assets/API/Universal/';
+
+
+$root = '../../assets/API/Universal';
 $folder = $_GET["folder"];
 
 FindPath($root,$folder);
 function FindPath($root,$folder){
-    $rootPath = './assets/API/Universal/';
+    $rootPath = $root.'/'.$folder;
     $paths = array_diff(scandir($root.'/'.$folder), array('.', '..','Thumbs.db')); 
     echo("<ul>");
     foreach($paths as $path){
@@ -13,7 +15,7 @@ function FindPath($root,$folder){
         if(str_contains($path,'.')){
             if(!str_contains(strtolower($path),'.png')){
                 echo("<li data-jstree='{ ".'"type" : "file"'." }' >");
-                $path = "<a href='".$rootPath."/".$folder."/".$path."'>".$path."</a>";            
+                $path = "<a href='".substr($rootPath,4)."/".$path."'>".$path."</a>";            
                 echo($path);
                 echo("</li>");
             }
@@ -21,7 +23,7 @@ function FindPath($root,$folder){
         }else{
             echo("<li>");
             echo($path);
-            FindPath($root."/".$folder,$path);
+            FindPath($rootPath,$path);
             echo("</li>");
         }