Commit 3db59d84 authored by Mechtilde's avatar Mechtilde

Imported upstream version 3.9.0 and changes for Debian version

parent ef62f3fe
......@@ -70,7 +70,4 @@ we'd like to ask you to do:
License
-------
This software is licensed under the [GNU GPL] Version 3
[GNU GPL]: http://www.gnu.org/licenses/gpl.html
Readme template file courtesy: [mozwebqa-test-templates][mozwebqa-test-templates]
[mozwebqa-test-templates]: https://github.com/mozilla/mozwebqa-test-templates
[GNU GPL]: http://www.gnu.org/licenses/gpl.html
......@@ -12,12 +12,12 @@ do
case ${OPTION} in
u) echo "update"
cat defaults/preferences/update_enable.txt > defaults/preferences/update.js
zip -r exchangecalendar-$version.xpi * -x \*.git \*.xpi \*.sh update\*.txt
zip -r exchangecalendar-v$version.xpi * -x \*.git \*.xpi \*.sh update\*.txt
exit
;;
d) echo "no update"
cat defaults/preferences/update_disable.txt > defaults/preferences/update.js
zip -r exchangecalendar-$version.xpi * -x \*.git \*.xpi \*.sh update\*.txt
zip -r exchangecalendar-v$version.xpi * -x \*.git \*.xpi \*.sh update\*.txt
exit
;;
*) usage ;;
......
......@@ -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);
......@@ -332,7 +332,13 @@ exchAttachments.prototype = {
var taskTree = this._document.getElementById("calendar-task-tree");
var item = taskTree.currentTask;
var displayElement=function(id,flag) {
setBooleanAttribute(id, "hidden", !flag);
return flag;
}
if (displayElement("calendar-task-details-container", item != null) &&
displayElement("calendar-task-view-splitter", item != null)) {
if ((item.calendar) && (item.calendar.type == "exchangecalendar")) {
// calendar-task-view (hide existing attachment view)
//this.globalFunctions.LOG("exchWebService.attachments.onSelectTask: it is an Exchange task 1.");
......@@ -370,13 +376,14 @@ exchAttachments.prototype = {
catch (ex) {this.globalFunctions.LOG("exchWebService.attachments.onSelectTask: Foutje Y:");}
this.attachmentListboxVisible = false;
}
}
},
onSelect: function _onSelect(aEvent)
{
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"))) {
......@@ -421,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;
......@@ -442,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>
......
......@@ -75,6 +75,9 @@ exchForewardEvent.prototype = {
args.calendar =calendar;
args.onOk = this.callOnRightClick;
args.opener="exchWebService-onForEve";
dump("\nxxxxxxx args"+JSON.stringify(args));
this._window.openDialog("chrome://calendar/content/calendar-event-dialog-attendees.xul","_blank", "chrome,titlebar,modal,resizable",args);
},
......
......@@ -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);
*/
......@@ -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
......@@ -37,6 +37,8 @@
<!DOCTYPE dialog [
<!ENTITY % eventDialogDTD SYSTEM "chrome://calendar/locale/calendar-event-dialog.dtd">
%eventDialogDTD;
<!ENTITY % summaryDialogDTD SYSTEM "chrome://exchangecalendar/locale/calendar-summary-dialog.dtd">
%summaryDialogDTD;
]>
<?xul-overlay href="chrome://exchangecalendar/content/attachments-view.xul"?>
......@@ -45,7 +47,7 @@
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<dialog id="calendar-summary-dialog" windowtype="Calendar:EventSummaryDialog"
buttons="accept,cancel" buttonlabelextra1="Forward invite"
buttons="accept,cancel" buttonlabelextra1="&forward.invite.label;"
ondialogextra1="tmpEventSummaryDialog.onForward();" persist="screenX screenY width height"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
......@@ -87,7 +89,7 @@
<box id="item-attendees" hidden="true" orient="vertical">
<spacer id="required-attendee-spacer" class="default-spacer" hidden="true"/>
<calendar-caption id="required-attendee-caption" label="Required Attendee"
<calendar-caption id="required-attendee-caption" label="&required.attendee.label;"
control="item-required-attendee-listbox" hidden="true"/>
<box orient="horizontal" id="item-required-attendee" hidden="true">
<spacer class="default-spacer"/>
......@@ -104,7 +106,7 @@
</box>
<spacer id="optional-attendee-spacer" class="default-spacer" hidden="true"/>
<calendar-caption id="optional-attendee-caption" label="Optional Attendee"
<calendar-caption id="optional-attendee-caption" label="&optional.attendee.label;"
control="item-optional-attendee-listbox" hidden="true"/>
<box orient="horizontal" id="item-optional-attendee" hidden="true">
<spacer class="default-spacer"/>
......