UX: Make abondon post confirmation button red.
This commit is contained in:
parent
5fa5c18a48
commit
5d28a1ac0d
|
@ -695,15 +695,21 @@ export default Ember.Controller.extend({
|
|||
|
||||
return new Ember.RSVP.Promise(function (resolve) {
|
||||
if (self.get('model.hasMetaData') || self.get('model.replyDirty')) {
|
||||
bootbox.confirm(I18n.t("post.abandon.confirm"), I18n.t("post.abandon.no_value"),
|
||||
I18n.t("post.abandon.yes_value"), function(result) {
|
||||
if (result) {
|
||||
self.destroyDraft();
|
||||
self.get('model').clearState();
|
||||
self.close();
|
||||
resolve();
|
||||
bootbox.dialog(I18n.t("post.abandon.confirm"), [
|
||||
{ label: I18n.t("post.abandon.no_value") },
|
||||
{
|
||||
label: I18n.t("post.abandon.yes_value"),
|
||||
'class': 'btn-danger',
|
||||
callback(result) {
|
||||
if (result) {
|
||||
self.destroyDraft();
|
||||
self.get('model').clearState();
|
||||
self.close();
|
||||
resolve();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
]);
|
||||
} else {
|
||||
// it is possible there is some sort of crazy draft with no body ... just give up on it
|
||||
self.destroyDraft();
|
||||
|
|
Loading…
Reference in New Issue