]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/list-manipulation.js
Wordpress 2.0.4
[autoinstalls/wordpress.git] / wp-admin / list-manipulation.js
index 38cc60247c941282ebbd485aed018a470d4b0a1a..adf3f4f8d542763334f50a89542aa5677c7830e0 100644 (file)
@@ -33,13 +33,13 @@ function ajaxDelete(what, id) {
        ajaxDel.onLoaded = function() { ajaxDel.myResponseElement.innerHTML = 'Data Sent...'; };
        ajaxDel.onInteractive = function() { ajaxDel.myResponseElement.innerHTML = 'Processing Data...'; };
        ajaxDel.onCompletion = function() { removeThisItem( what + '-' + id ); };
-       ajaxDel.runAJAX('action=delete-' + what + '&id=' + id);
+       ajaxDel.runAJAX('action=delete-' + what + '&id=' + id + '&' + ajaxDel.encVar('cookie', document.cookie));
        return false;
 }
 
 function removeThisItem(id) {
        var response = ajaxDel.response;
-       if ( isNaN(response) ) { alert(response); }
+       if ( isNaN(response) ) { ajaxDel.myResponseElement.innerHTML = response; return false; }
        response = parseInt(response, 10);
        if ( -1 == response ) { ajaxDel.myResponseElement.innerHTML = "You don't have permission to do that."; }
        else if ( 0 == response ) { ajaxDel.myResponseElement.interHTML = "Something odd happened.  Try refreshing the page? Either that or what you tried to delete never existed in the first place."; }