From d61a9f4a697641b5329f1c01aeccc98778971f5a Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 28 Mar 2012 18:57:37 +0000 Subject: [PATCH] Column alignment for grid --- etemplate/js/et2_widget_grid.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/etemplate/js/et2_widget_grid.js b/etemplate/js/et2_widget_grid.js index feddbe05fc..232adfca22 100644 --- a/etemplate/js/et2_widget_grid.js +++ b/etemplate/js/et2_widget_grid.js @@ -314,6 +314,11 @@ var et2_grid = et2_DOMWidget.extend([et2_IDetachedDOM], { var span = cell.colSpan = this._forceNumber(cell.colSpan); + // Read the align value of the element + if (node.getAttribute("align")) + { + cell.align = node.getAttribute("align"); + } // Create the element var widget = this.createElementFromNode(node, nodeName); @@ -512,6 +517,11 @@ var et2_grid = et2_DOMWidget.extend([et2_IDetachedDOM], { td.width(cell.width); } + if (cell.align) + { + td.attr("align",cell.align); + } + // Add the entry for the widget to the management array this.managementArray.push({ "cell": td[0],