mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-07 14:28:52 +00:00
Calendar+Addressbook export
Monotone-Parent: fb2522bcdcf167e7ba3e95a03948f9bfad2b7870 Monotone-Revision: 1e66868696d71db915497bde02848e689ed48c7a Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-09-02T13:24:02 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -214,7 +214,9 @@ function onFolderMenuHide(event) {
|
||||
|
||||
function _onContactMenuAction(folderItem, action, refresh) {
|
||||
var selectedFolders = $("contactFolders").getSelectedNodes();
|
||||
var folderId = $(folderItem).readAttribute("folderId").substring(1);
|
||||
var folderId = $(folderItem).readAttribute("folderId");
|
||||
if (folderId)
|
||||
folderId = folderId.substring (1);
|
||||
if (Object.isArray(document.menuTarget) && selectedFolders.length > 0) {
|
||||
var selectedFolderId = $(selectedFolders[0]).readAttribute("id");
|
||||
var contactIds = $(document.menuTarget).collect(function(row) {
|
||||
@@ -227,7 +229,6 @@ function _onContactMenuAction(folderItem, action, refresh) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var url = ApplicationBaseURL + selectedFolderId + "/" + action
|
||||
+ "?folder=" + folderId + "&uid="
|
||||
@@ -248,6 +249,19 @@ function onContactMenuMove(event) {
|
||||
_onContactMenuAction(this, "move", true);
|
||||
}
|
||||
|
||||
function onMenuExportContact (event) {
|
||||
var selectedFolders = $("contactFolders").getSelectedNodes();
|
||||
var selectedFolderId = $(selectedFolders[0]).readAttribute("id");
|
||||
if (selectedFolderId != "/shared") {
|
||||
var contactIds = $(document.menuTarget).collect(function(row) {
|
||||
return row.getAttribute("id");
|
||||
});
|
||||
var url = ApplicationBaseURL + selectedFolderId + "/export"
|
||||
+ "?uid=" + contactIds.join("&uid=");
|
||||
window.location.href = url;
|
||||
}
|
||||
}
|
||||
|
||||
function actionContactCallback(http) {
|
||||
if (http.readyState == 4)
|
||||
if (isHttpStatus204(http.status)) {
|
||||
@@ -977,7 +991,8 @@ function getMenus() {
|
||||
menus["contactMenu"] = new Array(onMenuEditContact, "-",
|
||||
onMenuWriteToContact, onMenuAIMContact,
|
||||
"-", onMenuDeleteContact, "-",
|
||||
"moveContactMenu", "copyContactMenu");
|
||||
"moveContactMenu", "copyContactMenu",
|
||||
onMenuExportContact);
|
||||
menus["searchMenu"] = new Array(setSearchCriteria);
|
||||
|
||||
var contactFoldersMenu = $("contactFoldersMenu");
|
||||
|
||||
Reference in New Issue
Block a user