diff options
| author | qsm-odoo <qsm@odoo.com> | 2018-07-27 12:42:10 +0200 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2018-07-27 12:42:10 +0200 |
| commit | 2b3017974bc7cd4b3a74f83c956224cfe4e5a918 (patch) | |
| tree | ff6aab8dc6bfa7afbe9ef714ca157ebc0185d2fd /addons/web/static/src/js/views/graph/graph_controller.js | |
| parent | 8ed8b46f6434a2a3adea69e0134317e30bf9b936 (diff) | |
| parent | 519594e9cab9a6362ef7c3e911605e4507a0a008 (diff) | |
[MERGE] *: migrate Bootstrap 3.3.7 to 4.1.3
See sub-commits for details.
task-49280
Closes https://github.com/odoo/odoo/pull/25045
Diffstat (limited to 'addons/web/static/src/js/views/graph/graph_controller.js')
| -rw-r--r-- | addons/web/static/src/js/views/graph/graph_controller.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/addons/web/static/src/js/views/graph/graph_controller.js b/addons/web/static/src/js/views/graph/graph_controller.js index e7f25c23fdd..b6a1c121f0f 100644 --- a/addons/web/static/src/js/views/graph/graph_controller.js +++ b/addons/web/static/src/js/views/graph/graph_controller.js @@ -45,7 +45,7 @@ var GraphController = AbstractController.extend(GroupByMenuInterfaceMixin,{ destroy: function () { if (this.$buttons) { // remove jquery's tooltip() handlers - this.$buttons.find('button').off().tooltip('destroy'); + this.$buttons.find('button').off().tooltip('dispose'); } this._super.apply(this, arguments); }, @@ -161,8 +161,9 @@ var GraphController = AbstractController.extend(GroupByMenuInterfaceMixin,{ this.$buttons .find('.o_graph_button[data-mode="' + state.mode + '"]') .addClass('active'); - this.$measureList.find('li').each(function (index, li) { - $(li).toggleClass('selected', $(li).data('field') === state.measure); + _.each(this.$measureList.find('.dropdown-item'), function (item) { + var $item = $(item); + $item.toggleClass('selected', $item.data('field') === state.measure); }); }, @@ -185,8 +186,7 @@ var GraphController = AbstractController.extend(GroupByMenuInterfaceMixin,{ } else if ($target.parents('.o_graph_measures_list').length) { event.preventDefault(); event.stopPropagation(); - parent = $target.parent(); - field = parent.data('field'); + field = $target.data('field'); this._setMeasure(field); } }, |
