Commit 0c3750a2 authored by CardBook's avatar CardBook

version 24.6

parent f734b99f
......@@ -19,19 +19,19 @@ if ("undefined" == typeof(cardbookDates)) {
getDateForCompare: function (aCard, aField) {
try {
if (aCard[aField] == "") {
return new Date(Date.UTC('666', '6', '6'));
return new Date('666', '6', '6');
} else {
var dateFormat = cardbookPreferences.getDateFormat(aCard.dirPrefId);
var myDate = cardbookDates.convertDateStringToDate(aCard[aField], dateFormat);
if (myDate == "WRONGDATE") {
return new Date(Date.UTC('666', '6', '6'));
return new Date('666', '6', '6');
} else {
return myDate;
}
}
}
catch (e) {
return new Date(Date.UTC('666', '6', '6'));
return new Date('666', '6', '6');
}
},
......@@ -55,11 +55,11 @@ if ("undefined" == typeof(cardbookDates)) {
if (myDate == "WRONGDATE") {
return aDateString;
} else if (myDate.getFullYear() == "666") {
if (Services.vc.compare(Services.appinfo.version, "57") > 0) {
if (Services.vc.compare(Services.appinfo.version, "57") >= 0) {
if (aTargetDateFormat == "0") {
var formatter = Services.intl.createDateTimeFormat(undefined, { month: "long", day: "numeric", timeZone: "UTC"});
var formatter = Services.intl.createDateTimeFormat(undefined, { month: "long", day: "numeric"});
} else {
var formatter = Services.intl.createDateTimeFormat(undefined, { month: "short", day: "numeric", timeZone: "UTC"});
var formatter = Services.intl.createDateTimeFormat(undefined, { month: "short", day: "numeric"});
}
return formatter.format(myDate);
} else {
......@@ -69,11 +69,11 @@ if ("undefined" == typeof(cardbookDates)) {
return aDateString;
}
} else {
if (Services.vc.compare(Services.appinfo.version, "57") > 0) {
if (Services.vc.compare(Services.appinfo.version, "57") >= 0) {
if (aTargetDateFormat == "0") {
var formatter = Services.intl.createDateTimeFormat(undefined, { dateStyle: "long", timeZone: "UTC"});
var formatter = Services.intl.createDateTimeFormat(undefined, { dateStyle: "long"});
} else {
var formatter = Services.intl.createDateTimeFormat(undefined, { dateStyle: "short", timeZone: "UTC"});
var formatter = Services.intl.createDateTimeFormat(undefined, { dateStyle: "short"});
}
return formatter.format(myDate);
} else {
......@@ -174,7 +174,7 @@ if ("undefined" == typeof(cardbookDates)) {
lThirdField = aDateString.replace(EmptyParamRegExp2, "$3");
lThirdField = (lThirdField.length<2?'0':'') + lThirdField;
}
lReturn = new Date(Date.UTC(lFirstField, lSecondField-1, lThirdField));
lReturn = new Date(lFirstField, lSecondField-1, lThirdField);
} else {
var EmptyParamRegExp2 = new RegExp("^([^\-]*)\\" + lSeparator + "([^\-]*)", "ig");
if (aDateString.replace(EmptyParamRegExp2, "$1")!=aDateString) {
......@@ -183,7 +183,7 @@ if ("undefined" == typeof(cardbookDates)) {
lSecondField = aDateString.replace(EmptyParamRegExp2, "$2");
lSecondField = (lSecondField.length<2?'0':'') + lSecondField;
}
lReturn = new Date(Date.UTC('666', lFirstField-1, lSecondField));
lReturn = new Date('666', lFirstField-1, lSecondField);
}
break;
case "DD-MM-YYYY":
......@@ -199,7 +199,7 @@ if ("undefined" == typeof(cardbookDates)) {
lThirdField = aDateString.replace(EmptyParamRegExp2, "$3");
lThirdField = (lThirdField.length<2?'0':'') + lThirdField;
}
lReturn = new Date(Date.UTC(lThirdField, lSecondField-1, lFirstField));
lReturn = new Date(lThirdField, lSecondField-1, lFirstField);
} else {
var EmptyParamRegExp2 = new RegExp("^([^\.]*)\\" + lSeparator + "([^\.]*)", "ig");
if (aDateString.replace(EmptyParamRegExp2, "$1")!=aDateString) {
......@@ -208,7 +208,7 @@ if ("undefined" == typeof(cardbookDates)) {
lSecondField = aDateString.replace(EmptyParamRegExp2, "$2");
lSecondField = (lSecondField.length<2?'0':'') + lSecondField;
}
lReturn = new Date(Date.UTC('666', lSecondField-1, lFirstField));
lReturn = new Date('666', lSecondField-1, lFirstField);
}
break;
case "MM-DD-YYYY":
......@@ -224,7 +224,7 @@ if ("undefined" == typeof(cardbookDates)) {
lThirdField = aDateString.replace(EmptyParamRegExp2, "$3");
lThirdField = (lThirdField.length<2?'0':'') + lThirdField;
}
lReturn = new Date(Date.UTC(lThirdField, lFirstField-1, lSecondField));
lReturn = new Date(lThirdField, lFirstField-1, lSecondField);
} else {
var EmptyParamRegExp2 = new RegExp("^([^\/]*)\\" + lSeparator + "([^\/]*)", "ig");
if (aDateString.replace(EmptyParamRegExp2, "$1")!=aDateString) {
......@@ -233,7 +233,7 @@ if ("undefined" == typeof(cardbookDates)) {
lSecondField = aDateString.replace(EmptyParamRegExp2, "$2");
lSecondField = (lSecondField.length<2?'0':'') + lSecondField;
}
lReturn = new Date(Date.UTC('666', lFirstField-1, lSecondField));
lReturn = new Date('666', lFirstField-1, lSecondField);
}
break;
case "YYYYMMDD":
......@@ -244,12 +244,12 @@ if ("undefined" == typeof(cardbookDates)) {
lFirstField = aDateString.substr(0, 4);
lSecondField = aDateString.substr(4, 2);
lThirdField = aDateString.substr(6, 2);
lReturn = new Date(Date.UTC(lFirstField, lSecondField-1, lThirdField));
lReturn = new Date(lFirstField, lSecondField-1, lThirdField);
} else if (aDateString.length == 4 || aDateString.length == 3) {
lFirstField = aDateString.substr(0, 2);
lSecondField = aDateString.substr(2, 2);
lSecondField = (lSecondField.length<2?'0':'') + lSecondField;
lReturn = new Date(Date.UTC('666', lFirstField-1, lSecondField));
lReturn = new Date('666', lFirstField-1, lSecondField);
} else {
lReturn = "WRONGDATE";
}
......@@ -259,12 +259,12 @@ if ("undefined" == typeof(cardbookDates)) {
lFirstField = aDateString.substr(0, 2);
lSecondField = aDateString.substr(2, 2);
lThirdField = aDateString.substr(4, 4);
lReturn = new Date(Date.UTC(lThirdField, lSecondField-1, lFirstField));
lReturn = new Date(lThirdField, lSecondField-1, lFirstField);
} else if (aDateString.length == 4 || aDateString.length == 3) {
lFirstField = aDateString.substr(0, 2);
lSecondField = aDateString.substr(2, 2);
lSecondField = (lSecondField.length<2?'0':'') + lSecondField;
lReturn = new Date(Date.UTC('666', lSecondField-1, lFirstField));
lReturn = new Date('666', lSecondField-1, lFirstField);
} else {
lReturn = "WRONGDATE";
}
......@@ -274,12 +274,12 @@ if ("undefined" == typeof(cardbookDates)) {
lFirstField = aDateString.substr(0, 2);
lSecondField = aDateString.substr(2, 2);
lThirdField = aDateString.substr(4, 4);
lReturn = new Date(Date.UTC(lThirdField, lFirstField-1, lSecondField));
lReturn = new Date(lThirdField, lFirstField-1, lSecondField);
} else if (aDateString.length == 4 || aDateString.length == 3) {
lFirstField = aDateString.substr(0, 2);
lSecondField = aDateString.substr(2, 2);
lSecondField = (lSecondField.length<2?'0':'') + lSecondField;
lReturn = new Date(Date.UTC('666', lFirstField-1, lSecondField));
lReturn = new Date('666', lFirstField-1, lSecondField);
} else {
lReturn = "WRONGDATE";
}
......
......@@ -653,6 +653,7 @@ var cardbookRepository = {
result.push([resultArray[0], resultArray[1], resultArray[2], resultArray[3], resultArray[4]]);
}
}
cardbookPreferences.delEmailsCollection();
for (var i = 0; i < result.length; i++) {
cardbookPreferences.setEmailsCollection(i.toString(), result[i][0] + "::" + result[i][1] + "::" + result[i][2] + "::" + result[i][3] + "::" + result[i][4]);
}
......
......@@ -11,8 +11,11 @@ if ("undefined" == typeof(ovl_collected)) {
return;
} else if (aEmail.includes("{{") && aEmail.includes("}}")) {
return;
} else if (aEmail.includes("{{") && aDisplayName.includes("}}")) {
return;
}
if (aDisplayName != null && aDisplayName !== undefined && aDisplayName != "") {
if (aDisplayName.includes("{{") && aDisplayName.includes("}}")) {
return;
}
}
if (!cardbookRepository.isEmailRegistered(aEmail, aIdentity)) {
for (var i = 0; i < aEmailsCollections.length; i++) {
......
......@@ -82,7 +82,7 @@ if ("undefined" == typeof(ovl_synchro)) {
prefs.setCharPref("accountsShown", "all");
prefs.setCharPref("uncategorizedCards", "");
prefs.setCharPref("addonVersion", "24.4");
prefs.setCharPref("addonVersion", "24.6");
},
lEventTimerSync : { notify: function(lTimerSync) {
......
......@@ -44,7 +44,7 @@ if ("undefined" == typeof(cardbookPreferences)) {
getStringPref: function (prefName) {
try {
if (Services.vc.compare(Services.appinfo.version, "58") > 0) {
if (Services.vc.compare(Services.appinfo.version, "58") >= 0) {
return Services.prefs.getStringPref(prefName);
} else {
return Services.prefs.getComplexValue(prefName, Components.interfaces.nsISupportsString).data;
......@@ -57,7 +57,7 @@ if ("undefined" == typeof(cardbookPreferences)) {
setStringPref: function (prefName, value) {
try {
if (Services.vc.compare(Services.appinfo.version, "58") > 0) {
if (Services.vc.compare(Services.appinfo.version, "58") >= 0) {
Services.prefs.setStringPref(prefName, value);
} else {
var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
......
......@@ -308,7 +308,7 @@ types.gender.u=Unknown
typesTooltip=To change the available types, use CardBook preferences.
prefLabel=Preference
prefValueLabel=Preference value
prefWeightTooltip=Preferences may have different values between 1 to 100. For a normal use, kept it empty.
prefWeightTooltip=Preferences may have different values between 1 and 100. Keep it empty for normal use.
impp.skype=Skype
impp.jabber=Jabber
......@@ -372,8 +372,8 @@ columnSeparatorLabel=Columns separator
lineHeaderLabel=First line as header
missingColumnsConfirmMessage=Selected columns total is different from the file columns total, so missing or unnecessary columns would not be taken into account. Continue?
toUpperCase=Put in uppercase
toLowerCase=Put in lowercase
toUpperCase=Convert to uppercase
toLowerCase=Convert to lowercase
wdw_cardbookRenameFieldOrgTitle=Organization editor
wdw_cardbookRenameFieldEditCatTitle=Categories editor
......
......@@ -6,7 +6,7 @@
<Description about="urn:mozilla:install-manifest">
<em:id>cardbook@vigneau.philippe</em:id>
<em:name>CardBook</em:name>
<em:version>24.4</em:version>
<em:version>24.6</em:version>
<em:type>2</em:type>
<em:description>vCard Address Book</em:description>
<em:creator>Philippe Vigneau</em:creator>
......
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