Commit 244de09b authored by CardBook's avatar CardBook

version 29.5

parent 93ecb409
......@@ -192,6 +192,8 @@ if ("undefined" == typeof(cardbookBirthdaysUtils)) {
iCalString += "CATEGORIES:" + calendarEntryCategories + "\n";
}
iCalString += "TRANSP:TRANSPARENT\n";
var eventEntryWholeDay = cardbookPreferences.getBoolPref("extensions.cardbook.eventEntryWholeDay");
if (eventEntryWholeDay) {
iCalString += "DTSTART:" + aDate + "\n";
......
......@@ -592,8 +592,8 @@ if ("undefined" == typeof(wdw_cardEdition)) {
myPopup.appendChild(menuItem);
document.getElementById('contactMenulist').selectedIndex = 0;
var mySortedContacts = [];
for (var i = 0; i < cardbookRepository.cardbookDisplayCards[myAddressBookId].length; i++) {
var myCard = cardbookRepository.cardbookDisplayCards[myAddressBookId][i];
for (var i = 0; i < cardbookRepository.cardbookDisplayCards[myAddressBookId].cards.length; i++) {
var myCard = cardbookRepository.cardbookDisplayCards[myAddressBookId].cards[i];
if (!myCard.isAList) {
mySortedContacts.push([myCard.fn, myCard.uid]);
}
......
......@@ -393,8 +393,8 @@ if ("undefined" == typeof(cardbookElementTools)) {
var defaultIndex = 0;
var j = 0;
var sortedContacts = [];
for (var i = 0; i < cardbookRepository.cardbookDisplayCards[aDirPrefId].length; i++) {
sortedContacts.push([cardbookRepository.cardbookDisplayCards[aDirPrefId][i].fn, cardbookRepository.cardbookDisplayCards[aDirPrefId][i].uid]);
for (var i = 0; i < cardbookRepository.cardbookDisplayCards[aDirPrefId].cards.length; i++) {
sortedContacts.push([cardbookRepository.cardbookDisplayCards[aDirPrefId].cards[i].fn, cardbookRepository.cardbookDisplayCards[aDirPrefId].cards[i].uid]);
}
sortedContacts = cardbookUtils.sortArrayByString(sortedContacts,0,1);
for (var i = 0; i < sortedContacts.length; i++) {
......
This diff is collapsed.
......@@ -89,6 +89,7 @@ if ("undefined" == typeof(cardbookSynchronization)) {
cardbookRepository.cardbookImageGetRequest[aPrefId] = 0;
cardbookRepository.cardbookImageGetResponse[aPrefId] = 0;
cardbookRepository.cardbookImageGetError[aPrefId] = 0;
cardbookRepository.cardbookServerNotPushed[aPrefId] = 0;
},
finishMultipleOperations: function(aPrefId) {
......@@ -264,6 +265,12 @@ if ("undefined" == typeof(cardbookSynchronization)) {
}
},
getModifsPushed: function(aPrefId) {
return cardbookRepository.cardbookServerUpdatedRequest[aPrefId] +
cardbookRepository.cardbookServerCreatedRequest[aPrefId] +
cardbookRepository.cardbookServerDeletedRequest[aPrefId];
},
finishOpenFile: function(aPrefId, aPrefName) {
var errorNum = cardbookRepository.cardbookServerUpdatedError[aPrefId] + cardbookRepository.cardbookServerCreatedError[aPrefId];
if (errorNum === 0) {
......@@ -296,9 +303,9 @@ if ("undefined" == typeof(cardbookSynchronization)) {
cardbookUtils.formatStringForOutput("synchroModifGetOKFromServer", [aPrefName, cardbookRepository.cardbookServerGetResponse[aPrefId]]);
cardbookUtils.formatStringForOutput("synchroModifGetKOFromServer", [aPrefName, cardbookRepository.cardbookServerGetError[aPrefId]]);
var error = cardbookRepository.cardbookServerCreatedError[aPrefId] + cardbookRepository.cardbookServerUpdatedError[aPrefId] + cardbookRepository.cardbookServerDeletedError[aPrefId];
var success = cardbookRepository.cardbookServerCreatedResponse[aPrefId] + cardbookRepository.cardbookServerUpdatedResponse[aPrefId] + cardbookRepository.cardbookServerDeletedResponse[aPrefId] - error;
cardbookUtils.formatStringForOutput("synchroModifPutOKFromServer", [aPrefName, success]);
cardbookUtils.formatStringForOutput("synchroModifPutKOFromServer", [aPrefName, error]);
var success = cardbookRepository.cardbookServerCreatedResponse[aPrefId] + cardbookRepository.cardbookServerUpdatedResponse[aPrefId] + cardbookRepository.cardbookServerDeletedResponse[aPrefId] - error - cardbookRepository.cardbookServerNotPushed[aPrefId];
cardbookUtils.formatStringForOutput("synchroModifPutOKToServer", [aPrefName, success]);
cardbookUtils.formatStringForOutput("synchroModifPutKOToServer", [aPrefName, error]);
cardbookUtils.formatStringForOutput("imageGetResponse", [aPrefName, cardbookRepository.cardbookImageGetResponse[aPrefId]]);
cardbookUtils.formatStringForOutput("imageGetError", [aPrefName, cardbookRepository.cardbookImageGetError[aPrefId]]);
} else {
......@@ -724,10 +731,16 @@ if ("undefined" == typeof(cardbookSynchronization)) {
cardbookRepository.cardbookServerDeletedResponse[aConnection.connPrefId]++;
}
};
cardbookUtils.nullifyTagModification(aCard);
var request = new cardbookWebDAV(aConnection, listener_delete);
cardbookUtils.formatStringForOutput("serverCardSendingDeletion", [aConnection.connDescription, aCard.fn]);
request.delete();
if (cardbookSynchronization.getModifsPushed(aConnection.connPrefId) <= cardbookPreferences.getMaxModifsPushed()) {
cardbookUtils.nullifyTagModification(aCard);
var request = new cardbookWebDAV(aConnection, listener_delete);
cardbookUtils.formatStringForOutput("serverCardSendingDeletion", [aConnection.connDescription, aCard.fn]);
request.delete();
} else {
cardbookRepository.cardbookServerSyncDone[aConnection.connPrefId]++;
cardbookRepository.cardbookServerDeletedResponse[aConnection.connPrefId]++;
cardbookRepository.cardbookServerNotPushed[aConnection.connPrefId]++;
}
},
serverUpdate: function(aConnection, aMode, aCard, aModifiedCard, aPrefIdType) {
......@@ -756,12 +769,17 @@ if ("undefined" == typeof(cardbookSynchronization)) {
cardbookRepository.cardbookServerUpdatedResponse[aConnection.connPrefId]++;
}
};
cardbookUtils.nullifyTagModification(aModifiedCard);
var request = new cardbookWebDAV(aConnection, listener_update, aModifiedCard.etag);
var cardContent = cardbookUtils.getvCardForServer(aModifiedCard, true);
cardbookUtils.formatStringForOutput("serverCardSendingUpdate", [aConnection.connDescription, aModifiedCard.fn]);
request.put(cardContent, "text/vcard; charset=utf-8");
if (cardbookSynchronization.getModifsPushed(aConnection.connPrefId) <= cardbookPreferences.getMaxModifsPushed()) {
cardbookUtils.nullifyTagModification(aModifiedCard);
var request = new cardbookWebDAV(aConnection, listener_update, aModifiedCard.etag);
var cardContent = cardbookUtils.getvCardForServer(aModifiedCard, true);
cardbookUtils.formatStringForOutput("serverCardSendingUpdate", [aConnection.connDescription, aModifiedCard.fn]);
request.put(cardContent, "text/vcard; charset=utf-8");
} else {
cardbookRepository.cardbookServerSyncDone[aConnection.connPrefId]++;
cardbookRepository.cardbookServerUpdatedResponse[aConnection.connPrefId]++;
cardbookRepository.cardbookServerNotPushed[aConnection.connPrefId]++;
}
},
serverCreate: function(aConnection, aMode, aCard, aPrefIdType) {
......@@ -791,15 +809,20 @@ if ("undefined" == typeof(cardbookSynchronization)) {
cardbookRepository.cardbookServerSyncDone[aConnection.connPrefId]++;
}
};
cardbookUtils.prepareCardForCreation(aCard, aPrefIdType, aConnection.connUrl);
aConnection.connUrl = aCard.cardurl;
cardbookUtils.nullifyTagModification(aCard);
cardbookUtils.addEtag(aCard, "0");
var request = new cardbookWebDAV(aConnection, listener_create, aCard.etag);
var cardContent = cardbookUtils.getvCardForServer(aCard, true);
cardbookUtils.formatStringForOutput("serverCardSendingCreate", [aConnection.connDescription, aCard.fn]);
request.put(cardContent, "text/vcard; charset=utf-8");
if (cardbookSynchronization.getModifsPushed(aConnection.connPrefId) <= cardbookPreferences.getMaxModifsPushed()) {
cardbookUtils.prepareCardForCreation(aCard, aPrefIdType, aConnection.connUrl);
aConnection.connUrl = aCard.cardurl;
cardbookUtils.nullifyTagModification(aCard);
cardbookUtils.addEtag(aCard, "0");
var request = new cardbookWebDAV(aConnection, listener_create, aCard.etag);
var cardContent = cardbookUtils.getvCardForServer(aCard, true);
cardbookUtils.formatStringForOutput("serverCardSendingCreate", [aConnection.connDescription, aCard.fn]);
request.put(cardContent, "text/vcard; charset=utf-8");
} else {
cardbookRepository.cardbookServerSyncDone[aConnection.connPrefId]++;
cardbookRepository.cardbookServerCreatedResponse[aConnection.connPrefId]++;
cardbookRepository.cardbookServerNotPushed[aConnection.connPrefId]++;
}
},
serverGetForMerge: function(aConnection, aMode, aEtag, aCacheCard, aPrefIdType) {
......
......@@ -1594,8 +1594,8 @@ if ("undefined" == typeof(cardbookUtils)) {
},
getPositionOfCardId: function(aAccountId, aCardId) {
for (var i = 0; i < cardbookRepository.cardbookDisplayCards[aAccountId].length; i++) {
if (cardbookRepository.cardbookDisplayCards[aAccountId][i].uid == aCardId) {
for (var i = 0; i < cardbookRepository.cardbookDisplayCards[aAccountId].cards.length; i++) {
if (cardbookRepository.cardbookDisplayCards[aAccountId].cards[i].uid == aCardId) {
return i;
}
}
......@@ -1781,8 +1781,8 @@ if ("undefined" == typeof(cardbookUtils)) {
} else {
var myAccountPrefId = myTree.view.getCellText(myTree.currentIndex, {id: "accountId"});
}
for (var i = 0; i < cardbookRepository.cardbookDisplayCards[myAccountPrefId].length; i++) {
listOfSelectedCard.push(cardbookRepository.cardbookDisplayCards[myAccountPrefId][i]);
for (var i = 0; i < cardbookRepository.cardbookDisplayCards[myAccountPrefId].cards.length; i++) {
listOfSelectedCard.push(cardbookRepository.cardbookDisplayCards[myAccountPrefId].cards[i]);
}
return listOfSelectedCard;
}
......
......@@ -563,6 +563,8 @@
name="extensions.cardbook.requestsTimeout" type="string"/>
<preference id="extensions.cardbook.multiget"
name="extensions.cardbook.multiget" type="string"/>
<preference id="extensions.cardbook.maxModifsPushed"
name="extensions.cardbook.maxModifsPushed" type="string"/>
<preference id="extensions.cardbook.discoveryAccountsNameList"
name="extensions.cardbook.discoveryAccountsNameList" type="string"/>
<preference id="extensions.cardbook.decodeReport"
......@@ -593,6 +595,7 @@
control="solveConflictsRadiogroup"
id="solveConflicts"/>
</hbox>
<separator class="thin"/>
<hbox flex="1" align="center">
<radiogroup id="solveConflictsRadiogroup" orient="horizontal" preference="extensions.cardbook.solveConflicts" class="indent">
<radio value="Local" label="&solveConflictsLocalLabel;" accesskey="&solveConflictsLocalAccesskey;"/>
......@@ -600,6 +603,15 @@
<radio value="User" label="&solveConflictsUserLabel;" accesskey="&solveConflictsUserAccesskey;"/>
</radiogroup>
</hbox>
<separator class="thin"/>
<hbox align="center">
<label value="&maxModifsPushedLabel;"
accesskey="&maxModifsPushedAccesskey;"
control="maxModifsPushedTextBox"
id="maxModifsPushed"/>
<textbox id="maxModifsPushedTextBox"
preference="extensions.cardbook.maxModifsPushed"/>
</hbox>
</groupbox>
<groupbox>
......
......@@ -205,8 +205,8 @@ if ("undefined" == typeof(wdw_cardbookContactsSidebar)) {
wdw_cardbookContactsSidebar.catExclRestrictions, wdw_cardbookContactsSidebar.catInclRestrictions)) {
var myEmails = [] ;
var myFormattedEmails = [];
for (var k = 0; k < cardbookRepository.cardbookDisplayCards[myDirPrefId+"::"+myCategory].length; k++) {
var myCard = cardbookRepository.cardbookDisplayCards[myDirPrefId+"::"+myCategory][k];
for (var k = 0; k < cardbookRepository.cardbookDisplayCards[myDirPrefId+"::"+myCategory].cards.length; k++) {
var myCard = cardbookRepository.cardbookDisplayCards[myDirPrefId+"::"+myCategory].cards[k];
if (myCard.isAList) {
myEmails.push(myCard.fn);
myFormattedEmails.push(MailServices.headerParser.makeMimeAddress(myCard.fn, myCard.fn));
......@@ -262,8 +262,8 @@ if ("undefined" == typeof(wdw_cardbookContactsSidebar)) {
if (cardbookRepository.makeSearchString(myCategory).includes(searchInput) || searchInput == "") {
var myEmails = [] ;
var myFormattedEmails = [];
for (var k = 0; k < cardbookRepository.cardbookDisplayCards[searchCategory].length; k++) {
var myCard = cardbookRepository.cardbookDisplayCards[searchCategory][k];
for (var k = 0; k < cardbookRepository.cardbookDisplayCards[searchCategory].cards.length; k++) {
var myCard = cardbookRepository.cardbookDisplayCards[searchCategory].cards[k];
if (wdw_cardbookContactsSidebar.catExclRestrictions[myDirPrefId]) {
var add = true;
for (var l in wdw_cardbookContactsSidebar.catExclRestrictions[myDirPrefId]) {
......@@ -295,10 +295,10 @@ if ("undefined" == typeof(wdw_cardbookContactsSidebar)) {
if (cardbookRepository.verifyABRestrictions(myDirPrefId, searchAB, wdw_cardbookContactsSidebar.ABExclRestrictions, wdw_cardbookContactsSidebar.ABInclRestrictions)) {
// first add cards
if ((searchCategory === "allCategories") || (searchCategory === "noCategory") || (searchCategory === "onlyCategories")) {
for (var j = 0; j < cardbookRepository.cardbookDisplayCards[myDirPrefId].length; j++) {
for (var j = 0; j < cardbookRepository.cardbookDisplayCards[myDirPrefId].cards.length; j++) {
// All No categories
if (searchCategory !== "onlyCategories") {
var myCard = cardbookRepository.cardbookDisplayCards[myDirPrefId][j];
var myCard = cardbookRepository.cardbookDisplayCards[myDirPrefId].cards[j];
var myDirPrefName = cardbookUtils.getPrefNameFromPrefId(myCard.dirPrefId);
if (cardbookRepository.getLongSearchString(myCard).includes(searchInput) || searchInput == "") {
if (wdw_cardbookContactsSidebar.catExclRestrictions[myDirPrefId]) {
......@@ -341,8 +341,8 @@ if ("undefined" == typeof(wdw_cardbookContactsSidebar)) {
} else {
var mySepPosition = searchCategory.indexOf("::",0);
var myCategory = searchCategory.substr(mySepPosition+2,searchCategory.length);
for (var j = 0; j < cardbookRepository.cardbookDisplayCards[myDirPrefId+'::'+myCategory].length; j++) {
var myCard = cardbookRepository.cardbookDisplayCards[myDirPrefId+'::'+myCategory][j];
for (var j = 0; j < cardbookRepository.cardbookDisplayCards[myDirPrefId+'::'+myCategory].cards.length; j++) {
var myCard = cardbookRepository.cardbookDisplayCards[myDirPrefId+'::'+myCategory].cards[j];
var myDirPrefName = cardbookUtils.getPrefNameFromPrefId(myCard.dirPrefId);
// All No categories
if (searchCategory !== "onlyCategories") {
......@@ -398,8 +398,8 @@ if ("undefined" == typeof(wdw_cardbookContactsSidebar)) {
}
var myEmails = [] ;
var myFormattedEmails = [];
for (var k = 0; k < cardbookRepository.cardbookDisplayCards[myDirPrefId+"::"+myCategory].length; k++) {
var myCard = cardbookRepository.cardbookDisplayCards[myDirPrefId+"::"+myCategory][k];
for (var k = 0; k < cardbookRepository.cardbookDisplayCards[myDirPrefId+"::"+myCategory].cards.length; k++) {
var myCard = cardbookRepository.cardbookDisplayCards[myDirPrefId+"::"+myCategory].cards[k];
if (myCard.isAList) {
myEmails.push(myCard.fn);
myFormattedEmails.push(MailServices.headerParser.makeMimeAddress(myCard.fn, myCard.fn));
......
......@@ -141,8 +141,8 @@ if ("undefined" == typeof(wdw_findDuplicates)) {
var myTmpResultDirPrefId = [];
wdw_findDuplicates.gResultsDirPrefId = [];
if (aDirPrefId != null && aDirPrefId !== undefined && aDirPrefId != "") {
for (var i = 0; i < cardbookRepository.cardbookDisplayCards[aDirPrefId].length; i++) {
var myCard = cardbookRepository.cardbookDisplayCards[aDirPrefId][i];
for (var i = 0; i < cardbookRepository.cardbookDisplayCards[aDirPrefId].cards.length; i++) {
var myCard = cardbookRepository.cardbookDisplayCards[aDirPrefId].cards[i];
if (!myCard.isAList) {
myCardArray.push([wdw_findDuplicates.generateCardArray(myCard), myCard, true]);
}
......
......@@ -39,6 +39,7 @@ if ("undefined" == typeof(ovl_synchro)) {
prefs.setCharPref("solveConflicts", "User");
prefs.setCharPref("discoveryAccountsNameList", "");
prefs.setCharPref("multiget", "40");
prefs.setCharPref("maxModifsPushed", "40");
prefs.setBoolPref("decodeReport", true);
prefs.setBoolPref("preferEmailPref", true);
......@@ -94,7 +95,7 @@ if ("undefined" == typeof(ovl_synchro)) {
prefs.setCharPref("accountsShown", "all");
prefs.setCharPref("accountShown", "");
prefs.setCharPref("uncategorizedCards", "");
prefs.setCharPref("addonVersion", "29.4");
prefs.setCharPref("addonVersion", "29.5");
},
lEventTimerSync : { notify: function(lTimerSync) {
......
......@@ -811,6 +811,15 @@ if ("undefined" == typeof(cardbookPreferences)) {
}
},
getMaxModifsPushed: function () {
let maxModifsPushed = this.getStringPref(this.prefCardBookRoot + "maxModifsPushed");
if (maxModifsPushed != null && maxModifsPushed !== undefined && maxModifsPushed != "") {
return maxModifsPushed;
} else {
return "60";
}
},
delBranch: function (aDirPrefId) {
try {
Services.prefs.deleteBranch(this.prefCardBookData + aDirPrefId);
......
......@@ -271,8 +271,8 @@ if ("undefined" == typeof(wdw_cardbook)) {
var mySelectedAccount = cardbookRepository.cardbookSearchValue;
if (cardbookRepository.cardbookDisplayCards[mySelectedAccount]) {
wdw_cardbook.sortCardsTreeCol();
if (cardbookRepository.cardbookDisplayCards[mySelectedAccount].length == 1) {
wdw_cardbook.displayCard(cardbookRepository.cardbookCards[cardbookRepository.cardbookDisplayCards[mySelectedAccount][0].cbid]);
if (cardbookRepository.cardbookDisplayCards[mySelectedAccount].cards.length == 1) {
wdw_cardbook.displayCard(cardbookRepository.cardbookCards[cardbookRepository.cardbookDisplayCards[mySelectedAccount].cards[0].cbid]);
if (myTree.currentIndex != 0) {
myTree.view.selection.select(0);
}
......@@ -536,7 +536,7 @@ if ("undefined" == typeof(wdw_cardbook)) {
generateFn: function (aAccountId) {
try {
var myCards = cardbookRepository.cardbookDisplayCards[aAccountId];
var myCards = cardbookRepository.cardbookDisplayCards[aAccountId].cards;
for (var i = 0; i < myCards.length; i++) {
var myCard = myCards[i];
var myOutCard = new cardbookCardParser();
......@@ -1352,7 +1352,7 @@ if ("undefined" == typeof(wdw_cardbook)) {
}
}
if (cardbookRepository.cardbookDisplayCards[mySelectedAccount]) {
cardbookRepository.cardbookDisplayCards[mySelectedAccount] = cardbookUtils.sortCardsTreeArrayByString(cardbookRepository.cardbookDisplayCards[mySelectedAccount], columnName, order);
cardbookRepository.cardbookDisplayCards[mySelectedAccount].cards = cardbookUtils.sortCardsTreeArrayByString(cardbookRepository.cardbookDisplayCards[mySelectedAccount].cards, columnName, order);
} else {
return;
}
......@@ -1362,7 +1362,7 @@ if ("undefined" == typeof(wdw_cardbook)) {
myTree.setAttribute("sortDirection", order == 1 ? "ascending" : "descending");
myTree.setAttribute("sortResource", columnName);
wdw_cardbook.displayAccountOrCat(cardbookRepository.cardbookDisplayCards[mySelectedAccount]);
wdw_cardbook.displayAccountOrCat(cardbookRepository.cardbookDisplayCards[mySelectedAccount].cards);
//set the appropriate attributes to show to indicator
var cols = myTree.getElementsByTagName("treecol");
......@@ -1437,10 +1437,10 @@ if ("undefined" == typeof(wdw_cardbook)) {
} else {
var myAccountPrefId = myTree.view.getCellText(myTree.currentIndex, {id: "accountId"});
}
for (var i = 0; i < cardbookRepository.cardbookDisplayCards[myAccountPrefId].length; i++) {
var myId = cardbookRepository.cardbookDisplayCards[myAccountPrefId][i].cbid;
for (var i = 0; i < cardbookRepository.cardbookDisplayCards[myAccountPrefId].cards.length; i++) {
var myId = cardbookRepository.cardbookDisplayCards[myAccountPrefId].cards[i].cbid;
listOfUid.push(myId);
var myCard = cardbookRepository.cardbookDisplayCards[myAccountPrefId][i];
var myCard = cardbookRepository.cardbookDisplayCards[myAccountPrefId].cards[i];
var vCard = encodeURIComponent(cardbookUtils.getvCardForEmail(myCard));
var emails = cardbookUtils.getMimeEmailsFromCardsAndLists([myCard], useOnlyEmail);
aEvent.dataTransfer.mozSetDataAt("text/vcard", vCard, myCount);
......@@ -1582,14 +1582,15 @@ if ("undefined" == typeof(wdw_cardbook)) {
cardbookRepository.cardbookSearchValue = cardbookRepository.makeSearchString(document.getElementById('cardbookSearchInput').value);
var myRegexp = new RegExp(cardbookRepository.cardbookSearchValue.replace("*", "(.*)"), "i");
cardbookRepository.cardbookDisplayCards[cardbookRepository.cardbookSearchValue] = [];
cardbookRepository.cardbookDisplayCards[cardbookRepository.cardbookSearchValue] = {modified: 0, cards: []};
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.cardbookCardLongSearch[myDirPrefId]) {
if (cardbookRepository.cardbookSearchValue == "" || j.search(myRegexp) != -1) {
for (var k = 0; k < cardbookRepository.cardbookCardLongSearch[myDirPrefId][j].length; k++) {
cardbookRepository.cardbookDisplayCards[cardbookRepository.cardbookSearchValue].push(cardbookRepository.cardbookCardLongSearch[myDirPrefId][j][k]);
cardbookRepository.cardbookDisplayCards[cardbookRepository.cardbookSearchValue].cards.push(cardbookRepository.cardbookCardLongSearch[myDirPrefId][j][k]);
cardbookRepository.addCardToDisplayModified(cardbookRepository.cardbookCardLongSearch[myDirPrefId][j][k], cardbookRepository.cardbookSearchValue);
}
}
}
......@@ -2156,7 +2157,7 @@ if ("undefined" == typeof(wdw_cardbook)) {
} else {
var myDirPrefIdName = cardbookPreferences.getName(aDirPrefId);
var myCards = cardbookRepository.cardbookDisplayCards[aDirPrefId+"::"+aCategoryName];
var myCards = cardbookRepository.cardbookDisplayCards[aDirPrefId+"::"+aCategoryName].cards;
for (var i = 0; i < myCards.length; i++) {
var myCard = myCards[i];
// as it is possible to rename a category from a virtual folder
......@@ -2196,14 +2197,14 @@ if ("undefined" == typeof(wdw_cardbook)) {
}
var strBundle = Services.strings.createBundle("chrome://cardbook/locale/cardbook.properties");
var confirmTitle = strBundle.GetStringFromName("confirmTitle");
var cardsCount = cardbookRepository.cardbookDisplayCards[aDirPrefId+"::"+aCategoryName].length;
var cardsCount = cardbookRepository.cardbookDisplayCards[aDirPrefId+"::"+aCategoryName].cards.length;
var confirmMsg = PluralForm.get(cardsCount, strBundle.GetStringFromName("catDeletionsConfirmMessagePF"));
confirmMsg = confirmMsg.replace("%1", cardsCount).replace("%2", aCategoryName);
if (Services.prompt.confirm(window, confirmTitle, confirmMsg)) {
var myDirPrefIdName = cardbookPreferences.getName(aDirPrefId);
var myCards = cardbookRepository.cardbookDisplayCards[aDirPrefId+"::"+aCategoryName];
var myCards = cardbookRepository.cardbookDisplayCards[aDirPrefId+"::"+aCategoryName].cards;
for (var i = 0; i < myCards.length; i++) {
var myCard = myCards[i];
// as it is possible to remove a category from a virtual folder
......@@ -2242,7 +2243,7 @@ if ("undefined" == typeof(wdw_cardbook)) {
return;
}
var myCards = cardbookRepository.cardbookDisplayCards[aDirPrefId+"::"+aCategoryName];
var myCards = cardbookRepository.cardbookDisplayCards[aDirPrefId+"::"+aCategoryName].cards;
var myDirPrefIds = {}
for (var i = 0; i < myCards.length; i++) {
var myCard = myCards[i];
......@@ -2882,14 +2883,22 @@ if ("undefined" == typeof(wdw_cardbook)) {
if (cardbookRepository.cardbookSearchMode === "SEARCH") {
var myAccountId = cardbookRepository.cardbookSearchValue;
if (cardbookRepository.cardbookDisplayCards[myAccountId]) {
var myMessage = strBundle.getFormattedString("numberContactsFound", [cardbookRepository.cardbookDisplayCards[myAccountId].length]);
if (cardbookRepository.cardbookDisplayCards[myAccountId].modified > 0) {
var myMessage = strBundle.getFormattedString("numberContactsFoundModified", [cardbookRepository.cardbookDisplayCards[myAccountId].cards.length, cardbookRepository.cardbookDisplayCards[myAccountId].modified]);
} else {
var myMessage = strBundle.getFormattedString("numberContactsFound", [cardbookRepository.cardbookDisplayCards[myAccountId].cards.length]);
}
} else {
var myMessage = "";
}
} else {
try {
var myAccountId = myTree.view.getCellText(myTree.currentIndex, {id: "accountId"});
var myMessage = strBundle.getFormattedString("numberContacts", [cardbookRepository.cardbookDisplayCards[myAccountId].length]);
if (cardbookRepository.cardbookDisplayCards[myAccountId].modified > 0) {
var myMessage = strBundle.getFormattedString("numberContactsModified", [cardbookRepository.cardbookDisplayCards[myAccountId].cards.length, cardbookRepository.cardbookDisplayCards[myAccountId].modified]);
} else {
var myMessage = strBundle.getFormattedString("numberContacts", [cardbookRepository.cardbookDisplayCards[myAccountId].cards.length]);
}
}
catch(e) {
var myMessage = "";
......@@ -3031,10 +3040,10 @@ if ("undefined" == typeof(wdw_cardbook)) {
}
}
if (cardbookRepository.cardbookDisplayCards[myAccountId]) {
if (cardbookRepository.cardbookDisplayCards[myAccountId].length == 1) {
if (cardbookRepository.cardbookDisplayCards[myAccountId].cards.length == 1) {
var myTree = document.getElementById('cardsTree');
cardbookUtils.setSelectedCards([cardbookRepository.cardbookDisplayCards[myAccountId][0]], myTree.boxObject.getFirstVisibleRow(), myTree.boxObject.getLastVisibleRow());
wdw_cardbook.displayCard(cardbookRepository.cardbookDisplayCards[myAccountId][0]);
cardbookUtils.setSelectedCards([cardbookRepository.cardbookDisplayCards[myAccountId].cards[0]], myTree.boxObject.getFirstVisibleRow(), myTree.boxObject.getLastVisibleRow());
wdw_cardbook.displayCard(cardbookRepository.cardbookDisplayCards[myAccountId].cards[0]);
}
}
}
......
......@@ -69,8 +69,8 @@ synchroCardsUpdatedOnBoth=%1$S : Aktualizované kontakty na disku i na serveru :
synchroCardsUpdatedOnDiskDeletedOnServer=%1$S : Aktualizované kontakty na disku a smazané na serveru : %2$S
synchroModifGetOKFromServer=%1$S : Změny úspěšně získané ze serveru : %2$S
synchroModifGetKOFromServer=%1$S : Změny neúspěšně získané ze serveru : %2$S
synchroModifPutOKFromServer=%1$S : Změny úspěšně nahrané na server : %2$S
synchroModifPutKOFromServer=%1$S : Změny neúspěšně nahrané na server : %2$S
synchroModifPutOKToServer=%1$S : Změny úspěšně nahrané na server : %2$S
synchroModifPutKOToServer=%1$S : Změny neúspěšně nahrané na server : %2$S
synchroImpossible=%S : Synchronizace se serverem nemožná.
synchroDirFinishedResult=%S : Adresář otevřen, výsledek kontaktů :
synchroDirCardsOK=%1$S : Otevřeno kontaktů : %2$S
......@@ -212,6 +212,8 @@ validateIntegerMsg=Pole %1$S by mělo být nevyplněné, nebo celé číslo mezi
numberContactsFound=Počet nalazených kontaktů: %S
numberContacts=Počet kontaktů: %S
numberContactsFoundModified=??Počet nalazených kontaktů: %1$S (locally modified: %2$S)??
numberContactsModified=??Počet kontaktů: %1$S (locally modified: %2$S)??
numberLines=Počet řádků: %S
cardbook.searchFrom.name=CardBook od
......
......@@ -193,6 +193,8 @@
<!ENTITY solveConflictsRemoteAccesskey "S">
<!ENTITY solveConflictsUserLabel "Zeptat se uživatele">
<!ENTITY solveConflictsUserAccesskey "Z">
<!ENTITY maxModifsPushedLabel "??Maximum number of modifications pushed per synchronization??">
<!ENTITY maxModifsPushedAccesskey "??M??">
<!ENTITY requestsGroupboxLabel "Požadavky">
<!ENTITY requestsTimeoutLabel "Časový limit (sekundy)">
<!ENTITY requestsTimeoutAccesskey "L">
......
......@@ -69,8 +69,8 @@ synchroCardsUpdatedOnBoth=%1$S : Kontakter opdateret på disk og server : %2$S
synchroCardsUpdatedOnDiskDeletedOnServer=%1$S : Kontakter opdateret på disk og slettet fra server : %2$S
synchroModifGetOKFromServer=%1$S : Ændringer successfuldt hentet fra server : %2$S
synchroModifGetKOFromServer=%1$S : Ændringer hentet uden held fra server : %2$S
synchroModifPutOKFromServer=%1$S : Ændringer successfuldt sendt til serveren : %2$S
synchroModifPutKOFromServer=%1$S : Ændringer sendt uden held til serveren : %2$S
synchroModifPutOKToServer=%1$S : Ændringer successfuldt sendt til serveren : %2$S
synchroModifPutKOToServer=%1$S : Ændringer sendt uden held til serveren : %2$S
synchroImpossible=%S : Synkronisering umulig med serveren.
synchroDirFinishedResult=%S : Katalog åbnet, kontakterresultat :
synchroDirCardsOK=%1$S : Kontakter åbnet : %2$S
......@@ -212,6 +212,8 @@ validateIntegerMsg=Feltet %1$S bør være nul eller et heltal mellem 1 og %2$S (
numberContactsFound=Antal kontakter fundet: %S
numberContacts=Antal kontakter: %S
numberContactsFoundModified=??Antal kontakter fundet: %1$S (locally modified: %2$S)??
numberContactsModified=??Antal kontakter: %1$S (locally modified: %2$S)??
numberLines=Antal linjer: %S
cardbook.searchFrom.name=CardBook Fra
......
......@@ -193,6 +193,8 @@
<!ENTITY solveConflictsRemoteAccesskey "o">
<!ENTITY solveConflictsUserLabel "Spørg bruger">
<!ENTITY solveConflictsUserAccesskey "S">
<!ENTITY maxModifsPushedLabel "??Maximum number of modifications pushed per synchronization??">
<!ENTITY maxModifsPushedAccesskey "??M??">
<!ENTITY requestsGroupboxLabel "Forespørgsler">
<!ENTITY requestsTimeoutLabel "Tidsudløb (sekunder)">
<!ENTITY requestsTimeoutAccesskey "T">
......
......@@ -69,8 +69,8 @@ synchroCardsUpdatedOnBoth=%1$S: Lokal und auf dem Server aktualisierte Kontakte:
synchroCardsUpdatedOnDiskDeletedOnServer=%1$S: Lokal aktualisierte aber auf dem Server gelöschte Kontakte: %2$S
synchroModifGetOKFromServer=%1$S: Erfolgreich vom Server empfangene Änderungen: %2$S
synchroModifGetKOFromServer=%1$S: Erfolglos vom Server empfangene Änderungen: %2$S
synchroModifPutOKFromServer=%1$S: Erfolgreich an den Server gesendete Änderungen: %2$S
synchroModifPutKOFromServer=%1$S: Erfolglos an den Server gesendete Änderungen: %2$S
synchroModifPutOKToServer=%1$S: Erfolgreich an den Server gesendete Änderungen: %2$S
synchroModifPutKOToServer=%1$S: Erfolglos an den Server gesendete Änderungen: %2$S
synchroImpossible=%S: Synchronisation mit dem Server nicht möglich.
synchroDirFinishedResult=%S: Verzeichnis geöffnet, Ergebnisse:
synchroDirCardsOK=%1$S: Geöffnete Kontakte: %2$S
......@@ -212,6 +212,8 @@ validateIntegerMsg=Das Feld %1$S sollte leer oder eine Zahl zwischen 1 und %2$S
numberContactsFound=Anzahl gefundener Kontakte: %S
numberContacts=Anzahl der Kontakte: %S
numberContactsFoundModified=??Anzahl gefundener Kontakte: %1$S (locally modified: %2$S)??
numberContactsModified=??Anzahl der Kontakte: %1$S (locally modified: %2$S)??
numberLines=Anzahl Zeilen: %S
cardbook.searchFrom.name=CardBook Von (From)
......@@ -473,4 +475,4 @@ GOOGLENewTokenTitle=Neues Google-Token für CardBook
YAHOONewTokenTitle=Neues Yahoo!-Token für CardBook
invalidEmail=%1$S ist keine gültige E-Mail-Adresse, weil sie nicht dem Format "user@host" entspricht.
appendEmailLabel=??Add to list: %1$S??
appendEmailLabel=Zur liste hinzufügen: %1$S
......@@ -193,6 +193,8 @@
<!ENTITY solveConflictsRemoteAccesskey "S">
<!ENTITY solveConflictsUserLabel "Frage den Benutzer">
<!ENTITY solveConflictsUserAccesskey "B">
<!ENTITY maxModifsPushedLabel "??Maximum number of modifications pushed per synchronization??">
<!ENTITY maxModifsPushedAccesskey "??M??">
<!ENTITY requestsGroupboxLabel "Anfragen">
<!ENTITY requestsTimeoutLabel "Timeout (Sekunden)">
<!ENTITY requestsTimeoutAccesskey "T">
......
......@@ -5,6 +5,6 @@
<!ENTITY availableCardsGroupboxLabel "Verfügbare Kontakte">
<!ENTITY addedCardsGroupboxLabel "Ausgewählte Einträge">
<!ENTITY nameOrEmailLabel "Name oder E-Mail-Adresse">
<!ENTITY appendContactLabel "??Add to list??">
<!ENTITY appendContactLabel "Zur liste hinzufügen">
<!ENTITY deletelistTreeLabel "Aus Liste entfernen">
<!ENTITY editCardFromListLabel "Kontakt bearbeiten">
......@@ -69,8 +69,8 @@ synchroCardsUpdatedOnBoth=%1$S : Επαφές ενημερώνονται σε δ
synchroCardsUpdatedOnDiskDeletedOnServer=%1$S : Επαφές ενημερώθηκαν στο δίσκο και διαγράφηκαν από το διακομιστή : %2$S
synchroModifGetOKFromServer=%1$S : Τροποποιήσεις που ανακτήθηκαν με επιτυχία από το διακομιστή : %2$S
synchroModifGetKOFromServer=%1$S : Τροποποιήσεις που ανακτήθηκαν ανεπιτυχώς από το διακομιστή : %2$S
synchroModifPutOKFromServer=%1$S : Τροποποιήσεις προωθήθηκαν με επιτυχία στο διακομιστή : %2$S
synchroModifPutKOFromServer=%1$S : Τροποποιήσεις ώθησαν ανεπιτυχώς στο διακομιστή : %2$S
synchroModifPutOKToServer=%1$S : Τροποποιήσεις προωθήθηκαν με επιτυχία στο διακομιστή : %2$S
synchroModifPutKOToServer=%1$S : Τροποποιήσεις ώθησαν ανεπιτυχώς στο διακομιστή : %2$S
synchroImpossible=$S : Συγχρονισμός είναι αδύνατος με το διακομιστή.
synchroDirFinishedResult=$S : Κατάλογος άνοιξε, επαφές αποτέλεσμα :
synchroDirCardsOK=%1$S : Επαφές άνοιξαν : %2$S
......@@ -212,6 +212,8 @@ validateIntegerMsg=Πεδίο %1$S πρέπει να είναι μηδενικό
numberContactsFound=Αριθμός επαφών που βρέθηκαν: %S
numberContacts=Αριθμός επαφών: %S
numberContactsFoundModified=??Αριθμός επαφών που βρέθηκαν: %1$S (locally modified: %2$S)??
numberContactsModified=??Αριθμός επαφών: %1$S (locally modified: %2$S)??
numberLines=Αριθμός γραμμών: %S
cardbook.searchFrom.name=Επαφές Από
......
......@@ -193,6 +193,8 @@
<!ENTITY solveConflictsRemoteAccesskey "δ">
<!ENTITY solveConflictsUserLabel "Ρωτήστε το χρήστη">
<!ENTITY solveConflictsUserAccesskey "χ">
<!ENTITY maxModifsPushedLabel "??Maximum number of modifications pushed per synchronization??">
<!ENTITY maxModifsPushedAccesskey "??M??">
<!ENTITY requestsGroupboxLabel "Αιτήσεων">
<!ENTITY requestsTimeoutLabel "Τέλος χρόνου (1 δευτερόλεπτο)">
<!ENTITY requestsTimeoutAccesskey "Τ">
......
......@@ -69,8 +69,8 @@ synchroCardsUpdatedOnBoth=%1$S : Contacts updated on disk and server : %2$S
synchroCardsUpdatedOnDiskDeletedOnServer=%1$S : Contacts updated on disk and deleted from server : %2$S
synchroModifGetOKFromServer=%1$S : Modifications retrieved successfully from server : %2$S
synchroModifGetKOFromServer=%1$S : Modifications retrieved unsuccessfully from server : %2$S
synchroModifPutOKFromServer=%1$S : Modifications pushed successfully to the server : %2$S
synchroModifPutKOFromServer=%1$S : Modifications pushed unsuccessfully to the server : %2$S
synchroModifPutOKToServer=%1$S : Modifications pushed successfully to the server : %2$S
synchroModifPutKOToServer=%1$S : Modifications pushed unsuccessfully to the server : %2$S
synchroImpossible=%S : Synchronization impossible with the server.
synchroDirFinishedResult=%S : Directory opened, contacts result :
synchroDirCardsOK=%1$S : Contacts opened : %2$S
......@@ -212,6 +212,8 @@ validateIntegerMsg=The field %1$S should be null or an integer between 1 and %2$
numberContactsFound=Number of contacts found: %S
numberContacts=Number of contacts: %S
numberContactsFoundModified=Number of contacts found: %1$S (locally modified: %2$S)
numberContactsModified=Number of contacts: %1$S (locally modified: %2$S)
numberLines=Number of lines: %S
cardbook.searchFrom.name=CardBook From
......
......@@ -193,6 +193,8 @@
<!ENTITY solveConflictsRemoteAccesskey "S">
<!ENTITY solveConflictsUserLabel "Ask user">
<!ENTITY solveConflictsUserAccesskey "A">
<!ENTITY maxModifsPushedLabel "Maximum number of modifications pushed per synchronization">
<!ENTITY maxModifsPushedAccesskey "M">
<!ENTITY requestsGroupboxLabel "Requests">
<!ENTITY requestsTimeoutLabel "Timeout (seconds)">
<!ENTITY requestsTimeoutAccesskey "T">
......
......@@ -69,8 +69,8 @@ synchroCardsUpdatedOnBoth=%1$S: Contactos actualizados en el disco y en el servi
synchroCardsUpdatedOnDiskDeletedOnServer=%1$S: Contactos actualizados en el disco y borrados del servidor: %2$S
synchroModifGetOKFromServer=%1$S: Modificaciones recuperadas del servidor: %2$S
synchroModifGetKOFromServer=%1$S: Modificaciones no recuperadas del servidor: %2$S
synchroModifPutOKFromServer=%1$S: Modificaciones enviadas al servidor poussées sur le serveur: %2$S
synchroModifPutKOFromServer=%1$S: Modificaciones no enviadas al servidor: %2$S
synchroModifPutOKToServer=%1$S: Modificaciones enviadas al servidor poussées sur le serveur: %2$S
synchroModifPutKOToServer=%1$S: Modificaciones no enviadas al servidor: %2$S
synchroImpossible=%S: Sincronización imposible con el servidor.
synchroDirFinishedResult=%S: Directorio abierto, resultados:
synchroDirCardsOK=%1$S: Contactos abiertos: %2$S
......@@ -212,6 +212,8 @@ validateIntegerMsg=El valor del campo %1$S tiene que ser nulo, o un número ente
numberContactsFound=Número de contactos encontrados: %S
numberContacts=Número de contactos: %S
numberContactsFoundModified=??Número de contactos encontrados: %1$S (locally modified: %2$S)??
numberContactsModified=??Número de contactos: %1$S (locally modified: %2$S)??
numberLines=Número de líneas: %S
cardbook.searchFrom.name=CardBook De
......
......@@ -193,6 +193,8 @@
<!ENTITY solveConflictsRemoteAccesskey "S">
<!ENTITY solveConflictsUserLabel "Preguntar al usuario">
<!ENTITY solveConflictsUserAccesskey "U">
<!ENTITY maxModifsPushedLabel "??Maximum number of modifications pushed per synchronization??">
<!ENTITY maxModifsPushedAccesskey "??M??">
<!ENTITY requestsGroupboxLabel "Consultas">
<!ENTITY requestsTimeoutLabel "Tiempo máximo (segundos)">
<!ENTITY requestsTimeoutAccesskey "D">
......
......@@ -69,8 +69,8 @@ synchroCardsUpdatedOnBoth=%1$S : Contacts mis à jour sur le disque et sur le se
synchroCardsUpdatedOnDiskDeletedOnServer=%1$S : Contacts mis à jour sur le disque and supprimés sur le serveur : %2$S
synchroModifGetOKFromServer=%1$S : Modifications récupérées du serveur : %2$S
synchroModifGetKOFromServer=%1$S : Modifications non récupérées du serveur : %2$S
synchroModifPutOKFromServer=%1$S : Modifications poussées sur le serveur : %2$S
synchroModifPutKOFromServer=%1$S : Modifications non poussées sur le serveur : %2$S
synchroModifPutOKToServer=%1$S : Modifications poussées sur le serveur : %2$S
synchroModifPutKOToServer=%1$S : Modifications non poussées sur le serveur : %2$S
synchroImpossible=%S : Synchronisation impossible avec le serveur.
synchroDirFinishedResult=%S : Répertoire ouvert, résultats :
synchroDirCardsOK=%1$S : Contacts ouvert : %2$S
......@@ -212,6 +212,8 @@ validateIntegerMsg=Le champ %1$S doit avoir une valeur nulle ou bien être un en
numberContactsFound=Nombre de contacts trouvés : %S
numberContacts=Nombre de contacts : %S