Bug fix: correct AJAX deleting of bookmarks (thank you Ricco)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@163 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
parent
981c30b57e
commit
60b9c2c903
1 changed files with 5 additions and 3 deletions
|
@ -20,7 +20,7 @@ String.prototype.trim = function() {
|
||||||
var deleted = false;
|
var deleted = false;
|
||||||
function deleteBookmark(ele, input){
|
function deleteBookmark(ele, input){
|
||||||
var confirmDelete = "<span><?php echo T_('Are you sure?') ?> <a href=\"#\" onclick=\"deleteConfirmed(this, " + input + ", \'\'); return false;\"><?php echo T_('Yes'); ?></a> - <a href=\"#\" onclick=\"deleteCancelled(this); return false;\"><?php echo T_('No'); ?></a></span>";
|
var confirmDelete = "<span><?php echo T_('Are you sure?') ?> <a href=\"#\" onclick=\"deleteConfirmed(this, " + input + ", \'\'); return false;\"><?php echo T_('Yes'); ?></a> - <a href=\"#\" onclick=\"deleteCancelled(this); return false;\"><?php echo T_('No'); ?></a></span>";
|
||||||
ele.style.display = 'none';
|
ele.style.display = 'none';
|
||||||
ele.parentNode.innerHTML = ele.parentNode.innerHTML + confirmDelete;
|
ele.parentNode.innerHTML = ele.parentNode.innerHTML + confirmDelete;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,14 +34,16 @@ 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 != '') {
|
||||||
post.style.display = 'none';
|
post.style.display = 'none';
|
||||||
deleted = false;
|
deleted = false;
|
||||||
} else {
|
} else {
|
||||||
loadXMLDoc('<?php echo $root; ?>ajaxDelete.php?id=' + input);
|
loadXMLDoc('<?php echo $root; ?>ajaxDelete.php?id=' + input);
|
||||||
|
post.style.display = 'none';
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue