diff options
author | Yorhel <git@yorhel.nl> | 2010-10-11 19:32:27 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2010-10-11 19:32:27 +0200 |
commit | d82cfbc2fc04c230ec12a97bf83ac6a30567214e (patch) | |
tree | be7e130ee961e63848864797656d2342fce7ec25 | |
parent | e631b3f3b955fa35f8ce0f2b28a6dc446d763163 (diff) |
Properly open correct promptPass box when one is already open.
-rw-r--r-- | script.js | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -68,9 +68,13 @@ function showall() { function promptPass(t,u,s,b) { var close = function () { byId('pp').parentNode.removeChild(byId('pp')); return false; }; - if(byId('pp')) - return close(); - addBody(tag('div', { id: 'pp' }, tag('form', { method: 'post', action: u }, + if(byId('pp')) { + if(byId('pp').pp_u == u) + return close(); + else + close(); + } + addBody(tag('div', { id: 'pp', pp_u: u }, tag('form', { method: 'post', action: u }, t, tag('br', null), tag('input', { type: 'password', name: 'pc', id: 'pc', value: getCookie('secret_passcode') || '' }), tag('br', null), s ? tag('input', { type: 'checkbox', name: 'psp', id: 'psp', value: 1 }) : '', |