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