author | Michael Krelin <hacker@klever.net> | 2006-10-01 20:31:31 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2006-10-01 20:31:31 (UTC) |
commit | d9372f72e080857d52ef7e60b99d95b3b3cb6ad3 (patch) (side-by-side diff) | |
tree | b54d61a4c39c6182da8a5c76e0e9b8c44958903e /content | |
parent | fa83ec27570f4d397aefeaa11e1f74b49b8d9402 (diff) | |
download | fireflix-d9372f72e080857d52ef7e60b99d95b3b3cb6ad3.zip fireflix-d9372f72e080857d52ef7e60b99d95b3b3cb6ad3.tar.gz fireflix-d9372f72e080857d52ef7e60b99d95b3b3cb6ad3.tar.bz2 |
scroll newly obtained search results to the top
git-svn-id: http://svn.klever.net/kin/fireflix/trunk@174 fe716a7a-6dde-0310-88d9-d003556173a8
-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 6681303..0f01d26 100644 --- a/content/fireflix.js +++ b/content/fireflix.js @@ -727,48 +727,49 @@ var fireflix = { this.rowCount = this.photos.length; this.tree.endUpdateBatch(); }, search_photos: function() { var pars = { method: 'flickr.photos.search', auth_token: 'default', extras: 'license,date_upload,date_taken,owner_name,icon_server,original_format,last_update,geo' }; if(this.search_mine.checked) pars.user_id='me'; if(this.search_tags.checked) { pars.tags=this.search_for.value.split(/ +/).join(','); }else{ pars.text=this.search_for.value; } var _this = this; this.fireflix.flickr.api_call( pars, function(xr) { var x = xr.responseXML; var xp = x.evaluate( '/rsp/photos/photo', x, null, XPathResult.ORDERED_NODE_ITERATOR_TYPE, null ); _this.importXPR(xp); + _this.tree.ensureRowIsVisible(0); _this.on_select(); }, function(x,s,c,m) { _this.fireflix.flickr_failure(x,s,c,m); } ); }, render_description_frame: function(content) { if(!content) { this.searchresult_description.innerHTML = ''; }else{ this.searchresult_description.innerHTML = content?content:''; /* of all linking elements flickr only allows a */ var as = this.searchresult_description.getElementsByTagName('a'); for(var a=0;a<as.length;++a) as.item(a).setAttribute('target','_blank'); } }, on_select: function() { if(this.selection.currentIndex<0) { this.searchresult_props.hidden = true; }else{ var p = this.photos[this.selection.currentIndex]; if(!p) { this.searchresult_props.hidden = true; |