Commit d0f3fd0a authored by CardBook's avatar CardBook

version 25.7

parent 3a84295e
......@@ -36,8 +36,10 @@ skin cardbook-os classic/1.0 chrome/skin/os/windows/ os=
skin cardbook-os classic/1.0 chrome/skin/os/mac/ os=Darwin
# support for customizing toolbars
style chrome://global/content/customizeToolbar.xul chrome://cardbook-osversion/skin/mainToolbarButton.css
style chrome://global/content/customizeToolbar.xul chrome://cardbook-osversion/skin/cardbookToolbarButtons.css
style chrome://global/content/customizeToolbar.xul chrome://cardbook-osversion/skin/mainToolbarButton.css appversion<=58.0b3
style chrome://messenger/content/customizeToolbar.xul chrome://cardbook-osversion/skin/mainToolbarButton.css appversion>=59.0a1
style chrome://global/content/customizeToolbar.xul chrome://cardbook-osversion/skin/cardbookToolbarButtons.css appversion<=58.0b3
style chrome://messenger/content/customizeToolbar.xul chrome://cardbook-osversion/skin/cardbookToolbarButtons.css appversion>=59.0a1
# support for CardBook, yellow stars, creation from emails, formatting email fields
overlay chrome://messenger/content/messenger.xul chrome://cardbook/content/ovl_cardbook.xul
......
......@@ -202,10 +202,10 @@ if ("undefined" == typeof(wdw_cardEdition)) {
wdw_cardEdition.cardbookeditlists.availableCards = [];
var myCurrentDirPrefId = document.getElementById('dirPrefIdTextBox').value;
if (myCurrentDirPrefId != "") {
for (var i in cardbookRepository.cardbookCardSearch[myCurrentDirPrefId]) {
for (var i in cardbookRepository.cardbookCardLongSearch[myCurrentDirPrefId]) {
if (i.includes(searchValue) || searchValue == "") {
for (var j = 0; j < cardbookRepository.cardbookCardSearch[myCurrentDirPrefId][i].length; j++) {
var myCard = cardbookRepository.cardbookCardSearch[myCurrentDirPrefId][i][j];
for (var j = 0; j < cardbookRepository.cardbookCardLongSearch[myCurrentDirPrefId][i].length; j++) {
var myCard = cardbookRepository.cardbookCardLongSearch[myCurrentDirPrefId][i][j];
if (myCard.dirPrefId == myCurrentDirPrefId) {
var found = false;
for (var k = 0; k < wdw_cardEdition.cardbookeditlists.addedCards.length; k++) {
......
......@@ -556,7 +556,7 @@ if ("undefined" == typeof(cardbookElementTools)) {
aMenulist.appendChild(aMenupopup);
aMenupopup.setAttribute('id', aType + '_' + aIndex + '_menupopupObj');
cardbookElementTools.deleteRows(aMenupopup.id);
var myColumns = cardbookUtils.getAllAvailableColumns("all");
var myColumns = cardbookUtils.getAllAvailableColumns("search");
var found = false;
for (var i = 0; i < myColumns.length; i++) {
var menuItem = document.createElement("menuitem");
......
......@@ -22,11 +22,12 @@ var cardbookRepository = {
["tel", ["tel"] ],
["url", ["url"] ] ],
"note": ["note"],
"age": ["age"],
"calculated": ["age", "ABName"],
"technical": ["version", "rev"] },
dateFormats : ["YYYY-MM-DD", "YYYY.MM.DD", "YYYY/MM/DD", "YYYYMMDD", "DD-MM-YYYY", "DD.MM.YYYY", "DD/MM/YYYY", "DDMMYYYY", "MM-DD-YYYY", "MM.DD.YYYY", "MM/DD/YYYY", "MMDDYYYY"],
defaultAutocompleteRestrictSearchFields : "firstname|lastname",
defaultFnFormula : "({{1}} |)({{2}} |)({{3}} |)({{4}} |)({{5}} |)({{6}} |)",
defaultAdrFormula : "",
defaultKindCustom : "X-ADDRESSBOOKSERVER-KIND",
......@@ -44,12 +45,16 @@ var cardbookRepository = {
addonVersion : "",
userAgent : "",
prodid : "",
autocompleteRestrictSearch : false,
autocompleteRestrictSearchFields : [],
cardbookAccounts : [],
cardbookAccountsCategories : {},
cardbookCards : {},
cardbookDisplayCards : {},
cardbookCardSearch : {},
cardbookCardLongSearch : {},
cardbookCardShortSearch : {},
cardbookCardEmails : {},
cardbookFileCacheCards : {},
cardbookComplexSearch : {},
......@@ -446,7 +451,7 @@ var cardbookRepository = {
return a;
},
getSearchString: function(aCard) {
getLongSearchString: function(aCard) {
var lResult = "";
lResult = lResult + aCard.lastname;
lResult = lResult + aCard.firstname;
......@@ -480,6 +485,16 @@ var cardbookRepository = {
return lResult;
},
getShortSearchString: function(aCard) {
var lResult = "";
var fieldsArray = cardbookRepository.autocompleteRestrictSearchFields;
for (let i = 0; i < fieldsArray.length; i++) {
lResult = lResult + cardbookUtils.getCardValueByField(aCard, fieldsArray[i]);
}
lResult = lResult.replace(/[\s+\-+\.+\,+\;+]/g, "").toUpperCase();
return lResult;
},
setEmptyContainer: function(aAccountId) {
if (cardbookRepository.cardbookAccountsCategories[aAccountId]) {
if (cardbookRepository.cardbookAccountsCategories[aAccountId].length > 0) {
......@@ -566,8 +581,9 @@ var cardbookRepository = {
for (var key in cardbookRepository.cardbookCards) {
if (cardbookRepository.cardbookCards.hasOwnProperty(key)) {
if (key.indexOf(aAccountId) >= 0) {
cardbookRepository.removeCardFromSearch(cardbookRepository.cardbookCards[key]);
if (key.startsWith(aAccountId)) {
cardbookRepository.removeCardFromLongSearch(cardbookRepository.cardbookCards[key]);
cardbookRepository.removeCardFromShortSearch(cardbookRepository.cardbookCards[key]);
if (cardbookRepository.cardbookFileCacheCards[aAccountId] && cardbookRepository.cardbookFileCacheCards[aAccountId][cardbookRepository.cardbookCards[key].cacheuri]) {
delete cardbookRepository.cardbookFileCacheCards[aAccountId][cardbookRepository.cardbookCards[key].cacheuri];
}
......@@ -622,8 +638,9 @@ var cardbookRepository = {
for (var key in cardbookRepository.cardbookCards) {
if (cardbookRepository.cardbookCards.hasOwnProperty(key)) {
if (key.indexOf(aAccountId) >= 0) {
cardbookRepository.removeCardFromSearch(cardbookRepository.cardbookCards[key]);
if (key.startsWith(aAccountId)) {
cardbookRepository.removeCardFromLongSearch(cardbookRepository.cardbookCards[key]);
cardbookRepository.removeCardFromShortSearch(cardbookRepository.cardbookCards[key]);
if (cardbookRepository.cardbookFileCacheCards[aAccountId] && cardbookRepository.cardbookFileCacheCards[aAccountId][cardbookRepository.cardbookCards[key].cacheuri]) {
delete cardbookRepository.cardbookFileCacheCards[aAccountId][cardbookRepository.cardbookCards[key].cacheuri];
}
......@@ -727,7 +744,8 @@ var cardbookRepository = {
removeCardFromRepository: function (aCard, aCacheDeletion) {
try {
cardbookRepository.removeCardFromSearch(aCard);
cardbookRepository.removeCardFromLongSearch(aCard);
cardbookRepository.removeCardFromShortSearch(aCard);
cardbookRepository.removeCardFromEmails(aCard);
cardbookRepository.removeCardFromCategories(aCard, aCard.dirPrefId);
cardbookRepository.removeCardFromDisplay(aCard, aCard.dirPrefId);
......@@ -749,7 +767,8 @@ var cardbookRepository = {
addCardToRepository: function (aCard, aMode, aFileName) {
try {
cardbookRepository.addCardToEmails(aCard);
cardbookRepository.addCardToSearch(aCard);
cardbookRepository.addCardToLongSearch(aCard);
cardbookRepository.addCardToShortSearch(aCard);
cardbookRepository.addCardToList(aCard);
cardbookRepository.addCardToCache(aCard, aMode, aFileName);
cardbookRepository.addCardToCategories(aCard, aCard.dirPrefId);
......@@ -984,7 +1003,7 @@ var cardbookRepository = {
wdw_cardbooklog.updateStatusProgressInformationWithDebug2(myPrefName + " : debug mode : Contact " + aCard.fn + " added to display");
if (cardbookRepository.cardbookSearchMode === "SEARCH") {
if (cardbookRepository.getSearchString(aCard).indexOf(cardbookRepository.cardbookSearchValue) >= 0) {
if (cardbookRepository.getLongSearchString(aCard).indexOf(cardbookRepository.cardbookSearchValue) >= 0) {
cardbookRepository.cardbookDisplayCards[cardbookRepository.cardbookSearchValue].push(aCard);
}
wdw_cardbooklog.updateStatusProgressInformationWithDebug2(myPrefName + " : debug mode : Contact " + aCard.fn + " added to display search");
......@@ -1237,30 +1256,63 @@ var cardbookRepository = {
return false;
},
addCardToSearch: function(aCard) {
var myText = cardbookRepository.getSearchString(aCard);
if (myText != null && myText !== undefined && myText != "") {
if (!cardbookRepository.cardbookCardSearch[aCard.dirPrefId]) {
cardbookRepository.cardbookCardSearch[aCard.dirPrefId] = {};
addCardToLongSearch: function(aCard) {
var myLongText = cardbookRepository.getLongSearchString(aCard);
if (myLongText != null && myLongText !== undefined && myLongText != "") {
if (!cardbookRepository.cardbookCardLongSearch[aCard.dirPrefId]) {
cardbookRepository.cardbookCardLongSearch[aCard.dirPrefId] = {};
}
if (!cardbookRepository.cardbookCardSearch[aCard.dirPrefId][myText]) {
cardbookRepository.cardbookCardSearch[aCard.dirPrefId][myText] = [];
if (!cardbookRepository.cardbookCardLongSearch[aCard.dirPrefId][myLongText]) {
cardbookRepository.cardbookCardLongSearch[aCard.dirPrefId][myLongText] = [];
}
cardbookRepository.cardbookCardSearch[aCard.dirPrefId][myText].push(aCard);
cardbookRepository.cardbookCardLongSearch[aCard.dirPrefId][myLongText].push(aCard);
}
},
removeCardFromLongSearch: function(aCard) {
var myLongText = cardbookRepository.getLongSearchString(aCard);
if (myLongText != null && myLongText !== undefined && myLongText != "") {
if (cardbookRepository.cardbookCardLongSearch[aCard.dirPrefId][myLongText]) {
if (cardbookRepository.cardbookCardLongSearch[aCard.dirPrefId][myLongText].length == 1) {
delete cardbookRepository.cardbookCardLongSearch[aCard.dirPrefId][myLongText];
} else {
function searchCard(element) {
return (element.dirPrefId+"::"+element.uid != aCard.dirPrefId+"::"+aCard.uid);
}
cardbookRepository.cardbookCardLongSearch[aCard.dirPrefId][myLongText] = cardbookRepository.cardbookCardLongSearch[aCard.dirPrefId][myLongText].filter(searchCard);
}
}
}
},
addCardToShortSearch: function(aCard) {
if (cardbookRepository.autocompleteRestrictSearch) {
var myShortText = cardbookRepository.getShortSearchString(aCard);
if (myShortText != null && myShortText !== undefined && myShortText != "") {
if (!cardbookRepository.cardbookCardShortSearch[aCard.dirPrefId]) {
cardbookRepository.cardbookCardShortSearch[aCard.dirPrefId] = {};
}
if (!cardbookRepository.cardbookCardShortSearch[aCard.dirPrefId][myShortText]) {
cardbookRepository.cardbookCardShortSearch[aCard.dirPrefId][myShortText] = [];
}
cardbookRepository.cardbookCardShortSearch[aCard.dirPrefId][myShortText].push(aCard);
}
} else {
cardbookRepository.cardbookCardShortSearch = {};
}
},
removeCardFromSearch: function(aCard) {
var myText = cardbookRepository.getSearchString(aCard);
if (myText != null && myText !== undefined && myText != "") {
if (cardbookRepository.cardbookCardSearch[aCard.dirPrefId][myText]) {
if (cardbookRepository.cardbookCardSearch[aCard.dirPrefId][myText].length == 1) {
delete cardbookRepository.cardbookCardSearch[aCard.dirPrefId][myText];
removeCardFromShortSearch: function(aCard) {
var myShortText = cardbookRepository.getShortSearchString(aCard);
if (myShortText != null && myShortText !== undefined && myShortText != "") {
if (cardbookRepository.cardbookCardShortSearch[aCard.dirPrefId][myShortText]) {
if (cardbookRepository.cardbookCardShortSearch[aCard.dirPrefId][myShortText].length == 1) {
delete cardbookRepository.cardbookCardShortSearch[aCard.dirPrefId][myShortText];
} else {
function searchCard(element) {
return (element.dirPrefId+"::"+element.uid != aCard.dirPrefId+"::"+aCard.uid);
}
cardbookRepository.cardbookCardSearch[aCard.dirPrefId][myText] = cardbookRepository.cardbookCardSearch[aCard.dirPrefId][myText].filter(searchCard);
cardbookRepository.cardbookCardShortSearch[aCard.dirPrefId][myShortText] = cardbookRepository.cardbookCardShortSearch[aCard.dirPrefId][myShortText].filter(searchCard);
}
}
}
......
......@@ -2248,7 +2248,7 @@ if ("undefined" == typeof(cardbookSynchronization)) {
cardbookRepository.cardbookDisplayCards = {};
cardbookRepository.cardbookFileCacheCards = {};
cardbookRepository.cardbookCards = {};
cardbookRepository.cardbookCardSearch = {};
cardbookRepository.cardbookCardLongSearch = {};
cardbookRepository.cardbookComplexSearch = {};
var myMode = "INITIAL";
......
......@@ -716,7 +716,7 @@ if ("undefined" == typeof(cardbookUtils)) {
}
}
}
return result;
return cardbookUtils.unescapeString1(result);
},
parseLists: function(aCard, aMemberLines, aKindValue) {
......@@ -1205,6 +1205,8 @@ if ("undefined" == typeof(cardbookUtils)) {
}
} else if (aField == "age") {
result.push(cardbookDates.getAge(aCard));
} else if (aField == "ABName") {
result.push(cardbookPreferences.getName(aCard.dirPrefId));
} else {
if (aCard[aField]) {
result.push(aCard[aField]);
......@@ -2322,9 +2324,9 @@ if ("undefined" == typeof(cardbookUtils)) {
var result = [];
for (var i in cardbookRepository.allColumns) {
for (var j = 0; j < cardbookRepository.allColumns[i].length; j++) {
if (i != "arrayColumns" && i != "categories") {
if (i != "arrayColumns" && i != "categories" && i != "calculated") {
result.push([cardbookRepository.allColumns[i][j], strBundle.getString(cardbookRepository.allColumns[i][j] + "Label")]);
} else if (i == "age" && aMode != "import" && aMode != "export") {
} else if (i == "calculated" && aMode == "search") {
result.push([cardbookRepository.allColumns[i][j], strBundle.getString(cardbookRepository.allColumns[i][j] + "Label")]);
} else if (i == "categories") {
result.push([cardbookRepository.allColumns[i][j] + ".0.array", strBundle.getString(cardbookRepository.allColumns[i][j] + "Label")]);
......@@ -2336,15 +2338,13 @@ if ("undefined" == typeof(cardbookUtils)) {
result.push([cardbookRepository.customFields[i][j][0], cardbookRepository.customFields[i][j][1]]);
}
}
if (aMode === "export" || aMode === "all") {
for (var i = 0; i < cardbookRepository.allColumns.arrayColumns.length; i++) {
for (var k = 0; k < cardbookRepository.allColumns.arrayColumns[i][1].length; k++) {
result.push([cardbookRepository.allColumns.arrayColumns[i][0] + "." + k + ".all",
strBundle.getString(cardbookRepository.allColumns.arrayColumns[i][1][k] + "Label")]);
}
for (var i = 0; i < cardbookRepository.allColumns.arrayColumns.length; i++) {
for (var k = 0; k < cardbookRepository.allColumns.arrayColumns[i][1].length; k++) {
result.push([cardbookRepository.allColumns.arrayColumns[i][0] + "." + k + ".all",
strBundle.getString(cardbookRepository.allColumns.arrayColumns[i][1][k] + "Label")]);
}
}
if (aMode === "import" || aMode === "all") {
if (aMode == "export" || aMode == "import" || aMode == "search") {
for (var i = 0; i < cardbookRepository.allColumns.arrayColumns.length; i++) {
for (var k = 0; k < cardbookRepository.allColumns.arrayColumns[i][1].length; k++) {
if (cardbookRepository.allColumns.arrayColumns[i][0] != "adr") {
......@@ -2353,13 +2353,13 @@ if ("undefined" == typeof(cardbookUtils)) {
}
}
}
}
for (var i = 0; i < cardbookRepository.allColumns.arrayColumns.length; i++) {
var myPrefTypes = cardbookPreferences.getAllTypesByType(cardbookRepository.allColumns.arrayColumns[i][0]);
for (var j = 0; j < myPrefTypes.length; j++) {
for (var k = 0; k < cardbookRepository.allColumns.arrayColumns[i][1].length; k++) {
result.push([cardbookRepository.allColumns.arrayColumns[i][0] + "." + k + "." + myPrefTypes[j][0],
strBundle.getString(cardbookRepository.allColumns.arrayColumns[i][1][k] + "Label") + " (" + myPrefTypes[j][1] + ")"]);
for (var i = 0; i < cardbookRepository.allColumns.arrayColumns.length; i++) {
var myPrefTypes = cardbookPreferences.getAllTypesByType(cardbookRepository.allColumns.arrayColumns[i][0]);
for (var j = 0; j < myPrefTypes.length; j++) {
for (var k = 0; k < cardbookRepository.allColumns.arrayColumns[i][1].length; k++) {
result.push([cardbookRepository.allColumns.arrayColumns[i][0] + "." + k + "." + myPrefTypes[j][0],
strBundle.getString(cardbookRepository.allColumns.arrayColumns[i][1][k] + "Label") + " (" + myPrefTypes[j][1] + ")"]);
}
}
}
}
......
......@@ -49,6 +49,10 @@
name="extensions.cardbook.autocompleteShowAddressbook" type="bool"/>
<preference id="extensions.cardbook.autocompleteWithColor"
name="extensions.cardbook.autocompleteWithColor" type="bool"/>
<preference id="extensions.cardbook.autocompleteRestrictSearch"
name="extensions.cardbook.autocompleteRestrictSearch" type="bool"/>
<preference id="extensions.cardbook.autocompleteRestrictSearchFields"
name="extensions.cardbook.autocompleteRestrictSearchFields" type="string"/>
<preference id="extensions.cardbook.useColor"
name="extensions.cardbook.useColor" type="string"/>
<preference id="extensions.cardbook.debugMode"
......@@ -92,6 +96,18 @@
accesskey="&autocompleteWithColorAccesskey;"
class="indent"
preference="extensions.cardbook.autocompleteWithColor"/>
<separator class="thin"/>
<hbox flex="1">
<checkbox id="autocompleteRestrictSearchCheckBox" label="&autocompleteRestrictSearchLabel;"
accesskey="&autocompleteRestrictSearchAccesskey;" class="indent"
preference="extensions.cardbook.autocompleteRestrictSearch"
oncommand="wdw_cardbookConfiguration.autocompleteRestrictSearch();"/>
<textbox id="autocompleteRestrictSearchFieldsTextBox" flex="1" disabled="true"/>
<button id="chooseAutocompleteRestrictSearchFieldsButton" label="&chooseAutocompleteRestrictSearchFieldsButtonLabel;" accesskey="&chooseAutocompleteRestrictSearchFieldsButtonAccesskey;"
oncommand="wdw_cardbookConfiguration.chooseAutocompleteRestrictSearchFieldsButton();"/>
<button id="resetAutocompleteRestrictSearchFieldsButton" label="&resetAutocompleteRestrictSearchFieldsButtonLabel;" accesskey="&resetAutocompleteRestrictSearchFieldsButtonAccesskey;"
oncommand="wdw_cardbookConfiguration.resetAutocompleteRestrictSearchFieldsButton();"/>
</hbox>
</vbox>
<separator class="thin"/>
<vbox>
......
......@@ -150,10 +150,10 @@ if ("undefined" == typeof(wdw_cardbookContactsSidebar)) {
// All No Only categories
if ((searchCategory === "allCategories") || (searchCategory === "noCategory") || (searchCategory === "onlyCategories")) {
if (searchCategory !== "onlyCategories") {
for (var j in cardbookRepository.cardbookCardSearch[myDirPrefId]) {
for (var j in cardbookRepository.cardbookCardLongSearch[myDirPrefId]) {
if (j.includes(searchInput) || searchInput == "") {
for (var k = 0; k < cardbookRepository.cardbookCardSearch[myDirPrefId][j].length; k++) {
var myCard = cardbookRepository.cardbookCardSearch[myDirPrefId][j][k];
for (var k = 0; k < cardbookRepository.cardbookCardLongSearch[myDirPrefId][j].length; k++) {
var myCard = cardbookRepository.cardbookCardLongSearch[myDirPrefId][j][k];
if (wdw_cardbookContactsSidebar.catExclRestrictions[myDirPrefId]) {
var add = true;
for (var l in wdw_cardbookContactsSidebar.catExclRestrictions[myDirPrefId]) {
......@@ -221,10 +221,10 @@ if ("undefined" == typeof(wdw_cardbookContactsSidebar)) {
function searchArray(element) {
return element == myCategory;
};
for (var j in cardbookRepository.cardbookCardSearch[myDirPrefId]) {
for (var j in cardbookRepository.cardbookCardLongSearch[myDirPrefId]) {
if (j.includes(searchInput) || searchInput == "") {
for (var k = 0; k < cardbookRepository.cardbookCardSearch[myDirPrefId][j].length; k++) {
var myCard = cardbookRepository.cardbookCardSearch[myDirPrefId][j][k]
for (var k = 0; k < cardbookRepository.cardbookCardLongSearch[myDirPrefId][j].length; k++) {
var myCard = cardbookRepository.cardbookCardLongSearch[myDirPrefId][j][k]
if (((myCard.categories.find(searchArray) != undefined) && (cardbookRepository.cardbookUncategorizedCards != myCategory))
|| ((myCard.categories.length == 0) && (cardbookRepository.cardbookUncategorizedCards == myCategory))) {
if (wdw_cardbookContactsSidebar.catExclRestrictions[myDirPrefId]) {
......@@ -293,7 +293,7 @@ if ("undefined" == typeof(wdw_cardbookContactsSidebar)) {
if (searchCategory !== "onlyCategories") {
var myCard = cardbookRepository.cardbookDisplayCards[myDirPrefId][j];
var myDirPrefName = cardbookUtils.getPrefNameFromPrefId(myCard.dirPrefId);
if (cardbookRepository.getSearchString(myCard).includes(searchInput) || searchInput == "") {
if (cardbookRepository.getLongSearchString(myCard).includes(searchInput) || searchInput == "") {
if (wdw_cardbookContactsSidebar.catExclRestrictions[myDirPrefId]) {
var add = true;
for (var l in wdw_cardbookContactsSidebar.catExclRestrictions[myDirPrefId]) {
......@@ -339,7 +339,7 @@ if ("undefined" == typeof(wdw_cardbookContactsSidebar)) {
var myDirPrefName = cardbookUtils.getPrefNameFromPrefId(myCard.dirPrefId);
// All No categories
if (searchCategory !== "onlyCategories") {
if (cardbookRepository.getSearchString(myCard).includes(searchInput) || searchInput == "") {
if (cardbookRepository.getLongSearchString(myCard).includes(searchInput) || searchInput == "") {
if (wdw_cardbookContactsSidebar.catExclRestrictions[myDirPrefId]) {
var add = true;
for (var l in wdw_cardbookContactsSidebar.catExclRestrictions[myDirPrefId]) {
......
......@@ -203,26 +203,37 @@ if ("undefined" == typeof(wdw_csvTranslator)) {
document.title = strBundle.getString(window.arguments[0].mode + "MappingTitle");
document.getElementById('availableColumnsGroupboxLabel').label = strBundle.getString(window.arguments[0].mode + "availableColumnsGroupboxLabel");
document.getElementById('addedColumnsGroupboxLabel').label = strBundle.getString(window.arguments[0].mode + "addedColumnsGroupboxLabel");
document.getElementById('fieldDelimiterLabel').value = strBundle.getString("fieldDelimiterLabel");
document.getElementById('fieldDelimiterTextBox').value = window.arguments[0].columnSeparator;
wdw_csvTranslator.cardbookeditlists.availableColumns = [];
wdw_csvTranslator.cardbookeditlists.addedColumns = [];
if (window.arguments[0].mode == "export") {
if (window.arguments[0].mode == "choice") {
document.getElementById('foundColumnsVBox').hidden = true;
document.getElementById('lineHeaderLabel').hidden = true;
document.getElementById('lineHeaderCheckBox').hidden = true;
document.getElementById('lineHeaderCheckBox').hidden = true;
document.getElementById('fieldDelimiterLabel').hidden = true;
document.getElementById('fieldDelimiterTextBox').hidden = true;
} else if (window.arguments[0].mode == "export") {
document.getElementById('foundColumnsVBox').hidden = true;
document.getElementById('lineHeaderLabel').hidden = true;
document.getElementById('lineHeaderCheckBox').hidden = true;
document.getElementById('fieldDelimiterLabel').value = strBundle.getString("fieldDelimiterLabel");
document.getElementById('fieldDelimiterTextBox').value = window.arguments[0].columnSeparator;
} else if (window.arguments[0].mode == "import") {
document.getElementById('foundColumnsGroupboxLabel').label = strBundle.getString(window.arguments[0].mode + "foundColumnsGroupboxLabel");
document.getElementById('lineHeaderLabel').value = strBundle.getString("lineHeaderLabel");
document.getElementById('lineHeaderCheckBox').setAttribute('checked', true);
document.getElementById('fieldDelimiterLabel').value = strBundle.getString("fieldDelimiterLabel");
document.getElementById('fieldDelimiterTextBox').value = window.arguments[0].columnSeparator;
wdw_csvTranslator.blankColumn = strBundle.getString(window.arguments[0].mode + "blankColumn");
wdw_csvTranslator.cardbookeditlists.availableColumns.push(["blank", wdw_csvTranslator.blankColumn]);
}
wdw_csvTranslator.cardbookeditlists.availableColumns = wdw_csvTranslator.cardbookeditlists.availableColumns.concat(cardbookUtils.getAllAvailableColumns(window.arguments[0].mode));
wdw_csvTranslator.cardbookeditlists.addedColumns = window.arguments[0].template;
wdw_csvTranslator.displayListTrees("addedColumns");
wdw_csvTranslator.cardbookeditlists.availableColumns = cardbookUtils.getAllAvailableColumns(window.arguments[0].mode);
wdw_csvTranslator.displayListTrees("availableColumns");
if (window.arguments[0].mode == "import") {
......
......@@ -14,6 +14,8 @@ if ("undefined" == typeof(ovl_synchro)) {
prefs.setBoolPref("proposeConcatEmails", false);
prefs.setBoolPref("autocompleteShowAddressbook", false);
prefs.setBoolPref("autocompleteWithColor", true);
prefs.setBoolPref("autocompleteRestrictSearch", false);
prefs.setCharPref("autocompleteRestrictSearchFields", cardbookRepository.defaultAutocompleteRestrictSearchFields);
prefs.setCharPref("useColor", "background");
prefs.setBoolPref("exclusive", false);
prefs.setCharPref("requestsTimeout", "120");
......@@ -88,7 +90,7 @@ if ("undefined" == typeof(ovl_synchro)) {
prefs.setCharPref("accountsShown", "all");
prefs.setCharPref("uncategorizedCards", "");
prefs.setCharPref("addonVersion", "25.6");
prefs.setCharPref("addonVersion", "25.7");
},
lEventTimerSync : { notify: function(lTimerSync) {
......@@ -114,6 +116,10 @@ if ("undefined" == typeof(ovl_synchro)) {
cardbookRepository.userAgent = "Thunderbird CardBook/" + cardbookRepository.addonVersion;
cardbookRepository.prodid = "-//Thunderbird.org/NONSGML Thunderbird CardBook V"+ cardbookRepository.addonVersion + "//EN";
// setting autocompleteRestrictSearch and autocompleteRestrictSearchFields
cardbookRepository.autocompleteRestrictSearch = cardbookPreferences.getBoolPref("extensions.cardbook.autocompleteRestrictSearch");
cardbookRepository.autocompleteRestrictSearchFields = cardbookPreferences.getStringPref("extensions.cardbook.autocompleteRestrictSearchFields").split('|');
// setting currentTypes for having lookups
cardbookRepository.currentTypes = cardbookPreferences.getAllTypesCurrent();
......
......@@ -1544,10 +1544,10 @@ if ("undefined" == typeof(wdw_cardbook)) {
for (var i = 0; i < cardbookRepository.cardbookAccounts.length; i++) {
if (cardbookRepository.cardbookAccounts[i][1] && cardbookRepository.cardbookAccounts[i][5] && cardbookRepository.cardbookAccounts[i][6] != "SEARCH") {
var myDirPrefId = cardbookRepository.cardbookAccounts[i][4];
for (var j in cardbookRepository.cardbookCardSearch[myDirPrefId]) {
for (var j in cardbookRepository.cardbookCardLongSearch[myDirPrefId]) {
if (cardbookRepository.cardbookSearchValue == "" || j.search(myRegexp) != -1) {
for (var k = 0; k < cardbookRepository.cardbookCardSearch[myDirPrefId][j].length; k++) {
cardbookRepository.cardbookDisplayCards[cardbookRepository.cardbookSearchValue].push(cardbookRepository.cardbookCardSearch[myDirPrefId][j][k]);
for (var k = 0; k < cardbookRepository.cardbookCardLongSearch[myDirPrefId][j].length; k++) {
cardbookRepository.cardbookDisplayCards[cardbookRepository.cardbookSearchValue].push(cardbookRepository.cardbookCardLongSearch[myDirPrefId][j][k]);
}
}
}
......@@ -1559,7 +1559,7 @@ if ("undefined" == typeof(wdw_cardbook)) {
// selected cards may have been deleted
if (cardbookRepository.cardbookCards[listOfSelectedCard[i]]) {
var myCard = cardbookRepository.cardbookCards[listOfSelectedCard[i]];
if (cardbookRepository.getSearchString(myCard).indexOf(cardbookRepository.cardbookSearchValue) >= 0) {
if (cardbookRepository.getLongSearchString(myCard).indexOf(cardbookRepository.cardbookSearchValue) >= 0) {
myListOfSelectedCards.push(listOfSelectedCard[i]);
}
}
......
......@@ -254,6 +254,7 @@ regionLabel=Oblast (Stát nebo provincie)
postalCodeLabel=Poštovní směrovací číslo
countryLabel=Zěmě
ageLabel=Věk
ABNameLabel=Název složky kontaktů
warningTitle=Varování
errorTitle=Chyba
......@@ -357,6 +358,9 @@ accountDeletiondeleteContentFileMessage=smazat soubor %S
accountDeletiondeleteContentDirMessage=smazat adresář %S
directoryDeletionConfirmMessage=Adresář %S není prázdný. Opravdu si přejete smazat všechny objekty z tohoto adresáře?
choiceMappingTitle=??Field Choice??
choiceavailableColumnsGroupboxLabel=Dostupné sloupce
choiceaddedColumnsGroupboxLabel=Zvolené sloupce
exportMappingTitle=Výběr exportovaných sloupců
exportavailableColumnsGroupboxLabel=Dostupné sloupce
exportaddedColumnsGroupboxLabel=Zvolené sloupce
......
......@@ -21,6 +21,12 @@
<!ENTITY autocompleteShowAddressbookAccesskey "Z">
<!ENTITY autocompleteWithColorLabel "Použít barvu adresáře">
<!ENTITY autocompleteWithColorAccesskey "P">
<!ENTITY autocompleteRestrictSearchLabel "??Restrict searched fields??">
<!ENTITY autocompleteRestrictSearchAccesskey "P">
<!ENTITY chooseAutocompleteRestrictSearchFieldsButtonLabel "Upravit">
<!ENTITY chooseAutocompleteRestrictSearchFieldsButtonAccesskey "U">
<!ENTITY resetAutocompleteRestrictSearchFieldsButtonLabel "Obnovit na výchozí hodnotu">
<!ENTITY resetAutocompleteRestrictSearchFieldsButtonAccesskey "O">
<!ENTITY useColorLabel "Použít barvu adresáře jako:">
<!ENTITY useColorBackgroundLabel "Barvu pozadí">
<!ENTITY useColorBackgroundAccesskey "i">
......@@ -47,7 +53,6 @@
<!ENTITY emailsCollectionMailNameLabel "E-mailový účet">
<!ENTITY emailsCollectionABNameLabel "Adresář">
<!ENTITY emailsCollectionCatNameLabel "Kategorie">
<!ENTITY emailsCollectionIncludeNameLabel "Typ">
<!ENTITY addEmailsCollectionLabel "Přidat">
<!ENTITY addEmailsCollectionAccesskey "P">
<!ENTITY renameEmailsCollectionLabel "Upravit">
......
......@@ -254,6 +254,7 @@ regionLabel=Region
postalCodeLabel=Postnummer
countryLabel=Land
ageLabel=Alder
ABNameLabel=Adressebogsnavn
warningTitle=Advarsel
errorTitle=Fejl
......@@ -357,6 +358,9 @@ accountDeletiondeleteContentFileMessage=slet fil %S
accountDeletiondeleteContentDirMessage=slet katalog %S
directoryDeletionConfirmMessage=Kataloget %S er ikke tomt. Er du sikker på at du vil slette alle objekter fra dette katalog?
choiceMappingTitle=??Field Choice??
choiceavailableColumnsGroupboxLabel=Tilgængelige kolonner
choiceaddedColumnsGroupboxLabel=Valgte kolonner
exportMappingTitle=Kolonner til eksport
exportavailableColumnsGroupboxLabel=Tilgængelige kolonner
exportaddedColumnsGroupboxLabel=Valgte kolonner
......
......@@ -21,6 +21,12 @@
<!ENTITY autocompleteShowAddressbookAccesskey "V">
<!ENTITY autocompleteWithColorLabel "Brug adressebogsfarve">
<!ENTITY autocompleteWithColorAccesskey "B">
<!ENTITY autocompleteRestrictSearchLabel "??Restrict searched fields??">
<!ENTITY autocompleteRestrictSearchAccesskey "P">
<!ENTITY chooseAutocompleteRestrictSearchFieldsButtonLabel "Rediger">
<!ENTITY chooseAutocompleteRestrictSearchFieldsButtonAccesskey "R">
<!ENTITY resetAutocompleteRestrictSearchFieldsButtonLabel "Gendan standardvalg">
<!ENTITY resetAutocompleteRestrictSearchFieldsButtonAccesskey "G">
<!ENTITY useColorLabel "Brug adressebogs farve til:">
<!ENTITY useColorBackgroundLabel "Baggrundsfarve">
<!ENTITY useColorBackgroundAccesskey "g">
......@@ -47,7 +53,6 @@
<!ENTITY emailsCollectionMailNameLabel "Mailkonto">
<!ENTITY emailsCollectionABNameLabel "Adressebog">
<!ENTITY emailsCollectionCatNameLabel "Kategori">
<!ENTITY emailsCollectionIncludeNameLabel "Type">
<!ENTITY addEmailsCollectionLabel "Tilføj">
<!ENTITY addEmailsCollectionAccesskey "T">
<!ENTITY renameEmailsCollectionLabel "Rediger">
......
......@@ -254,6 +254,7 @@ regionLabel=Region
postalCodeLabel=Postleitzahl
countryLabel=Land
ageLabel=Jahre
ABNameLabel=Adressbuch-Name
warningTitle=Warnung
errorTitle=Fehler
......@@ -357,6 +358,9 @@ accountDeletiondeleteContentFileMessage=Datei %S löschen
accountDeletiondeleteContentDirMessage=Verzeichnis %S löschen
directoryDeletionConfirmMessage=Das Verzeichnis %S ist nicht leer. Sind Sie sicher, dass Sie den gesamten Inhalt des Verzeichnisses löschen möchten?
choiceMappingTitle=??Field Choice??
choiceavailableColumnsGroupboxLabel=Verfügbare Spalten
choiceaddedColumnsGroupboxLabel=Ausgewählte Spalten
exportMappingTitle=Spalten für den Export
exportavailableColumnsGroupboxLabel=Verfügbare Spalten
exportaddedColumnsGroupboxLabel=Ausgewählte Spalten
......
<!ENTITY existingDataGroupboxLabel "Füge zu diesem Kontakt hinzu">
<!ENTITY existingDataGroupboxLabel "Diesem Kontakt hinzufügen">
<!ENTITY cardbookSwitchButtonTooltip "Vertausche Nachname und Vorname">
<!ENTITY cardbookCalendarButtonTooltip "Einen Termin einfügen">
<!ENTITY descriptionTextbox "Beschreibung">
......@@ -21,6 +21,12 @@
<!ENTITY autocompleteShowAddressbookAccesskey "Z">
<!ENTITY autocompleteWithColorLabel "Benutze die Farbe des Adressbuchs">
<!ENTITY autocompleteWithColorAccesskey "F">
<!ENTITY autocompleteRestrictSearchLabel "??Restrict searched fields??">
<!ENTITY autocompleteRestrictSearchAccesskey "P">
<!ENTITY chooseAutocompleteRestrictSearchFieldsButtonLabel "Bearbeiten">
<!ENTITY chooseAutocompleteRestrictSearchFieldsButtonAccesskey "B">
<!ENTITY resetAutocompleteRestrictSearchFieldsButtonLabel "Zurücksetzen auf Standard">
<!ENTITY resetAutocompleteRestrictSearchFieldsButtonAccesskey "Z">
<!ENTITY useColorLabel "Benutze die Farbe des Adressbuchs als:">
<!ENTITY useColorBackgroundLabel "Hintergrundfarbe">
<!ENTITY useColorBackgroundAccesskey "g">
......@@ -47,7 +53,6 @@
<!ENTITY emailsCollectionMailNameLabel "Email-Konto">
<!ENTITY emailsCollectionABNameLabel "Adressbuch">
<!ENTITY emailsCollectionCatNameLabel "Kategorie">
<!ENTITY emailsCollectionIncludeNameLabel "Art">
<!ENTITY addEmailsCollectionLabel "Hinzufügen">
<!ENTITY addEmailsCollectionAccesskey "H">
<!ENTITY renameEmailsCollectionLabel "Bearbeiten">
......
......@@ -254,6 +254,7 @@ regionLabel=Region (State or Province)
postalCodeLabel=Postal code
countryLabel=Country
ageLabel=Age
ABNameLabel=Address Book Name
warningTitle=Warning
errorTitle=Error
......@@ -357,6 +358,9 @@ accountDeletiondeleteContentFileMessage=delete file %S
accountDeletiondeleteContentDirMessage=delete directory %S
directoryDeletionConfirmMessage=The directory %S is not empty. Are you sure you want to delete all objects from this directory?
choiceMappingTitle=Field Choice
choiceavailableColumnsGroupboxLabel=Available Columns
choiceaddedColumnsGroupboxLabel=Selected Columns
exportMappingTitle=Field Mapping Choice
exportavailableColumnsGroupboxLabel=Available Columns
exportaddedColumnsGroupboxLabel=Selected Columns
......
......@@ -21,6 +21,12 @@
<!ENTITY autocompleteShowAddressbookAccesskey "S">
<!ENTITY autocompleteWithColorLabel "Use address book color">
<!ENTITY autocompleteWithColorAccesskey "c">
<!ENTITY autocompleteRestrictSearchLabel "Restrict searched fields">
<!ENTITY autocompleteRestrictSearchAccesskey "R">
<!ENTITY chooseAutocompleteRestrictSearchFieldsButtonLabel "Edit">
<!ENTITY chooseAutocompleteRestrictSearchFieldsButtonAccesskey "E">
<!ENTITY resetAutocompleteRestrictSearchFieldsButtonLabel "Restore to Default">
<!ENTITY resetAutocompleteRestrictSearchFieldsButtonAccesskey "D">
<!ENTITY useColorLabel "Use address book color for:">
<!ENTITY useColorBackgroundLabel "Background color">
<!ENTITY useColorBackgroundAccesskey "B">
......
......@@ -254,6 +254,7 @@ regionLabel=Région
postalCodeLabel=Code postal
countryLabel=Pays
ageLabel=Âge
ABNameLabel=Nom du carnet d’adresses
warningTitle=Avertissement
errorTitle=Erreur
......@@ -357,6 +358,9 @@ accountDeletiondeleteContentFileMessage=supprimer le fichier %S
accountDeletiondeleteContentDirMessage=supprimer le répertoire %S
directoryDeletionConfirmMessage=Le répertoire %S n'est pas vide. Voulez-vous supprimer tous les objets de ce répertoire ?
choiceMappingTitle=Choix des colonnes