From 18662f9ecbebf3a32dddc65a3e7954dacbe528a0 Mon Sep 17 00:00:00 2001 From: Stefan Profanter Date: Thu, 21 Apr 2016 17:32:57 +0200 Subject: [PATCH 001/222] Fix: The shared folder/folder id can also be a task list --- chrome/content/exchangeSettingsOverlay.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/exchangeSettingsOverlay.js b/chrome/content/exchangeSettingsOverlay.js index 92e2f1ba..4af78732 100644 --- a/chrome/content/exchangeSettingsOverlay.js +++ b/chrome/content/exchangeSettingsOverlay.js @@ -408,7 +408,7 @@ exchSettingsOverlay.prototype = { { this.globalFunctions.LOG("exchWebServicesGetFolderOK: aFolderID:"+aFolderID+", aChangeKey:"+aChangeKey+", aFolderClass:"+aFolderClass); - if (aFolderClass == "IPF.Appointment") { + if (aFolderClass == "IPF.Appointment" || aFolderClass == "IPF.Task") { this.exchWebServicesgFolderID = aFolderID; this.exchWebServicesgChangeKey = aChangeKey; this.gexchWebServicesDetailsChecked = true; From e9d219b0e09374d37ee597fae643ff6ab1ca4d9c Mon Sep 17 00:00:00 2001 From: Babu Vincent Date: Tue, 26 Jul 2016 18:17:06 +0530 Subject: [PATCH 002/222] propose-new-time --- chrome/content/invitationResponse.js | 57 ++++++++++- chrome/content/invitationResponse.xul | 94 ++++++++++--------- components/erSendMeetingRespons.js | 29 ++++-- .../exchangeCalendar/mivExchangeCalendar.js | 23 ++++- .../de/invitationResponse.dtd | 3 + .../en-US/invitationResponse.dtd | 5 +- .../fr-FR/invitationResponse.dtd | 3 + .../ja-JP/invitationResponse.dtd | 3 + .../nl/invitationResponse.dtd | 3 + .../ru/invitationResponse.dtd | 3 + .../sv/invitationResponse.dtd | 3 + .../tr/invitationResponse.dtd | 3 + 12 files changed, 171 insertions(+), 58 deletions(-) diff --git a/chrome/content/invitationResponse.js b/chrome/content/invitationResponse.js index 6c409181..d1c7f2df 100644 --- a/chrome/content/invitationResponse.js +++ b/chrome/content/invitationResponse.js @@ -42,6 +42,9 @@ Cu.import("resource://exchangecalendar/ecFunctions.js"); if (! exchWebService) var exchWebService = {}; +var exchangeStatistics = Cc["@1st-setup.nl/exchange/statistics;1"] + .getService(Ci.mivExchangeStatistics); + exchWebService.invitationResponse = { onAccept: function _onAccept() @@ -49,9 +52,35 @@ exchWebService.invitationResponse = { window.arguments[0].answer = "send"; window.arguments[0].bodyText = document.getElementById("exchWebService_messageReponseBody").value; window.arguments[0].response = document.getElementById("exchWebService_itemResponse").value; + + var pStart = this.formatDate(document.getElementById("exchWebService_propose_start").value); + var pEnd = this.formatDate(document.getElementById("exchWebService_propose_end").value); + + + window.arguments[0].proposeStart = pStart; + window.arguments[0].proposeEnd = pEnd; + return true; }, + + formatDate: function _formatDate(date) { + var year = date.getFullYear(), + month = date.getMonth() + 1, // months are zero indexed + day = date.getDate(), + hour = date.getHours(), + minute = date.getMinutes(), + second = date.getSeconds(), + dayFormatted = day < 10 ? "0" + day : day, + monthFormatted = month < 10 ? "0" + month : month, + hourFormatted = hour < 10 ? "0" + hour : hour, + minuteFormatted = minute < 10 ? "0" + minute : minute, + secondFormatted = second < 10 ? "0" + second : second, + morning = hour < 12 ? "am" : "pm"; + return year + "-" + monthFormatted + "-" + dayFormatted + "T" + hourFormatted + ":" + + minuteFormatted + ":"+ secondFormatted+ "Z" ; + }, + onLoad: function _onLoad() { var item = window.arguments[0].item; @@ -78,12 +107,36 @@ exchWebService.invitationResponse = { document.getElementById("exchWebService_meetingOrganiser").value = "(unknown)"; } - document.getElementById("exchWebService_messageReponseBody").placeholder = window.arguments[0].response; - + document.getElementById("exchWebService_messageReponseBody").placeholder = window.arguments[0].response; + + var serverUrl = window.arguments[0].serverUrl; + if ( exchangeStatistics.getServerVersion(serverUrl).indexOf("Exchange2013") > -1) { + document.getElementById("exchWebService_propose_time_checkbox").setAttribute("disabled","false"); + } + else{ + document.getElementById("exchWebService_propose_time_checkbox").setAttribute("disabled","true"); + } }, doResponseChanged: function _doResponseChanged(aMenuList) { document.getElementById("exchWebService_messageReponseBody").placeholder = aMenuList.value; }, + + onCheckChanged: function _onCheckChanged(aCheckbox) + { + if( aCheckbox.checked == true ){ + document.getElementById("exchWebService_propose_end_label").setAttribute("disabled","false"); + document.getElementById("exchWebService_propose_start_label").setAttribute("disabled","false"); + document.getElementById("exchWebService_propose_start").setAttribute("disabled","false"); + document.getElementById("exchWebService_propose_end").setAttribute("disabled","false"); + } + else{ + document.getElementById("exchWebService_propose_end_label").setAttribute("disabled","true"); + document.getElementById("exchWebService_propose_start_label").setAttribute("disabled","true"); + document.getElementById("exchWebService_propose_start").setAttribute("disabled","true"); + document.getElementById("exchWebService_propose_end").setAttribute("disabled","true"); + } + }, + } diff --git a/chrome/content/invitationResponse.xul b/chrome/content/invitationResponse.xul index bebe250f..3c15e656 100644 --- a/chrome/content/invitationResponse.xul +++ b/chrome/content/invitationResponse.xul @@ -1,5 +1,4 @@ - - + + + - - - %dtd1; -]> + %dtd1; ]> + - + +