Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Properly align loading indicator when switching folders
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Nov 16, 2018
commit 5e5cced48cc912f3dcd71013483f62dbb56d7362
2 changes: 1 addition & 1 deletion core/css/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
9 changes: 7 additions & 2 deletions core/js/oc-dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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") {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -993,7 +998,7 @@ var OCdialogs = {
self.$filelist.append($row);
});

self.$filelist.removeClass('icon-loading');
self.$filelistContainer.removeClass('icon-loading');
});
},
/**
Expand Down