Org Unit Custom Tree supports add directly after delete collab/berick/org-custom-tree-add-after-delete
authorBill Erickson <berick@esilibrary.com>
Tue, 3 Apr 2012 18:39:00 +0000 (14:39 -0400)
committerBill Erickson <berick@esilibrary.com>
Tue, 3 Apr 2012 18:39:00 +0000 (14:39 -0400)
When deleting a node from the custom tree, it's necessary to save the
tree store after the final call to store.deleteItem, or the delete
operation will not complete.  Without this, it's not possible to add a
remove org unit back into the custom tree without reloading the UI.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/web/js/ui/default/conify/global/actor/org_unit_custom_tree.js

index 695a9c4..e851c3b 100644 (file)
@@ -243,6 +243,9 @@ function deleteSelected() {
             );
         }
     );
+
+    // otherwise, delete is only superficial
+    magicTree.model.store.save();
 }
 
 function activateTree() {