Permalink
Browse files

fixes #76

  • Loading branch information...
1 parent c7b65a5 commit ea285f657673199fe6216eca10aab8e5d85602e6 @dchusovitin dchusovitin committed with troex Jul 25, 2011
Showing with 7 additions and 7 deletions.
  1. +7 −7 js/ui/uploadButton.js
View
@@ -10,19 +10,19 @@ $.fn.elfinderuploadbutton = function(cmd) {
.unbind('click'),
form = $('<form/>').appendTo(button),
input = $('<input type="file" multiple="true"/>')
- .appendTo(form)
.change(function() {
- var _input;
- if (input.val()) {
- _input = input.clone(true);
- cmd.exec({input : input.remove()[0]});
- input = _input.appendTo(form);
+ var _input = $(this);
+ if (_input.val()) {
+ cmd.exec({input : _input.remove()[0]});
+ input.clone(true).appendTo(form);
}
});
+
+ form.append(input.clone(true));
cmd.change(function() {
form[cmd.disabled() ? 'hide' : 'show']();
})
.change();
});
-}
+}

0 comments on commit ea285f6

Please sign in to comment.