Index: lams_monitoring/web/monitor.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_monitoring/web/monitor.jsp,v
diff -u -r1.27.2.30 -r1.27.2.31
--- lams_monitoring/web/monitor.jsp 1 Nov 2016 12:19:16 -0000 1.27.2.30
+++ lams_monitoring/web/monitor.jsp 2 Nov 2016 13:31:32 -0000 1.27.2.31
@@ -24,10 +24,6 @@
$.mobile.ignoreContentEnabled = true;
$('body').attr('data-enhance', 'false');
});
-
- function doSelectTab(tabId) {
- selectTab(tabId);
- }
@@ -175,6 +171,21 @@
// remove "loading..." screen
$('#loadingOverlay').remove();
});
+
+ function doSelectTab(tabId) {
+ selectTab(tabId);
+ var sequenceInfoDialog = $('#sequenceInfoDialog');
+ if ( tabId == '2' ) {
+ if (sequenceTabShowInfo) {
+ showSequenceInfoDialog();
+ sequenceTabShowInfo = false; // only show it once
+ }
+ } else {
+ closeSequenceInfoDialog();
+ }
+ }
+
+
@@ -670,7 +681,7 @@
-
+
Index: lams_monitoring/web/includes/javascript/monitorLesson.js
===================================================================
RCS file: /usr/local/cvsroot/lams_monitoring/web/includes/javascript/monitorLesson.js,v
diff -u -r1.44.2.42 -r1.44.2.43
--- lams_monitoring/web/includes/javascript/monitorLesson.js 1 Nov 2016 12:19:16 -0000 1.44.2.42
+++ lams_monitoring/web/includes/javascript/monitorLesson.js 2 Nov 2016 13:31:32 -0000 1.44.2.43
@@ -1,4 +1,4 @@
-// ********** GLOBAL VARIABLES **********
+// ********** GLOBAL VARIABLES **********
// copy of lesson SVG so it does no need to be fetched every time
var originalSequenceCanvas = null,
// DIV container for lesson SVG
@@ -563,33 +563,6 @@
}
});
-
-
- // small info box on Sequence tab, activated when the tab is showed
- $('#sequenceInfoDialog').dialog({
- 'autoOpen' : false,
- 'height' : 35,
- 'width' : 290,
- 'modal' : false,
- 'resizable' : false,
- 'show' : 'fold',
- 'hide' : 'fold',
- 'dialogClass': 'dialog-no-title',
- 'position' : {my: "left top",
- at: "left top+10",
- of: '#sequenceTopButtonsContainer'
- },
- 'open' : function(){
- var dialog = $(this);
- // show only once in this Monitor
- dialog.dialog('option', 'showed', true);
- // close after given time
- setTimeout(function(){
- dialog.dialog('close');
- }, sequenceInfoTimeout);
- }
- });
-
$('#forceBackwardsDialog').dialog({
'autoOpen' : false,
'modal' : true,
@@ -649,6 +622,31 @@
+function showSequenceInfoDialog(){
+ // small info box on Sequence tab, activated when the tab is showed
+ var sequenceInfoDialog = showDialog('sequenceInfoDialog', {
+ 'height' : 150,
+ 'width' : 300,
+ 'modal' : false,
+ 'resizable' : false,
+ 'open' : function(){
+ $('.modal-body', sequenceInfoDialog).empty().append($('#sequenceInfoDialogContents').show());
+ // close after given time
+ setTimeout(function(){
+ sequenceInfoDialog.modal('hide')
+ }, sequenceInfoTimeout);
+ }
+ }, false);
+
+}
+
+function closeSequenceInfoDialog(){
+ var sequenceInfoDialog = $('#sequenceInfoDialog');
+ if ( sequenceInfoDialog && sequenceInfoDialog.data() && sequenceInfoDialog.data('bs.modal').isShown ) {
+ sequenceInfoDialog.modal('hide');
+ }
+}
+
/**
* Updates learner progress in sequence tab according to respose sent to refreshMonitor()
*/
@@ -747,7 +745,8 @@
if (sequenceSearchedLearner != null && !response.searchedLearnerFound) {
// the learner has not started the lesson yet, display an info box
sequenceClearSearchPhrase();
- $('#sequenceInfoDialog').text(LABELS.PROGRESS_NOT_STARTED).dialog('open');
+ $('#sequenceInfoDialogContent').text(LABELS.PROGRESS_NOT_STARTED);
+ showSequenceInfoDialog();
}
var learnerTotalCount = learnerCount + response.completedLearnerCount;