Bug 1184714 - Fix some more Calendar strict warnings. r=philipp a=aleth CLOSED TREE
--HG-- extra : amend_source : dc68c996e6b655328d9c2a3abc048258d629a3de
This commit is contained in:
Родитель
916657ce4d
Коммит
7e40daefc6
|
@ -816,11 +816,7 @@
|
|||
let end_in_minutes = Math.ceil((duration.inSeconds / 60) +
|
||||
(offset.inSeconds / 60));
|
||||
|
||||
function minute2offset(value,
|
||||
fNumHours,
|
||||
numHours,
|
||||
start_hour,
|
||||
zoomfactor) {
|
||||
let minute2offset = function (value, fNumHours, numHours, start_hour, zoomfactor) {
|
||||
// 'value' is some integer in the interval [0, range * 24 * 60].
|
||||
// we need to map this offset into our array which
|
||||
// holds elements for 'range' days with [start, end] hours each.
|
||||
|
@ -840,7 +836,7 @@
|
|||
let block = Math.floor(minute / minutes_per_block);
|
||||
|
||||
return Math.ceil(fNumHours) * day + block;
|
||||
}
|
||||
};
|
||||
|
||||
// Number of hours (fractional representation)
|
||||
let numHours = this.mEndHour - this.mStartHour;
|
||||
|
|
|
@ -6,7 +6,7 @@ Components.utils.import("resource://calendar/modules/calUtils.jsm");
|
|||
Components.utils.import("resource://gre/modules/Preferences.jsm");
|
||||
Components.utils.import("resource://calendar/modules/calViewUtils.jsm");
|
||||
|
||||
EXPORTED_SYMBOLS = ["cal"]; // even though it's defined in calUtils.jsm, import needs this
|
||||
this.EXPORTED_SYMBOLS = ["cal"]; // even though it's defined in calUtils.jsm, import needs this
|
||||
cal.print = {
|
||||
/**
|
||||
* Returns a simple key in the format YYYY-MM-DD for use in the table of
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
Components.utils.import("resource://calendar/modules/calUtils.jsm");
|
||||
|
||||
EXPORTED_SYMBOLS = ["cal"];
|
||||
this.EXPORTED_SYMBOLS = ["cal"];
|
||||
cal.view = {
|
||||
/**
|
||||
- * Item comparator for inserting items into dayboxes.
|
||||
|
|
|
@ -61,7 +61,7 @@ calHtmlExporter.prototype = {
|
|||
let itemNode = document.getElementById("item-template").cloneNode(true);
|
||||
itemNode.removeAttribute("id");
|
||||
|
||||
function setupTextRow(classKey, propValue, prefixKey) {
|
||||
let setupTextRow = function(classKey, propValue, prefixKey) {
|
||||
if (propValue) {
|
||||
let prefix = cal.calGetString("calendar", prefixKey);
|
||||
itemNode.querySelector("." + classKey + "key").textContent = prefix;
|
||||
|
@ -73,7 +73,7 @@ calHtmlExporter.prototype = {
|
|||
}
|
||||
row.remove();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
let startDate = item[cal.calGetStartDateProp(item)];
|
||||
let endDate = item[cal.calGetEndDateProp(item)];
|
||||
|
|
|
@ -298,21 +298,22 @@ calItipEmailTransport.prototype = {
|
|||
return false;
|
||||
},
|
||||
|
||||
_createTempImipFile: function cietCTIF(compatMode, aToList, aSubject, aBody, aItem, aIdentity, aMessageId) {
|
||||
_createTempImipFile: function (compatMode, aToList, aSubject, aBody, aItem, aIdentity, aMessageId) {
|
||||
function encodeUTF8(text) {
|
||||
return convertFromUnicode("UTF-8", text).replace(/(\r\n)|\n/g, "\r\n");
|
||||
}
|
||||
function encodeMimeHeader(header) {
|
||||
let fieldNameLen = (header.indexOf(": ") + 2);
|
||||
return MailServices.mimeConverter
|
||||
.encodeMimePartIIStr_UTF8(header,
|
||||
false,
|
||||
"UTF-8",
|
||||
fieldNameLen,
|
||||
Components.interfaces
|
||||
.nsIMimeConverter
|
||||
.MIME_ENCODED_WORD_SIZE);
|
||||
}
|
||||
try {
|
||||
function encodeUTF8(text) {
|
||||
return convertFromUnicode("UTF-8", text).replace(/(\r\n)|\n/g, "\r\n");
|
||||
}
|
||||
function encodeMimeHeader(header) {
|
||||
let fieldNameLen = (header.indexOf(": ") + 2);
|
||||
return MailServices.mimeConverter
|
||||
.encodeMimePartIIStr_UTF8(header,
|
||||
false,
|
||||
"UTF-8",
|
||||
fieldNameLen,
|
||||
Components.interfaces.nsIMimeConverter.MIME_ENCODED_WORD_SIZE);
|
||||
}
|
||||
|
||||
let itemList = aItem.getItemList({});
|
||||
let serializer = Components.classes["@mozilla.org/calendar/ics-serializer;1"]
|
||||
.createInstance(Components.interfaces.calIIcsSerializer);
|
||||
|
|
Загрузка…
Ссылка в новой задаче