long event titles/locations/descriptions should break into multiple lines rather than crop
r=pavlov@pavlov.net
This commit is contained in:
mattwillis%gmail.com 2004-12-23 02:04:24 +00:00
Родитель 4610af01c5
Коммит edafe8d73d
4 изменённых файлов: 42 добавлений и 28 удалений

Просмотреть файл

@ -365,9 +365,6 @@ WeekView.prototype.createEventBox = function ( itemOccurrence )
dump("duration: " + eventDuration + "\n");
var eventText = calEvent.title;
var eventBox = document.createElement("vbox");
// XXX Consider changing this to only store the ID
@ -416,25 +413,21 @@ WeekView.prototype.createEventBox = function ( itemOccurrence )
eventBox.setAttribute("onmouseover", "gCalendarWindow.changeMouseOverInfo( null, calEvent )");
eventBox.setAttribute("tooltip", "eventTooltip");
// The event description. This doesn't go multi line, but does crop properly.
var eventDescriptionElement = document.createElement("label");
//eventDescriptionElement.calendarEventDisplay = calendarEventDisplay;
eventDescriptionElement.setAttribute("class", "week-view-event-label-class" );
eventDescriptionElement.setAttribute("value", eventText );
eventDescriptionElement.setAttribute("flex", "1" );
var DescriptionText = document.createTextNode(" ");
eventDescriptionElement.appendChild(DescriptionText);
eventDescriptionElement.setAttribute("height", Height);
eventDescriptionElement.setAttribute("crop", "end");
eventDescriptionElement.setAttribute("ondraggesture", "nsDragAndDrop.startDrag(event,calendarViewDNDObserver);");
eventDescriptionElement.setAttribute("ondragover", "nsDragAndDrop.dragOver(event,calendarViewDNDObserver)");
eventDescriptionElement.setAttribute("ondragdrop", "nsDragAndDrop.drop(event,calendarViewDNDObserver)");
eventBox.appendChild(eventDescriptionElement);
// Event box text (title, location and description)
if (calEvent.title || calEvent.getProperty("location")) {
var titleText = ( (calEvent.title || "") +
(calEvent.getProperty("location") ? " ("+calEvent.getProperty("location")+")" : "") );
var titleElement = document.createElement( "label" );
titleElement.setAttribute( "class", "week-view-event-title-label-class" );
titleElement.appendChild( document.createTextNode( titleText ));
eventBox.appendChild( titleElement );
}
if (calEvent.getProperty("description")) {
var descriptionElement = document.createElement( "description" );
descriptionElement.setAttribute( "class", "week-view-event-description-class" );
descriptionElement.appendChild( document.createTextNode( calEvent.getProperty("description") ));
eventBox.appendChild( descriptionElement );
}
return eventBox;
}

Просмотреть файл

@ -1235,6 +1235,7 @@ then observed (ERic 20/06/03)
margin-bottom : 1px;
margin-top : 1px;
border : 1px solid #1D7AB5;
overflow : hidden;
background-color : #F9F4FF;
min-width : 20px;
-moz-user-focus : normal;
@ -1256,13 +1257,19 @@ then observed (ERic 20/06/03)
* Class for text of events
*-------------------------------------------------------------------*/
.week-view-event-text-class
.week-view-event-title-label-class
{
cursor : pointer;
font-size : 10pt;
font-family : Arial, Helvetica;
color : #000000;
}
.week-view-event-description-class
{
cursor : pointer;
font-size : 8pt;
font-family : Arial, Helvetica;
}
.week-time-class-text
{

Просмотреть файл

@ -1540,6 +1540,7 @@ then observed (ERic 20/06/03)
margin-bottom : 1px;
margin-top : 1px;
border : 1px solid #1D7AB5;
overflow : hidden;
background-color : #F9F4FF;
min-width : 20px;
-moz-user-focus : normal;
@ -1561,13 +1562,19 @@ then observed (ERic 20/06/03)
* Class for text of events
*-------------------------------------------------------------------*/
.week-view-event-text-class
.week-view-event-title-label-class
{
cursor : pointer;
font-size : 10pt;
font-family : Arial, Helvetica;
color : #000000;
}
.week-view-event-description-class
{
cursor : pointer;
font-size : 8pt;
font-family : Arial, Helvetica;
}
.week-time-class-text
{

Просмотреть файл

@ -1750,6 +1750,7 @@ then observed (ERic 20/06/03)
margin-bottom : 1px;
margin-top : 1px;
border : 1px solid #1D7AB5;
overflow : hidden;
background-color : #F9F4FF;
min-width : 20px;
-moz-user-focus : normal;
@ -1771,13 +1772,19 @@ then observed (ERic 20/06/03)
* Class for text of events
*-------------------------------------------------------------------*/
.week-view-event-text-class
.week-view-event-title-label-class
{
cursor : pointer;
font-size : 10pt;
font-family : Arial, Helvetica;
color : #000000;
}
.week-view-event-description-class
{
cursor : pointer;
font-size : 8pt;
font-family : Arial, Helvetica;
}
.week-time-class-text
{