Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 14 commits
  • 2 files changed
  • 0 commit comments
  • 3 contributors
Showing with 7 additions and 2 deletions.
  1. +6 −1 resources/public/script/foreclojure.js
  2. +1 −1 src/foreclojure/problems.clj
View
7 resources/public/script/foreclojure.js
@@ -81,7 +81,7 @@ function configureCodeBox(){
var hiddenCodeInput = "<input type=\"hidden\" value=\"blank\" name=\"code\" id=\"code\">";
oldBox.replaceWith("<div id=\"code-div\"> <pre id=\"editor\">" + oldBox.val() + "</pre></div>"+hiddenCodeInput);
- if ($("#run-button").length){
+ if ($("#run-button").length || $("#submission-button").length){
var editor = ace.edit("editor");
editor.setTheme("ace/theme/textmate");
@@ -172,6 +172,11 @@ function configureCodeBox(){
var text = editor.getSession().getValue();
$('#code').val(text);
});
+
+ $("#submission-button").click(function(){
+ var text = editor.getSession().getValue();
+ $('#code').val(text);
+ });
}
}
View
2 src/foreclojure/problems.clj
@@ -359,7 +359,7 @@ Return a map, {:message, :url, :num-tests-passed}."
(text-area {:id "code-box" :spellcheck "false"}
:code (session/flash-get :tests))
[:p
- [:button.large {:id "run-button" :type "submit"} "Submit"]]))
+ [:button.large {:id "submission-button" :type "submit"} "Submit"]]))
(defn create-problem
"create a user submitted problem"

No commit comments for this range

Something went wrong with that request. Please try again.