| | |
| | | /* ---------- 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; |
| | |
| | | $('.breadcrumb-item').click(fm_bc_click); |
| | | $('#ansicht').click(fm_ansicht_umschalten); |
| | | fm_set_modus(); |
| | | |
| | | if(fm_slideshow) { |
| | | $("[data-fancybox]").fancybox({ |
| | | loop: true, |
| | | idleTime: 2 |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function fm_del_files() { |
| | | var liste = fm_gewaehlte_dateien(); |
| | | var m = '?c=de.uhilger.filecms.api.FileMgr&m=deleteFiles&p=' + pfad + '&p=' + encodeURIComponent(liste); |
| | | var u = '../svc' + m; |
| | | fm_get(u, "text", function(resp) { |
| | | // console.log('deleteFiles gab folgendes zurueck: ' + resp); |
| | | fm_get_list(pfad); |
| | | }); |
| | | } |
| | | |
| | | function fm_pack_folder() { |
| | | //var liste = fm_gewaehlte_dateien(); |
| | | var m = '?c=de.uhilger.filecms.api.FileMgr&m=packFolder&p=' + pfad; |
| | | var u = '../svc' + m; |
| | | fm_get(u, "text", function(resp) { |
| | | // console.log('deleteFiles gab folgendes zurueck: ' + resp); |
| | |
| | | }); |
| | | } |
| | | |
| | | function fm_export_html() { |
| | | var m = '?c=de.uhilger.filecms.api.HtmlExportService&m=exportHtml'; |
| | | m = m + '&p=' + pfad; |
| | | var u = '../svc' + m; |
| | | fm_get(u, "text", function(resp) { |
| | | $('.system-out').empty(); |
| | | $('.system-out').append('Rueckmeldung vom HTML-Export: ' + resp); |
| | | fm_fusszeile_zeigen(); |
| | | }); |
| | | } |
| | | |
| | | /* ------------------- Dateiinhalte --------------------- */ |
| | | |
| | | function fm_save_file(saveFileName, method, callback) { |
| | |
| | | mode = 'xml'; |
| | | } else if(fname.endsWith('properties')) { |
| | | mode = 'xml'; |
| | | } else if(fname.endsWith('adoc')) { |
| | | mode = 'text/x-markdown'; |
| | | } |
| | | fm_text_edit(resp, mode); |
| | | } else { |
| | |
| | | } |
| | | |
| | | /* -------- 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; |
| | |
| | | |
| | | 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 ------------------------- */ |
| | |
| | | }); |
| | | } |
| | | |
| | | function fm_menu_rotate() { |
| | | var gewaehlte = $('.datei-gewaehlt'); |
| | | var fname = $(gewaehlte[0]).text(); |
| | | var m = '?c=de.uhilger.filecms.api.FileMgr&m=bildRotieren'; |
| | | m = m + '&p=' + pfad; |
| | | m = m + '&p=' + fname; |
| | | var u = '../svc' + m; |
| | | fm_get(u, "text", function(resp) { |
| | | fm_get_list(pfad); |
| | | }); |
| | | } |
| | | |
| | | /* -------- upload ----------- */ |
| | | |
| | | function sendFile(datei) { |