Index: lams_central/web/css/progressBar.css =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/css/progressBar.css,v diff -u -r1.1 -r1.2 --- lams_central/web/css/progressBar.css 17 May 2013 09:36:17 -0000 1.1 +++ lams_central/web/css/progressBar.css 20 Aug 2013 12:19:27 -0000 1.2 @@ -35,4 +35,14 @@ div.optionalActivity td:hover { background-color: rgb(246, 238, 191); +} + +div#progressBarDialog { + display: none; +} + +div#progressBarDialog iframe { + width: 100%; + height: 100%; + border: none; } \ No newline at end of file Index: lams_central/web/includes/javascript/progressBar.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/progressBar.js,v diff -u -r1.4 -r1.5 --- lams_central/web/includes/javascript/progressBar.js 6 Jun 2013 11:42:59 -0000 1.4 +++ lams_central/web/includes/javascript/progressBar.js 20 Aug 2013 12:19:27 -0000 1.5 @@ -1,8 +1,10 @@ // ------- GLOBAL VARIABLES ---------- // IMPORTANT: set following variables on the page which imports this JS file -// var isHorizontalBar = false; -// var hasContentFrame = true; -// above settings are default for Learner page +var isHorizontalBar = isHorizontalBar || false; +var hasContentFrame = hasContentFrame || true; +var hasDialog = hasDialog || false; +var presenceEnabled = presenceEnabled || false; +var REVIEW_ACTIVITY_TITLE = REVIEW_ACTIVITY_TITLE || 'Review activity'; // colors used in shapes // dark red @@ -45,7 +47,35 @@ // just a short cut to openPopUp function function openActivity(url) { - openPopUp(url, "LearnerActivity", 600, 800, "yes"); + if (hasDialog) { + var dialog = $('#progressBarDialog'); + if (!dialog.hasClass('ui-dialog')) { + dialog.dialog({ + 'autoOpen' : false, + 'height' : 600, + 'width' : 800, + 'modal' : true, + 'resizable' : false, + 'hide' : 'fold', + 'title' : REVIEW_ACTIVITY_TITLE, + 'open' : function() { + // load contents after opening the dialog + $('iframe', this).load(function(){ + // remove finish button + // so user can only close dialog with X button + $(this).contents().find('#finishButton, #finish').remove(); + }).attr('src', url); + }, + 'beforeClose' : function(){ + $('iframe', this).off('load').attr('src', null); + } + }); + } + + dialog.dialog('open'); + } else { + openPopUp(url, "LearnerActivity", 600, 800, "yes"); + } } // loads a new activity to main content frame; alternative to opening in pop up @@ -391,7 +421,7 @@ var isSupportActivity = activity instanceof SupportActivity; var dblclick = activity.url ? function() { - // open pop up if it is a support or completed activity + // open pop up or dialog if it is a support or completed activity if (isSupportActivity || activity.status == 1 || (!hasContentFrame && activity.status <= 2)) { Index: lams_learning/conf/language/lams/ApplicationResources.properties =================================================================== RCS file: /usr/local/cvsroot/lams_learning/conf/language/lams/ApplicationResources.properties,v diff -u -r1.54 -r1.55 --- lams_learning/conf/language/lams/ApplicationResources.properties 9 Apr 2013 12:46:03 -0000 1.54 +++ lams_learning/conf/language/lams/ApplicationResources.properties 20 Aug 2013 12:19:24 -0000 1.55 @@ -120,6 +120,7 @@ label.learner.progress.activity.attempted.tooltip =You have attempted but not yet finished this activity label.learner.progress.activity.tostart.tooltip =You need to complete the activities before this activity to access it label.learner.progress.activity.support.tooltip =Double click to participate in this support activity +label.learner.progress.review.activity =Review activity button.exit =Exit button.export =Export button.save =Save Index: lams_learning/web/main.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/main.jsp,v diff -u -r1.24 -r1.25 --- lams_learning/web/main.jsp 17 May 2013 09:36:08 -0000 1.24 +++ lams_learning/web/main.jsp 20 Aug 2013 12:19:24 -0000 1.25 @@ -41,7 +41,6 @@ - + + Index: lams_monitoring/web/monitor.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_monitoring/web/monitor.jsp,v diff -u -r1.17 -r1.18 --- lams_monitoring/web/monitor.jsp 1 Aug 2013 13:51:04 -0000 1.17 +++ lams_monitoring/web/monitor.jsp 20 Aug 2013 12:19:28 -0000 1.18 @@ -16,17 +16,18 @@ - + +