phasing out the unifinder
|
@ -180,8 +180,6 @@ function update_date( Refresh )
|
|||
|
||||
function calendarFinish()
|
||||
{
|
||||
finishCalendarUnifinder( gEventSource );
|
||||
|
||||
gCalendarWindow.close( );
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://calendar/skin/calendar.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://communicator/skin/communicator.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://calendar/content/unifinder/unifinderxul.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://calendar/skin/unifinder.css" type="text/css"?>
|
||||
|
||||
|
||||
<!-- Overlays -->
|
||||
|
@ -53,7 +53,6 @@
|
|||
<?xul-overlay href="chrome://calendar/content/calendarMenuOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://calendar/content/datepicker/datepicker-overlay.xul"?>
|
||||
|
||||
<?xul-overlay href="chrome://calendar/content/unifinder/unifinderOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://calendar/content/calendarDayView.xul"?>
|
||||
<?xul-overlay href="chrome://calendar/content/calendarWeekView.xul"?>
|
||||
<?xul-overlay href="chrome://calendar/content/calendarMonthView.xul"?>
|
||||
|
@ -109,7 +108,7 @@
|
|||
<!-- NEEDED FOR DATE UTILS -->
|
||||
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
||||
<script type="application/x-javascript" src="chrome://calendar/content/dateUtils.js"/>
|
||||
<script type="application/x-javascript" src="chrome://calendar/content/unifinder/unifinder.js"/>
|
||||
<script type="application/x-javascript" src="chrome://calendar/content/unifinder.js"/>
|
||||
|
||||
<script type="application/x-javascript" src="chrome://calendar/content/calendar.js"/>
|
||||
<script type="application/x-javascript" src="chrome://calendar/content/calendarEvent.js"/>
|
||||
|
@ -174,17 +173,43 @@
|
|||
|
||||
<hbox id="calendar-content-box" flex="1">
|
||||
|
||||
|
||||
<!-- UNIFINDER OVERLAY -->
|
||||
|
||||
<unifinder id="calendar-unifinder-overlay" menu-popup="unifinder-options-menu" flex="1"/>
|
||||
<vbox flex="1">
|
||||
<toolbox>
|
||||
<toolbar class="unifinder-toolbar chromeclass-toolbar" flex="1">
|
||||
<button orient="vertical" observes="delete_command" class="unifinder-remove-button plain" tooltiptext="&calendar.tools.delete.tooltip;" label="&calendar.delete.label;" oncommand="unifinderRemoveCommand()"/>
|
||||
<button orient="vertical" observes="modify_command" class="unifinder-modify-button plain" tooltiptext="&calendar.tools.modify.tooltip;" label="&calendar.modify.label;" oncommand="unifinderModifyCommand()"/>
|
||||
</toolbar>
|
||||
</toolbox>
|
||||
<box flex="1">
|
||||
<tabbox class="unifinder-tab-box" orient="vertical" flex="1" persist="selectedTab">
|
||||
<tabs>
|
||||
<tab label="&calendar.main.tab.label;" />
|
||||
<tab label="&calendar.search.tab.label;" />
|
||||
</tabs>
|
||||
|
||||
<tabpanels flex="1">
|
||||
<tabpanel id="unifinder-categories-box" flex="1">
|
||||
<listbox id="unifinder-categories-tree" seltype="multiple" onselect="unifinderClickEvent( this )" class="unifinder-tree-class" flex="1"/>
|
||||
</tabpanel>
|
||||
|
||||
<tabpanel orient="vertical" 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"/>
|
||||
</box>
|
||||
<listbox id="unifinder-search-results-tree" seltype="multiple" onselect="unifinderClickEvent( this )" class="unifinder-tree-class" flex="1"/>
|
||||
</tabpanel>
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
</box>
|
||||
</vbox>
|
||||
|
||||
<splitter id="unifinder-splitter" collapse="before" persist="state hidden collapsed"
|
||||
class="chromeclass-extrachrome sidebar-splitter"
|
||||
orient="horizontal">
|
||||
<grippy class="sidebar-splitter-grippy"/>
|
||||
<splitter collapse="before" persist="state hidden collapsed"
|
||||
class="chromeclass-extrachrome sidebar-splitter" orient="horizontal">
|
||||
<grippy class="sidebar-splitter-grippy"/>
|
||||
</splitter>
|
||||
<!-- Begin Day/Month/Week Deck -->
|
||||
|
||||
<!-- Begin Day/Month/Week Deck -->
|
||||
<deck id="calendar-deck" selectedIndex="0" flex="1">
|
||||
|
||||
<!-- Calendar Month View -->
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
</hbox>
|
||||
<hbox id="start-date-box" align="center">
|
||||
<textbox class="date-text-class" id="start-date-text" readonly="true" onmousedown="prepareDatePicker('start-date-text')" popup="oe-date-picker-popup" position="after_start"/>
|
||||
<image class="four-state-image-button event-date-button-class" id="start-date-button" onmousedown="prepareDatePicker('start-date-text')" popup="oe-date-picker-popup" position="after_start" />
|
||||
<image class="event-date-button-class" id="start-date-button" onmousedown="prepareDatePicker('start-date-text')" popup="oe-date-picker-popup" position="after_start" />
|
||||
</hbox>
|
||||
</row>
|
||||
|
||||
|
@ -147,7 +147,7 @@
|
|||
</hbox>
|
||||
<hbox id="end-date-box" align="center">
|
||||
<textbox class="date-text-class" id="end-date-text" readonly="true" onmousedown="prepareDatePicker('end-date-text')" popup="oe-date-picker-popup" position="after_start"/>
|
||||
<image class="four-state-image-button event-date-button-class" id="end-date-button" onmousedown="prepareDatePicker('end-date-text')" popup="oe-date-picker-popup" position="after_start" />
|
||||
<image class="event-date-button-class" id="end-date-button" onmousedown="prepareDatePicker('end-date-text')" popup="oe-date-picker-popup" position="after_start" />
|
||||
</hbox>
|
||||
</row>
|
||||
|
||||
|
@ -165,7 +165,7 @@
|
|||
</hbox>
|
||||
<hbox id="start-event-time-box" align="center">
|
||||
<textbox id="start-time-text" readonly="true" value="" onmousedown="prepareTimePicker('start-time-text')" popup="oe-time-picker-popup" position="after_start"/>
|
||||
<image class="four-state-image-button" id="start-time-button" onmousedown="prepareTimePicker('start-time-text')" popup="oe-time-picker-popup" position="after_start"/>
|
||||
<image id="start-time-button" onmousedown="prepareTimePicker('start-time-text')" popup="oe-time-picker-popup" position="after_start"/>
|
||||
</hbox>
|
||||
</row>
|
||||
|
||||
|
@ -177,7 +177,7 @@
|
|||
</hbox>
|
||||
<hbox id="end-event-time-box" align="center">
|
||||
<textbox id="end-time-text" readonly="true" value="" onmousedown="prepareTimePicker('end-time-text')" popup="oe-time-picker-popup" position="after_start"/>
|
||||
<image class="four-state-image-button" id="end-time-button" onmousedown="prepareTimePicker('end-time-text')" popup="oe-time-picker-popup" position="after_start"/>
|
||||
<image id="end-time-button" onmousedown="prepareTimePicker('end-time-text')" popup="oe-time-picker-popup" position="after_start"/>
|
||||
</hbox>
|
||||
</row>
|
||||
|
||||
|
@ -288,7 +288,7 @@
|
|||
<radio group="repeat-until-group" id="repeat-until-radio" disable-controller="repeat" selected="true" label="&newevent.until.label;" oncommand="commandUntil()"/>
|
||||
<spacer id="until-spacer"/>
|
||||
<textbox id="repeat-end-date-text" readonly="true" value="" onmousedown="prepareDatePicker('repeat-end-date-text')" popup="oe-date-picker-popup" position="before_start"/>
|
||||
<image class="four-state-image-button" id="repeat-end-date-button" onmousedown="prepareDatePicker('repeat-end-date-text')" popup="oe-date-picker-popup" position="before_start"/>
|
||||
<image id="repeat-end-date-button" onmousedown="prepareDatePicker('repeat-end-date-text')" popup="oe-date-picker-popup" position="before_start"/>
|
||||
</hbox>
|
||||
|
||||
|
||||
|
|
|
@ -52,11 +52,6 @@
|
|||
<popup id="oe-date-picker-popup" oncommand="yourCommandFunction( this )" >
|
||||
</popup>
|
||||
*
|
||||
* Attach the date picker to an item using the popup attribute, an image for example:
|
||||
*
|
||||
<image class="four-state-image-button" popup="oe-date-picker-popup" onmousedown="yourPrepareDatePickerFunction()" />
|
||||
|
||||
*
|
||||
* In your .js, initialize the picker with the inital date when the user clicks, set to now in this example:
|
||||
*
|
||||
function yourPrepareDatePickerFunction( )
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
</hbox>
|
||||
<hbox id="start-date-box" align="center">
|
||||
<textbox class="date-text-class" id="start-date-text" readonly="true" onmousedown="prepareDatePicker('start-date-text')" popup="oe-date-picker-popup" position="after_start"/>
|
||||
<image class="four-state-image-button event-date-button-class" id="start-date-button" onmousedown="prepareDatePicker('start-date-text')" popup="oe-date-picker-popup" position="after_start" />
|
||||
<image class="event-date-button-class" id="start-date-button" onmousedown="prepareDatePicker('start-date-text')" popup="oe-date-picker-popup" position="after_start" />
|
||||
</hbox>
|
||||
</row>
|
||||
|
||||
|
@ -147,7 +147,7 @@
|
|||
</hbox>
|
||||
<hbox id="end-date-box" align="center">
|
||||
<textbox class="date-text-class" id="end-date-text" readonly="true" onmousedown="prepareDatePicker('end-date-text')" popup="oe-date-picker-popup" position="after_start"/>
|
||||
<image class="four-state-image-button event-date-button-class" id="end-date-button" onmousedown="prepareDatePicker('end-date-text')" popup="oe-date-picker-popup" position="after_start" />
|
||||
<image class="event-date-button-class" id="end-date-button" onmousedown="prepareDatePicker('end-date-text')" popup="oe-date-picker-popup" position="after_start" />
|
||||
</hbox>
|
||||
</row>
|
||||
|
||||
|
@ -165,7 +165,7 @@
|
|||
</hbox>
|
||||
<hbox id="start-event-time-box" align="center">
|
||||
<textbox id="start-time-text" readonly="true" value="" onmousedown="prepareTimePicker('start-time-text')" popup="oe-time-picker-popup" position="after_start"/>
|
||||
<image class="four-state-image-button" id="start-time-button" onmousedown="prepareTimePicker('start-time-text')" popup="oe-time-picker-popup" position="after_start"/>
|
||||
<image id="start-time-button" onmousedown="prepareTimePicker('start-time-text')" popup="oe-time-picker-popup" position="after_start"/>
|
||||
</hbox>
|
||||
</row>
|
||||
|
||||
|
@ -177,7 +177,7 @@
|
|||
</hbox>
|
||||
<hbox id="end-event-time-box" align="center">
|
||||
<textbox id="end-time-text" readonly="true" value="" onmousedown="prepareTimePicker('end-time-text')" popup="oe-time-picker-popup" position="after_start"/>
|
||||
<image class="four-state-image-button" id="end-time-button" onmousedown="prepareTimePicker('end-time-text')" popup="oe-time-picker-popup" position="after_start"/>
|
||||
<image id="end-time-button" onmousedown="prepareTimePicker('end-time-text')" popup="oe-time-picker-popup" position="after_start"/>
|
||||
</hbox>
|
||||
</row>
|
||||
|
||||
|
@ -288,7 +288,7 @@
|
|||
<radio group="repeat-until-group" id="repeat-until-radio" disable-controller="repeat" selected="true" label="&newevent.until.label;" oncommand="commandUntil()"/>
|
||||
<spacer id="until-spacer"/>
|
||||
<textbox id="repeat-end-date-text" readonly="true" value="" onmousedown="prepareDatePicker('repeat-end-date-text')" popup="oe-date-picker-popup" position="before_start"/>
|
||||
<image class="four-state-image-button" id="repeat-end-date-button" onmousedown="prepareDatePicker('repeat-end-date-text')" popup="oe-date-picker-popup" position="before_start"/>
|
||||
<image id="repeat-end-date-button" onmousedown="prepareDatePicker('repeat-end-date-text')" popup="oe-date-picker-popup" position="before_start"/>
|
||||
</hbox>
|
||||
|
||||
|
||||
|
|
|
@ -52,11 +52,6 @@
|
|||
<popup id="oe-time-picker-popup" oncommand="yourCommandFunction( this )" >
|
||||
</popup>
|
||||
*
|
||||
* Attach the time picker to an item using the popup attribute, an image for example:
|
||||
*
|
||||
<image class="four-state-image-button" popup="oe-time-picker-popup" onmousedown="yourPrepareTimePickerFunction()" />
|
||||
|
||||
*
|
||||
* In your .js, initialize the picker with the inital time when the user clicks, set to now in this example:
|
||||
*
|
||||
function yourPrepareTimePickerFunction( )
|
||||
|
|
|
@ -0,0 +1,494 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is OEone Calendar Code, released October 31st, 2001.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* OEone Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2001
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s): Garth Smedley <garths@oeone.com>
|
||||
* Mike Potter <mikep@oeone.com>
|
||||
* Chris Charabaruk <coldacid@meldstar.com>
|
||||
* Colin Phillips <colinp@oeone.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*-----------------------------------------------------------------
|
||||
* U N I F I N D E R
|
||||
*
|
||||
* This is a hacked in interface to the unifinder. We will need to
|
||||
* improve this to make it usable in general.
|
||||
*/
|
||||
|
||||
var gkungFooDeathGripOnEventBoxes;
|
||||
|
||||
function unifinderInit( CalendarWindow )
|
||||
{
|
||||
var unifinderEventSelectionObserver =
|
||||
{
|
||||
onSelectionChanged : function( EventSelectionArray )
|
||||
{
|
||||
var CategoriesTree = document.getElementById( "unifinder-categories-tree" );
|
||||
|
||||
CategoriesTree.setAttribute( "suppressonselect", "true" );
|
||||
|
||||
var SearchTree = document.getElementById( "unifinder-search-results-tree" );
|
||||
|
||||
SearchTree.setAttribute( "suppressonselect", "true" );
|
||||
|
||||
CategoriesTree.clearSelection();
|
||||
|
||||
SearchTree.clearSelection();
|
||||
|
||||
if( EventSelectionArray.length > 0 )
|
||||
{
|
||||
for( i = 0; i < EventSelectionArray.length; i++ )
|
||||
{
|
||||
var CategoriesTreeItem = document.getElementById( "unifinder-treeitem-"+EventSelectionArray[i].id );
|
||||
|
||||
var SearchTreeItem = document.getElementById( "search-unifinder-treeitem-"+EventSelectionArray[i].id );
|
||||
|
||||
//you need this for when an event is added. It doesn't yet exist.
|
||||
if( CategoriesTreeItem )
|
||||
CategoriesTree.addItemToSelection( CategoriesTreeItem );
|
||||
|
||||
//you need this for when an event is added. It doesn't yet exist.
|
||||
if( SearchTreeItem )
|
||||
SearchTree.addItemToSelection( SearchTreeItem );
|
||||
}
|
||||
}
|
||||
dump( "\nAllow on select now!" );
|
||||
CategoriesTree.removeAttribute( "suppressonselect" );
|
||||
|
||||
SearchTree.removeAttribute( "suppressonselect" );
|
||||
}
|
||||
}
|
||||
|
||||
gCalendarWindow.EventSelection.addObserver( unifinderEventSelectionObserver );
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
var gSearchEventTable = new Array();
|
||||
|
||||
var gDateFormater = new DateFormater();
|
||||
|
||||
/**
|
||||
* Observer for the calendar event data source. This keeps the unifinder
|
||||
* display up to date when the calendar event data is changed
|
||||
*/
|
||||
|
||||
var unifinderEventDataSourceObserver =
|
||||
{
|
||||
onLoad : function()
|
||||
{
|
||||
unifinderRefesh();
|
||||
},
|
||||
|
||||
onStartBatch : function()
|
||||
{
|
||||
},
|
||||
|
||||
onEndBatch : function()
|
||||
{
|
||||
unifinderRefesh();
|
||||
},
|
||||
|
||||
onAddItem : function( calendarEvent )
|
||||
{
|
||||
if( calendarEvent )
|
||||
{
|
||||
unifinderRefesh();
|
||||
}
|
||||
},
|
||||
|
||||
onModifyItem : function( calendarEvent, originalEvent )
|
||||
{
|
||||
unifinderRefesh();
|
||||
},
|
||||
|
||||
onDeleteItem : function( calendarEvent )
|
||||
{
|
||||
unifinderRefesh();
|
||||
},
|
||||
|
||||
onAlarm : function( calendarEvent )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Called when the calendar is loaded
|
||||
*/
|
||||
|
||||
function prepareCalendarUnifinder( eventSource )
|
||||
{
|
||||
// tell the unifinder to get ready
|
||||
unifinderInit();
|
||||
|
||||
// set up our calendar event observer
|
||||
|
||||
gICalLib.addObserver( unifinderEventDataSourceObserver );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Helper function to display event dates in the unifinder
|
||||
*/
|
||||
|
||||
function formatUnifinderEventDate( date )
|
||||
{
|
||||
return( gDateFormater.getFormatedDate( date ) );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Helper function to display event times in the unifinder
|
||||
*/
|
||||
|
||||
function formatUnifinderEventTime( time )
|
||||
{
|
||||
var timeString = gDateFormater.getFormatedTime( time );
|
||||
return timeString;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by event observers to update the display
|
||||
*/
|
||||
|
||||
function unifinderRefesh()
|
||||
{
|
||||
var eventTable = gEventSource.getAllEvents();
|
||||
|
||||
refreshCategoriesTree( eventTable );
|
||||
|
||||
refreshSearchTree( eventTable );
|
||||
|
||||
unifinderSearchKeyPress( document.getElementById( 'unifinder-search-field' ), null );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Redraw the event tree
|
||||
*/
|
||||
|
||||
function refreshCategoriesTree( eventTable )
|
||||
{
|
||||
refreshEventTree( eventTable, "unifinder-categories-tree" );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Redraw the search tree
|
||||
*/
|
||||
|
||||
function refreshSearchTree( SearchEventTable )
|
||||
{
|
||||
gSearchEventTable = SearchEventTable;
|
||||
|
||||
refreshEventTree( gSearchEventTable, "unifinder-search-results-tree", false );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This is attached to the ondblclik attribute of the events shown in the unifinder
|
||||
*/
|
||||
|
||||
function unifinderDoubleClickEvent( id )
|
||||
{
|
||||
// find event by id
|
||||
|
||||
var calendarEvent = gICalLib.fetchEvent( id );
|
||||
|
||||
if( calendarEvent != null )
|
||||
{
|
||||
// go to day view, of the day of the event, select the event
|
||||
|
||||
//gCalendarWindow.dayView.clickEventBox( calendarEvent );
|
||||
|
||||
editEvent( calendarEvent );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This is attached to the onclik attribute of the events shown in the unifinder
|
||||
*/
|
||||
|
||||
function unifinderClickEvent( CallingListBox )
|
||||
{
|
||||
var ListBox = CallingListBox;
|
||||
dump( "\non unifinder click event" );
|
||||
var ArrayOfEvents = new Array();
|
||||
|
||||
for( i = 0; i < ListBox.selectedItems.length; i++ )
|
||||
{
|
||||
var calendarEvent = ListBox.selectedItems[i].event;
|
||||
|
||||
ArrayOfEvents[ ArrayOfEvents.length ] = calendarEvent;
|
||||
}
|
||||
|
||||
gCalendarWindow.EventSelection.setArrayToSelection( ArrayOfEvents );
|
||||
|
||||
if( ListBox.selectedItems.length > 0 && ListBox.selectedItems.length < 2 )
|
||||
{
|
||||
var eventBox = gCalendarWindow.currentView.getVisibleEvent( calendarEvent );
|
||||
if ( !eventBox )
|
||||
{
|
||||
var eventStartDate = new Date( calendarEvent.start.getTime() );
|
||||
|
||||
gCalendarWindow.currentView.goToDay( eventStartDate, true);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This is called from the unifinder's modify command
|
||||
*/
|
||||
|
||||
function unifinderModifyCommand()
|
||||
{
|
||||
var SelectedItem = document.getElementById( "unifinder-categories-tree" ).selectedItems[0];
|
||||
|
||||
if( SelectedItem )
|
||||
{
|
||||
if( SelectedItem.getAttribute( "container" ) == "true" )
|
||||
{
|
||||
launchEditCategoryDialog( SelectedItem.categoryobject );
|
||||
}
|
||||
else
|
||||
{
|
||||
var calendarEvent = gCalendarWindow.EventSelection.selectedEvents[0];
|
||||
|
||||
if( calendarEvent != null )
|
||||
{
|
||||
editEvent( calendarEvent );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This is called from the unifinder's remove command
|
||||
*/
|
||||
|
||||
function unifinderRemoveCommand( DoNotConfirm )
|
||||
{
|
||||
var SelectedItems = gCalendarWindow.EventSelection.selectedEvents;
|
||||
|
||||
if( SelectedItems.length == 1 )
|
||||
{
|
||||
var calendarEvent = SelectedItems[0];
|
||||
|
||||
if ( calendarEvent.title != "" ) {
|
||||
if( !DoNotConfirm ) {
|
||||
if ( confirm( confirmDeleteEvent+" "+calendarEvent.title+"?" ) ) {
|
||||
gICalLib.deleteEvent( calendarEvent.id );
|
||||
}
|
||||
}
|
||||
else
|
||||
gICalLib.deleteEvent( calendarEvent.id );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( !DoNotConfirm ) {
|
||||
if ( confirm( confirmDeleteUntitledEvent ) ) {
|
||||
gICalLib.deleteEvent( calendarEvent.id );
|
||||
}
|
||||
}
|
||||
else
|
||||
gICalLib.deleteEvent( calendarEvent.id );
|
||||
}
|
||||
}
|
||||
else if( SelectedItems.length > 1 )
|
||||
{
|
||||
if( !DoNotConfirm )
|
||||
{
|
||||
if( confirm( "Are you sure you want to delete everything?" ) )
|
||||
{
|
||||
while( SelectedItems.length )
|
||||
{
|
||||
var ThisItem = SelectedItems.pop();
|
||||
|
||||
gICalLib.deleteEvent( ThisItem.id );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while( SelectedItems.length )
|
||||
{
|
||||
var ThisItem = SelectedItems.pop();
|
||||
|
||||
gICalLib.deleteEvent( ThisItem.id );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This is called from the unifinder when a key is pressed in the search field
|
||||
*/
|
||||
|
||||
function unifinderSearchKeyPress( searchTextItem, event )
|
||||
{
|
||||
var searchText = searchTextItem.value;
|
||||
|
||||
if ( searchTextItem.value == '' )
|
||||
{
|
||||
gSearchEventTable = gEventSource.getAllEvents();
|
||||
}
|
||||
else if ( searchTextItem.value == " " )
|
||||
{
|
||||
searchTextItem.value = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
var FieldsToSearch = new Array( "title", "description", "location" );
|
||||
gSearchEventTable = gEventSource.search( searchText, FieldsToSearch );
|
||||
}
|
||||
|
||||
refreshSearchTree( gSearchEventTable );
|
||||
}
|
||||
|
||||
/**
|
||||
* Redraw the categories unifinder tree
|
||||
*/
|
||||
|
||||
function refreshEventTree( eventArray, childrenName, Categories )
|
||||
{
|
||||
// get the old tree children item and remove it
|
||||
|
||||
var oldTreeChildren = document.getElementById( childrenName );
|
||||
while( oldTreeChildren.hasChildNodes() )
|
||||
oldTreeChildren.removeChild( oldTreeChildren.lastChild );
|
||||
|
||||
gkungFooDeathGripOnEventBoxes = new Array();
|
||||
|
||||
// add: tree item, row, cell, box and text items for every event
|
||||
for( var index = 0; index < eventArray.length; ++index )
|
||||
{
|
||||
var calendarEvent = eventArray[ index ];
|
||||
|
||||
// make the items
|
||||
var treeItem = document.createElement( "listitem" );
|
||||
|
||||
if( Categories != false )
|
||||
treeItem.setAttribute( "id", "unifinder-treeitem-"+calendarEvent.id );
|
||||
else
|
||||
treeItem.setAttribute( "id", "search-unifinder-treeitem-"+calendarEvent.id );
|
||||
|
||||
treeItem.event = calendarEvent;
|
||||
gkungFooDeathGripOnEventBoxes.push( treeItem );
|
||||
|
||||
treeItem.setAttribute( "ondblclick" , "unifinderDoubleClickEvent(" + calendarEvent.id + ")" );
|
||||
//treeItem.setAttribute( "onclick" , "unifinderClickEvent(" + calendarEvent.id + ")" );
|
||||
|
||||
var treeCell = document.createElement( "listcell" );
|
||||
treeCell.setAttribute( "flex" , "1" );
|
||||
treeCell.setAttribute( "crop", "right" );
|
||||
|
||||
var image = document.createElement( "image" );
|
||||
image.setAttribute( "class", "unifinder-calendar-event-icon-class" );
|
||||
|
||||
if ( calendarEvent.alarm )
|
||||
{
|
||||
image.setAttribute( "alarm", "true" );
|
||||
}
|
||||
else if( calendarEvent.recur == true )
|
||||
{
|
||||
image.setAttribute( "recur", "true" );
|
||||
}
|
||||
|
||||
var treeCellHBox = document.createElement( "hbox" );
|
||||
|
||||
treeCellHBox.setAttribute( "flex" , "1" );
|
||||
treeCellHBox.setAttribute( "class", "unifinder-treecell-box-class" );
|
||||
treeCellHBox.setAttribute( "crop", "right" );
|
||||
treeCellHBox.setAttribute( "align", "center" );
|
||||
|
||||
var treeCellVBox = document.createElement( "vbox" );
|
||||
treeCellVBox.setAttribute( "crop", "right" );
|
||||
treeCellVBox.setAttribute( "flex", "1" );
|
||||
|
||||
var text1 = document.createElement( "label" );
|
||||
text1.setAttribute( "crop", "right" );
|
||||
|
||||
var text2 = document.createElement( "label" );
|
||||
text2.setAttribute( "crop", "right" );
|
||||
|
||||
// set up the display and behaviour of the tree items
|
||||
// set the text of the two text items
|
||||
|
||||
text1.setAttribute( "value" , calendarEvent.title );
|
||||
|
||||
var eventStartDate = new Date( calendarEvent.start.getTime() );
|
||||
var eventEndDate = new Date( calendarEvent.end.getTime() );
|
||||
var startDate = formatUnifinderEventDate( eventStartDate );
|
||||
var startTime = formatUnifinderEventTime( eventStartDate );
|
||||
var endTime = formatUnifinderEventTime( eventEndDate );
|
||||
|
||||
if( calendarEvent.allDay )
|
||||
{
|
||||
text2.setAttribute( "value" , "All day on " + startDate + "" );
|
||||
}
|
||||
else
|
||||
{
|
||||
text2.setAttribute( "value" , startDate + " " + startTime + " - " + endTime );
|
||||
}
|
||||
|
||||
|
||||
// add the items
|
||||
if ( calendarEvent.title )
|
||||
{
|
||||
treeCellVBox.appendChild( text1 );
|
||||
}
|
||||
treeCellVBox.appendChild( text2 );
|
||||
|
||||
treeCellHBox.appendChild( image );
|
||||
treeCellHBox.appendChild( treeCellVBox );
|
||||
|
||||
treeCell.appendChild( treeCellHBox );
|
||||
|
||||
treeItem.appendChild( treeCell );
|
||||
|
||||
oldTreeChildren.appendChild( treeItem );
|
||||
|
||||
//you need this for when an event is added.
|
||||
if( gCalendarWindow.EventSelection.isSelectedEvent( calendarEvent ) )
|
||||
oldTreeChildren.addItemToSelection( treeItem );
|
||||
}
|
||||
}
|
|
@ -19,16 +19,12 @@ calendar.jar:
|
|||
content/calendar/calendarMail.js (content/calendarMail.js)
|
||||
content/calendar/contents.rdf (content/contents.rdf)
|
||||
content/calendar/dateUtils.js (content/dateUtils.js)
|
||||
content/calendar/penBindings.xml (content/penBindings.xml)
|
||||
content/calendar/sound.wav (content/sound.wav)
|
||||
content/calendar/datepicker/datepicker-overlay.xul (content/datepicker/datepicker-overlay.xul)
|
||||
content/calendar/datepicker/datepicker.js (content/datepicker/datepicker.js)
|
||||
content/calendar/timepicker/timepicker-overlay.xul (content/timepicker/timepicker-overlay.xul)
|
||||
content/calendar/timepicker/timepicker.js (content/timepicker/timepicker.js)
|
||||
content/calendar/unifinder/unifinder.js (content/unifinder/unifinder.js)
|
||||
content/calendar/unifinder/unifinderBindings.xml (content/unifinder/unifinderBindings.xml)
|
||||
content/calendar/unifinder/unifinderOverlay.xul (content/unifinder/unifinderOverlay.xul)
|
||||
content/calendar/unifinder/unifinderxul.css (content/unifinder/unifinderxul.css)
|
||||
content/calendar/unifinder.js (content/unifinder.js)
|
||||
content/calendar/pref/calendarPrefOverlay.xul (content/pref/calendarPrefOverlay.xul)
|
||||
content/calendar/pref/rootCalendarPref.js (content/pref/rootCalendarPref.js)
|
||||
content/calendar/pref/calendarPref.js (content/pref/calendarPref.js)
|
||||
|
@ -101,15 +97,15 @@ calendar.jar:
|
|||
skin/modern/calendar/datepicker/right_arrow.png (skin/modern/datepicker/right_arrow.png)
|
||||
skin/modern/calendar/timepicker/time_picker_minutes_bottom.png (skin/modern/timepicker/time_picker_minutes_bottom.png)
|
||||
skin/modern/calendar/timepicker/timepicker.css (skin/modern/timepicker/timepicker.css)
|
||||
skin/modern/calendar/unifinder/modify_disabled.png (skin/modern/unifinder/modify_disabled.png)
|
||||
skin/modern/calendar/unifinder/modify_down.png (skin/modern/unifinder/modify_down.png)
|
||||
skin/modern/calendar/unifinder/modify_hover.png (skin/modern/unifinder/modify_hover.png)
|
||||
skin/modern/calendar/unifinder/modify_up.png (skin/modern/unifinder/modify_up.png)
|
||||
skin/modern/calendar/unifinder/remove_disabled.png (skin/modern/unifinder/remove_disabled.png)
|
||||
skin/modern/calendar/unifinder/remove_down.png (skin/modern/unifinder/remove_down.png)
|
||||
skin/modern/calendar/unifinder/remove_hover.png (skin/modern/unifinder/remove_hover.png)
|
||||
skin/modern/calendar/unifinder/remove_up.png (skin/modern/unifinder/remove_up.png)
|
||||
skin/modern/calendar/unifinder/unifinder.css (skin/modern/unifinder/unifinder.css)
|
||||
skin/modern/calendar/modify_disabled.png (skin/modern/modify_disabled.png)
|
||||
skin/modern/calendar/modify_down.png (skin/modern/modify_down.png)
|
||||
skin/modern/calendar/modify_hover.png (skin/modern/modify_hover.png)
|
||||
skin/modern/calendar/modify_up.png (skin/modern/modify_up.png)
|
||||
skin/modern/calendar/remove_disabled.png (skin/modern/remove_disabled.png)
|
||||
skin/modern/calendar/remove_down.png (skin/modern/remove_down.png)
|
||||
skin/modern/calendar/remove_hover.png (skin/modern/remove_hover.png)
|
||||
skin/modern/calendar/remove_up.png (skin/modern/remove_up.png)
|
||||
skin/modern/calendar/unifinder.css (skin/modern/unifinder.css)
|
||||
skin/classic/calendar/all_day_event.gif (skin/classic/all_day_event.gif)
|
||||
skin/classic/calendar/all_day_event_down.gif (skin/classic/all_day_event_down.gif)
|
||||
skin/classic/calendar/all_day_event_hover.gif (skin/classic/all_day_event_hover.gif)
|
||||
|
@ -170,12 +166,12 @@ calendar.jar:
|
|||
skin/classic/calendar/datepicker/right_arrow.png (skin/classic/datepicker/right_arrow.png)
|
||||
skin/classic/calendar/timepicker/time_picker_minutes_bottom.png (skin/classic/timepicker/time_picker_minutes_bottom.png)
|
||||
skin/classic/calendar/timepicker/timepicker.css (skin/classic/timepicker/timepicker.css)
|
||||
skin/classic/calendar/unifinder/modify_disabled.png (skin/classic/unifinder/modify_disabled.png)
|
||||
skin/classic/calendar/unifinder/modify_down.png (skin/classic/unifinder/modify_down.png)
|
||||
skin/classic/calendar/unifinder/modify_hover.png (skin/classic/unifinder/modify_hover.png)
|
||||
skin/classic/calendar/unifinder/modify_up.png (skin/classic/unifinder/modify_up.png)
|
||||
skin/classic/calendar/unifinder/remove_disabled.png (skin/classic/unifinder/remove_disabled.png)
|
||||
skin/classic/calendar/unifinder/remove_down.png (skin/classic/unifinder/remove_down.png)
|
||||
skin/classic/calendar/unifinder/remove_hover.png (skin/classic/unifinder/remove_hover.png)
|
||||
skin/classic/calendar/unifinder/remove_up.png (skin/classic/unifinder/remove_up.png)
|
||||
skin/classic/calendar/unifinder/unifinder.css (skin/classic/unifinder/unifinder.css)
|
||||
skin/classic/calendar/modify_disabled.png (skin/classic/modify_disabled.png)
|
||||
skin/classic/calendar/modify_down.png (skin/classic/modify_down.png)
|
||||
skin/classic/calendar/modify_hover.png (skin/classic/modify_hover.png)
|
||||
skin/classic/calendar/modify_up.png (skin/classic/modify_up.png)
|
||||
skin/classic/calendar/remove_disabled.png (skin/classic/remove_disabled.png)
|
||||
skin/classic/calendar/remove_down.png (skin/classic/remove_down.png)
|
||||
skin/classic/calendar/remove_hover.png (skin/classic/remove_hover.png)
|
||||
skin/classic/calendar/remove_up.png (skin/classic/remove_up.png)
|
||||
skin/classic/calendar/unifinder.css (skin/classic/unifinder.css)
|
||||
|
|
|
@ -69,27 +69,6 @@
|
|||
max-height : 33px;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
* Button bar vertical divider line
|
||||
*-------------------------------------------------------------------*/
|
||||
|
||||
.calendar-control-divider
|
||||
{
|
||||
list-style-image : url("chrome://calendar/skin/divider.png");
|
||||
}
|
||||
|
||||
|
||||
button.calendar-management-button,
|
||||
button.calendar-management-button:hover,
|
||||
button.calendar-management-button:hover:active
|
||||
{
|
||||
margin : 0px;
|
||||
border : 0px;
|
||||
-moz-binding : url("chrome://calendar/content/penBindings.xml#penButton");
|
||||
-moz-user-focus : ignore !important;
|
||||
max-height : 36px;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
* new event button
|
||||
*-------------------------------------------------------------------*/
|
||||
|
|
После Ширина: | Высота: | Размер: 168 B |
После Ширина: | Высота: | Размер: 356 B |
После Ширина: | Высота: | Размер: 356 B |
После Ширина: | Высота: | Размер: 168 B |
После Ширина: | Высота: | Размер: 240 B |
После Ширина: | Высота: | Размер: 235 B |
После Ширина: | Высота: | Размер: 239 B |
После Ширина: | Высота: | Размер: 184 B |
|
@ -69,27 +69,6 @@
|
|||
max-height : 33px;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
* Button bar vertical divider line
|
||||
*-------------------------------------------------------------------*/
|
||||
|
||||
.calendar-control-divider
|
||||
{
|
||||
list-style-image : url("chrome://calendar/skin/divider.png");
|
||||
}
|
||||
|
||||
|
||||
button.calendar-management-button,
|
||||
button.calendar-management-button:hover,
|
||||
button.calendar-management-button:hover:active
|
||||
{
|
||||
margin : 0px;
|
||||
border : 0px;
|
||||
-moz-binding : url("chrome://calendar/content/penBindings.xml#penButton");
|
||||
-moz-user-focus : ignore !important;
|
||||
max-height : 36px;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
* new event button
|
||||
*-------------------------------------------------------------------*/
|
||||
|
|
После Ширина: | Высота: | Размер: 222 B |
После Ширина: | Высота: | Размер: 222 B |
После Ширина: | Высота: | Размер: 222 B |
После Ширина: | Высота: | Размер: 222 B |
После Ширина: | Высота: | Размер: 382 B |
После Ширина: | Высота: | Размер: 387 B |
После Ширина: | Высота: | Размер: 381 B |
После Ширина: | Высота: | Размер: 382 B |