summaryrefslogtreecommitdiff
path: root/data/js
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-09-11 17:05:27 +0200
committerYorhel <git@yorhel.nl>2019-09-11 17:05:44 +0200
commit04e92a4ef886c141783efcb1c62de12722511cc4 (patch)
tree71e1cce07de6bb8760d62a7d197a6b34cab15e67 /data/js
parent82ade4157f86891c3d90336155a942976e1df934 (diff)
VNDB::Types: Convert (wishlist|rlist|vnlist)_status
I did create a function to export arrays, but ended up exporting them as hashes. That ought to simplify a conversion to an enum type. Which will likely never happen because I'd rather switch to dynamic user-defined statuses, but that's quite a step further...
Diffstat (limited to 'data/js')
-rw-r--r--data/js/vnreldropdown.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/data/js/vnreldropdown.js b/data/js/vnreldropdown.js
index 3b8cdf04..16a1dbcd 100644
--- a/data/js/vnreldropdown.js
+++ b/data/js/vnreldropdown.js
@@ -7,9 +7,9 @@ function dropdown(lnk) {
var o = tag('ul', null);
for(var i=0; i<VARS.rlist_status.length; i++) {
var val = VARS.rlist_status[i];
- o.appendChild(tag('li', st == val
- ? tag('i', val)
- : tag('a', {href:'#', rl_rid:relid, rl_act:i, onclick:change}, val)));
+ o.appendChild(tag('li', st == val[1]
+ ? tag('i', val[1])
+ : tag('a', {href:'#', rl_rid:relid, rl_act:val[0], onclick:change}, val[1])));
}
if(st != '--')
o.appendChild(tag('li', tag('a', {href:'#', rl_rid:relid, rl_act:-1, onclick:change}, 'Remove from list')));
@@ -24,7 +24,7 @@ function change() {
ddHide();
setContent(lnk, tag('b', {'class': 'grayedout'}, 'Loading...'));
ajax('/xml/rlist.xml?formcode='+code+';id='+this.rl_rid+';e='+act, function(hr) {
- setText(lnk, act == -1 ? '--' : VARS.rlist_status[act]);
+ setText(lnk, act == -1 ? '--' : VARS.rlist_status[act][1]);
});
return false;
}