Changeset - 77f13ea8ad3b
[Not reviewed]
default
0 2 0
Thomas De Schampheleire - 8 years ago 2017-10-25 09:10:30
thomas.de.schampheleire@gmail.com
Grafted from: a77373ff8f7b
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.
2 files changed with 2 insertions and 6 deletions:
0 comments (0 inline, 0 general)
kallithea/front-end/style.less
Show inline comments
 
@@ -564,10 +564,6 @@ input.status_change_radio {
 
    background-position: 20px 0;
 
  }
 
}
 
.comment-preview.failed .user,
 
.comment-preview.failed .panel-body {
 
  color: #666;
 
}
 
.comment-preview .comment-submission-status {
 
  float: right;
 
}
kallithea/public/js/base.js
Show inline comments
 
@@ -667,7 +667,7 @@ function _comment_div_append_form($comme
 
            }
 
        }
 
        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 @@ function _comment_div_append_form($comme
 
                    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>', {
0 comments (0 inline, 0 general)