-rw-r--r-- | content/fireflix.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/content/fireflix.js b/content/fireflix.js index 2ee408f..24894df 100644 --- a/content/fireflix.js +++ b/content/fireflix.js | |||
@@ -111,48 +111,49 @@ var fireflix = { | |||
111 | return c.id; | 111 | return c.id; |
112 | }, | 112 | }, |
113 | setTree: function(t) { this.tree = t }, | 113 | setTree: function(t) { this.tree = t }, |
114 | isContainer: function(r) { return false; }, | 114 | isContainer: function(r) { return false; }, |
115 | isSeparator: function(r) { return false; }, | 115 | isSeparator: function(r) { return false; }, |
116 | isSorted: function(r) { return false; }, | 116 | isSorted: function(r) { return false; }, |
117 | getLevel: function(r) { return 0; }, | 117 | getLevel: function(r) { return 0; }, |
118 | getImageSrc: function(r,c) { return null }, | 118 | getImageSrc: function(r,c) { return null }, |
119 | getRowProperties: function(r,p) {}, | 119 | getRowProperties: function(r,p) {}, |
120 | getCellProperties: function(cid,cel,p) {}, | 120 | getCellProperties: function(cid,cel,p) {}, |
121 | getColumnProperties: function(cid,cel,p) { }, | 121 | getColumnProperties: function(cid,cel,p) { }, |
122 | cycleHeader: function(cid,e) { }, | 122 | cycleHeader: function(cid,e) { }, |
123 | getParentIndex: function(r) { return -1; }, | 123 | getParentIndex: function(r) { return -1; }, |
124 | drop: function(r,o) { }, | 124 | drop: function(r,o) { }, |
125 | canDropBeforeAfter: function(r,b) { return false }, | 125 | canDropBeforeAfter: function(r,b) { return false }, |
126 | 126 | ||
127 | importXPR: function(xp) { | 127 | importXPR: function(xp) { |
128 | this.tree.beginUpdateBatch(); | 128 | this.tree.beginUpdateBatch(); |
129 | this.photos = new Array(); | 129 | this.photos = new Array(); |
130 | var n; while(n=xp.iterateNext()) { | 130 | var n; while(n=xp.iterateNext()) { |
131 | this.photos.push(new Photo(n)); | 131 | this.photos.push(new Photo(n)); |
132 | } | 132 | } |
133 | this.rowCount = this.photos.length; | 133 | this.rowCount = this.photos.length; |
134 | this.tree.endUpdateBatch(); | 134 | this.tree.endUpdateBatch(); |
135 | this.selection.clearSelection(); | ||
135 | }, | 136 | }, |
136 | load_photos: function(psid) { | 137 | load_photos: function(psid) { |
137 | var _this = this; | 138 | var _this = this; |
138 | this.fireflix.flickr.api_call( | 139 | this.fireflix.flickr.api_call( |
139 | { | 140 | { |
140 | method: 'flickr.photosets.getPhotos', | 141 | method: 'flickr.photosets.getPhotos', |
141 | auth_token: 'default', | 142 | auth_token: 'default', |
142 | photoset_id: psid, | 143 | photoset_id: psid, |
143 | extras: 'license,date_upload,date_taken,owner_name,icon_server,original_format,last_update' | 144 | extras: 'license,date_upload,date_taken,owner_name,icon_server,original_format,last_update' |
144 | }, function(xr) { | 145 | }, function(xr) { |
145 | var x = xr.responseXML; | 146 | var x = xr.responseXML; |
146 | var xp = x.evaluate( | 147 | var xp = x.evaluate( |
147 | '/rsp/photoset/photo', x, null, | 148 | '/rsp/photoset/photo', x, null, |
148 | XPathResult.ORDERED_NODE_ITERATOR_TYPE, null ); | 149 | XPathResult.ORDERED_NODE_ITERATOR_TYPE, null ); |
149 | _this.importXPR(xp); | 150 | _this.importXPR(xp); |
150 | }, function(x,s,c,m) { | 151 | }, function(x,s,c,m) { |
151 | _this.fireflix.flickr_failure(x,s,c,m); | 152 | _this.fireflix.flickr_failure(x,s,c,m); |
152 | } | 153 | } |
153 | ); | 154 | ); |
154 | }, | 155 | }, |
155 | on_select: function() { | 156 | on_select: function() { |
156 | if(this.selection.count==1) { | 157 | if(this.selection.count==1) { |
157 | var p = this.photos[this.selection.currentIndex]; | 158 | var p = this.photos[this.selection.currentIndex]; |
158 | this.set_photo.src = | 159 | this.set_photo.src = |