mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
method to lock and unlock tree (stop receiving clicks and give user visual feedback that we are working on his request
This commit is contained in:
parent
045d1a3b19
commit
eaa6376170
@ -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();
|
||||
}
|
||||
});
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user