Commit 97e9774336c1de54d2734304dcb94511682f6613
1 parent
a77c8bf9
Exists in
master
and in
4 other branches
fixed tree view
Showing
2 changed files
with
10 additions
and
5 deletions
Show diff stats
app/assets/javascripts/tree.js
| ... | ... | @@ -5,21 +5,21 @@ |
| 5 | 5 | var Tree = { |
| 6 | 6 | init: |
| 7 | 7 | function() { |
| 8 | - (new Image).src = "ajax-loader-facebook.gif"; | |
| 8 | + (new Image).src = "/assets/ajax-loader-facebook.gif"; | |
| 9 | 9 | |
| 10 | - $('#tree-slider td.tree-item-file-name a, #tree-breadcrumbs a').live("click", function() { | |
| 10 | + $('#tree-slider .tree-item-file-name a, .breadcrumb a').live("click", function() { | |
| 11 | 11 | history.pushState({ path: this.path }, '', this.href) |
| 12 | 12 | $("#tree-content-holder").hide("slide", { direction: "left" }, 150) |
| 13 | 13 | }) |
| 14 | 14 | |
| 15 | - $("#tree-slider tr.tree-item").live('click', function(e){ | |
| 15 | + $("#tree-slider .tree-item").live('click', function(e){ | |
| 16 | 16 | if(e.target.nodeName != "A") { |
| 17 | - link = $(this).find("td.tree-item-file-name a"); | |
| 17 | + link = $(this).find(".tree-item-file-name a"); | |
| 18 | 18 | link.trigger("click"); |
| 19 | 19 | } |
| 20 | 20 | }); |
| 21 | 21 | |
| 22 | - $('#tree-slider td.tree-item-file-name a, #tree-breadcrumbs a').live({ | |
| 22 | + $('#tree-slider td.tree-item-file-name a, .breadcrumb a').live({ | |
| 23 | 23 | "ajax:beforeSend": function() { $('.tree_progress').addClass("loading"); }, |
| 24 | 24 | "ajax:complete": function() { $('.tree_progress').removeClass("loading"); } |
| 25 | 25 | }); | ... | ... |