Created
May 25, 2012 21:46
-
-
Save beneater/2790785 to your computer and use it in GitHub Desktop.
Add an exercise topic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
url: "/api/v1/topicversion/default/maplayout", | |
type: "GET", | |
success: function(maplayout) { | |
maplayout.topics["logical-reasoning"] = {} | |
maplayout.topics["logical-reasoning"].icon_url = "/images/power-mode/badges/default-40x40.png" | |
maplayout.topics["logical-reasoning"].id = "logical-reasoning" | |
maplayout.topics["logical-reasoning"].standalone_title = "Logical reasoning" | |
maplayout.topics["logical-reasoning"].x = -29 | |
maplayout.topics["logical-reasoning"].y = 40 | |
maplayout.polylines.push({ | |
"path": [{ | |
x: -29, | |
y: 40 | |
},{ | |
x: -29, | |
y: 40 | |
}] | |
}); | |
console.log(maplayout); | |
$.ajax({ | |
url: "/api/v1/topicversion/edit/maplayout", | |
type: "PUT", | |
contentType: "application/json", | |
data: JSON.stringify(maplayout), | |
complete: function(a, result) { | |
console.log(result); | |
} | |
}); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment