Permalink
Browse files

Explicitly show scrollbars for instructions window (Firefox defaults …

…to no-scrollbar).
  • Loading branch information...
1 parent f44a266 commit d0aca63285ebb44eb44fe49cf1b7f06aae5d8dbc @danieldickison danieldickison committed Sep 6, 2011
Showing with 9 additions and 5 deletions.
  1. +9 −5 src/TestHarness/clientjs/student.js
@@ -4,6 +4,8 @@ var GameControllerClient = require('./client/GameControllerClient').GameControll
var gc = new GameControllerClient('api');
gc.registerEngineConstructor('CLFlashGameEngine', CLFlashGameEngine);
+var instructionsURL;
+
$(document).ready(function ()
{
$('#stage-list li button').button().click(function ()
@@ -12,7 +14,11 @@ $(document).ready(function ()
runStage(stageID);
});
- $('#instructions-link').button();
+ $('#instructions-link').button().click(function ()
+ {
+ window.open(instructionsURL, 'Instructions', 'status=0,location=0,toolbar=0,scrollbars=yes,resizable=yes,width=600,height=500');
+ });
+
$('#instructor-dashboard-link').button();
});
@@ -41,10 +47,8 @@ function runQuestionSet(questionSet)
gc.getGameEngineForQuestionSet(questionSet, function (engine)
{
statusMessage('Running game engine for question set ' + questionSet.id + '...');
- $('#instructions-link').unbind('click').click(function ()
- {
- window.open('instructions/' + questionSet.parent.id, 'Instructions', 'status=0,location=0,toolbar=0,width=600,height=500');
- });
+ instructionsURL = 'instructions/' + questionSet.parent.id;
+
engine.run(questionSet, $('#game-container'), function (xml)
{
statusMessage('Sending game data...');

0 comments on commit d0aca63

Please sign in to comment.