diff options
author | Dawid Opis <ncore@ncore.com.pl> | 2011-08-11 22:22:32 +0200 |
---|---|---|
committer | Dawid Opis <ncore@ncore.com.pl> | 2011-08-11 22:22:32 +0200 |
commit | 9683d44633cd24696573a0c3ca193a3b5d06f1b7 (patch) | |
tree | 5df4729a1a2a270568540dfda6b35882c52307d9 /files | |
parent | 8aac43c12b409ebfa53ca74aea1f2091cba348ea (diff) | |
download | nextcloud-server-9683d44633cd24696573a0c3ca193a3b5d06f1b7.tar.gz nextcloud-server-9683d44633cd24696573a0c3ca193a3b5d06f1b7.zip |
fixed upload button
Diffstat (limited to 'files')
-rw-r--r-- | files/css/files.css | 1 | ||||
-rw-r--r-- | files/js/files.js | 6 | ||||
-rw-r--r-- | files/templates/index.php | 3 |
3 files changed, 9 insertions, 1 deletions
diff --git a/files/css/files.css b/files/css/files.css index d24de2b3270..2e96e113f1f 100644 --- a/files/css/files.css +++ b/files/css/files.css @@ -11,6 +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_newfolder_name { background-image:url('../../core/img/places/folder.svg'); font-weight:bold; width:8em; } .file_upload_start, .file_upload_filename { font-size:1em; } diff --git a/files/js/files.js b/files/js/files.js index 519d48a523d..6af021c35bc 100644 --- a/files/js/files.js +++ b/files/js/files.js @@ -12,6 +12,12 @@ $(document).ready(function() { $('#plugins>ul>li:first-child').data('dir',''); $('#plugins>ul>li:first-child').droppable(crumbDropOptions); + // Triggers invisible file input + $('#file_upload_button_wrapper').bind('click', function() { + $('#file_upload_start').trigger('click'); + return false; + }); + // Sets the file-action buttons behaviour : $('tr').live('mouseenter',function(event) { FileActions.display($(this).children('td.filename')); diff --git a/files/templates/index.php b/files/templates/index.php index 3951787a25d..4d0212896a0 100644 --- a/files/templates/index.php +++ b/files/templates/index.php @@ -7,7 +7,8 @@ <input type="hidden" name="dir" value="<?php echo $_['dir'] ?>" id="dir"> <div class="file_upload_wrapper"> <input type="submit" class="file_upload_filename" value="<?php echo $l->t('Upload');?> (max. <?php echo $_['uploadMaxHumanFilesize'];?>)"/> - <input class="file_upload_start" type="file" name='files[]'/> + <input id="file_upload_start" class="file_upload_start" type="file" name='files[]'/> + <a href="#" id="file_upload_button_wrapper" onclick="return false;"></a> </div> <iframe name="file_upload_target_1" class='file_upload_target' src=""></iframe> </form> |