Mantis 2175: Calendar - menu contextuel des tâches

Monotone-Parent: 9a9029239df8b59ccf4609e50402e80e31085154
Monotone-Revision: 7ac5d165aefe44d7baf56c60ea6bdd8b100d1675

Monotone-Author: crobert@inverse.ca
Monotone-Date: 2009-08-25T17:34:37
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
C Robert 2009-08-25 17:34:37 +00:00
parent b7c9a59791
commit 2723e6ffeb
13 changed files with 94 additions and 37 deletions

View File

@ -521,4 +521,8 @@ vtodo_class2 = "(Tarefa Confidencial)";
"tagAlreadyExists" = "The tag you specified is already associated to another calendar.";
"tagHasChanged" = "If you change your calendar's tag, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasAdded" = "If you want to synchronize this calendar, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"Open Task..." = "Open Task...";
"Mark Completed" = "Mark Completed";
"Delete Task" = "Delete Task";

View File

@ -521,4 +521,8 @@ vtodo_class2 = "(Důvěrný úkol)";
"tagAlreadyExists" = "The tag you specified is already associated to another calendar.";
"tagHasChanged" = "If you change your calendar's tag, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasAdded" = "If you want to synchronize this calendar, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"Open Task..." = "Open Task...";
"Mark Completed" = "Mark Completed";
"Delete Task" = "Delete Task";

View File

@ -521,4 +521,8 @@ vtodo_class2 = "(Vertrouwelijke taak)";
"tagAlreadyExists" = "The tag you specified is already associated to another calendar.";
"tagHasChanged" = "If you change your calendar's tag, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasAdded" = "If you want to synchronize this calendar, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"Open Task..." = "Open Task...";
"Mark Completed" = "Mark Completed";
"Delete Task" = "Delete Task";

View File

@ -521,4 +521,8 @@ vtodo_class2 = "(Confidential task)";
"tagAlreadyExists" = "The tag you specified is already associated to another calendar.";
"tagHasChanged" = "If you change your calendar's tag, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasAdded" = "If you want to synchronize this calendar, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"Open Task..." = "Open Task...";
"Mark Completed" = "Mark Completed";
"Delete Task" = "Delete Task";

View File

@ -521,4 +521,8 @@ vtodo_class2 = "(Tâche confidentielle)";
"tagAlreadyExists" = "The tag you specified is already associated to another calendar.";
"tagHasChanged" = "If you change your calendar's tag, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasAdded" = "If you want to synchronize this calendar, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"Open Task..." = "Ouvrir la tâche...";
"Mark Completed" = "Marquer comme accomplie";
"Delete Task" = "Supprimer la tâche";

View File

@ -521,4 +521,8 @@ vtodo_class2 = "(Vertrauliche Aufgabe)";
"tagAlreadyExists" = "The tag you specified is already associated to another calendar.";
"tagHasChanged" = "If you change your calendar's tag, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasAdded" = "If you want to synchronize this calendar, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"Open Task..." = "Open Task...";
"Mark Completed" = "Mark Completed";
"Delete Task" = "Delete Task";

View File

@ -521,4 +521,8 @@ vtodo_class2 = "(Bizalmas feladat)";
"tagAlreadyExists" = "The tag you specified is already associated to another calendar.";
"tagHasChanged" = "If you change your calendar's tag, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasAdded" = "If you want to synchronize this calendar, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"Open Task..." = "Open Task...";
"Mark Completed" = "Mark Completed";
"Delete Task" = "Delete Task";

View File

@ -521,4 +521,8 @@ vtodo_class2 = "(Attività confidenziale)";
"tagAlreadyExists" = "The tag you specified is already associated to another calendar.";
"tagHasChanged" = "If you change your calendar's tag, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasAdded" = "If you want to synchronize this calendar, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"Open Task..." = "Open Task...";
"Mark Completed" = "Mark Completed";
"Delete Task" = "Delete Task";

View File

@ -521,4 +521,8 @@ vtodo_class2 = "(Confidential task)";
"tagAlreadyExists" = "The tag you specified is already associated to another calendar.";
"tagHasChanged" = "If you change your calendar's tag, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasAdded" = "If you want to synchronize this calendar, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"Open Task..." = "Open Task...";
"Mark Completed" = "Mark Completed";
"Delete Task" = "Delete Task";

