Commit 97e9774336c1de54d2734304dcb94511682f6613

Authored by Dmitriy Zaporozhets
1 parent a77c8bf9

fixed tree view

app/assets/javascripts/tree.js
@@ -5,21 +5,21 @@ @@ -5,21 +5,21 @@
5 var Tree = { 5 var Tree = {
6 init: 6 init:
7 function() { 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 history.pushState({ path: this.path }, '', this.href) 11 history.pushState({ path: this.path }, '', this.href)
12 $("#tree-content-holder").hide("slide", { direction: "left" }, 150) 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 if(e.target.nodeName != "A") { 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 link.trigger("click"); 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 "ajax:beforeSend": function() { $('.tree_progress').addClass("loading"); }, 23 "ajax:beforeSend": function() { $('.tree_progress').addClass("loading"); },
24 "ajax:complete": function() { $('.tree_progress').removeClass("loading"); } 24 "ajax:complete": function() { $('.tree_progress').removeClass("loading"); }
25 }); 25 });
app/assets/stylesheets/tree.scss
@@ -122,5 +122,10 @@ table.highlighttable .linenodiv pre { @@ -122,5 +122,10 @@ table.highlighttable .linenodiv pre {
122 122
123 .tree-item-file-name { 123 .tree-item-file-name {
124 font-weight:bold; 124 font-weight:bold;
  125 +
  126 + img {
  127 + position: relative;
  128 + top: 2px;
  129 + }
125 } 130 }
126 } 131 }