Enabling switching of first day in month view, adding in various prefs.

This commit is contained in:
mikep%oeone.com 2002-04-08 19:38:55 +00:00
parent 42e44e9df8
commit 8b25e3193b
9 changed files with 225 additions and 83 deletions

View File

@ -122,6 +122,7 @@ function MonthView( calendarWindow )
{
onSelectionChanged : function( EventSelectionArray )
{
dump( "\nIn Month view, on selection changed");
if( EventSelectionArray.length > 0 )
{
//if there are selected events.
@ -130,16 +131,19 @@ function MonthView( calendarWindow )
gCalendarWindow.monthView.clearSelectedBoxes();
dump( "\nIn Month view, eventSelectionArray.length is "+EventSelectionArray.length );
var i = 0;
for( i = 0; i < EventSelectionArray.length; i++ )
{
dump( "\nin Month view, going to try and get the event boxes with name 'month-view-event-box-"+EventSelectionArray[i].id+"'" );
var EventBoxes = document.getElementsByAttribute( "name", "month-view-event-box-"+EventSelectionArray[i].id );
dump( "\nIn Month view, found "+EventBoxes.length+" matches for the selected event." );
for ( j = 0; j < EventBoxes.length; j++ )
{
EventBoxes[j].setAttribute( "eventselected", "true" );
}
}
dump( "\nAll Done in Selection for Month View" );
}
else
{
@ -416,13 +420,38 @@ MonthView.prototype.refreshDisplay = function( )
}
document.getElementById( "0-year-title" ).setAttribute( "value" , newYear );
var Offset = this.calendarWindow.calendarPreferences.getPref( "weekstart" );
NewArrayOfDayNames = new Array();
for( i = 0; i < ArrayOfDayNames.length; i++ )
{
NewArrayOfDayNames[i] = ArrayOfDayNames[i];
}
for( i = 0; i < Offset; i++ )
{
var FirstElement = NewArrayOfDayNames.shift();
NewArrayOfDayNames.push( FirstElement );
}
//set the day names (Some people start on Sunday, others start on Monday
for( i = 1; i <= 7; i++ )
{
document.getElementById( "month-view-header-day-"+i ).value = NewArrayOfDayNames[ (i-1) ];
}
// Write in all the day numbers and create the dayBoxItemByDateArray, see notes above
// figure out first and last days of the month
var firstDate = new Date( newYear, newMonth, 1 );
var firstDayOfWeek = firstDate.getDay();
var firstDayOfWeek = firstDate.getDay() - Offset;
if( firstDayOfWeek < 0 )
firstDayOfWeek+=7;
var lastDayOfMonth = DateUtils.getLastDayOfMonth( newYear, newMonth );
// prepare the dayBoxItemByDateArray, we will be filling this in
@ -444,13 +473,22 @@ MonthView.prototype.refreshDisplay = function( )
dayNumberItem.setAttribute( "value" , "" );
dayBoxItem.setAttribute( "empty" , "true" );
dayBoxItem.setAttribute( "weekend", "false" );
dayBoxItem.dayNumber = null;
}
else
{
dayNumberItem.setAttribute( "value" , dayNumber );
dayBoxItem.setAttribute( "empty" , "false" );
dayBoxItem.setAttribute( "empty" , "false" );
var thisDate = new Date( newYear, newMonth, dayNumber );
if( thisDate.getDay() == 0 | thisDate.getDay() == 6 )
{
dayBoxItem.setAttribute( "weekend", "true" );
}
else
dayBoxItem.setAttribute( "weekend", "false" );
dayBoxItem.dayNumber = dayNumber;
this.dayBoxItemByDateArray[ dayNumber ] = dayBoxItem;
@ -542,7 +580,6 @@ MonthView.prototype.hiliteTodaysDate = function( )
//highlight today.
var Today = new Date( );
if ( Year == Today.getFullYear() && Month == Today.getMonth() )
{
var ThisBox = this.dayBoxItemByDateArray[ Today.getDate() ];

View File

@ -54,6 +54,19 @@
>
<script type="application/x-javascript" src="chrome://calendar/content/calendarMonthView.js"/>
<script type="application/x-javascript">
var ArrayOfDayNames = new Array();
ArrayOfDayNames[0] = "&calendar.monthview.column.1.name;";
ArrayOfDayNames[1] = "&calendar.monthview.column.2.name;";
ArrayOfDayNames[2] = "&calendar.monthview.column.3.name;";
ArrayOfDayNames[3] = "&calendar.monthview.column.4.name;";
ArrayOfDayNames[4] = "&calendar.monthview.column.5.name;";
ArrayOfDayNames[5] = "&calendar.monthview.column.6.name;";
ArrayOfDayNames[6] = "&calendar.monthview.column.7.name;";
</script>
<vbox id="month-view-box" flex="1">
<!-- Month View: Controls-->
@ -115,30 +128,30 @@
<rows >
<row flex="1">
<vbox class="month-column-center-day-class">
<label class="month-view-header-days" value="&calendar.monthview.column.1.name;"/>
<label class="month-view-header-days" id="month-view-header-day-1"/>
</vbox>
<vbox class="month-column-center-day-class">
<label class="month-view-header-days" value="&calendar.monthview.column.2.name;"/>
<label class="month-view-header-days" id="month-view-header-day-2"/>
</vbox>
<vbox class="month-column-center-day-class">
<label class="month-view-header-days" value="&calendar.monthview.column.3.name;"/>
<label class="month-view-header-days" id="month-view-header-day-3"/>
</vbox>
<vbox class="month-column-center-day-class">
<label class="month-view-header-days" value="&calendar.monthview.column.4.name;"/>
<label class="month-view-header-days" id="month-view-header-day-4"/>
</vbox>
<vbox class="month-column-center-day-class">
<label class="month-view-header-days" value="&calendar.monthview.column.5.name;"/>
<label class="month-view-header-days" id="month-view-header-day-5"/>
</vbox>
<vbox class="month-column-center-day-class">
<label class="month-view-header-days" value="&calendar.monthview.column.6.name;"/>
<label class="month-view-header-days" id="month-view-header-day-6"/>
</vbox>
<vbox class="month-column-center-day-class">
<label class="month-view-header-days" value="&calendar.monthview.column.7.name;"/>
<label class="month-view-header-days" id="month-view-header-day-7"/>
</vbox>
</row>
<row flex="1" >
<vbox class="month-day-box-class weekend" flex="1" id="month-week-1-day-1-box" weekend="true">
<vbox class="month-day-box-class" flex="1" id="month-week-1-day-1-box">
<hbox>
<label class="month-day-number-class" id="month-week-1-day-1" value="" />
</hbox>
@ -174,7 +187,7 @@
</hbox>
</vbox>
<vbox class="month-day-box-class weekend saturday" flex="1" id="month-week-1-day-7-box" weekend="true" >
<vbox class="month-day-box-class" flex="1" id="month-week-1-day-7-box">
<hbox>
<label class="month-day-number-class" id="month-week-1-day-7" value="" />
</hbox>
@ -182,7 +195,7 @@
</row>
<row flex="1" >
<vbox class="month-day-box-class weekend" flex="1" id="month-week-2-day-1-box" weekend="true">
<vbox class="month-day-box-class" flex="1" id="month-week-2-day-1-box">
<hbox>
<label class="month-day-number-class" id="month-week-2-day-1" value="" />
</hbox>
@ -218,7 +231,7 @@
</hbox>
</vbox>
<vbox class="month-day-box-class weekend saturday" flex="1" id="month-week-2-day-7-box" weekend="true" >
<vbox class="month-day-box-class" flex="1" id="month-week-2-day-7-box">
<hbox>
<label class="month-day-number-class" id="month-week-2-day-7" value="" />
</hbox>
@ -226,7 +239,7 @@
</row>
<row flex="1" >
<vbox class="month-day-box-class weekend" flex="1" id="month-week-3-day-1-box" weekend="true" >
<vbox class="month-day-box-class" flex="1" id="month-week-3-day-1-box">
<hbox>
<label class="month-day-number-class" id="month-week-3-day-1" value="" />
</hbox>
@ -262,7 +275,7 @@
</hbox>
</vbox>
<vbox class="month-day-box-class weekend saturday" flex="1" id="month-week-3-day-7-box" weekend="true" >
<vbox class="month-day-box-class" flex="1" id="month-week-3-day-7-box">
<hbox>
<label class="month-day-number-class" id="month-week-3-day-7" value="" />
</hbox>
@ -270,7 +283,7 @@
</row>
<row flex="1" >
<vbox class="month-day-box-class weekend" flex="1" id="month-week-4-day-1-box" weekend="true" >
<vbox class="month-day-box-class" flex="1" id="month-week-4-day-1-box">
<hbox>
<label class="month-day-number-class" id="month-week-4-day-1" value="" />
</hbox>
@ -306,7 +319,7 @@
</hbox>
</vbox>
<vbox class="month-day-box-class weekend saturday" flex="1" id="month-week-4-day-7-box" weekend="true" >
<vbox class="month-day-box-class" flex="1" id="month-week-4-day-7-box">
<hbox>
<label class="month-day-number-class" id="month-week-4-day-7" value="" />
</hbox>
@ -314,7 +327,7 @@
</row>
<row flex="1" >
<vbox class="month-day-box-class weekend" flex="1" id="month-week-5-day-1-box" weekend="true" >
<vbox class="month-day-box-class" flex="1" id="month-week-5-day-1-box">
<hbox>
<label class="month-day-number-class" id="month-week-5-day-1" value="" />
</hbox>
@ -350,7 +363,7 @@
</hbox>
</vbox>
<vbox class="month-day-box-class weekend saturday" flex="1" id="month-week-5-day-7-box" weekend="true" >
<vbox class="month-day-box-class" flex="1" id="month-week-5-day-7-box">
<hbox>
<label class="month-day-number-class" id="month-week-5-day-7" value="" />
</hbox>
@ -358,7 +371,7 @@
</row>
<row flex="1" >
<vbox class="month-day-box-class weekend" flex="1" id="month-week-6-day-1-box" weekend="true" >
<vbox class="month-day-box-class" flex="1" id="month-week-6-day-1-box">
<hbox>
<label class="month-day-number-class" id="month-week-6-day-1" value="" />
</hbox>
@ -388,7 +401,7 @@
<label class="month-day-number-class" id="month-week-6-day-6" value="" />
</vbox>
<vbox class="month-day-box-class weekend saturday" flex="1" id="month-week-6-day-7-box" weekend="true" >
<vbox class="month-day-box-class" flex="1" id="month-week-6-day-7-box">
<label class="month-day-number-class" id="month-week-6-day-7" value="" />
</vbox>
</row>

View File

@ -103,15 +103,23 @@ DateFormater.prototype.getFormatedDate = function( date )
// that displays the date uses this function we will be able to
// make a user settable date format and use it here.
//return( dateService.FormatDate( "", dateService.dateFormatLong, date.getFullYear(), date.getMonth()+1, date.getDate() ) );
if( gCalendarWindow.calendarPreferences.getPref( "dateformat" ) == 0 )
{
var oneBasedMonthNum = date.getMonth() + 1;
var oneBasedMonthNum = date.getMonth() + 1;
var monthString = this.dateStringBundle.GetStringFromName("month." + oneBasedMonthNum + ".Mmm" );
var dateString = monthString + " " + date.getDate()+", "+date.getFullYear();
return dateString;
}
else
{
return( dateService.FormatDate( "", dateService.dateFormatShort, date.getFullYear(), date.getMonth()+1, date.getDate() ) );
}
var monthString = this.dateStringBundle.GetStringFromName("month." + oneBasedMonthNum + ".Mmm" );
var dateString = monthString + " " + date.getDate()+", "+date.getFullYear();
return dateString;
}

View File

@ -122,6 +122,7 @@ function MonthView( calendarWindow )
{
onSelectionChanged : function( EventSelectionArray )
{
dump( "\nIn Month view, on selection changed");
if( EventSelectionArray.length > 0 )
{
//if there are selected events.
@ -130,16 +131,19 @@ function MonthView( calendarWindow )
gCalendarWindow.monthView.clearSelectedBoxes();
dump( "\nIn Month view, eventSelectionArray.length is "+EventSelectionArray.length );
var i = 0;
for( i = 0; i < EventSelectionArray.length; i++ )
{
dump( "\nin Month view, going to try and get the event boxes with name 'month-view-event-box-"+EventSelectionArray[i].id+"'" );
var EventBoxes = document.getElementsByAttribute( "name", "month-view-event-box-"+EventSelectionArray[i].id );
dump( "\nIn Month view, found "+EventBoxes.length+" matches for the selected event." );
for ( j = 0; j < EventBoxes.length; j++ )
{
EventBoxes[j].setAttribute( "eventselected", "true" );
}
}
dump( "\nAll Done in Selection for Month View" );
}
else
{
@ -416,13 +420,38 @@ MonthView.prototype.refreshDisplay = function( )
}
document.getElementById( "0-year-title" ).setAttribute( "value" , newYear );
var Offset = this.calendarWindow.calendarPreferences.getPref( "weekstart" );
NewArrayOfDayNames = new Array();
for( i = 0; i < ArrayOfDayNames.length; i++ )
{
NewArrayOfDayNames[i] = ArrayOfDayNames[i];
}
for( i = 0; i < Offset; i++ )
{
var FirstElement = NewArrayOfDayNames.shift();
NewArrayOfDayNames.push( FirstElement );
}
//set the day names (Some people start on Sunday, others start on Monday
for( i = 1; i <= 7; i++ )
{
document.getElementById( "month-view-header-day-"+i ).value = NewArrayOfDayNames[ (i-1) ];
}
// Write in all the day numbers and create the dayBoxItemByDateArray, see notes above
// figure out first and last days of the month
var firstDate = new Date( newYear, newMonth, 1 );
var firstDayOfWeek = firstDate.getDay();
var firstDayOfWeek = firstDate.getDay() - Offset;
if( firstDayOfWeek < 0 )
firstDayOfWeek+=7;
var lastDayOfMonth = DateUtils.getLastDayOfMonth( newYear, newMonth );
// prepare the dayBoxItemByDateArray, we will be filling this in
@ -444,13 +473,22 @@ MonthView.prototype.refreshDisplay = function( )
dayNumberItem.setAttribute( "value" , "" );
dayBoxItem.setAttribute( "empty" , "true" );
dayBoxItem.setAttribute( "weekend", "false" );
dayBoxItem.dayNumber = null;
}
else
{
dayNumberItem.setAttribute( "value" , dayNumber );
dayBoxItem.setAttribute( "empty" , "false" );
dayBoxItem.setAttribute( "empty" , "false" );
var thisDate = new Date( newYear, newMonth, dayNumber );
if( thisDate.getDay() == 0 | thisDate.getDay() == 6 )
{
dayBoxItem.setAttribute( "weekend", "true" );
}
else
dayBoxItem.setAttribute( "weekend", "false" );
dayBoxItem.dayNumber = dayNumber;
this.dayBoxItemByDateArray[ dayNumber ] = dayBoxItem;
@ -542,7 +580,6 @@ MonthView.prototype.hiliteTodaysDate = function( )
//highlight today.
var Today = new Date( );
if ( Year == Today.getFullYear() && Month == Today.getMonth() )
{
var ThisBox = this.dayBoxItemByDateArray[ Today.getDate() ];

View File

@ -54,6 +54,19 @@
>
<script type="application/x-javascript" src="chrome://calendar/content/calendarMonthView.js"/>
<script type="application/x-javascript">
var ArrayOfDayNames = new Array();
ArrayOfDayNames[0] = "&calendar.monthview.column.1.name;";
ArrayOfDayNames[1] = "&calendar.monthview.column.2.name;";
ArrayOfDayNames[2] = "&calendar.monthview.column.3.name;";
ArrayOfDayNames[3] = "&calendar.monthview.column.4.name;";
ArrayOfDayNames[4] = "&calendar.monthview.column.5.name;";
ArrayOfDayNames[5] = "&calendar.monthview.column.6.name;";
ArrayOfDayNames[6] = "&calendar.monthview.column.7.name;";
</script>
<vbox id="month-view-box" flex="1">
<!-- Month View: Controls-->
@ -115,30 +128,30 @@
<rows >
<row flex="1">
<vbox class="month-column-center-day-class">
<label class="month-view-header-days" value="&calendar.monthview.column.1.name;"/>
<label class="month-view-header-days" id="month-view-header-day-1"/>
</vbox>
<vbox class="month-column-center-day-class">
<label class="month-view-header-days" value="&calendar.monthview.column.2.name;"/>
<label class="month-view-header-days" id="month-view-header-day-2"/>
</vbox>
<vbox class="month-column-center-day-class">
<label class="month-view-header-days" value="&calendar.monthview.column.3.name;"/>
<label class="month-view-header-days" id="month-view-header-day-3"/>
</vbox>
<vbox class="month-column-center-day-class">
<label class="month-view-header-days" value="&calendar.monthview.column.4.name;"/>
<label class="month-view-header-days" id="month-view-header-day-4"/>
</vbox>
<vbox class="month-column-center-day-class">
<label class="month-view-header-days" value="&calendar.monthview.column.5.name;"/>
<label class="month-view-header-days" id="month-view-header-day-5"/>
</vbox>
<vbox class="month-column-center-day-class">
<label class="month-view-header-days" value="&calendar.monthview.column.6.name;"/>
<label class="month-view-header-days" id="month-view-header-day-6"/>
</vbox>
<vbox class="month-column-center-day-class">
<label class="month-view-header-days" value="&calendar.monthview.column.7.name;"/>
<label class="month-view-header-days" id="month-view-header-day-7"/>
</vbox>
</row>
<row flex="1" >
<vbox class="month-day-box-class weekend" flex="1" id="month-week-1-day-1-box" weekend="true">
<vbox class="month-day-box-class" flex="1" id="month-week-1-day-1-box">
<hbox>
<label class="month-day-number-class" id="month-week-1-day-1" value="" />
</hbox>
@ -174,7 +187,7 @@
</hbox>
</vbox>
<vbox class="month-day-box-class weekend saturday" flex="1" id="month-week-1-day-7-box" weekend="true" >
<vbox class="month-day-box-class" flex="1" id="month-week-1-day-7-box">
<hbox>
<label class="month-day-number-class" id="month-week-1-day-7" value="" />
</hbox>
@ -182,7 +195,7 @@
</row>
<row flex="1" >
<vbox class="month-day-box-class weekend" flex="1" id="month-week-2-day-1-box" weekend="true">
<vbox class="month-day-box-class" flex="1" id="month-week-2-day-1-box">
<hbox>
<label class="month-day-number-class" id="month-week-2-day-1" value="" />
</hbox>
@ -218,7 +231,7 @@
</hbox>
</vbox>
<vbox class="month-day-box-class weekend saturday" flex="1" id="month-week-2-day-7-box" weekend="true" >
<vbox class="month-day-box-class" flex="1" id="month-week-2-day-7-box">
<hbox>
<label class="month-day-number-class" id="month-week-2-day-7" value="" />
</hbox>
@ -226,7 +239,7 @@
</row>
<row flex="1" >
<vbox class="month-day-box-class weekend" flex="1" id="month-week-3-day-1-box" weekend="true" >
<vbox class="month-day-box-class" flex="1" id="month-week-3-day-1-box">
<hbox>
<label class="month-day-number-class" id="month-week-3-day-1" value="" />
</hbox>
@ -262,7 +275,7 @@
</hbox>
</vbox>
<vbox class="month-day-box-class weekend saturday" flex="1" id="month-week-3-day-7-box" weekend="true" >
<vbox class="month-day-box-class" flex="1" id="month-week-3-day-7-box">
<hbox>
<label class="month-day-number-class" id="month-week-3-day-7" value="" />
</hbox>
@ -270,7 +283,7 @@
</row>
<row flex="1" >
<vbox class="month-day-box-class weekend" flex="1" id="month-week-4-day-1-box" weekend="true" >
<vbox class="month-day-box-class" flex="1" id="month-week-4-day-1-box">
<hbox>
<label class="month-day-number-class" id="month-week-4-day-1" value="" />
</hbox>
@ -306,7 +319,7 @@
</hbox>
</vbox>
<vbox class="month-day-box-class weekend saturday" flex="1" id="month-week-4-day-7-box" weekend="true" >
<vbox class="month-day-box-class" flex="1" id="month-week-4-day-7-box">
<hbox>
<label class="month-day-number-class" id="month-week-4-day-7" value="" />
</hbox>
@ -314,7 +327,7 @@
</row>
<row flex="1" >
<vbox class="month-day-box-class weekend" flex="1" id="month-week-5-day-1-box" weekend="true" >
<vbox class="month-day-box-class" flex="1" id="month-week-5-day-1-box">
<hbox>
<label class="month-day-number-class" id="month-week-5-day-1" value="" />
</hbox>
@ -350,7 +363,7 @@
</hbox>
</vbox>
<vbox class="month-day-box-class weekend saturday" flex="1" id="month-week-5-day-7-box" weekend="true" >
<vbox class="month-day-box-class" flex="1" id="month-week-5-day-7-box">
<hbox>
<label class="month-day-number-class" id="month-week-5-day-7" value="" />
</hbox>
@ -358,7 +371,7 @@
</row>
<row flex="1" >
<vbox class="month-day-box-class weekend" flex="1" id="month-week-6-day-1-box" weekend="true" >
<vbox class="month-day-box-class" flex="1" id="month-week-6-day-1-box">
<hbox>
<label class="month-day-number-class" id="month-week-6-day-1" value="" />
</hbox>
@ -388,7 +401,7 @@
<label class="month-day-number-class" id="month-week-6-day-6" value="" />
</vbox>
<vbox class="month-day-box-class weekend saturday" flex="1" id="month-week-6-day-7-box" weekend="true" >
<vbox class="month-day-box-class" flex="1" id="month-week-6-day-7-box">
<label class="month-day-number-class" id="month-week-6-day-7" value="" />
</vbox>
</row>

View File

@ -52,22 +52,44 @@
<script type="application/x-javascript">
<![CDATA[
var panel = "chrome://calendar/content/pref/calendarPref.xul";
var _elementIDs = [
"alarmshow", "alarmplaysound"
"alarmshow", "alarmplaysound", "dateformat", "weekstarts"
];
]]>
</script>
<groupbox orient="vertical">
<groupbox align="start" orient="vertical">
<caption label="&pref.mainbox.caption;"/>
<description>&pref.alarmgoesoff.label;</description>
<checkbox id="alarmplaysound" type="checkbox" pref="true" preftype="bool"
prefattribute="checked" prefstring="calendar.alarms.playsound"
<checkbox id="alarmplaysound" prefstring="calendar.alarms.playsound"
label="&pref.playasound;" />
<checkbox id="alarmshow" type="checkbox" pref="true" preftype="bool"
prefattribute="checked" prefstring="calendar.alarms.show"
<checkbox id="alarmshow" prefstring="calendar.alarms.show"
label="&pref.showalarmbox;" />
<vbox>
<description>Date Text Format: </description>
<menulist id="dateformat" crop="none" prefstring="calendar.date.format">
<menupopup id="dateformat">
<menuitem label="Long (ie. Apr 1, 2002)" value="0"/>
<menuitem label="Short Format (ie. 04/01/02)" value="1"/>
</menupopup>
</menulist>
</vbox>
<vbox>
<description>First Day Of The Week: </description>
<menulist id="weekstarts" prefstring="calendar.week.start">
<menupopup id="weekstarts">
<menuitem label="Sunday" value="0"/>
<menuitem label="Monday" value="1"/>
<menuitem label="Tuesday" value="2"/>
<menuitem label="Wednesday" value="3"/>
<menuitem label="Thursday" value="4"/>
<menuitem label="Friday" value="5"/>
<menuitem label="Saturday" value="6"/>
</menupopup>
</menulist>
</vbox>
</groupbox>
</page>

View File

@ -17,7 +17,21 @@ calendarPrefObserver.prototype =
{
// when calendar pref was changed, we reinitialize
this.CalendarPreferences.loadPreferences();
switch( prefName )
{
case "calendar.week.start":
this.CalendarPreferences.calendarWindow.currentView.refreshDisplay();
break
case "calendar.date.format":
this.CalendarPreferences.calendarWindow.currentView.refreshDisplay();
unifinderRefesh();
default:
break;
}
//this causes Mozilla to freeze
//firePendingEvents();
}
@ -35,8 +49,6 @@ function removePrefObserver( e ){ // this one is called on window destruction (b
window.addEventListener("unload", removePrefObserver, true);
function calendarPreferences( CalendarWindow )
{
window.calendarPrefObserver = new calendarPrefObserver( this );
@ -53,9 +65,10 @@ function calendarPreferences( CalendarWindow )
this.loadPreferences();
}
catch(e) {
this.calendarPref.setBoolPref("alarms.show", true);
this.calendarPref.setBoolPref("alarms.playsound", false);
this.calendarPref.setBoolPref( "alarms.show", true );
this.calendarPref.setBoolPref( "alarms.playsound", false );
this.calendarPref.setIntPref( "date.format", 0 );
this.calendarPref.setIntPref( "week.start", 0 );
this.loadPreferences();
}
@ -67,6 +80,10 @@ calendarPreferences.prototype.loadPreferences = function()
this.arrayOfPrefs.showalarms = this.calendarPref.getBoolPref( "alarms.show" );
this.arrayOfPrefs.alarmsplaysound = this.calendarPref.getBoolPref( "alarms.playsound" );
this.arrayOfPrefs.dateformat = this.calendarPref.getIntPref( "date.format" );
this.arrayOfPrefs.weekstart = this.calendarPref.getIntPref( "week.start" );
}
calendarPreferences.prototype.getPref = function( Preference )

View File

@ -376,9 +376,11 @@
border-left: 1px solid #3f7d91;
border-top: 1px solid #3f7d91;
}
.weekend{
background-color: #FFF9EF;
.month-day-box-class[weekend="true"]{
background-color : #FFF9EF;
}
/*Day boxes that aren't in this month*/
.month-day-box-class[empty="true"]{
background-color: #E7EEEC;
@ -1005,11 +1007,6 @@
width : 8px;
}
.weekend
{
background-color : #FFF9EF;
}
.calendar-unifinder-event-text
{
}

View File

@ -377,13 +377,16 @@
border-left: 1px solid #3f7d91;
border-top: 1px solid #3f7d91;
}
.weekend{
background-color: #FFF9EF;
}
/*Day boxes that aren't in this month*/
.month-day-box-class[empty="true"]{
background-color: #E7EEEC;
background-color : #E7EEEC;
}
.month-day-box-class[weekend="true"]{
background-color : #FFF9EF;
}
/*today's day box*/
.month-day-box-class[today="true"]{
font-weight:bold;
@ -1006,11 +1009,6 @@
width : 8px;
}
.weekend
{
background-color : #FFF9EF;
}
.calendar-unifinder-event-text
{
}