Bug fix: correct ajax multiple delete

git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@252 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
mensonge 2009-02-05 16:37:36 +00:00
parent d84467ff3d
commit 0c3df8a825
2 changed files with 6 additions and 6 deletions

View file

@ -40,6 +40,7 @@ if (!$bookmarkservice->editAllowed($bookmark)) {
} else { } else {
$result = T_('Failed to delete bookmark'); $result = T_('Failed to delete bookmark');
} }
?> ?>
<response> <response>
<method>deleteConfirmed</method> <method>deleteConfirmed</method>

View file

@ -32,9 +32,9 @@ function deleteCancelled(ele) {
} }
function deleteConfirmed(ele, input, response) { function deleteConfirmed(ele, input, response) {
if (deleted == false) { //if (deleted == false) {
deleted = ele.parentNode.parentNode.parentNode.parentNode; deleted = ele.parentNode.parentNode.parentNode.parentNode;
} //}
var post = deleted; var post = deleted;
post.className = 'xfolkentry deleted'; post.className = 'xfolkentry deleted';
if (response != '') { if (response != '') {
@ -43,7 +43,6 @@ function deleteConfirmed(ele, input, response) {
} else { } else {
loadXMLDoc('<?php echo ROOT; ?>ajaxDelete.php?id=' + input); loadXMLDoc('<?php echo ROOT; ?>ajaxDelete.php?id=' + input);
post.style.display = 'none'; post.style.display = 'none';
} }
} }
@ -125,7 +124,7 @@ function loadXMLDoc(url) {
function processStateChange() { function processStateChange() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
response = xmlhttp.responseXML.documentElement; response = xmlhttp.responseXML.documentElement;
method = response.getElementsByTagName('method')[0].firstChild.data; method = response.getElementsByTagName('method')[0].firstChild.data;
result = response.getElementsByTagName('result')[0].firstChild.data; result = response.getElementsByTagName('result')[0].firstChild.data;
eval(method + '(\'\', result)'); eval(method + '(\'\', result)');