Node.js based forum software built for the modern web
closes #317 - hitting discard on a post with content will now throw a bootbox confirmation modal
Julian Lam8dd8536f6ba3
diff --git a/public/src/modules/composer.js b/public/src/modules/composer.jsindex 8326ec0245..924cf94fec 100644--- a/public/src/modules/composer.js+++ b/public/src/modules/composer.js@@ -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;}});