0001-orleans-highlight-widgets-with-errors-50565.patch
static/orleans/_custom.scss | ||
---|---|---|
288 | 288 |
} |
289 | 289 |
} |
290 | 290 |
} |
291 | ||
292 |
.widget { |
|
293 |
.content { |
|
294 |
display: inline-block; |
|
295 |
max-width: 100%; |
|
296 |
padding: .33em 0; |
|
297 |
transition: padding 200ms; |
|
298 |
transition: background 0.3s linear; |
|
299 |
&.with-padding { |
|
300 |
padding: .33em; |
|
301 |
} |
|
302 |
} |
|
303 |
&.widget-with-error .content { |
|
304 |
background-color: $notification_error_color; |
|
305 |
} |
|
306 |
} |
static/orleans/extra.js | ||
---|---|---|
2 | 2 |
$('div.wcsformsofcategorycell').delegate('h2', 'click', function() { |
3 | 3 |
$(this).parents('div.wcsformsofcategorycell').toggleClass('toggled'); |
4 | 4 |
}); |
5 |
/* reset error class when contents is changed */ |
|
6 |
var $widgets_with_error = $('.widget-with-error'); |
|
7 |
if ($widgets_with_error.length) { |
|
8 |
$widgets_with_error |
|
9 |
.find('.content').addClass('with-padding') |
|
10 |
.on('change', 'input, select, textarea', function() { |
|
11 |
$(this).parents('.widget-with-error').removeClass('widget-with-error'); |
|
12 |
}) |
|
13 |
} |
|
5 | 14 |
}); |
6 |
- |