Merge pull request #6719 from tripflex/fix_pubup_progbar
Fix public upload progress bar
This commit is contained in:
commit
cf6e79cda8
|
@ -720,7 +720,7 @@ Files.lazyLoadPreview = function(path, mime, ready, width, height, etag) {
|
|||
console.warn('Files.lazyLoadPreview(): missing etag argument');
|
||||
}
|
||||
|
||||
if ( $('#publicUploadButtonMock').length ) {
|
||||
if ( $('#public_upload').length ) {
|
||||
urlSpec.t = $('#dirToken').val();
|
||||
previewURL = OC.Router.generate('core_ajax_public_preview', urlSpec);
|
||||
} else {
|
||||
|
|
|
@ -141,10 +141,13 @@ thead{
|
|||
.directLink {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.directLink label {
|
||||
font-weight: normal;
|
||||
}
|
||||
.directLink input {
|
||||
margin-left: 10px;
|
||||
width: 300px;
|
||||
}
|
||||
.directLink label {
|
||||
font-weight: normal;
|
||||
}
|
||||
.directLink input {
|
||||
margin-left: 10px;
|
||||
width: 300px;
|
||||
}
|
||||
.public_actions {
|
||||
padding: 4px;
|
||||
}
|
||||
|
|
|
@ -59,7 +59,8 @@ $(document).ready(function() {
|
|||
});
|
||||
|
||||
// Add Uploadprogress Wrapper to controls bar
|
||||
$('#controls').append($('#additional_controls div#uploadprogresswrapper'));
|
||||
$('#controls').append($('#controls .actions div#uploadprogresswrapper'));
|
||||
$('#uploadprogresswrapper').addClass('public_actions');
|
||||
|
||||
// Cancel upload trigger
|
||||
$('#cancel_upload_button').click(function() {
|
||||
|
|
|
@ -24,9 +24,10 @@
|
|||
|
||||
|
||||
<?php if (!isset($_['folder']) || $_['allowZipDownload']): ?>
|
||||
<a href="<?php p($_['downloadURL']); ?>" class="button" id="download"><img
|
||||
class="svg" alt="Download" src="<?php print_unescaped(OCP\image_path("core", "actions/download.svg")); ?>"
|
||||
/><span><?php p($l->t('Download'))?></span></a>
|
||||
<a href="<?php p($_['downloadURL']); ?>" class="button" id="download">
|
||||
<img class="svg" alt="Download" src="<?php print_unescaped(OCP\image_path("core", "actions/download.svg")); ?>" />
|
||||
<span><?php p($l->t('Download'))?></span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($_['allowPublicUploadEnabled']):?>
|
||||
|
@ -43,28 +44,17 @@
|
|||
<?php endif;?>
|
||||
|
||||
|
||||
<div id="data-upload-form" class="button" title="<?php p($l->t('Upload') . ' max. '.$_['uploadMaxHumanFilesize']) ?>">
|
||||
<div id="data-upload-form" title="<?php p($l->t('Upload') . ' max. '.$_['uploadMaxHumanFilesize']) ?>">
|
||||
<input id="file_upload_start" type="file" name="files[]" data-url="<?php print_unescaped(OCP\Util::linkTo('files', 'ajax/upload.php')); ?>" multiple>
|
||||
<a href="#" id="publicUploadButtonMock" class="svg">
|
||||
<a href="#" id="public_upload" class="button">
|
||||
<img class="svg" alt="Upload" src="<?php print_unescaped(OCP\image_path("core", "actions/upload.svg")); ?>" />
|
||||
<span><?php p($l->t('Upload'))?></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="additional_controls" style="display:none">
|
||||
<div id="uploadprogresswrapper">
|
||||
<div id="uploadprogressbar"></div>
|
||||
<input id="cancel_upload_button" type="button" class="stop" style="display:none"
|
||||
value="<?php p($l->t('Cancel upload'));?>"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div></header>
|
||||
<div id="content">
|
||||
|
|
Loading…
Reference in New Issue