-rw-r--r-- | NEWS.xml | 2 | ||||
-rw-r--r-- | content/fireflix-panel.xul | 4 | ||||
-rw-r--r-- | content/fireflix.js | 6 |
3 files changed, 7 insertions, 5 deletions
@@ -1,30 +1,32 @@ <?xml version="1.0" encoding="us-ascii"?> <news> <version version="0.0.5"> <ni>Added toolbar button</ni> <ni>Enter or double click on photo in set now opens photo in flickr</ni> <ni>Double click on photoset opens photoset in flickr</ni> + <ni>Hiding completely photo properties in sets browser when no photo + selected</ni> </version> <version version="0.0.4" date="November 13th, 2006"> <ni>Added button to remove linebreaks from generated HTML</ni> <ni>Added the word 'sidebar' to the extension name so that you don't have to look hard for it</ni> <ni>UI polishing, including making it more boring</ni> <ni>code cosmetics</ni> </version> <version version="0.0.3" date="November 6th, 2006"> <ni>Firefox 2.0 compatibility</ni> </version> <version version="0.0.2" date="October 17th, 2006"> <ni>Added brief help file</ni> <ni>Fixed HTML generation code</ni> <ni>Fixed a mistyped flickr url so that the 'Flickr' button works now</ni> </version> <version version="0.0.1" date="October 3rd, 2006"> <ni>Added ability to paginate through search results</ni> <ni>Fixed packaging bug that omitted packaging license dialog</ni> <ni>A lot of code cleanup and UI polishing</ni> </version> <version version="0.0" date="September 26th, 2006"> <ni>Initial release</ni> </version> </news> 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 @@ -179,68 +179,68 @@ </tabpanel> <tabpanel id="tabpanel_sets" flex="1" onkeypress="if(event.keyCode==event.DOM_VK_RETURN) document.getElementById('setphotos').focus()"> <vbox flex="1"> <tree id="setslist" rows="2" onselect="fireflix.photosets.on_select()" flex="1" context="sets_menu" ondblclick="fireflix.photosets.on_cmd_open_in_flickr(event)" > <treecols> <treecol id="sl_name" label="&panel.sets.name.label;" flex="4" crop="end" align="start" tooltiptext="&panel.sets.name.tip;"/> <splitter class="tree-splitter" /> <treecol id="sl_photos" label="&panel.sets.photos.label;" flex="1" align="end" tooltiptext="&panel.sets.photos.tip;" /> </treecols> <treechildren/> </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> </listbox> </tabpanel> <tabpanel id="tabpanel_upload"> <vbox flex="1"> <tree id="uploadlist" rows="2" flex="1" onselect="fireflix.uploads.selectionChanged()" context="uploads_menu"> <treecols> <treecol id="up_file" label="&panel.uploadlist.file.label;" flex="4" crop="start" align="start"/> <splitter class="tree-splitter" /> <treecol id="up_title" label="&panel.uploadlist.title.label;" flex="5" crop="end" align="start" /> <splitter class="tree-splitter" /> <treecol id="up_status" label="&panel.uploadlist.status.label;" flex="1" crop="end" align="start" /> </treecols> <treechildren/> diff --git a/content/fireflix.js b/content/fireflix.js index 48053c5..328e9e2 100644 --- a/content/fireflix.js +++ b/content/fireflix.js @@ -64,132 +64,132 @@ var fireflix = { this.set_auth_state(this.flickr.token,false); var _this = this; this.flickr.authorize_1( function() { _this.flickr.save_token(); _this.refresh_stuff(); _this.set_auth_state(_this.flickr.token,false); _this.auth_info.value = _this.flickr.user.fullname+' ['+_this.flickr.user.username+']'; }, function(x,s,c,m) { _this.set_auth_state(_this.flickr.token,false); /* XXX: no reset token? */ _this.flickr_failure(x,s,c,m); } ); }, on_cmd_auth_unauth: function() { 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; }, setTree: function(t) { this.tree = t }, isContainer: function(r) { return false; }, isSeparator: function(r) { return false; }, isSorted: function(r) { return false; }, getLevel: function(r) { return 0; }, getImageSrc: function(r,c) { return null }, getRowProperties: function(r,p) {}, getCellProperties: function(cid,cel,p) {}, getColumnProperties: function(cid,cel,p) { }, cycleHeader: function(cid,e) { }, getParentIndex: function(r) { return -1; }, drop: function(r,o) { }, canDropBeforeAfter: function(r,b) { return false }, importXPR: function(xp) { this.tree.beginUpdateBatch(); this.photos = new Array(); var n; while(n=xp.iterateNext()) { this.photos.push(new Photo(n)); } this.rowCount = this.photos.length; this.tree.endUpdateBatch(); this.selection.clearSelection(); }, load_photos: function(psid) { var _this = this; this.fireflix.flickr.api_call( { method: 'flickr.photosets.getPhotos', auth_token: 'default', photoset_id: psid, extras: 'license,date_upload,date_taken,owner_name,icon_server,original_format,last_update' }, 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; 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; }, getLevel: function(r) { return 0; }, getImageSrc: function(r,c) { return null }, getRowProperties: function(r,p) {}, |