diff options
author | Yorhel <git@yorhel.nl> | 2009-08-18 09:23:11 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-08-18 09:23:11 +0200 |
commit | 6be3db128ffa7c16ff4967ddf08a8577d9f25eaf (patch) | |
tree | 385184908592f267fe5e44e01f0d99353c18df66 /static | |
parent | e7a73f04525ad18b0bd2be8996431ecaf8eff330 (diff) |
htmlForm(): Don't generate subform id from the title
The subform id is now passed to htmlForm() as first formpart item. This
way the id won't change even if the title does, which will be the case
with the interface translation.
Diffstat (limited to 'static')
-rw-r--r-- | static/f/forms.js | 6 | ||||
-rw-r--r-- | static/f/script.js | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/static/f/forms.js b/static/f/forms.js index ec4b818b..1558358c 100644 --- a/static/f/forms.js +++ b/static/f/forms.js @@ -213,7 +213,7 @@ function relLoad() { // make sure the title is up-to-date x('title').onchange = function() { - l = x('jt_box_relations').getElementsByTagName('td'); + l = x('jt_box_vn_rel').getElementsByTagName('td'); for(i=0;i<l.length;i++) if(l[i].className == 'tc3') l[i].innerHTML = shorten(this.value, 40); @@ -720,7 +720,7 @@ function vnpLoad(type) { vnpCheckEmpty(type); // dropdown - var n = x('jt_box_'+(type == 'vn' ? 'visual_novels' : type)).getElementsByTagName('div')[1]; + var n = x('jt_box_'+(type == 'vn' ? 'rel_vn' : 'rel_prod')).getElementsByTagName('div')[1]; dsInit(n.getElementsByTagName('input')[0], '/xml/'+type+'.xml?q=', function(item, tr) { var td = document.createElement('td'); td.innerHTML = type.substr(0,1)+item.getAttribute('id'); @@ -771,7 +771,7 @@ function vnpStripe(type) { } function vnpFormAdd(type) { - var n = x('jt_box_'+(type == 'vn' ? 'visual_novels' : type)).getElementsByTagName('div')[1]; + var n = x('jt_box_'+(type == 'vn' ? 'rel_vn' : 'rel_prod')).getElementsByTagName('div')[1]; var txt = n.getElementsByTagName('input')[0]; var lnk = n.getElementsByTagName('a')[0]; var input = txt.value; diff --git a/static/f/script.js b/static/f/script.js index c94d781a..41a823b5 100644 --- a/static/f/script.js +++ b/static/f/script.js @@ -607,13 +607,13 @@ DOMLoad(function() { // forms.js if(x('relations')) relLoad(); - if(x('jt_box_screenshots')) + if(x('jt_box_vn_scr')) scrLoad(); if(x('media')) medLoad(); - if(x('jt_box_visual_novels')) + if(x('jt_box_rel_vn')) vnpLoad('vn'); - if(x('jt_box_producers')) + if(x('jt_box_rel_prod')) vnpLoad('producers'); if(x('taglinks')) tglLoad(); |