Globalize session object
Change-Id: I0e14c0bb87decd20fed134d45d22bfffb92735d0
diff --git a/dev/js/src/init.js b/dev/js/src/init.js
index 370e14d..b4621d0 100644
--- a/dev/js/src/init.js
+++ b/dev/js/src/init.js
@@ -45,6 +45,8 @@
const d = document;
+ KorAP.session = sessionClass.create('KalamarJS');
+
// Override KorAP.log
window.alertify = alertifyClass;
KorAP.log = function (code, msg) {
@@ -61,10 +63,8 @@
domReady(function (event) {
var obj = {};
- var session = sessionClass.create('KalamarJS');
-
// What should be visible?
- var show = session.get('show') || {};
+ var show = KorAP.session.get('show') || {};
/**
* Release notifications
@@ -345,7 +345,7 @@
if (d.getElementById('view-tutorial')) {
window.tutorial = tutClass.create(
d.getElementById('view-tutorial'),
- session
+ KorAP.session
);
obj.tutorial = window.tutorial;
}
@@ -381,7 +381,7 @@
};
// Store session information
- session.set("show", show);
+ KorAP.session.set("show", show);
// Set Virtual collection
if (vc === undefined) {