Ghost/ghost/admin/app/controllers/modals/upload.js

26 lines
597 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
export default Ember.Controller.extend({
notifications: Ember.inject.service(),
2014-06-06 18:44:09 +04:00
acceptEncoding: 'image/*',
actions: {
confirmAccept: function () {
var notifications = this.get('notifications');
this.get('model').save().then(function (model) {
notifications.showSuccess('Saved');
return model;
}).catch(function (err) {
notifications.showErrors(err);
});
},
confirmReject: function () {
return false;
2014-03-31 08:07:05 +04:00
}
}
});