Index: lams_admin/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_admin/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_admin/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,11 +151,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_central/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_central/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_central/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,10 +151,12 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
Index: lams_gradebook/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_gradebook/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_gradebook/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -206,10 +206,12 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so reload
- location.reload();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
Index: lams_learning/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_learning/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_learning/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -206,11 +206,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so reload
- location.reload();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_monitoring/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_monitoring/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_monitoring/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -206,11 +206,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so reload
- location.reload();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_assessment/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_assessment/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_assessment/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,11 +151,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_bbb/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_bbb/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_bbb/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,11 +151,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_chat/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_chat/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_chat/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -206,11 +206,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so reload
- location.reload();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_chat/web/includes/javascript/learning.js
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_chat/web/includes/javascript/learning.js (.../learning.js) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_chat/web/includes/javascript/learning.js (.../learning.js) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -24,8 +24,10 @@
// init the connection with server using server URL but with different protocol
chatToolWebsocket = new WebSocket(APP_URL.replace('http', 'ws') + 'learningWebsocket?toolSessionID=' + TOOL_SESSION_ID);
- chatToolWebsocket.onclose = function(){
- location.reload();
+ chatToolWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ location.reload();
+ }
};
chatToolWebsocket.onmessage = function(e){
Index: lams_tool_daco/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_daco/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_daco/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -206,11 +206,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so reload
- location.reload();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_forum/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_forum/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_forum/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,11 +151,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_gmap/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_gmap/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_gmap/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,11 +151,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_images/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_images/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_images/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,11 +151,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_imscc/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_imscc/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_imscc/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,11 +151,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_kaltura/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_kaltura/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_kaltura/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,11 +151,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_lamc/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_lamc/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_lamc/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,11 +151,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_laqa/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_laqa/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_laqa/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,11 +151,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_larsrc/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_larsrc/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_larsrc/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,11 +151,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_leader/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_leader/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_leader/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,11 +151,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_leader/web/pages/learning/leaderselection.jsp
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_leader/web/pages/learning/leaderselection.jsp (.../leaderselection.jsp) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_leader/web/pages/learning/leaderselection.jsp (.../leaderselection.jsp) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -30,8 +30,10 @@
var leaderWebsocket = new WebSocket(''.replace('http', 'ws')
+ 'learningWebsocket?toolSessionID=' + ${toolSessionID});
- leaderWebsocket.onclose = function(){
- location.reload();
+ leaderWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ location.reload();
+ }
};
// run when the leader has just been selected
Index: lams_tool_mindmap/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_mindmap/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_mindmap/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,11 +151,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_nb/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_nb/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_nb/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,11 +151,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_notebook/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_notebook/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_notebook/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,11 +151,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_pixlr/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_pixlr/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_pixlr/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,11 +151,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_preview/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_preview/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_preview/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,11 +151,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_sbmt/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_sbmt/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_sbmt/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,11 +151,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_scratchie/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_scratchie/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_scratchie/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,11 +151,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_scratchie/web/pages/learning/questionlist.jsp
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_scratchie/web/pages/learning/questionlist.jsp (.../questionlist.jsp) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_scratchie/web/pages/learning/questionlist.jsp (.../questionlist.jsp) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -30,8 +30,11 @@
//init the connection with server using server URL but with different protocol
var scratchieWebsocket = new WebSocket(''.replace('http', 'ws')
+ 'learningWebsocket?toolSessionID=' + ${toolSessionID});
- scratchieWebsocket.onclose = function() {
- location.reload();
+
+ scratchieWebsocket.onclose = function(e) {
+ if (e.code === 1006) {
+ location.reload();
+ }
};
// run when the server pushes new reports and vote statistics
Index: lams_tool_scribe/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_scribe/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_scribe/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,11 +151,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_scribe/web/pages/learning/learning.jsp
===================================================================
diff -u -r4a9600250b509045afb79274953847ffe274fd6e -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_scribe/web/pages/learning/learning.jsp (.../learning.jsp) (revision 4a9600250b509045afb79274953847ffe274fd6e)
+++ lams_tool_scribe/web/pages/learning/learning.jsp (.../learning.jsp) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -16,8 +16,10 @@
agreementPercentageLabel = '',
reportSubmitted = ${scribeSessionDTO.reportSubmitted};
- scribeWebsocket.onclose = function(){
- location.reload();
+ scribeWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ location.reload();
+ }
};
// run when the server pushes new reports and vote statistics
Index: lams_tool_spreadsheet/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_spreadsheet/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_spreadsheet/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,11 +151,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_survey/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_survey/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_survey/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,11 +151,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_task/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_task/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_task/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,11 +151,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_vote/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_vote/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_vote/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,11 +151,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_wiki/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_tool_wiki/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_tool_wiki/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,11 +151,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_www/web/WEB-INF/tags/Page.tag
===================================================================
diff -u -r0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4 -r7d739cafc6626a1145073e5b85f5ed42d0f72dd0
--- lams_www/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0ec58b4b3e8fa566d02a0215fe9d8138da6de8a4)
+++ lams_www/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7d739cafc6626a1145073e5b85f5ed42d0f72dd0)
@@ -151,11 +151,14 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- commandWebsocket.onclose = function(){
- // maybe iPad went into sleep mode?
- // we need this websocket working, so init it again
- initCommandWebsocket();
+ commandWebsocket.onclose = function(e){
+ if (e.code === 1006) {
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ }
};
+
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object