Changeset 524
- Timestamp:
- 08/08/07 00:41:07 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
pagoda/trunk/Pagoda/pagoda/widgets/admin/static/javascript/tree_menu.js
r523 r524 3 3 4 4 // Configure this menu 5 this.shadow = false;5 this.shadow = true; 6 6 Ext.menu.TreeMenu.superclass.constructor.call(this, config); 7 7 … … 73 73 this.tree = tree; 74 74 75 // Given a node, returns the underlying element 76 var get_node_el = function (node) { 77 return node.ui.getEl(); 78 } 75 // When a node in the tree is clicked, show the menu on that node 76 this.tree.on('click', function(node) { 77 this.tree_node = node; 78 this.show(this.tree_node.ui.getEl(), position); 79 }, this); 79 80 80 // When a node in the tree is clicked, show the menu 81 this.tree.on('click', function(node) { 82 var node_el = get_node_el(node); 83 this.show(node_el, position); 84 }, this); 81 // Likewise when the menu goes away, deselect the tree node 82 this.on('hide', function(menu) { 83 menu.tree_node.unselect(); 84 }); 85 85 } 86 86 });
