Bug 348009 - Drag and Drop in Month view freezes Un*x desktops;r=dbo
git-svn-id: svn://10.0.0.236/trunk@254100 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
1d0b56091c
commit
03f588b6e1
@ -508,34 +508,59 @@
|
||||
-->
|
||||
<method name="addDropShadows">
|
||||
<body><![CDATA[
|
||||
// Only allow one set of drop-boxes
|
||||
if (this.monthView.mDropShadows) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.monthView.mDropShadows = [];
|
||||
var shadowStart = this.mDate.clone();
|
||||
shadowStart.day -= this.monthView.mShadowIndex;
|
||||
for (var i = 0; i < this.monthView.mShadowLength; i++) {
|
||||
var dropbox = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "box");
|
||||
dropbox.setAttribute("dropbox", "true");
|
||||
dropbox.setAttribute("flex", "1");
|
||||
|
||||
var box = this.monthView.findBoxForDate(shadowStart);
|
||||
if (!box) {
|
||||
// Dragging to the end of a view
|
||||
shadowStart.day += 1;
|
||||
continue;
|
||||
}
|
||||
box.box.dayitems.insertBefore(dropbox, box.box.dayitems.firstChild);
|
||||
this.monthView.mDropShadows.push(dropbox);
|
||||
|
||||
shadowStart.day += 1;
|
||||
}
|
||||
#ifdef XP_UNIX
|
||||
var self = this;
|
||||
setTimeout(function addDropShadows2() { self.addDropShadows2(); }, 10);
|
||||
#else
|
||||
this.addDropShadows2();
|
||||
#endif
|
||||
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="addDropShadows2">
|
||||
<body><![CDATA[
|
||||
// Only allow one set of drop-boxes
|
||||
if (this.monthView.mDropShadows) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.monthView.mDropShadows = [];
|
||||
var shadowStart = this.mDate.clone();
|
||||
shadowStart.day -= this.monthView.mShadowIndex;
|
||||
for (var i = 0; i < this.monthView.mShadowLength; i++) {
|
||||
var dropbox = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "box");
|
||||
dropbox.setAttribute("dropbox", "true");
|
||||
dropbox.setAttribute("flex", "1");
|
||||
|
||||
var box = this.monthView.findBoxForDate(shadowStart);
|
||||
if (!box) {
|
||||
// Dragging to the end of a view
|
||||
shadowStart.day += 1;
|
||||
continue;
|
||||
}
|
||||
box.box.dayitems.insertBefore(dropbox, box.box.dayitems.firstChild);
|
||||
this.monthView.mDropShadows.push(dropbox);
|
||||
|
||||
shadowStart.day += 1;
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="removeDropShadows">
|
||||
<body><![CDATA[
|
||||
#ifdef XP_UNIX
|
||||
var self = this;
|
||||
setTimeout(function removeDropShadows2() { self.removeDropShadows2(); }, 10);
|
||||
#else
|
||||
this.removeDropShadows2();
|
||||
#endif
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="removeDropShadows2">
|
||||
<body><![CDATA[
|
||||
if (!this.monthView.mDropShadows) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -21,13 +21,13 @@ calendar.jar:
|
||||
content/calendar/calendar-decorated-day-view.xml (content/calendar-decorated-day-view.xml)
|
||||
content/calendar/calendar-decorated-week-view.xml (content/calendar-decorated-week-view.xml)
|
||||
content/calendar/calendar-decorated-multiweek-view.xml (content/calendar-decorated-multiweek-view.xml)
|
||||
content/calendar/calendar-decorated-month-view.xml (content/calendar-decorated-month-view.xml)
|
||||
content/calendar/calendar-decorated-month-view.xml (content/calendar-decorated-month-view.xml)
|
||||
content/calendar/calendar-dialog-utils.js (content/calendar-dialog-utils.js)
|
||||
* content/calendar/calendar-dnd-listener.js (content/calendar-dnd-listener.js)
|
||||
content/calendar/calendar-item-editing.js (content/calendar-item-editing.js)
|
||||
content/calendar/calendar-item-bindings.xml (content/calendar-item-bindings.xml)
|
||||
content/calendar/calendar-menus.xml (content/calendar-menus.xml)
|
||||
content/calendar/calendar-month-view.xml (content/calendar-month-view.xml)
|
||||
* content/calendar/calendar-month-view.xml (content/calendar-month-view.xml)
|
||||
content/calendar/calendar-multiday-view.xml (content/calendar-multiday-view.xml)
|
||||
content/calendar/calendar-occurrence-prompt.xul (content/calendar-occurrence-prompt.xul)
|
||||
content/calendar/calendar-properties-dialog.xul (content/calendar-properties-dialog.xul)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user