mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-06 17:05:10 +00:00
Fix JavaScript error when changing the status of tasks
Monotone-Parent: 298cdcf2f6c47c075aa3da6b45deb9784730194d Monotone-Revision: dfa6cb30935a437956adf09038461c382666c529 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2009-07-14T17:21:53 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -378,13 +378,13 @@ function triggerAjaxRequest(url, callback, userdata, content, headers) {
|
||||
hasContentLength = true;
|
||||
http.setRequestHeader(i, headers[i]);
|
||||
}
|
||||
}
|
||||
} /*
|
||||
if (!hasContentLength) {
|
||||
var cLength = "0";
|
||||
if (content)
|
||||
cLength = "" + content.length;
|
||||
http.setRequestHeader("Content-Length", "" + cLength);
|
||||
}
|
||||
} */
|
||||
http.send(content ? content : "");
|
||||
}
|
||||
else {
|
||||
@@ -550,7 +550,7 @@ function acceptMultiSelect(node) {
|
||||
}
|
||||
|
||||
function onRowClick(event) {
|
||||
var node = getTarget(event);
|
||||
var node = Event.element(event);
|
||||
var rowIndex = null;
|
||||
|
||||
if (node.tagName != 'TD' && node.tagName != 'LI')
|
||||
@@ -565,13 +565,18 @@ function onRowClick(event) {
|
||||
else if (node.tagName == 'LI') {
|
||||
// Find index of clicked row
|
||||
var list = node.parentNode;
|
||||
var items = list.childNodesWithTag("li");
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
if (items[i] == node) {
|
||||
rowIndex = i;
|
||||
break;
|
||||
if (list) {
|
||||
var items = list.childNodesWithTag("li");
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
if (items[i] == node) {
|
||||
rowIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
// No parent; stop here
|
||||
return true;
|
||||
}
|
||||
|
||||
var initialSelection = $(node.parentNode).getSelectedNodes();
|
||||
|
||||
Reference in New Issue
Block a user