mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-21 14:22:44 +00:00
Import completed
Monotone-Parent: 3ea392b157dc9573c7f8219aa7296cf845c3b081 Monotone-Revision: 80ad9ff70fe3d4130d99bbd2590349b71c85b9f3 Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-09-03T14:18:13 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -655,6 +655,35 @@ function onFolderUnsubscribeCB(folderId) {
|
||||
onFolderSelectionChange();
|
||||
}
|
||||
|
||||
function onAddressBookImport(event) {
|
||||
var node = $("contactFolders").getSelectedNodes().first();
|
||||
var folderId = node.getAttribute("id");
|
||||
|
||||
var url = ApplicationBaseURL + folderId + "/import";
|
||||
$("uploadForm").action = url;
|
||||
$("uploadCancel").onclick = hideContactsImport;
|
||||
$("contactsFile").value = "";
|
||||
|
||||
var cellPosition = node.cumulativeOffset();
|
||||
var cellDimensions = node.getDimensions();
|
||||
var left = cellDimensions['width'] - 20;
|
||||
var top = cellPosition[1];
|
||||
|
||||
var div = $("uploadDialog");
|
||||
div.style.top = top + "px";
|
||||
div.style.left = left + "px";
|
||||
div.style.display = "block";
|
||||
}
|
||||
function hideContactsImport () {
|
||||
$("uploadDialog").style.display = "none";
|
||||
}
|
||||
function validateUploadForm () {
|
||||
rc = false;
|
||||
if ($("contactsFile").value.length)
|
||||
rc = true;
|
||||
return rc;
|
||||
}
|
||||
|
||||
function onAddressBookRemove(event) {
|
||||
var selector = $("contactFolders");
|
||||
var nodes = selector.getSelectedNodes();
|
||||
@@ -986,7 +1015,8 @@ function onContactMenuPrepareVisibility() {
|
||||
function getMenus() {
|
||||
var menus = {};
|
||||
menus["contactFoldersMenu"] = new Array(onAddressBookModify, "-", newContact,
|
||||
null, "-", onAddressBookRemove, "-",
|
||||
null, "-", onAddressBookImport,
|
||||
onAddressBookRemove, "-",
|
||||
onMenuSharing);
|
||||
menus["contactMenu"] = new Array(onMenuEditContact, "-",
|
||||
onMenuWriteToContact, onMenuAIMContact,
|
||||
|
||||
Reference in New Issue
Block a user