Monotone-Parent: eb200b682dbedf18d1ac5a67f76d81304b347bad

Monotone-Revision: ab4b1f0c6f4310a6bc308b8c2fc0afacfdfffe2e

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-02-15T17:50:33
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2010-02-15 17:50:33 +00:00
parent a012a1a205
commit 904e35497d
2 changed files with 20 additions and 2 deletions
+4
View File
@@ -11,6 +11,10 @@
"eventInside" DIV to contain the title and draw the border. This
avoids the overflow of extra pixels added to the DIV heights for
start and end ghosts.
(SOGoEventDragController.attachToDayNode): we determine whether
the event cell are for an invitation, in which case the dragging
event will be aborted even though the user is technically the
"owner" of the represented event.
2010-02-13 Wolfgang Sourdeau <wsourdeau@inverse.ca>
+16 -2
View File
@@ -904,6 +904,7 @@ SOGoEventDragController.prototype = {
eventCells: null,
eventType: null,
eventIsInvitation: false,
title: null,
folderClass: null,
@@ -930,6 +931,7 @@ SOGoEventDragController.prototype = {
this.eventCells = eventCells;
this.ghostController = new SOGoEventDragGhostController();
this._determineEventInvitation(eventCells[0]);
this._determineEventType(eventCells[0]);
this._prepareEventType();
this._determineTitleAndFolderClass();
@@ -939,7 +941,7 @@ SOGoEventDragController.prototype = {
this.onDragStartBound = this.onDragStart.bindAsEventListener(this);
for (var i = 0; i < eventCells.length; i++) {
eventCells[i].observe("mousedown", this.onDragStartBound, false);
if (eventCells[i].editable) {
if (eventCells[i].editable && !this.eventIsInvitation) {
eventCells[i].addClassName("draggable");
}
}
@@ -979,7 +981,8 @@ SOGoEventDragController.prototype = {
if ((!this.eventCells
&& (target.hasClassName("clickableHourCell")
|| target.hasClassName("day"))
|| (this.eventCells && this.eventCells[0].editable))) {
|| (this.eventCells && this.eventCells[0].editable
&& !this.eventIsInvitation))) {
var utilities = SOGoEventDragUtilities();
utilities.setEventType(this.eventType);
@@ -1029,6 +1032,17 @@ SOGoEventDragController.prototype = {
return false;
},
_determineEventInvitation: function SEDC__determineEventType(node) {
var isInvitation = false;
for (var i = 0; !isInvitation && i < userStates.length; i++) {
var inside = node.select("DIV.eventInside")[0];
if (inside.hasClassName(userStates[i]))
isInvitation = true;
}
this.eventIsInvitation = isInvitation;
},
_determineEventType: function SEDC__determineEventType(node) {
var type = "unknown";