Index: lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/web/GateController.java =================================================================== diff -u -r21012de4a17935353bd0a69d6c5752bc01a6dabb -rbeaa199615fcde4a870870eb2ae9088455d0dc8e --- lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/web/GateController.java (.../GateController.java) (revision 21012de4a17935353bd0a69d6c5752bc01a6dabb) +++ lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/web/GateController.java (.../GateController.java) (revision beaa199615fcde4a870870eb2ae9088455d0dc8e) @@ -58,6 +58,7 @@ import org.lamsfoundation.lams.web.util.AttributeNames; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @@ -132,18 +133,19 @@ * Open the gate if is closed. */ @RequestMapping(path = "/openGate", method = RequestMethod.POST) - public String openGate(@ModelAttribute GateForm gateForm, HttpServletRequest request, - HttpServletResponse response) { + public String openGate(@ModelAttribute GateForm gateForm, HttpServletRequest request, Model model) { GateActivity gate = monitoringService.openGate(gateForm.getActivityId(), getUserId()); + model.addAttribute("gateJustToggled", true); return findViewByGateType(gateForm, gate); } /** * Close the gate again. */ @RequestMapping(path = "/closeGate", method = RequestMethod.POST) - public String closeGate(@ModelAttribute GateForm gateForm) { + public String closeGate(@ModelAttribute GateForm gateForm, Model model) { GateActivity gate = monitoringService.closeGate(gateForm.getActivityId()); + model.addAttribute("gateJustToggled", true); return findViewByGateType(gateForm, gate); } Index: lams_monitoring/web/gate/gateStatus.jsp =================================================================== diff -u -ra5e8fedb7137d8df6c2d91a63876469ac31867e6 -rbeaa199615fcde4a870870eb2ae9088455d0dc8e --- lams_monitoring/web/gate/gateStatus.jsp (.../gateStatus.jsp) (revision a5e8fedb7137d8df6c2d91a63876469ac31867e6) +++ lams_monitoring/web/gate/gateStatus.jsp (.../gateStatus.jsp) (revision beaa199615fcde4a870870eb2ae9088455d0dc8e) @@ -14,6 +14,13 @@ window.opener.location.reload(); } + + + if (window.opener && typeof window.opener.updateSequenceTab === 'function') { + window.opener.updateLessonTab(); + window.opener.updateSequenceTab(); + } + }); Index: lams_monitoring/web/includes/javascript/monitorLesson.js =================================================================== diff -u -ra4213ce5366ebd437331ba6ef067d4812ad94d66 -rbeaa199615fcde4a870870eb2ae9088455d0dc8e --- lams_monitoring/web/includes/javascript/monitorLesson.js (.../monitorLesson.js) (revision a4213ce5366ebd437331ba6ef067d4812ad94d66) +++ lams_monitoring/web/includes/javascript/monitorLesson.js (.../monitorLesson.js) (revision beaa199615fcde4a870870eb2ae9088455d0dc8e) @@ -904,6 +904,7 @@ 'data' : data, 'success' : function(){ updateLessonTab(); + updateSequenceTab(); } }); }