Commit 58b9f355 authored by Mechtilde's avatar Mechtilde

New upstream version 3.8~beta3

parent 242a8577
......@@ -98,7 +98,7 @@ exchAttachments.prototype = {
this.globalFunctions.LOG("exchWebService.attachments.addAttachment");
if (aAttachment.uri) {
let documentLink = this._document.getElementById("exchWebService-attachment-link");
let documentLink = this._document.getElementById("attachment-link");
let item = documentLink.appendChild(createXULElement("listitem"));
item.setAttribute("crop", "end");
item.setAttribute("class", "listitem-iconic");
......@@ -187,7 +187,7 @@ exchAttachments.prototype = {
deleteAttachment: function deleteAttachment()
{
var documentLink = this._document.getElementById("exchWebService-attachment-link");
var documentLink = this._document.getElementById("attachment-link");
if ((documentLink.selectedItem) && (documentLink.selectedItem.attachment)) {
delete gAttachMap[documentLink.selectedItem.attachment.hashId];
documentLink.removeItemAt(documentLink.selectedIndex);
......@@ -220,7 +220,7 @@ exchAttachments.prototype = {
removeItemsFromListbox: function _removeItemsFromListbox()
{
var documentLink = this._document.getElementById("exchWebService-attachment-link");
var documentLink = this._document.getElementById("attachment-link");
while (documentLink.itemCount > 0) {
this.globalFunctions.LOG(" == Removing item from listbox");
documentLink.removeItemAt(0);
......@@ -383,7 +383,7 @@ exchAttachments.prototype = {
{
this.globalFunctions.LOG("exchWebService.attachments.onSelect");
let documentLink = this._document.getElementById("exchWebService-attachment-link");
let documentLink = this._document.getElementById("attachment-link");
var isReadOnly = "true";
if ((this._document.getElementById("calendar-event-dialog")) || (this._document.getElementById("calendar-task-dialog"))) {
......@@ -428,7 +428,7 @@ exchAttachments.prototype = {
openAttachment: function _openAttachment()
{
this.globalFunctions.LOG("exchWebService.attachments.openAttachment");
let documentLink = this._document.getElementById("exchWebService-attachment-link");
let documentLink = this._document.getElementById("attachment-link");
if (documentLink.selectedItem.attachment) {
var attURI = documentLink.selectedItem.attachment.uri;
......@@ -449,7 +449,7 @@ exchAttachments.prototype = {
saveAttachment: function _saveAttachment()
{
this.globalFunctions.LOG("exchWebService.attachments.saveAttachment");
let documentLink = this._document.getElementById("exchWebService-attachment-link");
let documentLink = this._document.getElementById("attachment-link");
this.downloadAttachment(documentLink.selectedItem.attachment, true);
},
......
......@@ -92,13 +92,7 @@
</toolbarpalette>
<toolbar id="event-toolbar" defaultset="button-save,button-attendees,button-privacy,button-url,exchWebService-add-attachment-button,button-delete">
</toolbar>
<listbox id="exchWebService-attachment-link"
context="exchWebService-attachment-popup"
rows="2"
onkeypress="tmpAttachment.onKeyPress(event);"
ondblclick="tmpAttachment.onDblClick(event);"
onselect="tmpAttachment.onSelect(event);"/>
</overlay>
......
......@@ -43,7 +43,7 @@
]>
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript" src="chrome://exchangecalendar/content/calendar-common-sets.js" />
<script type="application/javascript" src="chrome://exchangecalendar/content/calendar-common-sets2.js" />
<script type="application/javascript" src="chrome://exchangecalendar/content/exchService-common-sets.js" />
<commandset id="calendar_commands" commandupdater="true"
events="calendar_commands" oncommandupdate="calendarController.updateCommands()">
......
/* ***** BEGIN LICENSE BLOCK *****
* Version: GPL 3.0
*
* The contents of this file are subject to the General Public License
* 3.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.gnu.org/licenses/gpl.html
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* -- Exchange 2007/2010 Calendar and Tasks Provider.
* -- For Thunderbird with the Lightning add-on.
*
* This work is a combination of the Storage calendar, part of the default Lightning add-on, and
* the "Exchange Data Provider for Lightning" add-on currently, october 2011, maintained by Simon Schubert.
* Primarily made because the "Exchange Data Provider for Lightning" add-on is a continuation
* of old code and this one is build up from the ground. It still uses some parts from the
* "Exchange Data Provider for Lightning" project.
*
* Author: Deepak Kumar
* email: deepk2u@gmail.com
*
*
* This code uses parts of the Microsoft Exchange Calendar Provider code on which the
* "Exchange Data Provider for Lightning" was based.
* The Initial Developer of the Microsoft Exchange Calendar Provider Code is
* Andrea Bittau <a.bittau@cs.ucl.ac.uk>, University College London
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*
* ***** BEGIN LICENSE BLOCK *****/
var Cu = Components.utils;
Cu.import("resource://exchangecalendar/ecFunctions.js");
if(window.arguments[0].opener=="exchWebService-onForEve" || window.arguments[0].opener=="exchWebService-onForward"){
document.getElementById("all-day").disabled=true;
document.getElementById("event-starttime").disabled=true;
document.getElementById("event-endtime").disabled=true;
var buttons = document.getElementsByTagName("button");
for each (let bt in buttons){
bt.disabled=true;
}
}
/*
function exchEventAttendeeDialog(aDocument, aWindow)
{
this._document = aDocument;
this._window = aWindow;
}
exchEventAttendeeDialog.prototype = {
onLoad: function _onLoad()
{
dump(" >> onload\n");
// Add the exchangeAutoComplete option.
if (this._document.getElementById("attendees-list")) {
dump(" -- We have itemCount:"+this._document.getElementById("attendees-list").itemCount+"\n");
for (var i=0; i< this._document.getElementById("attendees-list").itemCount; i++) {
if (this._document.getElementById("attendeeCol3#"+i)) {
dump(" -- .. attendeeCol3#"+i+", autocompletesearch:"+this._document.getElementById("attendeeCol3#"+i).getAttribute("autocompletesearch")+"\n");
var autocompletesearch = this._document.getElementById("attendeeCol3#"+i).getAttribute("autocompletesearch");
if (autocompletesearch.indexOf("exchangeAutoCompleteSearch") == -1) {
this._document.getElementById("attendeeCol3#"+i).setAttribute("autocompletesearch", autocompletesearch + " exchangeAutoCompleteSearch");
}
}
}
}
},
}
var tmpEventAttendeeDialog = new exchEventAttendeeDialog(document, window);
window.addEventListener("load", function () { window.removeEventListener("load",arguments.callee,false); tmpEventAttendeeDialog.onLoad(); }, true);
*/
<?xml version="1.0" encoding="UTF-8"?>
<!--
/* ***** BEGIN LICENSE BLOCK *****
* Version: GPL 3.0
*
* The contents of this file are subject to the General Public License
* 3.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.gnu.org/licenses/gpl.html
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* ## Exchange 2007/2010 Calendar and Tasks Provider.
* ## For Thunderbird with the Lightning add-on.
*
* This work is a combination of the Storage calendar, part of the default Lightning add-on, and
* the "Exchange Data Provider for Lightning" add-on currently, october 2011, maintained by Simon Schubert.
* Primarily made because the "Exchange Data Provider for Lightning" add-on is a continuation
* of old code and this one is build up from the ground. It still uses some parts from the
* "Exchange Data Provider for Lightning" project.
*
* Author: Deepak Kumar
* email: deepk2u@gmail.com
*
*
* This code uses parts of the Microsoft Exchange Calendar Provider code on which the
* "Exchange Data Provider for Lightning" was based.
* The Initial Developer of the Microsoft Exchange Calendar Provider Code is
* Andrea Bittau <a.bittau@cs.ucl.ac.uk>, University College London
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*
* ***** BEGIN LICENSE BLOCK *****/
-->
<?xml-stylesheet type="text/css" href="chrome://exchangecalendar/skin/calendar-event-dialog-attendees.css"?>
<overlay id="forwardOnRightClick"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript" src="chrome://exchangecalendar/content/calendar-event-dialog-attendees.js"/>
</overlay>
......@@ -279,112 +279,8 @@ exchWebService.eventDialog = {
onLoad: function _onLoad() {
if (this._initialized) return;
exchWebService.eventDialog.updateAttendees();
},
updateAttendees: function _updateAttendees() {
let attendeeRow = document.getElementById("event-grid-attendee-row");
attendeeRow.setAttribute('collapsed', 'true');
let attendeeRow2 = document.getElementById("event-grid-attendee-row-2");
let optAttendeeRow = document.getElementById("event-grid-attendee-row-4");
let reqAttendeeRow = document.getElementById("event-grid-attendee-row-3");
if (window.attendees && window.attendees.length > 0) {
if (isEvent(window.calendarItem)) { // sending email invitations currently only supported for events
attendeeRow2.removeAttribute('collapsed');
} else {
attendeeRow2.setAttribute('collapsed', 'true');
}
let attendeeNames = [];
let attendeeEmails = [];
let reqAttendeeNames = [];
let reqAttendeeEmails = [];
let optAttendeeNames = [];
let optAttendeeEmails = [];
let numAttendees = window.attendees.length;
let emailRE = new RegExp("^mailto:(.*)", "i");
for (let i = 0; i < numAttendees; i++) {
let attendee = window.attendees[i];
let name = attendee.commonName;
if (attendee.role == "OPT-PARTICIPANT") {
if (name && name.length) {
optAttendeeNames.push(name);
let email = attendee.id;
if (email && email.length) {
if (emailRE.test(email)) {
name += ' <' + RegExp.$1 + '>';
} else {
name += ' <' + email + '>';
}
optAttendeeEmails.push(name);
}
} else if (attendee.id && attendee.id.length) {
let email = attendee.id;
if (emailRE.test(email)) {
optAttendeeNames.push(RegExp.$1);
} else {
optAttendeeNames.push(email);
}
} else {
continue;
}
} else {
if (name && name.length) {
reqAttendeeNames.push(name);
let email = attendee.id;
if (email && email.length) {
if (emailRE.test(email)) {
name += ' <' + RegExp.$1 + '>';
} else {
name += ' <' + email + '>';
}
reqAttendeeEmails.push(name);
}
} else if (attendee.id && attendee.id.length) {
let email = attendee.id;
if (emailRE.test(email)) {
reqAttendeeNames.push(RegExp.$1);
} else {
reqAttendeeNames.push(email);
}
} else {
continue;
}
}
}
if (reqAttendeeNames.length > 0) {
reqAttendeeRow.removeAttribute('collapsed');
} else {
reqAttendeeRow.setAttribute('collapsed', 'true');
}
if (optAttendeeNames.length > 0) {
optAttendeeRow.removeAttribute('collapsed');
} else {
optAttendeeRow.setAttribute('collapsed', 'true');
}
let attendeeList = document.getElementById("attendee-list");
let reqAttendeeList = document.getElementById("req-attendee-list-3");
let optAttendeeList = document.getElementById("opt-attendee-list-4");
let callback = function func() {
reqAttendeeList.setAttribute('value', reqAttendeeNames.join(', '));
reqAttendeeList.setAttribute('tooltiptext', reqAttendeeEmails.join(', '));
optAttendeeList.setAttribute('value', optAttendeeNames.join(', '));
optAttendeeList.setAttribute('tooltiptext', optAttendeeEmails.join(', '));
};
setTimeout(callback, 1);
} else {
attendeeRow2.setAttribute('collapsed', 'true');
optAttendeeRow.setAttribute('collapsed', 'true');
reqAttendeeRow.setAttribute('collapsed', 'true');
}
},
// exchWebService.eventDialog.updateAttendees();
},
editAttendees: function _editAttendees() {
let savedWindow = window;
......@@ -426,7 +322,7 @@ exchWebService.eventDialog = {
gStartTime = startTime.getInTimezone(kDefaultTimezone);
gEndTime = endTime.getInTimezone(kDefaultTimezone);
gItemDuration = duration;
exchWebService.eventDialog.updateAttendees();
// exchWebService.eventDialog.updateAttendees();
updateDateTime();
updateAllDay();
if (isAllDay != gStartTime.isDate) {
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
/* ***** BEGIN LICENSE BLOCK *****
* Version: GPL 3.0
......@@ -31,118 +30,119 @@
*
* ***** BEGIN LICENSE BLOCK *****/
-->
<?xml-stylesheet type="text/css" href="chrome://global/skin/"?>
<?xml-stylesheet type="text/css" href="chrome://global/skin/xul.css"?>
<?xml-stylesheet type="text/css" href="chrome://messenger/skin/messengercompose/messengercompose.css"?>
<?xml-stylesheet type="text/css" href="chrome://exchangecalendar/skin/itemBodyEditor.css"?>
<?xml-stylesheet type="text/css" href="chrome://exchangecalendar/skin/exchWebServiceEditor.css"?>
<?xml-stylesheet type="text/css" href="chrome://exchangecalendar/skin/exchWebServiceEditor.css"?>
<!DOCTYPE dialog [
<!ENTITY % eventDialogDTD SYSTEM "chrome://calendar/locale/calendar-event-dialog.dtd">
<!ENTITY % eventDialogDTD SYSTEM "chrome://calendar/locale/calendar-event-dialog.dtd">
%eventDialogDTD;
<!ENTITY % dtd1 SYSTEM "chrome://exchangecalendar/locale/calendar-event-dialog.dtd" >
<!ENTITY % dtd1 SYSTEM "chrome://exchangecalendar/locale/calendar-event-dialog.dtd" >
%dtd1;
]>
<?xul-overlay href="chrome://exchangecalendar/content/attachments-view.xul"?>
<overlay id="exchWebService-calendar-event-dialog.xul"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript" src="chrome://exchangecalendar/content/calendar-event-dialog.js"/>
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript" src="chrome://exchangecalendar/content/calendar-event-dialog.js"/>
<script type="application/javascript" src="chrome://calendar/content/calendar-event-dialog.js"/>
<command id="cmd_attendees"
<command id="cmd_attendees"
oncommand="exchWebService.eventDialog.editAttendees();"/>
<rows id="event-grid-rows">
<row id="event-grid-attendee-row-3" align="center" insertbefore = "event-grid-attendee-row">
<label value="Required Attendees (I):"
accesskey="&event.attendees.accesskey;"
control="attendee-list"
disable-on-readonly="true"/>
<label id="req-attendee-list-3"
class="text-link"
crop="right"
tooltiptext=""
onclick="showAttendeePopup(event)"/>
</row>
<row id="event-grid-attendee-row-4" align="center" insertbefore = "event-grid-attendee-row">
<label value="Optional Attendees (I):"
accesskey="&event.attendees.accesskey;"
control="attendee-list"
disable-on-readonly="true"/>
<label id="opt-attendee-list-4"
class="text-link"
crop="right"
tooltiptext=""
onclick="showAttendeePopup(event)"/>
</row>
<row id="exchWebService-owner-row" collapsed="true" insertafter="event-grid-title-row">
<label value="&exchWebService.owner.label;"/>
<label id="exchWebService-owner-label" value=""/>
</row>
<row id="event-grid-category-color-row">
<hbox id="event-grid-category-box">
<menulist id="item-calendar" oncommand="tmpEventDialog.selectedCalendarChanged(this);"/>
</hbox>
</row>
<separator id="exchWebService-details-separator" hidden="true" class="groove" insertafter="event-grid-todo-status-row"/>
<row id="exchWebService-details-row1" align="center"
<rows id="event-grid-rows" insertbefore = "event-grid-alarmrow">
<row id="exchWebService-owner-row" collapsed="true" insertafter="event-grid-title-row">
<label value="&exchWebService.owner.label;"/>
<label id="exchWebService-owner-label" value=""/>
</row>
<row id="event-grid-category-color-row">
<hbox id="event-grid-category-box">
<menulist id="item-calendar" oncommand="tmpEventDialog.selectedCalendarChanged(this);"/>
</hbox>
</row>
<separator id="exchWebService-details-separator" hidden="true" class="groove" insertafter="event-grid-todo-status-row"/>
<row id="exchWebService-details-row1" align="center"
collapsed="true" insertafter="exchWebService-details-separator">
<label value="&exchWebService.totalWork.label;"
<label value="&exchWebService.totalWork.label;"
disable-on-readonly="true"/>
<hbox align="center">
<textbox id="exchWebService-totalWork-count"
<hbox align="center">
<textbox id="exchWebService-totalWork-count"
increment="10" min="0" type="number" size="3" value="0" disable-on-readonly="true"/>
<label value="&exchWebService.mileage.label;"
<label value="&exchWebService.mileage.label;"
disable-on-readonly="true"/>
<textbox id="exchWebService-mileage-count" value="" disable-on-readonly="true"/>
</hbox>
</row>
<row id="exchWebService-details-row2" align="center"
<textbox id="exchWebService-mileage-count" value="" disable-on-readonly="true"/>
</hbox>
</row>
<row id="exchWebService-details-row2" align="center"
collapsed="true" insertafter="exchWebService-details-row1">
<label value="&exchWebService.actualWork.label;"
<label value="&exchWebService.actualWork.label;"
disable-on-readonly="true"/>
<hbox align="center">
<textbox id="exchWebService-actualWork-count"
<hbox align="center">
<textbox id="exchWebService-actualWork-count"
increment="10" min="0" type="number" size="3" value="0" disable-on-readonly="true"/>
<label value="&exchWebService.billingInformation.label;"
<label value="&exchWebService.billingInformation.label;"
disable-on-readonly="true"/>
<textbox id="exchWebService-billingInformation-count" value="" disable-on-readonly="true"/>
</hbox>
</row>
<row id="exchWebService-details-row3" align="center"
<textbox id="exchWebService-billingInformation-count" value="" disable-on-readonly="true"/>
</hbox>
</row>
<row id="exchWebService-details-row3" align="center"
collapsed="true" insertafter="exchWebService-details-row2">
<label value="&exchWebService.companies.label;"
<label value="&exchWebService.companies.label;"
disable-on-readonly="true"/>
<textbox id="exchWebService-companies-count" value="" disable-on-readonly="true"/>
</row>
<row id="event-grid-description-row">
<itemBodyEditor id="exchWebService-body-editor"
flex="1"
insertafter="item-description"
<textbox id="exchWebService-companies-count" value="" disable-on-readonly="true"/>
</row>
</rows>
<rows flex="1" id="event-grid-rows" >
<row id="exchWebService-owner-row" collapsed="true" insertafter="event-grid-title-row">
<label value="&exchWebService.owner.label;"/>
<label id="exchWebService-owner-label" value=""/>
</row>
<row id="event-grid-category-color-row">
<hbox id="event-grid-category-box">
<menulist id="item-calendar" oncommand="tmpEventDialog.selectedCalendarChanged(this);"/>
</hbox>
</row>
<separator id="exchWebService-details-separator" hidden="true" class="groove" insertafter="event-grid-todo-status-row"/>
<row id="exchWebService-details-row1" align="center"
collapsed="true" insertafter="exchWebService-details-separator">
<label value="&exchWebService.totalWork.label;"
disable-on-readonly="true"/>
</row>
<row id="exchWebService-attachments-row"
collapsed="true" insertbefore="event-grid-link-separator">
<label value="&event.attachments.label;"
accesskey="&event.attachments.accesskey;"
<hbox align="center">
<textbox id="exchWebService-totalWork-count"
increment="10" min="0" type="number" size="3" value="0" disable-on-readonly="true"/>
<label value="&exchWebService.mileage.label;"
disable-on-readonly="true"/>
<textbox id="exchWebService-mileage-count" value="" disable-on-readonly="true"/>
</hbox>
</row>
<row id="exchWebService-details-row2" align="center"
collapsed="true" insertafter="exchWebService-details-row1">
<label value="&exchWebService.actualWork.label;"
disable-on-readonly="true"/>
<listbox id="exchWebService-attachment-link" rows="2" flex="1"/>
</row>
</rows>
</overlay>
<hbox align="center">
<textbox id="exchWebService-actualWork-count"
increment="10" min="0" type="number" size="3" value="0" disable-on-readonly="true"/>
<label value="&exchWebService.billingInformation.label;"
disable-on-readonly="true"/>
<textbox id="exchWebService-billingInformation-count" value="" disable-on-readonly="true"/>
</hbox>
</row>
<row id="exchWebService-details-row3" align="center"
collapsed="true" insertafter="exchWebService-details-row2">
<label value="&exchWebService.companies.label;"
disable-on-readonly="true"/>
<textbox id="exchWebService-companies-count" value="" disable-on-readonly="true"/>
</row>
</rows>
<tabbox
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="event-grid-tabbox" selectedIndex="2" flex="1">
<tabpanels id="event-grid-tabpanels" flex="1" selectedIndex="2">
<tabpanel id="event-grid-tabpanel-description">
<itemBodyEditor id="exchWebService-body-editor"
flex="1"
insertafter="item-description"
disable-on-readonly="true"/>
</tabpanel>
</tabpanels>
</tabbox>
</overlay>
\ No newline at end of file
/*
* Owner:Ericsson
*/
*/
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
......@@ -54,7 +52,7 @@ function taskHtmlDetailsView(event){
if( item.calendar.type == "exchangecalendar" ){
//Html manipulations
var ele = document.getElementById("calendar-task-details-description");
var ele2 = document.getElementById("calendar-task-details-description2");
var ele2 = document.getElementById("exchService-task-details-description");
//remove existing task view
//ele.parentNode.removeChild(ele);
......@@ -101,6 +99,10 @@ function taskHtmlDetailsView(event){
var collection = query.getCollection(queryListener);
}
}
}
else {
document.getElementById("exchService-task-details-description").hidden = true;
document.getElementById("calendar-task-details-description").hidden = false;
}
}
}
......
......@@ -58,7 +58,7 @@
<vbox id="calendar-task-box" onselect="taskHtmlDetailsView(event);"/>
<vbox id="calendar-task-details-container">
<browser id="calendar-task-details-description2"
<browser id="exchService-task-details-description"
name="messagepane02"
height="0"
flex="1"
......@@ -93,16 +93,6 @@
</menupopup>
</popupset>
<hbox id="calendar-task-details-attachment-row">
<vbox id="exchWebService-attachments-row"
flex="1"
collapsed="true" insertbefore="calendar-task-details-attachment-rows">
<listbox id="exchWebService-attachment-link" rows="3" flex="1"/>
</vbox>
</hbox>
</overlay>
......@@ -23,7 +23,7 @@ newOpenEventDialog(calendarItem, calendar, mode, callback, job, initialDate);
}
function newOpenEventDialog(calendarItem, calendar, mode, callback, job, initialDate) {
let dlg = cal.findItemWindow(calendarItem);
let dlg = cal.findItemWindow(calendarItem);
if (dlg) {
dlg.focus();
disposeJob(job);
......@@ -125,8 +125,8 @@ function newOpenEventDialog(calendarItem, calendar, mode, callback, job, initial
} else {
url = "chrome://calendar/content/calendar-summary-dialog.xul";
}
if( calendarItem.itemClass == "IPM.Note" ) url = "chrome://exchangecalendar/content/calendar-event-dialog2.xul";
if( calendarItem.itemClass == "IPM.Note" ) url = "chrome://exchangecalendar/content/exchService-followup-event-dialog.xul";
// reminder: event dialog should not be modal (cf bug 122671)
var features;
......
......@@ -5,14 +5,13 @@