From 49aa42155997ffe38f3d41a2617fdf568c041ec4 Mon Sep 17 00:00:00 2001 From: "H.Plato" Date: Fri, 11 Aug 2017 19:26:06 -0600 Subject: [PATCH] IA7 v1.5.700 - cookie support for notification preferences --- web/ia7/house/main.shtml | 2 +- web/ia7/include/javascript.js | 23 ++++++++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/web/ia7/house/main.shtml b/web/ia7/house/main.shtml index 24a30014f..beb2b7599 100644 --- a/web/ia7/house/main.shtml +++ b/web/ia7/house/main.shtml @@ -82,7 +82,7 @@

MisterHouse was created by Bruce Winter. Ron Klinkien developed the v2.3 web interface. Kevin Robert Keegan - designed the IA7 web prototype, updates by H.Plato. IA7 v1.5.670 Font Awesome by Dave Gandy - http://fontawesome.io

+ designed the IA7 web prototype, updates by H.Plato. IA7 v1.5.700 Font Awesome by Dave Gandy - http://fontawesome.io

diff --git a/web/ia7/include/javascript.js b/web/ia7/include/javascript.js index fa180351e..a908f5b5e 100644 --- a/web/ia7/include/javascript.js +++ b/web/ia7/include/javascript.js @@ -1,4 +1,4 @@ -// v1.5.670 +// v1.5.700 var entity_store = {}; //global storage of entities var json_store = {}; @@ -175,6 +175,25 @@ function changePage (){ } else { notifications = "enabled"; } + //cookies override default config. +//TODO use_cookies option + if (json_store.ia7_config.prefs.use_cookies == undefined || (json_store.ia7_config.prefs.use_cookies !== undefined && json_store.ia7_config.prefs.use_cookies == "yes")) { + var decodedCookie = decodeURIComponent(document.cookie); + var ca = decodedCookie.split(';'); + for (var i = 0; i