From fb8991d40439bccee84967cc35c7a6015e94499e Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Mon, 4 Nov 2013 11:29:14 +0100 Subject: [PATCH] [FIX] website snippets: filter insead of siblings readXMLData. (fix vertical drop zone, activation snippets...) bzr revid: chm@openerp.com-20131104102914-jltkz5u88heu87xd --- addons/website/static/src/js/website.snippets.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/website/static/src/js/website.snippets.js b/addons/website/static/src/js/website.snippets.js index 303e670b133..8aa59cce313 100644 --- a/addons/website/static/src/js/website.snippets.js +++ b/addons/website/static/src/js/website.snippets.js @@ -589,7 +589,8 @@ * Displayed into the overlay options on focus */ _readXMLData: function() { - this.$el = this.parent.$snippets.siblings("[data-snippet-id='"+this.snippet_id+"']").clone(); + var self = this; + this.$el = this.parent.$snippets.filter(function () { return $(this).data("snippet-id") == self.snippet_id; }).clone(); this.$editor = this.$el.find(".oe_snippet_options"); var $options = this.$overlay.find(".oe_overlay_options"); this.$editor.prependTo($options.find(".oe_options ul"));