Remove second PUT request on image save

closes #2557
- replaced model.save() with model.set()
This commit is contained in:
Sebastian Gierlinger 2014-04-06 17:46:04 +02:00
parent 395d7fd3e2
commit 9ceb4a6ab4

View File

@ -220,14 +220,8 @@
} else {
data[key] = this.$('.js-upload-target').attr('src');
}
self.model.save(data, {
success: self.saveSuccess,
error: self.saveError
}).then(function () {
self.saveSettings();
});
self.model.set(data);
self.saveSettings();
return true;
},
buttonClass: "button-save right",
@ -298,12 +292,8 @@
} else {
data[key] = this.$('.js-upload-target').attr('src');
}
self.model.save(data, {
success: self.saveSuccess,
error: self.saveError
}).then(function () {
self.saveUser();
});
self.model.set(data);
self.saveUser(data);
return true;
},
buttonClass: "button-save right",