diff --git a/plugins/kolab_files/kolab_files.js b/plugins/kolab_files/kolab_files.js index df777b0b..a59445f4 100644 --- a/plugins/kolab_files/kolab_files.js +++ b/plugins/kolab_files/kolab_files.js @@ -4136,15 +4136,15 @@ function kolab_files_ui() delete result.auth_errors[i]; } }); + $.extend(this.auth_errors, result.auth_errors); } // ask for password to the first storage on the list var ref = this; $.each(this.auth_errors || [], function(i, v) { - file_api.folder_list_auth_dialog(i, v); - delete ref.auth_errors[i]; - return false; + if (file_api.folder_list_auth_dialog(i, v)) + return false; }); }; @@ -4155,6 +4155,9 @@ function kolab_files_ui() dialog = $('#files-folder-auth-dialog'), content = this.folder_list_auth_form(driver); + if ($('#files-folder-auth-dialog').is(':visible')) + return false; + dialog.find('table.propform').remove(); $('.auth-options', dialog).before(content); @@ -4190,13 +4193,17 @@ function kolab_files_ui() } }); }); + + return true; }; // folder_auth handler this.folder_auth_response = function(response, params) { - if (!this.response(response)) + if (!this.response(response)) { + this.folder_list_auth_errors(); return; + } delete this.auth_errors[response.result.folder];