eb78be0ea632442a7ff6c55321f5bb6cafb2c7d2 braney Tue Mar 6 09:36:21 2018 -0800 add tool tips and the ability to put multiwigs into collections from hgTracks diff --git src/hg/js/hgCollection.js src/hg/js/hgCollection.js index 5150671..102c7f6 100644 --- src/hg/js/hgCollection.js +++ src/hg/js/hgCollection.js @@ -71,30 +71,31 @@ }; return items; } function changeCollection() { var newName = $("#customName").val().trim(); if (!validateLabel(newName)) return; var newDescription = $("#customDescription").val().trim(); if (!validateLabel(newDescription)) return; $( "#newCollectionDialog" ).dialog("close"); selectedNode.li_attr.class = "folder"; + selectedNode.li_attr.title = collectionTitle; selectedNode.li_attr.shortlabel = newName; selectedNode.li_attr.longlabel = newDescription; selectedNode.li_attr.visibility = $("#customVis").val(); selectedNode.li_attr.color = $("#customColorInput").val(); selectedNode.li_attr.missingmethod = $("input:radio[name ='missingData']:checked").val(); selectedNode.li_attr.viewfunc = $("#viewFunc").val(); rebuildLabel(); } function doubleClickNode(tree) { var node = $(selectedTree).jstree("get_node", tree.id); var color = node.li_attr.color; var name = node.li_attr.shortlabel; var description = node.li_attr.longlabel; var visibility = node.li_attr.visibility; @@ -455,30 +456,32 @@ 'core': { "data" : buildCollections, "dblclick_toggle" : false, }, 'dnd': { "check_callback" : checkCallback, } }); $(newTree).on("select_node.jstree", selectTreeNode); $(newTree).on("dblclick.jstree", doubleClickTreeNode); $(newTree).on("move_node.jstree", moveNode); $(newTree).on("copy_node.jstree", function (evt, data) { $(evt.target).jstree("open_node", data.parent); $(evt.target).jstree("set_icon", data.node, 'fa fa-minus-square'); + data.node.li_attr.title = collectionTitle; + $(evt.target).jstree("redraw", "true"); }); $(newTree).on('click', '.jstree-themeicon ', minusHit); selectedTree = newTree; treeDiv=$('#tracks'); treeDiv.jstree({ 'plugins' : ['conditionalselect', 'contextmenu'], 'contextmenu': { "items" : currentTrackItems}, 'dnd': { "check_callback" : checkCallback, 'always_copy' : true, is_draggable: isDraggable, }, 'core' : {