Ajax branch/tag switch for tree view
This commit is contained in:
parent
97e9774336
commit
ae5faf0fd3
11 changed files with 151 additions and 110 deletions
|
@ -5,13 +5,16 @@
|
|||
var Tree = {
|
||||
init:
|
||||
function() {
|
||||
(new Image).src = "/assets/ajax-loader-facebook.gif";
|
||||
|
||||
$('#tree-slider .tree-item-file-name a, .breadcrumb a').live("click", function() {
|
||||
history.pushState({ path: this.path }, '', this.href)
|
||||
$('#tree-slider .tree-item-file-name a, .breadcrumb li > a').live("click", function() {
|
||||
$("#tree-content-holder").hide("slide", { direction: "left" }, 150)
|
||||
})
|
||||
|
||||
$('.project-refs-form').live({
|
||||
"ajax:beforeSend": function() {
|
||||
$("#tree-content-holder").hide("slide", { direction: "left" }, 150);
|
||||
}
|
||||
})
|
||||
|
||||
$("#tree-slider .tree-item").live('click', function(e){
|
||||
if(e.target.nodeName != "A") {
|
||||
link = $(this).find(".tree-item-file-name a");
|
||||
|
@ -19,7 +22,7 @@ var Tree = {
|
|||
}
|
||||
});
|
||||
|
||||
$('#tree-slider td.tree-item-file-name a, .breadcrumb a').live({
|
||||
$('#tree-slider .tree-item-file-name a, .breadcrumb a, .project-refs-form').live({
|
||||
"ajax:beforeSend": function() { $('.tree_progress').addClass("loading"); },
|
||||
"ajax:complete": function() { $('.tree_progress').removeClass("loading"); }
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue