|
|
|
@ -1,11 +1,18 @@ |
|
|
|
const base_url = "https://oss110metz.rezo-rm.fr/" |
|
|
|
|
|
|
|
var historyHandler = []; |
|
|
|
window.onpopstate = history.onpushstate = function(e) { |
|
|
|
show_page(e.state); |
|
|
|
}; |
|
|
|
history.pushState("#main-page", "", "") |
|
|
|
|
|
|
|
function show_page(id) { |
|
|
|
$('#main-page').hide(); |
|
|
|
$('#admin-page').hide(); |
|
|
|
$('#login-page').hide(); |
|
|
|
$('#demande-page').hide(); |
|
|
|
$(id).show(); |
|
|
|
history.pushState(id, "", "") |
|
|
|
} |
|
|
|
|
|
|
|
$("#login-button").click(function (e) { |
|
|
|
@ -27,7 +34,7 @@ $("#login-button").click(function (e) { |
|
|
|
localStorage.setItem("user", data.user); |
|
|
|
show_page('#demande-page'); |
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
@ -76,4 +83,3 @@ $(window).on("load", function() { |
|
|
|
})); |
|
|
|
}, 1000); |
|
|
|
}); |
|
|
|
|
|
|
|
|