[FIX] web: appropriate symbol in mobile embedded graph view groupby menu

This commit is contained in:
Mathieu Duckerts-Antoine
2019-07-16 07:55:04 +00:00
parent 150bd2b948
commit a87cbcadbc
2 changed files with 4 additions and 3 deletions
@@ -41,6 +41,7 @@ var GroupByMenu = DropdownMenu.extend({
*/
init: function (parent, groupBys, fields, options) {
var self = this;
options = options || {};
this._super(parent, groupBys);
this.fields = fields;
// determines when the 'Add custom groupby' submenu is open
@@ -65,9 +66,9 @@ var GroupByMenu = DropdownMenu.extend({
this.dropdownCategory = 'groupby';
this.dropdownTitle = _t('Group By');
this.dropdownIcon = 'fa fa-bars';
this.dropdownSymbol = this.isMobile ? 'fa fa-chevron-right float-right mt4' : false;
this.dropdownSymbol = this.isMobile && !options.noSymbol ? 'fa fa-chevron-right float-right mt4' : false;
// the default style of the groupby menu can be changed here using the options key 'headerStyle'
if (options && options.headerStyle === 'primary') {
if (options.headerStyle === 'primary') {
this.dropdownStyle = {
el: {class: 'btn-group o_group_by_menu o_dropdown', attrs: {'role': 'group'}},
mainButton: {class: 'btn btn-primary dropdown-toggle'},
@@ -44,7 +44,7 @@ var GroupByMenuMixin = {
});
this.groupableFields = groupableFields;
var groupBys = this._getGroupBys(this.model.get().groupBy);
this.groupByMenu = new GroupByMenu(this, groupBys, this.groupableFields);
this.groupByMenu = new GroupByMenu(this, groupBys, this.groupableFields, {noSymbol: true});
return this.groupByMenu.insertAfter($node.find('div:first'));
},
/**