Bug 13970. Use XUL syntax to hook up command updaters.

This commit is contained in:
waterson%netscape.com 1999-09-17 04:03:30 +00:00
Родитель a42c583a80
Коммит be9dc7b0d1
5 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@ -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">