[FIX] website snippet: height vertical drop zone

bzr revid: chm@openerp.com-20130920102600-jq8gv86i9ybqdf4d
This commit is contained in:
Christophe Matthieu 2013-09-20 12:26:00 +02:00
parent 3e890e865b
commit 7e35fc2852
1 changed files with 12 additions and 2 deletions

View File

@ -425,8 +425,18 @@
self.dom_filter(vertical_child_selector).each(function (){
var $zone = $(this);
var $template = $(zone_template).addClass("oe_vertical").css('height', $zone.outerHeight()+'px');
$zone.find('> *:not(.oe_drop_zone):visible').after($template);
$zone.prepend($template.clone());
var nb = 0;
$zone.find('> *:not(.oe_drop_zone):visible').each(function () {
$template.css('height', $(this).outerHeight()+'px');
$(this).after($template.clone());
if (!nb) {
$(this).before($template.clone());
}
nb ++;
});
if (!nb) {
$zone.prepend($template.clone());
}
});
}