зеркало из https://github.com/mozilla/pjs.git
adding support for multiple views and switching views
This commit is contained in:
Родитель
d56af314ae
Коммит
72c5703d1a
|
@ -93,6 +93,22 @@ function showCalendar(jumpToToday)
|
|||
}
|
||||
}
|
||||
|
||||
function switchView(type) {
|
||||
var calendarViewBox = document.getElementById("calendar-view-box");
|
||||
|
||||
switch (type) {
|
||||
case "month":
|
||||
calendarViewBox.selectedPanel = document.getElementById("calendar-month-view");
|
||||
break;
|
||||
case "week":
|
||||
default:
|
||||
calendarViewBox.selectedPanel = document.getElementById("calendar-multiday-view");
|
||||
break;
|
||||
}
|
||||
|
||||
document.getElementById("displayDeck").selectedPanel = calendarViewBox;
|
||||
}
|
||||
|
||||
function selectedCalendarPane(event)
|
||||
{
|
||||
dump("selecting calendar pane\n");
|
||||
|
|
|
@ -63,10 +63,11 @@
|
|||
</vbox>
|
||||
|
||||
<deck id="displayDeck">
|
||||
<vbox id="calendar-view-box" flex="1">
|
||||
<deck id="calendar-view-box" flex="1">
|
||||
<vbox id="calendar-month-view"><label value="blah"/></vbox>
|
||||
<calendar-multiday-view orient="vertical" id="calendar-multiday-view" style="overflow:-moz-scrollbars-vertical" flex="1" />
|
||||
<!-- <vbox id="week-view-box" flex="1"/> -->
|
||||
</vbox>
|
||||
</deck>
|
||||
</deck>
|
||||
</overlay>
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
<toolbarpalette id="MailToolbarPalette">
|
||||
|
||||
<toolbarbutton id="calendar-new-event-button" class="cal-toolbarbutton-1" label="New Event" tooltiptext="New Event" oncommand="createEventWithDialog()"/>
|
||||
<toolbarbutton id="calendar-show-week-view" class="cal-toolbarbutton-1" label="Week View" tooltiptext="Month View" oncommand="switchView('week')"/>
|
||||
<toolbarbutton id="calendar-show-month-view" class="cal-toolbarbutton-1" label="Month View" tooltiptext="Month View" oncommand="switchView('month')"/>
|
||||
|
||||
</toolbarpalette>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче