Fixing week view.

This commit is contained in:
mikep%oeone.com 2002-08-15 20:10:04 +00:00
parent d64eb83588
commit d01062fa4d
4 changed files with 44 additions and 74 deletions

View File

@ -160,10 +160,6 @@ WeekView.prototype.refreshEvents = function( )
var TextNode = document.getElementById( "all-day-content-box-text-week-"+dayIndex );
//set the seperator to nothing. After the first one, we'll change it to ", " so that we add commas between text.
var Seperator = "";
// get the events for the day and loop through them
dayToGet = new Date( gHeaderDateItemArray[dayIndex].getAttribute( "date" ) );
@ -286,15 +282,10 @@ WeekView.prototype.refreshEvents = function( )
//note the use of the WeekViewAllDayText Attribute.
//This is used to remove the text when the day is changed.
SeperatorNode = document.createElement( "label" );
SeperatorNode.setAttribute( "value", Seperator );
SeperatorNode.setAttribute( "WeekViewAllDayText", "true" );
newHTMLNode = document.createElement( "description" );
newTextNode = document.createTextNode( eventText );
//newTextNode.setAttribute( "value", eventText );
newHTMLNode.appendChild( newTextNode );
newHTMLNode = document.createElement( "label" );
newHTMLNode.setAttribute( "crop", "end" );
newHTMLNode.setAttribute( "flex", "1" );
newHTMLNode.setAttribute( "value", eventText );
newHTMLNode.setAttribute( "WeekViewAllDayText", "true" );
newHTMLNode.calendarEventDisplay = calendarEventDisplay;
newHTMLNode.setAttribute( "onmouseover", "gCalendarWindow.mouseOverInfo( calendarEventDisplay, event )" );
@ -302,7 +293,6 @@ WeekView.prototype.refreshEvents = function( )
newHTMLNode.setAttribute( "ondblclick", "weekEventItemDoubleClick( this, event )" );
newHTMLNode.setAttribute( "tooltip", "savetip" );
newImage = document.createElement("image");
newImage.setAttribute( "class", "all-day-event-class" );
newImage.setAttribute( "WeekViewAllDayText", "true" );
@ -312,12 +302,8 @@ WeekView.prototype.refreshEvents = function( )
newImage.setAttribute( "ondblclick", "weekEventItemDoubleClick( this, event )" );
newImage.setAttribute( "tooltip", "savetip" );
//ThisDayAllDayBox.appendChild( SeperatorNode );
ThisDayAllDayBox.appendChild( newImage );
//ThisDayAllDayBox.appendChild( newHTMLNode );
//change the seperator to add commas after the text.
Seperator = ", ";
ThisDayAllDayBox.appendChild( newHTMLNode );
}
else if ( calendarEventDisplay.CurrentSpot <= 4 )
{
@ -528,7 +514,6 @@ WeekView.prototype.refreshDisplay = function( )
{
arrayOfBoxes[i].setAttribute( "weekend", "true" );
}
}
else
{
@ -541,7 +526,6 @@ WeekView.prototype.refreshDisplay = function( )
}
}
// advance to next day
weekDate.setDate( dateOfDay + 1 );

View File

@ -52,10 +52,10 @@
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
>
<script src="chrome://global/content/nsDragAndDrop.js"/>
<script src="chrome://global/content/nsTransferable.js"/>
<script src="chrome://global/content/nsJSSupportsUtils.js"/>
<script src="chrome://global/content/nsJSComponentManager.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsTransferable.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsJSSupportsUtils.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsJSComponentManager.js"/>
<script type="application/x-javascript" src="chrome://calendar/content/calendarWeekView.js"/>
<script type="application/x-javascript">
@ -145,18 +145,19 @@
</box>
</box>
<box id="week-view-all-day-content-box" align="center">
<vbox id="weekview-daynumber-spacer-left" flex="1">
<label class="all-day-content-box-text-title" value="All Day Events"/>
<box id="week-view-all-day-content-box" align="center" flex="1" >
<vbox id="weekview-daynumber-spacer-left">
<label class="all-day-content-box-text-title" value="&allDayEvents.label;"/>
</vbox>
<hbox class="all-day-content-box-week" id="all-day-content-box-week-1"/>
<hbox class="all-day-content-box-week" id="all-day-content-box-week-2"/>
<hbox class="all-day-content-box-week" id="all-day-content-box-week-3"/>
<hbox class="all-day-content-box-week" id="all-day-content-box-week-4"/>
<hbox class="all-day-content-box-week" id="all-day-content-box-week-5"/>
<hbox class="all-day-content-box-week" id="all-day-content-box-week-6"/>
<hbox class="all-day-content-box-week" id="all-day-content-box-week-7"/>
<box equalsize="always" flex="1">
<hbox class="all-day-content-box-week" id="all-day-content-box-week-1" flex="1"/>
<hbox class="all-day-content-box-week" id="all-day-content-box-week-2" flex="1"/>
<hbox class="all-day-content-box-week" id="all-day-content-box-week-3" flex="1"/>
<hbox class="all-day-content-box-week" id="all-day-content-box-week-4" flex="1"/>
<hbox class="all-day-content-box-week" id="all-day-content-box-week-5" flex="1"/>
<hbox class="all-day-content-box-week" id="all-day-content-box-week-6" flex="1"/>
<hbox class="all-day-content-box-week" id="all-day-content-box-week-7" flex="1"/>
</box>
<vbox id="all-day-content-spacer"/>
</box>
@ -169,7 +170,7 @@
<stack id="week-view-content-board" flex="1">
<grid id="week-view-content-holder" flex="1">
<columns>
<columns equalsize="always">
<column id="week-view-top-left-box">
<!-- HOURS -->
<box class="week-view-hours-only-box-class" id="week-tree-hour-0">

View File

@ -160,10 +160,6 @@ WeekView.prototype.refreshEvents = function( )
var TextNode = document.getElementById( "all-day-content-box-text-week-"+dayIndex );
//set the seperator to nothing. After the first one, we'll change it to ", " so that we add commas between text.
var Seperator = "";
// get the events for the day and loop through them
dayToGet = new Date( gHeaderDateItemArray[dayIndex].getAttribute( "date" ) );
@ -286,15 +282,10 @@ WeekView.prototype.refreshEvents = function( )
//note the use of the WeekViewAllDayText Attribute.
//This is used to remove the text when the day is changed.
SeperatorNode = document.createElement( "label" );
SeperatorNode.setAttribute( "value", Seperator );
SeperatorNode.setAttribute( "WeekViewAllDayText", "true" );
newHTMLNode = document.createElement( "description" );
newTextNode = document.createTextNode( eventText );
//newTextNode.setAttribute( "value", eventText );
newHTMLNode.appendChild( newTextNode );
newHTMLNode = document.createElement( "label" );
newHTMLNode.setAttribute( "crop", "end" );
newHTMLNode.setAttribute( "flex", "1" );
newHTMLNode.setAttribute( "value", eventText );
newHTMLNode.setAttribute( "WeekViewAllDayText", "true" );
newHTMLNode.calendarEventDisplay = calendarEventDisplay;
newHTMLNode.setAttribute( "onmouseover", "gCalendarWindow.mouseOverInfo( calendarEventDisplay, event )" );
@ -302,7 +293,6 @@ WeekView.prototype.refreshEvents = function( )
newHTMLNode.setAttribute( "ondblclick", "weekEventItemDoubleClick( this, event )" );
newHTMLNode.setAttribute( "tooltip", "savetip" );
newImage = document.createElement("image");
newImage.setAttribute( "class", "all-day-event-class" );
newImage.setAttribute( "WeekViewAllDayText", "true" );
@ -312,12 +302,8 @@ WeekView.prototype.refreshEvents = function( )
newImage.setAttribute( "ondblclick", "weekEventItemDoubleClick( this, event )" );
newImage.setAttribute( "tooltip", "savetip" );
//ThisDayAllDayBox.appendChild( SeperatorNode );
ThisDayAllDayBox.appendChild( newImage );
//ThisDayAllDayBox.appendChild( newHTMLNode );
//change the seperator to add commas after the text.
Seperator = ", ";
ThisDayAllDayBox.appendChild( newHTMLNode );
}
else if ( calendarEventDisplay.CurrentSpot <= 4 )
{
@ -528,7 +514,6 @@ WeekView.prototype.refreshDisplay = function( )
{
arrayOfBoxes[i].setAttribute( "weekend", "true" );
}
}
else
{
@ -541,7 +526,6 @@ WeekView.prototype.refreshDisplay = function( )
}
}
// advance to next day
weekDate.setDate( dateOfDay + 1 );

View File

@ -52,10 +52,10 @@
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
>
<script src="chrome://global/content/nsDragAndDrop.js"/>
<script src="chrome://global/content/nsTransferable.js"/>
<script src="chrome://global/content/nsJSSupportsUtils.js"/>
<script src="chrome://global/content/nsJSComponentManager.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsTransferable.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsJSSupportsUtils.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsJSComponentManager.js"/>
<script type="application/x-javascript" src="chrome://calendar/content/calendarWeekView.js"/>
<script type="application/x-javascript">
@ -145,18 +145,19 @@
</box>
</box>
<box id="week-view-all-day-content-box" align="center">
<vbox id="weekview-daynumber-spacer-left" flex="1">
<label class="all-day-content-box-text-title" value="All Day Events"/>
<box id="week-view-all-day-content-box" align="center" flex="1" >
<vbox id="weekview-daynumber-spacer-left">
<label class="all-day-content-box-text-title" value="&allDayEvents.label;"/>
</vbox>
<hbox class="all-day-content-box-week" id="all-day-content-box-week-1"/>
<hbox class="all-day-content-box-week" id="all-day-content-box-week-2"/>
<hbox class="all-day-content-box-week" id="all-day-content-box-week-3"/>
<hbox class="all-day-content-box-week" id="all-day-content-box-week-4"/>
<hbox class="all-day-content-box-week" id="all-day-content-box-week-5"/>
<hbox class="all-day-content-box-week" id="all-day-content-box-week-6"/>
<hbox class="all-day-content-box-week" id="all-day-content-box-week-7"/>
<box equalsize="always" flex="1">
<hbox class="all-day-content-box-week" id="all-day-content-box-week-1" flex="1"/>
<hbox class="all-day-content-box-week" id="all-day-content-box-week-2" flex="1"/>
<hbox class="all-day-content-box-week" id="all-day-content-box-week-3" flex="1"/>
<hbox class="all-day-content-box-week" id="all-day-content-box-week-4" flex="1"/>
<hbox class="all-day-content-box-week" id="all-day-content-box-week-5" flex="1"/>
<hbox class="all-day-content-box-week" id="all-day-content-box-week-6" flex="1"/>
<hbox class="all-day-content-box-week" id="all-day-content-box-week-7" flex="1"/>
</box>
<vbox id="all-day-content-spacer"/>
</box>
@ -169,7 +170,7 @@
<stack id="week-view-content-board" flex="1">
<grid id="week-view-content-holder" flex="1">
<columns>
<columns equalsize="always">
<column id="week-view-top-left-box">
<!-- HOURS -->
<box class="week-view-hours-only-box-class" id="week-tree-hour-0">