summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2016-07-02 14:40:31 +0200
committerYorhel <git@yorhel.nl>2016-07-02 14:40:31 +0200
commitd393bac3b28716ab6d5cb0b159e149ebf9920f51 (patch)
treec9c43694a7b7688187f70b7f50462ebae40904b6 /data
parentfcbc0f50793beaeeb6dc61ddf109d98606ada8e8 (diff)
JS: Use alias ID in dropdown search to fix selection
Diffstat (limited to 'data')
-rw-r--r--data/js/vncast.js4
-rw-r--r--data/js/vnstaff.js4
2 files changed, 4 insertions, 4 deletions
diff --git a/data/js/vncast.js b/data/js/vncast.js
index 5b74e209..6e499638 100644
--- a/data/js/vncast.js
+++ b/data/js/vncast.js
@@ -32,7 +32,7 @@ function vncLoad() {
// dropdown search
dsInit(byId('cast_input'), '/xml/staff.xml?q=', function(item, tr) {
- tr.appendChild(tag('td', { style: 'text-align: right; padding-right: 5px'}, 's'+item.getAttribute('id')));
+ tr.appendChild(tag('td', { style: 'text-align: right; padding-right: 5px'}, 's'+item.getAttribute('sid')));
tr.appendChild(tag('td', item.firstChild.nodeValue));
}, vncFormAdd);
}
@@ -84,7 +84,7 @@ function vncAdd(seiyuu, chr, note) {
function vncFormAdd(item) {
var chr = byId('cast_chars').value;
if (chr) {
- var s = { id:item.getAttribute('id'), aid:item.getAttribute('aid'), name:item.firstChild.nodeValue };
+ var s = { id:item.getAttribute('sid'), aid:item.getAttribute('id'), name:item.firstChild.nodeValue };
vncAdd(s, chr, '');
} else
alert('Select character first please.');
diff --git a/data/js/vnstaff.js b/data/js/vnstaff.js
index e4a3b284..0bb97187 100644
--- a/data/js/vnstaff.js
+++ b/data/js/vnstaff.js
@@ -17,7 +17,7 @@ function vnsLoad() {
// dropdown search
dsInit(byId('credit_input'), '/xml/staff.xml?q=', function(item, tr) {
- tr.appendChild(tag('td', { style: 'text-align: right; padding-right: 5px'}, 's'+item.getAttribute('id')));
+ tr.appendChild(tag('td', { style: 'text-align: right; padding-right: 5px'}, 's'+item.getAttribute('sid')));
tr.appendChild(tag('td', item.firstChild.nodeValue));
}, vnsFormAdd);
}
@@ -94,7 +94,7 @@ function vnsDel() {
}
function vnsFormAdd(item) {
- var s = { id:item.getAttribute('id'), aid:item.getAttribute('aid'), name:item.firstChild.nodeValue };
+ var s = { id:item.getAttribute('sid'), aid:item.getAttribute('id'), name:item.firstChild.nodeValue };
vnsAdd(s, 'staff', '');
return '';
}