From 53119fbeeaf9dbbf6c3a2ae492b9940cb5550054 Mon Sep 17 00:00:00 2001
From: ulrich <ulrich@ulrich-vaio>
Date: Wed, 06 Jan 2021 22:52:16 +0000
Subject: [PATCH] Funktion Neuer Reiter eingebaut

---
 web/ui/ui.js |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/web/ui/ui.js b/web/ui/ui.js
index ad9a26e..c7936e8 100644
--- a/web/ui/ui.js
+++ b/web/ui/ui.js
@@ -44,6 +44,7 @@
   $('.code-editor-container').hide();
   $('.sued').hide();
   //$('.ost').attr('flex-basis', 0);
+  $('#newTab').on('click', fm_newTab);
   $('#newTextFile').on('click', fm_menu_neue_textdatei);
   $('#newDoc').on('click', fm_menu_neues_dokument);
   $('#newFolder').on('click', fm_get_new_folder);
@@ -81,8 +82,21 @@
   $('#logout').click(fm_logout);  
   $('#fusszeile-schliessen').on('click', fm_fusszeile_schliessen);
   fm_get_login();
-  fm_get_list('');
-  fm_init_uploader();
+  
+  //console.log(window.location);
+  //console.log(window.location.search);
+  var parsedUrl = new URL(window.location.href);
+  //console.log(parsedUrl.searchParams.get("pfad"));
+  var wunschPfad = parsedUrl.searchParams.get("pfad");
+  
+  if(wunschPfad.length > 0) {
+    pfad = wunschPfad;
+    fm_get_list(wunschPfad);
+    fm_init_uploader();
+  } else {
+    fm_get_list('');
+    fm_init_uploader();
+  }
   /*
   console.log('href: ' + window.location.href);
   console.log('host: ' + window.location.host);
@@ -93,6 +107,10 @@
   loc = window.location.protocol + '//' + window.location.host;
 }
 
+function fm_newTab() {
+  window.open('/file-cms/ui/?pfad=' + pfad, '_blank');
+}
+
 function fm_toggle_show_slideshow() {
   if(fm_slideshow) {
     $('#m-toggle-slideshow').text('Diashow einschalten');

--
Gitblit v1.9.3