Get rid of the send status bar for non-error conditions

(imported from commit 999ca5a02e95f4756e00b4769260f5a84e2440da)
This commit is contained in:
Keegan McAllister 2012-10-03 13:11:22 -04:00
parent 97542d1eb5
commit 66265aa5bf
1 changed files with 3 additions and 8 deletions

View File

@ -252,10 +252,7 @@ $(function () {
var options = {
dataType: 'json', // This seems to be ignored. We still get back an xhr.
beforeSubmit: function (form, _options) {
send_status.removeClass(status_classes)
.addClass('alert-info')
.text('Sending')
.stop(true).fadeTo(0,1);
send_status.hide();
buttons.attr('disabled', 'disabled');
buttons.blur();
@ -316,10 +313,8 @@ $(function () {
},
success: function (resp, statusText, xhr, form) {
form.find('textarea').val('');
send_status.removeClass(status_classes)
.addClass('alert-success')
.text('Sent message')
.stop(true).fadeTo(0,1).delay(250).fadeOut(250, hide_compose);
send_status.hide();
hide_compose();
buttons.removeAttr('disabled');
},
error: function (xhr) {