diff options
author | Jayaram R Pai | 2014-07-31 13:20:29 +0530 |
---|---|---|
committer | Jayaram R Pai | 2014-07-31 13:20:29 +0530 |
commit | 4473cee7e1be996dccb31c12243e543ed8e0ca39 (patch) | |
tree | 1d26380ad4860ccda9b844aa658959127cfae300 /static/website | |
parent | 4fc8de24f4e26719ddb043f4779cdbc9914475bb (diff) | |
download | scilab-on-cloud-4473cee7e1be996dccb31c12243e543ed8e0ca39.tar.gz scilab-on-cloud-4473cee7e1be996dccb31c12243e543ed8e0ca39.tar.bz2 scilab-on-cloud-4473cee7e1be996dccb31c12243e543ed8e0ca39.zip |
added example file models, requirements.txt
Diffstat (limited to 'static/website')
-rw-r--r-- | static/website/js/cloud.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/static/website/js/cloud.js b/static/website/js/cloud.js index 644d7fd..6b56606 100644 --- a/static/website/js/cloud.js +++ b/static/website/js/cloud.js @@ -84,6 +84,20 @@ $(document).ready(function() { }); }); + $(document).on("change", "#examples", function(){ + $.ajax({ + url: "/ajax-code/", + type: "POST", + data: { + example_id: $("#examples").val() + }, + dataType: "html", + success: function(data) { + editor.setValue(data); + } + }); + }); + /* Execute the code */ $("#execute").click(function() { var csrfmiddlewaretoken = $("[name='csrfmiddlewaretoken']").val(); |