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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
f80745b7
Commit
f80745b7
authored
Dec 20, 2011
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle back & forward events
parent
321dbb7b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
16 deletions
+13
-16
app/assets/javascripts/application.js
app/assets/javascripts/application.js
+9
-1
app/controllers/dashboard_controller.rb
app/controllers/dashboard_controller.rb
+3
-3
app/controllers/refs_controller.rb
app/controllers/refs_controller.rb
+1
-4
app/views/refs/_tree.html.haml
app/views/refs/_tree.html.haml
+0
-8
No files found.
app/assets/javascripts/application.js
View file @
f80745b7
...
...
@@ -50,9 +50,17 @@ $(document).ready(function(){
e
.
preventDefault
();
}
});
});
if
(
history
&&
history
.
pushState
)
{
$
(
function
()
{
$
(
window
).
bind
(
"
popstate
"
,
function
()
{
$
.
getScript
(
location
.
href
);
});
});
}
function
focusSearch
()
{
$
(
"
#search
"
).
focus
();
}
...
...
app/controllers/dashboard_controller.rb
View file @
f80745b7
...
...
@@ -7,7 +7,7 @@ class DashboardController < ApplicationController
respond_to
do
|
format
|
format
.
html
format
.
js
{
no_cache_headers
}
format
.
js
end
end
...
...
@@ -18,7 +18,7 @@ class DashboardController < ApplicationController
respond_to
do
|
format
|
format
.
html
format
.
js
{
no_cache_headers
}
format
.
js
end
end
...
...
@@ -32,7 +32,7 @@ class DashboardController < ApplicationController
respond_to
do
|
format
|
format
.
html
format
.
js
{
no_cache_headers
}
format
.
js
format
.
atom
{
render
:layout
=>
false
}
end
end
...
...
app/controllers/refs_controller.rb
View file @
f80745b7
...
...
@@ -26,10 +26,7 @@ class RefsController < ApplicationController
def
tree
respond_to
do
|
format
|
format
.
html
format
.
js
do
# disable cache to allow back button works
no_cache_headers
end
format
.
js
end
rescue
return
render_404
...
...
app/views/refs/_tree.html.haml
View file @
f80745b7
...
...
@@ -49,11 +49,3 @@
$
(
'
select#branch
'
).
selectmenu
({
style
:
'
popup
'
,
width
:
200
});
$
(
'
select#tag
'
).
selectmenu
({
style
:
'
popup
'
,
width
:
200
});
});
-
if
params
[
:path
]
&&
request
.
xhr?
:javascript
$
(
window
).
unbind
(
'
popstate
'
);
$
(
window
).
bind
(
'
popstate
'
,
function
()
{
if
(
location
.
pathname
.
search
(
"
tree
"
)
!=
-
1
)
{
$
.
ajax
({
type
:
"
GET
"
,
url
:
location
.
pathname
,
dataType
:
"
script
"
})}
else
{
location
.
href
=
location
.
pathname
;}});
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