mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-25 00:13:24 +00:00
merge of '0e8b1704a04c5c494b76cbc377b9d9075df6cb1a'
and '3665058235c9d303e295671add1811764b128816' Monotone-Parent: 0e8b1704a04c5c494b76cbc377b9d9075df6cb1a Monotone-Parent: 3665058235c9d303e295671add1811764b128816 Monotone-Revision: 4d711e074341810486c1842c6a345777cc3664bb Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2009-09-10T18:22:56 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -872,11 +872,23 @@ function onMonthOverview() {
|
||||
}
|
||||
|
||||
function onCalendarReload() {
|
||||
changeCalendarDisplay(null, currentView);
|
||||
|
||||
reloadWebCalendars ();
|
||||
return false;
|
||||
}
|
||||
|
||||
function reloadWebCalendars () {
|
||||
var url = ApplicationBaseURL + "reloadWebCalendars";
|
||||
if (document.reloadWebCalAjaxRequest) {
|
||||
document.reloadWebCalAjaxRequest.aborted = true;
|
||||
document.reloadWebCalAjaxRequest.abort();
|
||||
}
|
||||
document.reloadWebCalAjaxRequest
|
||||
= triggerAjaxRequest(url, reloadWebCalendarsCallback);
|
||||
}
|
||||
function reloadWebCalendarsCallback (http) {
|
||||
changeCalendarDisplay(null, currentView);
|
||||
}
|
||||
|
||||
function scrollDayView(scrollEvent) {
|
||||
if (!preventAutoScroll) {
|
||||
if (scrollEvent) {
|
||||
@@ -1830,8 +1842,9 @@ function initCalendarSelector() {
|
||||
|
||||
var links = $("calendarSelectorButtons").childNodesWithTag("a");
|
||||
$(links[0]).observe("click", onCalendarNew);
|
||||
$(links[1]).observe("click", onCalendarAdd);
|
||||
$(links[2]).observe("click", onCalendarRemove);
|
||||
$(links[1]).observe("click", onCalendarWebAdd);
|
||||
$(links[2]).observe("click", onCalendarAdd);
|
||||
$(links[3]).observe("click", onCalendarRemove);
|
||||
}
|
||||
|
||||
function onCalendarModify(event) {
|
||||
@@ -1877,6 +1890,32 @@ function onCalendarAdd(event) {
|
||||
openUserFolderSelector(onFolderSubscribeCB, "calendar");
|
||||
preventDefault(event);
|
||||
}
|
||||
|
||||
function onCalendarWebAdd(event) {
|
||||
var calendarUrl = window.prompt(labels["URL of the Calendar"], "");
|
||||
if (calendarUrl) {
|
||||
if (document.addWebCalendarRequest) {
|
||||
document.addWebCalendarRequest.aborted = true;
|
||||
document.addWebCalendarRequest.abort ();
|
||||
}
|
||||
var url = ApplicationBaseURL + "/addWebCalendar?url=" + escape (calendarUrl);
|
||||
document.addWebCalendarRequest =
|
||||
triggerAjaxRequest (url, addWebCalendarCallback);
|
||||
}
|
||||
}
|
||||
function addWebCalendarCallback (http) {
|
||||
var data = http.responseText.evalJSON(true);
|
||||
if (data.imported > 0) {
|
||||
appendCalendar(data.displayname, "/" + data.name);
|
||||
refreshEvents();
|
||||
refreshTasks();
|
||||
changeCalendarDisplay();
|
||||
}
|
||||
else {
|
||||
alert (labels["An error occured while importing calendar."]);
|
||||
}
|
||||
}
|
||||
|
||||
function onCalendarExport(event) {
|
||||
var node = $("calendarList").getSelectedNodes().first();
|
||||
var owner = node.getAttribute("owner");
|
||||
|
||||
@@ -56,6 +56,15 @@ function initPreferences() {
|
||||
resetTableActions ();
|
||||
$("categoryAdd").observe ("click", onCategoryAdd);
|
||||
$("categoryDelete").observe ("click", onCategoryDelete);
|
||||
|
||||
// Disable placement (after) if composing in HTML
|
||||
if ($("composeMessagesType")) {
|
||||
if ($("composeMessagesType").value == 1) {
|
||||
$("replyPlacementList").selectedIndex = 0;
|
||||
$("replyPlacementList").disabled = 1;
|
||||
onReplyPlacementListChange ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function resetTableActions() {
|
||||
|
||||
Reference in New Issue
Block a user