Skip to content
Snippets Groups Projects
Commit e50f9a0e authored by Ahmad Abbad's avatar Ahmad Abbad
Browse files

Issue #3389376: Fix border color in layout builder (Blocks,section)

parent a3f9c27c
No related branches found
Tags 1.1.4
1 merge request!60Issue #3389376: Fix border color in layout builder (Blocks,section)
......@@ -20,26 +20,30 @@
// Assign border style.
var directions = ['left', 'top', 'right', 'bottom'];
// Loop through the directions.
for (var i = 0; i < directions.length; i++) {
once('blb_border','input.bs-field-border-style-' + directions[i], context).forEach(function (value,i) {
var direction = directions[i];
// Update border style.
once('blb_border', 'input.bs-field-border-style-' + direction, context).forEach(function (value) {
var border_style = '';
if ($(value).val() !='_none' && typeof $(value).next('label').css('border-style') != 'undefined') {
border_style = $(value).next('label').css('border-' + directions[i] + '-style');
if ($(value).val() !== '_none' && typeof $(value).next('label').css('border-style') !== 'undefined') {
border_style = $(value).next('label').css('border-' + direction + '-style');
$(value).next('label').css('border-style', border_style);
}
});
// Switch border color to background color.
once('blb_border','input.bs-field-border-color-' + directions[i], context).forEach(function (value,i) {
once('blb_border', 'input.bs-field-border-color-' + direction, context).forEach(function (value) {
var border_color = '';
if ($(value).val() !='_none' && typeof $(value).next('label').css('border-color') != 'undefined') {
border_color = $(value).next('label').css('border-' + directions[i] + '-color');
if ($(value).val() !== '_none' && typeof $(value).next('label').css('border-color') !== 'undefined') {
border_color = $(value).next('label').css('border-' + direction + '-color');
$(value).next('label').attr('style', 'background-color: ' + border_color + ' !important; border-color: white !important;');
}
});
}
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment