Skip to content
Snippets Groups Projects
Commit 9ba303a9 authored by Robin Appelman's avatar Robin Appelman
Browse files

fix uploading multiple files

parent 6c4d075b
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@
#fileSelector, #file_upload_submit, #file_newfolder_submit { display:none; }
.file_upload_wrapper, #file_newfolder_name { background-repeat:no-repeat; background-position:.5em .3em; padding-left:2em; }
.file_upload_wrapper { font-weight:bold; display:-moz-inline-box; /* fallback for older firefox versions*/ display:inline-block; padding-left:0; overflow:hidden; position:relative; margin-right:1.5em;}
.file_upload_wrapper #file_upload_button_wrapper { position:absolute; top:0; left:0; width:100%; height:100%; cursor:pointer; z-index:1000; }
.file_upload_wrapper .file_upload_button_wrapper { position:absolute; top:0; left:0; width:100%; height:100%; cursor:pointer; z-index:1000; }
#file_newfolder_name { background-image:url('../../core/img/places/folder.svg'); font-weight:bold; width:8em; }
.file_upload_start, .file_upload_filename { font-size:1em; }
......
......@@ -13,8 +13,8 @@ $(document).ready(function() {
$('#plugins>ul>li:first-child').droppable(crumbDropOptions);
// Triggers invisible file input
$('#file_upload_button_wrapper').bind('click', function() {
$('#file_upload_start').trigger('click');
$('.file_upload_button_wrapper').live('click', function() {
$(this).parent().children('.file_upload_start').trigger('click');
return false;
});
......
......@@ -7,8 +7,8 @@
<input type="hidden" name="dir" value="<?php echo $_['dir'] ?>" id="dir">
<div class="file_upload_wrapper" class="svg">
<input type="submit" class="file_upload_filename" value="<?php echo $l->t('Upload'); ?>"/>
<input id="file_upload_start" class="file_upload_start" type="file" name='files[]'/>
<a href="#" id="file_upload_button_wrapper" onclick="return false;" title="<?php echo 'max. '.$_['uploadMaxHumanFilesize'] ?>"></a>
<input class="file_upload_start" class="file_upload_start" type="file" name='files[]'/>
<a href="#" class="file_upload_button_wrapper" onclick="return false;" title="<?php echo 'max. '.$_['uploadMaxHumanFilesize'] ?>"></a>
</div>
<iframe name="file_upload_target_1" class='file_upload_target' src=""></iframe>
</form>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment