diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-12-16 12:50:38 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-12-16 12:50:38 +0000 |
commit | f7042c955c6b2945e15e3952d6df3d5bdd2b82b8 (patch) | |
tree | bbc0c055a9eea05335e8965bf1de7b537aa6eccc /misc | |
parent | 77130e7ab25a509595040199e6e10be0a8924c2e (diff) | |
download | brdo-f7042c955c6b2945e15e3952d6df3d5bdd2b82b8.tar.gz brdo-f7042c955c6b2945e15e3952d6df3d5bdd2b82b8.tar.bz2 |
- Patch #41385 by Thox: made the upload.module work again.
Diffstat (limited to 'misc')
-rw-r--r-- | misc/upload.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/misc/upload.js b/misc/upload.js index b4d2a9b6d..89f7cfb69 100644 --- a/misc/upload.js +++ b/misc/upload.js @@ -12,7 +12,8 @@ function uploadAutoAttach() { for (i = 0; input = inputs[i]; i++) { if (input && hasClass(input, 'upload')) { var uri = input.value; - var button = input.id.substr(5); + // Extract the button ID based on a subtring of the input name: edit[foo][bar] -> foo-bar + var button = input.name.substr(5, input.name.length - 6).replace('][', '-'); var wrapper = button + '-wrapper'; var hide = button + '-hide'; var upload = new jsUpload(uri, button, wrapper, hide); |