-rw-r--r-- | content/fireflix-panel.xul | 4 | ||||
-rw-r--r-- | content/fireflix.js | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/content/fireflix-panel.xul b/content/fireflix-panel.xul index af92d22..62862a9 100644 --- a/content/fireflix-panel.xul +++ b/content/fireflix-panel.xul @@ -195,36 +195,36 @@ </tree> <hbox> <button command="cmd_refresh_sets" /> <button command="cmd_set_props" /> </hbox> <tree id="setphotos" rows="2" onselect="fireflix.photoset.on_select()" flex="1" ondblclick="fireflix.photoset.on_cmd_open(event)" onkeypress="if(event.keyCode==event.DOM_VK_RETURN) fireflix.photoset.on_cmd_open(event)"> <treecols> <treecol id="sp_title" label="&panel.setphotos.title.label;" flex="1" crop="end" align="start" tooltiptext="&panel.setphotos.title.tip;" /> <splitter class="tree-splitter" /> <treecol id="sp_taken" label="&panel.setphotos.taken.label;" crop="end" align="start" tooltiptext="&panel.setphotos.taken.tip;" hidden="true" /> <treecol id="sp_upload" label="&panel.setphotos.upload.label;" crop="end" align="start" tooltiptext="&panel.setphotos.upload.tip;" hidden="true" /> </treecols> <treechildren/> </tree> - <groupbox id="set_photo_props" orient="horizontal"> + <groupbox id="set_photo_props" orient="horizontal" hidden="true"> <vbox width="100" pack="center"> <hbox pack="center"> - <image id="set_photo" hidden="true" + <image id="set_photo" ondblclick="fireflix.photoset.on_cmd_open(event)" /> </hbox> </vbox> <spacer flex="1"/> </groupbox> </vbox> </tabpanel> <tabpanel id="tabpanel_tags"> <listbox id="tagslist" rows="8" flex="1"> <listhead> <listheader label="&panel.tagslist.tag.label;"/> </listhead> <listcols> <listcol flex="1"/> </listcols> diff --git a/content/fireflix.js b/content/fireflix.js index 48053c5..328e9e2 100644 --- a/content/fireflix.js +++ b/content/fireflix.js @@ -80,33 +80,33 @@ var fireflix = { this.flickr.reset_token(); this.set_auth_state(false,false); }, refresh_sets: function() { this.photosets.refresh_sets(); }, 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' ]); + pull_elements(this,document,[ 'set_photo', 'set_photo_props' ]); 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') { var du = new Date(p.dateupload*1000); var rv = du.getFullYear()+'-'+(du.getMonth()+1)+'-'+du.getDate() +' '+ du.getHours()+':'+du.getMinutes()+':'+du.getSeconds(); return rv.replace(/(\D)(\d)(\D)/,'$10$2$3'); } return c.id; }, @@ -145,35 +145,35 @@ var fireflix = { }, function(xr) { var x = xr.responseXML; var xp = x.evaluate( '/rsp/photoset/photo', x, null, XPathResult.ORDERED_NODE_ITERATOR_TYPE, null ); _this.importXPR(xp); }, function(x,s,c,m) { _this.fireflix.flickr_failure(x,s,c,m); } ); }, on_select: function() { if(this.selection.count==1) { var p = this.photos[this.selection.currentIndex]; this.set_photo.src = this.fireflix.flickr.get_photo_url(p.server,p.id,p.secret,'t'); - this.set_photo.hidden = false; + this.set_photo_props.hidden = false; }else{ - this.set_photo.hidden = true; + this.set_photo_props.hidden = true; } }, on_cmd_open: function(ev) { if(this.selection.currentIndex<0) return; var p = this.photos[this.selection.currentIndex]; if(!p.id) return; this.fireflix.openTab(this.fireflix.flickr.make_photo_url(p,'p')); } }, /* photosets treeview */ photosets: { sets: new Array(), fireflix: null, init: function(f) { this.fireflix = f; |