diff options
author | Lukas Reschke <lukas@owncloud.com> | 2016-06-10 14:47:40 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2016-06-10 14:47:40 +0200 |
commit | 54e2ac57130666add0ad5d3c583c6f29527b4ebc (patch) | |
tree | 5c284d00ebd7daed6584dcc4922211223cd6d274 /apps/files_sharing/js | |
parent | c49402d26640df2adfdf3201cfc9c4c1456b7a66 (diff) | |
download | nextcloud-server-54e2ac57130666add0ad5d3c583c6f29527b4ebc.tar.gz nextcloud-server-54e2ac57130666add0ad5d3c583c6f29527b4ebc.zip |
Add text about uploaded files
Diffstat (limited to 'apps/files_sharing/js')
-rw-r--r-- | apps/files_sharing/js/files_drop.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/files_sharing/js/files_drop.js b/apps/files_sharing/js/files_drop.js index c9dafb0564f..0a6a1c7567f 100644 --- a/apps/files_sharing/js/files_drop.js +++ b/apps/files_sharing/js/files_drop.js @@ -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) { |