mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-14 01:38:51 +00:00
Monotone-Parent: 63ef91fbc44c18eb342997f61dccacbaf30852b2
Monotone-Revision: e050f8546ce00df9b723f68940ffbabbf98553ce Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-10-12T21:05:32 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
2006-10-12 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/WebServerResources/SchedulerUI.js: manage both lists of
|
||||
objects wrt to the toolbar actions.
|
||||
|
||||
* UI/WebServerResources/generic.js: added code to the "String"
|
||||
class to decode number-encoded char entities.
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@ var sortOrder = '';
|
||||
var sortKey = '';
|
||||
var listFilter = 'view_today';
|
||||
|
||||
var listOfSelection = null;
|
||||
|
||||
var hideCompletedTasks = 0;
|
||||
|
||||
var currentDay = '';
|
||||
@@ -39,25 +41,29 @@ function _editEventId(id) {
|
||||
}
|
||||
|
||||
function editEvent() {
|
||||
var list = $("appointmentsList");
|
||||
var nodes = list.getSelectedRowsId();
|
||||
if (listOfSelection) {
|
||||
var nodes = listOfSelection.getSelectedRowsId();
|
||||
|
||||
if (nodes.length > 0)
|
||||
_editEventId(nodes[0]);
|
||||
for (var i = 0; i < nodes.length; i++)
|
||||
_editEventId(nodes[i]);
|
||||
}
|
||||
|
||||
return false; /* stop following the link */
|
||||
}
|
||||
|
||||
function deleteEvent() {
|
||||
var list = $("appointmentsList");
|
||||
var nodes = list.getSelectedRowsId();
|
||||
function deleteEvent()
|
||||
{
|
||||
if (listOfSelection) {
|
||||
var nodes = listOfSelection.getSelectedRowsId();
|
||||
|
||||
if (nodes.length > 0) {
|
||||
if (confirm(labels["appointmentDeleteConfirmation"])) {
|
||||
var urlstr = ApplicationBaseURL + nodes[0] + "/delete";
|
||||
document.deleteEventAjaxRequest = triggerAjaxRequest(urlstr,
|
||||
deleteEventCallback,
|
||||
nodes[0]);
|
||||
if (nodes.length > 0) {
|
||||
if (confirm(labels["appointmentDeleteConfirmation"].decodeEntities())) {
|
||||
var urlstr = (ApplicationBaseURL
|
||||
+ "batchDelete?ids=" + nodes.join('/'));
|
||||
document.deleteEventAjaxRequest = triggerAjaxRequest(urlstr,
|
||||
deleteEventCallback,
|
||||
nodes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,9 +75,11 @@ function deleteEventCallback(http)
|
||||
if (http.readyState == 4
|
||||
&& http.status == 200) {
|
||||
document.deleteEventAjaxRequest = null;
|
||||
var node = $(http.callbackData);
|
||||
log ("deleteEventCallback: " + node);
|
||||
node.parentNode.removeChild(node);
|
||||
var nodes = $(http.callbackData);
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
var node = $(nodes[i]);
|
||||
node.parentNode.removeChild(node);
|
||||
}
|
||||
}
|
||||
else
|
||||
log ("ajax fuckage");
|
||||
@@ -449,6 +457,16 @@ function onAppointmentContextMenuHide(event)
|
||||
|
||||
function onAppointmentsSelectionChange()
|
||||
{
|
||||
listOfSelection = $("appointmentsList");
|
||||
listOfSelection.removeClassName("_unfocused");
|
||||
$("tasksList").addClassName("_unfocused");
|
||||
}
|
||||
|
||||
function onTasksSelectionChange()
|
||||
{
|
||||
listOfSelection = $("tasksList");
|
||||
listOfSelection.removeClassName("_unfocused");
|
||||
$("appointmentsList").addClassName("_unfocused");
|
||||
}
|
||||
|
||||
function _loadAppointmentHref(href) {
|
||||
|
||||
Reference in New Issue
Block a user