Don't initialize Tree History unless tree-slider is present
This was breaking breadcrumb links on non-Tree pages
This commit is contained in:
parent
57e6777b3c
commit
badb092a2d
1 changed files with 15 additions and 17 deletions
|
@ -18,7 +18,6 @@ $ ->
|
|||
"ajax:complete": -> $('.tree_progress').removeClass("loading")
|
||||
|
||||
# Maintain forward/back history while browsing the file tree
|
||||
|
||||
((window) ->
|
||||
History = window.History
|
||||
$ = window.jQuery
|
||||
|
@ -28,7 +27,6 @@ $ ->
|
|||
unless History.enabled
|
||||
return false
|
||||
|
||||
$ ->
|
||||
$('#tree-slider .tree-item-file-name a, .breadcrumb li > a').live 'click', (e) ->
|
||||
History.pushState(null, null, $(@).attr('href'))
|
||||
return false
|
||||
|
|
Loading…
Reference in a new issue