From d14ef576c3bd1df3bb29033bdaf85ed0053d889d Mon Sep 17 00:00:00 2001 From: Adam Young Date: Thu, 10 Feb 2011 16:48:17 -0500 Subject: column formatting Allow optional formatting for columns Provide Data formate for host modificaiton date format --- install/ui/widget.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'install/ui/widget.js') diff --git a/install/ui/widget.js b/install/ui/widget.js index 1bff1579..78a59468 100644 --- a/install/ui/widget.js +++ b/install/ui/widget.js @@ -1005,6 +1005,9 @@ IPA.column = function (spec) { var that = {}; + if (spec.format){ + that.format = spec.format; + } that.name = spec.name; that.label = spec.label; that.primary_key = spec.primary_key; @@ -1025,8 +1028,13 @@ IPA.column = function (spec) { container.empty(); var value = record[that.name]; + if (that.format && value){ + value = that.format(value); + } + value = value ? value.toString() : ''; + container.append(value); } -- cgit