closes #317 - hitting discard on a post with content will now throw a

bootbox confirmation modal
v1.18.x
Julian Lam 11 years ago
parent 7bf5b2ec57
commit 8dd8536f6b

@ -187,7 +187,15 @@ define(['taskbar'], function(taskbar) {
switch(action) { switch(action) {
case 'post': composer.post(uuid); break; case 'post': composer.post(uuid); break;
case 'minimize': composer.minimize(uuid); break; case 'minimize': composer.minimize(uuid); break;
case 'discard': composer.discard(uuid); break; case 'discard':
if (postContentEl.value.length > 0) {
bootbox.confirm('Are you sure you wish to discard this post?', function(discard) {
if (discard) composer.discard(uuid);
});
} else {
composer.discard(uuid);
}
break;
} }
}); });

Loading…
Cancel
Save