summaryrefslogtreecommitdiff
path: root/addons/website/static/src
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2018-12-20 15:54:48 +0000
committerqsm-odoo <qsm@odoo.com>2019-02-08 14:38:14 +0000
commit2d934aee71a7bfb6cf40272e1b38be240c00bc4b (patch)
tree7d4d773c3fc5ae036e1768a920008f9501fd3e51 /addons/website/static/src
parent4eb53e63e9940cee26e7b5dd7d0f76be13aa1f6b (diff)
[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
Diffstat (limited to 'addons/website/static/src')
-rw-r--r--addons/website/static/src/js/widgets/theme.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/addons/website/static/src/js/widgets/theme.js b/addons/website/static/src/js/widgets/theme.js
index 5bbb65cee75..e118366d009 100644
--- a/addons/website/static/src/js/widgets/theme.js
+++ b/addons/website/static/src/js/widgets/theme.js
@@ -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':