Updating files for big change.

This commit is contained in:
mikep%oeone.com 2001-12-20 20:13:53 +00:00
Родитель f09cad0452
Коммит f5a5117184
14 изменённых файлов: 1144 добавлений и 1084 удалений

39
calendar/install.js Normal file
Просмотреть файл

@ -0,0 +1,39 @@
initInstall("Mozilla Calendar", "/Mozilla/Calendar", "0.7");
calendarDir = getFolder("Chrome","calendar");
setPackageFolder(calendarDir);
var err = addDirectory("", "resources", getFolder("Chrome","calendar"), "" );
addDirectory("", "components", getFolder( "Components" ), "" );
if ( err == SUCCESS ) {
var calendarContent = getFolder(calendarDir, "content");
var calendarSkin = getFolder(calendarDir, "skin");
var calendarLocale = getFolder(calendarDir, "locale");
var returnval = registerChrome(CONTENT | DELAYED_CHROME, calendarContent );
var returnval = registerChrome(SKIN | DELAYED_CHROME, calendarSkin, "modern/");
var returnval = registerChrome(LOCALE | DELAYED_CHROME, calendarLocale, "en-US/");
err = performInstall();
if ( err == SUCCESS ) {
alert("The Mozilla Calendar has been succesfully installed. \n"
+"Please restart your browser to continue.");
}
else {
alert("performInstall() failed. \n"
+"_____________________________\nError code:" + err);
cancelInstall(err);
}
}
else {
alert("Failed to create directory. \n"
+"You probably don't have appropriate permissions \n"
+"(write access to mozilla/chrome directory). \n"
+"_____________________________\nError code:" + err);
cancelInstall(err);
}

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

@ -126,11 +126,7 @@ function calendarInit()
{
// get the calendar event data source
// global calendar
var dirServiceProvider = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIDirectoryServiceProvider);
var persistent = new Object();
var homeDir = dirServiceProvider.getFile("Home", persistent);
gEventSource = new CalendarEventDataSource( null, homeDir.unicodePath );
gEventSource = new CalendarEventDataSource( );
// get the Ical Library
gICalLib = gEventSource.getICalLib();

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

@ -42,6 +42,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"?>
<!-- Overlays -->
@ -91,7 +92,6 @@
<script type="application/x-javascript" src="chrome://calendar/content/unifinder/unifinder.js"/>
<script type="application/x-javascript" src="chrome://calendar/content/calendar.js"/>
<script type="application/x-javascript" src="chrome://calendar/content/unifinder.js"/>
<script type="application/x-javascript" src="chrome://calendar/content/calendarEvent.js"/>
@ -113,10 +113,10 @@
<popup id="unifinder-options-menu" position="end_before">
<!--
<menuitem label="&calendar.menu.options.newcategory;" oncommand="unifinderNewCategoryCommand()" />
<menuitem id="unifinder-newcategory-menu" label="&calendar.menu.options.newcategory;" oncommand="unifinderNewCategoryCommand()" />
-->
<menuitem label="&calendar.menu.options.modify;" oncommand="unifinderModifyCommand()" />
<menuitem label="&calendar.menu.options.remove;" oncommand="unifinderRemoveCommand()" />
<menuitem id="unifinder-modify-menu" label="&calendar.menu.options.modify;" oncommand="unifinderModifyCommand()" />
<menuitem id="unifinder-remove-menu" label="&calendar.menu.options.remove;" oncommand="unifinderRemoveCommand()" />
</popup>
</popupset>
@ -164,7 +164,13 @@
<unifinder id="calendar-unifinder-overlay" menu-popup="unifinder-options-menu" flex="1"/>
<splitter id="unifinder-splitter" />
<splitter id="unifinder-splitter" collapse="before" persist="state hidden collapsed"
class="chromeclass-extrachrome sidebar-splitter"
orient="vertical">
<grippy class="sidebar-splitter-grippy"/>
</splitter>
<popupset>
<popup id="savetip" style="background-color: #FFFFC0;">

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

@ -101,20 +101,19 @@ function CalendarEventDataSource( observer, UserPath, syncPath )
this.gICalLib = iCalLibComponent.QueryInterface(Components.interfaces.oeIICal);
if( UserPath == null )
this.UserPath = penapplication.penroot.getUserPath();
else
this.UserPath = UserPath;
var dirServiceProvider = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIDirectoryServiceProvider);
var persistent = new Object();
var UserPath = dirServiceProvider.getFile("Home", persistent);
this.UserPath = UserPath.unicodePath;
this.gICalLib.setServer( this.UserPath+"/.oecalendar" );
this.gICalLib.addObserver( observer );
this.prepareSync( syncPath );
this.prepareAlarms( );
this.timers = new Array();
}
@ -146,16 +145,6 @@ CalendarEventDataSource.debug = function( str )
CalendarEventDataSource.prototype.onServiceStartup = function( root )
{
// if there is a a palm service register with it so we get notified
// of palm sync events
this.palmService = root.servicesManager.getServiceByName( "org.penzilla.palmsync" );
if( this.palmService )
{
this.palmService.addObserver( this );
}
}
@ -503,277 +492,6 @@ CalendarEventDataSource.prototype.addEventToDialog = function( Event )
/** PRIVATE
*
* CalendarEventDataSource/setUpAlarmTimers.
*
* create timers for each event that has an alarm that hasn't gone off.
*/
/*
CalendarEventDataSource.prototype.setUpAlarmTimers = function( )
{
for( i = 0; i < this.timers.length; i++ )
{
window.clearTimeout( this.timers[i] );
}
var Today = new Date( );
var eventList = gICalLib.searchAlarm( Today.getFullYear(), ( Today.getMonth() + 1 ), Today.getDate(), Today.getHours(), Today.getMinutes() );
this.alarmTable = Array();
while( eventList.hasMoreElements() )
{
var tmpevent = eventList.getNext().QueryInterface(Components.interfaces.oeIICalEvent);
alarmTable[ alarmTable.length ] = tmpevent;
}
// sort them by date, we keep them that way
this.alarmTable.sort( CalendarEventDataSource.orderEventsByDate );
for( i = 0; i < this.alarmTable.length; i++ )
{
AlarmTimeInMS = this.alarmTable[i].calculateAlarmTime( );
var Now = new Date();
var TimeToAlarmInMS = AlarmTimeInMS - Now.getTime();
this.timers[ this.timers.length ] = setTimeout( "CalendarEventDataSource.respondAlarmTimeout( "+this.alarmTable[i].id+" )", TimeToAlarmInMS );
}
//alarm timers return only the alarms for the next 24 hours. Set a timeout to check again at that time.
if( this.checkAlarmIn24HoursTimeout )
clearTimeout( this.checkAlarmIn24HoursTimeout );
this.checkAlarmIn24HoursTimeout = setTimeout( "CalendarEventDataSource.setUpAlarmTimers()", 1000 * 60 * 60 * 24 );
}
*/
/*
CalendarEventDataSource.prototype.respondAcknowledgeAlarm = function( calendarEvent )
{
// notify observer
for( var index in this.observerList )
{
var observer = this.observerList[ index ];
if( observer.onAcknowledgeAlarm )
{
observer.onAcknowledgeAlarm( calendarEvent );
}
}
}
*/
/** PRIVATE
*
* CalendarEventDataSource/respondAlarmEvent.
*
* Response method for an alarm going off
*/
/*
CalendarEventDataSource.respondAlarmTimeout = function( calendarEventID )
//function respondAlarmTimeout( calendarEventID )
{
var calendarEvent = gICalLib.fetchEvent( calendarEventID );
//if( calendarEvent && calendarEvent.checkAlarm() )
//{
debug( "in CalendarEventDataSource.prototype.respondAlarmEvent\n+++++++++ALARM WENT OFF \n" +
calendarEvent.toSource() +
"\n at " +
calendarEvent.start.toString()
+ "\n+++++++++\n" );
// :TODO: The email sending stuff should be part of the CalendarEvent class
if ( calendarEvent.alarmEmailAddress )
{
//debug( "about to send an email to "+ calendarEvent.alarmEmailAddress + "with subject "+ calendarEvent.title );
//calendar.sendEmail( "Calendar Event",
// "Title: "+ calendarEvent.title + " @ "+ calendarEvent.start.toString() + "\nThis message sent from OECalendar.",
// calendarEvent.alarmEmailAddress );
}
for( var index in gCalendarEventDataSource.observerList )
{
var observer = gCalendarEventDataSource.observerList[ index ];
if( observer.onAlarm )
{
observer.onAlarm( calendarEvent );
}
}
//}
//else
//{
// reset the timer if required
// if( calendarEvent )
// calendarEvent.setUpAlarmTimer( this );
//}
}
*/
/** PRIVATE
*
* NOTES
* Helper function for setting alarms
* PARAMETERS
* minBefore - number of minutes BEFORE the event that the alarm is to be set for.
* update - if true the datasource is updated right away.
*/
/*
CalendarAlarm.prototype.setAlarm = function( units, timeBefore, update )
{
if( this.alarmWentOff != false ||
this.alarm != true ||
this.alarmLength != timeBefore ||
this.alarmUnits != units )
{
this.alarmWentOff = false;
this.alarm = true;
this.alarmLength = timeBefore;
this.alarmUnits = units;
if( this.dataSource && update )
{
this.dataSource.modifyEvent( this );
}
}
} */
/** PUBLIC
*
* PARAMETERS
*
* RETURN
* true if the alarm for this event should be sounded
*/
/*
CalendarAlarm.prototype.checkAlarm = function( )
{
if( this.alarm && ( !this.alarmWentOff || ( this.alarmWentOff && this.snoozeTime ) ) )
{
var alarmTimeMS = this.event.calculateAlarmTime();
var eventTimeMS = this.start.getTime();
var now = new Date();
var nowMS = now.getTime();
if( ( nowMS > alarmTimeMS && nowMS < eventTimeMS ) || this.snoozeTime )
{
return true;
}
else
{
return false;
}
}
else
return false;
}*/
/** PRIVATE
*
* PARAMETERS
*
* RETURN
* clear the alarm timer if there is one
*/
/*
CalendarAlarm.prototype.clearAlarmTimer = function( )
{
if( this.timerID )
{
debug( "clearing alarm for :" + this.id );
window.clearTimeout( this.timerID );
this.timerID = null;
}
}*/
/** PRIVATE
*
* PARAMETERS
*
* RETURN
* true if the alarm for this event should be sounded
*/
/*
CalendarAlarm.prototype.setUpAlarmTimer = function( dataSource )
{
// remove any existing timer
this.clearAlarmTimer();
// set up the new timer
debug( "this.alarm is "+this.alarm );
if( this.alarm && ( !this.alarmWentOff || ( this.alarmWentOff && this.snoozeTime ) ) )
{
debug( "testing alarm for :" + this.title + " " + this.start );
var alarmTimeMS = this.event.calculateAlarmTime();
var now = new Date();
var nowMS = now.getTime();
debug( "eventTime: " + this.start );
debug( "alarmTime: " + new Date(alarmTimeMS) );
debug( "now :" + new Date(nowMS) );
debug( "nowMS :\n" + nowMS + " this.start.getTime() is \n"+this.start.getTime() );
debug( "snoozeTime is "+this.snoozeTime );
if( this.snoozeTime )
{
var timeTillAlarm = this.snoozeTime - nowMS;
debug( "!-- SNOOZE IS TRUE! nowMS < this.start in penCalendarEvent.js, timeTillAlarm is "+ timeTillAlarm +" \n" );
if( timeTillAlarm < 10 )
{
timeTillAlarm = 10;
}
debug( "\n Setting alarm for MS:" + timeTillAlarm );
this.timerID = window.setTimeout( "CalendarEventDataSource.respondAlarmTimeout(" + this.id + ")", timeTillAlarm );
}
else if( nowMS < this.start.getTime() && !this.snoozeTime )
{
var timeTillAlarm = alarmTimeMS - nowMS;
debug( "!-- NO SNOOZE! nowMS < this.start in penCalendarEvent.js, timeTillAlarm is "+ timeTillAlarm +" \n" );
if( timeTillAlarm < 10 )
{
timeTillAlarm = 10;
}
debug( "\n Setting alarm for MS:" + timeTillAlarm );
this.timerID = window.setTimeout( "CalendarEventDataSource.respondAlarmTimeout(" + this.id + ")", timeTillAlarm );
}
}
}*/
CalendarEventDataSource.prototype.makeXmlNode = function( xmlDocument, calendarEvent )
{
@ -961,98 +679,6 @@ CalendarEventDataSource.prototype.makeXmlDocument = function( eventList )
return xmlDocument;
}
/** PRIVATE
*
* Before doing any sync ing we make sure the
* directory is there, if it isn't, we generate and
* return false meaning don't bother
*/
CalendarEventDataSource.prototype.prepareSyncDirectory = function( )
{
// make sure the directory exists
var dir = new Dir( this.syncPath );
if( !dir.exists() )
{
var permissions = 0744;
dir.create();
dir.permissions = permissions;
if( dir.exists() )
{
this.writeXmlDirectory( this.syncPath );
}
}
return dir.exists();
}
/** PUBLIC
*
* RETURN
* An xml document with all the event info
*/
CalendarEventDataSource.prototype.writeXmlDirectory = function( path )
{
// make sure the path has a "/" on the end
if( path[ path.length - 1 ] != "/" )
{
path = path + "/";
}
// get all the events
var eventTable = this.getAllEvents();
// Save a file for each event, unless the existing file's content matches
for( var index = 0; index < eventTable.length; ++index )
{
var calendarEvent = eventTable[ index ];
// The file name has the event id in it
var filePath = path + calendarEvent.id + ".xml";
this.writeXmlFile( filePath, [ calendarEvent ] );
}
}
/** PUBLIC
* write an xml document with all the event info
*/
CalendarEventDataSource.prototype.writeXmlFile = function( path, eventList )
{
var xmlDoc = this.makeXmlDocument( eventList );
var domSerializer = Components.classes["@mozilla.org/xmlextras/xmlserializer;1"].getService( Components.interfaces.nsIDOMSerializer );
var content = domSerializer.serializeToString( xmlDoc );
penFileUtils.writeFile( path, content );
}
CalendarEventDataSource.prototype.prepareSync = function( syncPath )
{
if( syncPath )
{
this.syncPath = syncPath+"/.oecalendarXmlDir/";
}
else
{
this.syncPath = this.UserPath+"/.oecalendarXmlDir/";
}
this.syncObserver = new CalendarSyncObserver( this );
this.gICalLib.addObserver( this.syncObserver );
}
CalendarEventDataSource.prototype.prepareAlarms = function( )
{
this.alarmObserver = new CalendarAlarmObserver( this );
@ -1061,289 +687,6 @@ CalendarEventDataSource.prototype.prepareAlarms = function( )
}
CalendarEventDataSource.prototype.onPalmSyncStart = function( )
{
CalendarEventDataSource.debug( " CalendarEventDataSource START PALM SYNC");
// get the sync directory ready if it is not there
this.prepareSyncDirectory()
}
CalendarEventDataSource.prototype.onPalmSyncEnd = function( service, success )
{
CalendarEventDataSource.debug( " CalendarEventDataSource END PALM SYNC");
// update from synced files
if( success )
{
var syncer = new DirectorySynchronizer();
syncer.sync( this.syncPath, this );
}
}
/** PUBLIC
*
* RETURN
* sync with an ical directory
*/
function DirectorySynchronizer( )
{
}
DirectorySynchronizer.prototype.sync = function( path, calendarService )
{
// make sure the path has a "/" on the end
if( path[ path.length - 1 ] != "/" )
{
path = path + "/";
}
this.path = path;
this.calendarService = calendarService;
this.iCalLib = calendarService.getICalLib();
this.eventArray = calendarService.getAllEvents();
this.makeFileList();
this.makeFileTable();
this.makeAddArray( );
this.makeDeleteUdateArrays();
this.iCalLib.batchMode = true;
this.addNewItems();
this.updateItems();
this.deleteItems();
this.iCalLib.batchMode = false;
}
DirectorySynchronizer.prototype.makeFileList = function( )
{
this.dir = new Dir( this.path );
if( !this.dir.exists() )
{
throw "DirectorySynchronizer, unable to find sync dir: " + path;
}
this.fileList = this.dir.readDir();
}
DirectorySynchronizer.prototype.makeFileTable = function( )
{
// Make a hash table by file name of the files in the list
this.fileTable = new Object()
for( var i in this.fileList )
{
var file = this.fileList[i];
var fileName = file.leaf;
this.fileTable[ fileName ] = file;
}
}
DirectorySynchronizer.prototype.makeAddArray = function( )
{
// Make a array of files that represent new events
this.addArray = new Array()
for( var i in this.fileList )
{
var file = this.fileList[i];
var fileName = file.leaf;
if( -1 != fileName.indexOf( "sync-file-palm" ) )
{
this.addArray.push( file );
}
}
}
DirectorySynchronizer.prototype.makeDeleteUdateArrays = function( )
{
// Find all events with matching file names, they will be updated
// Find all events without matching file names, they will be deleted
this.deleteArray = new Array();
this.updateArray = new Array();
for( var j = 0; j < this.eventArray.length; ++j )
{
var event = this.eventArray[ j ];
var eventFileName = event.id + ".xml";
if( ( eventFileName in this.fileTable ) )
{
this.updateArray.push( this.fileTable[ eventFileName ] );
}
else
{
this.deleteArray.push( event.id );
}
}
}
DirectorySynchronizer.prototype.readFile = function( file )
{
var content = "";
var openOK = file.open( "r" );
if( openOK )
{
content = file.read();
file.close( );
}
return content
}
DirectorySynchronizer.prototype.makeXmlDoc = function( content )
{
var domParser = Components.classes["@mozilla.org/xmlextras/domparser;1"].getService( Components.interfaces.nsIDOMParser );
if( content )
{
try
{
var xmlDocument = domParser.parseFromString( content, "text/xml" );
}
catch( e )
{
dump( "DirectorySynchronizer: Unable to parse xml '" + content + "'. " + e.toSource() );
}
if( xmlDocument )
{
return xmlDocument
}
else
{
dump( "DirectorySynchronizer: Unable to parse xml '" + content + "'. " );
}
}
return null;
}
DirectorySynchronizer.prototype.addNewItems = function( )
{
for( var i in this.addArray )
{
var file = this.addArray[i];
// read the xml from the file and make an event from it.
// delete the file so it won't bother us again
var content = this.readFile( file );
file.remove( true );
var xmlDocument = this.makeXmlDoc( content );
// convert xml document elements to event and add the event
if( xmlDocument )
{
var eventElementList = xmlDocument.getElementsByTagName( "event" );
for( var j = 0; j < eventElementList.length; ++j )
{
var eventElement = eventElementList[ j ];
var newEvent = this.calendarService.makeNewEvent();
this.calendarService.fillEventFromXmlNode( newEvent, eventElement );
dump( "\n palm<<< sync add: " + file.path + "\n");
this.iCalLib.addEvent( newEvent );
}
}
else
{
dump( "DirectorySynchronizer: Unable to read xml from file '" + file.path + "'. " );
}
}
}
DirectorySynchronizer.prototype.deleteItems = function( )
{
for( var i in this.deleteArray )
{
var eventId = this.deleteArray[i];
this.iCalLib.deleteEvent( eventId );
CalendarEventDataSource.debug( "\n palm<<< sync delete: " + eventId + "\n");
}
}
DirectorySynchronizer.prototype.updateItems = function( )
{
for( var i in this.updateArray )
{
var file = this.updateArray[i];
var eventId = file.leaf.substring( 0, file.leaf.length - 4 );
var event = this.iCalLib.fetchEvent( eventId );
if( event )
{
// read the xml from the file and make an event from it.
var content = this.readFile( file );
var xmlDocument = this.makeXmlDoc( content );
// convert xml document elements to event and update the event
if( xmlDocument )
{
var eventElementList = xmlDocument.getElementsByTagName( "event" );
if( eventElementList.length > 0 )
{
var eventElement = eventElementList[ 0 ];
// convert xml to ical event
var oldString = event.getIcalString();
this.calendarService.fillEventFromXmlNode( event, eventElement );
// if anything changed modify the event
if( event.getIcalString() != oldString )
{
CalendarEventDataSource.debug( "palm<<< sync modify: " + file.path );
CalendarEventDataSource.debug( "---old" + oldString );
CalendarEventDataSource.debug( "---new" + event.getIcalString() );
this.iCalLib.modifyEvent( event );
}
}
}
else
{
dump( "DirectorySynchronizer: Unable to read xml from file '" + file.path + "'. " );
}
}
else
{
dump( "DirectorySynchronizer: Unable to sync event, event missing '" + eventId + "'. " );
}
}
}
function CalendarAlarmObserver( calendarService )
{
this.calendarService = calendarService;
@ -1395,83 +738,4 @@ CalendarAlarmObserver.prototype.onAlarm = function( calendarEvent )
emailService.sendEmail( 'Calendar Event', EmailBody, calendarEvent.alarmEmailAddress );
}
}
}
function CalendarSyncObserver( calendarService )
{
this.calendarService = calendarService;
}
CalendarSyncObserver.prototype.onLoad = function( calendarEvent )
{
}
CalendarSyncObserver.prototype.onAddItem = function( calendarEvent )
{
if( calendarEvent )
{
if( this.calendarService.prepareSyncDirectory() )
{
var filePath = this.calendarService.syncPath + calendarEvent.id + ".xml";
this.calendarService.writeXmlFile( filePath, [ calendarEvent ] );
dump( "\n >>>palm sync add: " + filePath + "\n");
}
}
}
CalendarSyncObserver.prototype.onModifyItem = function( calendarEvent, originalEvent )
{
if( !this.calendarService.gICalLib.batchMode ) // don't write the xml out for mod items when in batch mode
{
if( calendarEvent )
{
if( this.calendarService.prepareSyncDirectory() )
{
var filePath = this.calendarService.syncPath + calendarEvent.id + ".xml";
this.calendarService.writeXmlFile( filePath, [ calendarEvent ] );
CalendarEventDataSource.debug( "\n >>>palm sync modify: " + filePath + "\n");
}
}
}
}
CalendarSyncObserver.prototype.onDeleteItem = function( calendarEvent )
{
if( calendarEvent )
{
if( this.calendarService.prepareSyncDirectory() )
{
var filePath = this.calendarService.syncPath + calendarEvent.id + ".xml";
CalendarEventDataSource.debug( "\n >>>palm sync delete: " + filePath + "\n");
var file = new File( filePath );
if( file.exists() )
{
file.remove();
}
}
}
}
CalendarSyncObserver.prototype.onAlarm = function( calendarEvent )
{
}
CalendarSyncObserver.prototype.onStartBatch = function( )
{
}
CalendarSyncObserver.prototype.onEndBatch = function( )
{
}
}

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

@ -85,6 +85,15 @@ var gTimeDifference = 3600000; //when editing an event, we change the end time
var gMode = ''; //what mode are we in? new or edit...
const kRepeatDay_0 = 1; //Sunday
const kRepeatDay_1 = 2; //Monday
const kRepeatDay_2 = 4; //Tuesday
const kRepeatDay_3 = 8; //Wednesday
const kRepeatDay_4 = 16;//Thursday
const kRepeatDay_5 = 32;//Friday
const kRepeatDay_6 = 64;//Saturday
/*-----------------------------------------------------------------
* W I N D O W F U N C T I O N S
*/
@ -158,17 +167,21 @@ function loadCalendarEventDialog()
}
// fill in fields from the event
var startDate = new Date( gEvent.start.getTime() );
var endDate = new Date( gEvent.end.getTime() );
setDateFieldValue( "start-date-text", startDate );
setTimeFieldValue( "start-time-text", startDate );
setTimeFieldValue( "end-time-text", endDate );
gTimeDifference = gEvent.end.getTime() - gEvent.start.getTime(); //the time difference in ms
setDateFieldValue( "start-date-text", gEvent.start );
setTimeFieldValue( "start-time-text", gEvent.start );
setTimeFieldValue( "end-time-text", gEvent.end );
gTimeDifference = gEvent.end - gEvent.start; //the time difference in ms
if ( gEvent.repeatForever )
if ( gEvent.recurForever )
{
gEvent.recurEnd = new Date();
var today = new Date();
gEvent.recurEnd.setTime( today );
}
setDateFieldValue( "repeat-end-date-text", gEvent.recurEnd );
var recurEndDate = new Date( gEvent.recurEnd.getTime() );
setDateFieldValue( "repeat-end-date-text", recurEndDate );
setFieldValue( "title-field", gEvent.title );
setFieldValue( "description-field", gEvent.description );
@ -181,6 +194,7 @@ function loadCalendarEventDialog()
setFieldValue( "alarm-checkbox", gEvent.alarm, "checked" );
setFieldValue( "alarm-length-field", gEvent.alarmLength );
setFieldValue( "alarm-length-units", gEvent.alarmUnits, "data" );
setFieldValue( "alarm-length-units", gEvent.alarmUnits, "value" );
if ( gEvent.alarmEmailAddress && gEvent.alarmEmailAddress != "" )
{
@ -202,11 +216,11 @@ function loadCalendarEventDialog()
setFieldValue( "invite-checkbox", false, "checked" );
}
setFieldValue( "repeat-checkbox", gEvent.repeat, "checked");
setFieldValue( "repeat-checkbox", gEvent.recur, "checked");
setFieldValue( "repeat-length-field", gEvent.recurInterval );
setFieldValue( "repeat-length-units", gEvent.repeatUnits, "value" );
setFieldValue( "repeat-forever-radio", (gEvent.repeatForever != undefined && gEvent.repeatForever != false), "selected" );
setFieldValue( "repeat-until-radio", (gEvent.repeatForever == undefined || gEvent.repeatForever == false), "selected" );
setFieldValue( "repeat-length-units", gEvent.recurUnits, "value" );
setFieldValue( "repeat-forever-radio", (gEvent.recurForever != undefined && gEvent.recurForever != false), "checked" );
setFieldValue( "repeat-until-radio", (gEvent.recurForever == undefined || gEvent.recurForever == false), "checked" );
// update enabling and disabling
@ -214,11 +228,19 @@ function loadCalendarEventDialog()
updateStartEndItemEnabled();
updateAlarmItemEnabled();
updateInviteItemEnabled();
/*
** set the advanced weekly repeating stuff
*/
setAdvancedWeekRepeat();
setFieldValue( "advanced-repeat-dayofmonth", ( gEvent.recurWeekNumber == 0 || gEvent.recurWeekNumber == undefined ), "checked" );
setFieldValue( "advanced-repeat-dayofweek", ( gEvent.recurWeekNumber > 0 ), "checked" );
// set up OK, Cancel
doSetOKCancel( onOKCommand, 0 );
// start focus on title
var firstFocus = document.getElementById( "title-field" );
@ -241,18 +263,25 @@ function onOKCommand()
gEvent.category = getFieldValue( "category-field" );
gEvent.allDay = getFieldValue( "all-day-event-checkbox", "checked" );
gEvent.start = getDateTimeFieldValue( "start-date-text" );
var startDate = getDateTimeFieldValue( "start-date-text" );
gEvent.start.year = startDate.getYear()+1900;
gEvent.start.month = startDate.getMonth();
gEvent.start.day = startDate.getDate();
var startTime = getDateTimeFieldValue( "start-time-text" );
gEvent.start.hour = startTime.getHours();
gEvent.start.minute = startTime.getMinutes();
var startTime = getDateTimeFieldValue( "start-time-text" );
gEvent.start.setHours( startTime.getHours() );
gEvent.start.setMinutes( startTime.getMinutes() );
gEvent.start.setSeconds( 0 );
gEvent.end = getDateTimeFieldValue( "end-time-text" );
//do this because the end date is always the same as the start date.
gEvent.end.setDate( gEvent.start.getDate() );
gEvent.end.setMonth( gEvent.start.getMonth() );
gEvent.end.setYear( gEvent.start.getFullYear() );
gEvent.end.year = gEvent.start.year;
gEvent.end.month = gEvent.start.month;
gEvent.end.day = gEvent.start.day;
var endTime = getDateTimeFieldValue( "end-time-text" );
gEvent.end.hour = endTime.getHours();
gEvent.end.minute = endTime.getMinutes();
gEvent.privateEvent = getFieldValue( "private-checkbox", "checked" );
@ -267,32 +296,56 @@ function onOKCommand()
gEvent.alarm = getFieldValue( "alarm-checkbox", "checked" );
gEvent.alarmLength = getFieldValue( "alarm-length-field" );
gEvent.alarmUnits = getFieldValue( "alarm-length-units", "value" );
debug( "!!!-->in ca-event-dialog.js, alarmUnits is "+gEvent.alarmUnits );
if ( getFieldValue( "alarm-email-checkbox", "checked" ) )
{
gEvent.alarmEmailAddress = getFieldValue( "alarm-email-field", "value" );
debug( "!!!-->in ca-event-dialog.js, alarmEmailAddress is "+gEvent.alarmEmailAddress );
}
else
{
gEvent.alarmEmailAddress = "";
}
gEvent.repeat = getFieldValue( "repeat-checkbox", "checked" );
gEvent.repeatUnits = getFieldValue( "repeat-length-units", "value" );
gEvent.repeatForever = getFieldValue( "repeat-forever-radio", "selected" );
gEvent.recur = getFieldValue( "repeat-checkbox", "checked" );
gEvent.recurUnits = getFieldValue( "repeat-length-units", "value" );
gEvent.recurForever = getFieldValue( "repeat-forever-radio", "checked" );
gEvent.recurInterval = getFieldValue( "repeat-length-field" );
if( gEvent.recurInterval == 0 )
gEvent.repeat = false;
gEvent.recur = false;
gEvent.recurEnd = getDateTimeFieldValue( "repeat-end-date-text" );
var recurEndDate = getDateTimeFieldValue( "repeat-end-date-text" );
gEvent.recurEnd = new Date( gEvent.recurEnd.getFullYear(), gEvent.recurEnd.getMonth(), gEvent.recurEnd.getDate(), gEvent.start.getHours(), gEvent.start.getMinutes() );
gEvent.recurEnd.setTime( recurEndDate );
gEvent.recurEnd.hour = gEvent.start.hour;
gEvent.recurEnd.minute = gEvent.start.minute;
if( gEvent.recurUnits == "weeks" && gEvent.recur == true )
{
/*
** advanced weekly repeating, choosing the days to repeat
*/
gEvent.recurWeekdays = getAdvancedWeekRepeat();
}
else if( gEvent.recurUnits == "months" && gEvent.recur == true )
{
/*
** advanced month repeating, either every day or every date
*/
if( getFieldValue( "advanced-repeat-dayofweek", "checked" ) == true )
{
gEvent.recurWeekNumber = getWeekNumberOfMonth();
}
else
gEvent.recurWeekNumber = 0;
}
// :TODO: REALLY only do this if the alarm or start settings change.?
gEvent.alarmWentOff = false;
//if the end time is later than the start time... alert the user using text from the dtd.
if ( gEvent.end < gEvent.start && !gEvent.allDay )
if ( gEvent.end.getTime() < gEvent.start.getTime() && !gEvent.allDay )
{
alert( neStartTimeErrorAlertMessage );
return( false );
@ -344,7 +397,7 @@ function onDatePick( datepopup )
datepopup.dateField.editDate = datepopup.value;
//change the end date of repeating events to today, if the new date is after today.
//change the end date of recurring events to today, if the new date is after today.
var Now = new Date();
@ -353,6 +406,9 @@ function onDatePick( datepopup )
document.getElementById( "repeat-end-date-text" ).value = formatDate( datepopup.value );
}
updateAdvancedWeekRepeat();
updateAdvancedRepeatDayOfMonth();
}
@ -591,37 +647,113 @@ function updateRepeatItemEnabled()
{
var repeatCheckBox = document.getElementById( "repeat-checkbox" );
var repeatField = document.getElementById( "repeat-length-field" );
var repeatMenu = document.getElementById( "repeat-length-units" );
var repeatGroup = document.getElementById( "repeat-until-group" );
var repeatForever = document.getElementById( "repeat-forever-radio" );
var repeatUntil = document.getElementById( "repeat-until-radio" );
var repeatDisableList = document.getElementsByAttribute( "disable-controller", "repeat" );
if( repeatCheckBox.checked )
{
// call remove attribute beacuse some widget code checks for the presense of a
// disabled attribute, not the value.
repeatField.removeAttribute( "disabled" );
repeatMenu.removeAttribute( "disabled" );
repeatGroup.removeAttribute( "disabled" );
repeatForever.removeAttribute( "disabled" );
repeatUntil.removeAttribute( "disabled" );
for( var i = 0; i < repeatDisableList.length; ++i )
{
repeatDisableList[i].removeAttribute( "disabled" );
}
}
else
{
repeatField.setAttribute( "disabled", "true" );
repeatMenu.setAttribute( "disabled", "true" );
repeatGroup.setAttribute( "disabled", "true" );
repeatForever.setAttribute( "disabled", "true" );
repeatUntil.setAttribute( "disabled", "true" );
for( var j = 0; j < repeatDisableList.length; ++j )
{
repeatDisableList[j].setAttribute( "disabled", "true" );
}
}
// udpate plural/singular
updateRepeatPlural();
updateAlarmPlural();
// update until items whenever repeat changes
updateUntilItemEnabled();
// extra interface depending on units
updateRepeatUnitExtensions();
}
/**
* Update plural singular menu items
*/
function updateRepeatPlural()
{
updateMenuPlural( "repeat-length-field", "repeat-length-units" );
}
/**
* Update plural singular menu items
*/
function updateAlarmPlural()
{
updateMenuPlural( "alarm-length-field", "alarm-length-units" );
}
/**
* Update plural singular menu items
*/
function updateMenuPlural( lengthFieldId, menuId )
{
var field = document.getElementById( lengthFieldId );
var menu = document.getElementById( menuId );
// figure out whether we should use singular or plural
var length = field.value;
var newLabelNumber;
if( Number( length ) > 1 )
{
newLabelNumber = "labelplural"
}
else
{
newLabelNumber = "labelsingular"
}
// see what we currently show and change it if required
var oldLabelNumber = menu.getAttribute( "labelnumber" );
if( newLabelNumber != oldLabelNumber )
{
// remember what we are showing now
menu.setAttribute( "labelnumber", newLabelNumber );
// update the menu items
var items = menu.getElementsByTagName( "menuitem" );
for( var i = 0; i < items.length; ++i )
{
var menuItem = items[i];
var newLabel = menuItem.getAttribute( newLabelNumber );
menuItem.label = newLabel;
menuItem.setAttribute( "label", newLabel );
}
// force the menu selection to redraw
var saveSelectedIndex = menu.selectedIndex;
menu.selectedIndex = -1;
menu.selectedIndex = saveSelectedIndex;
}
}
/**
* Enable/Disable Until items
@ -635,7 +767,7 @@ function updateUntilItemEnabled()
var repeatEndText = document.getElementById( "repeat-end-date-text" );
var repeatEndPicker = document.getElementById( "repeat-end-date-button" );
if( repeatCheckBox.checked && repeatUntilRadio.selected )
if( repeatCheckBox.checked && repeatUntilRadio.checked )
{
repeatEndText.removeAttribute( "disabled" );
repeatEndText.setAttribute( "popup", "oe-date-picker-popup" );
@ -652,31 +784,44 @@ function updateUntilItemEnabled()
}
/*
** Just a silly idea I had to update the repeat menu items so they always show the right word
*/
/*
function updateRepeatLength()
function updateRepeatUnitExtensions( )
{
RepeatLengthTextBox = document.getElementById( "repeat-length-field" );
var repeatMenu = document.getElementById( "repeat-length-units" );
var weekExtensions = document.getElementById( "repeat-extenstions-week" );
var monthExtensions = document.getElementById( "repeat-extenstions-month" );
if( RepeatLengthTextBox.value == "1" )
//FIX ME! WHEN THE WINDOW LOADS, THIS DOESN'T EXIST
if( repeatMenu.selectedItem )
{
document.getElementById( "repeat-days-menu-item" ).setAttribute( "label", "Day" );
document.getElementById( "repeat-weeks-menu-item" ).setAttribute( "label", "Week" );
document.getElementById( "repeat-months-menu-item" ).setAttribute( "label", "Month" );
document.getElementById( "repeat-years-menu-item" ).setAttribute( "label", "Year" );
}
else
{
document.getElementById( "repeat-days-menu-item" ).setAttribute( "label", "Days" );
document.getElementById( "repeat-weeks-menu-item" ).setAttribute( "label", "Weeks" );
document.getElementById( "repeat-months-menu-item" ).setAttribute( "label", "Months" );
document.getElementById( "repeat-years-menu-item" ).setAttribute( "label", "Years" );
switch( repeatMenu.selectedItem.value )
{
case "days":
weekExtensions.setAttribute( "collapsed", "true" );
monthExtensions.setAttribute( "collapsed", "true" );
break;
case "weeks":
weekExtensions.setAttribute( "collapsed", "false" );
monthExtensions.setAttribute( "collapsed", "true" );
updateAdvancedWeekRepeat();
break;
case "months":
weekExtensions.setAttribute( "collapsed", "true" );
monthExtensions.setAttribute( "collapsed", "false" );
updateAdvancedRepeatDayOfMonth();
break;
case "years":
weekExtensions.setAttribute( "collapsed", "true" );
monthExtensions.setAttribute( "collapsed", "true" );
break;
}
}
}
*/
/**
@ -732,6 +877,205 @@ function updateStartEndItemEnabled()
/**
* Handle key down in repeat field
*/
function repeatLengthKeyDown( repeatField )
{
updateRepeatPlural();
}
/**
* Handle key down in alarm field
*/
function alarmLengthKeyDown( repeatField )
{
updateAlarmPlural();
}
function repeatUnitCommand( repeatMenu )
{
updateRepeatUnitExtensions();
}
/*
** Functions for advanced repeating elements
*/
function setAdvancedWeekRepeat()
{
var checked = false;
if( gEvent.recurWeekdays > 0 )
{
for( i = 0; i < 6; i++ )
{
dump( gEvent.recurWeekdays | eval( "kRepeatDay_"+i ) );
checked = ( ( gEvent.recurWeekdays | eval( "kRepeatDay_"+i ) ) == eval( gEvent.recurWeekdays ) );
dump( "checked is "+checked );
setFieldValue( "advanced-repeat-week-"+i, checked, "checked" );
}
}
}
/*
** Functions for advanced repeating elements
*/
function getAdvancedWeekRepeat()
{
var Total = 0;
for( i = 0; i < 7; i++ )
{
if( getFieldValue( "advanced-repeat-week-"+i, "checked" ) == true )
{
Total += eval( "kRepeatDay_"+i );
}
}
return( Total );
}
/*
** function to set the menu items text
*/
function updateAdvancedWeekRepeat()
{
//get the day number for today.
var startTime = getDateTimeFieldValue( "start-date-text" );
var dayNumber = startTime.getDay();
//uncheck them all
for( i = 0; i < 7; i++ )
{
document.getElementById( "advanced-repeat-week-"+i ).setAttribute( "checked", "false" );
document.getElementById( "advanced-repeat-week-"+i ).removeAttribute( "disabled" );
}
document.getElementById( "advanced-repeat-week-"+dayNumber ).setAttribute( "checked", "true" );
document.getElementById( "advanced-repeat-week-"+dayNumber ).setAttribute( "disabled", "true" );
}
/*
** function to set the menu items text
*/
function updateAdvancedRepeatDayOfMonth()
{
//get the day number for today.
var startTime = getDateTimeFieldValue( "start-date-text" );
var dayNumber = startTime.getDate();
var dayExtension = getDayExtension( dayNumber );
document.getElementById( "advanced-repeat-dayofmonth" ).setAttribute( "label", "On the "+dayNumber+dayExtension+" of the month" );
document.getElementById( "advanced-repeat-dayofweek" ).setAttribute( "label", getWeekNumberText( getWeekNumberOfMonth() )+" "+getDayOfWeek( dayNumber )+" of the month" );
}
function getDayExtension( dayNumber )
{
switch( dayNumber )
{
case 1:
case 21:
case 31:
return( "st" );
case 2:
case 22:
return( "nd" );
case 3:
case 23:
return( "rd" );
default:
return( "th" );
}
}
function getDayOfWeek( )
{
//get the day number for today.
var startTime = getDateTimeFieldValue( "start-date-text" );
var dayNumber = startTime.getDay();
var dateStringBundle = srGetStrBundle("chrome://penglobal/locale/dateFormat.properties");
//add one to the dayNumber because in the above prop. file, it starts at day1, but JS starts at 0
var oneBasedDayNumber = parseInt( dayNumber ) + 1;
return( dateStringBundle.GetStringFromName( "day."+oneBasedDayNumber+".name" ) );
}
function getWeekNumberOfMonth()
{
//get the day number for today.
var startTime = getDateTimeFieldValue( "start-date-text" );
var dayNumber = startTime.getDay();
var thisMonth = startTime.getMonth();
var monthToCompare = startTime.getMonth();
var weekNumber = 0;
while( monthToCompare == thisMonth )
{
startTime = new Date( startTime.getTime() - ( 1000 * 60 * 60 * 24 * 7 ) );
monthToCompare = startTime.getMonth();
weekNumber++;
}
if( weekNumber > 3 )
{
nextWeek = new Date( getDateTimeFieldValue( "start-date-text" ).getTime() + ( 1000 * 60 * 60 * 24 * 7 ) );
if( nextWeek.getMonth() != thisMonth )
{
//its the last week of the month
weekNumber = 5;
}
}
return( weekNumber );
}
function getWeekNumberText( weekNumber )
{
switch( weekNumber )
{
case 1:
return( "First" );
case 2:
return( "Second" );
case 3:
return( "Third" );
case 4:
return( "Fourth" );
case 5:
return( "Last" );
}
}
/**
* Helper function for filling the form, set the value of a property of a XUL element
*

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

@ -227,16 +227,18 @@
<hbox id="alarm-box">
<checkbox id="alarm-checkbox" label="&newevent.alarm.label;" checked="false" oncommand="commandAlarm()"/>
<spacer id="alarm-spacer" />
<textbox id="alarm-length-field" value="15" />
<menulist id="alarm-length-units" label="&alarm.units.minutes;" value="minutes" >
<textbox id="alarm-length-field" oninput="alarmLengthKeyDown( this )" value="15" />
<menulist id="alarm-length-units" flex="1" labelnumber="labelplural" label="&alarm.units.minutes;" value="minutes" >
<menupopup >
<menuitem label="&alarm.units.minutes;" value="minutes"/>
<menuitem label="&alarm.units.hours;" value="hours"/>
<menuitem label="&alarm.units.days;" value="days"/>
<menuitem label="&alarm.units.minutes;" labelplural="&alarm.units.minutes;" labelsingular="&alarm.units.minutes.singular;" value="minutes"/>
<menuitem label="&alarm.units.hours;" labelplural="&alarm.units.hours;" labelsingular="&alarm.units.hours.singular;" value="hours"/>
<menuitem label="&alarm.units.days;" labelplural="&alarm.units.days;" labelsingular="&alarm.units.days.singular;" value="days"/>
</menupopup>
</menulist>
<label id="alarm-length-text" for="alarm-length-field" value="&newevent.beforealarm.label;"/>
</hbox>
<hbox id="alarm-box-email" collapsed="true">
<checkbox id="alarm-email-checkbox" label="&newevent.email.label;" checked="false" oncommand="commandAlarmEmail()"/>
@ -263,31 +265,57 @@
<vbox>
<hbox id="repeat-box">
<checkbox id="repeat-checkbox" label="&newevent.repeat.label;" checked="false" oncommand="commandRepeat()"/>
<textbox id="repeat-length-field" onmousedownX="updateRepeatLength()" value="1" />
<textbox id="repeat-length-field" disable-controller="repeat" value="1" oninput="repeatLengthKeyDown( this )"/>
<menulist id="repeat-length-units" label="&repeat.units.days;" value="days" >
<menulist crop="never" oncommand="repeatUnitCommand( this )" labelnumber="labelplural" id="repeat-length-units" disable-controller="repeat" label="&repeat.units.days;" value="days" >
<menupopup>
<menuitem id="repeat-days-menu-item" label="&repeat.units.day;" value="days" />
<menuitem id="repeat-weeks-menu-item" label="&repeat.units.week;" value="weeks" />
<menuitem id="repeat-months-menu-item" label="&repeat.units.month;" value="months" />
<menuitem id="repeat-years-menu-item" label="&repeat.units.year;" value="years" />
<menuitem label="&repeat.units.days;" labelplural="&repeat.units.days;" labelsingular="&repeat.units.days.singular;" value="days" />
<menuitem label="&repeat.units.weeks;" labelplural="&repeat.units.weeks;" labelsingular="&repeat.units.weeks.singular;" value="weeks" />
<menuitem label="&repeat.units.months;" labelplural="&repeat.units.months;" labelsingular="&repeat.units.months.singular;" value="months" />
<menuitem label="&repeat.units.years;" labelplural="&repeat.units.years;" labelsingular="&repeat.units.years.singular;" value="years" />
</menupopup>
</menulist>
</hbox>
<hbox id="repeat-extenstions-week" diabled="true" collapsed="true">
<spacer class="repeat-left-spacer" />
<checkbox disable-controller="repeat" class="repeat-day-class" label="Sun" id="advanced-repeat-week-0" value="0" checked="false" />
<checkbox disable-controller="repeat" class="repeat-day-class" label="Mon" id="advanced-repeat-week-1" value="1" checked="false" />
<checkbox disable-controller="repeat" class="repeat-day-class" label="Tue" id="advanced-repeat-week-2" value="2" checked="false" />
<checkbox disable-controller="repeat" class="repeat-day-class" label="Wed" id="advanced-repeat-week-3" value="3" checked="false" />
<checkbox disable-controller="repeat" class="repeat-day-class" label="Thu" id="advanced-repeat-week-4" value="4" checked="false" />
<checkbox disable-controller="repeat" class="repeat-day-class" label="Fri" id="advanced-repeat-week-5" value="5" checked="false" />
<checkbox disable-controller="repeat" class="repeat-day-class" label="Sat" id="advanced-repeat-week-6" value="6" checked="false" />
</hbox>
<hbox id="repeat-extenstions-month" diabled="true" collapsed="true">
<spacer class="repeat-left-spacer" />
<vbox>
<radiogroup id="advanced-repeat-month" disable-controller="repeat">
<radio group="advanced-repeat-month" disable-controller="repeat" id="advanced-repeat-dayofmonth" label="On the xth day of the month" checked="true" />
<radio group="advanced-repeat-month" disable-controller="repeat" id="advanced-repeat-dayofweek" label="Last Tuesday of the month" checked="false" />
</radiogroup>
</vbox>
</hbox>
<spacer height="10" />
<hbox>
<spacer id="radio-spacer" />
<radiogroup id="repeat-until-group" orient="vertical">
<hbox>
<radio group="repeat-until-group" id="repeat-forever-radio" checked="false" label="&newevent.forever.label;" oncommand="commandUntil()"/>
</hbox>
<spacer class="repeat-left-spacer" />
<radiogroup id="repeat-until-group" disable-controller="repeat">
<hbox id="repeat-end-box">
<radio group="repeat-until-group" id="repeat-until-radio" checked="true" label="&newevent.until.label;" oncommand="commandUntil()"/>
<radio group="repeat-until-group" id="repeat-until-radio" disable-controller="repeat" checked="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="after_start"/>
<image class="four-state-image-button" id="repeat-end-date-button" onmousedown="prepareDatePicker('repeat-end-date-text')" popup="oe-date-picker-popup" position="after_start"/>
<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"/>
</hbox>
<hbox>
<radio group="repeat-until-group" id="repeat-forever-radio" disable-controller="repeat" checked="false" label="&newevent.forever.label;" oncommand="commandUntil()"/>
</hbox>
</radiogroup>
</hbox>

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

@ -85,6 +85,15 @@ var gTimeDifference = 3600000; //when editing an event, we change the end time
var gMode = ''; //what mode are we in? new or edit...
const kRepeatDay_0 = 1; //Sunday
const kRepeatDay_1 = 2; //Monday
const kRepeatDay_2 = 4; //Tuesday
const kRepeatDay_3 = 8; //Wednesday
const kRepeatDay_4 = 16;//Thursday
const kRepeatDay_5 = 32;//Friday
const kRepeatDay_6 = 64;//Saturday
/*-----------------------------------------------------------------
* W I N D O W F U N C T I O N S
*/
@ -158,17 +167,21 @@ function loadCalendarEventDialog()
}
// fill in fields from the event
var startDate = new Date( gEvent.start.getTime() );
var endDate = new Date( gEvent.end.getTime() );
setDateFieldValue( "start-date-text", startDate );
setTimeFieldValue( "start-time-text", startDate );
setTimeFieldValue( "end-time-text", endDate );
gTimeDifference = gEvent.end.getTime() - gEvent.start.getTime(); //the time difference in ms
setDateFieldValue( "start-date-text", gEvent.start );
setTimeFieldValue( "start-time-text", gEvent.start );
setTimeFieldValue( "end-time-text", gEvent.end );
gTimeDifference = gEvent.end - gEvent.start; //the time difference in ms
if ( gEvent.repeatForever )
if ( gEvent.recurForever )
{
gEvent.recurEnd = new Date();
var today = new Date();
gEvent.recurEnd.setTime( today );
}
setDateFieldValue( "repeat-end-date-text", gEvent.recurEnd );
var recurEndDate = new Date( gEvent.recurEnd.getTime() );
setDateFieldValue( "repeat-end-date-text", recurEndDate );
setFieldValue( "title-field", gEvent.title );
setFieldValue( "description-field", gEvent.description );
@ -181,6 +194,7 @@ function loadCalendarEventDialog()
setFieldValue( "alarm-checkbox", gEvent.alarm, "checked" );
setFieldValue( "alarm-length-field", gEvent.alarmLength );
setFieldValue( "alarm-length-units", gEvent.alarmUnits, "data" );
setFieldValue( "alarm-length-units", gEvent.alarmUnits, "value" );
if ( gEvent.alarmEmailAddress && gEvent.alarmEmailAddress != "" )
{
@ -202,11 +216,11 @@ function loadCalendarEventDialog()
setFieldValue( "invite-checkbox", false, "checked" );
}
setFieldValue( "repeat-checkbox", gEvent.repeat, "checked");
setFieldValue( "repeat-checkbox", gEvent.recur, "checked");
setFieldValue( "repeat-length-field", gEvent.recurInterval );
setFieldValue( "repeat-length-units", gEvent.repeatUnits, "value" );
setFieldValue( "repeat-forever-radio", (gEvent.repeatForever != undefined && gEvent.repeatForever != false), "selected" );
setFieldValue( "repeat-until-radio", (gEvent.repeatForever == undefined || gEvent.repeatForever == false), "selected" );
setFieldValue( "repeat-length-units", gEvent.recurUnits, "value" );
setFieldValue( "repeat-forever-radio", (gEvent.recurForever != undefined && gEvent.recurForever != false), "checked" );
setFieldValue( "repeat-until-radio", (gEvent.recurForever == undefined || gEvent.recurForever == false), "checked" );
// update enabling and disabling
@ -214,11 +228,19 @@ function loadCalendarEventDialog()
updateStartEndItemEnabled();
updateAlarmItemEnabled();
updateInviteItemEnabled();
/*
** set the advanced weekly repeating stuff
*/
setAdvancedWeekRepeat();
setFieldValue( "advanced-repeat-dayofmonth", ( gEvent.recurWeekNumber == 0 || gEvent.recurWeekNumber == undefined ), "checked" );
setFieldValue( "advanced-repeat-dayofweek", ( gEvent.recurWeekNumber > 0 ), "checked" );
// set up OK, Cancel
doSetOKCancel( onOKCommand, 0 );
// start focus on title
var firstFocus = document.getElementById( "title-field" );
@ -241,18 +263,25 @@ function onOKCommand()
gEvent.category = getFieldValue( "category-field" );
gEvent.allDay = getFieldValue( "all-day-event-checkbox", "checked" );
gEvent.start = getDateTimeFieldValue( "start-date-text" );
var startDate = getDateTimeFieldValue( "start-date-text" );
gEvent.start.year = startDate.getYear()+1900;
gEvent.start.month = startDate.getMonth();
gEvent.start.day = startDate.getDate();
var startTime = getDateTimeFieldValue( "start-time-text" );
gEvent.start.hour = startTime.getHours();
gEvent.start.minute = startTime.getMinutes();
var startTime = getDateTimeFieldValue( "start-time-text" );
gEvent.start.setHours( startTime.getHours() );
gEvent.start.setMinutes( startTime.getMinutes() );
gEvent.start.setSeconds( 0 );
gEvent.end = getDateTimeFieldValue( "end-time-text" );
//do this because the end date is always the same as the start date.
gEvent.end.setDate( gEvent.start.getDate() );
gEvent.end.setMonth( gEvent.start.getMonth() );
gEvent.end.setYear( gEvent.start.getFullYear() );
gEvent.end.year = gEvent.start.year;
gEvent.end.month = gEvent.start.month;
gEvent.end.day = gEvent.start.day;
var endTime = getDateTimeFieldValue( "end-time-text" );
gEvent.end.hour = endTime.getHours();
gEvent.end.minute = endTime.getMinutes();
gEvent.privateEvent = getFieldValue( "private-checkbox", "checked" );
@ -267,32 +296,56 @@ function onOKCommand()
gEvent.alarm = getFieldValue( "alarm-checkbox", "checked" );
gEvent.alarmLength = getFieldValue( "alarm-length-field" );
gEvent.alarmUnits = getFieldValue( "alarm-length-units", "value" );
debug( "!!!-->in ca-event-dialog.js, alarmUnits is "+gEvent.alarmUnits );
if ( getFieldValue( "alarm-email-checkbox", "checked" ) )
{
gEvent.alarmEmailAddress = getFieldValue( "alarm-email-field", "value" );
debug( "!!!-->in ca-event-dialog.js, alarmEmailAddress is "+gEvent.alarmEmailAddress );
}
else
{
gEvent.alarmEmailAddress = "";
}
gEvent.repeat = getFieldValue( "repeat-checkbox", "checked" );
gEvent.repeatUnits = getFieldValue( "repeat-length-units", "value" );
gEvent.repeatForever = getFieldValue( "repeat-forever-radio", "selected" );
gEvent.recur = getFieldValue( "repeat-checkbox", "checked" );
gEvent.recurUnits = getFieldValue( "repeat-length-units", "value" );
gEvent.recurForever = getFieldValue( "repeat-forever-radio", "checked" );
gEvent.recurInterval = getFieldValue( "repeat-length-field" );
if( gEvent.recurInterval == 0 )
gEvent.repeat = false;
gEvent.recur = false;
gEvent.recurEnd = getDateTimeFieldValue( "repeat-end-date-text" );
var recurEndDate = getDateTimeFieldValue( "repeat-end-date-text" );
gEvent.recurEnd = new Date( gEvent.recurEnd.getFullYear(), gEvent.recurEnd.getMonth(), gEvent.recurEnd.getDate(), gEvent.start.getHours(), gEvent.start.getMinutes() );
gEvent.recurEnd.setTime( recurEndDate );
gEvent.recurEnd.hour = gEvent.start.hour;
gEvent.recurEnd.minute = gEvent.start.minute;
if( gEvent.recurUnits == "weeks" && gEvent.recur == true )
{
/*
** advanced weekly repeating, choosing the days to repeat
*/
gEvent.recurWeekdays = getAdvancedWeekRepeat();
}
else if( gEvent.recurUnits == "months" && gEvent.recur == true )
{
/*
** advanced month repeating, either every day or every date
*/
if( getFieldValue( "advanced-repeat-dayofweek", "checked" ) == true )
{
gEvent.recurWeekNumber = getWeekNumberOfMonth();
}
else
gEvent.recurWeekNumber = 0;
}
// :TODO: REALLY only do this if the alarm or start settings change.?
gEvent.alarmWentOff = false;
//if the end time is later than the start time... alert the user using text from the dtd.
if ( gEvent.end < gEvent.start && !gEvent.allDay )
if ( gEvent.end.getTime() < gEvent.start.getTime() && !gEvent.allDay )
{
alert( neStartTimeErrorAlertMessage );
return( false );
@ -344,7 +397,7 @@ function onDatePick( datepopup )
datepopup.dateField.editDate = datepopup.value;
//change the end date of repeating events to today, if the new date is after today.
//change the end date of recurring events to today, if the new date is after today.
var Now = new Date();
@ -353,6 +406,9 @@ function onDatePick( datepopup )
document.getElementById( "repeat-end-date-text" ).value = formatDate( datepopup.value );
}
updateAdvancedWeekRepeat();
updateAdvancedRepeatDayOfMonth();
}
@ -591,37 +647,113 @@ function updateRepeatItemEnabled()
{
var repeatCheckBox = document.getElementById( "repeat-checkbox" );
var repeatField = document.getElementById( "repeat-length-field" );
var repeatMenu = document.getElementById( "repeat-length-units" );
var repeatGroup = document.getElementById( "repeat-until-group" );
var repeatForever = document.getElementById( "repeat-forever-radio" );
var repeatUntil = document.getElementById( "repeat-until-radio" );
var repeatDisableList = document.getElementsByAttribute( "disable-controller", "repeat" );
if( repeatCheckBox.checked )
{
// call remove attribute beacuse some widget code checks for the presense of a
// disabled attribute, not the value.
repeatField.removeAttribute( "disabled" );
repeatMenu.removeAttribute( "disabled" );
repeatGroup.removeAttribute( "disabled" );
repeatForever.removeAttribute( "disabled" );
repeatUntil.removeAttribute( "disabled" );
for( var i = 0; i < repeatDisableList.length; ++i )
{
repeatDisableList[i].removeAttribute( "disabled" );
}
}
else
{
repeatField.setAttribute( "disabled", "true" );
repeatMenu.setAttribute( "disabled", "true" );
repeatGroup.setAttribute( "disabled", "true" );
repeatForever.setAttribute( "disabled", "true" );
repeatUntil.setAttribute( "disabled", "true" );
for( var j = 0; j < repeatDisableList.length; ++j )
{
repeatDisableList[j].setAttribute( "disabled", "true" );
}
}
// udpate plural/singular
updateRepeatPlural();
updateAlarmPlural();
// update until items whenever repeat changes
updateUntilItemEnabled();
// extra interface depending on units
updateRepeatUnitExtensions();
}
/**
* Update plural singular menu items
*/
function updateRepeatPlural()
{
updateMenuPlural( "repeat-length-field", "repeat-length-units" );
}
/**
* Update plural singular menu items
*/
function updateAlarmPlural()
{
updateMenuPlural( "alarm-length-field", "alarm-length-units" );
}
/**
* Update plural singular menu items
*/
function updateMenuPlural( lengthFieldId, menuId )
{
var field = document.getElementById( lengthFieldId );
var menu = document.getElementById( menuId );
// figure out whether we should use singular or plural
var length = field.value;
var newLabelNumber;
if( Number( length ) > 1 )
{
newLabelNumber = "labelplural"
}
else
{
newLabelNumber = "labelsingular"
}
// see what we currently show and change it if required
var oldLabelNumber = menu.getAttribute( "labelnumber" );
if( newLabelNumber != oldLabelNumber )
{
// remember what we are showing now
menu.setAttribute( "labelnumber", newLabelNumber );
// update the menu items
var items = menu.getElementsByTagName( "menuitem" );
for( var i = 0; i < items.length; ++i )
{
var menuItem = items[i];
var newLabel = menuItem.getAttribute( newLabelNumber );
menuItem.label = newLabel;
menuItem.setAttribute( "label", newLabel );
}
// force the menu selection to redraw
var saveSelectedIndex = menu.selectedIndex;
menu.selectedIndex = -1;
menu.selectedIndex = saveSelectedIndex;
}
}
/**
* Enable/Disable Until items
@ -635,7 +767,7 @@ function updateUntilItemEnabled()
var repeatEndText = document.getElementById( "repeat-end-date-text" );
var repeatEndPicker = document.getElementById( "repeat-end-date-button" );
if( repeatCheckBox.checked && repeatUntilRadio.selected )
if( repeatCheckBox.checked && repeatUntilRadio.checked )
{
repeatEndText.removeAttribute( "disabled" );
repeatEndText.setAttribute( "popup", "oe-date-picker-popup" );
@ -652,31 +784,44 @@ function updateUntilItemEnabled()
}
/*
** Just a silly idea I had to update the repeat menu items so they always show the right word
*/
/*
function updateRepeatLength()
function updateRepeatUnitExtensions( )
{
RepeatLengthTextBox = document.getElementById( "repeat-length-field" );
var repeatMenu = document.getElementById( "repeat-length-units" );
var weekExtensions = document.getElementById( "repeat-extenstions-week" );
var monthExtensions = document.getElementById( "repeat-extenstions-month" );
if( RepeatLengthTextBox.value == "1" )
//FIX ME! WHEN THE WINDOW LOADS, THIS DOESN'T EXIST
if( repeatMenu.selectedItem )
{
document.getElementById( "repeat-days-menu-item" ).setAttribute( "label", "Day" );
document.getElementById( "repeat-weeks-menu-item" ).setAttribute( "label", "Week" );
document.getElementById( "repeat-months-menu-item" ).setAttribute( "label", "Month" );
document.getElementById( "repeat-years-menu-item" ).setAttribute( "label", "Year" );
}
else
{
document.getElementById( "repeat-days-menu-item" ).setAttribute( "label", "Days" );
document.getElementById( "repeat-weeks-menu-item" ).setAttribute( "label", "Weeks" );
document.getElementById( "repeat-months-menu-item" ).setAttribute( "label", "Months" );
document.getElementById( "repeat-years-menu-item" ).setAttribute( "label", "Years" );
switch( repeatMenu.selectedItem.value )
{
case "days":
weekExtensions.setAttribute( "collapsed", "true" );
monthExtensions.setAttribute( "collapsed", "true" );
break;
case "weeks":
weekExtensions.setAttribute( "collapsed", "false" );
monthExtensions.setAttribute( "collapsed", "true" );
updateAdvancedWeekRepeat();
break;
case "months":
weekExtensions.setAttribute( "collapsed", "true" );
monthExtensions.setAttribute( "collapsed", "false" );
updateAdvancedRepeatDayOfMonth();
break;
case "years":
weekExtensions.setAttribute( "collapsed", "true" );
monthExtensions.setAttribute( "collapsed", "true" );
break;
}
}
}
*/
/**
@ -732,6 +877,205 @@ function updateStartEndItemEnabled()
/**
* Handle key down in repeat field
*/
function repeatLengthKeyDown( repeatField )
{
updateRepeatPlural();
}
/**
* Handle key down in alarm field
*/
function alarmLengthKeyDown( repeatField )
{
updateAlarmPlural();
}
function repeatUnitCommand( repeatMenu )
{
updateRepeatUnitExtensions();
}
/*
** Functions for advanced repeating elements
*/
function setAdvancedWeekRepeat()
{
var checked = false;
if( gEvent.recurWeekdays > 0 )
{
for( i = 0; i < 6; i++ )
{
dump( gEvent.recurWeekdays | eval( "kRepeatDay_"+i ) );
checked = ( ( gEvent.recurWeekdays | eval( "kRepeatDay_"+i ) ) == eval( gEvent.recurWeekdays ) );
dump( "checked is "+checked );
setFieldValue( "advanced-repeat-week-"+i, checked, "checked" );
}
}
}
/*
** Functions for advanced repeating elements
*/
function getAdvancedWeekRepeat()
{
var Total = 0;
for( i = 0; i < 7; i++ )
{
if( getFieldValue( "advanced-repeat-week-"+i, "checked" ) == true )
{
Total += eval( "kRepeatDay_"+i );
}
}
return( Total );
}
/*
** function to set the menu items text
*/
function updateAdvancedWeekRepeat()
{
//get the day number for today.
var startTime = getDateTimeFieldValue( "start-date-text" );
var dayNumber = startTime.getDay();
//uncheck them all
for( i = 0; i < 7; i++ )
{
document.getElementById( "advanced-repeat-week-"+i ).setAttribute( "checked", "false" );
document.getElementById( "advanced-repeat-week-"+i ).removeAttribute( "disabled" );
}
document.getElementById( "advanced-repeat-week-"+dayNumber ).setAttribute( "checked", "true" );
document.getElementById( "advanced-repeat-week-"+dayNumber ).setAttribute( "disabled", "true" );
}
/*
** function to set the menu items text
*/
function updateAdvancedRepeatDayOfMonth()
{
//get the day number for today.
var startTime = getDateTimeFieldValue( "start-date-text" );
var dayNumber = startTime.getDate();
var dayExtension = getDayExtension( dayNumber );
document.getElementById( "advanced-repeat-dayofmonth" ).setAttribute( "label", "On the "+dayNumber+dayExtension+" of the month" );
document.getElementById( "advanced-repeat-dayofweek" ).setAttribute( "label", getWeekNumberText( getWeekNumberOfMonth() )+" "+getDayOfWeek( dayNumber )+" of the month" );
}
function getDayExtension( dayNumber )
{
switch( dayNumber )
{
case 1:
case 21:
case 31:
return( "st" );
case 2:
case 22:
return( "nd" );
case 3:
case 23:
return( "rd" );
default:
return( "th" );
}
}
function getDayOfWeek( )
{
//get the day number for today.
var startTime = getDateTimeFieldValue( "start-date-text" );
var dayNumber = startTime.getDay();
var dateStringBundle = srGetStrBundle("chrome://penglobal/locale/dateFormat.properties");
//add one to the dayNumber because in the above prop. file, it starts at day1, but JS starts at 0
var oneBasedDayNumber = parseInt( dayNumber ) + 1;
return( dateStringBundle.GetStringFromName( "day."+oneBasedDayNumber+".name" ) );
}
function getWeekNumberOfMonth()
{
//get the day number for today.
var startTime = getDateTimeFieldValue( "start-date-text" );
var dayNumber = startTime.getDay();
var thisMonth = startTime.getMonth();
var monthToCompare = startTime.getMonth();
var weekNumber = 0;
while( monthToCompare == thisMonth )
{
startTime = new Date( startTime.getTime() - ( 1000 * 60 * 60 * 24 * 7 ) );
monthToCompare = startTime.getMonth();
weekNumber++;
}
if( weekNumber > 3 )
{
nextWeek = new Date( getDateTimeFieldValue( "start-date-text" ).getTime() + ( 1000 * 60 * 60 * 24 * 7 ) );
if( nextWeek.getMonth() != thisMonth )
{
//its the last week of the month
weekNumber = 5;
}
}
return( weekNumber );
}
function getWeekNumberText( weekNumber )
{
switch( weekNumber )
{
case 1:
return( "First" );
case 2:
return( "Second" );
case 3:
return( "Third" );
case 4:
return( "Fourth" );
case 5:
return( "Last" );
}
}
/**
* Helper function for filling the form, set the value of a property of a XUL element
*

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

@ -227,16 +227,18 @@
<hbox id="alarm-box">
<checkbox id="alarm-checkbox" label="&newevent.alarm.label;" checked="false" oncommand="commandAlarm()"/>
<spacer id="alarm-spacer" />
<textbox id="alarm-length-field" value="15" />
<menulist id="alarm-length-units" label="&alarm.units.minutes;" value="minutes" >
<textbox id="alarm-length-field" oninput="alarmLengthKeyDown( this )" value="15" />
<menulist id="alarm-length-units" flex="1" labelnumber="labelplural" label="&alarm.units.minutes;" value="minutes" >
<menupopup >
<menuitem label="&alarm.units.minutes;" value="minutes"/>
<menuitem label="&alarm.units.hours;" value="hours"/>
<menuitem label="&alarm.units.days;" value="days"/>
<menuitem label="&alarm.units.minutes;" labelplural="&alarm.units.minutes;" labelsingular="&alarm.units.minutes.singular;" value="minutes"/>
<menuitem label="&alarm.units.hours;" labelplural="&alarm.units.hours;" labelsingular="&alarm.units.hours.singular;" value="hours"/>
<menuitem label="&alarm.units.days;" labelplural="&alarm.units.days;" labelsingular="&alarm.units.days.singular;" value="days"/>
</menupopup>
</menulist>
<label id="alarm-length-text" for="alarm-length-field" value="&newevent.beforealarm.label;"/>
</hbox>
<hbox id="alarm-box-email" collapsed="true">
<checkbox id="alarm-email-checkbox" label="&newevent.email.label;" checked="false" oncommand="commandAlarmEmail()"/>
@ -263,31 +265,57 @@
<vbox>
<hbox id="repeat-box">
<checkbox id="repeat-checkbox" label="&newevent.repeat.label;" checked="false" oncommand="commandRepeat()"/>
<textbox id="repeat-length-field" onmousedownX="updateRepeatLength()" value="1" />
<textbox id="repeat-length-field" disable-controller="repeat" value="1" oninput="repeatLengthKeyDown( this )"/>
<menulist id="repeat-length-units" label="&repeat.units.days;" value="days" >
<menulist crop="never" oncommand="repeatUnitCommand( this )" labelnumber="labelplural" id="repeat-length-units" disable-controller="repeat" label="&repeat.units.days;" value="days" >
<menupopup>
<menuitem id="repeat-days-menu-item" label="&repeat.units.day;" value="days" />
<menuitem id="repeat-weeks-menu-item" label="&repeat.units.week;" value="weeks" />
<menuitem id="repeat-months-menu-item" label="&repeat.units.month;" value="months" />
<menuitem id="repeat-years-menu-item" label="&repeat.units.year;" value="years" />
<menuitem label="&repeat.units.days;" labelplural="&repeat.units.days;" labelsingular="&repeat.units.days.singular;" value="days" />
<menuitem label="&repeat.units.weeks;" labelplural="&repeat.units.weeks;" labelsingular="&repeat.units.weeks.singular;" value="weeks" />
<menuitem label="&repeat.units.months;" labelplural="&repeat.units.months;" labelsingular="&repeat.units.months.singular;" value="months" />
<menuitem label="&repeat.units.years;" labelplural="&repeat.units.years;" labelsingular="&repeat.units.years.singular;" value="years" />
</menupopup>
</menulist>
</hbox>
<hbox id="repeat-extenstions-week" diabled="true" collapsed="true">
<spacer class="repeat-left-spacer" />
<checkbox disable-controller="repeat" class="repeat-day-class" label="Sun" id="advanced-repeat-week-0" value="0" checked="false" />
<checkbox disable-controller="repeat" class="repeat-day-class" label="Mon" id="advanced-repeat-week-1" value="1" checked="false" />
<checkbox disable-controller="repeat" class="repeat-day-class" label="Tue" id="advanced-repeat-week-2" value="2" checked="false" />
<checkbox disable-controller="repeat" class="repeat-day-class" label="Wed" id="advanced-repeat-week-3" value="3" checked="false" />
<checkbox disable-controller="repeat" class="repeat-day-class" label="Thu" id="advanced-repeat-week-4" value="4" checked="false" />
<checkbox disable-controller="repeat" class="repeat-day-class" label="Fri" id="advanced-repeat-week-5" value="5" checked="false" />
<checkbox disable-controller="repeat" class="repeat-day-class" label="Sat" id="advanced-repeat-week-6" value="6" checked="false" />
</hbox>
<hbox id="repeat-extenstions-month" diabled="true" collapsed="true">
<spacer class="repeat-left-spacer" />
<vbox>
<radiogroup id="advanced-repeat-month" disable-controller="repeat">
<radio group="advanced-repeat-month" disable-controller="repeat" id="advanced-repeat-dayofmonth" label="On the xth day of the month" checked="true" />
<radio group="advanced-repeat-month" disable-controller="repeat" id="advanced-repeat-dayofweek" label="Last Tuesday of the month" checked="false" />
</radiogroup>
</vbox>
</hbox>
<spacer height="10" />
<hbox>
<spacer id="radio-spacer" />
<radiogroup id="repeat-until-group" orient="vertical">
<hbox>
<radio group="repeat-until-group" id="repeat-forever-radio" checked="false" label="&newevent.forever.label;" oncommand="commandUntil()"/>
</hbox>
<spacer class="repeat-left-spacer" />
<radiogroup id="repeat-until-group" disable-controller="repeat">
<hbox id="repeat-end-box">
<radio group="repeat-until-group" id="repeat-until-radio" checked="true" label="&newevent.until.label;" oncommand="commandUntil()"/>
<radio group="repeat-until-group" id="repeat-until-radio" disable-controller="repeat" checked="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="after_start"/>
<image class="four-state-image-button" id="repeat-end-date-button" onmousedown="prepareDatePicker('repeat-end-date-text')" popup="oe-date-picker-popup" position="after_start"/>
<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"/>
</hbox>
<hbox>
<radio group="repeat-until-group" id="repeat-forever-radio" disable-controller="repeat" checked="false" label="&newevent.forever.label;" oncommand="commandUntil()"/>
</hbox>
</radiogroup>
</hbox>

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

@ -44,7 +44,6 @@
function unifinderInit()
{
}
@ -82,10 +81,7 @@ var unifinderEventDataSourceObserver =
{
onLoad : function()
{
if( !gICalLib.batchMode )
{
unifinderRefesh();
}
unifinderRefesh();
},
onStartBatch : function()
@ -94,34 +90,25 @@ var unifinderEventDataSourceObserver =
onEndBatch : function()
{
unifinderRefesh();
unifinderRefesh();
},
onAddItem : function( calendarEvent )
{
if( !gICalLib.batchMode )
{
if( calendarEvent )
{
unifinderRefesh();
}
}
if( calendarEvent )
{
unifinderRefesh();
}
},
onModifyItem : function( calendarEvent, originalEvent )
{
if( !gICalLib.batchMode )
{
unifinderRefesh();
}
unifinderRefesh();
},
onDeleteItem : function( calendarEvent )
{
if( !gICalLib.batchMode )
{
unifinderRefesh();
}
unifinderRefesh();
},
onAlarm : function( calendarEvent )

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

@ -35,46 +35,68 @@
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<!-- CSS File with all styles specific to the unifinder -->
<?xml-stylesheet href="chrome://calendar/skin/unifinder/unifinder.css" type="text/css"?>
<?xml-stylesheet href="chrome://calendar/skin/unifinder/unifinder.css" ?>
<!-- DTD File with all strings specific to the unifinder -->
<!DOCTYPE window
[
<!ENTITY % dtd1 SYSTEM "chrome://calendar/locale/global.dtd" > %dtd1;
<!ENTITY % dtd1 SYSTEM "chrome://global/locale/global.dtd" > %dtd1;
<!ENTITY % dtd2 SYSTEM "chrome://calendar/locale/unifinder.dtd" > %dtd2;
<!ENTITY % dtd3 SYSTEM "chrome://calendar/locale/calendar.dtd" > %dtd3;
]>
<overlay
id="unifinder-overlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<!-- Javascript includes -->
<unifinder id="calendar-unifinder-overlay">
<vbox id="unifinder-categories-box" >
<vbox id="unifinder-categories-content-box" flex="1" >
<tree id="unifinder-categories-tree" class="unifinder-tree-class" flex="1" >
<treechildren id="unifinder-categories-tree-children" flex="1"/>
</tree>
</vbox>
</vbox>
<unifinder-button id="unifinder-remove-button" class="unifinder-remove-button" tooltip="aTooltip" tooltiptext="&calendar.tools.delete.tooltip;" oncommand="unifinderRemoveCommand()" />
<unifinder-button id="unifinder-modify-button" class="unifinder-modify-button" tooltip="aTooltip" tooltiptext="&calendar.tools.modify.tooltip;" oncommand="unifinderModifyCommand()" />
<box flex="1">
<tabbox class="unifinder-tab-box" unifinder-tab-box="true" orient="vertical" flex="1" >
<tabs class="unifinder-tab" orient="horizontal" >
<tab label="&calendar.main.tab.label;" />
<tab label="&unifinder.tab.search.label;" />
</tabs>
<spacer class="unifinder-tabs-spacer" />
<tabpanels flex="1">
<vbox id="unifinder-categories-box" >
<vbox id="unifinder-categories-content-box" flex="1" >
<tree id="unifinder-categories-tree" class="unifinder-tree-class" flex="1" >
<treechildren id="unifinder-categories-tree-children" flex="1"/>
</tree>
</vbox>
</vbox>
<tree id="unifinder-search-results-tree" class="unifinder-tree-class" flex="1">
<treechildren id="unifinder-search-results-tree-children" flex="1"/>
</tree>
<vbox flex="1" >
<unifinder-search-controls keypressfunction="unifinderSearchKeyPress( this, event )" />
<tree id="unifinder-search-results-tree" class="unifinder-tree-class" >
<treecols>
<treecol flex="1" />
</treecols>
<treechildren id="unifinder-search-results-tree-children" flex="1"/>
</tree>
<splitter id="unifinder-splitter" collapse="before" persist="state hidden collapsed"
class="chromeclass-extrachrome sidebar-splitter">
<grippy class="sidebar-splitter-grippy"/>
</splitter>
</vbox>
</tabpanels>
</tabbox>
</box>
</unifinder>
</overlay>

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

@ -1,108 +1,105 @@
penglobal.jar:
content/penglobal/calendarEvent.js (content/penglobal/calendarEvent.js)
content/penglobal/contents.rdf (content/penglobal/contents.rdf)
content/penglobal/dateUtils.js (content/penglobal/dateUtils.js)
content/penglobal/datepicker-overlay.xul (content/penglobal/datepicker-overlay.xul)
content/penglobal/datepicker.js (content/penglobal/datepicker.js)
content/penglobal/timepicker-overlay.xul (content/penglobal/timepicker-overlay.xul)
content/penglobal/timepicker.js (content/penglobal/timepicker.js)
content/penglobal/unifinder-overlay.xul (content/penglobal/unifinder-overlay.xul)
content/penglobal/unifinder.js (content/penglobal/unifinder.js)
content/penglobal/unifinderBindings.xml (content/penglobal/unifinderBindings.xml)
content/penglobal/unifinderxul.css (content/penglobal/unifinderxul.css)
locale/en-US/penglobal/contents.rdf (locale/en-US/penglobal/contents.rdf)
locale/en-US/penglobal/dateFormat.properties (locale/en-US/penglobal/dateFormat.properties)
locale/en-US/penglobal/global.dtd (locale/en-US/penglobal/global.dtd)
locale/en-US/penglobal/unifinder.dtd (locale/en-US/penglobal/unifinder.dtd)
skin/modern/penglobal/datepicker/datepicker.css (skin/modern/penglobal/datepicker/datepicker.css)
skin/modern/penglobal/datepicker/day_grid.png (skin/modern/penglobal/datepicker/day_grid.png)
skin/modern/penglobal/datepicker/left_arrow.png (skin/modern/penglobal/datepicker/left_arrow.png)
skin/modern/penglobal/datepicker/right_arrow.png (skin/modern/penglobal/datepicker/right_arrow.png)
skin/modern/penglobal/contents.rdf (skin/modern/penglobal/contents.rdf)
skin/modern/penglobal/dialogOverlay.css (skin/modern/penglobal/dialogOverlay.css)
skin/modern/penglobal/dialog/standard-dialog-tips-bg.png (skin/modern/penglobal/dialog/standard-dialog-tips-bg.png)
skin/modern/penglobal/dialog/standard-dialog-title-background.png (skin/modern/penglobal/dialog/standard-dialog-title-background.png)
skin/modern/penglobal/timepicker/time_picker_minutes_bottom.png (skin/modern/penglobal/timepicker/time_picker_minutes_bottom.png)
skin/modern/penglobal/timepicker/timepicker.css (skin/modern/penglobal/timepicker/timepicker.css)
skin/modern/penglobal/unifinder/bar_under_tabs.png (skin/modern/penglobal/unifinder/bar_under_tabs.png)
skin/modern/penglobal/unifinder/categories_deselected.png (skin/modern/penglobal/unifinder/categories_deselected.png)
skin/modern/penglobal/unifinder/categories_selected.png (skin/modern/penglobal/unifinder/categories_selected.png)
skin/modern/penglobal/unifinder/clearresults_disabled.png (skin/modern/penglobal/unifinder/clearresults_disabled.png)
skin/modern/penglobal/unifinder/clearresults_down.png (skin/modern/penglobal/unifinder/clearresults_down.png)
skin/modern/penglobal/unifinder/clearresults_hover.png (skin/modern/penglobal/unifinder/clearresults_hover.png)
skin/modern/penglobal/unifinder/clearresults_up.png (skin/modern/penglobal/unifinder/clearresults_up.png)
skin/modern/penglobal/unifinder/closed_folder.png (skin/modern/penglobal/unifinder/closed_folder.png)
skin/modern/penglobal/unifinder/copy_disabled.png (skin/modern/penglobal/unifinder/copy_disabled.png)
skin/modern/penglobal/unifinder/copy_down.png (skin/modern/penglobal/unifinder/copy_down.png)
skin/modern/penglobal/unifinder/copy_hover.png (skin/modern/penglobal/unifinder/copy_hover.png)
skin/modern/penglobal/unifinder/copy_up.png (skin/modern/penglobal/unifinder/copy_up.png)
skin/modern/penglobal/unifinder/documents_deselected.png (skin/modern/penglobal/unifinder/documents_deselected.png)
skin/modern/penglobal/unifinder/documents_selected.png (skin/modern/penglobal/unifinder/documents_selected.png)
skin/modern/penglobal/unifinder/history_deselected.png (skin/modern/penglobal/unifinder/history_deselected.png)
skin/modern/penglobal/unifinder/history_selected.png (skin/modern/penglobal/unifinder/history_selected.png)
skin/modern/penglobal/unifinder/modify_disabled.png (skin/modern/penglobal/unifinder/modify_disabled.png)
skin/modern/penglobal/unifinder/modify_down.png (skin/modern/penglobal/unifinder/modify_down.png)
skin/modern/penglobal/unifinder/modify_hover.png (skin/modern/penglobal/unifinder/modify_hover.png)
skin/modern/penglobal/unifinder/modify_up.png (skin/modern/penglobal/unifinder/modify_up.png)
skin/modern/penglobal/unifinder/move_disabled.png (skin/modern/penglobal/unifinder/move_disabled.png)
skin/modern/penglobal/unifinder/move_down.png (skin/modern/penglobal/unifinder/move_down.png)
skin/modern/penglobal/unifinder/move_hover.png (skin/modern/penglobal/unifinder/move_hover.png)
skin/modern/penglobal/unifinder/move_up.png (skin/modern/penglobal/unifinder/move_up.png)
skin/modern/penglobal/unifinder/newcategory_disabled.png (skin/modern/penglobal/unifinder/newcategory_disabled.png)
skin/modern/penglobal/unifinder/newcategory_down.png (skin/modern/penglobal/unifinder/newcategory_down.png)
skin/modern/penglobal/unifinder/newcategory_hover.png (skin/modern/penglobal/unifinder/newcategory_hover.png)
skin/modern/penglobal/unifinder/newcategory_up.png (skin/modern/penglobal/unifinder/newcategory_up.png)
skin/modern/penglobal/unifinder/open_folder.png (skin/modern/penglobal/unifinder/open_folder.png)
skin/modern/penglobal/unifinder/options_button.png (skin/modern/penglobal/unifinder/options_button.png)
skin/modern/penglobal/unifinder/options_button_down.png (skin/modern/penglobal/unifinder/options_button_down.png)
skin/modern/penglobal/unifinder/options_button_hover.png (skin/modern/penglobal/unifinder/options_button_hover.png)
skin/modern/penglobal/unifinder/options_button_up.png (skin/modern/penglobal/unifinder/options_button_up.png)
skin/modern/penglobal/unifinder/publish_disabled.png (skin/modern/penglobal/unifinder/publish_disabled.png)
skin/modern/penglobal/unifinder/publish_down.png (skin/modern/penglobal/unifinder/publish_down.png)
skin/modern/penglobal/unifinder/publish_hover.png (skin/modern/penglobal/unifinder/publish_hover.png)
skin/modern/penglobal/unifinder/publish_up.png (skin/modern/penglobal/unifinder/publish_up.png)
skin/modern/penglobal/unifinder/remove_disabled.png (skin/modern/penglobal/unifinder/remove_disabled.png)
skin/modern/penglobal/unifinder/remove_down.png (skin/modern/penglobal/unifinder/remove_down.png)
skin/modern/penglobal/unifinder/remove_hover.png (skin/modern/penglobal/unifinder/remove_hover.png)
skin/modern/penglobal/unifinder/remove_up.png (skin/modern/penglobal/unifinder/remove_up.png)
skin/modern/penglobal/unifinder/results_bar.png (skin/modern/penglobal/unifinder/results_bar.png)
skin/modern/penglobal/unifinder/search_deselected.png (skin/modern/penglobal/unifinder/search_deselected.png)
skin/modern/penglobal/unifinder/search_selected.png (skin/modern/penglobal/unifinder/search_selected.png)
skin/modern/penglobal/unifinder/small_options_button_down.png (skin/modern/penglobal/unifinder/small_options_button_down.png)
skin/modern/penglobal/unifinder/small_options_button_hover.png (skin/modern/penglobal/unifinder/small_options_button_hover.png)
skin/modern/penglobal/unifinder/small_options_button_up.png (skin/modern/penglobal/unifinder/small_options_button_up.png)
skin/modern/penglobal/unifinder/tab-act-lft-mid.png (skin/modern/penglobal/unifinder/tab-act-lft-mid.png)
skin/modern/penglobal/unifinder/tab-act-lft-top.png (skin/modern/penglobal/unifinder/tab-act-lft-top.png)
skin/modern/penglobal/unifinder/tab-act-mid-top.png (skin/modern/penglobal/unifinder/tab-act-mid-top.png)
skin/modern/penglobal/unifinder/tab-act-rit-mid.png (skin/modern/penglobal/unifinder/tab-act-rit-mid.png)
skin/modern/penglobal/unifinder/tab-act-rit-top.png (skin/modern/penglobal/unifinder/tab-act-rit-top.png)
skin/modern/penglobal/unifinder/tab-sel-lft-btm.png (skin/modern/penglobal/unifinder/tab-sel-lft-btm.png)
skin/modern/penglobal/unifinder/tab-sel-lft-mid.png (skin/modern/penglobal/unifinder/tab-sel-lft-mid.png)
skin/modern/penglobal/unifinder/tab-sel-lft-top.png (skin/modern/penglobal/unifinder/tab-sel-lft-top.png)
skin/modern/penglobal/unifinder/tab-sel-mid-btm.png (skin/modern/penglobal/unifinder/tab-sel-mid-btm.png)
skin/modern/penglobal/unifinder/tab-sel-mid-top.png (skin/modern/penglobal/unifinder/tab-sel-mid-top.png)
skin/modern/penglobal/unifinder/tab-sel-rit-btm.png (skin/modern/penglobal/unifinder/tab-sel-rit-btm.png)
skin/modern/penglobal/unifinder/tab-sel-rit-mid.png (skin/modern/penglobal/unifinder/tab-sel-rit-mid.png)
skin/modern/penglobal/unifinder/tab-sel-rit-top.png (skin/modern/penglobal/unifinder/tab-sel-rit-top.png)
skin/modern/penglobal/unifinder/tab-usel-lft-btm.png (skin/modern/penglobal/unifinder/tab-usel-lft-btm.png)
skin/modern/penglobal/unifinder/tab-usel-lft-mid.png (skin/modern/penglobal/unifinder/tab-usel-lft-mid.png)
skin/modern/penglobal/unifinder/tab-usel-lft-top.png (skin/modern/penglobal/unifinder/tab-usel-lft-top.png)
skin/modern/penglobal/unifinder/tab-usel-mid-btm.png (skin/modern/penglobal/unifinder/tab-usel-mid-btm.png)
skin/modern/penglobal/unifinder/tab-usel-mid-top.png (skin/modern/penglobal/unifinder/tab-usel-mid-top.png)
skin/modern/penglobal/unifinder/tab-usel-rit-btm.png (skin/modern/penglobal/unifinder/tab-usel-rit-btm.png)
skin/modern/penglobal/unifinder/tab-usel-rit-mid.png (skin/modern/penglobal/unifinder/tab-usel-rit-mid.png)
skin/modern/penglobal/unifinder/tab-usel-rit-top.png (skin/modern/penglobal/unifinder/tab-usel-rit-top.png)
skin/modern/penglobal/unifinder/tabs-lft.png (skin/modern/penglobal/unifinder/tabs-lft.png)
skin/modern/penglobal/unifinder/tabs-mid.png (skin/modern/penglobal/unifinder/tabs-mid.png)
skin/modern/penglobal/unifinder/tabs-rit.png (skin/modern/penglobal/unifinder/tabs-rit.png)
skin/modern/penglobal/unifinder/toolbar_grippy_arrow.png (skin/modern/penglobal/unifinder/toolbar_grippy_arrow.png)
skin/modern/penglobal/unifinder/toolbar_grippy_arrow_collapsed.png (skin/modern/penglobal/unifinder/toolbar_grippy_arrow_collapsed.png)
skin/modern/penglobal/unifinder/topbar_corner4.gif (skin/modern/penglobal/unifinder/topbar_corner4.gif)
skin/modern/penglobal/unifinder/topbar_striped.png (skin/modern/penglobal/unifinder/topbar_striped.png)
skin/modern/penglobal/unifinder/unifinder.css (skin/modern/penglobal/unifinder/unifinder.css)
calendar.jar:
content/calendar/calendarEvent.js (content/calendar/calendarEvent.js)
content/calendar/contents.rdf (content/calendar/contents.rdf)
content/calendar/dateUtils.js (content/calendar/dateUtils.js)
content/calendar/datepicker/datepicker-overlay.xul (content/calendar/datepicker-overlay.xul)
content/calendar/datepicker/datepicker.js (content/calendar/datepicker/datepicker.js)
content/calendar/timepicker/timepicker-overlay.xul (content/calendar/timepicker/timepicker-overlay.xul)
content/calendar/timepicker/timepicker.js (content/calendar/timepicker/timepicker.js)
content/calendar/unifinder/unifinder-overlay.xul (content/calendar/unifinder/unifinder-overlay.xul)
content/calendar/unifinder/unifinder.js (content/calendar/unifinder/unifinder.js)
content/calendar/unifinder/unifinderBindings.xml (content/calendar/unifinder/unifinderBindings.xml)
content/calendar/unifinder/unifinderxul.css (content/calendar/unifinder/unifinderxul.css)
locale/en-US/calendar/contents.rdf (locale/en-US/calendar/contents.rdf)
locale/en-US/calendar/dateFormat.properties (locale/en-US/calendar/dateFormat.properties)
locale/en-US/calendar/global.dtd (locale/en-US/calendar/global.dtd)
locale/en-US/calendar/unifinder.dtd (locale/en-US/calendar/unifinder.dtd)
skin/modern/calendar/datepicker/datepicker.css (skin/modern/calendar/datepicker/datepicker.css)
skin/modern/calendar/datepicker/day_grid.png (skin/modern/calendar/datepicker/day_grid.png)
skin/modern/calendar/datepicker/left_arrow.png (skin/modern/calendar/datepicker/left_arrow.png)
skin/modern/calendar/datepicker/right_arrow.png (skin/modern/calendar/datepicker/right_arrow.png)
skin/modern/calendar/contents.rdf (skin/modern/calendar/contents.rdf)
skin/modern/calendar/dialogOverlay.css (skin/modern/calendar/dialogOverlay.css)
skin/modern/calendar/dialog/standard-dialog-tips-bg.png (skin/modern/calendar/dialog/standard-dialog-tips-bg.png)
skin/modern/calendar/dialog/standard-dialog-title-background.png (skin/modern/calendar/dialog/standard-dialog-title-background.png)
skin/modern/calendar/timepicker/time_picker_minutes_bottom.png (skin/modern/calendar/timepicker/time_picker_minutes_bottom.png)
skin/modern/calendar/timepicker/timepicker.css (skin/modern/calendar/timepicker/timepicker.css)
skin/modern/calendar/unifinder/bar_under_tabs.png (skin/modern/calendar/unifinder/bar_under_tabs.png)
skin/modern/calendar/unifinder/categories_deselected.png (skin/modern/calendar/unifinder/categories_deselected.png)
skin/modern/calendar/unifinder/categories_selected.png (skin/modern/calendar/unifinder/categories_selected.png)
skin/modern/calendar/unifinder/clearresults_disabled.png (skin/modern/calendar/unifinder/clearresults_disabled.png)
skin/modern/calendar/unifinder/clearresults_down.png (skin/modern/calendar/unifinder/clearresults_down.png)
skin/modern/calendar/unifinder/clearresults_hover.png (skin/modern/calendar/unifinder/clearresults_hover.png)
skin/modern/calendar/unifinder/clearresults_up.png (skin/modern/calendar/unifinder/clearresults_up.png)
skin/modern/calendar/unifinder/closed_folder.png (skin/modern/calendar/unifinder/closed_folder.png)
skin/modern/calendar/unifinder/copy_disabled.png (skin/modern/calendar/unifinder/copy_disabled.png)
skin/modern/calendar/unifinder/copy_down.png (skin/modern/calendar/unifinder/copy_down.png)
skin/modern/calendar/unifinder/copy_hover.png (skin/modern/calendar/unifinder/copy_hover.png)
skin/modern/calendar/unifinder/copy_up.png (skin/modern/calendar/unifinder/copy_up.png)
skin/modern/calendar/unifinder/documents_deselected.png (skin/modern/calendar/unifinder/documents_deselected.png)
skin/modern/calendar/unifinder/documents_selected.png (skin/modern/calendar/unifinder/documents_selected.png)
skin/modern/calendar/unifinder/history_deselected.png (skin/modern/calendar/unifinder/history_deselected.png)
skin/modern/calendar/unifinder/history_selected.png (skin/modern/calendar/unifinder/history_selected.png)
skin/modern/calendar/unifinder/modify_disabled.png (skin/modern/calendar/unifinder/modify_disabled.png)
skin/modern/calendar/unifinder/modify_down.png (skin/modern/calendar/unifinder/modify_down.png)
skin/modern/calendar/unifinder/modify_hover.png (skin/modern/calendar/unifinder/modify_hover.png)
skin/modern/calendar/unifinder/modify_up.png (skin/modern/calendar/unifinder/modify_up.png)
skin/modern/calendar/unifinder/move_disabled.png (skin/modern/calendar/unifinder/move_disabled.png)
skin/modern/calendar/unifinder/move_down.png (skin/modern/calendar/unifinder/move_down.png)
skin/modern/calendar/unifinder/move_hover.png (skin/modern/calendar/unifinder/move_hover.png)
skin/modern/calendar/unifinder/move_up.png (skin/modern/calendar/unifinder/move_up.png)
skin/modern/calendar/unifinder/newcategory_disabled.png (skin/modern/calendar/unifinder/newcategory_disabled.png)
skin/modern/calendar/unifinder/newcategory_down.png (skin/modern/calendar/unifinder/newcategory_down.png)
skin/modern/calendar/unifinder/newcategory_hover.png (skin/modern/calendar/unifinder/newcategory_hover.png)
skin/modern/calendar/unifinder/newcategory_up.png (skin/modern/calendar/unifinder/newcategory_up.png)
skin/modern/calendar/unifinder/open_folder.png (skin/modern/calendar/unifinder/open_folder.png)
skin/modern/calendar/unifinder/options_button.png (skin/modern/calendar/unifinder/options_button.png)
skin/modern/calendar/unifinder/options_button_down.png (skin/modern/calendar/unifinder/options_button_down.png)
skin/modern/calendar/unifinder/options_button_hover.png (skin/modern/calendar/unifinder/options_button_hover.png)
skin/modern/calendar/unifinder/options_button_up.png (skin/modern/calendar/unifinder/options_button_up.png)
skin/modern/calendar/unifinder/publish_disabled.png (skin/modern/calendar/unifinder/publish_disabled.png)
skin/modern/calendar/unifinder/publish_down.png (skin/modern/calendar/unifinder/publish_down.png)
skin/modern/calendar/unifinder/publish_hover.png (skin/modern/calendar/unifinder/publish_hover.png)
skin/modern/calendar/unifinder/publish_up.png (skin/modern/calendar/unifinder/publish_up.png)
skin/modern/calendar/unifinder/remove_disabled.png (skin/modern/calendar/unifinder/remove_disabled.png)
skin/modern/calendar/unifinder/remove_down.png (skin/modern/calendar/unifinder/remove_down.png)
skin/modern/calendar/unifinder/remove_hover.png (skin/modern/calendar/unifinder/remove_hover.png)
skin/modern/calendar/unifinder/remove_up.png (skin/modern/calendar/unifinder/remove_up.png)
skin/modern/calendar/unifinder/results_bar.png (skin/modern/calendar/unifinder/results_bar.png)
skin/modern/calendar/unifinder/search_deselected.png (skin/modern/calendar/unifinder/search_deselected.png)
skin/modern/calendar/unifinder/search_selected.png (skin/modern/calendar/unifinder/search_selected.png)
skin/modern/calendar/unifinder/small_options_button_down.png (skin/modern/calendar/unifinder/small_options_button_down.png)
skin/modern/calendar/unifinder/small_options_button_hover.png (skin/modern/calendar/unifinder/small_options_button_hover.png)
skin/modern/calendar/unifinder/small_options_button_up.png (skin/modern/calendar/unifinder/small_options_button_up.png)
skin/modern/calendar/unifinder/tab-act-lft-mid.png (skin/modern/calendar/unifinder/tab-act-lft-mid.png)
skin/modern/calendar/unifinder/tab-act-lft-top.png (skin/modern/calendar/unifinder/tab-act-lft-top.png)
skin/modern/calendar/unifinder/tab-act-mid-top.png (skin/modern/calendar/unifinder/tab-act-mid-top.png)
skin/modern/calendar/unifinder/tab-act-rit-mid.png (skin/modern/calendar/unifinder/tab-act-rit-mid.png)
skin/modern/calendar/unifinder/tab-act-rit-top.png (skin/modern/calendar/unifinder/tab-act-rit-top.png)
skin/modern/calendar/unifinder/tab-sel-lft-btm.png (skin/modern/calendar/unifinder/tab-sel-lft-btm.png)
skin/modern/calendar/unifinder/tab-sel-lft-mid.png (skin/modern/calendar/unifinder/tab-sel-lft-mid.png)
skin/modern/calendar/unifinder/tab-sel-lft-top.png (skin/modern/calendar/unifinder/tab-sel-lft-top.png)
skin/modern/calendar/unifinder/tab-sel-mid-btm.png (skin/modern/calendar/unifinder/tab-sel-mid-btm.png)
skin/modern/calendar/unifinder/tab-sel-mid-top.png (skin/modern/calendar/unifinder/tab-sel-mid-top.png)
skin/modern/calendar/unifinder/tab-sel-rit-btm.png (skin/modern/calendar/unifinder/tab-sel-rit-btm.png)
skin/modern/calendar/unifinder/tab-sel-rit-mid.png (skin/modern/calendar/unifinder/tab-sel-rit-mid.png)
skin/modern/calendar/unifinder/tab-sel-rit-top.png (skin/modern/calendar/unifinder/tab-sel-rit-top.png)
skin/modern/calendar/unifinder/tab-usel-lft-btm.png (skin/modern/calendar/unifinder/tab-usel-lft-btm.png)
skin/modern/calendar/unifinder/tab-usel-lft-mid.png (skin/modern/calendar/unifinder/tab-usel-lft-mid.png)
skin/modern/calendar/unifinder/tab-usel-lft-top.png (skin/modern/calendar/unifinder/tab-usel-lft-top.png)
skin/modern/calendar/unifinder/tab-usel-mid-btm.png (skin/modern/calendar/unifinder/tab-usel-mid-btm.png)
skin/modern/calendar/unifinder/tab-usel-mid-top.png (skin/modern/calendar/unifinder/tab-usel-mid-top.png)
skin/modern/calendar/unifinder/tab-usel-rit-btm.png (skin/modern/calendar/unifinder/tab-usel-rit-btm.png)
skin/modern/calendar/unifinder/tab-usel-rit-mid.png (skin/modern/calendar/unifinder/tab-usel-rit-mid.png)
skin/modern/calendar/unifinder/tab-usel-rit-top.png (skin/modern/calendar/unifinder/tab-usel-rit-top.png)
skin/modern/calendar/unifinder/tabs-lft.png (skin/modern/calendar/unifinder/tabs-lft.png)
skin/modern/calendar/unifinder/tabs-mid.png (skin/modern/calendar/unifinder/tabs-mid.png)
skin/modern/calendar/unifinder/tabs-rit.png (skin/modern/calendar/unifinder/tabs-rit.png)
skin/modern/calendar/unifinder/toolbar_grippy_arrow.png (skin/modern/calendar/unifinder/toolbar_grippy_arrow.png)
skin/modern/calendar/unifinder/toolbar_grippy_arrow_collapsed.png (skin/modern/calendar/unifinder/toolbar_grippy_arrow_collapsed.png)
skin/modern/calendar/unifinder/topbar_corner4.gif (skin/modern/calendar/unifinder/topbar_corner4.gif)
skin/modern/calendar/unifinder/topbar_striped.png (skin/modern/calendar/unifinder/topbar_striped.png)
skin/modern/calendar/unifinder/unifinder.css (skin/modern/calendar/unifinder/unifinder.css)
content/calendar/calendar.js (content/calendar.js)
content/calendar/calendar.xul (content/calendar.xul)
content/calendar/calendarDayView.js (content/calendarDayView.js)

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

@ -40,16 +40,20 @@
<!ENTITY alarm.units.hours "Hours" >
<!ENTITY alarm.units.days "Days" >
<!ENTITY alarm.units.minutes.singular "Minute" >
<!ENTITY alarm.units.hours.singular "Hour" >
<!ENTITY alarm.units.days.singular "Day" >
<!ENTITY repeat.units.days "Days" >
<!ENTITY repeat.units.weeks "Weeks" >
<!ENTITY repeat.units.months "Months" >
<!ENTITY repeat.units.years "Years" >
<!ENTITY repeat.units.day "Day" >
<!ENTITY repeat.units.week "Week" >
<!ENTITY repeat.units.month "Month" >
<!ENTITY repeat.units.year "Year" >
<!ENTITY repeat.units.days.singular "Day" >
<!ENTITY repeat.units.weeks.singular "Week" >
<!ENTITY repeat.units.months.singular "Month" >
<!ENTITY repeat.units.years.singular "Year" >
<!ENTITY newevent.title.label "Title" >

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

@ -62,6 +62,7 @@ month.10.name=October
month.11.name=November
month.12.name=December
#Don't change this without notifying people in calendar first.
day.1.name=Sunday
day.2.name=Monday
day.3.name=Tuesday

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

@ -300,7 +300,7 @@ tabpanels {
.unifinder-remove-button > .unifinder-button-image
{
list-style-image : url("chrome://penglobal/skin/unifinder/remove_up.png");
list-style-image : url("chrome://calendar/skin/unifinder/remove_up.png");
}
.unifinder-remove-button[disabled="true"] > .unifinder-button-image,
@ -326,7 +326,7 @@ tabpanels {
.unifinder-new-category-button > .unifinder-button-image
{
list-style-image : url("chrome://penglobal/skin/unifinder/newcategory_up.png");
list-style-image : url("chrome://calendar/skin/unifinder/newcategory_up.png");
}
.unifinder-new-category-button[disabled="true"] > .unifinder-button-image,
.unifinder-new-category-button[disabled="true"]:hover > .unifinder-button-image,