diff --git a/mail/js/app.js b/mail/js/app.js index 27e147c60e..465d3de44d 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -40,7 +40,7 @@ app.classes.mail = AppJS.extend( timeout: null, request: null }, - + /** * abbrevations for common access rights * @array @@ -2456,4 +2456,26 @@ app.classes.mail = AppJS.extend( } }, + /** + * Lock tree so it does NOT receive any more mouse-clicks + */ + lock_tree: function() + { + if (!document.getElementById('mail_folder_lock_div')) + { + var parent = jQuery('#mail-index_nm\\[foldertree\\]'); + var lock_div = jQuery(document.createElement('div')); + lock_div.attr('id', 'mail_folder_lock_div') + .addClass('mail_folder_lock'); + parent.prepend(lock_div); + } + }, + + /** + * Unlock tree so it receives again mouse-clicks after calling lock_tree() + */ + unlock_tree: function() + { + jQuery('#mail_folder_lock_div').remove(); + } }); diff --git a/mail/templates/default/app.css b/mail/templates/default/app.css index 5d68da3728..599d5a0a58 100644 --- a/mail/templates/default/app.css +++ b/mail/templates/default/app.css @@ -567,3 +567,23 @@ div.mailPreviewHeaders #mail-index_previewAttachmentArea.visible { .mail_extraEmails.visible > a { display: list-item; } + +/** + * Lock div for tree to prevent further clicks + */ +#mail-index_nm\[foldertree\] { + position: relative; +} +#mail_folder_lock_div { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + z-index: 10000; + // only change styling below: + background-image: url(../../../phpgwapi/templates/default/images/ajax-loader.gif); + background-position: left top; + background-repeat: no-repeat; + background-color: rgba(255,255,255,0.5); +}