Index: lams_monitoring/web/tblmonitor/tblmonitor.jsp =================================================================== diff -u -r323598b50c9896906844e615be698a45d1b675ab -re9b2b083ad3802e79ed5fbf51ae98967575c198d --- lams_monitoring/web/tblmonitor/tblmonitor.jsp (.../tblmonitor.jsp) (revision 323598b50c9896906844e615be698a45d1b675ab) +++ lams_monitoring/web/tblmonitor/tblmonitor.jsp (.../tblmonitor.jsp) (revision e9b2b083ad3802e79ed5fbf51ae98967575c198d) @@ -17,7 +17,9 @@ LAMS_URL = '', TAB_REFRESH_INTERVAL = 20 * 1000, // refresh tab every 20 seconds lastTabMethod = null, // these variables are needed for tab refresh - lastTabToolContentID = null; + lastTabToolContentID = null, + tlbMonitorHorizontalScrollElement = null; // keeps ID of element which can be scrolled right, + // so we can re-scroll it after refresh $(document).ready(function(){ @@ -81,6 +83,10 @@ var url = "monitoring/tblmonitor/" var options = {}; + // check if tab declared an element scrollable + // if so, store where it was scrolled to + var horizontalScroll = tlbMonitorHorizontalScrollElement == null ? null : $(tlbMonitorHorizontalScrollElement).scrollLeft(); + tlbMonitorHorizontalScrollElement = null; if (method == "tra" || method == "traStudentChoices" || method == "burningQuestions") { toolContentID = "${traToolContentId}"; @@ -123,7 +129,14 @@ $("#tblmonitor-tab-content").load( url, - options + options, + function(){ + if (horizontalScroll == null || horizontalScroll == 0 || tlbMonitorHorizontalScrollElement == null) { + return; + } + // re-scroll to the same position horizontally + $(tlbMonitorHorizontalScrollElement).scrollLeft(horizontalScroll); + } ); } Index: lams_tool_scratchie/web/pages/monitoring/studentChoices.jsp =================================================================== diff -u -rc3ff357cf943928c8d27a674cf4271e5f338a445 -re9b2b083ad3802e79ed5fbf51ae98967575c198d --- lams_tool_scratchie/web/pages/monitoring/studentChoices.jsp (.../studentChoices.jsp) (revision c3ff357cf943928c8d27a674cf4271e5f338a445) +++ lams_tool_scratchie/web/pages/monitoring/studentChoices.jsp (.../studentChoices.jsp) (revision e9b2b083ad3802e79ed5fbf51ae98967575c198d) @@ -56,6 +56,9 @@