]> source.dussan.org Git - nextcloud-server.git/commitdiff
Properly align loading indicator when switching folders 12350/head
authorJulius Härtl <jus@bitgrid.net>
Fri, 16 Nov 2018 13:50:40 +0000 (14:50 +0100)
committerJulius Härtl <jus@bitgrid.net>
Fri, 16 Nov 2018 13:50:40 +0000 (14:50 +0100)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
core/css/styles.scss
core/js/oc-dialogs.js

index 62d2bb45c96601ab2b60300d91eec2ea14e837b1..da270893e663c2a73c8f44083f51fd41d53769e6 100644 (file)
@@ -778,7 +778,7 @@ code {
                                border-bottom: 1px solid var(--color-border);
                                background-color: var(--color-main-background);
                                th {
-                                       width: auto;
+                                       width: 80%;
                                        border: none;
                                }
                        }
index 49bf626ed8225d19360ab922ae76e1ca66a89b4f..3169dab4b88aee86ca50db65b7e68b9c03572be1 100644 (file)
@@ -257,6 +257,7 @@ var OCdialogs = {
                        self.$filePicker.ready(function() {
                                self.$fileListHeader = self.$filePicker.find('.filelist thead tr');
                                self.$filelist = self.$filePicker.find('.filelist tbody');
+                               self.$filelistContainer = self.$filePicker.find('.filelist-container');
                                self.$dirTree = self.$filePicker.find('.dirtree');
                                self.$dirTree.on('click', 'div:not(:last-child)', self, function (event) {
                                        self._handleTreeListSelect(event, type);
@@ -896,7 +897,9 @@ var OCdialogs = {
        */
        _fillFilePicker:function(dir) {
                var self = this;
-               this.$filelist.empty().addClass('icon-loading');
+               this.$filelist.empty();
+               this.$filePicker.find('.emptycontent').hide();
+               this.$filelistContainer.addClass('icon-loading');
                this.$filePicker.data('path', dir);
                var filter = this.$filePicker.data('mimetype');
                if (typeof(filter) === "string") {
@@ -952,8 +955,10 @@ var OCdialogs = {
 
                        if (files.length === 0) {
                                self.$filePicker.find('.emptycontent').show();
+                               self.$fileListHeader.hide();
                        } else {
                                self.$filePicker.find('.emptycontent').hide();
+                               self.$fileListHeader.show();
                        }
 
                        $.each(files, function(idx, entry) {
@@ -993,7 +998,7 @@ var OCdialogs = {
                                self.$filelist.append($row);
                        });
 
-                       self.$filelist.removeClass('icon-loading');
+                       self.$filelistContainer.removeClass('icon-loading');
                });
        },
        /**