- Patch #41385 by Thox: made the upload.module work again.

4.7.x
Dries Buytaert 2005-12-16 12:50:38 +00:00
parent 77130e7ab2
commit f7042c955c
1 changed files with 2 additions and 1 deletions

View File

@ -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);