-rw-r--r-- | content/fireflix.js | 17 |
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 | |||
@@ -627,8 +627,19 @@ var fireflix = { | |||
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() { |
@@ -912,13 +923,11 @@ var fireflix = { | |||
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 | ||