play with tree view
This commit is contained in:
parent
6bdcaccb46
commit
3d4f524dcb
4 changed files with 18 additions and 5 deletions
|
@ -5,17 +5,23 @@
|
|||
var Tree = {
|
||||
init:
|
||||
function() {
|
||||
(new Image).src = "/assets/ajax-loader-tree.gif";
|
||||
|
||||
$('#tree-slider td.tree-item-file-name a, #tree-breadcrumbs a').live("click", function() {
|
||||
history.pushState({ path: this.path }, '', this.href)
|
||||
$("#tree-content-holder").hide("slide", { direction: "left" }, 150)
|
||||
})
|
||||
|
||||
$("#tree-slider tr.tree-item").live('click', function(e){
|
||||
if(e.target.nodeName != "A") {
|
||||
e.stopPropagation();
|
||||
link = $(this).find("td.tree-item-file-name a");
|
||||
link.click();
|
||||
return false;
|
||||
link.trigger("click");
|
||||
}
|
||||
});
|
||||
|
||||
$('#tree-slider td.tree-item-file-name a, #tree-breadcrumbs a').live({
|
||||
"ajax:beforeSend": function() { $('h2.icon').addClass("loading") },
|
||||
"ajax:complete": function() { $('h2.icon').removeClass("loading")}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue