зеркало из https://github.com/mozilla/pjs.git
Checked in patch for bug 215594: week view does not show events if Monday-Friday Only selected
This commit is contained in:
Родитель
3a4696d402
Коммит
e262998fbc
|
@ -54,6 +54,8 @@
|
|||
/** these globals are kinda ugly, but i want to be able to use them in a few places! ***/
|
||||
var LowestStartHour = 0;
|
||||
var HighestEndHour = 0;
|
||||
var gRefColumnIndex = 0;
|
||||
|
||||
/*** end benw 19/12/2002 ***/
|
||||
|
||||
|
||||
|
@ -411,23 +413,18 @@ WeekView.prototype.createEventBox = function ( calendarEventDisplay, dayIndex )
|
|||
eventBox.calendarEventDisplay = calendarEventDisplay;
|
||||
|
||||
//alert("boxLeftOffset: "+boxLeftOffset);
|
||||
var hourHeight = document.getElementById("week-tree-day-0-item-"+startHour).boxObject.height;
|
||||
var ElementOfRef = document.getElementById("week-tree-day-"+gRefColumnIndex+"-item-"+startHour) ;
|
||||
var hourHeight = ElementOfRef.boxObject.height;
|
||||
var Height = eventDuration * hourHeight + 1 ;
|
||||
eventBox.setAttribute( "height", Height );
|
||||
|
||||
var Width = Math.floor(
|
||||
( document.getElementById("week-tree-day-0-item-"+startHour).boxObject.width )
|
||||
/
|
||||
calendarEventDisplay.NumberOfSameTimeEvents
|
||||
+ 1);
|
||||
var Width = Math.floor( ElementOfRef.boxObject.width / calendarEventDisplay.NumberOfSameTimeEvents + 1);
|
||||
eventBox.setAttribute( "width", Width );
|
||||
|
||||
var top = eval( document.getElementById("week-tree-day-0-item-"+startHour).boxObject.y + ( ( startMinutes/60 ) * hourHeight ) );
|
||||
|
||||
top1 = top ;
|
||||
top = top - document.getElementById("week-tree-day-0-item-"+startHour).parentNode.boxObject.y - 2;
|
||||
|
||||
var top = eval( ElementOfRef.boxObject.y + ( ( startMinutes/60 ) * hourHeight ) );
|
||||
top = top - ElementOfRef.parentNode.boxObject.y - 2;
|
||||
eventBox.setAttribute( "top", top );
|
||||
|
||||
var dayIndex = new Date( gHeaderDateItemArray[1].getAttribute( "date" ) );
|
||||
|
||||
var index = displayDateObject.getDay( ) - dayIndex.getDay( );
|
||||
|
@ -551,7 +548,10 @@ WeekView.prototype.refreshDisplay = function( )
|
|||
|
||||
// Set the from-to title string, based on the selected date
|
||||
var Offset = getIntPref(this.calendarWindow.calendarPreferences.calendarPref, "week.start", defaultWeekStart );
|
||||
|
||||
// Define a reference column (which will not be collapsed latter) to use to get its width.
|
||||
// This is used to place the event Box
|
||||
if (Offset == 0 || Offset == 6) gRefColumnIndex = 3 ;
|
||||
|
||||
var selectedDate = this.calendarWindow.getSelectedDate();
|
||||
var viewDay = selectedDate.getDay();
|
||||
var viewDayOfMonth = selectedDate.getDate();
|
||||
|
|
Загрузка…
Ссылка в новой задаче