Welcome to mirror list, hosted at ThFree Co, Russian Federation.

tree.js « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6edd7e49c5ad9e9238689e64ea266e77bcbfb949 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/**
 * Tree slider for code browse
 *
 */
var Tree = { 
  init: 
    function() { 
      $('#tree-slider td.tree-item-file-name a, #tree-breadcrumbs a').live("click", function() {
        history.pushState({ path: this.path }, '', this.href)
      })

      $("#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;
        }
      });
    }
}