var self = this;
var bg = self.$target.css("background-image");
this.$el.find('li').removeClass("active");
+ this.$el.find('li').removeClass("btn-primary");
var $active = this.$el.find('li[data-class]')
.filter(function () {
var $li = $(this);
this.$el.find('li[data-class].oe_custom_bg') :
this.$el.find('li[data-class=""]');
}
- $active.addClass("active");
- this.$el.find('li:has(li[data-class].active)').addClass("active");
+
+ //don't set active on an OpenDialog link, else it not possible to click on it again after.
+ // TODO in Saas-4 - Once bootstrap is in less
+ // - add a class active-style to get the same display but without the active behaviour used by bootstrap in JS.
+ var classStr = _.string.contains($active[0].className, "oe_custom_bg") ? "btn-primary" : "active";
+ $active.addClass(classStr);
+ this.$el.find('li:has(li[data-class].active)').addClass(classStr);
}
});