c5759cbf3e763c7248d0630001a7eebda9ed78d5 braney Wed Feb 21 10:34:31 2018 -0800 don't let user's move the "empty collection" stub around diff --git src/hg/js/hgCollection.js src/hg/js/hgCollection.js index c5e3798..8d73ea6 100644 --- src/hg/js/hgCollection.js +++ src/hg/js/hgCollection.js @@ -152,32 +152,35 @@ selectedTree = tree; $(selectedTree).jstree("open_node", selectedNode); } function doubleClickTreeNode(evt, data) { doubleClickNode(evt.target); } function selectTreeNode(evt, data) { selectNode(evt.target, data.node); } function checkCallback( operation, node, node_parent, node_position, more) { // called during a drag and drop action to see if the target is droppable if ((operation === "copy_node") || (operation === "move_node")) { - if ((node.parent != '#') && (node_parent.parent === '#')) + if ((node.parent != '#') && (node_parent.parent === '#')) { + if (node.icon === true) // empty stub + return false; return true; + } return false; } return true; } function dialogCollection() { $("#doNewCollection").off ( "click" ); $("#doNewCollection").click ( newCollection ); $("#viewFuncDiv").show(); $("#customName").val("New Collection"); $("#customDescription").val("New Collection description"); $("#customVis").val("full"); $("#customColorInput").val("#0"); $("#viewFunc").val("show all"); $( "#customName" ).select();