sonarr-repo-only/NzbDrone.Web/Scripts2/bootstrap-mvc.js

33 lines
946 B
JavaScript
Raw Normal View History

2013-01-17 00:39:42 +00:00

jQuery(document).ready(function ($) {
$('span.field-validation-valid, span.field-validation-error').each(function () {
$(this).addClass('help-inline');
});
$("button, input[type='submit'],input[type='button']").each(function () {
$(this).addClass('btn btn-madmin');
});
$(".btn").each(function () {
$(this).addClass('btn-madmin');
});
$("input[type='submit']").each(function () {
$(this).addClass('btn-primary btn-large');
});
$('.validation-summary-errors').livequery(function () {
$(this).addClass('alert alert-error');
});
$('.field-validation-error').livequery(function () {
$('.control-group').each(function () {
if ($(this).find('span.field-validation-error').length == 0) {
$(this).removeClass('error');
} else {
$(this).addClass('error');
}
});
});
});