mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 11:22:19 +03:00
0e9d4e6792
Refs #4001 - grunt-jscs@0.8.1 which provides ES6 support.
34 lines
800 B
JavaScript
34 lines
800 B
JavaScript
var AuthFailedUnsavedController = Ember.Controller.extend({
|
|
editorController: Ember.computed.alias('model'),
|
|
|
|
actions: {
|
|
confirmAccept: function () {
|
|
var editorController = this.get('editorController');
|
|
|
|
if (editorController) {
|
|
editorController.get('model').rollback();
|
|
}
|
|
|
|
window.onbeforeunload = null;
|
|
|
|
window.location = this.get('ghostPaths').adminRoot + '/signin/';
|
|
},
|
|
|
|
confirmReject: function () {
|
|
}
|
|
},
|
|
|
|
confirm: {
|
|
accept: {
|
|
text: 'Leave',
|
|
buttonClass: 'btn btn-red'
|
|
},
|
|
reject: {
|
|
text: 'Stay',
|
|
buttonClass: 'btn btn-default btn-minor'
|
|
}
|
|
}
|
|
});
|
|
|
|
export default AuthFailedUnsavedController;
|