Bug 437412-zero-length and short events are shown at the wrong times in the timegrid;r=berend and philipp; patch=berend and philipp;ui-r=daniel
git-svn-id: svn://10.0.0.236/trunk@253801 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -216,45 +216,31 @@
|
||||
-->
|
||||
<binding id="calendar-event-gripbar">
|
||||
<content>
|
||||
<xul:box anonid="thebox" flex="1" pack="center">
|
||||
<xul:image xbl:inherits="class"/>
|
||||
</xul:box>
|
||||
<xul:box anonid="thebox"
|
||||
flex="1"
|
||||
pack="center"
|
||||
xbl:inherits="align=whichside">
|
||||
<xul:image xbl:inherits="class"/>
|
||||
</xul:box>
|
||||
</content>
|
||||
|
||||
<implementation>
|
||||
<!-- public -->
|
||||
<field name="eventElement">null</field>
|
||||
|
||||
<property name="parentorient">
|
||||
<getter><![CDATA[
|
||||
return this.getAttribute("parentorient");
|
||||
]]></getter>
|
||||
<setter><![CDATA[
|
||||
this.setAttribute("parentorient", val);
|
||||
var thebox = document.getAnonymousElementByAttribute(this, "anonid", "thebox");
|
||||
if (val == "vertical")
|
||||
thebox.setAttribute("orient", "horizontal");
|
||||
else
|
||||
thebox.setAttribute("orient", "vertical");
|
||||
return val;
|
||||
var thebox = document.getAnonymousElementByAttribute(this, "anonid", "thebox");
|
||||
this.setAttribute("parentorient", val);
|
||||
thebox.setAttribute("orient", getOtherOrientation(val));
|
||||
return val;
|
||||
]]></setter>
|
||||
</property>
|
||||
|
||||
<!-- private -->
|
||||
<field name="mSide">top</field>
|
||||
|
||||
<field name="mResizing">false</field>
|
||||
<field name="mSizeStartX">0</field>
|
||||
<field name="mSizeStartY">0</field>
|
||||
|
||||
<constructor><![CDATA[
|
||||
if (this.getAttribute("side") == "top")
|
||||
this.mSide = "top";
|
||||
else if (this.getAttribute("side") == "bottom")
|
||||
this.mSide = "bottom";
|
||||
this.parentorient = this.getAttribute("parentorient");
|
||||
]]></constructor>
|
||||
|
||||
</implementation>
|
||||
|
||||
<handlers>
|
||||
@@ -804,7 +790,6 @@
|
||||
if (chunk.event) {
|
||||
var chunkBox = createXULElement("calendar-event-box");
|
||||
var durMinutes = duration.inSeconds / 60;
|
||||
chunkBox.setAttribute("style", "min-width: 1px; min-height: 1px;");
|
||||
var size = Math.max(durMinutes * this.mPixPerMin, minSize);
|
||||
if (orient == "vertical") {
|
||||
chunkBox.setAttribute("height", size);
|
||||
@@ -1093,11 +1078,11 @@
|
||||
<parameter name="aItem"/>
|
||||
<body><![CDATA[
|
||||
var item = aItem.clone();
|
||||
var start = item.startDate || aItem.entryDate;
|
||||
var start = item.startDate || item.entryDate;
|
||||
if (!compareObjects(start.timezone, this.mTimezone)) {
|
||||
start = start.getInTimezone(this.mTimezone);
|
||||
}
|
||||
var end = item.endDate || aItem.dueDate
|
||||
var end = item.endDate || item.dueDate
|
||||
if (!compareObjects(end.timezone, this.mTimezone)) {
|
||||
end = end.getInTimezone(this.mTimezone);
|
||||
}
|
||||
@@ -1973,6 +1958,7 @@
|
||||
class="calendar-event-box-container"
|
||||
flex="1"
|
||||
xbl:inherits="context,parentorient=orient,readonly,flashing,alarm,allday,priority,progress,status,calendar,categories">
|
||||
<xul:image flex="1" class="calendar-event-box-gradient"/>
|
||||
<xul:vbox class="calendar-event-details">
|
||||
<xul:description anonid="event-name" class="calendar-event-details-core" flex="1"/>
|
||||
<xul:textbox anonid="event-name-textbox"
|
||||
@@ -1981,15 +1967,15 @@
|
||||
hidden="true"
|
||||
wrap="true"/>
|
||||
</xul:vbox>
|
||||
<xul:image width="1px" class="calendar-event-box-gradient"/>
|
||||
<xul:hbox pack="end">
|
||||
<xul:vbox pack="start">
|
||||
<xul:image anonid="alarm-image"
|
||||
class="alarm-image"
|
||||
xbl:inherits="flashing"
|
||||
hidden="true"/>
|
||||
</xul:vbox>
|
||||
</xul:hbox>
|
||||
<xul:hbox align="start">
|
||||
<xul:image anonid="alarm-image"
|
||||
class="alarm-image"
|
||||
xbl:inherits="flashing"
|
||||
hidden="true"/>
|
||||
</xul:hbox>
|
||||
<xul:calendar-category-box anonid="category-box" xbl:inherits="categories" pack="end"/>
|
||||
</xul:hbox>
|
||||
<xul:box xbl:inherits="orient" flex="1">
|
||||
<xul:calendar-event-gripbar anonid="gripbar1"
|
||||
class="calendar-event-box-grippy-top"
|
||||
@@ -2005,7 +1991,6 @@
|
||||
not be resizable using the gripbars. If you want to insert
|
||||
additional elements, do so above the box with the gripbars. -->
|
||||
</xul:stack>
|
||||
<xul:calendar-category-box anonid="category-box" xbl:inherits="categories"/>
|
||||
</xul:box>
|
||||
</xul:box>
|
||||
</xul:box>
|
||||
@@ -3055,7 +3040,7 @@
|
||||
if (this.getAttribute("orient") != aVal)
|
||||
needsreorient = true;
|
||||
}
|
||||
|
||||
|
||||
if (aAttr == "context" || aAttr == "item-context")
|
||||
needsrelayout = true;
|
||||
|
||||
|
||||
@@ -178,7 +178,6 @@ calendar-header-container[weekend="true"][selected="true"],
|
||||
|
||||
.calendar-event-box-container {
|
||||
padding: 0;
|
||||
margin: 1px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@@ -187,6 +186,7 @@ calendar-header-container[weekend="true"][selected="true"],
|
||||
}
|
||||
|
||||
.calendar-event-details {
|
||||
margin: 1px;
|
||||
-moz-padding-start: 2px;
|
||||
overflow: hidden;
|
||||
}
|
||||
@@ -221,22 +221,6 @@ calendar-event-box[selected="true"] .calendar-event-selection {
|
||||
background-color: #ffdb67 !important;
|
||||
}
|
||||
|
||||
calendar-event-gripbar {
|
||||
-moz-box-align: center;
|
||||
-moz-box-pack: center;
|
||||
min-height: 4px;
|
||||
min-width: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
calendar-event-gripbar[parentorient="vertical"] {
|
||||
cursor: n-resize;
|
||||
}
|
||||
|
||||
calendar-event-gripbar[parentorient="horizontal"] {
|
||||
cursor: e-resize;
|
||||
}
|
||||
|
||||
/* headers horizontal, times vertical */
|
||||
box[anonid="labelbox"][orient="horizontal"] {
|
||||
height: 10px;
|
||||
@@ -478,31 +462,70 @@ box[dropbox="true"] {
|
||||
list-style-image: url("chrome://calendar/skin/category-overlay.png");
|
||||
}
|
||||
|
||||
calendar-event-box[orient="vertical"]:hover .calendar-event-box-grippy-top {
|
||||
calendar-event-gripbar {
|
||||
-moz-box-align: center;
|
||||
-moz-box-pack: center;
|
||||
min-height: 4px;
|
||||
min-width: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
calendar-event-gripbar[parentorient="vertical"][whichside="start"] {
|
||||
cursor: n-resize;
|
||||
}
|
||||
|
||||
calendar-event-gripbar[parentorient="vertical"][whichside="end"] {
|
||||
cursor: s-resize;
|
||||
}
|
||||
|
||||
calendar-event-gripbar[parentorient="horizontal"][whichside="start"] {
|
||||
cursor: w-resize;
|
||||
}
|
||||
|
||||
calendar-event-gripbar[parentorient="horizontal"][whichside="end"] {
|
||||
cursor: e-resize;
|
||||
}
|
||||
|
||||
calendar-event-box[orient="vertical"] .calendar-event-box-grippy-top {
|
||||
list-style-image: url("chrome://calendar/skin/event-grippy-top.png");
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
calendar-event-box[orient="vertical"]:hover .calendar-event-box-grippy-bottom {
|
||||
calendar-event-box[orient="vertical"] .calendar-event-box-grippy-bottom {
|
||||
list-style-image: url("chrome://calendar/skin/event-grippy-bottom.png");
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
calendar-event-box[orient="horizontal"]:hover .calendar-event-box-grippy-top {
|
||||
list-style-image: url("chrome://calendar/skin/event-grippy-left.png");
|
||||
}
|
||||
|
||||
calendar-event-box[orient="horizontal"]:hover .calendar-event-box-grippy-top,
|
||||
calendar-event-box[orient="horizontal"]:hover .calendar-event-box-grippy-bottom {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
calendar-event-box[orient="vertical"]:hover .calendar-event-box-grippy-top,
|
||||
calendar-event-box[orient="vertical"]:hover .calendar-event-box-grippy-bottom {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
calendar-event-box[orient="horizontal"] .calendar-event-box-grippy-top {
|
||||
list-style-image: url("chrome://calendar/skin/event-grippy-left.png");
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
calendar-event-box[orient="horizontal"] .calendar-event-box-grippy-bottom {
|
||||
list-style-image: url("chrome://calendar/skin/event-grippy-right.png");
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
calendar-event-box[readOnly="true"]:hover .calendar-event-box-grippy-top,
|
||||
calendar-event-box[readOnly="true"]:hover .calendar-event-box-grippy-bottom {
|
||||
list-style-image: none;
|
||||
visibility: hidden;
|
||||
cursor: auto;
|
||||
}
|
||||
|
||||
/* Alarm image */
|
||||
.alarm-image {
|
||||
list-style-image: url(chrome://calendar/skin/alarm.png);
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
.alarm-image[flashing="true"] {
|
||||
|
||||
Reference in New Issue
Block a user