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) IsCommandEnabled: function(command)
{ {
dump('ResultsPaneController::IsCommandEnabled(' + command + ')\n');
switch ( command ) switch ( command )
{ {
case "cmd_selectAll": case "cmd_selectAll":
@ -57,6 +58,7 @@ var DirPaneController =
{ {
IsCommandEnabled: function(command) IsCommandEnabled: function(command)
{ {
dump('DirPaneController::IsCommandEnabled(' + command + ')\n');
switch ( command ) switch ( command )
{ {
case "cmd_selectAll": case "cmd_selectAll":

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

@ -35,7 +35,7 @@ Rights Reserved.
ref="abdirectory://" ref="abdirectory://"
open="true" open="true"
datasources="rdf:addressdirectory" datasources="rdf:addressdirectory"
onselect="DirPaneSelectionChange(); document.commandDispatcher.updateCommands();"> onselect="DirPaneSelectionChange(); document.commandDispatcher.updateCommands('select');">
<template> <template>
<rule> <rule>

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

@ -33,7 +33,7 @@ Rights Reserved.
class="abResults" class="abResults"
flex="100%" flex="100%"
datasources="rdf:addressdirectory rdf:addresscard" datasources="rdf:addressdirectory rdf:addresscard"
onselect="top.ResultsPaneSelectionChange(); document.commandDispatcher.updateCommands();" onselect="top.ResultsPaneSelectionChange(); document.commandDispatcher.updateCommands('select');"
ondblclick="top.AbEditCard()" ondblclick="top.AbEditCard()"
containment="http://home.netscape.com/NC-rdf#CardChild"> 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 // FIX ME! - can remove these as soon as waterson enables auto-registration
document.commandDispatcher.addCommand(document.getElementById('CommandUpdate_AddressBook')); //document.commandDispatcher.addCommand(document.getElementById('CommandUpdate_AddressBook'));
document.commandDispatcher.addCommand(document.getElementById('cmd_selectAll')); //document.commandDispatcher.addCommand(document.getElementById('cmd_selectAll'));
document.commandDispatcher.addCommand(document.getElementById('cmd_delete')); //document.commandDispatcher.addCommand(document.getElementById('cmd_delete'));
SetupCommandUpdateHandlers(); SetupCommandUpdateHandlers();
SelectFirstAddressBook(); SelectFirstAddressBook();

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

@ -44,7 +44,7 @@ Rights Reserved.
<!--html:script language="JavaScript" src="resource:/res/samples/DumpDOM.js"/--> <!--html:script language="JavaScript" src="resource:/res/samples/DumpDOM.js"/-->
<commands id="commands"> <commands id="commands">
<commandset id="CommandUpdate_AddressBook" onchange="CommandUpdate_AddressBook()"/> <commandset id="CommandUpdate_AddressBook" commandupdater="true" onchange="CommandUpdate_AddressBook()"/>
</commands> </commands>
<broadcasterset id="broadcasterset"> <broadcasterset id="broadcasterset">