From e3cec295db825d2f0a1c465a159161c541eb5b5a Mon Sep 17 00:00:00 2001 From: ulrich Date: Thu, 21 Jan 2021 09:14:59 +0000 Subject: [PATCH] Rueckmeldung ueber Fusszeile nue gemacht. --- web/ui/data.js | 45 ++++++++++++++++++++++++++++++++++++++------- 1 files changed, 38 insertions(+), 7 deletions(-) diff --git a/web/ui/data.js b/web/ui/data.js index 458537f..29fb602 100644 --- a/web/ui/data.js +++ b/web/ui/data.js @@ -47,6 +47,7 @@ var self = this; this.fr = obj; this.fnx; + this.fext = ''; this.typeClass = function() { if(modus == 'kacheln') { @@ -78,19 +79,41 @@ return miniatur; }; + this.dia = function() { + return fm_slideshow; + }; + this.miniurl = function() { var userid = $('#userMenu').text(); - var ext = ''; - var dotpos = self.fnx.indexOf('.'); - if(dotpos > -1) { - var fny = self.fnx; - self.fnx = self.fnx.substring(0, dotpos); - ext = fny.substr(dotpos); + if(self.fext === '') { + //self.fext = ''; + var dotpos = self.fnx.indexOf('.'); + if(dotpos > -1) { + var fny = self.fnx; + self.fnx = self.fnx.substring(0, dotpos); + self.fext = fny.substr(dotpos); + } } var path = fm_get_path(userid); - var imgurl = loc + path + '/' + self.fnx + '_tn' + ext; + var imgurl = loc + path + '/' + self.fnx + '_tn' + self.fext; return imgurl; + }; + + this.bildurl = function() { + var userid = $('#userMenu').text(); + if(self.fext === '') { + //self.fext = ''; + var dotpos = self.fnx.indexOf('.'); + if(dotpos > -1) { + var fny = self.fnx; + self.fnx = self.fnx.substring(0, dotpos); + self.fext = fny.substr(dotpos); + } + } + var path = fm_get_path(userid); + var imgurl = loc + path + '/' + self.fnx + self.fext; + return imgurl; }; this.fileName = function() { @@ -103,6 +126,14 @@ } }; + + this.fileDate = function() { + return moment(self.fr.lastModified).format("YYYY-MM-DD-hh-mm-ss-SSS"); + }; + + this.fileSize = function() { + return numeral(self.fr.length).format("0.00 b"); + }; } function BcrFiles(fl) { -- Gitblit v1.9.3