From b5b98f9a8be043445db3b7ed9842aa81c62249e9 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 23 Jul 2012 18:00:31 +0000 Subject: [PATCH] Tables in the main part of hbox need to be inline, or the block display ruins layout. Maybe a better way for this though --- etemplate/js/et2_widget_hbox.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/etemplate/js/et2_widget_hbox.js b/etemplate/js/et2_widget_hbox.js index d581b20a3c..69c6ee8d2d 100644 --- a/etemplate/js/et2_widget_hbox.js +++ b/etemplate/js/et2_widget_hbox.js @@ -161,6 +161,17 @@ var et2_hbox = et2_baseWidget.extend({ // Normally simply return the hbox-div return this._super.apply(this, arguments); + }, + + /** + * Tables added to the root node need to be inline instead of blocks + */ + addChild: function(child) { + this._super.apply(this, arguments); + if(child.instanceOf && child.instanceOf(et2_grid) || child._type == 'et2_grid') + { + jQuery(child.getDOMNode(child)).css("display", "inline-table"); + } } });