зеркало из https://github.com/mozilla/pjs.git
Bug 13970. Use XUL syntax to hook up command updaters.
This commit is contained in:
Родитель
a42c583a80
Коммит
be9dc7b0d1
|
@ -5,6 +5,7 @@ var ResultsPaneController =
|
|||
{
|
||||
IsCommandEnabled: function(command)
|
||||
{
|
||||
dump('ResultsPaneController::IsCommandEnabled(' + command + ')\n');
|
||||
switch ( command )
|
||||
{
|
||||
case "cmd_selectAll":
|
||||
|
@ -57,6 +58,7 @@ var DirPaneController =
|
|||
{
|
||||
IsCommandEnabled: function(command)
|
||||
{
|
||||
dump('DirPaneController::IsCommandEnabled(' + command + ')\n');
|
||||
switch ( command )
|
||||
{
|
||||
case "cmd_selectAll":
|
||||
|
|
|
@ -35,7 +35,7 @@ Rights Reserved.
|
|||
ref="abdirectory://"
|
||||
open="true"
|
||||
datasources="rdf:addressdirectory"
|
||||
onselect="DirPaneSelectionChange(); document.commandDispatcher.updateCommands();">
|
||||
onselect="DirPaneSelectionChange(); document.commandDispatcher.updateCommands('select');">
|
||||
|
||||
<template>
|
||||
<rule>
|
||||
|
|
|
@ -33,7 +33,7 @@ Rights Reserved.
|
|||
class="abResults"
|
||||
flex="100%"
|
||||
datasources="rdf:addressdirectory rdf:addresscard"
|
||||
onselect="top.ResultsPaneSelectionChange(); document.commandDispatcher.updateCommands();"
|
||||
onselect="top.ResultsPaneSelectionChange(); document.commandDispatcher.updateCommands('select');"
|
||||
ondblclick="top.AbEditCard()"
|
||||
containment="http://home.netscape.com/NC-rdf#CardChild">
|
||||
|
||||
|
|
|
@ -19,9 +19,9 @@ function OnLoadAddressBook()
|
|||
}
|
||||
|
||||
// FIX ME! - can remove these as soon as waterson enables auto-registration
|
||||
document.commandDispatcher.addCommand(document.getElementById('CommandUpdate_AddressBook'));
|
||||
document.commandDispatcher.addCommand(document.getElementById('cmd_selectAll'));
|
||||
document.commandDispatcher.addCommand(document.getElementById('cmd_delete'));
|
||||
//document.commandDispatcher.addCommand(document.getElementById('CommandUpdate_AddressBook'));
|
||||
//document.commandDispatcher.addCommand(document.getElementById('cmd_selectAll'));
|
||||
//document.commandDispatcher.addCommand(document.getElementById('cmd_delete'));
|
||||
|
||||
SetupCommandUpdateHandlers();
|
||||
SelectFirstAddressBook();
|
||||
|
|
|
@ -44,7 +44,7 @@ Rights Reserved.
|
|||
<!--html:script language="JavaScript" src="resource:/res/samples/DumpDOM.js"/-->
|
||||
|
||||
<commands id="commands">
|
||||
<commandset id="CommandUpdate_AddressBook" onchange="CommandUpdate_AddressBook()"/>
|
||||
<commandset id="CommandUpdate_AddressBook" commandupdater="true" onchange="CommandUpdate_AddressBook()"/>
|
||||
</commands>
|
||||
|
||||
<broadcasterset id="broadcasterset">
|
||||
|
|
Загрузка…
Ссылка в новой задаче