2014-03-30 23:07:05 -05:00
|
|
|
|
|
|
|
var UploadController = Ember.Controller.extend({
|
2014-06-06 09:44:09 -05:00
|
|
|
acceptEncoding: 'image/*',
|
2014-06-03 16:10:54 -05:00
|
|
|
actions: {
|
2014-06-19 21:29:49 -05:00
|
|
|
confirmAccept: function () {
|
|
|
|
var self = this;
|
2014-06-03 16:10:54 -05:00
|
|
|
|
2014-06-19 21:29:49 -05:00
|
|
|
this.get('model').save().then(function (model) {
|
|
|
|
self.notifications.showSuccess('Saved');
|
|
|
|
return model;
|
2014-07-22 00:27:50 -05:00
|
|
|
}).catch(function (err) {
|
|
|
|
self.notifications.showErrors(err);
|
|
|
|
});
|
2014-06-19 21:29:49 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
confirmReject: function () {
|
|
|
|
return false;
|
2014-03-30 23:07:05 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2014-06-03 16:10:54 -05:00
|
|
|
export default UploadController;
|