T2438: Fix javascript error in a file preview
This commit is contained in:
parent
ecd508450e
commit
2d1bb5a23d
1 changed files with 8 additions and 6 deletions
|
@ -1992,10 +1992,15 @@ function kolab_files_ui()
|
||||||
if (elem.data('no-collections') == true)
|
if (elem.data('no-collections') == true)
|
||||||
collections = [];
|
collections = [];
|
||||||
|
|
||||||
elem.html('');
|
|
||||||
|
|
||||||
this.env.folders = this.folder_list_parse(response.result && response.result.list ? response.result.list : response.result);
|
this.env.folders = this.folder_list_parse(response.result && response.result.list ? response.result.list : response.result);
|
||||||
|
|
||||||
|
rcmail.enable_command('files-create', true);
|
||||||
|
|
||||||
|
if (!elem.length)
|
||||||
|
return;
|
||||||
|
|
||||||
|
elem.html('');
|
||||||
|
|
||||||
$.each(this.env.folders, function(i, f) {
|
$.each(this.env.folders, function(i, f) {
|
||||||
var row;
|
var row;
|
||||||
if (row = file_api.folder_list_row(i, f)) {
|
if (row = file_api.folder_list_row(i, f)) {
|
||||||
|
@ -2078,14 +2083,11 @@ function kolab_files_ui()
|
||||||
else if (first)
|
else if (first)
|
||||||
rcmail.folder_list.select(first);
|
rcmail.folder_list.select(first);
|
||||||
|
|
||||||
rcmail.enable_command('files-create', true);
|
|
||||||
|
|
||||||
// add tree icons
|
// add tree icons
|
||||||
// this.folder_list_tree(this.env.folders);
|
// this.folder_list_tree(this.env.folders);
|
||||||
|
|
||||||
// handle authentication errors on external sources
|
// handle authentication errors on external sources
|
||||||
if (elem.length)
|
this.folder_list_auth_errors(response.result);
|
||||||
this.folder_list_auth_errors(response.result);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.folder_select = function(folder)
|
this.folder_select = function(folder)
|
||||||
|
|
Loading…
Add table
Reference in a new issue