diff options
author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2013-11-25 15:37:44 +0200 |
---|---|---|
committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2013-11-25 15:37:59 +0200 |
commit | a03cf9336873f63a98d0049996465c26b40405b8 (patch) | |
tree | 02b82bc5f2ce5b68ffe66ac012e31c4b94fcc16d /web/client.js | |
parent | 91fd2ad0f9fb9a0cb4482a6405c4475036c999b3 (diff) | |
download | aconf-a03cf9336873f63a98d0049996465c26b40405b8.tar.bz2 aconf-a03cf9336873f63a98d0049996465c26b40405b8.tar.xz |
convert field choices to objects to allow additional parameters
Diffstat (limited to 'web/client.js')
-rw-r--r-- | web/client.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/web/client.js b/web/client.js index 38c8515..cf7910f 100644 --- a/web/client.js +++ b/web/client.js @@ -585,7 +585,11 @@ $(function() { _.each( meta.choice, function(choice) { - opt(choice[0], choice[1], value == choice[0]); + opt( + choice.value, + choice["ui-value"], + value == choice.value + ); } ); } @@ -1009,7 +1013,7 @@ $(function() { var def = $.Deferred(); txnMgr.query(meta.scope).done(function(data) { meta.choice = _.map(_.values(data.data), function(path) { - return [path, split(path).pop()]; + return {value: path, "ui-value": split(path).pop()}; }); def.resolve(value, meta); }); |