Commit b0004b3b authored by Mechtilde's avatar Mechtilde

New upstream version 4.0.0~beta1

parent 6ea3e685
......@@ -66,7 +66,7 @@
completedefaultindex="true"
forcecomplete="true"
minresultsforpopup="1"
onblur="if (this.localName == 'textbox') document.getBindingParent(this).onBlurInput(event);"
onblur="if (this.localName === 'textbox') document.getBindingParent(this).onBlurInput(event);"
ignoreblurwhilesearching="true"
oninput="this.setAttribute('dirty', 'true');">
</xul:textbox>
......@@ -138,7 +138,7 @@
numRowsAdded++;
}
}
if (numRowsAdded == 0) {
if (numRowsAdded === 0) {
this.appendAttendee(null, listbox, template, false);
}
......
This diff is collapsed.
......@@ -48,8 +48,11 @@
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"/>
<!-- Override default attendees command for Options menu -->
<command id="cmd_attendees"
oncommand="exchWebService.eventDialog.editAttendees();"/>
oncommand="exchToolsEventDialog.editAttendees();"/>
<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;"/>
......@@ -57,49 +60,7 @@
</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"/>
<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"/>
<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>
<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);"/>
<menulist id="item-calendar" oncommand="exchToolsEventDialog.selectedCalendarChanged(this);"/>
</hbox>
</row>
<separator id="exchWebService-details-separator" hidden="true" class="groove" insertafter="event-grid-todo-status-row"/>
......@@ -138,11 +99,11 @@
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"
<itemBodyEditor id="exchWebService-body-editor"
flex="1"
insertafter="item-description"
disable-on-readonly="true"/>
</tabpanel>
</tabpanel>
</tabpanels>
</tabbox>
</overlay>
\ No newline at end of file
</overlay>
......@@ -445,7 +445,7 @@
accesskey="&event.menu.options.accesskey;">
<menupopup id="options-menupopup"
onpopupshowing="onPopupShowing(this)">
<menuitem id="options-attendess-menuitem"
<menuitem id="options-attendees-menuitem"
label="&event.menu.options.attendees.label;"
accesskey="&event.menu.options.attendees.accesskey;"
command="cmd_attendees"
......
......@@ -208,18 +208,16 @@ function msgHdrGetTags (aMsgHdr) {
function msgHdrSetTags (aMsgHdr, aTags) {
let oldTagList = msgHdrGetTags(aMsgHdr);
let oldTags = {}; // hashmap
for each (let [, tag] in Iterator(oldTagList))
for (let tag of oldTagList)
oldTags[tag.key] = null;
let newTags = {};
let newTagList = aTags;
for each (let [, tag] in Iterator(newTagList))
for (let tag of newTagList)
newTags[tag.key] = null;
let toAdd = [x.key for each ([, x] in Iterator(newTagList))
if (!(x.key in oldTags))];
let toRemove = [x.key for each ([, x] in Iterator(oldTagList))
if (!(x.key in newTags))];
let toAdd = newTagList.filter( tag => !(tag.key in oldTags));
let toRemove = oldTagList.filter( tag => !(tag.key in newTags));
let folder = aMsgHdr.folder;
let msgHdr = toXPCOMArray([aMsgHdr], Ci.nsIMutableArray);
......
/* ***** 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.
*
* -- Global Functions for Exchange Calendar and Exchange Contacts.
* -- For Thunderbird.
*
* Author: Michel Verbraak (info@1st-setup.nl)
* Website: http://www.1st-setup.nl/wordpress/?page_id=133
* email: info@1st-setup.nl
*
*
* ***** BEGIN LICENSE BLOCK *****/
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
var Cr = Components.results;
var components = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource:///modules/Services.jsm");
Cu.import("resource://exchangecalendar/ecFunctions.js");
var EXPORTED_SYMBOLS = [];
if (! exchWebService) var exchWebService = {};
exchWebService.accountFunctions = {
prefs: Cc["@mozilla.org/preferences-service;1"]
.getService(Ci.nsIPrefService)
.getBranch("extensions.exchangeWebServices.accounts."),
logInfo: function _logInfo(message)
{
exchWebService.commonFunctions.LOG("[exchWebService.accountFunctions] "+message + " ("+exchWebService.commonFunctions.STACKshort()+")");
},
getAccountIds: function _getAccountIds()
{
var ids = exchWebService.commonFunctions.safeGetCharPref(this.prefs, "ids", "");
this.logInfo("ids:"+ids);
return ids.split(",");
},
getAccounts: function _getAccounts()
{
var result = {};
var ids = this.getAccountIds()
for (var index in ids) {
if (ids[index] != "") {
this.logInfo("id:"+ids[index]);
result[ids[index]] = {};
this.getAccountById(ids[index], result[ids[index]]);
}
}
return result;
},
getAccountById: function _getAccountById(aId, aAccount)
{
var result = false;
this.logInfo("id:"+aId);
var children = this.prefs.getChildList(aId+".",{});
if (children.length > 0) {
result = true;
aAccount["id"] = aId;
for (var index in children) {
var attribute = children[index].substr(children[index].indexOf(".")+1);
switch (this.prefs.getPrefType(children[index])) {
case this.prefs.PREF_STRING:
aAccount[attribute] = this.prefs.getCharPref(children[index]);
break;
case this.prefs.PREF_INT:
aAccount[attribute] = this.prefs.getIntPref(children[index]);
break;
case this.prefs.PREF_BOOL:
aAccount[attribute] = this.prefs.getBoolPref(children[index]);
break;
}
}
}
return result;
},
getAccountByServer: function _getAccountByServer(aServer)
{
var accounts = this.getAccounts();
var account = null;
for (var index in accounts) {
if ((accounts[index].server) && (accounts[index].server.toLowerCase() == aServer.toLowerCase())) {
return accounts[index];
}
}
},
saveAccount: function _saveAccount(aAccount)
{
for (var index in aAccount) {
switch (typeof(aAccount[index])) {
case "string":
this.prefs.setCharPref(aAccount.id+"."+index, aAccount[index]);
break;
case "number":
this.prefs.setIntPref(aAccount.id+"."+index, aAccount[index]);
break;
default:
this.logInfo("Unknown object index:"+index);
}
}
// Check if the ids all ready exists. If not add it.
var ids = this.getAccountIds();
var idExists = false;
for (var index in ids) {
if (ids[index] == aAccount.id) {
idExists = true;
break;
}
}
if (!idExists) {
ids.push(aAccount.id);
ids = ids.join(",");
this.prefs.setCharPref("ids", ids);
}
},
removeAccount: function _removeAccount(aAccount)
{
if (aAccount.id) {
this.removeAccountById(aAccount.id);
}
},
removeAccountById: function _removeAccountById(aAccountId)
{
this.prefs.deleteBranch(aAccountId);
// Remove from ids list.
var oldIds = this.getAccountIds();
var newIds = [];
for (var index in oldIds) {
if (oldIds[index] != aAccountId) {
newIds.push(oldIds[index]);
}
}
if (newIds.length > 0) {
newIds = newIds.join(",");
}
else {
newIds = "";
}
this.prefs.setCharPref("ids", newIds);
},
}
This diff is collapsed.
......@@ -5,13 +5,13 @@
<Description about="urn:mozilla:install-manifest">
<em:id>exchangecalendar@extensions.1st-setup.nl</em:id>
<em:version>3.9.0</em:version>
<em:version>4.0.0-beta1</em:version>
<em:targetApplication>
<Description>
<!-- Thunderbird -->
<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
<em:minVersion>12.0</em:minVersion>
<em:maxVersion>50.*</em:maxVersion>
<em:maxVersion>52.*</em:maxVersion>
</Description>
</em:targetApplication>
......@@ -20,7 +20,7 @@
<!-- Seamonkey -->
<em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
<em:minVersion>2.6</em:minVersion>
<em:maxVersion>2.26.*</em:maxVersion>
<em:maxVersion>2.46.*</em:maxVersion>
</Description>
</em:targetApplication>
......
......@@ -5570,8 +5570,10 @@ if (this.debug) this.logInfo(" ;;;; rrule:"+rrule.icalProperty.icalString);
var proposeEnd = this.tryToSetDateValue(input.proposeEnd,"");
var proposeNewTime = false;
input.proposeStart = cal.toRFC3339(proposeStart.getInTimezone(this.globalFunctions.ecUTC()));
input.proposeEnd = cal.toRFC3339(proposeEnd.getInTimezone( this.globalFunctions.ecUTC()));
if (proposeStart)
input.proposeStart = cal.toRFC3339(proposeStart.getInTimezone(this.globalFunctions.ecUTC()));
if (proposeEnd)
input.proposeEnd = cal.toRFC3339(proposeEnd.getInTimezone( this.globalFunctions.ecUTC()));
if( input.proposeStart && input.proposeEnd ){
proposeNewTime = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment