Commit c20069cf authored by CardBook's avatar CardBook

pre version 24.7

parent 0c3750a2
......@@ -84,6 +84,8 @@ Translations by:
* Lucian Burca (ro)
* Alexander Yavorsky (ru)
* Peter Klofutar (sl)
* Anders (sv-SE)
* Kire Dyfvelsten (sv-SE)
Trailblazer:
* [Thomas McWork](https://github.com/thomas-mc-work): midwife for the public git repository
......
......@@ -16,8 +16,10 @@ locale cardbook lt chrome/locale/lt/
locale cardbook nl chrome/locale/nl/
locale cardbook pl chrome/locale/pl/
locale cardbook pt-PT chrome/locale/pt-PT/
locale cardbook ro chrome/locale/ro/
locale cardbook ru chrome/locale/ru/
locale cardbook sl chrome/locale/sl/
locale cardbook sv-SE chrome/locale/sv-SE/
skin cardbook classic/1.0 chrome/skin/
skin cardbook-osversion classic/1.0 chrome/skin/osversion/unix/ os=Linux
......
......@@ -138,7 +138,7 @@ if ("undefined" == typeof(cardbookAutocomplete)) {
if (cardbookRepository.cardbookAccounts[i][1] && cardbookRepository.cardbookAccounts[i][5] && cardbookRepository.cardbookAccounts[i][6] != "SEARCH") {
var dirPrefId = cardbookRepository.cardbookAccounts[i][4];
var myColor = cardbookPreferences.getColor(dirPrefId)
var myStyle = cardbookRepository.getIconType(cardbookRepository.cardbookAccounts[i][6]) + " color_" + dirPrefId;
var myStyle = cardbookRepository.getABIconType(cardbookRepository.cardbookAccounts[i][6]) + " color_" + dirPrefId;
cardbookAutocomplete.createCssMsgAccountRules(styleSheet, myStyle, myColor, OSName, autocompleteWithColor, treeCellProperty, colorProperty);
}
}
......
......@@ -15,7 +15,7 @@ if ("undefined" == typeof(cardbookDirTree)) {
else if (column.id == "accountId") return this.visibleData[idx][4];
else if (column.id == "accountType") return this.visibleData[idx][6];
else if (column.id == "accountEnabled") return this.visibleData[idx][5];
else if (column.id == "accountReadOnly") return this.visibleData[idx][7];
else if (column.id == "accountStatusCheckbox") return true;
else if (column.id == "accountTypeCheckbox") return true;
else if (column.id == "dummyForScroll") return true;
} else {
......@@ -24,15 +24,13 @@ if ("undefined" == typeof(cardbookDirTree)) {
},
getCellValue: function(idx, column) {
if (column.id == "accountEnabled") return this.visibleData[idx][5];
else if (column.id == "accountReadOnly") return this.visibleData[idx][7];
else if (column.id == "accountStatusCheckbox") return true;
else if (column.id == "accountTypeCheckbox") return true;
else if (column.id == "dummyForScroll") return true;
},
setCellValue: function(idx, column) {
if (cardbookRepository.cardbookSyncMode === "NOSYNC") {
if (column.id == "accountEnabled") {
wdw_cardbook.enableOrDisableAddressbook(this.visibleData[idx][4], !this.visibleData[idx][5]);
}
if (column.id == "accountEnabled") {
wdw_cardbook.enableOrDisableAddressbook(this.visibleData[idx][4], !this.visibleData[idx][5]);
}
},
getRowProperties: function(idx) { return "" },
......@@ -41,7 +39,9 @@ if ("undefined" == typeof(cardbookDirTree)) {
if (column.id == "accountColor" && this.visibleData[idx][1] && this.visibleData[idx][6] != "SEARCH") {
return "color_" + this.visibleData[idx][4];
} else if (column.id == "accountTypeCheckbox" && this.visibleData[idx][1]) {
return cardbookRepository.getIconType(this.visibleData[idx][6]);
return cardbookRepository.getABIconType(this.visibleData[idx][6]);
} else if (column.id == "accountStatusCheckbox" && this.visibleData[idx][1] && this.visibleData[idx][5] && this.visibleData[idx][6] != "SEARCH") {
return cardbookRepository.getABStatusType(this.visibleData[idx][4]);
}
},
canDrop: function(idx) { return (this.visibleData[idx][5] && !this.visibleData[idx][7] && this.visibleData[idx][6] != "SEARCH"); },
......
......@@ -39,23 +39,19 @@ if ("undefined" == typeof(cardbookDiscovery)) {
var allPrefsURLs = [];
allPrefsURLs = cardbookPreferences.getDiscoveryAccounts();
if (allPrefsURLs.length == 0) {
cardbookRepository.cardbookSyncMode = "NOSYNC";
} else {
for (var i = 0; i < allPrefsURLs.length; i++) {
if (i == 0) {
cardbookSynchronization.initDiscovery();
cardbookUtils.formatStringForOutput("discoveryRunning", [cardbookDiscovery.gDiscoveryDescription]);
}
var dirPrefId = cardbookUtils.getUUID();
cardbookSynchronization.initDiscoveryWithPrefId(dirPrefId);
cardbookRepository.cardbookServerValidation[dirPrefId] = {length: 0, user: allPrefsURLs[i][1]};
cardbookRepository.cardbookServerSyncRequest[dirPrefId]++;
var connection = {connUser: allPrefsURLs[i][1], connPrefId: dirPrefId, connUrl: allPrefsURLs[i][0], connDescription: cardbookDiscovery.gDiscoveryDescription};
var params = {aDirPrefIdType: "CARDDAV"};
cardbookSynchronization.discoverPhase1(connection, "GETDISPLAYNAME", params);
cardbookDiscovery.waitForDiscoveryFinished(dirPrefId);
for (var i = 0; i < allPrefsURLs.length; i++) {
var dirPrefId = cardbookUtils.getUUID();
if (i == 0) {
cardbookUtils.formatStringForOutput("discoveryRunning", [cardbookDiscovery.gDiscoveryDescription]);
}
cardbookSynchronization.initDiscovery(dirPrefId);
cardbookSynchronization.initMultipleOperations(dirPrefId);
cardbookRepository.cardbookServerValidation[dirPrefId] = {length: 0, user: allPrefsURLs[i][1]};
cardbookRepository.cardbookServerSyncRequest[dirPrefId]++;
var connection = {connUser: allPrefsURLs[i][1], connPrefId: dirPrefId, connUrl: allPrefsURLs[i][0], connDescription: cardbookDiscovery.gDiscoveryDescription};
var params = {aDirPrefIdType: "CARDDAV"};
cardbookSynchronization.discoverPhase1(connection, "GETDISPLAYNAME", params);
cardbookDiscovery.waitForDiscoveryFinished(dirPrefId);
}
},
......@@ -63,9 +59,10 @@ if ("undefined" == typeof(cardbookDiscovery)) {
cardbookSynchronization.finishMultipleOperations(aDirPrefId);
var total = cardbookSynchronization.getRequest() + cardbookSynchronization.getTotal() + cardbookSynchronization.getResponse() + cardbookSynchronization.getDone();
if (total === 0) {
cardbookRepository.cardbookSyncMode = "NOSYNC";
if (aState) {
wdw_cardbooklog.updateStatusProgressInformationWithDebug1(cardbookDiscovery.gDiscoveryDescription + " : debug mode : cardbookRepository.cardbookServerValidation : ", cardbookRepository.cardbookServerValidation);
var myAccountsToAdd = [];
var myAccountsToRemove = [];
// find all current CARDDAV accounts
var myCurrentAccounts = [];
myCurrentAccounts = JSON.parse(JSON.stringify(cardbookRepository.cardbookAccounts));
......@@ -77,6 +74,9 @@ if ("undefined" == typeof(cardbookDiscovery)) {
// find all accounts that should be added and removed
for (var dirPrefId in cardbookRepository.cardbookServerValidation) {
if (dirPrefId != aDirPrefId) {
continue;
}
if (cardbookRepository.cardbookServerValidation[dirPrefId].length != 0) {
for (var url in cardbookRepository.cardbookServerValidation[dirPrefId]) {
if (url == "length" || url == "user") {
......@@ -95,7 +95,7 @@ if ("undefined" == typeof(cardbookDiscovery)) {
}
// add accounts
if (cardbookRepository.cardbookServerValidation[dirPrefId].length > 0) {
cardbookDiscovery.addAddressbook("discovery", dirPrefId);
myAccountsToAdd.push(cardbookUtils.fromValidationToArray(dirPrefId));
}
}
}
......@@ -107,35 +107,42 @@ if ("undefined" == typeof(cardbookDiscovery)) {
var myCurrentUser = cardbookPreferences.getUser(myCurrentAccountsNotFound[i][4]);
var myCurrentShortUrl = cardbookSynchronization.getShortUrl(myCurrentUrl);
for (var dirPrefId in cardbookRepository.cardbookServerValidation) {
if (dirPrefId != aDirPrefId) {
continue;
}
for (var url in cardbookRepository.cardbookServerValidation[dirPrefId]) {
if (url == "length" || url == "user") {
continue;
}
if ((myCurrentUser == cardbookRepository.cardbookServerValidation[dirPrefId].user) && (myCurrentShortUrl == cardbookSynchronization.getShortUrl(cardbookUtils.decodeURL(url)))) {
cardbookDiscovery.removeAddressbook(myCurrentAccountsNotFound[i][4], "DISCOVERY");
myAccountsToRemove.push(myCurrentAccountsNotFound[i][4]);
break;
}
}
}
}
for (var i = 0; i < myAccountsToAdd.length; i++) {
cardbookDiscovery.addAddressbook(myAccountsToAdd[i]);
}
for (var i = 0; i < myAccountsToRemove.length; i++) {
cardbookDiscovery.removeAddressbook(myAccountsToRemove[i]);
}
}
}
cardbookSynchronization.stopDiscovery(aDirPrefId);
},
addAddressbook: function (aAction, aDirPrefId) {
if ((aDirPrefId != null && aDirPrefId !== undefined && aDirPrefId != "") || (cardbookRepository.cardbookSyncMode === "NOSYNC")) {
cardbookRepository.cardbookSyncMode = "SYNC";
var myArgs = {action: aAction, dirPrefId: aDirPrefId};
var myWindow = window.openDialog("chrome://cardbook/content/addressbooksconfiguration/wdw_addressbooksAdd.xul", "",
// Workaround for Bug 1151440 - the HTML color picker won't work
// in linux when opened from modal dialog
(Services.appinfo.OS == 'Linux') ? "chrome,resizable,centerscreen" : "modal,chrome,resizable,centerscreen"
, myArgs);
}
addAddressbook: function (aAccountsToAdd) {
var myArgs = {action: "discovery", accountsToAdd: aAccountsToAdd};
var myWindow = window.openDialog("chrome://cardbook/content/addressbooksconfiguration/wdw_addressbooksAdd.xul", "",
// Workaround for Bug 1151440 - the HTML color picker won't work
// in linux when opened from modal dialog
(Services.appinfo.OS == 'Linux') ? "chrome,resizable,centerscreen" : "modal,chrome,resizable,centerscreen"
, myArgs);
},
// no need to set the sync mode for removing deleted CARDDAV account
removeAddressbook: function (aDirPrefId, aSource) {
removeAddressbook: function (aDirPrefId) {
try {
var myDirPrefIdName = cardbookPreferences.getName(aDirPrefId);
var myDirPrefUrl = cardbookPreferences.getUrl(aDirPrefId);
......
......@@ -218,10 +218,10 @@ if ("undefined" == typeof(cardbookElementTools)) {
}
if (aInclRestrictionList && aInclRestrictionList.length > 0) {
if (aInclRestrictionList[cardbookRepository.cardbookAccounts[i][4]]) {
sortedAddressBooks.push([cardbookRepository.cardbookAccounts[i][0], cardbookRepository.cardbookAccounts[i][4], cardbookRepository.getIconType(cardbookRepository.cardbookAccounts[i][6])]);
sortedAddressBooks.push([cardbookRepository.cardbookAccounts[i][0], cardbookRepository.cardbookAccounts[i][4], cardbookRepository.getABIconType(cardbookRepository.cardbookAccounts[i][6])]);
}
} else {
sortedAddressBooks.push([cardbookRepository.cardbookAccounts[i][0], cardbookRepository.cardbookAccounts[i][4], cardbookRepository.getIconType(cardbookRepository.cardbookAccounts[i][6])]);
sortedAddressBooks.push([cardbookRepository.cardbookAccounts[i][0], cardbookRepository.cardbookAccounts[i][4], cardbookRepository.getABIconType(cardbookRepository.cardbookAccounts[i][6])]);
}
}
}
......
......@@ -125,7 +125,7 @@ var cardbookRepository = {
cardbookImageGetRequest : {},
cardbookImageGetResponse : {},
cardbookImageGetError : {},
cardbookSyncMode : "NOSYNC",
cardbookSyncMode : {},
cardbookServerChangedPwd : {},
......@@ -485,7 +485,8 @@ var cardbookRepository = {
}
},
addAccountToRepository: function(aAccountId, aAccountName, aAccountType, aAccountUrl, aAccountUser, aColor, aEnabled, aExpanded, aVCard, aReadOnly, aDateFormat, aUrnuuid, aDBcached, aPrefInsertion) {
addAccountToRepository: function(aAccountId, aAccountName, aAccountType, aAccountUrl, aAccountUser, aColor, aEnabled, aExpanded, aVCard, aReadOnly, aDateFormat, aUrnuuid,
aDBcached, aAutoSyncEnabled, aAutoSyncInterval, aPrefInsertion) {
var cacheDir = cardbookRepository.getLocalDirectory();
cacheDir.append(aAccountId);
if (!cacheDir.exists() || !cacheDir.isDirectory()) {
......@@ -507,6 +508,8 @@ var cardbookRepository = {
cardbookPreferences.setDateFormat(aAccountId, aDateFormat);
cardbookPreferences.setUrnuuid(aAccountId, aUrnuuid);
cardbookPreferences.setDBCached(aAccountId, aDBcached);
cardbookPreferences.setAutoSyncEnabled(aAccountId, aAutoSyncEnabled);
cardbookPreferences.setAutoSyncInterval(aAccountId, aAutoSyncInterval);
}
cardbookRepository.cardbookAccounts.push([aAccountName, true, aExpanded, true, aAccountId, aEnabled, aAccountType, aReadOnly]);
......@@ -516,6 +519,7 @@ var cardbookRepository = {
},
removeAccountFromRepository: function(aAccountId) {
cardbookSynchronization.removePeriodicSync(aAccountId);
cardbookRepository.removeAccountFromCollected(aAccountId);
cardbookRepository.removeAccountFromBirthday(aAccountId);
cardbookRepository.removeAccountFromDiscovery(aAccountId);
......@@ -1499,7 +1503,7 @@ var cardbookRepository = {
sss.loadAndRegisterSheet(uri, sss.AUTHOR_SHEET);
},
getIconType: function (aType) {
getABIconType: function (aType) {
switch(aType) {
case "CACHE":
case "DIRECTORY":
......@@ -1517,6 +1521,16 @@ var cardbookRepository = {
break;
};
return aType;
},
getABStatusType: function (aDirPrefId) {
if (cardbookUtils.isMyAccountSyncing(aDirPrefId)) {
return "syncing";
} else if (cardbookPreferences.getReadOnly(aDirPrefId)) {
return "readonly";
} else {
return "readwrite";
}
}
};
......
This diff is collapsed.
This diff is collapsed.
......@@ -281,7 +281,7 @@ if ("undefined" == typeof(cardbookComplexSearch)) {
},
loadComplexSearchAccount: function (aDirPrefId, aReload, aMode) {
cardbookSynchronization.initSyncWithPrefId(aDirPrefId);
cardbookSynchronization.initMultipleOperations(aDirPrefId);
var myFile = cardbookRepository.getRuleFile(aDirPrefId);
cardbookRepository.cardbookComplexSearchRequest[aDirPrefId]++;
if (myFile.exists() && myFile.isFile()) {
......
......@@ -1716,14 +1716,6 @@ if ("undefined" == typeof(wdw_cardbookConfiguration)) {
}
},
loadPeriodicSync: function () {
var autoSync = cardbookPreferences.getBoolPref("extensions.cardbook.autoSync");
if (!(autoSync)) {
document.getElementById('autoSyncInterval').disabled = true;
document.getElementById('autoSyncIntervalTextBox').disabled = true;
}
},
validateStatusInformationLineNumber: function () {
if (document.getElementById('statusInformationLineNumberTextBox').value < 10) {
document.getElementById('statusInformationLineNumberTextBox').value = 10;
......@@ -1753,16 +1745,6 @@ if ("undefined" == typeof(wdw_cardbookConfiguration)) {
}
},
showAutoSyncInterval: function () {
if (document.getElementById('autoSyncCheckBox').checked) {
document.getElementById('autoSyncInterval').disabled = false;
document.getElementById('autoSyncIntervalTextBox').disabled = false;
} else {
document.getElementById('autoSyncInterval').disabled = true;
document.getElementById('autoSyncIntervalTextBox').disabled = true;
}
},
load: function () {
wdw_cardbookConfiguration.loadTitle();
wdw_cardbookConfiguration.addAcceptButton();
......@@ -1779,7 +1761,6 @@ if ("undefined" == typeof(wdw_cardbookConfiguration)) {
wdw_cardbookConfiguration.loadDateDisplayedFormat();
wdw_cardbookConfiguration.loadDiscoveryAccounts("discoveryAccountsNameList");
wdw_cardbookConfiguration.loadInitialSyncDelay();
wdw_cardbookConfiguration.loadPeriodicSync();
wdw_cardbookConfiguration.loadAddressBooks("addressBooksNameList");
wdw_cardbookConfiguration.loadVCards();
wdw_cardbookConfiguration.sortTrees(null, "accountsVCardsTree");
......
......@@ -94,10 +94,6 @@
name="extensions.cardbook.initialSyncDelay" type="string"/>
<preference id="extensions.cardbook.solveConflicts"
name="extensions.cardbook.solveConflicts" type="string"/>
<preference id="extensions.cardbook.autoSync"
name="extensions.cardbook.autoSync" type="bool"/>
<preference id="extensions.cardbook.autoSyncInterval"
name="extensions.cardbook.autoSyncInterval" type="string"/>
<preference id="extensions.cardbook.discoveryAccountsNameList"
name="extensions.cardbook.discoveryAccountsNameList" type="string"/>
<preference id="extensions.cardbook.multiget"
......@@ -650,23 +646,6 @@
</hbox>
</groupbox>
<groupbox>
<caption label="&autoSyncGroupboxLabel;"/>
<hbox align="center">
<checkbox id="autoSyncCheckBox" label="&autoSyncLabel;"
accesskey="&autoSyncAccesskey;"
preference="extensions.cardbook.autoSync" oncommand="wdw_cardbookConfiguration.showAutoSyncInterval();"/>
</hbox>
<hbox align="center" class="indent">
<label value="&autoSyncIntervalLabel;"
accesskey="&autoSyncIntervalAccesskey;"
control="autoSyncIntervalTextBox"
id="autoSyncInterval"/>
<textbox id="autoSyncIntervalTextBox"
preference="extensions.cardbook.autoSyncInterval"/>
</hbox>
</groupbox>
<groupbox>
<caption label="&requestsGroupboxLabel;"/>
<hbox align="center">
......@@ -688,7 +667,7 @@
</hbox>
</groupbox>
<groupbox flex="1">
<groupbox>
<caption label="&discoveryGroupboxLabel;"/>
<separator class="thin"/>
<description>&discoveryWarn;</description>
......
......@@ -47,7 +47,7 @@
<toolbarbutton id="cardbookToolbarSyncButton"
label="&cardbookToolbarSyncButtonLabel;"
tooltiptext="&cardbookToolbarSyncButtonTooltip;"
oncommand="wdw_cardbook.syncAccounts();"
oncommand="cardbookSynchronization.syncAccounts();"
class="toolbarbutton-1"/>
<toolbarbutton id="cardbookToolbarWriteButton"
label="&cardbookToolbarWriteButtonLabel;"
......@@ -116,7 +116,7 @@
<menuitem id="cardbookAccountMenuReadOnlyOrReadWriteAddressbook" oncommand="wdw_cardbook.readOnlyOrReadWriteAddressbook();"/>
<menuseparator/>
<menuitem id="cardbookAccountMenuSync" label="&cardbookAccountMenuSyncLabel;" oncommand="wdw_cardbook.syncAccountFromAccountsOrCats();"/>
<menuitem id="cardbookAccountMenuSyncs" label="&cardbookAccountMenuSyncsLabel;" oncommand="wdw_cardbook.syncAccounts();"/>
<menuitem id="cardbookAccountMenuSyncs" label="&cardbookAccountMenuSyncsLabel;" oncommand="cardbookSynchronization.syncAccounts();"/>
<menuseparator/>
<menuitem id="cardbookAccountMenuExportToFile" label="&exportCardToFileLabel;" oncommand="wdw_cardbook.exportCardsFromAccountsOrCats(this);"/>
<menuitem id="cardbookAccountMenuExportToDir" label="&exportCardToDirLabel;" oncommand="wdw_cardbook.exportCardsFromAccountsOrCats(this);"/>
......
......@@ -86,7 +86,7 @@
<treecol id="accountName" flex="1" persist="width ordinal hidden" primary="true" hideheader="true" crop="center"/>
<treecol id="accountId" persist="width ordinal hidden" hidden="true" hideheader="true"/>
<treecol id="accountType" persist="width ordinal hidden" hidden="true" hideheader="true"/>
<treecol id="accountReadOnly" type="checkbox" persist="width ordinal hidden" width="17" hideheader="true" tooltiptext="&readonlyAccountsTooltip;"/>
<treecol id="accountStatusCheckbox" type="checkbox" persist="width ordinal hidden" width="17" hideheader="true" tooltiptext="&readonlyAccountsTooltip;"/>
<treecol id="dummyForScroll" type="checkbox" persist="width ordinal hidden" width="17" hideheader="true"/>
</treecols>
<treechildren id="accountsOrCatsTreeChildren" flex="1" ondragstart="wdw_cardbook.startDrag(event, this);" ondrop="wdw_cardbook.dragCards(event);"
......
......@@ -29,8 +29,6 @@ if ("undefined" == typeof(ovl_synchro)) {
prefs.setBoolPref("initialSync", true);
prefs.setCharPref("initialSyncDelay", "0");
prefs.setCharPref("solveConflicts", "User");
prefs.setBoolPref("autoSync", true);
prefs.setCharPref("autoSyncInterval", "30");
prefs.setCharPref("discoveryAccountsNameList", "");
prefs.setCharPref("multiget", "40");
prefs.setBoolPref("decodeReport", true);
......@@ -82,7 +80,7 @@ if ("undefined" == typeof(ovl_synchro)) {
prefs.setCharPref("accountsShown", "all");
prefs.setCharPref("uncategorizedCards", "");
prefs.setCharPref("addonVersion", "24.6");
prefs.setCharPref("addonVersion", "24.7");
},
lEventTimerSync : { notify: function(lTimerSync) {
......
This diff is collapsed.
......@@ -3,6 +3,16 @@ if ("undefined" == typeof(wdw_serverEdition)) {
var wdw_serverEdition = {
showAutoSyncInterval: function () {
if (document.getElementById('autoSyncCheckBox').checked) {
document.getElementById('autoSyncInterval').disabled = false;
document.getElementById('autoSyncIntervalTextBox').disabled = false;
} else {
document.getElementById('autoSyncInterval').disabled = true;
document.getElementById('autoSyncIntervalTextBox').disabled = true;
}
},
load: function () {
document.getElementById("serverNameTextBox").value = window.arguments[0].serverEditionName;
document.getElementById("serverTypeTextBox").value = window.arguments[0].serverEditionType;
......@@ -14,6 +24,15 @@ if ("undefined" == typeof(wdw_serverEdition)) {
cardbookElementTools.loadDateFormats("dateFormatMenuPopup", "dateFormatMenuList", window.arguments[0].serverEditionDateFormat);
document.getElementById("serverReadOnlyCheckBox").setAttribute('checked', window.arguments[0].serverEditionReadOnly);
document.getElementById("serverUrnuuidCheckBox").setAttribute('checked', window.arguments[0].serverEditionUrnuuid);
if (window.arguments[0].serverEditionType === "GOOGLE" || window.arguments[0].serverEditionType === "APPLE" || window.arguments[0].serverEditionType === "CARDDAV") {
document.getElementById('syncTab').setAttribute("collapsed", false);
document.getElementById("autoSyncCheckBox").setAttribute('checked', window.arguments[0].serverEditionAutoSyncEnabled);
document.getElementById("autoSyncIntervalTextBox").value = window.arguments[0].serverEditionAutoSyncInterval;
wdw_serverEdition.showAutoSyncInterval();
} else {
document.getElementById('syncTab').setAttribute("collapsed", true);
}
},
save: function () {
......@@ -24,12 +43,13 @@ if ("undefined" == typeof(wdw_serverEdition)) {
window.arguments[0].serverCallback("SAVE", window.arguments[0].serverEditionId, document.getElementById('serverNameTextBox').value,
document.getElementById('serverColorInput').value, document.getElementById('serverVCardVersionTextBox').value,
document.getElementById('serverReadOnlyCheckBox').checked, document.getElementById('dateFormatMenuList').value,
document.getElementById('serverUrnuuidCheckBox').checked);
document.getElementById('serverUrnuuidCheckBox').checked, document.getElementById('autoSyncCheckBox').checked,
document.getElementById('autoSyncIntervalTextBox').value);
close();
},
cancel: function () {
window.arguments[0].serverCallback("CANCEL");
window.arguments[0].serverCallback("CANCEL", window.arguments[0].serverEditionId);
close();
}
......
......@@ -27,92 +27,128 @@
<key keycode="VK_ESCAPE" oncommand="wdw_serverEdition.cancel();"/>
</keyset>
<hbox flex="1">
<vbox flex="1">
<groupbox>
<caption label="&generalTabLabel;" class="header"/>
<hbox flex="1">
<image id="dummyGeneralGroupbox" class="cardbookNoPrefStarClass"/>
<grid align="center" flex="1">
<columns>
<column/>
<column flex="1"/>
</columns>
<rows>
<row align="center">
<label value="&namePage.color.label;" control="cardbook-color" class="header"/>
<hbox align="center">
<html:input id="serverColorInput"
class="small-margin"
type="color"/>
</hbox>
</row>
<separator class="thin"/>
<row align="center">
<label id="serverNameLabel" value="&namePage.name.label;" control="serverNameTextBox" class="header"/>
<textbox id="serverNameTextBox"/>
</row>
<separator class="thin"/>
<row align="center">
<label id="serverTypeLabel" value="&remotePage.type.label;" control="serverTypeTextBox" class="header"/>
<textbox id="serverTypeTextBox" disabled="true"/>
</row>
<separator class="thin"/>
<row align="center">
<label id="serverUrlLabel" value="&remotePage.uri.label;" control="serverUrlTextBox" class="header"/>
<textbox id="serverUrlTextBox" disabled="true"/>
</row>
<separator class="thin"/>
<row align="center">
<label id="serverUserLabel" value="&usernameLabel;" control="serverUserTextBox" class="header"/>
<textbox id="serverUserTextBox" disabled="true"/>
</row>
<separator class="thin"/>
<row align="center">
<label id="serverReadOnlyLabel" value="&namePage.readonly.label;" control="serverReadOnlyCheckBox" class="header"/>
<checkbox id="serverReadOnlyCheckBox"/>
</row>
<separator class="thin"/>
<row align="center">
<label value="&namePage.vCardVersion.label;" control="serverVCardVersionTextBox" class="header"/>
<textbox id="serverVCardVersionTextBox" disabled="true"/>
</row>
</rows>
</grid>
</hbox>
</groupbox>
<separator class="thin"/>
<groupbox>
<caption label="&advancedSyncGroupboxLabel;" class="header"/>
<hbox flex="1">
<image id="dummyAdvancedGroupbox" class="cardbookNoPrefStarClass"/>
<grid align="center" flex="1">
<columns>
<column class="header"/>
<column flex="1"/>
</columns>
<rows>
<row align="center">
<label value="&dateFormatLabel;" control="dateFormatMenuList" class="header"/>
<hbox align="center">
<menulist id="dateFormatMenuList">
<menupopup id="dateFormatMenuPopup"/>
</menulist>
</hbox>
</row>
<separator class="thin"/>
<row align="center">
<label value="&namePage.urnuuid.label;" control="serverUrnuuidCheckBox" class="header"/>
<checkbox id="serverUrnuuidCheckBox" disabled="true"/>
</row>
</rows>
</grid>
</hbox>
</groupbox>
</vbox>
</hbox>
<tabbox id="accountPrefs" width="400" height="300" flex="1">
<tabs>
<tab id="generalTab" label="&generalTabLabel;"/>
<tab id="syncTab" label="&syncTabLabel;"/>
</tabs>
<tabpanels>
<tabpanel orient="vertical">
<groupbox>
<caption label="&generalTabLabel;" class="header"/>
<hbox flex="1">
<image id="dummyGeneralGroupbox" class="cardbookNoPrefStarClass"/>
<grid align="center" flex="1">
<columns>
<column/>
<column flex="1"/>
</columns>
<rows>
<row align="center">
<label value="&namePage.color.label;" control="cardbook-color" class="header"/>
<hbox align="center">
<html:input id="serverColorInput"
class="small-margin"
type="color"/>
</hbox>
</row>
<separator class="thin"/>
<row align="center">
<label id="serverNameLabel" value="&namePage.name.label;" control="serverNameTextBox" class="header"/>
<textbox id="serverNameTextBox"/>
</row>
<separator class="thin"/>
<row align="center">
<label id="serverTypeLabel" value="&remotePage.type.label;" control="serverTypeTextBox" class="header"/>
<textbox id="serverTypeTextBox" disabled="true"/>
</row>
<separator class="thin"/>
<row align="center">
<label id="serverUrlLabel" value="&remotePage.uri.label;" control="serverUrlTextBox" class="header"/>
<textbox id="serverUrlTextBox" disabled="true"/>
</row>
<separator class="thin"/>
<row align="center">
<label id="serverUserLabel" value="&usernameLabel;" control="serverUserTextBox" class="header"/>
<textbox id="serverUserTextBox" disabled="true"/>
</row>
<separator class="thin"/>
<row align="center">
<label id="serverReadOnlyLabel" value="&namePage.readonly.label;" control="serverReadOnlyCheckBox" class="header"/>
<checkbox id="serverReadOnlyCheckBox"/>
</row>
<separator class="thin"/>
<row align="center">
<label value="&namePage.vCardVersion.label;" control="serverVCardVersionTextBox" class="header"/>
<textbox id="serverVCardVersionTextBox" disabled="true"/>
</row>
</rows>
</grid>
</hbox>
</groupbox>
<separator class="thin"/>
<groupbox>
<caption label="&advancedSyncGroupboxLabel;" class="header"/>
<hbox flex="1">
<image id="dummyAdvancedGroupbox" class="cardbookNoPrefStarClass"/>
<grid align="center" flex="1">
<columns>
<column class="header"/>
<column flex="1"/>
</columns>
<rows>
<row align="center">
<label value="&dateFormatLabel;" control="dateFormatMenuList" class="header"/>
<hbox align="center">
<menulist id="dateFormatMenuList">
<menupopup id="dateFormatMenuPopup"/>
</menulist>
</hbox>
</row>
<separator class="thin"/>
<row align="center">
<label value="&namePage.urnuuid.label;" control="serverUrnuuidCheckBox" class="header"/>
<checkbox id="serverUrnuuidCheckBox" disabled="true"/>
</row>
</rows>
</grid>
</hbox>
</groupbox>
</tabpanel>