-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 = { | |||
92 | photos: new Array(), | 92 | photos: new Array(), |
93 | fireflix: null, | 93 | fireflix: null, |
94 | init: function(f) { | 94 | init: function(f) { |
95 | this.fireflix = f; | 95 | this.fireflix = f; |
96 | pull_elements(this,document,[ 'set_photo' ]); | 96 | pull_elements(this,document,[ 'set_photo' ]); |
97 | document.getElementById('setphotos').view = this; | 97 | document.getElementById('setphotos').view = this; |
98 | }, | 98 | }, |
99 | rowCount: 0, | 99 | rowCount: 0, |
100 | getCellText: function(r,c) { | 100 | getCellText: function(r,c) { |
101 | var p = this.photos[r]; | 101 | var p = this.photos[r]; |
102 | if(c.id=='sp_title') return p.title; | 102 | if(c.id=='sp_title') return p.title; |
103 | if(c.id=='sp_taken') return p.datetaken; | 103 | if(c.id=='sp_taken') return p.datetaken; |
104 | if(c.id=='sp_upload') return p.dateupload; /* TODO: unixtime conversion */ | 104 | if(c.id=='sp_upload') { |
105 | var du = new Date(p.dateupload*1000); | ||
106 | var rv = du.getFullYear()+'-'+(du.getMonth()+1)+'-'+du.getDate() | ||
107 | +' '+ | ||
108 | du.getHours()+':'+du.getMinutes()+':'+du.getSeconds(); | ||
109 | return rv.replace(/(\D)(\d)(\D)/,'$10$2$3'); | ||
110 | } | ||
105 | return c.id; | 111 | return c.id; |
106 | }, | 112 | }, |
107 | setTree: function(t) { this.tree = t }, | 113 | setTree: function(t) { this.tree = t }, |
108 | isContainer: function(r) { return false; }, | 114 | isContainer: function(r) { return false; }, |
109 | isSeparator: function(r) { return false; }, | 115 | isSeparator: function(r) { return false; }, |
110 | isSorted: function(r) { return false; }, | 116 | isSorted: function(r) { return false; }, |
111 | getLevel: function(r) { return 0; }, | 117 | getLevel: function(r) { return 0; }, |
112 | getImageSrc: function(r,c) { return null }, | 118 | getImageSrc: function(r,c) { return null }, |
113 | getRowProperties: function(r,p) {}, | 119 | getRowProperties: function(r,p) {}, |
114 | getCellProperties: function(cid,cel,p) {}, | 120 | getCellProperties: function(cid,cel,p) {}, |
115 | getColumnProperties: function(cid,cel,p) { }, | 121 | getColumnProperties: function(cid,cel,p) { }, |
116 | cycleHeader: function(cid,e) { }, | 122 | cycleHeader: function(cid,e) { }, |