diff options
author | Yorhel <git@yorhel.nl> | 2015-08-18 17:42:10 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2015-08-18 17:42:26 +0200 |
commit | 221a1110a3d895bd6b3ea0616e637cc17bb8631a (patch) | |
tree | cb94a7efd9aa1d9defb3a31e5a6ad7b99b8ec0f0 | |
parent | 5c9b8d37e72792344266fecf5d6336f3e483f677 (diff) |
vnstaff.js: Export vnsStaffData for use by vncast.js
To fix the cast editor.
-rw-r--r-- | data/js/vnstaff.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/data/js/vnstaff.js b/data/js/vnstaff.js index a4fa012f..e707d7f2 100644 --- a/data/js/vnstaff.js +++ b/data/js/vnstaff.js @@ -1,14 +1,15 @@ // vnsStaffData maps alias id to staff data { NNN: { id: ..., aid: NNN, name: ...} } // used to fill form fields instead of ajax queries in vnsLoad() and vncLoad() -var vnsStaffData = {}; +// Also used by vncast.js +window.vnsStaffData = {}; function vnsLoad() { - vnsStaffData = jsonParse(getText(byId('staffdata')||{})) || {}; + window.vnsStaffData = jsonParse(getText(byId('staffdata')||{})) || {}; var credits = jsonParse(byId('credits').value) || []; for(var i = 0; i < credits.length; i++) { var aid = credits[i].aid; - if(vnsStaffData[aid]) - vnsAdd(vnsStaffData[aid], credits[i].role, credits[i].note); + if(window.vnsStaffData[aid]) + vnsAdd(window.vnsStaffData[aid], credits[i].role, credits[i].note); } vnsEmpty(); |