Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit 62516a9

Browse files
committed
Clear Old Images When Making New Listing
1 parent cec8e4b commit 62516a9

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

js/models/itemMd.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ module.exports = window.Backbone.Model.extend({
2323
userCountry: "", //set by userPage View. This is a country code. This is used for editing.
2424
ownPage: false, //set by userPage View
2525
itemHash: "", //set by userPage View
26-
combinedImagesArray: [], //tracks uploaded and old images
27-
imageHashesToUpload: [],
2826
priceSet: 0, //set in Update Attribute below, so view can listen for it
2927

3028
//the object below is just a reference for a typical response from the server.

js/views/itemEditVw.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,5 +663,10 @@ module.exports = baseVw.extend({
663663
this.validateDescription();
664664

665665
return this.$('#contractForm')[0].checkValidity();
666+
},
667+
668+
remove: function() {
669+
baseVw.prototype.remove.apply(this, arguments);
670+
return this;
666671
}
667672
});

js/views/userPageVw.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,6 +1104,7 @@ UserPageVw = pageVw.extend({
11041104
defaultItem.userCurrencyCode = self.options.userModel.get('currency_code');
11051105
defaultItem.vendor_offer.listing.item.price_per_unit.fiat.currency_code =self.options.userModel.get('currency_code');
11061106
defaultItem.vendor_offer.listing.id.guid = self.model.get('page').profile.guid;
1107+
defaultItem.vendor_offer.listing.item.image_hashes = [];
11071108
this.itemEdit = new itemModel(defaultItem);
11081109
}
11091110
//add the moderator list to the item model

0 commit comments

Comments
 (0)