Double clicking on an album switches to that album, selects it in the

tree and expands it if it's not already expanded.
This commit is contained in:
Bharat Mediratta
2011-01-05 22:48:27 -08:00
parent 2167168f51
commit b424cac5c5
@@ -92,6 +92,13 @@
new Ext.DataView.DragSelector({dragSafe: true})
],
listeners: {
"dblclick": function(v, index, node, e) {
node = Ext.get(node);
if (node.hasClass("thumb-album")) {
var id = node.getAttribute("rel");
tree_panel.fireEvent("click", tree_panel.getNodeById(id))
}
},
"render": function(v) {
v.dragZone = new Ext.dd.DragZone(v.getEl(), {
ddGroup: "organizeDD",
@@ -307,6 +314,9 @@
listeners: {
"click": function(node) {
load_album_data(node.id);
if (node.isExpandable() && !node.isExpanded()) {
node.expand();
}
},
"afterrender": function(v) {
// Override Ext.tree.TreeDragZone.onNodeOver to change the