mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
Adding in broadcasters to listen for edit and delete commands.
This commit is contained in:
parent
cef982725a
commit
e0124840f5
@ -395,13 +395,9 @@ function selectEventInUnifinder( calendarEvent )
|
||||
|
||||
}
|
||||
|
||||
document.getElementById( "unifinder-remove-button" ).removeAttribute( "disabled" );
|
||||
document.getElementById( "delete_command" ).removeAttribute( "disabled" );
|
||||
|
||||
document.getElementById( "unifinder-modify-button" ).removeAttribute( "disabled" );
|
||||
|
||||
document.getElementById( "unifinder-modify-menu" ).removeAttribute( "disabled" );
|
||||
|
||||
document.getElementById( "unifinder-remove-menu" ).removeAttribute( "disabled" );
|
||||
document.getElementById( "modify_command" ).removeAttribute( "disabled" );
|
||||
}
|
||||
|
||||
|
||||
@ -422,35 +418,23 @@ function deselectEventInUnifinder( )
|
||||
gUnifinderSelection = null;
|
||||
}
|
||||
|
||||
document.getElementById( "unifinder-remove-button" ).setAttribute( "disabled", true );
|
||||
document.getElementById( "delete_command" ).setAttribute( "disabled", true );
|
||||
|
||||
document.getElementById( "unifinder-modify-button" ).setAttribute( "disabled", true );
|
||||
|
||||
document.getElementById( "unifinder-modify-menu" ).setAttribute( "disabled", true );
|
||||
|
||||
document.getElementById( "unifinder-remove-menu" ).setAttribute( "disabled", true );
|
||||
document.getElementById( "modify_command" ).setAttribute( "disabled", true );
|
||||
}
|
||||
|
||||
function selectCategoryInUnifinder( )
|
||||
{
|
||||
document.getElementById( "unifinder-remove-button" ).removeAttribute( "disabled" );
|
||||
document.getElementById( "delete_command" ).removeAttribute( "disabled" );
|
||||
|
||||
document.getElementById( "unifinder-modify-button" ).removeAttribute( "disabled" );
|
||||
|
||||
document.getElementById( "unifinder-modify-menu" ).removeAttribute( "disabled" );
|
||||
|
||||
document.getElementById( "unifinder-remove-menu" ).removeAttribute( "disabled" );
|
||||
document.getElementById( "modify_command" ).removeAttribute( "disabled" );
|
||||
}
|
||||
|
||||
function deselectCategoryInUnifinder( )
|
||||
{
|
||||
document.getElementById( "unifinder-remove-button" ).setAttribute( "disabled", true );
|
||||
document.getElementById( "delete_command" ).setAttribute( "disabled", true );
|
||||
|
||||
document.getElementById( "unifinder-modify-button" ).setAttribute( "disabled", true );
|
||||
|
||||
document.getElementById( "unifinder-modify-menu" ).setAttribute( "disabled", true );
|
||||
|
||||
document.getElementById( "unifinder-remove-menu" ).setAttribute( "disabled", true );
|
||||
document.getElementById( "modify_command" ).setAttribute( "disabled", true );
|
||||
}
|
||||
|
||||
|
||||
|
@ -80,6 +80,16 @@
|
||||
persist="screenX screenY width height"
|
||||
>
|
||||
|
||||
<broadcasterset>
|
||||
<broadcaster id="delete_command" disabled="false"/>
|
||||
<broadcaster id="modify_command" disabled="false"/>
|
||||
</broadcasterset>
|
||||
|
||||
|
||||
<keyset>
|
||||
<key id="delete_key" keycode="VK_DELETE" observes="delete_command" onkeypress="onUnifinderCategoriesKeyPress(event)"/>
|
||||
</keyset>
|
||||
|
||||
<!-- Javascript DTD To Variable -->
|
||||
<script type="application/x-javascript">
|
||||
var confirmDeleteEvent = "&calendar.confirm.deleteevent;";
|
||||
@ -117,38 +127,38 @@
|
||||
<!--
|
||||
<menuitem id="unifinder-newcategory-menu" label="&calendar.menu.options.newcategory;" oncommand="unifinderNewCategoryCommand()" />
|
||||
-->
|
||||
<menuitem id="unifinder-modify-menu" label="&calendar.menu.options.modify;" oncommand="unifinderModifyCommand()" />
|
||||
<menuitem id="unifinder-remove-menu" label="&calendar.menu.options.remove;" oncommand="unifinderRemoveCommand()" />
|
||||
<menuitem id="unifinder-modify-menu" observes="modify_command" label="&calendar.menu.options.modify;" oncommand="unifinderModifyCommand()" />
|
||||
<menuitem id="unifinder-remove-menu" observes="delete_command" label="&calendar.menu.options.remove;" oncommand="unifinderRemoveCommand()" />
|
||||
</popup>
|
||||
</popupset>
|
||||
|
||||
<commandset id="commands"/>
|
||||
|
||||
<toolbox id="calendar-toolbox" class="toolbox-top" deferattached="true">
|
||||
<!-- Menu -->
|
||||
<menubar id="main-menubar" persist="collapsed"
|
||||
grippytooltip="aTooltip" grippytooltiptext="&menuBar.tooltip;"/>
|
||||
<toolbox id="calendar-toolbox" class="toolbox-top" deferattached="true">
|
||||
<!-- Menu -->
|
||||
<menubar id="main-menubar" persist="collapsed"
|
||||
grippytooltip="aTooltip" grippytooltiptext="&menuBar.tooltip;"/>
|
||||
|
||||
<toolbar class="toolbar-primary chromeclass-toolbar" id="calendar-bar" persist="collapsed"
|
||||
grippytooltip="aTooltip" grippytooltiptext="&navigationToolbar.tooltip;"
|
||||
tbalign="stretch">
|
||||
|
||||
<toolbarseparator class="toolbarseparator-primary"/>
|
||||
<toolbarbutton class="toolbarbutton-1" id="calendar-new-event-button" label="&calendar.newevent.button.label;" tooltip="aTooltip" tooltiptext="&calendar.newevent.button.tooltip;" oncommand="newEventCommand()"/>
|
||||
<toolbarseparator class="toolbarseparator-primary"/>
|
||||
<toolbarbutton class="toolbarbutton-1" id="calendar-choose-date-button" label="&calendar.choosedate.button.label;" tooltip="aTooltip" tooltiptext="&calendar.choosedate.button.tooltip;" onmousedown="prepareChooseDate()" popup="oe-date-picker-popup"/>
|
||||
<toolbarbutton class="toolbarbutton-1" id="calendar-go-to-today-button" label="&calendar.gototoday.button.label;" tooltip="aTooltip" tooltiptext="&calendar.gototoday.button.tooltip;" oncommand="gCalendarWindow.goToToday()"/>
|
||||
<toolbarseparator class="toolbarseparator-primary"/>
|
||||
<toolbarbutton class="toolbarbutton-1" id="calendar-day-view-button" label="&calendar.dayview.button.label;" tooltip="aTooltip" tooltiptext="&calendar.dayview.button.tooltip;" oncommand="gCalendarWindow.switchToDayView()"/>
|
||||
<toolbarbutton class="toolbarbutton-1" id="calendar-week-view-button" label="&calendar.weekview.button.label;" tooltip="aTooltip" tooltiptext="&calendar.weekview.button.tooltip;" oncommand="gCalendarWindow.switchToWeekView()"/>
|
||||
<toolbarbutton class="toolbarbutton-1" id="calendar-month-view-button" label="&calendar.monthview.button.label;" tooltip="aTooltip" tooltiptext="&calendar.monthview.button.tooltip;" oncommand="gCalendarWindow.switchToMonthView()"/>
|
||||
<spacer flex="1"/>
|
||||
<hbox id="throbber-box" align="center">
|
||||
<button id="navigator-throbber" oncommand="goClickThrobber('browser.throbber.url')"
|
||||
tooltiptext="&throbber.tooltip;"/>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
</toolbox>
|
||||
<toolbar class="toolbar-primary chromeclass-toolbar" id="calendar-bar" persist="collapsed"
|
||||
grippytooltip="aTooltip" grippytooltiptext="&navigationToolbar.tooltip;"
|
||||
tbalign="stretch">
|
||||
|
||||
<toolbarseparator class="toolbarseparator-primary"/>
|
||||
<toolbarbutton class="toolbarbutton-1" id="calendar-new-event-button" label="&calendar.newevent.button.label;" tooltip="aTooltip" tooltiptext="&calendar.newevent.button.tooltip;" oncommand="newEventCommand()"/>
|
||||
<toolbarseparator class="toolbarseparator-primary"/>
|
||||
<toolbarbutton class="toolbarbutton-1" id="calendar-choose-date-button" label="&calendar.choosedate.button.label;" tooltip="aTooltip" tooltiptext="&calendar.choosedate.button.tooltip;" onmousedown="prepareChooseDate()" popup="oe-date-picker-popup"/>
|
||||
<toolbarbutton class="toolbarbutton-1" id="calendar-go-to-today-button" label="&calendar.gototoday.button.label;" tooltip="aTooltip" tooltiptext="&calendar.gototoday.button.tooltip;" oncommand="gCalendarWindow.goToToday()"/>
|
||||
<toolbarseparator class="toolbarseparator-primary"/>
|
||||
<toolbarbutton class="toolbarbutton-1" id="calendar-day-view-button" label="&calendar.dayview.button.label;" tooltip="aTooltip" tooltiptext="&calendar.dayview.button.tooltip;" oncommand="gCalendarWindow.switchToDayView()"/>
|
||||
<toolbarbutton class="toolbarbutton-1" id="calendar-week-view-button" label="&calendar.weekview.button.label;" tooltip="aTooltip" tooltiptext="&calendar.weekview.button.tooltip;" oncommand="gCalendarWindow.switchToWeekView()"/>
|
||||
<toolbarbutton class="toolbarbutton-1" id="calendar-month-view-button" label="&calendar.monthview.button.label;" tooltip="aTooltip" tooltiptext="&calendar.monthview.button.tooltip;" oncommand="gCalendarWindow.switchToMonthView()"/>
|
||||
<spacer flex="1"/>
|
||||
<hbox id="throbber-box" align="center">
|
||||
<button id="navigator-throbber" oncommand="goClickThrobber('browser.throbber.url')"
|
||||
tooltiptext="&throbber.tooltip;"/>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
</toolbox>
|
||||
|
||||
|
||||
<!-- V I S I B L E C O N T E N T -->
|
||||
@ -173,41 +183,39 @@
|
||||
|
||||
|
||||
<popupset>
|
||||
<popup id="savetip" style="background-color: #FFFFC0;">
|
||||
<label id="popuptooltiptext" value=" "/>
|
||||
</popup>
|
||||
<popup id="savetip" style="background-color: #FFFFC0;">
|
||||
<label id="popuptooltiptext" value=" "/>
|
||||
</popup>
|
||||
</popupset>
|
||||
|
||||
|
||||
<spacer flex="1"/>
|
||||
|
||||
<!-- Begin Day/Month/Week Deck -->
|
||||
<deck id="calendar-deck" selectedIndex="0" flex="1">
|
||||
|
||||
<!-- Calendar Month View -->
|
||||
|
||||
<vbox id="month-view-box" flex="1"/>
|
||||
|
||||
<!-- End: Calendar Month View -->
|
||||
|
||||
|
||||
<!-- Calendar Week View -->
|
||||
|
||||
<vbox id="week-view-box" flex="1"/>
|
||||
|
||||
<!-- End: Calendar Week View -->
|
||||
|
||||
|
||||
<!-- Calendar Day View -->
|
||||
|
||||
<vbox id="day-view-box" flex="1"/>
|
||||
|
||||
<!-- End: Calendar Day View -->
|
||||
|
||||
</deck> <!-- End: Day/Month/Week Deck -->
|
||||
|
||||
<spacer flex="1"/>
|
||||
|
||||
<!-- Begin Day/Month/Week Deck -->
|
||||
<box flex="1" pack="center" align="center">
|
||||
<deck id="calendar-deck" selectedIndex="0" flex="1">
|
||||
|
||||
<!-- Calendar Month View -->
|
||||
|
||||
<vbox id="month-view-box" flex="1"/>
|
||||
|
||||
<!-- End: Calendar Month View -->
|
||||
|
||||
|
||||
<!-- Calendar Week View -->
|
||||
|
||||
<vbox id="week-view-box" flex="1"/>
|
||||
|
||||
<!-- End: Calendar Week View -->
|
||||
|
||||
|
||||
<!-- Calendar Day View -->
|
||||
|
||||
<vbox id="day-view-box" flex="1"/>
|
||||
|
||||
<!-- End: Calendar Day View -->
|
||||
|
||||
</deck> <!-- End: Day/Month/Week Deck -->
|
||||
</box>
|
||||
|
||||
</hbox> <!-- End: box with unifinder on left, calendar on right -->
|
||||
</vbox>
|
||||
|
||||
|
@ -45,7 +45,7 @@
|
||||
[
|
||||
<!ENTITY % dtd1 SYSTEM "chrome://calendar/locale/global.dtd" > %dtd1;
|
||||
<!ENTITY % dtd2 SYSTEM "chrome://calendar/locale/unifinder.dtd" > %dtd2;
|
||||
<!ENTITY % dtd3 SYSTEM "chrome://calendar/locale/calendar.dtd" > %dtd3;
|
||||
<!ENTITY % dtd3 SYSTEM "chrome://calendar/locale/calendar.dtd" > %dtd3;
|
||||
]>
|
||||
|
||||
<overlay
|
||||
@ -58,8 +58,8 @@
|
||||
|
||||
<unifinder id="calendar-unifinder-overlay" flex="1">
|
||||
|
||||
<unifinder-button id="unifinder-remove-button" class="unifinder-remove-button" tooltip="aTooltip" tooltiptext="&calendar.tools.delete.tooltip;" label="&calendar.delete.label;" oncommand="unifinderRemoveCommand()" />
|
||||
<unifinder-button id="unifinder-modify-button" class="unifinder-modify-button" tooltip="aTooltip" tooltiptext="&calendar.tools.modify.tooltip;" label="&calendar.modify.label;" oncommand="unifinderModifyCommand()" />
|
||||
<unifinder-button id="unifinder-remove-button" observes="delete_command" class="unifinder-remove-button" tooltip="aTooltip" tooltiptext="&calendar.tools.delete.tooltip;" label="&calendar.delete.label;" oncommand="unifinderRemoveCommand()" />
|
||||
<unifinder-button id="unifinder-modify-button" observes="modify_command" class="unifinder-modify-button" tooltip="aTooltip" tooltiptext="&calendar.tools.modify.tooltip;" label="&calendar.modify.label;" oncommand="unifinderModifyCommand()" />
|
||||
|
||||
<box flex="1">
|
||||
<tabbox class="unifinder-tab-box" unifinder-tab-box="true" orient="vertical" flex="1" >
|
||||
|
Loading…
Reference in New Issue
Block a user