Fixing single quote bug

v0.2.0 v0.2.0
alseambusher 8 years ago
parent 42c5d019f0
commit adcaab03fb

@ -1,3 +1,4 @@
/*jshint esversion: 6 */
/*********** MessageBox ****************/
// simply show info. Only close button
function infoMessageBox(message, title){
@ -84,7 +85,6 @@ function editJob(_id){
}
schedule = job.schedule;
job_command = job.command;
console.log(job.logging)
if (job.logging && job.logging != "false")
$("#job-logging").prop("checked", true);
job_string();
@ -95,13 +95,13 @@ function editJob(_id){
// TODO good old boring validations
$.post(routes.save, {name: $("#job-name").val(), command: job_command , schedule: schedule, _id: _id, logging: $("#job-logging").prop("checked")}, function(){
location.reload();
})
});
});
}
function newJob(){
schedule = ""
job_command = ""
schedule = "";
job_command = "";
$("#job-minute").val("*");
$("#job-hour").val("*");
$("#job-day").val("*");
@ -117,7 +117,7 @@ function newJob(){
// TODO good old boring validations
$.post(routes.save, {name: $("#job-name").val(), command: job_command , schedule: schedule, _id: -1, logging: $("#job-logging").prop("checked")}, function(){
location.reload();
})
});
});
}

@ -13,7 +13,7 @@
$(function () {
// initialize tooltips
$('[data-toggle="tooltip"]').tooltip();
crontabs = JSON.parse('<%- crontabs.replace(/\\\\/g, "\\\\\\\\").replace(/\\\"/g,"\\\\\"") %>');
crontabs = JSON.parse('<%- crontabs.replace(/\\\\/g, "\\\\\\\\").replace(/\\\"/g,"\\\\\"").replace(/\'/g,"\\\'") %>');
routes = JSON.parse('<%- routes %>');
$("#env_vars").val(`<%- env %>`);
})
@ -89,7 +89,6 @@
<a class="btn btn-info" onclick="startJob('<%= crontab._id %>')"><span class="glyphicon glyphicon-play" aria-hidden="true"></span> Start</a>
<% } %>
<a class="btn btn-danger" onclick="deleteJob('<%= crontab._id %>')"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></a>
</td>
</tr>
<% }); %>

@ -11,7 +11,7 @@
$(function () {
// initialize tooltips
$('[data-toggle="tooltip"]').tooltip();
crontabs = JSON.parse('<%- crontabs.replace(/\\\"/g,"\\\\\"") %>');
crontabs = JSON.parse('<%- crontabs.replace(/\\\\/g, "\\\\\\\\").replace(/\\\"/g,"\\\\\"").replace(/\'/g,"\\\'") %>');
routes = JSON.parse('<%- routes %>');
})
</script>

Loading…
Cancel
Save