author | Michael Krelin <hacker@klever.net> | 2006-09-30 18:21:31 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2006-09-30 18:21:31 (UTC) |
commit | 4f5e775ff24baf34b3425e93bfeac4a436b4b525 (patch) (side-by-side diff) | |
tree | 3dcde487352a9dd8bcef852adeb18f118cbe20c5 /content | |
parent | 74a277c2d7ac5416c3b55565e6d5e8e5a15b389d (diff) | |
download | fireflix-4f5e775ff24baf34b3425e93bfeac4a436b4b525.zip fireflix-4f5e775ff24baf34b3425e93bfeac4a436b4b525.tar.gz fireflix-4f5e775ff24baf34b3425e93bfeac4a436b4b525.tar.bz2 |
minor code beauty/performance enhancements
git-svn-id: http://svn.klever.net/kin/fireflix/trunk@170 fe716a7a-6dde-0310-88d9-d003556173a8
-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 @@ -94,6 +94,7 @@ var fireflix = { fireflix: null, init: function(f) { this.fireflix = f; + pull_elements(this,document,[ 'set_photo' ]); }, rowCount: 0, getCellText: function(r,c) { @@ -148,11 +149,11 @@ 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; } } }, @@ -310,7 +311,8 @@ var fireflix = { 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(), @@ -401,7 +403,7 @@ var fireflix = { }, 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); @@ -448,7 +450,7 @@ var fireflix = { } } this.selection.clearSelection(); - document.getElementById('cmd_uploads_upload').setAttribute('disabled','false'); + this.cmd_uploads_upload.setAttribute('disabled','false'); this.upload_progress.setAttribute('hidden','true'); }, |