Add text about uploaded files
This commit is contained in:
parent
c49402d266
commit
54e2ac5713
|
@ -197,7 +197,7 @@ thead {
|
|||
|
||||
#public-upload #emptycontent ul {
|
||||
width: 160px;
|
||||
margin: 25px auto;
|
||||
margin: 5px auto;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
errors.push('File is too big');
|
||||
}
|
||||
|
||||
$('#drop-upload-done-indicator').addClass('hidden');
|
||||
$('#drop-upload-progress-indicator').removeClass('hidden');
|
||||
_.each(data['files'], function(file) {
|
||||
if(errors.length === 0) {
|
||||
$('#public-upload ul').append('<li data-toggle="tooltip" title="'+escapeHTML(file.name)+'" data-name="'+escapeHTML(file.name)+'"><span class="icon-loading-small"></span> '+escapeHTML(file.name)+'</li>');
|
||||
|
@ -37,7 +39,6 @@
|
|||
OC.Notification.showTemporary(OC.L10N.translate('files_sharing', 'Could not upload "{filename}"', {filename: file.name}));
|
||||
$('#public-upload ul').append('<li data-toggle="tooltip" title="'+escapeHTML(file.name)+'" data-name="'+escapeHTML(file.name)+'"><img src="'+OC.imagePath('core', 'actions/error.svg')+'"/> '+escapeHTML(file.name)+'</li>');
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -47,6 +48,16 @@
|
|||
$('#public-upload ul li[data-name="' + escapeHTML(response['filename']) + '"]').html('<img src="' + escapeHTML(mimeTypeUrl) + '"/> ' + escapeHTML(response['filename']));
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
}
|
||||
},
|
||||
progressall: function (e, data) {
|
||||
var progress = parseInt(data.loaded / data.total * 100, 10);
|
||||
if(progress === 100) {
|
||||
$('#drop-upload-done-indicator').removeClass('hidden');
|
||||
$('#drop-upload-progress-indicator').addClass('hidden');
|
||||
} else {
|
||||
$('#drop-upload-done-indicator').addClass('hidden');
|
||||
$('#drop-upload-progress-indicator').removeClass('hidden');
|
||||
}
|
||||
}
|
||||
});
|
||||
$('#public-upload .button.icon-upload').click(function(e) {
|
||||
|
|
|
@ -135,7 +135,9 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
|
|||
<p><span class="icon-folder"></span> <?php p($_['filename']) ?></p>
|
||||
<input type="file" name="files[]" class="hidden" multiple>
|
||||
|
||||
<a href="#" class="button icon-upload"><?php p($l->t('Select')) ?></a>
|
||||
<a href="#" class="button icon-upload"><?php p($l->t('Select or drop files')) ?></a>
|
||||
<div id="drop-upload-progress-indicator" style="padding-top: 25px;" class="hidden"><?php p($l->t('Uploading files…')) ?></div>
|
||||
<div id="drop-upload-done-indicator" style="padding-top: 25px;" class="hidden"><?php p($l->t('Uploaded files:')) ?></div>
|
||||
<ul>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue