From 74fab1c53fd3850bf0fd075c93622f14ad8dbe30 Mon Sep 17 00:00:00 2001
From: ulrich
Date: Wed, 06 Jan 2021 23:03:51 +0000
Subject: [PATCH] null pruefung hinzugefuegt

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

diff --git a/web/ui/ui.js b/web/ui/ui.js
index 556b455..5ace99b 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);
@@ -74,14 +75,33 @@
   $('#m-test-3').on('click', fm_menu_compile_all);
   $('#m-compile-results').on('click', fm_fusszeile_zeigen);
   $('#m-build-app').on('click', fm_menu_build_app);
+  $('#m-ant-build').on('click', fm_menu_ant_build);
   $('#saveModal').on('hidden.bs.modal', function (e) {
     $('#modal_ok').attr('onclick','').unbind('click');
   });
   $('#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 !== null) {
+    if(wunschPfad.length > 0) {
+      pfad = wunschPfad;
+      fm_get_list(wunschPfad);
+      fm_init_uploader();
+    } else {
+      fm_get_list('');
+      fm_init_uploader();
+    }
+  } else {
+    fm_get_list('');
+    fm_init_uploader();
+  }
   /*
   console.log('href: ' + window.location.href);
   console.log('host: ' + window.location.host);
@@ -90,6 +110,10 @@
   console.log('protocol: ' + window.location.protocol);
   */
   loc = window.location.protocol + '//' + window.location.host;
+}
+
+function fm_newTab() {
+  window.open('/file-cms/ui/?pfad=' + pfad, '_blank');
 }
 
 function fm_toggle_show_slideshow() {
@@ -345,6 +369,10 @@
   fm_build_app();
 }
 
+function fm_menu_ant_build() {
+  fm_ant_build();
+}
+
 function fm_mark_compile_results_in_editor(resp) {
   cm.clearGutter("breakpoints");
 

--
Gitblit v1.9.3