summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2006-10-03 14:23:31 (UTC)
committer Michael Krelin <hacker@klever.net>2006-10-03 14:23:31 (UTC)
commit31fb78eac7c5799be1fb4547f3abab17ed88727f (patch) (side-by-side diff)
tree5fcce66b161010926df346470e16e3230aa76f94
parent5ebff6dee62ada9c0559f65381ccd92892911151 (diff)
downloadfireflix-31fb78eac7c5799be1fb4547f3abab17ed88727f.zip
fireflix-31fb78eac7c5799be1fb4547f3abab17ed88727f.tar.gz
fireflix-31fb78eac7c5799be1fb4547f3abab17ed88727f.tar.bz2
moved setting of .view into corresponding init()s
git-svn-id: http://svn.klever.net/kin/fireflix/trunk@182 fe716a7a-6dde-0310-88d9-d003556173a8
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--content/fireflix.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/content/fireflix.js b/content/fireflix.js
index 966630c..63a4118 100644
--- a/content/fireflix.js
+++ b/content/fireflix.js
@@ -18,27 +18,24 @@ var fireflix = {
'loc_strings','cmd_set_props'
]);
this.build_menus();
this.foundphotos.init(this);
this.photosets.init(this);
this.photoset.init(this);
this.uploads.init(this);
this.uploadObserver.init(this);
this.flickr.api_key = '9c43cd66947a57e6f29db1a9da3f72e3';
this.flickr.api_shs = '9c33c9e2f0f0cfd5';
this.flickr.prefs_root = 'net.klever.kin.fireflix';
this.flickr.load_token();
- document.getElementById('setslist').view = this.photosets;
- document.getElementById('setphotos').view = this.photoset;
- document.getElementById('uploadlist').view = this.uploads;
this.no_auth_info_label = this.auth_info.value;
this.set_auth_state(this.flickr.token,false);
if(this.flickr.token) {
this.refresh_stuff();
}else{
this.on_cmd_auth();
}
},
set_auth_state: function(au,inp) { /* authorized, in progress */
this.cmd_auth_unauth.disabled = !au;
this.b_auth.hidden = au || inp;
this.b_auth_done.hidden = !inp;
@@ -88,24 +85,25 @@ var fireflix = {
refresh_stuff: function() {
this.refresh_sets();
this.refresh_user_tags();
},
/* photoset treeview */
photoset: {
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 */
return c.id;
},
setTree: function(t) { this.tree = t },
isContainer: function(r) { return false; },
isSeparator: function(r) { return false; },
@@ -157,24 +155,25 @@ var fireflix = {
}else{
this.set_photo.hidden = true;
}
}
},
/* photosets treeview */
photosets: {
sets: new Array(),
fireflix: null,
init: function(f) {
this.fireflix = f;
+ document.getElementById('setslist').view = this;
},
rowCount: 0,
getCellText: function(r,c) {
var s = this.sets[r];
if(c.id=='sl_name') return s.title;
if(c.id=='sl_photos') return s.photos;
return c.id;
},
setTree: function(t) { this.tree = t },
isContainer: function(r) { return false; },
isSeparator: function(r) { return false; },
isSorted: function() { return false; },
@@ -307,24 +306,25 @@ 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',
'cmd_uploads_upload'
]);
+ document.getElementById('uploadlist').view = this;
},
files: new Array(),
rowCount: 0,
getCellText: function(r,c) {
var f = this.files[r];
if(c.id=='up_file') return f.file;
if(c.id=='up_title') return f.title;
if(c.id=='up_status') return f.state;
return c.id;
},
setTree: function(t) { this.tree = t },
isContainer: function(r) { return false; },