Skip to content

Commit 7eb22a9

Browse files
author
Philip Guo
committed
made "Edit code" into a button
1 parent cf66612 commit 7eb22a9

4 files changed

Lines changed: 10 additions & 4 deletions

File tree

‎TODO‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,6 @@ just need a named div or anchor in your document, and then you can
141141
scroll to it. This page might help:
142142
http://css-tricks.com/snippets/jquery/smooth-scrolling/
143143

144+
(also auto-scroll the program's stdout output as well as the code
145+
display!)
146+

‎edu-python.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ table#pyCodeOutput .cod {
174174

175175
div#editCodeLinkDiv {
176176
text-align: center;
177-
margin-top: 6px;
177+
margin-top: 10px;
178178
}
179179

180180
#editCodeLinkOnError {

‎edu-python.js‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,10 +1133,9 @@ $(document).ready(function() {
11331133
});
11341134

11351135

1136-
$("#editCodeLink").click(function() {
1136+
$("#editBtn").click(function() {
11371137
$("#pyInputPane").show();
11381138
$("#pyOutputPane").hide();
1139-
return false; // to prevent page reload
11401139
});
11411140

11421141

‎index.html‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,11 @@
121121

122122
</div>
123123

124-
<div id="editCodeLinkDiv"><a id="editCodeLink" href="#">Edit code</a></div>
124+
<div id="editCodeLinkDiv">
125+
126+
<button id="editBtn" class="bigBtn" type="button">Edit code</button>
127+
128+
</div>
125129

126130
<div id="vcrControls">
127131
<button id="jmpFirstInstr", type="button">&lt;&lt; First</button>

0 commit comments

Comments
 (0)