Ghost/core/client/app/controllers/modals/upload.js

24 lines
573 B
JavaScript
Raw Normal View History

2015-02-13 07:22:32 +03:00
import Ember from 'ember';
2014-03-31 08:07:05 +04:00
var UploadController = Ember.Controller.extend({
2014-06-06 18:44:09 +04:00
acceptEncoding: 'image/*',
actions: {
confirmAccept: function () {
var self = this;
this.get('model').save().then(function (model) {
self.notifications.showSuccess('Saved');
return model;
}).catch(function (err) {
self.notifications.showErrors(err);
});
},
confirmReject: function () {
return false;
2014-03-31 08:07:05 +04:00
}
}
});
export default UploadController;