fixed several small bugs concerning the statesystem - reload function works now as exspected

This commit is contained in:
Ulf Gebhardt 2015-04-06 17:22:45 +02:00
parent bab21887c3
commit 9b74439f85
3 changed files with 6 additions and 6 deletions

View File

@ -150,9 +150,9 @@ SYSTEM.prototype.back = function(){
window.history.back();}; window.history.back();};
SYSTEM.prototype.forwad = function(){ SYSTEM.prototype.forwad = function(){
window.history.forward();}; window.history.forward();};
SYSTEM.prototype.reload = function(){ SYSTEM.prototype.reload = function(href){
//window.location.reload(); if('#!'+this.cur_state() === href){
this.go_state(this.cur_state(),true); this.go_state(this.cur_state(),true);}
}; };
SYSTEM.prototype.language = function(lang){ SYSTEM.prototype.language = function(lang){

View File

@ -1,11 +1,11 @@
$(document).ready(function() { $(document).ready(function() {
new SYSTEM('./api.php',42,'start'); new SYSTEM('./sai.php',42,'start');
$('#sai_navbar ul li a, #project_navbar ul li a').click(function () { $('#sai_navbar ul li a, #project_navbar ul li a').click(function () {
$('#sai_navbar li, #project_navbar li').each(function(){ $('#sai_navbar li, #project_navbar li').each(function(){
$(this).removeClass('active');}); $(this).removeClass('active');});
$(this).parent().addClass('active'); $(this).parent().addClass('active');
system.reload(); system.reload($(this).attr('href'));
}); });
$('#sai_navbar li, #project_navbar li').each(function(){ $('#sai_navbar li, #project_navbar li').each(function(){