-rw-r--r-- | content/fireflix.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/content/fireflix.js b/content/fireflix.js index 98b6d41..337354e 100644 --- a/content/fireflix.js +++ b/content/fireflix.js @@ -91,12 +91,13 @@ var fireflix = { /* photoset treeview */ photoset: { photos: new Array(), fireflix: null, init: function(f) { this.fireflix = f; + pull_elements(this,document,[ 'set_photo' ]); }, 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; @@ -145,17 +146,17 @@ var fireflix = { } ); }, on_select: function() { if(this.selection.count==1) { var p = this.photos[this.selection.currentIndex]; - document.getElementById('set_photo').src = + this.set_photo.src = this.fireflix.flickr.get_photo_url(p.server,p.id,p.secret,'t'); - document.getElementById('set_photo').hidden = false; + this.set_photo.hidden = false; }else{ - document.getElementById('set_photo').hidden = true; + this.set_photo.hidden = true; } } }, /* photosets treeview */ photosets: { @@ -307,13 +308,14 @@ var fireflix = { uploads: { fireflix: null, init: function(f) { this.fireflix=f; pull_elements(this,document,[ 'upload_filename','upload_title','upload_file_preview', - 'upload_file_props','upload_progress','upload_tags' + 'upload_file_props','upload_progress','upload_tags', + 'cmd_uploads_upload' ]); }, files: new Array(), rowCount: 0, getCellText: function(r,c) { var f = this.files[r]; @@ -398,13 +400,13 @@ var fireflix = { } dump('uploading done\n'); this.on_finish_upload(); }, upload_to: function(_this) { _this.upload_worker(); }, on_file_upload: function(f) { - document.getElementById('cmd_uploads_upload').setAttribute('disabled','true'); + this.cmd_uploads_upload.setAttribute('disabled','true'); for(var fi in this.files) { if(this.files[fi].file==f.file) { this.tree.ensureRowIsVisible(fi); this.selection.rangedSelect(fi,fi,false); this.selection.currentIndex = fi; this.selToProps(); @@ -445,13 +447,13 @@ var fireflix = { _this.fireflix.flickr_failure(x,s,c,m); } ); } } this.selection.clearSelection(); - document.getElementById('cmd_uploads_upload').setAttribute('disabled','false'); + this.cmd_uploads_upload.setAttribute('disabled','false'); this.upload_progress.setAttribute('hidden','true'); }, clear_list: function() { this.tree.beginUpdateBatch(); this.rowCount = 0; |