mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-30 23:55:34 +00:00
Calendar Import
Monotone-Parent: 1e66868696d71db915497bde02848e689ed48c7a Monotone-Revision: 49714b85ec1539aa299cf3397138aa2bd21086cb Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-09-02T19:14:15 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1738,8 +1738,8 @@ function getMenus() {
|
||||
menus["calendarsMenu"] = new Array(onCalendarModify,
|
||||
"-",
|
||||
onCalendarNew, onCalendarRemove,
|
||||
"-", onCalendarExport, null, "-",
|
||||
null, "-", onMenuSharing);
|
||||
"-", onCalendarExport, onCalendarImport,
|
||||
null, "-", null, "-", onMenuSharing);
|
||||
menus["searchMenu"] = new Array(setSearchCriteria);
|
||||
|
||||
menus["tasksListMenu"] = new Array (editEvent, newTask, "-",
|
||||
@@ -1889,6 +1889,35 @@ function onCalendarExport(event) {
|
||||
}
|
||||
}
|
||||
|
||||
function onCalendarImport(event) {
|
||||
var node = $("calendarList").getSelectedNodes().first();
|
||||
var folderId = node.getAttribute("id");
|
||||
|
||||
var url = ApplicationBaseURL + folderId + "/import";
|
||||
$("uploadForm").action = url;
|
||||
$("uploadCancel").onclick = hideCalendarImport;
|
||||
$("calendarFile").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 hideCalendarImport () {
|
||||
$("uploadDialog").style.display = "none";
|
||||
}
|
||||
function validateUploadForm () {
|
||||
rc = false;
|
||||
if ($("calendarFile").value.length)
|
||||
rc = true;
|
||||
return rc;
|
||||
}
|
||||
|
||||
function setEventsOnCalendar(checkBox, li) {
|
||||
li.observe("mousedown", listRowMouseDownHandler);
|
||||
li.observe("selectstart", listRowMouseDownHandler);
|
||||
|
||||
Reference in New Issue
Block a user