зеркало из https://github.com/mozilla/pjs.git
Bug 243808 keynav: can't select mail folders for offline from keyboard
r=neil.parkwaycc.co.uk, sr=bienvenu, patch by ginn.chen@sun.com
This commit is contained in:
Родитель
1b43332683
Коммит
86e0cf5c0f
|
@ -73,6 +73,7 @@
|
|||
|
||||
<tree id="synchronizeTree" flex="1" hidecolumnpicker="true"
|
||||
datasources="rdf:msgaccountmanager rdf:mailnewsfolders" ref="msgaccounts:/" flags="dont-build-content"
|
||||
onkeypress="onSynchronizeTreeKeyPress(event);"
|
||||
onclick="onSynchronizeClick(event);">
|
||||
<template>
|
||||
<rule>
|
||||
|
|
|
@ -205,6 +205,21 @@ function onSynchronizeClick(event)
|
|||
}
|
||||
}
|
||||
|
||||
function onSynchronizeTreeKeyPress(event)
|
||||
{
|
||||
// for now, only do something on space key
|
||||
if (event.charCode != KeyEvent.DOM_VK_SPACE)
|
||||
return;
|
||||
|
||||
var treeSelection = gSynchronizeTree.view.selection;
|
||||
for (var i=0;i<treeSelection.getRangeCount();i++) {
|
||||
var start = {}, end = {};
|
||||
treeSelection.getRangeAt(i,start,end);
|
||||
for (var k=start.value;k<=end.value;k++)
|
||||
UpdateNode(GetFolderResource(gSynchronizeTree, k), k);
|
||||
}
|
||||
}
|
||||
|
||||
function UpdateNode(resource, row)
|
||||
{
|
||||
var folder = resource.QueryInterface(Components.interfaces.nsIMsgFolder);
|
||||
|
|
Загрузка…
Ссылка в новой задаче