Org Unit Custom Tree supports add directly after delete
authorBill Erickson <berick@esilibrary.com>
Tue, 3 Apr 2012 18:39:00 +0000 (14:39 -0400)
committerMike Rylander <mrylander@gmail.com>
Mon, 9 Apr 2012 14:25:51 +0000 (10:25 -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>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/web/js/ui/default/conify/global/actor/org_unit_custom_tree.js

index 909de62..88d35dc 100644 (file)
@@ -246,6 +246,9 @@ function deleteSelected() {
             );
         }
     );
+
+    // otherwise, delete is only superficial
+    magicTree.model.store.save();
 }
 
 function activateTree() {