Skip to content

Commit

Permalink
Fixed bug where toggling the golf league graph was not hiding input b…
Browse files Browse the repository at this point in the history
…ox in "disabled javascript code box" mode
  • Loading branch information
David Davis committed Nov 21, 2011
1 parent 855e98c commit 6d8c0fd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 7 additions & 0 deletions resources/public/script/codebox.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ var CodeBox = {
return this.editorSession.getValue();
},

toggle: function() {
if(this.disableJavascript)
$("#code-box").toggle('fast');
else
$("#code-div").toggle('fast');
},

run: function(e) {
e.preventDefault();

Expand Down
4 changes: 1 addition & 3 deletions resources/public/script/foreclojure.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,7 @@ function configureGolf(){
$('#graph-link').show();
$('#golfgraph').hide();
$('#graph-link').click(function() {
$('#code-div').toggle('fast', function() {
// Animation complete.
});
CodeBox.toggle();
$('#golfgraph').toggle('fast', function() {
// Animation complete.
});
Expand Down

0 comments on commit 6d8c0fd

Please sign in to comment.