From d654564f6b8a67ccbee58cd1d4efa5808b612ad2 Mon Sep 17 00:00:00 2001 From: Benjamin Gamard Date: Fri, 3 May 2019 15:09:43 +0200 Subject: [PATCH] Closes #318: Sort file list on drag & drop before sending to server --- .../src/app/docs/controller/document/DocumentViewContent.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs-web/src/main/webapp/src/app/docs/controller/document/DocumentViewContent.js b/docs-web/src/main/webapp/src/app/docs/controller/document/DocumentViewContent.js index c943e3ad..f410c64c 100644 --- a/docs-web/src/main/webapp/src/app/docs/controller/document/DocumentViewContent.js +++ b/docs-web/src/main/webapp/src/app/docs/controller/document/DocumentViewContent.js @@ -111,6 +111,9 @@ angular.module('docs').controller('DocumentViewContent', function ($scope, $root } if (files && files.length) { + // Sort by filename + files = _.sortBy(files, 'name'); + // Adding files to the UI var newfiles = []; _.each(files, function (file) {