mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 01:41:46 +03:00
45ccad58f9
closes #2422 - updated to use new change password method - have all save settings use notifications - create assetUrl helper for creating asset paths with subdir's properly prefixed - move all url based helpers onto a url object in ghost-paths
33 lines
812 B
JavaScript
33 lines
812 B
JavaScript
var DeleteAllController = Ember.Controller.extend({
|
|
actions: {
|
|
confirmAccept: function () {
|
|
var self = this;
|
|
|
|
ic.ajax.request(this.get('ghostPaths.url').api('db'), {
|
|
type: 'DELETE'
|
|
}).then(function () {
|
|
self.notifications.showSuccess('All content deleted from database.');
|
|
}).catch(function (response) {
|
|
self.notifications.showErrors(response);
|
|
});
|
|
},
|
|
|
|
confirmReject: function () {
|
|
return false;
|
|
}
|
|
},
|
|
|
|
confirm: {
|
|
accept: {
|
|
text: 'Delete',
|
|
buttonClass: 'button-delete'
|
|
},
|
|
reject: {
|
|
text: 'Cancel',
|
|
buttonClass: 'button'
|
|
}
|
|
}
|
|
});
|
|
|
|
export default DeleteAllController;
|