зеркало из https://github.com/mozilla/pjs.git
event dialog cleanups getting ready for recurrence
This commit is contained in:
Родитель
4061157ea2
Коммит
e101ba0d42
|
@ -55,11 +55,15 @@ function onLoad()
|
|||
|
||||
loadDialog();
|
||||
|
||||
// update alarm checkbox/label/settings button
|
||||
updateAlarm();
|
||||
// update datetime pickers
|
||||
updateAllDay();
|
||||
|
||||
// update recurrence button
|
||||
updateRecurrence();
|
||||
|
||||
// update alarm checkbox/label/settings button
|
||||
updateAlarm();
|
||||
|
||||
document.getElementById("event-title").focus();
|
||||
|
||||
opener.setCursor("auto");
|
||||
|
@ -115,6 +119,10 @@ function loadDialog()
|
|||
}
|
||||
}
|
||||
|
||||
if (event.recurrenceInfo) {
|
||||
setElementValue("event-recurrence", "true", "checked");
|
||||
}
|
||||
|
||||
if (event.hasAlarm) {
|
||||
var alarmLength = event.getProperty("alarmLength");
|
||||
if (alarmLength != null) {
|
||||
|
@ -186,6 +194,17 @@ function updateAllDay()
|
|||
setElementValue("event-endtime", allDay, "timepickerdisabled");
|
||||
}
|
||||
|
||||
|
||||
function updateRecurrence()
|
||||
{
|
||||
var recur = getElementValue("event-recurrence", "checked");
|
||||
if (recur) {
|
||||
setElementValue("set-recurrence", false, "disabled");
|
||||
} else {
|
||||
setElementValue("set-recurrence", "true", "disabled");
|
||||
}
|
||||
}
|
||||
|
||||
var prevAlarmItem = null;
|
||||
function setAlarmFields(alarmItem)
|
||||
{
|
||||
|
|
|
@ -104,12 +104,13 @@
|
|||
<row align="center">
|
||||
<label value="repeat" class="label"/>
|
||||
<hbox align="center">
|
||||
<label value="none"/>
|
||||
<checkbox id="event-recurrence" oncommand="updateRecurrence();"/>
|
||||
<spacer flex="1"/>
|
||||
<button disabled="true" label="set..."/>
|
||||
<button id="set-recurrence" label="set..."/>
|
||||
</hbox>
|
||||
</row>
|
||||
<row align="center">
|
||||
|
||||
<row align="center" hidden="true">
|
||||
<label value="attendees" class="label"/>
|
||||
<hbox align="center">
|
||||
<label value="none"/>
|
||||
|
@ -131,7 +132,7 @@
|
|||
<hbox>
|
||||
<menulist id="event-alarm" oncommand="updateAlarm()">
|
||||
<menupopup>
|
||||
<menuitem label="none" value="none"/>
|
||||
<menuitem label="none" value="none" selected="true"/>
|
||||
<menuseparator/>
|
||||
<menuitem label="15 minutes before" length="15" unit="minutes" relation="START"/>
|
||||
<menuitem label="30 minutes before" length="30" unit="minutes" relation="START"/>
|
||||
|
@ -149,14 +150,14 @@
|
|||
<textbox id="alarm-length-field" size="1"/>
|
||||
<menulist id="alarm-length-units">
|
||||
<menupopup>
|
||||
<menuitem label="minutes" value="minutes"/>
|
||||
<menuitem label="minutes" value="minutes" selected="true"/>
|
||||
<menuitem label="hours" value="hours"/>
|
||||
<menuitem label="days" value="days"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
<menulist id="alarm-trigger-relation">
|
||||
<menupopup>
|
||||
<menuitem label="before" value="START"/>
|
||||
<menuitem label="before" value="START" selected="true"/>
|
||||
<menuitem label="after" value="END"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
|
|
|
@ -117,7 +117,7 @@ function openEventDialog(calendarEvent, calendar, mode, callback)
|
|||
// wait cursor will revert to auto in eventDialog.js loadCalendarEventDialog
|
||||
window.setCursor("wait");
|
||||
// open the dialog modally
|
||||
//openDialog("chrome://calendar/content/eventDialog.xul", "caEditEvent", "chrome,titlebar,modal", args);
|
||||
openDialog("chrome://calendar/content/calendar-event-dialog.xul", "caEditEvent", "chrome,titlebar,modal", args);
|
||||
//openDialog("chrome://calendar/content/eventDialog.xul", "_blank", "chrome,titlebar,modal", args);
|
||||
openDialog("chrome://calendar/content/calendar-event-dialog.xul", "_blank", "chrome,titlebar,modal", args);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче