diff options
| author | Kersten Jeremy <jke@openerp.com> | 2014-04-14 11:48:03 +0200 |
|---|---|---|
| committer | Kersten Jeremy <jke@openerp.com> | 2014-04-14 11:48:03 +0200 |
| commit | 66e72fec5427b6b02a7be9452d06f7aed583b4cf (patch) | |
| tree | 7f20ca103d1d1e2d2a05d699c2e9bdcda411c578 /addons/website/static/src/js/website.snippets.editor.js | |
| parent | a0b26b6cfe82f7dcab5fa198dbf01fc23e66bde4 (diff) | |
[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
Diffstat (limited to 'addons/website/static/src/js/website.snippets.editor.js')
| -rw-r--r-- | addons/website/static/src/js/website.snippets.editor.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/addons/website/static/src/js/website.snippets.editor.js b/addons/website/static/src/js/website.snippets.editor.js index ad96b4c6c49..dca134deadb 100644 --- a/addons/website/static/src/js/website.snippets.editor.js +++ b/addons/website/static/src/js/website.snippets.editor.js @@ -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); } }); |
