Browse Source

some updates?

Manuel Gall 9 months ago
parent
commit
e82a314c4d
3 changed files with 119 additions and 124 deletions
  1. 43 43
      ui/index.html
  2. 17 17
      ui/js/Upload.js
  3. 59 64
      ui/js/ustore.js

+ 43 - 43
ui/index.html

@@ -1,16 +1,16 @@
 <!--
 <!--
   This file is part of centurio.work/commands.
   This file is part of centurio.work/commands.
-  
+
   centurio.work/commands is free software: you can redistribute it and/or
   centurio.work/commands is free software: you can redistribute it and/or
   modify it under the terms of the GNU General Public License as published by
   modify it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or (at your
   the Free Software Foundation, either version 3 of the License, or (at your
   option) any later version.
   option) any later version.
-  
+
   centurio.work/commands is distributed in the hope that it will be useful, but
   centurio.work/commands is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
   more details.
   more details.
-  
+
   You should have received a copy of the GNU General Public License along with
   You should have received a copy of the GNU General Public License along with
   centurio.work/commands (file COPYING in the main directory).  If not, see
   centurio.work/commands (file COPYING in the main directory).  If not, see
   <http://www.gnu.org/licenses/>.
   <http://www.gnu.org/licenses/>.
@@ -21,7 +21,7 @@
   <head>
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
     <title>Universal Storage</title>
     <title>Universal Storage</title>
-    
+
     <!-- libs, do not modify. When local than load local libs. -->
     <!-- libs, do not modify. When local than load local libs. -->
     <script type="text/javascript" src="/js_libs/jquery.min.js"></script>
     <script type="text/javascript" src="/js_libs/jquery.min.js"></script>
     <script type="text/javascript" src="/js_libs/jquery.browser.js"></script>
     <script type="text/javascript" src="/js_libs/jquery.browser.js"></script>
@@ -35,30 +35,30 @@
     <script type="text/javascript" src="/js_libs/underscore.min.js"></script>
     <script type="text/javascript" src="/js_libs/underscore.min.js"></script>
     <script type="text/javascript" src="/js_libs/jquery.caret.min.js"></script>
     <script type="text/javascript" src="/js_libs/jquery.caret.min.js"></script>
     <script type="text/javascript" src="/js_libs/jquery.cookie.js"></script>
     <script type="text/javascript" src="/js_libs/jquery.cookie.js"></script>
-    
-    
+
+
     <script type="text/javascript" src="/js_libs/relaxngui.js"></script>
     <script type="text/javascript" src="/js_libs/relaxngui.js"></script>
-    
+
     <script type="text/javascript" src="/js_libs/ui.js"></script>
     <script type="text/javascript" src="/js_libs/ui.js"></script>
     <script type="text/javascript" src="/js_libs/custommenu.js"></script>
     <script type="text/javascript" src="/js_libs/custommenu.js"></script>
-    
+
     <link   rel="stylesheet"      href="/js_libs/custommenu.css" type="text/css"/>
     <link   rel="stylesheet"      href="/js_libs/custommenu.css" type="text/css"/>
     <link   rel="stylesheet"      href="/js_libs/ui.css" type="text/css"/>
     <link   rel="stylesheet"      href="/js_libs/ui.css" type="text/css"/>
-    
+
     <link   rel="stylesheet"      href="/js_libs/relaxngui.css" type="text/css"/>
     <link   rel="stylesheet"      href="/js_libs/relaxngui.css" type="text/css"/>
-    
+
     <!-- custom stuff, play arround  -->
     <!-- custom stuff, play arround  -->
     <link   rel="stylesheet"      href="css/ustore.css" type="text/css"/>
     <link   rel="stylesheet"      href="css/ustore.css" type="text/css"/>
     <script type="text/javascript" src="js/ustore.js"></script>
     <script type="text/javascript" src="js/ustore.js"></script>
-    
-    
+
+
     <script type="text/javascript" src="js/Upload.js"></script>
     <script type="text/javascript" src="js/Upload.js"></script>
-    
+
     <link   rel="stylesheet"      href="/cdp_ui/ui.css" type="text/css"/>
     <link   rel="stylesheet"      href="/cdp_ui/ui.css" type="text/css"/>
     <link rel="icon" href="favicon.ico">
     <link rel="icon" href="favicon.ico">
     <link rel="icon" type="image/png" sizes="96x96" href="favicon-96x96.png">
     <link rel="icon" type="image/png" sizes="96x96" href="favicon-96x96.png">
-    
-    
+
+
   </head>
   </head>
 </body>
 </body>
 
 
@@ -79,11 +79,11 @@
           <select id="selectfolders">
           <select id="selectfolders">
           </select>
           </select>
         </div>
         </div>
-        
-        
+
+
         <template id="cpyFolder">
         <template id="cpyFolder">
           <div class="Folder">
           <div class="Folder">
-          
+
             <a  class="FolderImageLink" data-class='link' style="text-decoration: none;" href="#" onclick="">
             <a  class="FolderImageLink" data-class='link' style="text-decoration: none;" href="#" onclick="">
               <span class="FolderImage" >🗀</span></br>
               <span class="FolderImage" >🗀</span></br>
               <span class="FolderText" data-class='text'></span>
               <span class="FolderText" data-class='text'></span>
@@ -95,7 +95,7 @@
             </div>
             </div>
           </div>
           </div>
         </template>
         </template>
-        
+
         <template id="cpyFolderNew">
         <template id="cpyFolderNew">
           <div class="Folder">
           <div class="Folder">
             <a  class="FolderImageLink" data-class='link' style="text-decoration: none;" href="#" onclick="">
             <a  class="FolderImageLink" data-class='link' style="text-decoration: none;" href="#" onclick="">
@@ -105,30 +105,30 @@
           </div>
           </div>
         </template>
         </template>
         </br>
         </br>
-        
+
         <div id="Folders">
         <div id="Folders">
         </div>
         </div>
-        
-        
+
+
         <!--
         <!--
         <a href="#" onclick="saveexternalfolder()">Add External Folder</a>
         <a href="#" onclick="saveexternalfolder()">Add External Folder</a>
         <div id="ExternalFolders">
         <div id="ExternalFolders">
         </div>
         </div>
         -->
         -->
-        
-        
-        
-        
+
+
+
+
       </ui-area>
       </ui-area>
-      
+
       <ui-resizehandle data-belongs-to-tab="storage" data-label="drag to resize"></ui-resizehandle>
       <ui-resizehandle data-belongs-to-tab="storage" data-label="drag to resize"></ui-resizehandle>
       <ui-area data-belongs-to-tab="storage" id="detailcolumn">
       <ui-area data-belongs-to-tab="storage" id="detailcolumn">
-        
-        
-        
-        
-        
-        
+
+
+
+
+
+
         <div id="content-wrap">
         <div id="content-wrap">
           <form id="imgUpload" class="box" method="post" action="../images/imageUpload.php" enctype="multipart/form-data">
           <form id="imgUpload" class="box" method="post" action="../images/imageUpload.php" enctype="multipart/form-data">
 					  <div class="box__input">
 					  <div class="box__input">
@@ -137,12 +137,12 @@
               <button class="box__button" type="submit">Upload</button>
               <button class="box__button" type="submit">Upload</button>
             </div>
             </div>
 					  <div class="box__uploading">Uploading&hellip;</div>
 					  <div class="box__uploading">Uploading&hellip;</div>
-					  <div class="box__success">Done! 
+					  <div class="box__success">Done!
               <a href="https://centurio.work/customers/evva/was/ui//?" class="box__restart" role="button">Upload more?</a>
               <a href="https://centurio.work/customers/evva/was/ui//?" class="box__restart" role="button">Upload more?</a>
             </div>
             </div>
 					  <div class="box__error">Error! <span></span>.</div>
 					  <div class="box__error">Error! <span></span>.</div>
           </form>
           </form>
-          
+
           <div id="MenuBar">
           <div id="MenuBar">
             <a class="showremoveitemsNot" href="javascript:selectRemoveItems();">⨯ Remove Multiple Items</a>
             <a class="showremoveitemsNot" href="javascript:selectRemoveItems();">⨯ Remove Multiple Items</a>
             <a class="showremoveitems" href="javascript:removeSelectedItems();">[Remove Selected Items]</a>
             <a class="showremoveitems" href="javascript:removeSelectedItems();">[Remove Selected Items]</a>
@@ -154,13 +154,13 @@
             <a class="showhowmany" href="javascript:showitems(1000);"> 1000</a>
             <a class="showhowmany" href="javascript:showitems(1000);"> 1000</a>
             <a class="showhowmany" href="javascript:showitems(10000);"> 10000</a>
             <a class="showhowmany" href="javascript:showitems(10000);"> 10000</a>
           </div>
           </div>
-          
+
           <template id="DataItem">
           <template id="DataItem">
             <div class="DataItem">
             <div class="DataItem">
               <div class="spanwrapping">
               <div class="spanwrapping">
                 <input data-class='multiRemovelink' class="showremoveitems" type="checkbox">
                 <input data-class='multiRemovelink' class="showremoveitems" type="checkbox">
               <!--<span data-class='name' class="dataitemname"></span>-->
               <!--<span data-class='name' class="dataitemname"></span>-->
-                
+
                 <a data-class='name' class="mouseOver" href="#" title="Filename"></a>
                 <a data-class='name' class="mouseOver" href="#" title="Filename"></a>
               </div>
               </div>
               <div data-class='image' class="DataImg">
               <div data-class='image' class="DataImg">
@@ -173,21 +173,21 @@
               <a data-class='eventTrigger' href='#'style="visibility: hidden;" onclick=''>↧</a>
               <a data-class='eventTrigger' href='#'style="visibility: hidden;" onclick=''>↧</a>
             </div>
             </div>
           </template>
           </template>
-          
+
         <div id="Data">
         <div id="Data">
         </div>
         </div>
         <div style ="clear:both"></div>
         <div style ="clear:both"></div>
         </div>
         </div>
-        
-        
+
+
         <div id="RemoveFolder">
         <div id="RemoveFolder">
           <a href="" id="removeFolderLink" >Remove folder and content!</a>
           <a href="" id="removeFolderLink" >Remove folder and content!</a>
         </div>
         </div>
-        
+
         <div id="overlay" onclick="overlayOff()">
         <div id="overlay" onclick="overlayOff()">
-          <div id="overlaycontentsize"></div>        
+          <div id="overlaycontentsize"></div>
         </div>
         </div>
-        
+
       </ui-area>
       </ui-area>
       <ui-area data-belongs-to-tab="amount" class="inactive">
       <ui-area data-belongs-to-tab="amount" class="inactive">
       </ui-area>
       </ui-area>

+ 17 - 17
ui/js/Upload.js

@@ -25,7 +25,7 @@ function imageInit(){
 				},
 				},
 				triggerFormSubmit = function()
 				triggerFormSubmit = function()
 				{
 				{
-          $('#imgUpload').submit(); 
+          $('#imgUpload').submit();
 					//var event = document.createEvent( 'HTMLEvents' );
 					//var event = document.createEvent( 'HTMLEvents' );
 					//event.initEvent( 'submit', true, false );
 					//event.initEvent( 'submit', true, false );
 					//form.dispatchEvent( event );
 					//form.dispatchEvent( event );
@@ -78,7 +78,7 @@ function imageInit(){
 					droppedFiles = e.dataTransfer.files; // the files that were dropped
 					droppedFiles = e.dataTransfer.files; // the files that were dropped
 					showFiles( droppedFiles );
 					showFiles( droppedFiles );
 
 
-					
+
 					triggerFormSubmit();
 					triggerFormSubmit();
           e.dataTransfer.files = [];
           e.dataTransfer.files = [];
 									});
 									});
@@ -92,21 +92,21 @@ function imageInit(){
 
 
 				form.classList.add( 'is-uploading' );
 				form.classList.add( 'is-uploading' );
 				form.classList.remove( 'is-error' );
 				form.classList.remove( 'is-error' );
-				
+
 				var station = $('#pattern_station').text();
 				var station = $('#pattern_station').text();
 				var pattern = $('#pattern_ID').text();
 				var pattern = $('#pattern_ID').text();
 				var curCount = $('#image_count').text();
 				var curCount = $('#image_count').text();
 				var language = $('#image_language option:selected').text();
 				var language = $('#image_language option:selected').text();
-				
-				
+
+
 
 
 				if( isAdvancedUpload ) // ajax file upload for modern browsers
 				if( isAdvancedUpload ) // ajax file upload for modern browsers
 				{
 				{
 					e.preventDefault();
 					e.preventDefault();
 					// gathering the form data
 					// gathering the form data
 					var ajaxData;
 					var ajaxData;
-          
-					
+
+
 					var i = 0;
 					var i = 0;
 					if( droppedFiles )
 					if( droppedFiles )
 					{
 					{
@@ -119,8 +119,8 @@ function imageInit(){
 					else{
 					else{
 						ajaxData = new FormData( form );
 						ajaxData = new FormData( form );
 					}
 					}
-					
-					
+
+
 					// ajax request
 					// ajax request
 					var ajax = new XMLHttpRequest();
 					var ajax = new XMLHttpRequest();
 					ajax.open( form.getAttribute( 'method' ), form.getAttribute( 'action' ), false );
 					ajax.open( form.getAttribute( 'method' ), form.getAttribute( 'action' ), false );
@@ -131,12 +131,12 @@ function imageInit(){
 						if( ajax.status >= 200 && ajax.status < 400 )
 						if( ajax.status >= 200 && ajax.status < 400 )
 						{
 						{
 							listData($("#selectfolders").val())
 							listData($("#selectfolders").val())
-							
+
 							input.value = "";
 							input.value = "";
 							//form.classList.add('is-success');
 							//form.classList.add('is-success');
-							
+
 							//old upload php: saveImages(station, pattern, curCount, language, ajax.responseText);
 							//old upload php: saveImages(station, pattern, curCount, language, ajax.responseText);
-							
+
 							/*
 							/*
 							var data = JSON.parse( ajax.responseText );
 							var data = JSON.parse( ajax.responseText );
 							form.classList.add( data.success == true ? 'is-success' : 'is-error' );
 							form.classList.add( data.success == true ? 'is-success' : 'is-error' );
@@ -151,9 +151,9 @@ function imageInit(){
 						form.classList.remove( 'is-uploading' );
 						form.classList.remove( 'is-uploading' );
 						alert( 'Error. Please, try again!' );
 						alert( 'Error. Please, try again!' );
 					};
 					};
-          
-          
-          
+
+
+
           var object = {};
           var object = {};
 ajaxData.forEach(function(value, key){
 ajaxData.forEach(function(value, key){
     object[key] = value;
     object[key] = value;
@@ -165,7 +165,7 @@ ajaxData.forEach(function(value, key){
 					ajax.send( ajaxData );
 					ajax.send( ajaxData );
           form.classList.remove( 'is-uploading' );
           form.classList.remove( 'is-uploading' );
 					form.classList.remove( 'is-error', 'is-success' );
 					form.classList.remove( 'is-error', 'is-success' );
-          
+
           e.target.files = [];
           e.target.files = [];
 					input.value = "";
 					input.value = "";
           droppedFiles = false;
           droppedFiles = false;
@@ -218,4 +218,4 @@ ajaxData.forEach(function(value, key){
 
 
 $(document).ready(function() {
 $(document).ready(function() {
 		imageInit();
 		imageInit();
-});
+});

+ 59 - 64
ui/js/ustore.js

@@ -26,39 +26,39 @@ function listFolders(folder = ""){
   $('#CurFolder').text("");
   $('#CurFolder').text("");
   toggleRemoveLinks(true);
   toggleRemoveLinks(true);
   getAllFolders();
   getAllFolders();
-  
+
   if(folder != "" && folder != "." && folder != ".."){
   if(folder != "" && folder != "." && folder != ".."){
     $("#selectfolders").val(folder);
     $("#selectfolders").val(folder);
   }
   }
   else{
   else{
     $("#selectfolders").val(".");
     $("#selectfolders").val(".");
   }
   }
-  
+
   $.ajax({
   $.ajax({
 	  type: "GET",
 	  type: "GET",
 	  url: "../server/folders/" + folder,
 	  url: "../server/folders/" + folder,
 	  dataType: "json",
 	  dataType: "json",
 	  success: function(data) {
 	  success: function(data) {
-      
-      
+
+
       if(folder != "" && folder != "." && folder != ".."){
       if(folder != "" && folder != "." && folder != ".."){
         var clone = document.importNode(document.querySelector('#cpyFolder').content,true);
         var clone = document.importNode(document.querySelector('#cpyFolder').content,true);
         $('[data-class=text]',clone).text("..");
         $('[data-class=text]',clone).text("..");
-        $('[data-class=link]',clone).attr('onclick','listFolders("' + folder.substr(0, folder.lastIndexOf("/")) + '")'); 
+        $('[data-class=link]',clone).attr('onclick','listFolders("' + folder.substr(0, folder.lastIndexOf("/")) + '")');
         // dont show remove link on .. folder
         // dont show remove link on .. folder
         $('[data-class=removefolder]',clone).remove()
         $('[data-class=removefolder]',clone).remove()
         $('#Folders').append(clone);
         $('#Folders').append(clone);
       }
       }
-      
-      
-      
+
+
+
       $.each( data, function( key, value ) {
       $.each( data, function( key, value ) {
         var clone = document.importNode(document.querySelector('#cpyFolder').content,true);
         var clone = document.importNode(document.querySelector('#cpyFolder').content,true);
-        
+
         //remove /
         //remove /
         value = value.slice(0,-1)
         value = value.slice(0,-1)
         $('[data-class=text]',clone).text(value);
         $('[data-class=text]',clone).text(value);
-        
+
         if(folder == ""){
         if(folder == ""){
           $('[data-class=link]',clone).attr('onclick','listFolders("' + value + '")');
           $('[data-class=link]',clone).attr('onclick','listFolders("' + value + '")');
           $('[data-class=removefolder]',clone).attr('onclick','deleteFolder("' + value + '")');
           $('[data-class=removefolder]',clone).attr('onclick','deleteFolder("' + value + '")');
@@ -69,7 +69,7 @@ function listFolders(folder = ""){
         }
         }
         $('#Folders').append(clone);
         $('#Folders').append(clone);
       });
       });
-      
+
       //new Folder
       //new Folder
       var clone = document.importNode(document.querySelector('#cpyFolderNew').content,true);
       var clone = document.importNode(document.querySelector('#cpyFolderNew').content,true);
       $('[data-class=text]',clone).text("+");
       $('[data-class=text]',clone).text("+");
@@ -77,7 +77,7 @@ function listFolders(folder = ""){
       $('#Folders').append(clone);
       $('#Folders').append(clone);
     }
     }
   });
   });
-  
+
   listData(folder)
   listData(folder)
 }
 }
 
 
@@ -92,7 +92,7 @@ function createFolder(folder = ""){
         listFolders(folder)
         listFolders(folder)
       }
       }
     });
     });
-  }  
+  }
 }
 }
 
 
 function deleteFolder(datalink) {
 function deleteFolder(datalink) {
@@ -102,7 +102,7 @@ function deleteFolder(datalink) {
       url: "../server/folders/" + datalink,
       url: "../server/folders/" + datalink,
       success: function(res) {
       success: function(res) {
         listFolders(datalink.substr(0, datalink.lastIndexOf("/")))
         listFolders(datalink.substr(0, datalink.lastIndexOf("/")))
-      } 
+      }
     });
     });
   }
   }
 }
 }
@@ -113,14 +113,14 @@ function listData(folder = "", anzahl = 100){
   const imageext = ["png", "jpg", "svg", "JPG", "PNG", "SVG"]
   const imageext = ["png", "jpg", "svg", "JPG", "PNG", "SVG"]
   const movieext = ["mp4"]
   const movieext = ["mp4"]
   $('#imgUpload').attr("action", "../server/data/" + folder);
   $('#imgUpload').attr("action", "../server/data/" + folder);
-  
+
   $.ajax({
   $.ajax({
 	  type: "GET",
 	  type: "GET",
 	  url: "../server/images/" + folder + "?anzahl=" + anzahl,
 	  url: "../server/images/" + folder + "?anzahl=" + anzahl,
 	  dataType: "json",
 	  dataType: "json",
 	  success: function(data) {
 	  success: function(data) {
       $.each( data, function( key, value ) {
       $.each( data, function( key, value ) {
-        
+
         var ext = value.substr(value.lastIndexOf('.') + 1);
         var ext = value.substr(value.lastIndexOf('.') + 1);
         if(folder == ""){
         if(folder == ""){
           fullfolder =  value
           fullfolder =  value
@@ -128,11 +128,11 @@ function listData(folder = "", anzahl = 100){
         else{
         else{
           fullfolder =  folder + "/" + value;
           fullfolder =  folder + "/" + value;
         }
         }
-        
+
         var clone = document.importNode(document.querySelector('#DataItem').content,true);
         var clone = document.importNode(document.querySelector('#DataItem').content,true);
         $('[data-class=name]',clone).text(value);
         $('[data-class=name]',clone).text(value);
         $('[data-class=name]',clone).attr('title', value);
         $('[data-class=name]',clone).attr('title', value);
-        
+
         //Image
         //Image
         if(imageext.includes(ext)){
         if(imageext.includes(ext)){
           $('[data-class=image]',clone).append("<img src='./../storage/"+ fullfolder + "' alt=''>")
           $('[data-class=image]',clone).append("<img src='./../storage/"+ fullfolder + "' alt=''>")
@@ -143,36 +143,36 @@ function listData(folder = "", anzahl = 100){
         else{
         else{
           $('[data-class=image]',clone).append("<div class='imageAlternative'>🗎</div>")
           $('[data-class=image]',clone).append("<div class='imageAlternative'>🗎</div>")
         }
         }
-        
+
         $('[data-class=image]',clone).attr('onclick',"overlayOn('" + fullfolder + "')");
         $('[data-class=image]',clone).attr('onclick',"overlayOn('" + fullfolder + "')");
-        
+
 		    $('[data-class=inspect]',clone).attr('href','../storage/' + fullfolder + '');
 		    $('[data-class=inspect]',clone).attr('href','../storage/' + fullfolder + '');
 		    $('[data-class=delete]',clone).attr('href','javascript:deleteData("' + fullfolder + '");');
 		    $('[data-class=delete]',clone).attr('href','javascript:deleteData("' + fullfolder + '");');
 		    $('[data-class=multiRemovelink]',clone).attr('name', fullfolder );
 		    $('[data-class=multiRemovelink]',clone).attr('name', fullfolder );
-        
+
 		    $('[data-class=getLink]',clone).attr('href','javascript:copy2Clipboard("' + fullfolder + '");');
 		    $('[data-class=getLink]',clone).attr('href','javascript:copy2Clipboard("' + fullfolder + '");');
-        
+
 		    $('[data-class=rename]',clone).attr('href','javascript:rename("' + fullfolder + '", "' + value.slice(0, - (ext.length +1)) +'");');
 		    $('[data-class=rename]',clone).attr('href','javascript:rename("' + fullfolder + '", "' + value.slice(0, - (ext.length +1)) +'");');
-        
+
 		    $('[data-class=createSymlink]',clone).attr('href','javascript:createSymlink("' + fullfolder + '", "' + value.slice(0, - (ext.length +1)) +'");');
 		    $('[data-class=createSymlink]',clone).attr('href','javascript:createSymlink("' + fullfolder + '", "' + value.slice(0, - (ext.length +1)) +'");');
-        
-        
-        
+
+
+
         var queryString = window.location.search;
         var queryString = window.location.search;
         var urlParams = new URLSearchParams(queryString);
         var urlParams = new URLSearchParams(queryString);
-        
+
         if(urlParams.has('iframe')){
         if(urlParams.has('iframe')){
           $('[data-class=eventTrigger]',clone).css("visibility", "visible")
           $('[data-class=eventTrigger]',clone).css("visibility", "visible")
 		      $('[data-class=eventTrigger]',clone).attr('href','javascript:triggerEvent("' + fullfolder + '");');
 		      $('[data-class=eventTrigger]',clone).attr('href','javascript:triggerEvent("' + fullfolder + '");');
-          
+
           console.log("I am an Iframe")
           console.log("I am an Iframe")
         }
         }
-        
+
         $('#Data').append(clone);
         $('#Data').append(clone);
       });
       });
     }
     }
   });
   });
-  
+
   if(folder != "" && folder != "." && folder != ".."){
   if(folder != "" && folder != "." && folder != ".."){
     $('#RemoveFolder').css("display", "block")
     $('#RemoveFolder').css("display", "block")
     $('#removeFolderLink').attr('href','javascript:deleteFolder("' + folder + '");');
     $('#removeFolderLink').attr('href','javascript:deleteFolder("' + folder + '");');
@@ -184,7 +184,7 @@ function listData(folder = "", anzahl = 100){
 function triggerEvent(data) {
 function triggerEvent(data) {
   //get url
   //get url
   var datalink = new URL("../storage/" + data, document.baseURI).href;
   var datalink = new URL("../storage/" + data, document.baseURI).href;
-  
+
   ref = $(test);
   ref = $(test);
   setTimeout(function(){
   setTimeout(function(){
     ref.triggerHandler('getUrl', {"url": datalink});
     ref.triggerHandler('getUrl', {"url": datalink});
@@ -197,9 +197,9 @@ function overlayOn(data) {
   const imageext = ["png", "jpg", "svg", "PNG", "JPG", "SVG"]
   const imageext = ["png", "jpg", "svg", "PNG", "JPG", "SVG"]
   const movieext = ["mp4"]
   const movieext = ["mp4"]
   var ext = url.substr(url.lastIndexOf('.') + 1);
   var ext = url.substr(url.lastIndexOf('.') + 1);
-  
+
   if(imageext.includes(ext)){
   if(imageext.includes(ext)){
-    $('#overlaycontentsize').append("<img id='overlaycontent' src=" + url + "></img>");    
+    $('#overlaycontentsize').append("<img id='overlaycontent' src=" + url + "></img>");
   }
   }
   else if(movieext.includes(ext)){
   else if(movieext.includes(ext)){
     $('#overlaycontentsize').append("<video id='overlaycontent' controls> <source src=" + url + " type=\"video/mp4\">Your browser does not support the video tag.</video>");
     $('#overlaycontentsize').append("<video id='overlaycontent' controls> <source src=" + url + " type=\"video/mp4\">Your browser does not support the video tag.</video>");
@@ -227,7 +227,7 @@ function toggleRemoveLinks(setoff = false) {
 
 
 
 
 function selectRemoveItems() {
 function selectRemoveItems() {
-  toggleRemoveLinks() 
+  toggleRemoveLinks()
 }
 }
 
 
 function unselectAll(){
 function unselectAll(){
@@ -252,13 +252,13 @@ function removeSelectedItems(){
   $("#Data input[type=checkbox]:checked").each(function(index, data){
   $("#Data input[type=checkbox]:checked").each(function(index, data){
     removedItems.push($(data).attr("name"));
     removedItems.push($(data).attr("name"));
   });
   });
-  
+
   if (confirm('Deleting: ' + removedItems)) {
   if (confirm('Deleting: ' + removedItems)) {
     $("#Data input[type=checkbox]:checked").each(function(index, data){
     $("#Data input[type=checkbox]:checked").each(function(index, data){
       //only refresh item list when last item is removed
       //only refresh item list when last item is removed
       deleteDataItem($(data).attr("name"), index === ($("#Data input[type=checkbox]:checked").length -1))
       deleteDataItem($(data).attr("name"), index === ($("#Data input[type=checkbox]:checked").length -1))
     });
     });
-    toggleRemoveLinks() 
+    toggleRemoveLinks()
   }
   }
 }
 }
 
 
@@ -275,7 +275,7 @@ function deleteDataItem(datalink, refresh = true) {
       success: function(res) {
       success: function(res) {
         if(refresh)
         if(refresh)
           listFolders(datalink.substr(0, datalink.lastIndexOf("/")))
           listFolders(datalink.substr(0, datalink.lastIndexOf("/")))
-      } 
+      }
     });
     });
 }
 }
 
 
@@ -294,11 +294,11 @@ function copy2Clipboard(datalink) {
 function createSymlink(datalink, oldfilename) {
 function createSymlink(datalink, oldfilename) {
 
 
   var filename = prompt("Please enter symlink filename");
   var filename = prompt("Please enter symlink filename");
-  
-  
-  
+
+
+
   if (filename != null && filename != "") {
   if (filename != null && filename != "") {
-    var sendfilename = {"filename": filename, "oldfilename": oldfilename}    
+    var sendfilename = {"filename": filename, "oldfilename": oldfilename}
     $.ajax({
     $.ajax({
       type: "POST",
       type: "POST",
       data: JSON.stringify(sendfilename),
       data: JSON.stringify(sendfilename),
@@ -312,13 +312,13 @@ function createSymlink(datalink, oldfilename) {
       }
       }
     });
     });
   }
   }
-  
-  
+
+
 }
 }
 
 
 function rename(datalink, oldfilename) {
 function rename(datalink, oldfilename) {
   var filename = prompt("Please enter new filename, without file extension.", oldfilename);
   var filename = prompt("Please enter new filename, without file extension.", oldfilename);
-  
+
   if (filename != null && filename != "") {
   if (filename != null && filename != "") {
     var sendfilename = {"link": datalink, "oldfilename": oldfilename, "newfilename": filename}
     var sendfilename = {"link": datalink, "oldfilename": oldfilename, "newfilename": filename}
     $.ajax({
     $.ajax({
@@ -335,8 +335,8 @@ function rename(datalink, oldfilename) {
       }
       }
     });
     });
   }
   }
-  
-  
+
+
 }
 }
 
 
 
 
@@ -351,7 +351,7 @@ function getAllFolders(folder = ""){ //Get DB 2 HTML //has to be synchronus in o
 	  success: function(data) {
 	  success: function(data) {
       $.each( data, function( key, value ) {
       $.each( data, function( key, value ) {
         $('#selectfolders').append("<option>" + value.slice(0,-1) +"</option>")
         $('#selectfolders').append("<option>" + value.slice(0,-1) +"</option>")
-        
+
       });
       });
     }
     }
   });
   });
@@ -371,7 +371,7 @@ function saveexternalfolder(folder = ""){
       success: function(res) {
       success: function(res) {
       }
       }
     });
     });
-  }  
+  }
 }
 }
 
 
 function listExternalFolders(folder = ""){
 function listExternalFolders(folder = ""){
@@ -381,10 +381,10 @@ function listExternalFolders(folder = ""){
       type: "GET",
       type: "GET",
       url: "../server/externalFolder",
       url: "../server/externalFolder",
       dataType: "json",
       dataType: "json",
-      success: function(data) { 
-        $.each( data, function( key, value ) {          
+      success: function(data) {
+        $.each( data, function( key, value ) {
           var clone = document.importNode(document.querySelector('#cpyFolder').content,true);
           var clone = document.importNode(document.querySelector('#cpyFolder').content,true);
-          
+
           //remove /
           //remove /
           value = value.slice(0,-1)
           value = value.slice(0,-1)
           $('[data-class=text]',clone).text(value);
           $('[data-class=text]',clone).text(value);
@@ -396,24 +396,24 @@ function listExternalFolders(folder = ""){
   }
   }
   else{
   else{
     $('#Folders').text("");
     $('#Folders').text("");
-    
-    
-    
+
+
+
     //alert($.get(folder));
     //alert($.get(folder));
-    
+
     /*
     /*
       $.ajax({
       $.ajax({
       type: "GET",
       type: "GET",
       url: folder,
       url: folder,
       crossDomain: true,
       crossDomain: true,
-      success: function(data) {  
+      success: function(data) {
       alert(data);
       alert(data);
       }
       }
       });
       });
     */
     */
-    
+
   }
   }
-  
+
   //listData(folder)
   //listData(folder)
 }
 }
 
 
@@ -437,14 +437,9 @@ var getUrlParameter = function getUrlParameter(sParam) {
 $(document).ready(function() {
 $(document).ready(function() {
   var path = getUrlParameter('path');
   var path = getUrlParameter('path');
   if(!path){
   if(!path){
-   path = ""; 
+   path = "";
   }
   }
   listFolders(path);
   listFolders(path);
   //listExternalFolders();
   //listExternalFolders();
   getAllFolders(path);
   getAllFolders(path);
 });
 });
-
-
-
-
-