parent
f80745b7db
commit
6bdcaccb46
4 changed files with 16 additions and 13 deletions
|
@ -50,17 +50,9 @@ $(document).ready(function(){
|
|||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
if (history && history.pushState) {
|
||||
$(function() {
|
||||
$(window).bind("popstate", function() {
|
||||
$.getScript(location.href);
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function focusSearch() {
|
||||
$("#search").focus();
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ class DashboardController < ApplicationController
|
|||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.js
|
||||
format.js { no_cache_headers }
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -18,7 +18,7 @@ class DashboardController < ApplicationController
|
|||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.js
|
||||
format.js { no_cache_headers }
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -32,7 +32,7 @@ class DashboardController < ApplicationController
|
|||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.js
|
||||
format.js { no_cache_headers }
|
||||
format.atom { render :layout => false }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -26,7 +26,10 @@ class RefsController < ApplicationController
|
|||
def tree
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.js
|
||||
format.js do
|
||||
# disable cache to allow back button works
|
||||
no_cache_headers
|
||||
end
|
||||
end
|
||||
rescue
|
||||
return render_404
|
||||
|
|
|
@ -49,3 +49,11 @@
|
|||
$('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;}});
|
||||
|
|
Loading…
Reference in a new issue