зеркало из https://github.com/mozilla/pjs.git
Many xul bug fixes for adding events and small bug fix in the week view.
This commit is contained in:
Родитель
5ac4749c95
Коммит
2916e62d7b
|
@ -1,24 +1,25 @@
|
|||
initInstall("Mozilla Calendar", "/Mozilla/Calendar", "0.7");
|
||||
initInstall("Mozilla Calendar", "Mozilla/Calendar", "0.7");
|
||||
|
||||
calendarDir = getFolder("Chrome","calendar");
|
||||
|
||||
setPackageFolder(calendarDir);
|
||||
|
||||
var err = addDirectory("", "resources", getFolder("Chrome","calendar"), "" );
|
||||
addDirectory( "resources" );
|
||||
|
||||
addDirectory("", "components", getFolder( "Components" ), "" );
|
||||
|
||||
if ( err == SUCCESS ) {
|
||||
var calendarContent = getFolder(calendarDir, "content");
|
||||
var calendarSkin = getFolder(calendarDir, "skin");
|
||||
var calendarLocale = getFolder(calendarDir, "locale");
|
||||
var err = getLastError();
|
||||
|
||||
var returnval = registerChrome(CONTENT | DELAYED_CHROME, calendarContent );
|
||||
var returnval = registerChrome(SKIN | DELAYED_CHROME, calendarSkin, "modern/");
|
||||
var returnval = registerChrome(LOCALE | DELAYED_CHROME, calendarLocale, "en-US/");
|
||||
if ( err == SUCCESS ) {
|
||||
|
||||
registerChrome(CONTENT, calendarDir, "content");
|
||||
registerChrome(SKIN, calendarDir, "skin/modern");
|
||||
registerChrome(LOCALE, calendarDir, "locale/en-US");
|
||||
|
||||
err = performInstall();
|
||||
|
||||
if ( err == SUCCESS ) {
|
||||
refreshPlugins();
|
||||
alert("The Mozilla Calendar has been succesfully installed. \n"
|
||||
+"Please restart your browser to continue.");
|
||||
}
|
||||
|
|
|
@ -416,7 +416,8 @@ function deselectEventInUnifinder( )
|
|||
{
|
||||
var Tree = document.getElementById( "unifinder-categories-tree" );
|
||||
|
||||
Tree.clearItemSelection( );
|
||||
//HACK THIS DOESN"T WORK RIGHT NOW FOR MIKE POTTER????
|
||||
//Tree.clearItemSelection( );
|
||||
|
||||
gUnifinderSelection = null;
|
||||
}
|
||||
|
|
|
@ -82,6 +82,7 @@ var gOnOkFunction; // function to be called when user clicks OK
|
|||
|
||||
var gChangeEndTime = true; //
|
||||
var gTimeDifference = 3600000; //when editing an event, we change the end time if the start time is changing. This is the difference for the event time.
|
||||
var gDefaultAlarmLength = 15; //number of minutes to default the alarm to
|
||||
|
||||
var gMode = ''; //what mode are we in? new or edit...
|
||||
|
||||
|
@ -130,23 +131,19 @@ function loadCalendarEventDialog()
|
|||
}
|
||||
|
||||
var titleString = titleDataItem.getAttribute( "value" );
|
||||
var headerTitleItem = document.getElementById( "standard-dialog-title-text" );
|
||||
headerTitleItem.setAttribute( "value" , titleString );
|
||||
setFieldValue( "standard-dialog-title-text", titleString );
|
||||
|
||||
// show proper tip
|
||||
|
||||
var tipNewItem = document.getElementById( "tip-new" );
|
||||
var tipEditItem = document.getElementById( "tip-edit" );
|
||||
|
||||
if( "new" == args.mode )
|
||||
{
|
||||
tipNewItem.setAttribute( "collapsed", "false" );
|
||||
tipEditItem.setAttribute( "collapsed", "true" );
|
||||
setFieldValue( "tip-new", false, "collapsed" );
|
||||
setFieldValue( "tip-edit", true, "collapsed" );
|
||||
}
|
||||
else
|
||||
{
|
||||
tipNewItem.setAttribute( "collapsed", "true" );
|
||||
tipEditItem.setAttribute( "collapsed", "false" );
|
||||
setFieldValue( "tip-new", true, "collapsed" );
|
||||
setFieldValue( "tip-edit", false, "collapsed" );
|
||||
}
|
||||
|
||||
|
||||
|
@ -191,6 +188,11 @@ function loadCalendarEventDialog()
|
|||
setFieldValue( "all-day-event-checkbox", gEvent.allDay, "checked" );
|
||||
setFieldValue( "private-checkbox", gEvent.privateEvent, "checked" );
|
||||
|
||||
if( gEvent.alarm === false && gEvent.alarmLength == 0 )
|
||||
{
|
||||
gEvent.alarmLength = gDefaultAlarmLength;
|
||||
}
|
||||
|
||||
setFieldValue( "alarm-checkbox", gEvent.alarm, "checked" );
|
||||
setFieldValue( "alarm-length-field", gEvent.alarmLength );
|
||||
setFieldValue( "alarm-length-units", gEvent.alarmUnits, "data" );
|
||||
|
@ -218,8 +220,8 @@ function loadCalendarEventDialog()
|
|||
setFieldValue( "repeat-checkbox", gEvent.recur, "checked");
|
||||
setFieldValue( "repeat-length-field", gEvent.recurInterval );
|
||||
setFieldValue( "repeat-length-units", gEvent.recurUnits, "value" );
|
||||
setFieldValue( "repeat-forever-radio", (gEvent.recurForever != undefined && gEvent.recurForever != false), "selected" );
|
||||
setFieldValue( "repeat-until-radio", (gEvent.recurForever == undefined || gEvent.recurForever == false), "selected" );
|
||||
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
|
||||
|
||||
|
@ -306,7 +308,7 @@ function onOKCommand()
|
|||
}
|
||||
gEvent.recur = getFieldValue( "repeat-checkbox", "checked" );
|
||||
gEvent.recurUnits = getFieldValue( "repeat-length-units", "value" );
|
||||
gEvent.recurForever = getFieldValue( "repeat-forever-radio", "selected" );
|
||||
gEvent.recurForever = getFieldValue( "repeat-forever-radio", "checked" );
|
||||
gEvent.recurInterval = getFieldValue( "repeat-length-field" );
|
||||
|
||||
if( gEvent.recurInterval == 0 )
|
||||
|
@ -371,7 +373,7 @@ function prepareDatePicker( dateFieldName )
|
|||
|
||||
// tell the date picker the date to edit.
|
||||
|
||||
datePickerPopup.setAttribute( "value", dateField.editDate );
|
||||
setFieldValue( "oe-date-picker-popup", dateField.editDate, "value" );
|
||||
|
||||
// remember the date field that is to be updated by adding a
|
||||
// property "dateField" to the popup.
|
||||
|
@ -421,8 +423,7 @@ function prepareTimePicker( timeFieldName )
|
|||
var timeField = document.getElementById( timeFieldName );
|
||||
|
||||
// tell the time picker the time to edit.
|
||||
|
||||
timePickerPopup.setAttribute( "value", timeField.editDate );
|
||||
setFieldValue( "oe-time-picker-popup", timeField.editDate, "value" );
|
||||
|
||||
// remember the time field that is to be updated by adding a
|
||||
// property "timeField" to the popup.
|
||||
|
@ -458,9 +459,9 @@ function onTimePick( timepopup )
|
|||
formattedEndTime = formatTime( newEndDate );
|
||||
if( timepopup.timeField.id != "end-time-text" )
|
||||
{
|
||||
document.getElementById( "end-time-text" ).value = formattedEndTime;
|
||||
setFieldValue( "end-time-text", formattedEndTime, "value" );
|
||||
|
||||
document.getElementById( "end-time-text" ).editDate = newEndDate;
|
||||
setFieldValue( "end-time-text", newEndDate, "editDate" );
|
||||
}
|
||||
|
||||
|
||||
|
@ -536,34 +537,32 @@ function commandAlarm()
|
|||
|
||||
function updateAlarmItemEnabled()
|
||||
{
|
||||
var alarmCheckBox = document.getElementById( "alarm-checkbox" );
|
||||
var alarmCheckBox = "alarm-checkbox";
|
||||
|
||||
var alarmField = document.getElementById( "alarm-length-field" );
|
||||
var alarmMenu = document.getElementById( "alarm-length-units" );
|
||||
var alarmLabel = document.getElementById( "alarm-length-text" );
|
||||
var alarmField = "alarm-length-field";
|
||||
var alarmMenu = "alarm-length-units";
|
||||
var alarmLabel = "alarm-length-text";
|
||||
|
||||
var alarmEmailCheckbox = document.getElementById( "alarm-email-checkbox" );
|
||||
var alarmEmailField = document.getElementById( "alarm-email-field" );
|
||||
var alarmEmailCheckbox = "alarm-email-checkbox";
|
||||
var alarmEmailField = "alarm-email-field";
|
||||
|
||||
if( alarmCheckBox.checked )
|
||||
if( getFieldValue(alarmCheckBox, "checked" ) )
|
||||
{
|
||||
// call remove attribute beacuse some widget code checks for the presense of a
|
||||
// disabled attribute, not the value.
|
||||
|
||||
alarmField.removeAttribute( "disabled" );
|
||||
alarmMenu.removeAttribute( "disabled" );
|
||||
alarmLabel.removeAttribute( "disabled" );
|
||||
alarmEmailCheckbox.removeAttribute( "disabled" );
|
||||
setFieldValue( alarmField, false, "disabled" );
|
||||
setFieldValue( alarmMenu, false, "disabled" );
|
||||
setFieldValue( alarmLabel, false, "disabled" );
|
||||
setFieldValue( alarmEmailCheckbox, false, "disabled" );
|
||||
}
|
||||
else
|
||||
{
|
||||
alarmField.setAttribute( "disabled", "true" );
|
||||
alarmMenu.setAttribute( "disabled", "true" );
|
||||
alarmLabel.setAttribute( "disabled", "true" );
|
||||
alarmEmailField.setAttribute( "disabled", "true" );
|
||||
|
||||
alarmEmailCheckbox.setAttribute( "disabled", "true" );
|
||||
alarmEmailCheckbox.setAttribute( "checked", false );
|
||||
setFieldValue( alarmField, true, "disabled" );
|
||||
setFieldValue( alarmMenu, true, "disabled" );
|
||||
setFieldValue( alarmLabel, true, "disabled" );
|
||||
setFieldValue( alarmEmailField, true, "disabled" );
|
||||
setFieldValue( alarmEmailCheckbox, true, "disabled" );
|
||||
setFieldValue( alarmEmailCheckbox, false, "checked" );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -584,20 +583,20 @@ function commandAlarmEmail()
|
|||
|
||||
function updateAlarmEmailItemEnabled()
|
||||
{
|
||||
var alarmCheckBox = document.getElementById( "alarm-email-checkbox" );
|
||||
var alarmCheckBox = "alarm-email-checkbox";
|
||||
|
||||
var alarmEmailField = document.getElementById( "alarm-email-field" );
|
||||
var alarmEmailField = "alarm-email-field";
|
||||
|
||||
if( alarmCheckBox.checked )
|
||||
if( getFieldValue( alarmCheckBox, "checked" ) )
|
||||
{
|
||||
// call remove attribute beacuse some widget code checks for the presense of a
|
||||
// disabled attribute, not the value.
|
||||
|
||||
alarmEmailField.removeAttribute( "disabled" );
|
||||
setFieldValue( alarmEmailField, false, "disabled" );
|
||||
}
|
||||
else
|
||||
{
|
||||
alarmEmailField.setAttribute( "disabled", "true" );
|
||||
setFieldValue( alarmEmailField, true, "disabled" );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -652,6 +651,7 @@ function updateRepeatItemEnabled()
|
|||
// disabled attribute, not the value.
|
||||
for( var i = 0; i < repeatDisableList.length; ++i )
|
||||
{
|
||||
if( repeatDisableList[i].getAttribute( "today" ) != "true" )
|
||||
repeatDisableList[i].removeAttribute( "disabled" );
|
||||
}
|
||||
}
|
||||
|
@ -674,8 +674,7 @@ function updateRepeatItemEnabled()
|
|||
updateUntilItemEnabled();
|
||||
|
||||
// extra interface depending on units
|
||||
|
||||
//updateRepeatUnitExtensions();
|
||||
updateRepeatUnitExtensions();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -763,6 +762,8 @@ function updateUntilItemEnabled()
|
|||
|
||||
var repeatEndText = document.getElementById( "repeat-end-date-text" );
|
||||
var repeatEndPicker = document.getElementById( "repeat-end-date-button" );
|
||||
|
||||
//RADIO REQUIRES SELECTED NOT CHECKED
|
||||
if( repeatCheckBox.checked && repeatUntilRadio.selected )
|
||||
{
|
||||
repeatEndText.removeAttribute( "disabled" );
|
||||
|
@ -835,6 +836,7 @@ function updateStartEndItemEnabled()
|
|||
var endTimeLabel = document.getElementById( "end-time-label" );
|
||||
var endTimePicker = document.getElementById( "end-time-button" );
|
||||
var endTimeText = document.getElementById( "end-time-text" );
|
||||
|
||||
if( allDayCheckBox.checked )
|
||||
{
|
||||
// disable popups by removing the popup attribute
|
||||
|
@ -916,9 +918,22 @@ function setAdvancedWeekRepeat()
|
|||
dump( "checked is "+checked );
|
||||
|
||||
setFieldValue( "advanced-repeat-week-"+i, checked, "checked" );
|
||||
|
||||
setFieldValue( "advanced-repeat-week-"+i, false, "today" );
|
||||
}
|
||||
}
|
||||
|
||||
//get the day number for today.
|
||||
var startTime = getDateTimeFieldValue( "start-date-text" );
|
||||
|
||||
var dayNumber = startTime.getDay();
|
||||
|
||||
setFieldValue( "advanced-repeat-week-"+dayNumber, "true", "checked" );
|
||||
|
||||
setFieldValue( "advanced-repeat-week-"+dayNumber, "true", "disabled" );
|
||||
|
||||
setFieldValue( "advanced-repeat-week-"+dayNumber, "true", "today" );
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -949,18 +964,28 @@ function updateAdvancedWeekRepeat()
|
|||
|
||||
var dayNumber = startTime.getDay();
|
||||
|
||||
//uncheck them all if the repeat checkbox is checked
|
||||
var repeatCheckBox = document.getElementById( "repeat-checkbox" );
|
||||
|
||||
if( repeatCheckBox.checked )
|
||||
{
|
||||
//uncheck them all
|
||||
for( i = 0; i < 7; i++ )
|
||||
{
|
||||
document.getElementById( "advanced-repeat-week-"+i ).setAttribute( "checked", "false" );
|
||||
setFieldValue( "advanced-repeat-week-"+i, false, "checked" );
|
||||
|
||||
document.getElementById( "advanced-repeat-week-"+i ).removeAttribute( "disabled" );
|
||||
setFieldValue( "advanced-repeat-week-"+i, false, "disabled" );
|
||||
|
||||
setFieldValue( "advanced-repeat-week-"+i, false, "today" );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
setFieldValue( "advanced-repeat-week-"+dayNumber, "true", "checked" );
|
||||
|
||||
document.getElementById( "advanced-repeat-week-"+dayNumber ).setAttribute( "checked", "true" );
|
||||
setFieldValue( "advanced-repeat-week-"+dayNumber, "true", "disabled" );
|
||||
|
||||
document.getElementById( "advanced-repeat-week-"+dayNumber ).setAttribute( "disabled", "true" );
|
||||
setFieldValue( "advanced-repeat-week-"+dayNumber, "true", "today" );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1089,16 +1114,24 @@ function setFieldValue( elementId, newValue, propertyName )
|
|||
{
|
||||
var field = document.getElementById( elementId );
|
||||
|
||||
if( newValue === false )
|
||||
{
|
||||
field.removeAttribute( propertyName );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( propertyName )
|
||||
{
|
||||
field[ propertyName ] = newValue;
|
||||
//field.setAttribute( propertyName, newValue );
|
||||
field.setAttribute( propertyName, newValue );
|
||||
}
|
||||
else
|
||||
{
|
||||
field.value = newValue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -263,10 +263,10 @@
|
|||
<checkbox id="repeat-checkbox" label="&newevent.repeat.label;" checked="false" oncommand="commandRepeat()"/>
|
||||
<textbox id="repeat-length-field" disable-controller="repeat" value="1" oninput="repeatLengthKeyDown( this )"/>
|
||||
|
||||
<menulist crop="never" oncommand="repeatUnitCommand( this )" labelnumber="labelplural" id="repeat-length-units" disable-controller="repeat" label="&repeat.units.days;" value="days" >
|
||||
<menulist crop="never" oncommand="repeatUnitCommand( this )" labelnumber="labelplural" id="repeat-length-units" disable-controller="repeat">
|
||||
<menupopup>
|
||||
<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.weeks;" labelplural="&repeat.units.weeks;" labelsingular="&repeat.units.weeks.singular;" selected="true" 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>
|
||||
|
@ -274,7 +274,7 @@
|
|||
</hbox>
|
||||
|
||||
|
||||
<hbox id="repeat-extenstions-week" disabled="true" disable-controller="repeat" collapsed="true">
|
||||
<hbox id="repeat-extenstions-week" disabled="true" disable-controller="repeat" collapsed="false">
|
||||
<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" />
|
||||
|
|
|
@ -276,7 +276,6 @@ WeekView.prototype.refreshEvents = function( )
|
|||
newImage.setAttribute( "ondblclick", "weekEventItemDoubleClick( this, event )" );
|
||||
newImage.setAttribute( "tooltip", "savetip" );
|
||||
|
||||
|
||||
//ThisDayAllDayBox.appendChild( SeperatorNode );
|
||||
ThisDayAllDayBox.appendChild( newImage );
|
||||
//ThisDayAllDayBox.appendChild( newHTMLNode );
|
||||
|
|
|
@ -82,6 +82,7 @@ var gOnOkFunction; // function to be called when user clicks OK
|
|||
|
||||
var gChangeEndTime = true; //
|
||||
var gTimeDifference = 3600000; //when editing an event, we change the end time if the start time is changing. This is the difference for the event time.
|
||||
var gDefaultAlarmLength = 15; //number of minutes to default the alarm to
|
||||
|
||||
var gMode = ''; //what mode are we in? new or edit...
|
||||
|
||||
|
@ -130,23 +131,19 @@ function loadCalendarEventDialog()
|
|||
}
|
||||
|
||||
var titleString = titleDataItem.getAttribute( "value" );
|
||||
var headerTitleItem = document.getElementById( "standard-dialog-title-text" );
|
||||
headerTitleItem.setAttribute( "value" , titleString );
|
||||
setFieldValue( "standard-dialog-title-text", titleString );
|
||||
|
||||
// show proper tip
|
||||
|
||||
var tipNewItem = document.getElementById( "tip-new" );
|
||||
var tipEditItem = document.getElementById( "tip-edit" );
|
||||
|
||||
if( "new" == args.mode )
|
||||
{
|
||||
tipNewItem.setAttribute( "collapsed", "false" );
|
||||
tipEditItem.setAttribute( "collapsed", "true" );
|
||||
setFieldValue( "tip-new", false, "collapsed" );
|
||||
setFieldValue( "tip-edit", true, "collapsed" );
|
||||
}
|
||||
else
|
||||
{
|
||||
tipNewItem.setAttribute( "collapsed", "true" );
|
||||
tipEditItem.setAttribute( "collapsed", "false" );
|
||||
setFieldValue( "tip-new", true, "collapsed" );
|
||||
setFieldValue( "tip-edit", false, "collapsed" );
|
||||
}
|
||||
|
||||
|
||||
|
@ -191,6 +188,11 @@ function loadCalendarEventDialog()
|
|||
setFieldValue( "all-day-event-checkbox", gEvent.allDay, "checked" );
|
||||
setFieldValue( "private-checkbox", gEvent.privateEvent, "checked" );
|
||||
|
||||
if( gEvent.alarm === false && gEvent.alarmLength == 0 )
|
||||
{
|
||||
gEvent.alarmLength = gDefaultAlarmLength;
|
||||
}
|
||||
|
||||
setFieldValue( "alarm-checkbox", gEvent.alarm, "checked" );
|
||||
setFieldValue( "alarm-length-field", gEvent.alarmLength );
|
||||
setFieldValue( "alarm-length-units", gEvent.alarmUnits, "data" );
|
||||
|
@ -218,8 +220,8 @@ function loadCalendarEventDialog()
|
|||
setFieldValue( "repeat-checkbox", gEvent.recur, "checked");
|
||||
setFieldValue( "repeat-length-field", gEvent.recurInterval );
|
||||
setFieldValue( "repeat-length-units", gEvent.recurUnits, "value" );
|
||||
setFieldValue( "repeat-forever-radio", (gEvent.recurForever != undefined && gEvent.recurForever != false), "selected" );
|
||||
setFieldValue( "repeat-until-radio", (gEvent.recurForever == undefined || gEvent.recurForever == false), "selected" );
|
||||
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
|
||||
|
||||
|
@ -306,7 +308,7 @@ function onOKCommand()
|
|||
}
|
||||
gEvent.recur = getFieldValue( "repeat-checkbox", "checked" );
|
||||
gEvent.recurUnits = getFieldValue( "repeat-length-units", "value" );
|
||||
gEvent.recurForever = getFieldValue( "repeat-forever-radio", "selected" );
|
||||
gEvent.recurForever = getFieldValue( "repeat-forever-radio", "checked" );
|
||||
gEvent.recurInterval = getFieldValue( "repeat-length-field" );
|
||||
|
||||
if( gEvent.recurInterval == 0 )
|
||||
|
@ -371,7 +373,7 @@ function prepareDatePicker( dateFieldName )
|
|||
|
||||
// tell the date picker the date to edit.
|
||||
|
||||
datePickerPopup.setAttribute( "value", dateField.editDate );
|
||||
setFieldValue( "oe-date-picker-popup", dateField.editDate, "value" );
|
||||
|
||||
// remember the date field that is to be updated by adding a
|
||||
// property "dateField" to the popup.
|
||||
|
@ -421,8 +423,7 @@ function prepareTimePicker( timeFieldName )
|
|||
var timeField = document.getElementById( timeFieldName );
|
||||
|
||||
// tell the time picker the time to edit.
|
||||
|
||||
timePickerPopup.setAttribute( "value", timeField.editDate );
|
||||
setFieldValue( "oe-time-picker-popup", timeField.editDate, "value" );
|
||||
|
||||
// remember the time field that is to be updated by adding a
|
||||
// property "timeField" to the popup.
|
||||
|
@ -458,9 +459,9 @@ function onTimePick( timepopup )
|
|||
formattedEndTime = formatTime( newEndDate );
|
||||
if( timepopup.timeField.id != "end-time-text" )
|
||||
{
|
||||
document.getElementById( "end-time-text" ).value = formattedEndTime;
|
||||
setFieldValue( "end-time-text", formattedEndTime, "value" );
|
||||
|
||||
document.getElementById( "end-time-text" ).editDate = newEndDate;
|
||||
setFieldValue( "end-time-text", newEndDate, "editDate" );
|
||||
}
|
||||
|
||||
|
||||
|
@ -536,34 +537,32 @@ function commandAlarm()
|
|||
|
||||
function updateAlarmItemEnabled()
|
||||
{
|
||||
var alarmCheckBox = document.getElementById( "alarm-checkbox" );
|
||||
var alarmCheckBox = "alarm-checkbox";
|
||||
|
||||
var alarmField = document.getElementById( "alarm-length-field" );
|
||||
var alarmMenu = document.getElementById( "alarm-length-units" );
|
||||
var alarmLabel = document.getElementById( "alarm-length-text" );
|
||||
var alarmField = "alarm-length-field";
|
||||
var alarmMenu = "alarm-length-units";
|
||||
var alarmLabel = "alarm-length-text";
|
||||
|
||||
var alarmEmailCheckbox = document.getElementById( "alarm-email-checkbox" );
|
||||
var alarmEmailField = document.getElementById( "alarm-email-field" );
|
||||
var alarmEmailCheckbox = "alarm-email-checkbox";
|
||||
var alarmEmailField = "alarm-email-field";
|
||||
|
||||
if( alarmCheckBox.checked )
|
||||
if( getFieldValue(alarmCheckBox, "checked" ) )
|
||||
{
|
||||
// call remove attribute beacuse some widget code checks for the presense of a
|
||||
// disabled attribute, not the value.
|
||||
|
||||
alarmField.removeAttribute( "disabled" );
|
||||
alarmMenu.removeAttribute( "disabled" );
|
||||
alarmLabel.removeAttribute( "disabled" );
|
||||
alarmEmailCheckbox.removeAttribute( "disabled" );
|
||||
setFieldValue( alarmField, false, "disabled" );
|
||||
setFieldValue( alarmMenu, false, "disabled" );
|
||||
setFieldValue( alarmLabel, false, "disabled" );
|
||||
setFieldValue( alarmEmailCheckbox, false, "disabled" );
|
||||
}
|
||||
else
|
||||
{
|
||||
alarmField.setAttribute( "disabled", "true" );
|
||||
alarmMenu.setAttribute( "disabled", "true" );
|
||||
alarmLabel.setAttribute( "disabled", "true" );
|
||||
alarmEmailField.setAttribute( "disabled", "true" );
|
||||
|
||||
alarmEmailCheckbox.setAttribute( "disabled", "true" );
|
||||
alarmEmailCheckbox.setAttribute( "checked", false );
|
||||
setFieldValue( alarmField, true, "disabled" );
|
||||
setFieldValue( alarmMenu, true, "disabled" );
|
||||
setFieldValue( alarmLabel, true, "disabled" );
|
||||
setFieldValue( alarmEmailField, true, "disabled" );
|
||||
setFieldValue( alarmEmailCheckbox, true, "disabled" );
|
||||
setFieldValue( alarmEmailCheckbox, false, "checked" );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -584,20 +583,20 @@ function commandAlarmEmail()
|
|||
|
||||
function updateAlarmEmailItemEnabled()
|
||||
{
|
||||
var alarmCheckBox = document.getElementById( "alarm-email-checkbox" );
|
||||
var alarmCheckBox = "alarm-email-checkbox";
|
||||
|
||||
var alarmEmailField = document.getElementById( "alarm-email-field" );
|
||||
var alarmEmailField = "alarm-email-field";
|
||||
|
||||
if( alarmCheckBox.checked )
|
||||
if( getFieldValue( alarmCheckBox, "checked" ) )
|
||||
{
|
||||
// call remove attribute beacuse some widget code checks for the presense of a
|
||||
// disabled attribute, not the value.
|
||||
|
||||
alarmEmailField.removeAttribute( "disabled" );
|
||||
setFieldValue( alarmEmailField, false, "disabled" );
|
||||
}
|
||||
else
|
||||
{
|
||||
alarmEmailField.setAttribute( "disabled", "true" );
|
||||
setFieldValue( alarmEmailField, true, "disabled" );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -652,6 +651,7 @@ function updateRepeatItemEnabled()
|
|||
// disabled attribute, not the value.
|
||||
for( var i = 0; i < repeatDisableList.length; ++i )
|
||||
{
|
||||
if( repeatDisableList[i].getAttribute( "today" ) != "true" )
|
||||
repeatDisableList[i].removeAttribute( "disabled" );
|
||||
}
|
||||
}
|
||||
|
@ -674,8 +674,7 @@ function updateRepeatItemEnabled()
|
|||
updateUntilItemEnabled();
|
||||
|
||||
// extra interface depending on units
|
||||
|
||||
//updateRepeatUnitExtensions();
|
||||
updateRepeatUnitExtensions();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -763,6 +762,8 @@ function updateUntilItemEnabled()
|
|||
|
||||
var repeatEndText = document.getElementById( "repeat-end-date-text" );
|
||||
var repeatEndPicker = document.getElementById( "repeat-end-date-button" );
|
||||
|
||||
//RADIO REQUIRES SELECTED NOT CHECKED
|
||||
if( repeatCheckBox.checked && repeatUntilRadio.selected )
|
||||
{
|
||||
repeatEndText.removeAttribute( "disabled" );
|
||||
|
@ -835,6 +836,7 @@ function updateStartEndItemEnabled()
|
|||
var endTimeLabel = document.getElementById( "end-time-label" );
|
||||
var endTimePicker = document.getElementById( "end-time-button" );
|
||||
var endTimeText = document.getElementById( "end-time-text" );
|
||||
|
||||
if( allDayCheckBox.checked )
|
||||
{
|
||||
// disable popups by removing the popup attribute
|
||||
|
@ -916,9 +918,22 @@ function setAdvancedWeekRepeat()
|
|||
dump( "checked is "+checked );
|
||||
|
||||
setFieldValue( "advanced-repeat-week-"+i, checked, "checked" );
|
||||
|
||||
setFieldValue( "advanced-repeat-week-"+i, false, "today" );
|
||||
}
|
||||
}
|
||||
|
||||
//get the day number for today.
|
||||
var startTime = getDateTimeFieldValue( "start-date-text" );
|
||||
|
||||
var dayNumber = startTime.getDay();
|
||||
|
||||
setFieldValue( "advanced-repeat-week-"+dayNumber, "true", "checked" );
|
||||
|
||||
setFieldValue( "advanced-repeat-week-"+dayNumber, "true", "disabled" );
|
||||
|
||||
setFieldValue( "advanced-repeat-week-"+dayNumber, "true", "today" );
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -949,18 +964,28 @@ function updateAdvancedWeekRepeat()
|
|||
|
||||
var dayNumber = startTime.getDay();
|
||||
|
||||
//uncheck them all if the repeat checkbox is checked
|
||||
var repeatCheckBox = document.getElementById( "repeat-checkbox" );
|
||||
|
||||
if( repeatCheckBox.checked )
|
||||
{
|
||||
//uncheck them all
|
||||
for( i = 0; i < 7; i++ )
|
||||
{
|
||||
document.getElementById( "advanced-repeat-week-"+i ).setAttribute( "checked", "false" );
|
||||
setFieldValue( "advanced-repeat-week-"+i, false, "checked" );
|
||||
|
||||
document.getElementById( "advanced-repeat-week-"+i ).removeAttribute( "disabled" );
|
||||
setFieldValue( "advanced-repeat-week-"+i, false, "disabled" );
|
||||
|
||||
setFieldValue( "advanced-repeat-week-"+i, false, "today" );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
setFieldValue( "advanced-repeat-week-"+dayNumber, "true", "checked" );
|
||||
|
||||
document.getElementById( "advanced-repeat-week-"+dayNumber ).setAttribute( "checked", "true" );
|
||||
setFieldValue( "advanced-repeat-week-"+dayNumber, "true", "disabled" );
|
||||
|
||||
document.getElementById( "advanced-repeat-week-"+dayNumber ).setAttribute( "disabled", "true" );
|
||||
setFieldValue( "advanced-repeat-week-"+dayNumber, "true", "today" );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1089,16 +1114,24 @@ function setFieldValue( elementId, newValue, propertyName )
|
|||
{
|
||||
var field = document.getElementById( elementId );
|
||||
|
||||
if( newValue === false )
|
||||
{
|
||||
field.removeAttribute( propertyName );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( propertyName )
|
||||
{
|
||||
field[ propertyName ] = newValue;
|
||||
//field.setAttribute( propertyName, newValue );
|
||||
field.setAttribute( propertyName, newValue );
|
||||
}
|
||||
else
|
||||
{
|
||||
field.value = newValue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -263,10 +263,10 @@
|
|||
<checkbox id="repeat-checkbox" label="&newevent.repeat.label;" checked="false" oncommand="commandRepeat()"/>
|
||||
<textbox id="repeat-length-field" disable-controller="repeat" value="1" oninput="repeatLengthKeyDown( this )"/>
|
||||
|
||||
<menulist crop="never" oncommand="repeatUnitCommand( this )" labelnumber="labelplural" id="repeat-length-units" disable-controller="repeat" label="&repeat.units.days;" value="days" >
|
||||
<menulist crop="never" oncommand="repeatUnitCommand( this )" labelnumber="labelplural" id="repeat-length-units" disable-controller="repeat">
|
||||
<menupopup>
|
||||
<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.weeks;" labelplural="&repeat.units.weeks;" labelsingular="&repeat.units.weeks.singular;" selected="true" 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>
|
||||
|
@ -274,7 +274,7 @@
|
|||
</hbox>
|
||||
|
||||
|
||||
<hbox id="repeat-extenstions-week" disabled="true" disable-controller="repeat" collapsed="true">
|
||||
<hbox id="repeat-extenstions-week" disabled="true" disable-controller="repeat" collapsed="false">
|
||||
<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" />
|
||||
|
|
|
@ -269,7 +269,7 @@ function unifinderClickEvent( id, event )
|
|||
|
||||
function unifinderModifyCommand()
|
||||
{
|
||||
var SelectedItem = document.getElementById( "unifinder-categories-tree" ).selectedItems.item(0);
|
||||
var SelectedItem = document.getElementById( "unifinder-categories-tree" ).selectedItems[0];
|
||||
|
||||
if( SelectedItem )
|
||||
{
|
||||
|
|
|
@ -276,7 +276,6 @@ WeekView.prototype.refreshEvents = function( )
|
|||
newImage.setAttribute( "ondblclick", "weekEventItemDoubleClick( this, event )" );
|
||||
newImage.setAttribute( "tooltip", "savetip" );
|
||||
|
||||
|
||||
//ThisDayAllDayBox.appendChild( SeperatorNode );
|
||||
ThisDayAllDayBox.appendChild( newImage );
|
||||
//ThisDayAllDayBox.appendChild( newHTMLNode );
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
<!ENTITY newevent.start.label "Start" >
|
||||
<!ENTITY newevent.date.label "Date" >
|
||||
<!ENTITY newevent.end.label "End" >
|
||||
<!ENTITY newevent.alldayevent.label "This is an all-day event." >
|
||||
<!ENTITY newevent.alldayevent.label "This event lasts all day." >
|
||||
<!ENTITY newevent.description.label "Description" >
|
||||
<!ENTITY newevent.private.label "Private" >
|
||||
<!ENTITY newevent.private.note "This event is private." >
|
||||
|
|
|
@ -1144,6 +1144,7 @@ button.calendar-management-button:hover:active
|
|||
.all-day-content-box-week
|
||||
{
|
||||
width : 78px;
|
||||
-moz-box-align : start;
|
||||
/*border : 1px solid red;*/
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче