diff options
author | Morris Jobke <hey@morrisjobke.de> | 2019-01-04 14:45:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-04 14:45:20 +0100 |
commit | 2c72e4440098f5a61553d60cf2c3cdd52481920c (patch) | |
tree | d02cc641b3ddd55c1f696e17ec53dbe18f2258db | |
parent | 1392a3ff9550148e07e17737b2ee8c62b6799f17 (diff) | |
parent | 03ca3303e471322ecbccbac6c276947a942b7daa (diff) | |
download | nextcloud-server-2c72e4440098f5a61553d60cf2c3cdd52481920c.tar.gz nextcloud-server-2c72e4440098f5a61553d60cf2c3cdd52481920c.zip |
Merge pull request #13355 from nextcloud/backport/13286/stable15
[stable15] Re add the uploaded file list to file drops
-rw-r--r-- | apps/files_sharing/css/public.scss | 3 | ||||
-rw-r--r-- | apps/files_sharing/js/files_drop.js | 4 | ||||
-rw-r--r-- | apps/files_sharing/js/templates.js | 4 | ||||
-rw-r--r-- | apps/files_sharing/js/templates/files_drop.handlebars | 2 | ||||
-rw-r--r-- | apps/files_sharing/templates/public.php | 1 |
5 files changed, 8 insertions, 6 deletions
diff --git a/apps/files_sharing/css/public.scss b/apps/files_sharing/css/public.scss index 9d752115c59..83cba309da7 100644 --- a/apps/files_sharing/css/public.scss +++ b/apps/files_sharing/css/public.scss @@ -145,8 +145,9 @@ thead { } #public-upload #emptycontent li img { - vertical-align: text-bottom; margin-right: 5px; + position: relative; + top: 2px; } #public-upload li span.icon-loading-small { diff --git a/apps/files_sharing/js/files_drop.js b/apps/files_sharing/js/files_drop.js index 69465f791df..340f941a718 100644 --- a/apps/files_sharing/js/files_drop.js +++ b/apps/files_sharing/js/files_drop.js @@ -61,7 +61,7 @@ $('#drop-upload-done-indicator').addClass('hidden'); $('#drop-upload-progress-indicator').removeClass('hidden'); - $('#public-upload ul').append(output({isUploading: true, name: data.files[0].name})); + $('#drop-uploaded-files').append(output({isUploading: true, name: data.files[0].name})); $('[data-toggle="tooltip"]').tooltip(); data.submit(); @@ -69,7 +69,7 @@ }, updateFileItem: function (fileName, fileItem) { - $('#public-upload ul li[data-name="' + fileName + '"]').replaceWith(fileItem); + $('#drop-uploaded-files li[data-name="' + fileName + '"]').replaceWith(fileItem); $('[data-toggle="tooltip"]').tooltip(); }, diff --git a/apps/files_sharing/js/templates.js b/apps/files_sharing/js/templates.js index ce7409b4652..d10cade4920 100644 --- a/apps/files_sharing/js/templates.js +++ b/apps/files_sharing/js/templates.js @@ -3,7 +3,7 @@ templates['files_drop'] = template({"1":function(container,depth0,helpers,partials,data) { var helper; - return "\n <span class=\"icon-loading-small\"></span> " + return " <span class=\"icon-loading-small\"></span> " + container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"name","hash":{},"data":data}) : helper))) + "\n"; },"3":function(container,depth0,helpers,partials,data) { @@ -21,7 +21,7 @@ templates['files_drop'] = template({"1":function(container,depth0,helpers,partia + alias4(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"name","hash":{},"data":data}) : helper))) + "\" data-name=\"" + alias4(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"name","hash":{},"data":data}) : helper))) - + "\">\n '" + + "\">\n" + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isUploading : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") + "</li>\n"; },"useData":true}); diff --git a/apps/files_sharing/js/templates/files_drop.handlebars b/apps/files_sharing/js/templates/files_drop.handlebars index 4dea497f8de..b090e829793 100644 --- a/apps/files_sharing/js/templates/files_drop.handlebars +++ b/apps/files_sharing/js/templates/files_drop.handlebars @@ -1,5 +1,5 @@ <li data-toggle="tooltip" title="{{name}}" data-name="{{name}}"> - '{{#if isUploading}} + {{#if isUploading}} <span class="icon-loading-small"></span> {{name}} {{else}} <img src="{{iconSrc}}"/> {{name}} diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php index 8c91ff261e4..eccdc49bc31 100644 --- a/apps/files_sharing/templates/public.php +++ b/apps/files_sharing/templates/public.php @@ -100,6 +100,7 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size); <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 id="drop-uploaded-files"></ul> <?php if (!empty($_['disclaimer'])) { ?> <div> |