summaryrefslogtreecommitdiffabout
path: root/content/fireflix.js
Unidiff
Diffstat (limited to 'content/fireflix.js') (more/less context) (ignore whitespace changes)
-rw-r--r--content/fireflix.js17
1 files changed, 13 insertions, 4 deletions
diff --git a/content/fireflix.js b/content/fireflix.js
index 78e56c2..225e21c 100644
--- a/content/fireflix.js
+++ b/content/fireflix.js
@@ -625,12 +625,23 @@ var fireflix = {
625 while(ff.hasMoreElements()) { 625 while(ff.hasMoreElements()) {
626 var f = ff.getNext(); 626 var f = ff.getNext();
627 f.QueryInterface(Components.interfaces.nsIFile); 627 f.QueryInterface(Components.interfaces.nsIFile);
628 this.add(f.path); 628 this.add(f.path);
629 } 629 }
630 } 630 }
631 },
632 on_cmd_open: function(ev) {
633 if(this.selection.currentIndex<0) return;
634 var f = this.files[this.selection.currentIndex];
635 if(f.photoid) {
636 this.fireflix.openTab(
637 this.fireflix.flickr.make_uploader_edit_url(f.photoid)
638 );
639 }else{
640 this.fireflix.openTab( 'file://'+f.file);
641 }
631 } 642 }
632 }, 643 },
633 644
634 on_set_props: function() { 645 on_set_props: function() {
635 var pset = this.photosets.sets[this.photosets.selection.currentIndex]; 646 var pset = this.photosets.sets[this.photosets.selection.currentIndex];
636 window.openDialog( 647 window.openDialog(
@@ -910,17 +921,15 @@ var fireflix = {
910 this.render_description_frame(p.description); 921 this.render_description_frame(p.description);
911 } 922 }
912 } 923 }
913 } 924 }
914 }, 925 },
915 on_cmd_open: function(ev) { 926 on_cmd_open: function(ev) {
916 if(this.selection.currentIndex<0) 927 if(this.selection.currentIndex<0) return;
917 return;
918 var p = this.photos[this.selection.currentIndex]; 928 var p = this.photos[this.selection.currentIndex];
919 if(!p.id) 929 if(!p.id) return;
920 return;
921 this.fireflix.openTab(this.fireflix.flickr.make_photo_url(p,'p')); 930 this.fireflix.openTab(this.fireflix.flickr.make_photo_url(p,'p'));
922 } 931 }
923 }, 932 },
924 933
925 photo_html: function(p,i,l) { 934 photo_html: function(p,i,l) {
926 // TODO: add alt/title when possible 935 // TODO: add alt/title when possible