Applied comments

This commit is contained in:
Alexandre Cloutier
2014-07-18 15:03:28 -04:00
parent b892b3f794
commit 28e6bb8b9d
5 changed files with 24 additions and 13 deletions
@@ -544,7 +544,6 @@ vtodo_class2 = "(Confidential task)";
"DestinationCalendarError" = "The source and destination calendars are the same. Please try to copy to a different calendar.";
"EventCopyError" = "The copy failed. Please try to copy to a difference calendar.";
"Please select at least one calendar" = "Please select at least one calendar";
"An error as occurred please try again" = "An error as occurred please try again";
"Open Task..." = "Open Task...";
+1 -1
View File
@@ -34,7 +34,7 @@
<div class="preload" style="visibility: hidden;">
<img rsrc:src="event-gradient.png"/>
</div>
<img rsrc:src="event7.png" id="DnDCalendarList" style="visibility: hidden;"/>
<img rsrc:src="event7.png" id="DnDLeftPanelImage" style="visibility: hidden;"/>
<div class="menu" id="monthListMenu">
<ul>
<var:foreach list="monthMenuItems" item="monthMenuItem"
+1 -1
View File
@@ -1546,7 +1546,7 @@ DIV#dragDropVisual
padding-top: 5px;
}
#DnDCalendarList
#DnDLeftPanelImage
{
position:absolute;
z-index:1;
+4 -1
View File
@@ -3178,16 +3178,19 @@ function dropSelectedEvents(action, toId) {
if (selectedCalendars.length > 0) {
var eventIds = $('eventsList').getSelectedRowsId();
for (var i = 0; i < eventIds.length; i++) {
// Find the event ID (.ics)
if (!eventIds[i].endsWith("ics")) {
// If it is a repeated event, substract the occurence part
if (eventIds[i].indexOf(".ics")) {
var x = eventIds[i].indexOf(".ics") + 4;
eventIds[i] = eventIds[i].substr(0,x);
}
else {
showAlertDialog(_("An error as occurred please try again"));
log("Can't find the event(.ics) on the item dragged : " + eventIds[i]);
return false;
}
}
// Distinction between personal calendar and a calendar with a reference ID (ex: 4535-7545-B-5D3J)
if (eventIds[i].search(toId+"-") == -1) {
var x = eventIds[i].indexOf('-');
if (eventIds[i].indexOf('-') == 4) {
+18 -9
View File
@@ -977,12 +977,15 @@ function SOGoEventDragLeftPanelController() {
SOGoEventDragLeftPanelController.prototype = {
updateLeftPanelVisual : null,
dropCalendar : null,
DnDLeftPanelImage : $("DnDLeftPanelImage"),
setLeftPanelVisual: function SEDLPC_setLeftPanelVisual() {
var that = this;
this.updateLeftPanelVisual = $("leftPanel").on("mousemove", function(e){
$("DnDCalendarList").style.left = e.pageX + "px";
$("DnDCalendarList").style.top = e.pageY + "px";
that.DnDLeftPanelImage.style.left = e.pageX + "px";
that.DnDLeftPanelImage.style.top = e.pageY + "px";
});
this.updateLeftPanelVisual.stop();
},
updateFromPointerHandler: function SEDLPC_updateFromPointerHandler() {
@@ -994,6 +997,16 @@ SOGoEventDragLeftPanelController.prototype = {
if (hoverCalendar)
hoverCalendar.addClassName('genericHoverClass');
this.dropCalendar = hoverCalendar;
},
startEvent: function SEDLPC_startEvent() {
this.DnDLeftPanelImage.style.visibility = 'visible';
this.updateLeftPanelVisual.start();
},
stopEvent: function SEDLPC_stopEvent() {
this.DnDLeftPanelImage.style.visibility = 'hidden';
this.updateLeftPanelVisual.stop();
}
}
@@ -1379,7 +1392,7 @@ SOGoEventDragController.prototype = {
Event.stopObserving(document.body, "mousemove", this.onDragModeBound);
this.onDragStopBound = null;
this.onDragModeBound = null;
$("DnDCalendarList").style.visibility = 'hidden';
this.leftPanelController.stopEvent();
var utilities = SOGoEventDragUtilities();
if (this.dragHasStarted) {
@@ -1400,7 +1413,6 @@ SOGoEventDragController.prototype = {
$$('#calendarList li').each(function(e) {
e.removeClassName('genericHoverClass');
});
this.leftPanelController.updateLeftPanelVisual.stop();
calendarID[0] = this.folderClass.substr(14);
calendarID[1] = this.leftPanelController.dropCalendar.getAttribute("id").substr(1);
delta.start = 0;
@@ -1452,17 +1464,14 @@ SOGoEventDragController.prototype = {
if (newCoordinates == null && this.leftPanelController != null) {
if (this.ghostController.ghosts) {
this.ghostController.hideGhosts();
$("DnDCalendarList").style.visibility = 'visible';
this.leftPanelController.updateLeftPanelVisual.start();
this.leftPanelController.startEvent();
}
this.leftPanelController.updateFromPointerHandler();
}
else {
if (this.ghostController.ghosts == null) {
this.ghostController.showGhosts();
$("DnDCalendarList").style.visibility = 'hidden';
this.leftPanelController.updateLeftPanelVisual.stop();
this.leftPanelController.stopEvent();
}
this.ghostController.updateFromPointerHandler();
}