зеркало из https://github.com/mozilla/pjs.git
fix for 50803. Enabling disabling problems in threadpane. r=bienvenu.
This commit is contained in:
Родитель
152cbc0f5a
Коммит
59e789c90c
|
@ -504,6 +504,7 @@ function CommandUpdate_Mail()
|
|||
messagePane.removeAttribute('draw-focus-border');
|
||||
}*/
|
||||
|
||||
goUpdateCommand('button_delete');
|
||||
goUpdateCommand('cmd_delete');
|
||||
goUpdateCommand('cmd_nextMsg');
|
||||
goUpdateCommand('cmd_nextUnreadMsg');
|
||||
|
@ -529,7 +530,6 @@ function CommandUpdate_Mail()
|
|||
|
||||
function ThreadTreeUpdate_Mail(command)
|
||||
{
|
||||
goUpdateCommand('button_delete');
|
||||
goUpdateCommand('button_reply');
|
||||
goUpdateCommand('button_replyall');
|
||||
goUpdateCommand('button_forward');
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
* Rights Reserved.
|
||||
*/
|
||||
|
||||
var gOldNumSelected = 0;
|
||||
function ThreadPaneOnClick(event)
|
||||
{
|
||||
if (event.target.localName != "treecell" &&
|
||||
|
@ -215,8 +216,16 @@ function ThreadPaneSelectionChange()
|
|||
var tree = GetThreadTree();
|
||||
var selectedMessages = tree.selectedItems;
|
||||
var numSelected = selectedMessages.length;
|
||||
if(numSelected == 0 | numSelected == 1)
|
||||
//If the current selected is 1 or 0 then we know that a change has taken place that might
|
||||
//cause us to send out threadTree update notifications. We also care about this if the previous
|
||||
//numSelected was 0 or 1 because we might be involved in something like a SelectAll where we won't
|
||||
//get notified about the change from 0 to 1.
|
||||
if(numSelected == 0 || numSelected == 1 || gOldNumSelected == 0 || gOldNumSelected == 1)
|
||||
{
|
||||
document.commandDispatcher.updateCommands('threadTree-select');
|
||||
}
|
||||
//Store the current number selected.
|
||||
gOldNumSelected = numSelected;
|
||||
}
|
||||
|
||||
function GetThreadTree()
|
||||
|
|
Загрузка…
Ссылка в новой задаче