summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--content/fireflix.js19
1 files changed, 9 insertions, 10 deletions
diff --git a/content/fireflix.js b/content/fireflix.js
index 283e930..d70ab4d 100644
--- a/content/fireflix.js
+++ b/content/fireflix.js
@@ -436,49 +436,48 @@ var fireflix = {
436 this.selection.currentIndex = fi; 436 this.selection.currentIndex = fi;
437 this.selToProps(); 437 this.selToProps();
438 break; 438 break;
439 } 439 }
440 } 440 }
441 }, 441 },
442 on_finish_upload: function() { 442 on_finish_upload: function() {
443 if(this.batch_ids.length) { 443 if(this.batch_ids.length) {
444 var psn = prompt(this.fireflix.loc_strings.getString('postUploadPhotoset')); 444 var psn = prompt(this.fireflix.loc_strings.getString('postUploadPhotoset'));
445 if(psn!=null) { 445 if(psn!=null) {
446 var pids = this.batch_ids.join(','); 446 var pids = this.batch_ids.join(',');
447 var ppid = this.batch_ids[0]; 447 var ppid = this.batch_ids[0];
448 var _this = this; 448 var that = this;
449 this.fireflix.flickr.api_call( 449 this.fireflix.flickr.api_call_json(
450 { 450 {
451 method: 'flickr.photosets.create', 451 method: 'flickr.photosets.create',
452 auth_token: 'default', 452 auth_token: 'default',
453 title: psn, 453 title: psn,
454 primary_photo_id: ppid 454 primary_photo_id: ppid
455 }, function(x) { 455 }, function(x,j) {
456 var npid = 456 var npid = j.photoset.id;
457 x.responseXML.getElementsByTagName('photoset').item(0).getAttribute('id'); 457 that.fireflix.flickr.api_call_json(
458 _this.fireflix.flickr.api_call(
459 { 458 {
460 method: 'flickr.photosets.editPhotos', 459 method: 'flickr.photosets.editPhotos',
461 auth_token: 'default', 460 auth_token: 'default',
462 photoset_id: npid, 461 photoset_id: npid,
463 primary_photo_id: ppid, 462 primary_photo_id: ppid,
464 photo_ids: pids 463 photo_ids: pids
465 }, function(x) { 464 }, function(x,j) {
466 _this.fireflix.refresh_sets(); 465 that.fireflix.refresh_sets();
467 }, function(x,s,c,m) { 466 }, function(x,s,c,m) {
468 _this.fireflix.flickr_failure(x,s,c,m); 467 that.fireflix.flickr_failure(x,s,c,m);
469 } 468 }
470 ); 469 );
471 }, function(x,s,c,m) { 470 }, function(x,s,c,m) {
472 _this.fireflix.flickr_failure(x,s,c,m); 471 that.fireflix.flickr_failure(x,s,c,m);
473 } 472 }
474 ); 473 );
475 } 474 }
476 } 475 }
477 this.selection.clearSelection(); 476 this.selection.clearSelection();
478 this.cmd_uploads_upload.setAttribute('disabled','false'); 477 this.cmd_uploads_upload.setAttribute('disabled','false');
479 this.upload_progress.setAttribute('hidden','true'); 478 this.upload_progress.setAttribute('hidden','true');
480 }, 479 },
481 480
482 clear_list: function() { 481 clear_list: function() {
483 this.tree.beginUpdateBatch(); 482 this.tree.beginUpdateBatch();
484 this.rowCount = 0; 483 this.rowCount = 0;