-rw-r--r-- | content/fireflix.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/content/fireflix.js b/content/fireflix.js index 85b4d39..a4f13b6 100644 --- a/content/fireflix.js +++ b/content/fireflix.js @@ -92,25 +92,31 @@ var fireflix = { photos: new Array(), fireflix: null, init: function(f) { this.fireflix = f; pull_elements(this,document,[ 'set_photo' ]); document.getElementById('setphotos').view = this; }, rowCount: 0, getCellText: function(r,c) { var p = this.photos[r]; if(c.id=='sp_title') return p.title; if(c.id=='sp_taken') return p.datetaken; - if(c.id=='sp_upload') return p.dateupload; /* TODO: unixtime conversion */ + if(c.id=='sp_upload') { + var du = new Date(p.dateupload*1000); + var rv = du.getFullYear()+'-'+(du.getMonth()+1)+'-'+du.getDate() + +' '+ + du.getHours()+':'+du.getMinutes()+':'+du.getSeconds(); + return rv.replace(/(\D)(\d)(\D)/,'$10$2$3'); + } return c.id; }, setTree: function(t) { this.tree = t }, isContainer: function(r) { return false; }, isSeparator: function(r) { return false; }, isSorted: function(r) { return false; }, getLevel: function(r) { return 0; }, getImageSrc: function(r,c) { return null }, getRowProperties: function(r,p) {}, getCellProperties: function(cid,cel,p) {}, getColumnProperties: function(cid,cel,p) { }, cycleHeader: function(cid,e) { }, |