mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-07 22:45:46 +01:00
closes #317 - hitting discard on a post with content will now throw a
bootbox confirmation modal
This commit is contained in:
@@ -187,7 +187,15 @@ define(['taskbar'], function(taskbar) {
|
||||
switch(action) {
|
||||
case 'post': composer.post(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;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user