Skip to content

Commit 9cf68c6

Browse files
committed
Merge pull request hcientist#20 from bnmnetp/master
Add ability to pose a question in the middle of a trace
2 parents 6e7a16e + 1827565 commit 9cf68c6

5 files changed

Lines changed: 253 additions & 3 deletions

File tree

‎v3/css/basic.css‎

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/*
2+
* SimpleModal Basic Modal Dialog
3+
* http://www.ericmmartin.com/projects/simplemodal/
4+
* http://code.google.com/p/simplemodal/
5+
*
6+
* Copyright (c) 2010 Eric Martin - http://ericmmartin.com
7+
*
8+
* Licensed under the MIT license:
9+
* http://www.opensource.org/licenses/mit-license.php
10+
*
11+
* Revision: $Id: basic.css 257 2010-07-27 23:06:56Z emartin24 $
12+
*/
13+
14+
.basic-modal-content {display:none;}
15+
16+
/* Overlay */
17+
#simplemodal-overlay {background-color:#000; cursor:wait;}
18+
19+
/* Container */
20+
.simplemodal-container {
21+
height:200px;
22+
width:300px;
23+
color:#bbb;
24+
background-color:#333;
25+
border:4px solid #444;
26+
padding:5px;
27+
}
28+
29+
.simplemodal-container .simplemodal-data {padding:8px;}
30+
31+
.simplemodal-container code {
32+
background:#141414;
33+
border-left:3px solid #65B43D;
34+
color:#bbb;
35+
display:block;
36+
font-size:12px;
37+
margin-bottom:12px;
38+
padding:4px 6px 6px;
39+
}
40+
41+
.simplemodal-container a {color:#ddd;}
42+
43+
.simplemodal-container a.modalCloseImg {
44+
background:url(x.png) no-repeat;
45+
width:25px;
46+
height:29px;
47+
display:inline;
48+
z-index:3200;
49+
position:absolute;
50+
top:-15px;
51+
right:-16px;
52+
cursor:pointer;}
53+
54+
.simplemodal-container h3 {
55+
color:#84b8d9;
56+
text-align: center;
57+
}
58+
59+
.feedbacktext {
60+
color:#84b8d9;
61+
}

‎v3/embedding-demo.html‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
<!-- dependencies for pytutor.js -->
88
<script type="text/javascript" src="js/d3.v2.min.js"></script>
99
<script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
10+
<script type="text/javascript" src="js/jquery.simplemodal.js"></script>
11+
<script type="text/javascript" src="js/basic.js"></script>
1012
<script type="text/javascript" src="js/jquery.ba-bbq.min.js"></script> <!-- for handling back button and URL hashes -->
1113
<script type="text/javascript" src="js/jquery.jsPlumb-1.3.10-all-min.js "></script> <!-- for rendering SVG connectors
1214
DO NOT UPGRADE ABOVE 1.3.10 OR ELSE BREAKAGE WILL OCCUR -->
1315
<script type="text/javascript" src="js/jquery-ui-1.8.24.custom.min.js"></script> <!-- for sliders and other UI elements -->
1416
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.24.custom.css" rel="stylesheet" />
15-
17+
<link type="text/css" href="css/basic.css" rel="stylesheet" />
1618

1719
<!-- Python Tutor frontend code and styles -->
1820
<script type="text/javascript" src="js/pytutor.js"></script>
@@ -44,5 +46,22 @@
4446

4547
<div id="happyDiv"></div>
4648

49+
<p>This one tests your knowledge</p>
50+
<div id="bradsDiv"></div>
51+
52+
<div id="bradsDiv_modal" class="basic-modal-content">
53+
<h3>Check your understanding</h3>
54+
Enter the value of the variable a after the current line is executed.
55+
<input id="basic-textbox" type="textbox" />
56+
<button onclick="traceQCheckMe('basic-textbox','bradsDiv','globals.a')">Check
57+
Me</button>
58+
<button onclick="closeModal('bradsDiv')">Continue...</button>
59+
<p class="feedbacktext"></p>
60+
</div>
61+
<div style='display:none'>
62+
<img src='x.png' alt='' />
63+
</div>
64+
65+
4766
</body>
4867
</html>

0 commit comments

Comments
 (0)