turtle-web-editor/js/app.js

22 lines
650 B
JavaScript
Raw Normal View History

2015-07-14 19:23:35 +02:00
$("#btn_validate").click( function () {
$("#warnings").html("");
$("#errors").html("");
$("#results").html("");
validate($("#ta_turtle").val(), function (feedback) {
$.each(feedback.warnings, function (index, warning) {
$("#warnings").append($('<li id="warning' + index + '">').text(warning));
2015-07-14 19:23:35 +02:00
});
$.each(feedback.errors, function (index, error) {
$("#errors").append($('<li id="error' + index + '">').text(error));
2015-07-14 19:23:35 +02:00
});
if (feedback.errors.length === 0 && feedback.warnings.length === 0) {
$("#results").append("Congrats! Your syntax is correct.");
2015-07-14 19:23:35 +02:00
}
});
});
2017-11-18 14:12:34 +01:00
$(".lined").linedtextarea();