[IMP] website: allow customize option to be conditionally visible
Before this commit, in the theme customize modal, only lists were able to be visible under the condition of a subset of options being enabled. Now options can too. PR https://github.com/odoo/odoo/pull/29624 task-1904244
This commit is contained in:
@@ -252,15 +252,17 @@ var ThemeCustomizeDialog = Dialog.extend({
|
||||
$option.find('label').append($widget);
|
||||
}
|
||||
|
||||
var $final;
|
||||
if ($container.hasClass('form-row')) {
|
||||
$col = $('<div/>', {
|
||||
$final = $('<div/>', {
|
||||
class: _.str.sprintf('col-%s', $item.data('col') || 6),
|
||||
});
|
||||
$col.append($option);
|
||||
$container.append($col);
|
||||
$final.append($option);
|
||||
} else {
|
||||
$container.append($option);
|
||||
$final = $option;
|
||||
}
|
||||
$final.attr('data-depends', $item.data('depends'));
|
||||
$container.append($final);
|
||||
break;
|
||||
|
||||
case 'LIST':
|
||||
|
||||
Reference in New Issue
Block a user