зеркало из https://github.com/mozilla/pjs.git
Bug 330386 Clicking on day on calendar pane brings always to month view instead of last view, r=dmose
This commit is contained in:
Родитель
6c1c1abab5
Коммит
8ec7b3f77a
|
@ -70,7 +70,8 @@ interface calIDecoratedView : nsISupports
|
|||
readonly attribute AUTF8String observerID;
|
||||
|
||||
/**
|
||||
* The displayCalendar of the calICalendarView that is embedded
|
||||
* The displayCalendar of the embedded calICalendarView. This *must* be set
|
||||
* prior to calling goToDay the first time.
|
||||
*/
|
||||
attribute calICalendar displayCalender;
|
||||
|
||||
|
|
|
@ -68,7 +68,21 @@ function ltnMinimonthPick(minimonth)
|
|||
|
||||
if (document.getElementById("displayDeck").selectedPanel !=
|
||||
document.getElementById("calendar-view-box")) {
|
||||
showCalendarView('month');
|
||||
var view = currentView();
|
||||
|
||||
// We set the display calendar on the views in showCalendarView
|
||||
// the first time they are shown.
|
||||
if (!view.displayCalendar) {
|
||||
showCalendarView('month');
|
||||
view.goToDay(cdt);
|
||||
return;
|
||||
}
|
||||
|
||||
// showCalendarView is going to use the value passed in to switch to
|
||||
// foo-view, so strip off the -view part of the current view.
|
||||
var viewID = view.getAttribute("id");
|
||||
viewID = viewID.substring(0, viewID.indexOf('-'));
|
||||
showCalendarView(viewID);
|
||||
}
|
||||
|
||||
currentView().goToDay(cdt);
|
||||
|
|
Загрузка…
Ссылка в новой задаче