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/api.js |   33 +++++++++++++++++++++++++++++++--
 1 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/web/ui/api.js b/web/ui/api.js
index b9e0a46..769a7c3 100644
--- a/web/ui/api.js
+++ b/web/ui/api.js
@@ -58,6 +58,16 @@
 /* ---------- Dateien listen, loeschen, umbenennen --------------- */
 
 // http://localhost:8079/file-cms/svc?c=de.uhilger.filecms.api.FileMgr&f=JSONNICE&m=list&p=
+
+/*
+ * standardmaessig aufgerufen von fm_dateiwahl, immer mit dem Inhalt von pfad
+ * 
+ * relPfad Persoenlich, Oeffentlich oder Austausch als Startwert
+ * dann der relative Pfad aus den angeklickten Ordnernamen
+ * 
+ * @param {type} relPfad
+ * @returns {undefined}
+ */
 function fm_get_list(relPfad) {
   $('#ansicht').attr('onclick','').unbind('click');
   var m = '?c=de.uhilger.filecms.api.FileMgr&m=list&p=' + relPfad;
@@ -256,6 +266,8 @@
         mode = 'xml';
       } else if(fname.endsWith('properties')) {
         mode = 'xml';
+      } else if(fname.endsWith('adoc')) {
+        mode = 'text/x-markdown';
       }
       fm_text_edit(resp, mode);
     } else {
@@ -287,6 +299,16 @@
 }
 
 /* -------- Compile / Build ------------- */
+
+function fm_ant_build() {
+  var m = '?c=de.uhilger.filecms.api.CompileService&m=antBuild&p=' + pfad;
+  var u = '../svc' + m;
+  fm_get(u, "text", function(resp) {
+    $('.system-out').empty();
+    $('.system-out').append('Ergebnis von Ant build: ' + resp);
+    fm_fusszeile_zeigen();
+  });
+}
 
 function fm_build_app() {
   var m = '?c=de.uhilger.filecms.api.CompileService&m=buildApp&p=' + pfad;
@@ -358,12 +380,19 @@
 
 function fm_compile(modeStr, callback) {
   var liste = fm_gewaehlte_dateien();
-  var m = '?c=de.uhilger.filecms.api.CompileService&m=compile&p=' + pfad + '&p=' + encodeURIComponent(liste) + 
-          '&p=' + modeStr;
+  var m = '?c=de.uhilger.filecms.api.CompileService&m=compile';//&p=' + pfad + '&p=' + encodeURIComponent(liste) + 
+          //'&p=' + modeStr;
   var u = '../svc' + m;
+  var data = 'p=' + pfad + '&p=' + encodeURIComponent(liste) + 
+          '&p=' + modeStr;
+  fm_post(u, data, "json", function(resp) {
+    callback(resp);
+  });
+  /*
   fm_get(u, "json", function(resp) {
     callback(resp);
   });
+  */
 }
 
 /* --------------- Bilder ------------------------- */

--
Gitblit v1.9.3