changeset 8710:77f13ea8ad3b

style: mark failed comment submissions with red panel heading Make it more obvious to the user that a comment submission failed: mark the panel of the failed comment as "panel-danger" so the color of the comment panel heading changes to red. Previously, only the user and comment text would fade a bit.
author Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
date Wed, 25 Oct 2017 09:10:30 +0200
parents 53142fd5af4e
children 410934dd09f4
files kallithea/front-end/style.less kallithea/public/js/base.js
diffstat 2 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/front-end/style.less	Mon Oct 19 12:47:50 2020 +0200
+++ b/kallithea/front-end/style.less	Wed Oct 25 09:10:30 2017 +0200
@@ -564,10 +564,6 @@
     background-position: 20px 0;
   }
 }
-.comment-preview.failed .user,
-.comment-preview.failed .panel-body {
-  color: #666;
-}
 .comment-preview .comment-submission-status {
   float: right;
 }
--- a/kallithea/public/js/base.js	Mon Oct 19 12:47:50 2020 +0200
+++ b/kallithea/public/js/base.js	Wed Oct 25 09:10:30 2017 +0200
@@ -667,7 +667,7 @@
             }
         }
         function failure(x, s, e) {
-            $preview.removeClass('submitting').addClass('failed');
+            $preview.removeClass('submitting').children('.panel').addClass('panel-danger');
             var $status = $preview.find('.comment-submission-status');
             $('<span>', {
                 'title': e,
@@ -681,7 +681,7 @@
                     text: _TM['Retry']
                 }).click(function() {
                     $status.text(_TM['Submitting ...']);
-                    $preview.addClass('submitting').removeClass('failed');
+                    $preview.addClass('submitting').children('.panel').removeClass('panel-danger');
                     ajaxPOST(AJAX_COMMENT_URL, postData, success, failure);
                 }),
                 $('<button>', {