summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2013-11-14 08:51:42 +0200
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2013-11-14 10:31:59 +0200
commit8e9a0ca00b7437402f80d10290c972fa1c07446a (patch)
tree54c2e0d239b760b05ed7eab57514d5ffe19aec47 /web
parentbaca93fa10b7c9f7f59b87a737e150038fa90b07 (diff)
downloadaconf-8e9a0ca00b7437402f80d10290c972fa1c07446a.tar.bz2
aconf-8e9a0ca00b7437402f80d10290c972fa1c07446a.tar.xz
combine choice and ui_choice properties of fields
Diffstat (limited to 'web')
-rw-r--r--web/client.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/web/client.js b/web/client.js
index c8ce06e..3ed4fe2 100644
--- a/web/client.js
+++ b/web/client.js
@@ -575,7 +575,7 @@ $(function() {
opt("", "(none)", value == null)
_.each(
- _.zip(meta.choice, meta["ui-choice"]),
+ meta.choice,
function(choice) {
opt(choice[0], choice[1], value == choice[0]);
}
@@ -990,9 +990,8 @@ $(function() {
Reference.requestData = function(value, meta) {
var def = $.Deferred();
txnMgr.query(meta.scope).done(function(data) {
- meta.choice = _.values(data.data);
- meta["ui-choice"] = _.map(meta.choice, function(path) {
- return split(path).pop();
+ meta.choice = _.map(_.values(data.data), function(path) {
+ return [path, split(path).pop()];
});
def.resolve(value, meta);
});