fix filepicker loading spinner

This commit is contained in:
Christoph Wurst 2015-10-19 23:43:12 +02:00
parent 2895c91291
commit 9778094a25
2 changed files with 4 additions and 4 deletions

View file

@ -1025,7 +1025,7 @@ a.bookmarklet { background-color:#ddd; border:1px solid #ccc; padding:5px;paddin
#oc-dialog-filepicker-content .dirtree span:not(:last-child)::after { content: '>'; padding: 3px;} #oc-dialog-filepicker-content .dirtree span:not(:last-child)::after { content: '>'; padding: 3px;}
#oc-dialog-filepicker-content .filelist { #oc-dialog-filepicker-content .filelist {
overflow-y:auto; overflow-y:auto;
max-height: 300px; height: 300px;
background-color:white; background-color:white;
width:100%; width:100%;
} }

View file

@ -171,7 +171,6 @@ var OCdialogs = {
$('body').append(self.$filePicker); $('body').append(self.$filePicker);
self.$filePicker.ready(function() { self.$filePicker.ready(function() {
self.$filelist = self.$filePicker.find('.filelist'); self.$filelist = self.$filePicker.find('.filelist');
self.$dirTree = self.$filePicker.find('.dirtree'); self.$dirTree = self.$filePicker.find('.dirtree');
@ -738,9 +737,10 @@ var OCdialogs = {
var dirs = []; var dirs = [];
var others = []; var others = [];
var self = this; var self = this;
this.$filelist.empty().addClass('loading'); this.$filelist.empty().addClass('icon-loading');
this.$filePicker.data('path', dir); this.$filePicker.data('path', dir);
$.when(this._getFileList(dir, this.$filePicker.data('mimetype'))).then(function(response) { $.when(this._getFileList(dir, this.$filePicker.data('mimetype'))).then(function(response) {
$.each(response.data.files, function(index, file) { $.each(response.data.files, function(index, file) {
if (file.type === 'dir') { if (file.type === 'dir') {
dirs.push(file); dirs.push(file);
@ -772,7 +772,7 @@ var OCdialogs = {
self.$filelist.append($li); self.$filelist.append($li);
}); });
self.$filelist.removeClass('loading'); self.$filelist.removeClass('icon-loading');
if (!OC.Util.hasSVGSupport()) { if (!OC.Util.hasSVGSupport()) {
OC.Util.replaceSVG(self.$filePicker.find('.dirtree')); OC.Util.replaceSVG(self.$filePicker.find('.dirtree'));
} }