+ $("form").submit(function () { //Prevent form submit globally
+ return false;
+ })
+
+ //Set the status updated
+ $("#state-exp").setStatusUpdater();
+
+ //Set the logic for the start controls
+ $("#start-controls").submit(function () {
+ var start = $("#start-controls input[type='button']");
+ var force = $("#start-controls input[name='start_force']");
+
+ $(this).startExperiment(start, $("#experiment_name").val(),
+ force.is(":checked"), $("#start-result"));
+ force.prop("checked", false);
+ });
+
+ //Set the logic for the stop button
+ $("#experiment-stop").click(function () {
+ $(this).stopExperiment($("#stop-status"));
+ });
+
+ //Set the logic for the pressure controls
+ $("#pressure-controls").submit(function () {
+ var pressure = {
+ set : $("#pressure-set").val(),
+ step : $("#pressure-stepsize").val(),
+ wait : $("#pressure-stepwait").val(),
+ count : $("#pressure-stepcount").val()
+ };
+ $(this).setPressure(pressure, $("#pressure-result"));
+ });