orleans: highlight widgets with errors (#50565)
This commit is contained in:
parent
f3f4ebdc20
commit
e8512b94a8
|
@ -288,3 +288,18 @@ div.buttons {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.widget {
|
||||
.content {
|
||||
display: inline-block;
|
||||
max-width: 100%;
|
||||
padding: .33em 0;
|
||||
transition: background 0.3s linear;
|
||||
&.with-padding {
|
||||
padding: .33em;
|
||||
}
|
||||
}
|
||||
&.widget-with-error .content {
|
||||
background-color: $notification_error_color;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,4 +2,13 @@ $(function() {
|
|||
$('div.wcsformsofcategorycell').delegate('h2', 'click', function() {
|
||||
$(this).parents('div.wcsformsofcategorycell').toggleClass('toggled');
|
||||
});
|
||||
/* reset error class when contents is changed */
|
||||
var $widgets_with_error = $('.widget-with-error');
|
||||
if ($widgets_with_error.length) {
|
||||
$widgets_with_error
|
||||
.find('.content').addClass('with-padding')
|
||||
.on('change', 'input, select, textarea', function() {
|
||||
$(this).parents('.widget-with-error').removeClass('widget-with-error');
|
||||
})
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue