Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
badb092a
Commit
badb092a
authored
Nov 01, 2012
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't initialize Tree History unless tree-slider is present
This was breaking breadcrumb links on non-Tree pages
parent
57e6777b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
20 deletions
+18
-20
app/assets/javascripts/tree.js.coffee
app/assets/javascripts/tree.js.coffee
+18
-20
No files found.
app/assets/javascripts/tree.js.coffee
View file @
badb092a
...
...
@@ -17,23 +17,21 @@ $ ->
"ajax:beforeSend"
:
->
$
(
'.tree_progress'
).
addClass
(
"loading"
)
"ajax:complete"
:
->
$
(
'.tree_progress'
).
removeClass
(
"loading"
)
# Maintain forward/back history while browsing the file tree
((
window
)
->
History
=
window
.
History
$
=
window
.
jQuery
document
=
window
.
document
# Check to see if History.js is enabled for our Browser
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
History
.
Adapter
.
bind
window
,
'statechange'
,
->
state
=
History
.
getState
()
window
.
ajaxGet
(
state
.
url
)
)(
window
)
# Maintain forward/back history while browsing the file tree
((
window
)
->
History
=
window
.
History
$
=
window
.
jQuery
document
=
window
.
document
# Check to see if History.js is enabled for our Browser
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
History
.
Adapter
.
bind
window
,
'statechange'
,
->
state
=
History
.
getState
()
window
.
ajaxGet
(
state
.
url
)
)(
window
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment