| | |
| | | suedDiv.style.height = '0'; |
| | | }; |
| | | |
| | | /* |
| | | function descending(a, b) |
| | | { |
| | | if (a < b) |
| | | { |
| | | return 1; |
| | | } |
| | | |
| | | if (a > b) |
| | | { |
| | | return -1; |
| | | } |
| | | |
| | | return 0; |
| | | } |
| | | */ |
| | | |
| | | // FileRef Vergleicher |
| | | |
| | | this.name_vergleicher_asc = function(a, b) { |
| | | if (a.fileName() > b.fileName()) |
| | | { |
| | | return 1; |
| | | } |
| | | |
| | | if (a.fileName() < b.fileName()) |
| | | { |
| | | return -1; |
| | | } |
| | | |
| | | this.fm_vergleichen_asc = function(av, bv) { |
| | | if (av > bv) { return 1; } |
| | | if (av < bv) { return -1; } |
| | | return 0; |
| | | }; |
| | | |
| | | this.name_vergleicher_asc = function(a, b) { |
| | | return self.fm_vergleichen_asc(a.fileName().small(), b.fileName().small()); |
| | | }; |
| | | |
| | | this.name_vergleicher_desc = function(a, b) { |
| | | //console.log('name_vergleicher_desc - a.fileName: ' + |
| | | // a.fileName() + ', b.fileName: ' + b.fileName()); |
| | | if (a.fileName() < b.fileName()) |
| | | { |
| | | return 1; |
| | | } |
| | | |
| | | if (a.fileName() > b.fileName()) |
| | | { |
| | | return -1; |
| | | } |
| | | |
| | | return 0; |
| | | return self.fm_vergleichen_asc(b.fileName().small(), a.fileName().small()); |
| | | }; |
| | | |
| | | // groesse fileSize, art fr.mimetype, geaendert fileDate |
| | | |
| | | this.type_vergleicher_asc = function(a, b) { |
| | | if (a.fr.mimetype > b.fr.mimetype) |
| | | { |
| | | return 1; |
| | | } |
| | | |
| | | if (a.fr.mimetype < b.fr.mimetype) |
| | | { |
| | | return -1; |
| | | } |
| | | |
| | | return 0; |
| | | return self.fm_vergleichen_asc(a.fr.mimetype.small(), b.fr.mimetype.small()); |
| | | }; |
| | | |
| | | this.type_vergleicher_desc = function(a, b) { |
| | | //console.log('name_vergleicher_desc - a.fileName: ' + |
| | | // a.fileName() + ', b.fileName: ' + b.fileName()); |
| | | if (a.fr.mimetype < b.fr.mimetype) |
| | | { |
| | | return 1; |
| | | } |
| | | |
| | | if (a.fr.mimetype > b.fr.mimetype) |
| | | { |
| | | return -1; |
| | | } |
| | | |
| | | return 0; |
| | | return self.fm_vergleichen_asc(b.fr.mimetype.small(), a.fr.mimetype.small()); |
| | | }; |
| | | |
| | | this.size_vergleicher_asc = function(a, b) { |
| | | if (a.fileSize() > b.fileSize()) |
| | | { |
| | | return 1; |
| | | } |
| | | |
| | | if (a.fileSize() < b.fileSize()) |
| | | { |
| | | return -1; |
| | | } |
| | | |
| | | return 0; |
| | | return self.fm_vergleichen_asc(a.fileSize(), b.fileSize()); |
| | | }; |
| | | |
| | | this.size_vergleicher_desc = function(a, b) { |
| | | //console.log('name_vergleicher_desc - a.fileName: ' + |
| | | // a.fileName() + ', b.fileName: ' + b.fileName()); |
| | | if (a.fileSize() < b.fileSize()) |
| | | { |
| | | return 1; |
| | | } |
| | | |
| | | if (a.fileSize() > b.fileSize()) |
| | | { |
| | | return -1; |
| | | } |
| | | |
| | | return 0; |
| | | return self.fm_vergleichen_asc(b.fileSize(), a.fileSize()); |
| | | }; |
| | | |
| | | this.date_vergleicher_asc = function(a, b) { |
| | | if (a.fileDate() > b.fileDate()) |
| | | { |
| | | return 1; |
| | | } |
| | | |
| | | if (a.fileDate() < b.fileDate()) |
| | | { |
| | | return -1; |
| | | } |
| | | |
| | | return 0; |
| | | return self.fm_vergleichen_asc(a.fileDate(), b.fileDate()); |
| | | }; |
| | | |
| | | this.date_vergleicher_desc = function(a, b) { |
| | | //console.log('name_vergleicher_desc - a.fileName: ' + |
| | | // a.fileName() + ', b.fileName: ' + b.fileName()); |
| | | if (a.fileDate() < b.fileDate()) |
| | | { |
| | | return 1; |
| | | } |
| | | |
| | | if (a.fileDate() > b.fileDate()) |
| | | { |
| | | return -1; |
| | | } |
| | | |
| | | return 0; |
| | | return self.fm_vergleichen_asc(b.fileDate(), a.fileDate()); |
| | | }; |
| | | |
| | | this.fm_toggle_order = function () { |
| | |
| | | |
| | | /* API functions */ |
| | | |
| | | // http://localhost:8079/file-cms/svc?c=de.uhilger.filecms.api.FileMgr&f=JSONNICE&m=list&p= |
| | | /* |
| | | https://[host]:[port]/file-cms/svc |
| | | ?c=de.uhilger.filecms.api.FileMgr |
| | | &m=list |
| | | &p=Persoenlich/prj/jsp |
| | | |
| | | erster Ordner in Pfad ist stets 'Persoenlich' oder 'Oeffentlich' |
| | | */ |
| | | this.fm_get_list = function (relPfad) { |
| | | var m = '?c=de.uhilger.filecms.api.FileMgr&m=list&p=' + relPfad; |
| | | var u = '../svc' + m; |
| | |
| | | } |
| | | } |
| | | var fl = new FileList(files); |
| | | self.fm_render_list(fl); |
| | | |
| | | self.fm_render_list(fl); |
| | | } else { |
| | | // #dateien leeren |
| | | var elem = document.querySelector("#dateien"); |
| | |
| | | self.datei_ansehen_oder_bearbeiten(fname); |
| | | }; |
| | | |
| | | /* |
| | | |
| | | https://[host]:[port]/file-cms/svc |
| | | ?c=de.uhilger.filecms.api.FileMgr |
| | | &m=getCode |
| | | &p=Persoenlich/prj/jsp |
| | | &p=styleTest.jsp |
| | | |
| | | erster Ordner in Pfad ist stets 'Persoenlich' oder 'Oeffentlich' |
| | | |
| | | */ |
| | | this.fm_get_file_content = function(typ, fname) { |
| | | self.openFileName = fname; |
| | | var m = '?c=de.uhilger.filecms.api.FileMgr&m=getCode&p=' + self.pfad + '&p=' + fname; |