Skip to content
Snippets Groups Projects
Commit 82c106eb authored by Robert Czechowski's avatar Robert Czechowski
Browse files

Add test task

parent 76483f13
Branches
Tags
No related merge requests found
<h1>Actual Task</h1>
<input id="input">
<button id="load">Load Data</button>
<button id="save">Save Data</button>
<script src="../../static/lib/jquery/jquery-3.2.1.min.js"></script>
<script src="../../static/lib/medal/medal-0.0.1a.js"></script>
<script>
$("#load").click(function(){
window.load_task_object(function(data){
if ("text" in data) {
$("#input").val(data["text"]);
}
else {
$("#input").val("default value");
}
});
});
$("#save").click(function(){
window.save_task_object({"text":$("#input").val()}, function(){
document.println("OK");
});
});
</script>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment