[FIX] Website - Don't set active on OpenDialog link else the user cannot click on it again after.
bzr revid: jke@openerp.com-20140414094803-bfyvu3wizy09n53c
This commit is contained in:
parent
a0b26b6cfe
commit
66e72fec54
|
@ -769,6 +769,7 @@
|
|||
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);
|
||||
|
@ -781,8 +782,13 @@
|
|||
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);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue