From 92d30c8005e852761f6c787eb5eed7dda2cf3866 Mon Sep 17 00:00:00 2001 From: Michael Weimann Date: Sat, 29 Dec 2018 11:53:10 +0100 Subject: [PATCH 1/4] Add the file drop uploaded files element Signed-off-by: Michael Weimann --- apps/files_sharing/js/files_drop.js | 4 ++-- apps/files_sharing/templates/public.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/files_sharing/js/files_drop.js b/apps/files_sharing/js/files_drop.js index 69465f791dfa2..340f941a71803 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/templates/public.php b/apps/files_sharing/templates/public.php index 8c91ff261e469..eccdc49bc3186 100644 --- a/apps/files_sharing/templates/public.php +++ b/apps/files_sharing/templates/public.php @@ -100,6 +100,7 @@ class="has-note"> t('Select or drop files')) ?> +
From ac28decd8c328e42cd52fbe391a333535b7de98f Mon Sep 17 00:00:00 2001 From: Michael Weimann Date: Sat, 29 Dec 2018 11:53:31 +0100 Subject: [PATCH 2/4] Removes lost single quote Signed-off-by: Michael Weimann --- apps/files_sharing/js/templates.js | 2 +- apps/files_sharing/js/templates/files_drop.handlebars | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files_sharing/js/templates.js b/apps/files_sharing/js/templates.js index ce7409b4652ab..e9047b9a66538 100644 --- a/apps/files_sharing/js/templates.js +++ b/apps/files_sharing/js/templates.js @@ -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 : "") + "\n"; },"useData":true}); diff --git a/apps/files_sharing/js/templates/files_drop.handlebars b/apps/files_sharing/js/templates/files_drop.handlebars index 4dea497f8dee6..b090e829793e3 100644 --- a/apps/files_sharing/js/templates/files_drop.handlebars +++ b/apps/files_sharing/js/templates/files_drop.handlebars @@ -1,5 +1,5 @@
  • - '{{#if isUploading}} + {{#if isUploading}} {{name}} {{else}} {{name}} From 7549bd2b89921077667bfd2fcffc148d776e05f3 Mon Sep 17 00:00:00 2001 From: Michael Weimann Date: Sat, 29 Dec 2018 11:53:51 +0100 Subject: [PATCH 3/4] Tweak the uploaded files icon position Signed-off-by: Michael Weimann --- apps/files_sharing/css/public.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/files_sharing/css/public.scss b/apps/files_sharing/css/public.scss index 9d752115c5904..83cba309da757 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 { From 03ca3303e471322ecbccbac6c276947a942b7daa Mon Sep 17 00:00:00 2001 From: Michael Weimann Date: Sat, 29 Dec 2018 14:07:57 +0100 Subject: [PATCH 4/4] Add compiled template Signed-off-by: Michael Weimann --- apps/files_sharing/js/templates.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_sharing/js/templates.js b/apps/files_sharing/js/templates.js index e9047b9a66538..d10cade492062 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 " + return " " + 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) {