Handle back & forward events

This commit is contained in:
Dmitriy Zaporozhets 2011-12-20 08:39:14 +02:00
parent 321dbb7bac
commit f80745b7db
4 changed files with 13 additions and 16 deletions

View file

@ -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;}});