Provider testing improvements

New: Test button for indexers in UI

Fixed: Testing download clients shows error messages in UI
Fixed: Testing notifications shows error messages in UI
This commit is contained in:
Mark McDowall
2014-07-04 01:09:48 -07:00
parent c5bd8b27fb
commit 7af782d353
70 changed files with 727 additions and 591 deletions

View File

@@ -57,13 +57,17 @@ define(
};
$.fn.addFormError = function (error) {
var t1 = this.find('.form-horizontal');
var t2 = this.find('.form-horizontal').parent();
this.prepend('<div class="alert alert-danger validation-error">' + error.errorMessage + '</div>');
if (this.find('.modal-body')) {
this.find('.modal-body').prepend('<div class="alert alert-danger validation-error">' + error.errorMessage + '</div>');
}
else {
this.prepend('<div class="alert alert-danger validation-error">' + error.errorMessage + '</div>');
}
};
$.fn.removeAllErrors = function () {
this.find('.has-error').removeClass('has-error');
this.find('.error').removeClass('error');
this.find('.validation-errors').removeClass('alert').removeClass('alert-danger').html('');
this.find('.validation-error').remove();