Added cutoff switch to second frontend
diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep
index 2c2030c..71c56b3 100644
--- a/templates/layouts/default.html.ep
+++ b/templates/layouts/default.html.ep
@@ -63,9 +63,11 @@
<div class="select">
%= select_field ql => [[Poliqarp => 'poliqarp'], ['Cosmas II' => 'cosmas2'], ['Annis' => 'annis'], ['CQL v1.2' => 'cql']], id => 'ql-field'
</div>
-%= hidden_field 'cutoff' => 0, id => 'q-cutoff-field'
<div id="button-right">
+% unless (param('q')) { param(cutoff => 1) };
+%= check_box cutoff => 1, id => 'q-cutoff-field'
+<label for="q-cutoff-field"><span></span>Quick</label>
% unless (current_route 'tutorial') {
<button type="button" title="Tutorial" onclick="openTutorial()"><i class="fa fa-graduation-cap"></i></button>
% };
diff --git a/templates/partial/javascript.html.ep b/templates/partial/javascript.html.ep
index 055ddf2..cad5ac7 100644
--- a/templates/partial/javascript.html.ep
+++ b/templates/partial/javascript.html.ep
@@ -77,11 +77,12 @@
var q = o.getAttribute("data-query");
var ql = o.getAttribute("data-query-language");
var qc = o.getAttribute("data-query-cutoff");
- if (qc === null)
- qc = 0;
+ if (qc !== 0 && qc !== "0" && qc !== "off" && qc !== null)
+ $("#q-cutoff-field").prop('checked', true);
+
$("#ql-field").val(ql);
$("#q-field").val(q);
- $("#q-cutoff-field").val(qc);
+
closeTutorial();
};