31 lines
		
	
	
		
			718 B
		
	
	
	
		
			JavaScript
		
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			718 B
		
	
	
	
		
			JavaScript
		
	
	
	
| $(function () { 
 | |
|   $('#panel_sidebar a, #panel_main a.nav').live('click',  
 | |
|     function () {  
 | |
|       $.getScript(this.href);
 | |
| 			history.pushState(null, document.title, this.href);
 | |
| 			history_edited = true;
 | |
|       return false;
 | |
|     }  
 | |
|   );
 | |
| 
 | |
|   $('#panel_main a.reload').live('click',
 | |
|     function () { 
 | |
|       $.getScript(this.href);
 | |
| 			history.replaceState(null, document.title, this.href);
 | |
| 			history_edited = true;
 | |
|       return false;
 | |
|     }
 | |
|   );
 | |
| 
 | |
| 	$('.form').live('submit', function () { 
 | |
|     $.post(this.action, $(this).serialize(), null, 'script');
 | |
| 		history_edited = true;
 | |
|     return false;
 | |
|   });
 | |
| 
 | |
| 	$(window).bind("popstate", function () { 
 | |
| 		if (history_edited) { 
 | |
|     	$.getScript(location.href);  
 | |
| 		}
 | |
|   });
 | |
| }); |