View File

@ -521,4 +521,8 @@ vtodo_class2 = "(Tarea confidencial)";
"tagAlreadyExists" = "The tag you specified is already associated to another calendar.";
"tagHasChanged" = "If you change your calendar's tag, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasAdded" = "If you want to synchronize this calendar, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"Open Task..." = "Open Task...";
"Mark Completed" = "Mark Completed";
"Delete Task" = "Delete Task";

View File

@ -521,4 +521,8 @@ vtodo_class2 = "(Tasg gyhoeddus)";
"tagAlreadyExists" = "The tag you specified is already associated to another calendar.";
"tagHasChanged" = "If you change your calendar's tag, you'll need to perform a slow sync on your mobile device.\nContinue?";
"tagWasAdded" = "If you want to synchronize this calendar, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to perform a slow sync on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to perform a slow sync on your mobile device.\nContinue?";
"Open Task..." = "Open Task...";
"Mark Completed" = "Mark Completed";
"Delete Task" = "Delete Task";

View File

@ -62,6 +62,16 @@
</ul>
</div>
<div class="menu" id="tasksListMenu">
<ul>
<li><var:string label:value="Open Task..."/></li>
<li><var:string label:value="New Task..."/></li>
<li><!-- separator --></li>
<li><var:string label:value="Mark Completed"/></li>
<li><var:string label:value="Delete Task"/></li>
</ul>
</div>
<div class="menu" id="calendarsMenu">
<ul>
<li><var:string label:value="Modify"/></li>

View File

@ -688,6 +688,8 @@ function tasksListCallback(http) {
var t = new Element ("span");
t.update (data[i][3]);
listItem.appendChild (t);
listItem.attachMenu ("tasksListMenu");
}
list.scrollTop = list.previousScroll;
@ -1593,32 +1595,7 @@ function updateTaskStatus(event) {
if (isSafari() && !isSafari3()) {
newStatus = (newStatus ? 0 : 1);
}
url = (ApplicationBaseURL + this.parentNode.calendar
+ "/" + this.parentNode.cname + "/changeStatus?status=" + newStatus);
var http = createHTTPClient();
if (http) {
// TODO: add parameter to signal that we are only interested in OK
http.open("POST", url, false /* not async */);
http.url = url;
try {
http.send("");
}
catch (e) {
/* IE7 tends to generate "transaction aborted" errors for synchronous
transactions returning HTTP code 204. */
log("exception during http.send (expected on IE7)");
}
if (isHttpStatus204(http.status))
refreshTasks();
else if (parseInt(http.status) == 403) {
window.alert(clabels["You don't have the required privileges to perform the operation."]);
this.checked = !this.checked;
}
else
log ("updateTaskStatus: error (http code " + http.status + ")");
}
_updateTaskCompletion (this.parentNode, newStatus);
return false;
}
@ -1771,6 +1748,9 @@ function getMenus() {
null, "-", onMenuSharing);
menus["searchMenu"] = new Array(setSearchCriteria);
menus["tasksListMenu"] = new Array (editEvent, newTask, "-",
marksTasksAsCompleted, deleteEvent);
var calendarsMenu = $("calendarsMenu");
if (calendarsMenu)
calendarsMenu.prepareVisibility = onCalendarsMenuPrepareVisibility;
@ -1778,6 +1758,29 @@ function getMenus() {
return menus;
}
function newTask () {
return newEvent(this, 'task');
}
function marksTasksAsCompleted () {
var selectedTasks = $$("UL#tasksList LI._selected");
for (var i = 0; i < selectedTasks.length; i++) {
var task = selectedTasks[i];
_updateTaskCompletion (task, 1);
}
}
function _updateTaskCompletion (task, value) {
var checkBox = task.down ("INPUT");
url = (ApplicationBaseURL + task.calendar
+ "/" + task.cname + "/changeStatus?status=" + value);
triggerAjaxRequest(url, refreshTasks, null);
return false;
}
function onMenuSharing(event) {
if ($(this).hasClassName("disabled"))
return;