0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00
ghost/core/client/app/controllers/modals/upload.js

26 lines
597 B
JavaScript
Raw Normal View History

2015-02-12 21:22:32 -07:00
import Ember from 'ember';
2014-03-31 00:07:05 -04:00
export default Ember.Controller.extend({
notifications: Ember.inject.service(),
2014-06-06 10: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 00:07:05 -04:00
}
}
});