[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:
qsm-odoo
2019-02-08 14:38:14 +00:00
parent 4eb53e63e9
commit 2d934aee71
@@ -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':