Merge branch 'master' of git.rezo-rm.fr:BDEMetz/bde-liste
This commit is contained in:
commit
12e1af1339
1 changed files with 9 additions and 5 deletions
|
@ -1,5 +1,6 @@
|
|||
const base_url = "https://oss110metz.rezo-rm.fr/"
|
||||
|
||||
var page = ['#main-page', '#admin-page', '#login-page', '#demande-page'];
|
||||
var historyHandler = [];
|
||||
window.onpopstate = history.onpushstate = function(e) {
|
||||
if (e.state) {
|
||||
|
@ -10,11 +11,10 @@ window.onpopstate = history.onpushstate = function(e) {
|
|||
};
|
||||
history.pushState("#main-page", "", "")
|
||||
|
||||
function show_page(id, historyPush) {
|
||||
$('#main-page').hide();
|
||||
$('#admin-page').hide();
|
||||
$('#login-page').hide();
|
||||
$('#demande-page').hide();
|
||||
function show_page(id) {
|
||||
for(i in page) {
|
||||
$(page[i]).hide();
|
||||
}
|
||||
$(id).show();
|
||||
if (!historyPush) {
|
||||
history.pushState(id, "", "")
|
||||
|
@ -64,6 +64,10 @@ $(window).on("load", function() {
|
|||
navigator.serviceWorker.register('./js/sw.js');
|
||||
}
|
||||
|
||||
for(i in page) {
|
||||
$(page[i]).css('z-index', i);
|
||||
}
|
||||
|
||||
/* load timer */
|
||||
window.setInterval(function() {
|
||||
var time = $("#timer").text();
|
||||
|
|
Loading…
Reference in a new issue