summaryrefslogtreecommitdiff
path: root/static/website
diff options
context:
space:
mode:
authorJayaram R Pai2014-07-31 13:20:29 +0530
committerJayaram R Pai2014-07-31 13:20:29 +0530
commit4473cee7e1be996dccb31c12243e543ed8e0ca39 (patch)
tree1d26380ad4860ccda9b844aa658959127cfae300 /static/website
parent4fc8de24f4e26719ddb043f4779cdbc9914475bb (diff)
downloadscilab-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.js14
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();