This commit is contained in:
mikep%oeone.com 2002-08-16 17:41:09 +00:00
Родитель 51ae4e0cf7
Коммит badfcd317f
2 изменённых файлов: 127 добавлений и 99 удалений

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

@ -215,7 +215,7 @@
<toolbar class="toolbar-primary chromeclass-toolbar" id="calendar-bar" persist="collapsed"
grippytooltip="aTooltip" grippytooltiptext="&navigationToolbar.tooltip;"
tbalign="stretch">
<!--<toolbarbutton class="toolbarbutton-1" id="calendar-new-task-button" label="&calendar.newtask.button.label;" tooltiptext="&calendar.newtask.button.tooltip;" observes="new_todo_command"/>-->
<!--<toolbarbutton class="toolbarbutton-1" id="calendar-new-task-button" label="&calendar.newtask.button.label;" tooltiptext="&calendar.newtask.button.tooltip;" observes="new_todo_command"/>-->
<toolbarbutton class="toolbarbutton-1" id="calendar-new-event-button" label="&calendar.newevent.button.label;" tooltiptext="&calendar.newevent.button.tooltip;" observes="new_command"/>
<toolbarbutton class="toolbarbutton-1" id="calendar-edit-event-button" label="&calendar.edit.button.label;" tooltiptext="&calendar.edit.button.tooltip;" observes="modify_command"/>
<toolbarbutton class="toolbarbutton-1" id="calendar-delete-event-button" label="&calendar.delete.button.label;" tooltiptext="&calendar.delete.button.tooltip;" observes="delete_command"/>
@ -238,13 +238,14 @@
<!-- V I S I B L E C O N T E N T -->
<vbox id="calendar-top-box" flex="1" context="context-menu">
<vbox id="calendar-top-box" flex="1" context="context-menu">
<!-- Calendar Controls-->
<hbox id="calendar-content-box" flex="1">
<!-- Calendar Controls-->
<hbox id="calendar-content-box" flex="1">
<vbox id="left-hand-content" flex="1">
<vbox id="left-hand-content" flex="1">
<vbox id="left-hand-above-splitter" flex="1">
<box align="center">
<label control="unifinder-search-field" value="&calendar.search.options.searchfor;"/>
<textbox id="unifinder-search-field" onkeypress="unifinderSearchKeyPress( this, event )" flex="1"/>
@ -254,110 +255,111 @@
<checkbox label="&calendar.unifinder.todayandfuture.label;" id="unifinder-future-events" oncommand="unifinderShowFutureEventsOnly( event )" persist="checked"/>
</box>
<listbox tooltip="savetip" id="unifinder-search-results-listbox" seltype="multiple" onselect="unifinderClickEvent( this )"
class="unifinder-tree-class" flex="1" ondragover="return( false );"/>
<splitter id="calendar-todo-splitter" collapse="after" persist="state hidden collapsed top"
class="chromeclass-extrachrome" orient="vertical">
<grippy/>
</splitter>
<vbox flex="1">
<box align="left">
<label style="font-weight: bold" value="&calendar.unifinder.todoitems.label;"/>
</box>
<box align="center">
<checkbox id="only-completed-checkbox" label="&calendar.unifinder.hidecompletedtodos.label;" oncommand="toDoUnifinderRefesh( event )" persist="checked"/>
</box>
class="unifinder-tree-class" flex="1" ondragover="return( false );" onkeypress="if (event.keyCode == 13) unifinderEditCommand();" onfocus="focusFirstItemIfNoSelection( );"/>
</vbox>
<splitter id="calendar-todo-splitter" collapse="after" persist="state hidden collapsed top"
class="chromeclass-extrachrome" orient="vertical" onmouseup="persist_height()">
<grippy/>
</splitter>
<vbox id="left-hand-below-splitter" flex="1">
<box align="left">
<label style="font-weight: bold" value="&calendar.unifinder.todoitems.label;"/>
</box>
<box align="center">
<checkbox id="only-completed-checkbox" label="&calendar.unifinder.hidecompletedtodos.label;" oncommand="toDoUnifinderRefesh( event )" persist="checked"/>
</box>
<tree tooltip="savetip" id="unifinder-todo-tree" flex="1" enableColumnDrag="true">
<treecols id="unifinder-todo-tree-cols">
<treecol id="unifinder-todo-tree-col-completed"
persist="hidden ordinal width" minwidth="18" maxwidth="18" width="18"
label="&calendar.unifinder.tree.done.label;">
<image id="checkboximg" contextmenu="taskitem-context-menu"/>
</treecol>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-priority"
persist="hidden ordinal width" minwidth="18" maxwidth="18" width="18"
label="&calendar.unifinder.tree.priority.label;">
<image id="checkboximg" contextmenu="taskitem-context-menu"/>
</treecol>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-title"
persist="hidden ordinal width" flex="1"
label="&calendar.unifinder.tree.title.label;" />
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-startdate"
persist="hidden ordinal width"
hidden="true"
flex="1" label="&calendar.unifinder.tree.startdate.label;"/>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-duedate"
persist="hidden ordinal width"
hidden="true"
flex="1" label="&calendar.unifinder.tree.duedate.label;"/>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-completeddate"
persist="hidden ordinal width"
hidden="true"
flex="1" label="&calendar.unifinder.tree.completeddate.label;"/>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-percentcomplete"
persist="hidden ordinal width"
hidden="true"
flex="1" label="&calendar.unifinder.tree.percentcomplete.label;"/>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-categories"
persist="hidden ordinal width"
hidden="true"
flex="1" label="&calendar.unifinder.tree.categories.label;"/>
</treecols>
<treechildren onmousemove="changeToolTipTextForToDo( event )"
onclick="unifinderClickToDo( event )"
ondblclick="unifinderDoubleClickToDo( event )"
onmousedown="unifinderMouseDownToDo( event )"
context="taskitem-context-menu">
</treechildren>
</tree>
<tree tooltip="savetip" id="unifinder-todo-tree" flex="1" enableColumnDrag="true">
<treecols id="unifinder-todo-tree-cols">
<treecol id="unifinder-todo-tree-col-completed"
persist="hidden ordinal width" minwidth="18" maxwidth="18" width="18"
label="&calendar.unifinder.tree.done.label;">
<image id="checkboximg" contextmenu="taskitem-context-menu"/>
</treecol>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-priority"
persist="hidden ordinal width" minwidth="18" maxwidth="18" width="18"
label="&calendar.unifinder.tree.priority.label;">
<image id="checkboximg" contextmenu="taskitem-context-menu"/>
</treecol>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-title"
persist="hidden ordinal width" flex="1"
label="&calendar.unifinder.tree.title.label;" />
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-startdate"
persist="hidden ordinal width"
hidden="true"
flex="1" label="&calendar.unifinder.tree.startdate.label;"/>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-duedate"
persist="hidden ordinal width"
hidden="true"
flex="1" label="&calendar.unifinder.tree.duedate.label;"/>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-completeddate"
persist="hidden ordinal width"
hidden="true"
flex="1" label="&calendar.unifinder.tree.completeddate.label;"/>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-percentcomplete"
persist="hidden ordinal width"
hidden="true"
flex="1" label="&calendar.unifinder.tree.percentcomplete.label;"/>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-categories"
persist="hidden ordinal width"
hidden="true"
flex="1" label="&calendar.unifinder.tree.categories.label;"/>
</treecols>
<treechildren onmousemove="changeToolTipTextForToDo( event )"
onclick="unifinderClickToDo( event )"
ondblclick="unifinderDoubleClickToDo( event )"
onmousedown="unifinderMouseDownToDo( event )"
context="taskitem-context-menu">
</treechildren>
</tree>
</vbox>
</vbox>
<splitter id="calendar-splitter" collapse="before" persist="state hidden collapsed left"
class="chromeclass-extrachrome sidebar-splitter" orient="horizontal">
<splitter id="calendar-splitter" collapse="before" persist="state hidden collapsed left"
class="chromeclass-extrachrome sidebar-splitter" onmouseup="persist_width()" orient="horizontal">
<grippy class="sidebar-splitter-grippy"/>
</splitter>
<!-- Begin Day/Month/Week Deck -->
<deck id="calendar-deck" persist="selectedIndex" flex="1">
<!-- Calendar Month View -->
<vbox id="month-view-box"/>
<!-- Calendar Month View -->
<vbox id="month-view-box"/>
<!-- End: Calendar Month View -->
<!-- Calendar Week View -->
<vbox id="week-view-box"/>
<!-- End: Calendar Week View -->
<vbox id="week-view-box"/>
<!-- End: Calendar Week View -->
<!-- Calendar Day View -->
<vbox id="day-view-box"/>
<!-- End: Calendar Day View -->
</deck> <!-- End: Day/Month/Week Deck -->
<vbox id="day-view-box"/>
<!-- End: Calendar Day View -->
</deck> <!-- End: Day/Month/Week Deck -->
</hbox> <!-- End: box with unifinder on left, calendar on right -->
</vbox>
</vbox>
<statusbar id="status-bar" class="chromeclass-status">
<statusbarpanel id="component-bar"/>
<statusbarpanel id="statusText" flex="1" value="&statusText.label;"/>
<statusbarpanel id="offline-status" class="statusbarpanel-iconic" hidden="true" offline="true"/>
</statusbar>
<statusbar id="status-bar" class="chromeclass-status">
<statusbarpanel id="component-bar"/>
<statusbarpanel id="statusText" flex="1" value="&statusText.label;"/>
<statusbarpanel id="offline-status" class="statusbarpanel-iconic" hidden="true" offline="true"/>
</statusbar>
</window>

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

@ -539,6 +539,32 @@ function unifinderClearSearchCommand()
refreshEventTree( eventTable );
}
function focusFirstItemIfNoSelection()
{
if( gCalendarWindow.EventSelection.selectedEvents.length == 0 )
{
//select the first event in the list.
var ListBox = document.getElementById( "unifinder-search-results-listbox" );
if( ListBox.childNodes.length > 0 )
{
var SelectedEvent = ListBox.childNodes[0].event;
var ArrayOfEvents = new Array();
ArrayOfEvents[ ArrayOfEvents.length ] = SelectedEvent;
gCalendarWindow.EventSelection.setArrayToSelection( ArrayOfEvents );
/*start date is either the next or last occurence, or the start date of the event */
var eventStartDate = getNextOrPreviousRecurrence( SelectedEvent );
/* you need this in case the current day is not visible. */
gCalendarWindow.currentView.goToDay( eventStartDate, true);
}
}
}
function getNextOrPreviousRecurrence( calendarEvent )
{