Commit 0e78415c authored by Jan-Christoph Borchardt's avatar Jan-Christoph Borchardt
Browse files

fix accessibility of file upload

parent 2e623545
......@@ -9,7 +9,7 @@
overflow: hidden;
vertical-align: top;
}
#upload a {
#upload .icon-upload {
position: relative;
display: block;
width: 100%;
......
......@@ -187,7 +187,7 @@ OC.Upload = {
},
_hideProgressBar: function() {
$('#uploadprogresswrapper input.stop').fadeOut();
$('#uploadprogresswrapper .stop').fadeOut();
$('#uploadprogressbar').fadeOut(function() {
$('#file_upload_start').trigger(new $.Event('resized'));
});
......@@ -469,13 +469,13 @@ OC.Upload = {
OC.Upload.log('progress handle fileuploadadd', e, data);
//show cancel button
//if (data.dataType !== 'iframe') { //FIXME when is iframe used? only for ie?
// $('#uploadprogresswrapper input.stop').show();
// $('#uploadprogresswrapper .stop').show();
//}
});
// add progress handlers
fileupload.on('fileuploadstart', function(e, data) {
OC.Upload.log('progress handle fileuploadstart', e, data);
$('#uploadprogresswrapper input.stop').show();
$('#uploadprogresswrapper .stop').show();
$('#uploadprogressbar').progressbar({value: 0});
OC.Upload._showProgressBar();
});
......
......@@ -34,13 +34,17 @@
value="(max <?php isset($_['uploadMaxHumanFilesize']) ? p($_['uploadMaxHumanFilesize']) : ''; ?>)">
<input type="file" id="file_upload_start" name='files[]'
data-url="<?php print_unescaped(OCP\Util::linkTo('files', 'ajax/upload.php')); ?>" />
<a href="#" class="svg icon-upload"></a>
<label for="file_upload_start" class="svg icon-upload">
<span class="hidden-visually"><?php p($l->t('Upload'))?></span>
</label>
</div>
<div id="uploadprogresswrapper">
<div id="uploadprogressbar"></div>
<input type="button" class="stop icon-close"
style="display:none" value=""
alt="<?php p($l->t('Cancel upload'))?>" />
<button class="stop icon-close" style="display:none">
<span class="hidden-visually">
<?php p($l->t('Cancel upload'))?>
</span>
</button>
</div>
</div>
<div id="file_action_panel"></div>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment