summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/tree.js
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-01-29 21:30:03 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-01-29 21:30:03 +0200
commitae5faf0fd32160dd46a7e94e230d241de8ec4e38 (patch)
treecbab11b34256eb42cf5eb3cc5d4fd0ce251db028 /app/assets/javascripts/tree.js
parent97e9774336c1de54d2734304dcb94511682f6613 (diff)
downloadgitlab-ce-ae5faf0fd32160dd46a7e94e230d241de8ec4e38.tar.gz
Ajax branch/tag switch for tree view
Diffstat (limited to 'app/assets/javascripts/tree.js')
-rw-r--r--app/assets/javascripts/tree.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/app/assets/javascripts/tree.js b/app/assets/javascripts/tree.js
index 3b47f81c223..1c62751ad25 100644
--- a/app/assets/javascripts/tree.js
+++ b/app/assets/javascripts/tree.js
@@ -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"); }
});