Bug 1280898 - Set up eslint for calendar files - enable padded-blocks rule. r=MakeMyDay
MozReview-Commit-ID: 5lyblIK0it5 --HG-- extra : rebase_source : 963e8a1edfff0b73fb16ac0491278ef357a96ea6
This commit is contained in:
Родитель
6d37371b02
Коммит
a023193056
|
@ -162,6 +162,9 @@
|
|||
// single line of code to have only one easily predictable effect.
|
||||
"no-return-assign": 2,
|
||||
|
||||
// Disallow padding within blocks.
|
||||
"padded-blocks": [2, "never"],
|
||||
|
||||
// Will enable these rules later
|
||||
"block-spacing": 0,
|
||||
"no-lonely-if": 0,
|
||||
|
|
|
@ -1130,7 +1130,6 @@ var gEventTimer;
|
|||
* is current.
|
||||
*/
|
||||
function scheduleNextCurrentEventUpdate(aRefreshCallback, aMsUntil) {
|
||||
|
||||
// Is an nsITimer/callback extreme overkill here? Yes, but it's necessary to
|
||||
// workaround bug 291386. If we don't, we stand a decent chance of getting
|
||||
// stuck in an infinite loop.
|
||||
|
|
|
@ -79,7 +79,6 @@
|
|||
},
|
||||
|
||||
onAddItem: function onAddItem(aItem) {
|
||||
|
||||
if (cal.isToDo(aItem)) {
|
||||
if (!aItem.entryDate && !aItem.dueDate) {
|
||||
return;
|
||||
|
@ -102,7 +101,6 @@
|
|||
},
|
||||
|
||||
onModifyItem: function onModifyItem(aNewItem, aOldItem) {
|
||||
|
||||
if (cal.isToDo(aNewItem) && cal.isToDo(aOldItem) &&
|
||||
!this.calView.mTasksInView) {
|
||||
return;
|
||||
|
@ -135,7 +133,6 @@
|
|||
},
|
||||
|
||||
onDeleteItem: function onDeleteItem(aItem) {
|
||||
|
||||
if (cal.isToDo(aItem)) {
|
||||
if (!this.calView.mTasksInView) {
|
||||
return;
|
||||
|
|
|
@ -92,7 +92,6 @@ function setDefaultItemValues(aItem, aCalendar=null, aStartDate=null, aEndDate=n
|
|||
|
||||
// Free/busy status is only valid for events, must not be set for tasks.
|
||||
aItem.setProperty("TRANSP", cal.getEventDefaultTransparency(aForceAllday));
|
||||
|
||||
} else if (cal.isToDo(aItem)) {
|
||||
let now = cal.now();
|
||||
let initDate = initialDate ? initialDate.clone() : now;
|
||||
|
|
|
@ -413,7 +413,6 @@ var calendarOfflineManager = {
|
|||
|
||||
isOnline: function cOM_isOnline() {
|
||||
return (!Services.io.offline);
|
||||
|
||||
},
|
||||
|
||||
updateOfflineUI: function cOM_updateOfflineUI(aIsOffline) {
|
||||
|
|
|
@ -684,7 +684,6 @@
|
|||
this.mViewEnd.compare(viewEnd) != 0 ||
|
||||
this.mViewStart.compare(viewStart) != 0 ||
|
||||
this.mToggleStatus != toggleStatus) {
|
||||
|
||||
this.refresh();
|
||||
}
|
||||
|
||||
|
|
|
@ -726,7 +726,6 @@
|
|||
let spanTotal = 0;
|
||||
|
||||
for (let layer of this.mEventMap) {
|
||||
|
||||
// The event-map (this.mEventMap) contains an array of layers.
|
||||
// For each layer we create a box below the stack just created above.
|
||||
// So each different layer lives in a box that's contained in the stack.
|
||||
|
@ -786,7 +785,6 @@
|
|||
// hidden for tasks with only entry date OR due date.
|
||||
if ((chunk.event.entryDate || !chunk.event.dueDate) &&
|
||||
(!chunk.event.entryDate || chunk.event.dueDate)) {
|
||||
|
||||
let startGripVisible = (chunk.event.startDate || chunk.event.entryDate)
|
||||
.compare(chunk.startDate) == 0;
|
||||
let endGripVisible = (chunk.event.endDate || chunk.event.dueDate)
|
||||
|
@ -1122,12 +1120,10 @@
|
|||
// When we start a new blob, move to a new set of layers
|
||||
var layerOffset = 0;
|
||||
for (var glob of aBlobs) {
|
||||
|
||||
var layerArray = [];
|
||||
var layerCounter = 1;
|
||||
|
||||
for (var data of glob.blob) {
|
||||
|
||||
// from the item at hand we need to figure out on which
|
||||
// layer and on which column it should go.
|
||||
var layerIndex;
|
||||
|
@ -1451,7 +1447,6 @@
|
|||
event.clientX > (event.target.boxObject.x + event.target.boxObject.width) ||
|
||||
event.clientY < (event.target.boxObject.y) ||
|
||||
event.clientY > (event.target.boxObject.y + event.target.boxObject.height)) {
|
||||
|
||||
// Remove the drag state
|
||||
for (let column = firstCol, i = firstIndex;
|
||||
column && i < col.mDragState.shadows;
|
||||
|
@ -1865,7 +1860,6 @@
|
|||
// update drag labels
|
||||
let lastCol = this.firstLastShadowColumns().lastCol;
|
||||
this.updateDragLabels(this, lastCol);
|
||||
|
||||
} else if (aGrabbedElement == "end") {
|
||||
this.mDragState.dragType = "modify-end";
|
||||
// we have to use "realStart" as fixed end value
|
||||
|
@ -1888,7 +1882,6 @@
|
|||
// update drag labels
|
||||
let firstCol = this.firstLastShadowColumns().firstCol;
|
||||
this.updateDragLabels(firstCol, this);
|
||||
|
||||
} else if (aGrabbedElement == "middle") {
|
||||
this.mDragState.dragType = "move";
|
||||
// in a move, origMin will be the start minute of the element where
|
||||
|
@ -1998,8 +1991,7 @@
|
|||
throw Components.results.NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
if (this.mDayStartMin != aDayStartMin ||
|
||||
this.mDayEndMin != aDayEndMin) {
|
||||
|
||||
this.mDayEndMin != aDayEndMin) {
|
||||
this.mDayStartMin = aDayStartMin;
|
||||
this.mDayEndMin = aDayEndMin;
|
||||
}
|
||||
|
@ -2197,7 +2189,6 @@
|
|||
if (aItem && (itemBox.occurrence.hashId == aItem.hashId)) {
|
||||
itemBox.selected = true;
|
||||
}
|
||||
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
|
@ -2916,10 +2907,8 @@
|
|||
this.mViewEnd.compare(viewEnd) != 0 ||
|
||||
this.mViewStart.compare(viewStart) != 0 ||
|
||||
this.mToggleStatus != toggleStatus) {
|
||||
|
||||
this.refresh();
|
||||
}
|
||||
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
|
@ -3800,8 +3789,7 @@
|
|||
throw Components.results.NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
if (this.mDayStartMin != aDayStartMin ||
|
||||
this.mDayEndMin != aDayEndMin) {
|
||||
|
||||
this.mDayEndMin != aDayEndMin) {
|
||||
this.mDayStartMin = aDayStartMin;
|
||||
this.mDayEndMin = aDayEndMin;
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ var taskDetailsView = {
|
|||
* its the only function in taskDetailsView.
|
||||
*/
|
||||
onSelect: function tDV_onSelect(event) {
|
||||
|
||||
var dateFormatter =
|
||||
Components.classes["@mozilla.org/calendar/datetime-formatter;1"]
|
||||
.getService(Components.interfaces.calIDateTimeFormatter);
|
||||
|
@ -28,7 +27,6 @@ var taskDetailsView = {
|
|||
var item = document.getElementById("calendar-task-tree").currentTask;
|
||||
if (displayElement("calendar-task-details-container", item != null) &&
|
||||
displayElement("calendar-task-view-splitter", item != null)) {
|
||||
|
||||
displayElement("calendar-task-details-title-row", true);
|
||||
document.getElementById("calendar-task-details-title").textContent =
|
||||
(item.title ? item.title.replace(/\n/g, ' ') : "");
|
||||
|
|
|
@ -147,7 +147,6 @@ function disableElement(aElement) {
|
|||
* @param lockId The ID of the lock to set.
|
||||
*/
|
||||
function disableElementWithLock(elementId, lockId) {
|
||||
|
||||
// unconditionally disable the element.
|
||||
disableElement(elementId);
|
||||
|
||||
|
@ -174,7 +173,6 @@ function disableElementWithLock(elementId, lockId) {
|
|||
* @param lockId The ID of the lock to set.
|
||||
*/
|
||||
function enableElementWithLock(elementId, lockId) {
|
||||
|
||||
var element = document.getElementById(elementId);
|
||||
if (!element) {
|
||||
dump("unable to find " + elementId + "\n");
|
||||
|
|
|
@ -27,7 +27,6 @@ var calendarViewController = {
|
|||
* @see calICalendarViewController
|
||||
*/
|
||||
createNewEvent: function (aCalendar, aStartTime, aEndTime, aForceAllday) {
|
||||
|
||||
// if we're given both times, skip the dialog
|
||||
if (aStartTime && aEndTime && !aStartTime.isDate && !aEndTime.isDate) {
|
||||
let item = cal.createEvent();
|
||||
|
|
|
@ -301,7 +301,6 @@ function removeWidgetFor(aItem, aAlarm) {
|
|||
let widget = nodes[i];
|
||||
if (widget.item && widget.item.hashId == hashId &&
|
||||
widget.alarm && widget.alarm.icalString == aAlarm.icalString) {
|
||||
|
||||
if (widget.selected) {
|
||||
// Advance selection if needed
|
||||
widget.control.selectedItem = widget.previousSibling ||
|
||||
|
|
|
@ -554,11 +554,10 @@ function updateLink() {
|
|||
* setup attendees in event and summary dialog
|
||||
*/
|
||||
function setupAttendees() {
|
||||
|
||||
let attBox = document.getElementById("item-attendees-box");
|
||||
let attBoxRows = attBox.getElementsByClassName("item-attendees-row");
|
||||
if (window.attendees && window.attendees.length > 0) {
|
||||
|
||||
if (window.attendees && window.attendees.length > 0) {
|
||||
// cloning of the template nodes
|
||||
let selector = "#item-attendees-box-template .item-attendees-row";
|
||||
let clonedRow = document.querySelector(selector).cloneNode(false);
|
||||
|
|
|
@ -482,7 +482,6 @@
|
|||
}
|
||||
|
||||
if (abDir != null && abDir.supportsMailingLists) {
|
||||
|
||||
let childNodes = abDir.childNodes;
|
||||
while (childNodes.hasMoreElements()) {
|
||||
let dir = null;
|
||||
|
|
|
@ -184,18 +184,15 @@
|
|||
// grid, sorted by rows first -> iterate the rows that may exist.
|
||||
var row = document.getAnonymousElementByAttribute(this, "anonid", "row");
|
||||
while (row) {
|
||||
|
||||
// now iterater all the child nodes of this row
|
||||
// in order to visit each minimonth in turn.
|
||||
var numChilds = row.childNodes.length - 1;
|
||||
for (var i = 0; i < numChilds; i++) {
|
||||
|
||||
// we now have one of the minimonth controls while 'start'
|
||||
// and 'end' are set to the interval this minimonth shows.
|
||||
var minimonth = row.childNodes[i];
|
||||
minimonth.showMonth(cal.dateTimeToJsDate(start));
|
||||
if (aRecurrenceInfo) {
|
||||
|
||||
// retrieve an array of dates that represents all occurrences
|
||||
// that fall into this time interval [start,end[.
|
||||
// note: the following loop assumes that this array conains
|
||||
|
|
|
@ -249,7 +249,6 @@ function refreshHtml(finishFunc) {
|
|||
*/
|
||||
var closeOnComplete = {
|
||||
onStateChange: function onStateChange(aProgress, aRequest, aStateFlags, aStatus) {
|
||||
|
||||
if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP) {
|
||||
// The request is complete, close the window.
|
||||
document.documentElement.cancelDialog();
|
||||
|
|
|
@ -24,13 +24,11 @@ function onLoad() {
|
|||
// entity needs to immediately terminate the pending modification. in this
|
||||
// case we serialize the item and close the window.
|
||||
if (args.job) {
|
||||
|
||||
// keep this context...
|
||||
var self = this;
|
||||
|
||||
// store the 'finalize'-functor in the provided job-object.
|
||||
args.job.finalize = function finalize() {
|
||||
|
||||
// store any pending modifications...
|
||||
self.onAccept();
|
||||
|
||||
|
|
|
@ -65,7 +65,6 @@ function loadEventsFromFile(aCalendar) {
|
|||
|
||||
if (rv != nsIFilePicker.returnCancel &&
|
||||
fp.file && fp.file.path && fp.file.path.length > 0) {
|
||||
|
||||
let filterIndex = fp.filterIndex;
|
||||
if (fp.filterIndex < 0 || fp.filterIndex > contractids.length) {
|
||||
// For some reason the wrong filter was selected, assume default extension
|
||||
|
|
|
@ -603,7 +603,6 @@
|
|||
aRow,
|
||||
aCol || {},
|
||||
{});
|
||||
|
||||
} else {
|
||||
// Otherwise, we can try to get the context calendar from the popupNode.
|
||||
if (document.popupNode && document.popupNode.contextCalendar) {
|
||||
|
|
|
@ -38,7 +38,6 @@ cal.auth = {
|
|||
aPassword,
|
||||
aSavePassword,
|
||||
aFixedUsername) {
|
||||
|
||||
if (typeof aUsername != "object" ||
|
||||
typeof aPassword != "object" ||
|
||||
typeof aSavePassword != "object") {
|
||||
|
|
|
@ -375,7 +375,6 @@ Extractor.prototype = {
|
|||
|
||||
if (this.isValidDay(day) && this.isValidMonth(month) &&
|
||||
this.isValidYear(year)) {
|
||||
|
||||
let rev = this.prefixSuffixStartEnd(res, relation, this.email);
|
||||
this.guess(year, month, day, null, null,
|
||||
rev.start, rev.end, rev.pattern, rev.relation, pattern);
|
||||
|
@ -711,7 +710,6 @@ Extractor.prototype = {
|
|||
this.collected[inner].end <= this.collected[outer].end &&
|
||||
!(this.collected[inner].start == this.collected[outer].start &&
|
||||
this.collected[inner].end == this.collected[outer].end)) {
|
||||
|
||||
cal.LOG("[calExtract] " + this.collected[outer].str + " found as well, disgarding " + this.collected[inner].str);
|
||||
this.collected[inner].relation = "notadatetime";
|
||||
}
|
||||
|
|
|
@ -269,7 +269,6 @@ cal.itip = {
|
|||
}
|
||||
}
|
||||
} else if (Components.isSuccessCode(rc)) {
|
||||
|
||||
cal.LOG("iTIP options on: " + actionFunc.method);
|
||||
switch (actionFunc.method) {
|
||||
case "REPLY":
|
||||
|
@ -546,7 +545,6 @@ cal.itip = {
|
|||
* deleted and sends out appropriate iTIP messages.
|
||||
*/
|
||||
checkAndSend: function cal_itip_checkAndSend(aOpType, aItem, aOriginalItem) {
|
||||
|
||||
// balance out parts of the modification vs delete confusion, deletion of occurrences
|
||||
// are notified as parent modifications and modifications of occurrences are notified
|
||||
// as mixed new-occurrence, old-parent (IIRC).
|
||||
|
@ -565,7 +563,6 @@ cal.itip = {
|
|||
let clonedItem = aItem.clone();
|
||||
let exdates = [];
|
||||
for (let ritem of clonedItem.recurrenceInfo.getRecurrenceItems({})) {
|
||||
|
||||
let wrappedRItem = cal.wrapInstance(ritem, Components.interfaces.calIRecurrenceDate);
|
||||
if (ritem.isNegative &&
|
||||
wrappedRItem &&
|
||||
|
@ -674,7 +671,6 @@ cal.itip = {
|
|||
// special handling for invitation with event status cancelled
|
||||
if (aItem.getAttendees({}).length > 0 &&
|
||||
aItem.getProperty("STATUS") == "CANCELLED") {
|
||||
|
||||
if (cal.itip.getSequence(aItem) > 0) {
|
||||
// make sure we send a cancellation and not an request
|
||||
aOpType = Components.interfaces.calIOperationListener.DELETE;
|
||||
|
@ -721,13 +717,11 @@ cal.itip = {
|
|||
let sendOut = true;
|
||||
// Check to see if some part of the item was updated, if so, re-send REQUEST
|
||||
if (!aOriginalItem || (cal.itip.compare(aItem, aOriginalItem) > 0)) { // REQUEST
|
||||
|
||||
// check whether it's a simple UPDATE (no SEQUENCE change) or real (RE)REQUEST,
|
||||
// in case of time or location/description change.
|
||||
let isMinorUpdate = (aOriginalItem && (cal.itip.getSequence(aItem) == cal.itip.getSequence(aOriginalItem)));
|
||||
|
||||
if (!isMinorUpdate || !cal.compareItemContent(stripUserData(aItem), stripUserData(aOriginalItem))) {
|
||||
|
||||
let requestItem = aItem.clone();
|
||||
if (!requestItem.organizer) {
|
||||
requestItem.organizer = createOrganizer(requestItem.calendar);
|
||||
|
@ -766,7 +760,6 @@ cal.itip = {
|
|||
if (recipients.length > 0) {
|
||||
sendOut = sendMessage(requestItem, "REQUEST", recipients, autoResponse);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -848,7 +841,6 @@ cal.itip = {
|
|||
* @param aProps List of properties to be different in the new itipItem
|
||||
*/
|
||||
getModifiedItipItem: function cal_getModifiedItipItem(aItipItem, aItems, aProps) {
|
||||
|
||||
let itipItem = Components.classes["@mozilla.org/calendar/itip-item;1"]
|
||||
.createInstance(Components.interfaces.calIItipItem);
|
||||
let serializedItems = "";
|
||||
|
@ -877,7 +869,6 @@ cal.itip = {
|
|||
* @param itipItemItem received iTIP item
|
||||
*/
|
||||
function setReceivedInfo(item, itipItemItem) {
|
||||
|
||||
let wrappedItem = cal.wrapInstance(item, Components.interfaces.calIAttendee);
|
||||
item.setProperty(wrappedItem ? "RECEIVED-SEQUENCE"
|
||||
: "X-MOZ-RECEIVED-SEQUENCE",
|
||||
|
@ -1359,7 +1350,6 @@ ItipItemFinder.prototype = {
|
|||
if (foundAttendee.participationStatus == "NEEDS-ACTION" &&
|
||||
(item.calendar.getProperty("itip.disableRevisionChecks") ||
|
||||
cal.itip.compare(itipItemItem, item) == 0)) {
|
||||
|
||||
actionMethod = "REQUEST:NEEDS-ACTION";
|
||||
operations.push(function(opListener, partStat) {
|
||||
let changedItem = firstFoundItem.clone();
|
||||
|
@ -1375,7 +1365,6 @@ ItipItemFinder.prototype = {
|
|||
});
|
||||
} else if (item.calendar.getProperty("itip.disableRevisionChecks") ||
|
||||
cal.itip.compare(itipItemItem, item) > 0) {
|
||||
|
||||
addScheduleAgentClient(newItem, item.calendar);
|
||||
|
||||
let isMinorUpdate = (cal.itip.getSequence(newItem) ==
|
||||
|
|
|
@ -255,7 +255,6 @@ cal.getEmailIdentityOfCalendar = function calGetEmailIdentityOfCalendar(aCalenda
|
|||
}
|
||||
return identity;
|
||||
} else { // take default account/identity:
|
||||
|
||||
let accounts = MailServices.accounts.accounts;
|
||||
let account = null;
|
||||
let identity = null;
|
||||
|
@ -304,7 +303,6 @@ cal.getEmailIdentityOfCalendar = function calGetEmailIdentityOfCalendar(aCalenda
|
|||
* @return A calIDateTime object
|
||||
*/
|
||||
cal.fromRFC3339 = function fromRFC3339(aStr, aTimezone) {
|
||||
|
||||
// XXX I have not covered leapseconds (matches[8]), this might need to
|
||||
// be done. The only reference to leap seconds I found is bug 227329.
|
||||
//
|
||||
|
@ -341,14 +339,12 @@ cal.fromRFC3339 = function fromRFC3339(aStr, aTimezone) {
|
|||
// If the dates timezone is "Z" or "z", then this is UTC, no matter
|
||||
// what timezone was passed
|
||||
dateTime.timezone = cal.UTC();
|
||||
|
||||
} else if (matches[9] == null) {
|
||||
// We have no timezone info, only a date. We have no way to
|
||||
// know what timezone we are in, so lets assume we are in the
|
||||
// timezone of our local calendar, or whatever was passed.
|
||||
|
||||
dateTime.timezone = aTimezone;
|
||||
|
||||
} else {
|
||||
let offset_in_s = (matches[11] == "-" ? -1 : 1) *
|
||||
( (matches[12] * 3600) + (matches[13] * 60) );
|
||||
|
@ -392,7 +388,6 @@ cal.fromRFC3339 = function fromRFC3339(aStr, aTimezone) {
|
|||
* @return The RFC3339 compliant date string
|
||||
*/
|
||||
cal.toRFC3339 = function toRFC3339(aDateTime) {
|
||||
|
||||
if (!aDateTime) {
|
||||
return "";
|
||||
}
|
||||
|
@ -641,7 +636,6 @@ cal.ProviderBase.prototype = {
|
|||
cal.ERROR(exc);
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
notifyOperationComplete: function cPB_notifyOperationComplete(aListener,
|
||||
|
|
|
@ -111,7 +111,6 @@ function recurrenceRule2String(recurrenceInfo, startDate, endDate, allDay) {
|
|||
weeklyString = getRString(weeklyString, [weekdays]);
|
||||
ruleString = PluralForm.get(rule.interval, weeklyString)
|
||||
.replace("#2", rule.interval);
|
||||
|
||||
} else {
|
||||
let weeklyString = getRString("weeklyEveryNth");
|
||||
ruleString = PluralForm.get(rule.interval, weeklyString)
|
||||
|
|
|
@ -638,7 +638,6 @@ calAlarm.prototype = {
|
|||
let formatDate = this.mAbsoluteDate.getInTimezone(cal.calendarDefaultTimezone());
|
||||
return formatter.formatDateTime(formatDate);
|
||||
} else if (this.related != ALARM_RELATED_ABSOLUTE && this.mOffset) {
|
||||
|
||||
// Relative alarm length
|
||||
let alarmlen = Math.abs(this.mOffset.inSeconds / 60);
|
||||
if (alarmlen == 0) {
|
||||
|
|
|
@ -338,7 +338,6 @@ calAlarmService.prototype = {
|
|||
let snoozeDate;
|
||||
if (aItem.parentItem != aItem) {
|
||||
snoozeDate = aItem.parentItem.getProperty("X-MOZ-SNOOZE-TIME-" + aItem.recurrenceId.nativeTime)
|
||||
|
||||
} else {
|
||||
snoozeDate = aItem.getProperty("X-MOZ-SNOOZE-TIME");
|
||||
}
|
||||
|
@ -447,7 +446,7 @@ calAlarmService.prototype = {
|
|||
aItem.hashId in this.mTimerMap[aItem.calendar.id] &&
|
||||
/* ...and is the alarm in the item map ? */
|
||||
aAlarm.icalString in this.mTimerMap[aItem.calendar.id][aItem.hashId]) {
|
||||
|
||||
// First cancel the existing timer
|
||||
let timer = this.mTimerMap[aItem.calendar.id][aItem.hashId][aAlarm.icalString];
|
||||
timer.cancel();
|
||||
|
||||
|
|
|
@ -315,7 +315,6 @@ calCalendarManager.prototype = {
|
|||
}
|
||||
Preferences.set("calendar.list.sortOrder", sortOrderAr.join(" "));
|
||||
flushPrefs();
|
||||
|
||||
} finally {
|
||||
selectPrefs.reset();
|
||||
selectCalendars.reset();
|
||||
|
@ -911,7 +910,6 @@ calMgrCalendarObserver.prototype = {
|
|||
|
||||
// Error announcer specific functions
|
||||
announceError: function(aCalendar, aErrNo, aMessage) {
|
||||
|
||||
var paramBlock = Components.classes["@mozilla.org/embedcomp/dialogparam;1"]
|
||||
.createInstance(Components.interfaces.nsIDialogParamBlock);
|
||||
var props = Services.strings.createBundle("chrome://calendar/locale/calendar.properties");
|
||||
|
|
|
@ -118,7 +118,6 @@ calTransaction.prototype = {
|
|||
aId,
|
||||
aDetail) {
|
||||
if (Components.isSuccessCode(aStatus)) {
|
||||
|
||||
cal.itip.checkAndSend(aOperationType,
|
||||
aDetail,
|
||||
this.mIsDoTransaction ? this.mOldItem : this.mItem);
|
||||
|
|
|
@ -1804,7 +1804,6 @@ function binaryInsertNode(parentNode, insertNode, aItem, comptor, discardDuplica
|
|||
newIndex = 0;
|
||||
} else if (!discardDuplicates ||
|
||||
comptor(accessor(parentNode.childNodes[Math.min(newIndex, parentNode.childNodes.length - 1)]), aItem) >= 0) {
|
||||
|
||||
// Only add the node if duplicates should not be discarded, or if
|
||||
// they should and the childNode[newIndex] == node.
|
||||
let node = parentNode.childNodes[newIndex];
|
||||
|
|
|
@ -363,7 +363,6 @@ calOutlookCSVImporter.prototype = {
|
|||
|
||||
// get next events fields
|
||||
eventFields = eventRegExp.exec(str);
|
||||
|
||||
} while (eventRegExp.lastIndex != 0);
|
||||
|
||||
// return results
|
||||
|
|
|
@ -63,7 +63,6 @@ calWeekPrinter.prototype = {
|
|||
let boxDate = itemStartDate.clone();
|
||||
boxDate.isDate = true;
|
||||
for (boxDate; boxDate.compare(itemEndDate) < (itemEndDate.isDate ? 0 : 1); boxDate.day++) {
|
||||
|
||||
// Ignore items outside of the range, i.e tasks without start date
|
||||
// where the end date is somewhere else.
|
||||
if (aStart && aEnd && boxDate &&
|
||||
|
|
|
@ -280,7 +280,6 @@ var ltnImipBar = {
|
|||
},
|
||||
|
||||
executeAction: function ltnExecAction(partStat, extendResponse) {
|
||||
|
||||
function _execAction(aActionFunc, aItipItem, aWindow, aPartStat) {
|
||||
if (cal.itip.promptCalendar(aActionFunc.method, aItipItem, aWindow)) {
|
||||
// filter out fake partstats
|
||||
|
|
|
@ -607,7 +607,6 @@ function loadDialog(aItem) {
|
|||
!(attachment.hashId in gAttachMap) &&
|
||||
// We currently only support uri attachments.
|
||||
attachment.uri) {
|
||||
|
||||
itemProps.initialAttachments[attachment.hashId] = attachment;
|
||||
|
||||
// XXX eventually we probably need to call addAttachment(attachment)
|
||||
|
@ -1918,7 +1917,6 @@ function loadCloudProviders() {
|
|||
let itemObjects = [];
|
||||
|
||||
for (let [, cloudProvider] in Iterator(cloudFileAccounts.accounts)) {
|
||||
|
||||
// Create a serializable object to pass in a message outside the iframe
|
||||
let itemObject = {};
|
||||
itemObject.displayName = cloudFileAccounts.getDisplayName(cloudProvider);
|
||||
|
@ -1966,7 +1964,6 @@ function attachURL() {
|
|||
result,
|
||||
null,
|
||||
{ value: 0 })) {
|
||||
|
||||
try {
|
||||
// If something bogus was entered, makeURL may fail.
|
||||
var attachment = createAttachment();
|
||||
|
@ -3018,7 +3015,6 @@ function onCommandSave(aIsClosing) {
|
|||
// the above item if we are not closing, otherwise the listener will be
|
||||
// missing its window afterwards.
|
||||
window.onAcceptCallback(item, calendar, originalItem, !aIsClosing && listener);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3488,7 +3484,6 @@ function showOrHideItemURL(aShow, aUrl) {
|
|||
// and there is an external app for the scheme
|
||||
handler = cal.wrapInstance(handler, Components.interfaces.nsIExternalProtocolHandler);
|
||||
return !handler || handler.externalAppExistsForScheme(uri.scheme);
|
||||
|
||||
} else {
|
||||
// Hide if there is no url, or the menuitem was chosen so that the url
|
||||
// should be hidden.
|
||||
|
@ -3503,7 +3498,6 @@ function showOrHideItemURL(aShow, aUrl) {
|
|||
* @param {string} aUrl The url
|
||||
*/
|
||||
function updateItemURL(aShow, aUrl) {
|
||||
|
||||
// Hide or show the link
|
||||
setElementValue("event-grid-link-row", !aShow && "true", "hidden");
|
||||
// The separator is not there in the summary dialog
|
||||
|
|
|
@ -218,7 +218,6 @@ function onLoadLightningItemPanel(aIframeId, aUrl) {
|
|||
|
||||
// Add a listener to detect close events, prompt user about saving changes.
|
||||
window.addEventListener("close", windowCloseListener, false);
|
||||
|
||||
} else {
|
||||
// window dialog case
|
||||
iframe = document.createElement("iframe");
|
||||
|
@ -910,7 +909,6 @@ function onCommandViewToolbar(aToolbarId, aMenuItemId) {
|
|||
* @param {boolean} aToolboxChanged When true the toolbox has changed
|
||||
*/
|
||||
function dialogToolboxCustomizeDone(aToolboxChanged) {
|
||||
|
||||
// Re-enable menu items (disabled during toolbar customization).
|
||||
let menubarId = gTabmail ? "mail-menubar" : "event-menubar";
|
||||
let menubar = document.getElementById(menubarId);
|
||||
|
@ -969,7 +967,6 @@ function onCommandCustomize() {
|
|||
* data to create a menuitem
|
||||
*/
|
||||
function loadCloudProviders(aItemObjects) {
|
||||
|
||||
/**
|
||||
* Deletes any existing menu items in aParentNode that have a
|
||||
* cloudProviderAccountKey attribute.
|
||||
|
@ -997,7 +994,6 @@ function loadCloudProviders(aItemObjects) {
|
|||
}
|
||||
|
||||
for (let itemObject of aItemObjects) {
|
||||
|
||||
// Create a menu item.
|
||||
let item = createXULElement("menuitem");
|
||||
item.setAttribute("label", itemObject.label);
|
||||
|
|
|
@ -294,7 +294,6 @@ var calendarItemTabType = {
|
|||
// functionality), thus we confirm we have the expected values.
|
||||
if (args && args.calendar && args.calendar.id &&
|
||||
args.calendarEvent && args.calendarEvent.id) {
|
||||
|
||||
let calendarId = args.calendar.id;
|
||||
let itemId = args.calendarEvent.id;
|
||||
// Handle null args.initialStartDateValue, just for good measure.
|
||||
|
@ -355,7 +354,6 @@ window.addEventListener("load", function(e) {
|
|||
|
||||
|
||||
function ltnOnLoad(event) {
|
||||
|
||||
// nuke the onload, or we get called every time there's
|
||||
// any load that occurs
|
||||
window.removeEventListener("load", ltnOnLoad, false);
|
||||
|
@ -558,7 +556,6 @@ function refreshUIBits() {
|
|||
|
||||
// update today's date on todaypane button
|
||||
document.getElementById("calendar-status-todaypane-button").setUpTodayDate();
|
||||
|
||||
} catch (exc) {
|
||||
ASSERT(false, exc);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,6 @@ var ltnSuiteUtils = {
|
|||
Services.obs.addObserver(this.startupObserver, "lightning-startup-done", false);
|
||||
Services.obs.addObserver(this.startupObserver, "calendar-taskview-startup-done",
|
||||
false);
|
||||
|
||||
},
|
||||
|
||||
startupObserver: {
|
||||
|
@ -40,7 +39,6 @@ var ltnSuiteUtils = {
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ltnSuiteUtils.addStartupObserver();
|
||||
|
|
|
@ -1162,7 +1162,6 @@ calDavCalendar.prototype = {
|
|||
let wasInboxItem = this.mItemInfoCache[foundItem.id].isInboxItem;
|
||||
if ((wasInboxItem && this.isInbox(path)) ||
|
||||
(wasInboxItem === false && !this.isInbox(path))) {
|
||||
|
||||
cal.LOG("CalDAV: deleting item: " + path + ", uid: " + foundItem.id);
|
||||
delete this.mHrefIndex[path];
|
||||
delete this.mItemInfoCache[foundItem.id];
|
||||
|
@ -1258,7 +1257,6 @@ calDavCalendar.prototype = {
|
|||
* @param aListener listener for method completion
|
||||
*/
|
||||
getUpdatedItem: function caldav_getUpdatedItem(aItem, aListener, aChangeLogListener) {
|
||||
|
||||
if (aItem == null) {
|
||||
this.notifyOperationComplete(aListener,
|
||||
Components.results.NS_ERROR_FAILURE,
|
||||
|
@ -1449,7 +1447,6 @@ calDavCalendar.prototype = {
|
|||
if (thisCalendar.verboseLogging()) {
|
||||
cal.LOG("CalDAV: ctag mismatch on refresh, fetching data for " +
|
||||
"calendar " + thisCalendar.name);
|
||||
|
||||
}
|
||||
} else {
|
||||
if (thisCalendar.verboseLogging()) {
|
||||
|
@ -1972,7 +1969,6 @@ calDavCalendar.prototype = {
|
|||
cal.LOG("CalDAV: Error getting DAV header for " + thisCalendar.name +
|
||||
", status " + request.responseStatus +
|
||||
", data: " + cal.convertByteArray(aResult, aResultLength));
|
||||
|
||||
}
|
||||
// Google does not yet support OPTIONS but does support scheduling
|
||||
// so we'll spoof the DAV header until Google gets fixed
|
||||
|
@ -2382,7 +2378,6 @@ calDavCalendar.prototype = {
|
|||
return props.formatStringFromName("caldavRequestStatusCode", [ status ], 1) + ", " +
|
||||
statusString + "\n\n" +
|
||||
(extraInfo ? extraInfo : "");
|
||||
|
||||
},
|
||||
|
||||
//
|
||||
|
@ -2390,8 +2385,7 @@ calDavCalendar.prototype = {
|
|||
//
|
||||
|
||||
getFreeBusyIntervals: function caldav_getFreeBusyIntervals(
|
||||
aCalId, aRangeStart, aRangeEnd, aBusyTypes, aListener) {
|
||||
|
||||
aCalId, aRangeStart, aRangeEnd, aBusyTypes, aListener) {
|
||||
// We explicitly don't check for hasScheduling here to allow free-busy queries
|
||||
// even in case sched is turned off.
|
||||
if (!this.outboxUrl || !this.calendarUserAddress) {
|
||||
|
@ -2741,7 +2735,6 @@ calDavCalendar.prototype = {
|
|||
},
|
||||
|
||||
sendItems: function caldav_sendItems(aCount, aRecipients, aItipItem) {
|
||||
|
||||
if (this.hasAutoScheduling) {
|
||||
// If auto scheduling is supported by the server we still need
|
||||
// to send out REPLIES for meetings where the ORGANIZER has the
|
||||
|
@ -2773,7 +2766,6 @@ calDavCalendar.prototype = {
|
|||
}
|
||||
|
||||
for (var item of aItipItem.getItemList({})) {
|
||||
|
||||
var serializer = Components.classes["@mozilla.org/calendar/ics-serializer;1"]
|
||||
.createInstance(Components.interfaces.calIIcsSerializer);
|
||||
serializer.addItems([item], 1);
|
||||
|
@ -2899,7 +2891,6 @@ calDavCalendar.prototype = {
|
|||
|
||||
// nsIChannelEventSink implementation
|
||||
asyncOnChannelRedirect: function caldav_asyncOonChannelRedirect(aOldChannel, aNewChannel, aFlags, aCallback) {
|
||||
|
||||
let uploadData;
|
||||
let uploadContent;
|
||||
if (aOldChannel instanceof Components.interfaces.nsIUploadChannel &&
|
||||
|
|
|
@ -215,7 +215,6 @@ etagsHandler.prototype = {
|
|||
if (this.calendar.verboseLogging()) {
|
||||
this.logXML += "<" + aQName + ">";
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
endElement: function eH_endElement(aUri, aLocalName, aQName) {
|
||||
|
@ -227,7 +226,6 @@ etagsHandler.prototype = {
|
|||
r.href && r.href.length &&
|
||||
r.getcontenttype && r.getcontenttype.length &&
|
||||
!r.isCollection) {
|
||||
|
||||
r.href = this.calendar.ensureDecodedPath(r.href);
|
||||
|
||||
if (r.getcontenttype.substr(0, 14) == "message/rfc822") {
|
||||
|
@ -498,7 +496,6 @@ webDavSyncHandler.prototype = {
|
|||
this.changeLogListener)
|
||||
multiget.doMultiGet();
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
startElement: function wH_startElement(aUri, aLocalName, aQName, aAttributes) {
|
||||
|
@ -531,7 +528,6 @@ webDavSyncHandler.prototype = {
|
|||
if (this.calendar.verboseLogging()) {
|
||||
this.logXML += "<" + aQName + ">";
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
endElement: function wH_endElement(aUri, aLocalName, aQName) {
|
||||
|
@ -888,7 +884,6 @@ multigetSyncHandler.prototype = {
|
|||
if (this.calendar.verboseLogging()) {
|
||||
this.logXML += "<" + aQName + ">";
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
endElement: function mg_endElement(aUri, aLocalName, aQName) {
|
||||
|
|
|
@ -294,7 +294,6 @@ calICSCalendar.prototype = {
|
|||
// the views from being notified.
|
||||
this_.mMemoryCalendar.addObserver(this_.mObserver);
|
||||
this_.unlock();
|
||||
|
||||
}
|
||||
};
|
||||
parser.parseString(str, null, listener);
|
||||
|
|
|
@ -199,7 +199,6 @@ calStorageCalendar.prototype = {
|
|||
this.mDB = Services.storage.openDatabase(fileURL.file);
|
||||
this.mDB.executeSimpleSQL("PRAGMA journal_mode=WAL");
|
||||
upgradeDB(this.mDB);
|
||||
|
||||
} else if (this.uri.schemeIs("moz-profile-calendar")) {
|
||||
// This is an old-style moz-profile-calendar. It requires some
|
||||
// migration steps.
|
||||
|
@ -925,7 +924,6 @@ calStorageCalendar.prototype = {
|
|||
offline_journal_flag == null)) ||
|
||||
(sp.offline_journal != null &&
|
||||
(offline_journal_flag == sp.offline_journal))) {
|
||||
|
||||
count += handleResultItem(todoitem,
|
||||
Components.interfaces.calITodo,
|
||||
checkCompleted);
|
||||
|
@ -945,7 +943,6 @@ calStorageCalendar.prototype = {
|
|||
Components.interfaces.calIOperationListener.GET,
|
||||
null,
|
||||
null);
|
||||
|
||||
},
|
||||
|
||||
getItemOfflineFlag: function cSC_getOfflineJournalFlag(aItem, aListener) {
|
||||
|
@ -997,7 +994,6 @@ calStorageCalendar.prototype = {
|
|||
} finally {
|
||||
this.mEditEventOfflineFlag.reset();
|
||||
}
|
||||
|
||||
} else if (cal.isToDo(aItem)) {
|
||||
this.prepareStatement(this.mEditTodoOfflineFlag);
|
||||
this.mEditTodoOfflineFlag.params.id = aID;
|
||||
|
|
|
@ -744,7 +744,6 @@ upgrade.v3 = function upgrade_v3(db, version) {
|
|||
|
||||
beginTransaction(db);
|
||||
try {
|
||||
|
||||
copyTable(tbl, "cal_items", "cal_events", db, "item_type = 0");
|
||||
copyTable(tbl, "cal_items", "cal_todos", db, "item_type = 1");
|
||||
|
||||
|
@ -1161,7 +1160,6 @@ upgrade.v16 = function upgrade_v16(db, version) {
|
|||
" FROM " + tbl +
|
||||
" WHERE alarm_offset IS NOT NULL" +
|
||||
" OR alarm_time IS NOT NULL;");
|
||||
|
||||
};
|
||||
copyDataOver("cal_events");
|
||||
copyDataOver("cal_todos");
|
||||
|
@ -1258,7 +1256,6 @@ upgrade.v17 = function upgrade_v17(db, version) {
|
|||
"cal_" + tblName,
|
||||
db,
|
||||
true);
|
||||
|
||||
}
|
||||
setDbVersionAndCommit(db, 17);
|
||||
} catch (e) {
|
||||
|
@ -1370,8 +1367,8 @@ upgrade.v21 = function upgrade_v21(db, version) {
|
|||
let tbl = upgrade.v20(version < 20 && db, version);
|
||||
LOGdb(db, "Storage: Upgrading to v21");
|
||||
beginTransaction(db);
|
||||
try {
|
||||
|
||||
try {
|
||||
// The following operation is only important on a live DB, since we are
|
||||
// changing only the values on the DB, not the schema itself.
|
||||
if (db) {
|
||||
|
|
|
@ -211,8 +211,7 @@ calWcapCalendar.prototype = {
|
|||
},
|
||||
|
||||
issueNetworkRequest: function calWcapCalendar_issueNetworkRequest(
|
||||
request, respFunc, dataConvFunc, wcapCommand, params, accessRights) {
|
||||
|
||||
request, respFunc, dataConvFunc, wcapCommand, params, accessRights) {
|
||||
var this_ = this;
|
||||
// - bootstrap problem: no cal_props, no access check, no default calId
|
||||
// - assure being logged in, thus the default cal_props are available
|
||||
|
|
|
@ -350,7 +350,6 @@ function calWcapCalendar_storeItem(bAddItem, item, oldItem, request) {
|
|||
}
|
||||
}
|
||||
} else { // PUBLISH, REQUEST
|
||||
|
||||
// workarounds for server bugs concerning recurrences/exceptions:
|
||||
// - if first occurrence is an exception
|
||||
// and an EXDATE for that occurrence ought to be written,
|
||||
|
@ -733,7 +732,6 @@ function calWcapCalendar_modifyItem(newItem, oldItem, listener) {
|
|||
params, calIWcapCalendar.AC_COMP_WRITE);
|
||||
return request;
|
||||
}
|
||||
|
||||
} else if (oldItem && !oldItem.parentItem.recurrenceInfo.getExceptionFor(newItem.recurrenceId)) {
|
||||
// pass null for oldItem when creating new exceptions, write whole item:
|
||||
oldItem_ = null;
|
||||
|
@ -851,7 +849,6 @@ calWcapCalendar.prototype.parseItems = function calWcapCalendar_parseItems(
|
|||
|
||||
let count = 0;
|
||||
for (let subComp of cal.ical.calendarComponentIterator(icalRootComp, componentType)) {
|
||||
|
||||
let organizer = subComp.getFirstProperty("ORGANIZER");
|
||||
if (organizer && organizer.getParameter("SENT-BY")) { // has SENT-BY
|
||||
// &emailorcalid=1 sets wrong email, workaround setting calid...
|
||||
|
@ -915,7 +912,6 @@ calWcapCalendar.prototype.parseItems = function calWcapCalendar_parseItems(
|
|||
"\nitem.id=" + item.id, this);
|
||||
}
|
||||
excItems.push(item);
|
||||
|
||||
} else if (item.recurrenceInfo) {
|
||||
unexpandedItems.push(item);
|
||||
uid2parent[item.id] = item;
|
||||
|
@ -1015,7 +1011,6 @@ calWcapCalendar.prototype.parseItems = function calWcapCalendar_parseItems(
|
|||
// only proxies returned:
|
||||
items = items.concat(occurrences);
|
||||
}
|
||||
|
||||
} else {
|
||||
if (maxResults != 0 &&
|
||||
(items.length + unexpandedItems.length) > maxResults) {
|
||||
|
@ -1218,7 +1213,6 @@ function calWcapCalendar_getItems(itemFilter, maxResults, rangeStart, rangeEnd,
|
|||
if (listener &&
|
||||
(itemFilter & calICalendar.ITEM_FILTER_TYPE_EVENT) &&
|
||||
rangeStart && rangeEnd) {
|
||||
|
||||
var freeBusyListener = { // calIGenericOperationListener:
|
||||
onResult: function freeBusyListener_onResult(request, result) {
|
||||
if (!Components.isSuccessCode(request.status)) {
|
||||
|
@ -1248,7 +1242,6 @@ function calWcapCalendar_getItems(itemFilter, maxResults, rangeStart, rangeEnd,
|
|||
throw err;
|
||||
}
|
||||
} else if (listener) {
|
||||
|
||||
var items = this_.parseItems(
|
||||
icalRootComp, itemFilter, maxResults,
|
||||
rangeStart, rangeEnd);
|
||||
|
@ -1256,7 +1249,6 @@ function calWcapCalendar_getItems(itemFilter, maxResults, rangeStart, rangeEnd,
|
|||
if (CACHE_LAST_RESULTS > 0) {
|
||||
// auto invalidate after X minutes:
|
||||
if (!this_.m_cachedResultsTimer) {
|
||||
|
||||
var callback = {
|
||||
notify: function notify(timer) {
|
||||
if (!this_.m_cachedResults) {
|
||||
|
|
|
@ -252,7 +252,6 @@ calWcapSession.prototype = {
|
|||
recurrenceBound: 60,
|
||||
|
||||
getSessionId_: function calWcapSession_getSessionId_(request, respFunc) {
|
||||
|
||||
var this_ = this;
|
||||
this.checkServerVersion(
|
||||
request,
|
||||
|
@ -460,7 +459,6 @@ calWcapSession.prototype = {
|
|||
throw new Components.Exception(labelText, calIWcapErrors.WCAP_LOGIN_FAILED);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (exc) {
|
||||
err = exc;
|
||||
}
|
||||
|
@ -500,7 +498,6 @@ calWcapSession.prototype = {
|
|||
if (defaultCal && cals[defaultCal.calId] && // default calendar is registered
|
||||
getPref("calendar.wcap.subscriptions", true) &&
|
||||
!defaultCal.getProperty("subscriptions_registered")) {
|
||||
|
||||
var hasSubscriptions = false;
|
||||
// post register subscribed calendars:
|
||||
var list = this_.getUserPreferences("X-NSCP-WCAP-PREF-icsSubscribed");
|
||||
|
@ -550,7 +547,6 @@ calWcapSession.prototype = {
|
|||
sessionId);
|
||||
this.installServerTimeDiff(sessionId, request);
|
||||
this.installServerTimezones(sessionId, request);
|
||||
|
||||
} finally {
|
||||
request.unlockPending();
|
||||
}
|
||||
|
@ -558,7 +554,6 @@ calWcapSession.prototype = {
|
|||
|
||||
installCalProps_get_calprops:
|
||||
function calWcapSession_installCalProps_get_calprops(respFunc, sessionId, cals, request) {
|
||||
|
||||
var this_ = this;
|
||||
function calprops_resp(err, data) {
|
||||
if (err) {
|
||||
|
@ -592,7 +587,6 @@ calWcapSession.prototype = {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
} catch (exc) { // ignore but log any errors on subscribed calendars:
|
||||
logError(exc, this_);
|
||||
}
|
||||
|
@ -714,8 +708,7 @@ calWcapSession.prototype = {
|
|||
},
|
||||
|
||||
issueNetworkRequest: function calWcapSession_issueNetworkRequest(
|
||||
request, respFunc, dataConvFunc, wcapCommand, params) {
|
||||
|
||||
request, respFunc, dataConvFunc, wcapCommand, params) {
|
||||
var this_ = this;
|
||||
function getSessionId_resp(err, sessionId) {
|
||||
if (err) {
|
||||
|
@ -743,8 +736,7 @@ calWcapSession.prototype = {
|
|||
},
|
||||
|
||||
issueNetworkRequest_: function calWcapSession_issueNetworkRequest_(
|
||||
request, respFunc, dataConvFunc, wcapCommand, params, sessionId) {
|
||||
|
||||
request, respFunc, dataConvFunc, wcapCommand, params, sessionId) {
|
||||
var url = this.getCommandUrl(wcapCommand, params, sessionId);
|
||||
var this_ = this;
|
||||
issueNetworkRequest(request,
|
||||
|
@ -943,7 +935,6 @@ calWcapSession.prototype = {
|
|||
request.execRespFunc(null, ret);
|
||||
},
|
||||
null, "search_calprops", params);
|
||||
|
||||
} catch (exc) {
|
||||
request.execRespFunc(exc);
|
||||
}
|
||||
|
@ -1036,7 +1027,6 @@ calWcapSession.prototype = {
|
|||
}
|
||||
},
|
||||
stringToXml_, "get_freebusy", params);
|
||||
|
||||
} catch (exc) {
|
||||
request.execRespFunc(exc);
|
||||
}
|
||||
|
@ -1068,8 +1058,6 @@ calWcapSession.prototype = {
|
|||
try {
|
||||
// make sure the calendar belongs to this session:
|
||||
if (this.belongsTo(aCalendar)) {
|
||||
|
||||
|
||||
assureDefault("shared_context", this.m_contextId);
|
||||
assureDefault("name", aCalendar.name);
|
||||
|
||||
|
|
|
@ -119,7 +119,6 @@ function publishEntireCalendarDialogResponse(CalendarPublishObject, aProgressDia
|
|||
var oldCalendar = CalendarPublishObject.calendar;
|
||||
oldCalendar.getItems(Components.interfaces.calICalendar.ITEM_FILTER_ALL_ITEMS,
|
||||
0, null, null, getListener);
|
||||
|
||||
}
|
||||
|
||||
function publishItemArray(aItemArray, aPath, aProgressDialog) {
|
||||
|
|
|
@ -376,8 +376,8 @@ var clonePropMap = { "related": Ci.calIAlarm.ALARM_RELATED_END,
|
|||
"offset": createDuration("PT5M"),
|
||||
"repeatOffset": createDuration("PT2M")
|
||||
};
|
||||
function test_immutable() {
|
||||
|
||||
function test_immutable() {
|
||||
dump("Testing immutable alarms...");
|
||||
let alarm = cal.createAlarm();
|
||||
// Set up each attribute
|
||||
|
@ -549,7 +549,6 @@ function test_serialize() {
|
|||
addDuration();
|
||||
alarm.icalComponent = comp;
|
||||
}, /Illegal value/, "Invalid Argument");
|
||||
|
||||
}
|
||||
|
||||
function test_strings() {
|
||||
|
|
|
@ -62,7 +62,6 @@ add_task(function* test_setDefaultValues_events() {
|
|||
Preferences.reset("calendar.alarms.onforevents");
|
||||
Preferences.reset("calendar.alarms.eventalarmunit");
|
||||
Preferences.reset("calendar.alarms.eventalarmlen");
|
||||
|
||||
});
|
||||
|
||||
add_task(function* test_setDefaultValues_tasks() {
|
||||
|
|
|
@ -151,7 +151,6 @@ function test_serialize() {
|
|||
equal(prop.getParameter("PARTSTAT"), "DECLINED");
|
||||
equal(prop.getParameter("CUTYPE"), "RESOURCE");
|
||||
equal(prop.getParameter("X-NAME"), "X-VALUE");
|
||||
|
||||
}
|
||||
|
||||
function test_properties() {
|
||||
|
@ -202,7 +201,6 @@ function test_doubleParameters() {
|
|||
for (let paramName = prop.getFirstParameterName();
|
||||
paramName;
|
||||
paramName = prop.getNextParameterName()) {
|
||||
|
||||
parNames.push(paramName);
|
||||
parValues.push(prop.getParameter(paramName));
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@ function run_test() {
|
|||
storage.addItem(item, { onOperationComplete: checkAddedItem });
|
||||
|
||||
function checkAddedItem(c, s, o, i, addedItem) {
|
||||
|
||||
let seq = addedItem.getProperty("SEQUENCE");
|
||||
let rec = addedItem.recurrenceInfo.getOccurrenceFor(rid);
|
||||
|
||||
|
@ -55,7 +54,6 @@ function run_test() {
|
|||
changedItem2.setProperty("SEQUENCE", parseInt(seq, 10) + 1);
|
||||
|
||||
storage.modifyItem(changedItem2, changedItem, { onOperationComplete: checkNormalItem });
|
||||
|
||||
}
|
||||
|
||||
function checkNormalItem(c, s, o, i, changedItem) {
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
function run_test() {
|
||||
|
||||
// Bug 769938 - dates before 1970 are not handled correctly
|
||||
// due to signed vs. unsigned mismatch in PRTime in xpconnect
|
||||
|
||||
|
|
|
@ -111,7 +111,6 @@ function test_cancel() {
|
|||
let provider = {
|
||||
QueryInterface: XPCOMUtils.generateQI([Components.interfaces.calIFreeBusyProvider, Components.interfaces.calIOperation]),
|
||||
getFreeBusyIntervals: function(aCalId, aStart, aEnd, aTypes, aListener) {
|
||||
|
||||
Services.tm.currentThread.dispatch({run: function() {
|
||||
dump("Cancelling freebusy query...");
|
||||
op.cancel();
|
||||
|
|
|
@ -69,7 +69,6 @@ function test_failures() {
|
|||
parser.parseString(str);
|
||||
equal(parser.getComponents({}).length, 0);
|
||||
equal(parser.getItems({}).length, 0);
|
||||
|
||||
}
|
||||
|
||||
function test_fake_parent() {
|
||||
|
|
|
@ -217,7 +217,6 @@ function test_param() {
|
|||
equal(prop.icalString, "DTSTART;X-FOO=BAR:20120101T010101\r\n");
|
||||
prop.removeParameter("X-FOO", "BAR");
|
||||
equal(prop.icalString, "DTSTART:20120101T010101\r\n");
|
||||
|
||||
}
|
||||
|
||||
function test_iterator() {
|
||||
|
|
|
@ -65,11 +65,9 @@ function test_aclmanager() {
|
|||
e.id = "noentry";
|
||||
e.calendar = mockCalendar;
|
||||
equal(e.aclEntry, null);
|
||||
|
||||
}
|
||||
|
||||
function test_calendar() {
|
||||
|
||||
let e = cal.createEvent();
|
||||
let pe = cal.createEvent();
|
||||
|
||||
|
@ -108,7 +106,6 @@ function test_attachment() {
|
|||
}
|
||||
|
||||
function test_attendee() {
|
||||
|
||||
let e = cal.createEvent();
|
||||
equal(e.getAttendeeById("unknown"), null);
|
||||
equal(e.getAttendees({}).length, 0);
|
||||
|
@ -142,7 +139,6 @@ function test_attendee() {
|
|||
}
|
||||
|
||||
function test_categories() {
|
||||
|
||||
let e = cal.createEvent();
|
||||
|
||||
equal(e.getCategories({}).length, 0);
|
||||
|
@ -190,7 +186,6 @@ function test_alarm() {
|
|||
}
|
||||
|
||||
function test_immutable() {
|
||||
|
||||
let e = cal.createEvent();
|
||||
|
||||
let dt = cal.createDateTime();
|
||||
|
@ -253,7 +248,6 @@ function test_immutable() {
|
|||
}
|
||||
|
||||
function test_lastack() {
|
||||
|
||||
let e = cal.createEvent();
|
||||
|
||||
e.alarmLastAck = cal.createDateTime("20120101T010101");
|
||||
|
|
|
@ -685,7 +685,6 @@ function test_rrule_interface() {
|
|||
}
|
||||
|
||||
function test_startdate_change() {
|
||||
|
||||
// Setting a start date if its missing shouldn't throw
|
||||
let item = makeEvent("DTEND:20020402T124500Z\r\n" +
|
||||
"RRULE:FREQ=DAILY\r\n");
|
||||
|
|
|
@ -60,7 +60,6 @@ function test_found() {
|
|||
|
||||
equal(result.length, 1);
|
||||
equal(result[0].id, "test");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -99,7 +98,6 @@ function test_cancel() {
|
|||
let provider = {
|
||||
QueryInterface: XPCOMUtils.generateQI([Components.interfaces.calICalendarSearchProvider, Components.interfaces.calIOperation]),
|
||||
searchForCalendars: function(aStr, aHint, aMax, aListener) {
|
||||
|
||||
Services.tm.currentThread.dispatch({run: function() {
|
||||
dump("Cancelling search...");
|
||||
op.cancel();
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
function run_test() {
|
||||
|
||||
// Bug 1239622. The 1st of January after a leap year which ends with
|
||||
// a Thursday belongs to week number 53 unless the start of week is
|
||||
// set on Friday.
|
||||
|
|
Загрузка…
Ссылка в новой задаче