Updated Branches: refs/heads/master 9c9724d47 -> f03001d27
Extended UI fields to allow for specifying the identifying json field. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f03001d2 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f03001d2 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f03001d2 Branch: refs/heads/master Commit: f03001d271b15de5104a85c2cf16f6714db6b11a Parents: 9c9724d Author: Chris Suich <[email protected]> Authored: Wed Jul 31 13:52:00 2013 -0400 Committer: Brian Federle <[email protected]> Committed: Wed Aug 14 10:29:23 2013 -0700 ---------------------------------------------------------------------- ui/scripts/ui/dialog.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f03001d2/ui/scripts/ui/dialog.js ---------------------------------------------------------------------- diff --git a/ui/scripts/ui/dialog.js b/ui/scripts/ui/dialog.js index cee7873..edb5cea 100644 --- a/ui/scripts/ui/dialog.js +++ b/ui/scripts/ui/dialog.js @@ -249,7 +249,11 @@ response: { success: function(args) { $(args.data).each(function() { - var id = this.id !== undefined ? this.id : this.name; + var id; + if (field.valueField) + id = this[field.valueField]; + else + id = this.id !== undefined ? this.id : this.name; var description = this.description; if (args.descriptionField)
