]> git.mxchange.org Git - friendica.git/commitdiff
avoid race condition on delete checked items
authorFriendika <info@friendika.com>
Thu, 16 Jun 2011 07:38:41 +0000 (00:38 -0700)
committerFriendika <info@friendika.com>
Thu, 16 Jun 2011 07:38:41 +0000 (00:38 -0700)
mod/item.php
view/jot-header.tpl

index 3edbae696e7f686be694e1fb714ce8e2e8c25b3b..98f4ff90c29ce4d40e9b1e3148661f7c0eeb7a0a 100644 (file)
@@ -26,6 +26,8 @@ function item_post(&$a) {
                require_once('include/items.php');
                $arr_drop = explode(',',$_POST['dropitems']);
                drop_items($arr_drop);
+               $json = array('success' => 1);
+               echo json_encode($json);
                killme();
        }
 
index 382a52644696bc25fb43f7d9a86cac495cdf1f6c..61c80702efb4c4f68dc2a78e82ccffcd87c7c42e 100644 (file)
@@ -120,9 +120,9 @@ tinyMCE.init({
                                        checkedstr = $(this).val();
                        }       
                });
-               $.post('item', { dropitems: checkedstr });
-               window.location.reload();
-
+               $.post('item', { dropitems: checkedstr }, function(data) {
+                       window.location.reload();
+               });
        }
 
        function jotGetLink() {