# HG changeset patch # User Thomas De Schampheleire # Date 2017-10-25 09:10:30 # Node ID 77f13ea8ad3b47b4cf94032a90e07860b44ddcb5 # Parent 53142fd5af4e7f0a6425fd322be4b8634c06f4fc 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. diff --git a/kallithea/front-end/style.less b/kallithea/front-end/style.less --- a/kallithea/front-end/style.less +++ b/kallithea/front-end/style.less @@ -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; } diff --git a/kallithea/public/js/base.js b/kallithea/public/js/base.js --- a/kallithea/public/js/base.js +++ b/kallithea/public/js/base.js @@ -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'); $('', { '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); }), $('