Skip to content

Commit 2c72e44

Browse files
authored
Merge pull request #13355 from nextcloud/backport/13286/stable15
[stable15] Re add the uploaded file list to file drops
2 parents 1392a3f + 03ca330 commit 2c72e44

5 files changed

Lines changed: 8 additions & 6 deletions

File tree

apps/files_sharing/css/public.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,9 @@ thead {
145145
}
146146

147147
#public-upload #emptycontent li img {
148-
vertical-align: text-bottom;
149148
margin-right: 5px;
149+
position: relative;
150+
top: 2px;
150151
}
151152

152153
#public-upload li span.icon-loading-small {

apps/files_sharing/js/files_drop.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@
6161
$('#drop-upload-done-indicator').addClass('hidden');
6262
$('#drop-upload-progress-indicator').removeClass('hidden');
6363

64-
$('#public-upload ul').append(output({isUploading: true, name: data.files[0].name}));
64+
$('#drop-uploaded-files').append(output({isUploading: true, name: data.files[0].name}));
6565
$('[data-toggle="tooltip"]').tooltip();
6666
data.submit();
6767

6868
return true;
6969
},
7070

7171
updateFileItem: function (fileName, fileItem) {
72-
$('#public-upload ul li[data-name="' + fileName + '"]').replaceWith(fileItem);
72+
$('#drop-uploaded-files li[data-name="' + fileName + '"]').replaceWith(fileItem);
7373
$('[data-toggle="tooltip"]').tooltip();
7474
},
7575

apps/files_sharing/js/templates.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
templates['files_drop'] = template({"1":function(container,depth0,helpers,partials,data) {
44
var helper;
55

6-
return "\n <span class=\"icon-loading-small\"></span> "
6+
return " <span class=\"icon-loading-small\"></span> "
77
+ 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)))
88
+ "\n";
99
},"3":function(container,depth0,helpers,partials,data) {
@@ -21,7 +21,7 @@ templates['files_drop'] = template({"1":function(container,depth0,helpers,partia
2121
+ 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)))
2222
+ "\" data-name=\""
2323
+ 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)))
24-
+ "\">\n '"
24+
+ "\">\n"
2525
+ ((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 : "")
2626
+ "</li>\n";
2727
},"useData":true});

apps/files_sharing/js/templates/files_drop.handlebars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<li data-toggle="tooltip" title="{{name}}" data-name="{{name}}">
2-
'{{#if isUploading}}
2+
{{#if isUploading}}
33
<span class="icon-loading-small"></span> {{name}}
44
{{else}}
55
<img src="{{iconSrc}}"/> {{name}}

apps/files_sharing/templates/public.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ class="<?php if (!empty($_['note'])) { ?>has-note<?php } ?>">
100100
<a href="#" class="button icon-upload"><?php p($l->t('Select or drop files')) ?></a>
101101
<div id="drop-upload-progress-indicator" style="padding-top: 25px;" class="hidden"><?php p($l->t('Uploading files…')) ?></div>
102102
<div id="drop-upload-done-indicator" style="padding-top: 25px;" class="hidden"><?php p($l->t('Uploaded files:')) ?></div>
103+
<ul id="drop-uploaded-files"></ul>
103104

104105
<?php if (!empty($_['disclaimer'])) { ?>
105106
<div>

0 commit comments

Comments
 (0)