Updated to new STARK version + some small updates
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// Global array to store input names
|
||||
var globalInputList = ['tree_size_min', 'tree_size_max', 'file', 'association_measures', 'labeled_trees', 'node_type_upos', 'fixed_order', 'input_url', 'node_type_lemma', 'root_restriction', 'node_type_form', 'frequency_threshold', 'query', 'compare_url', 'compare_file'];
|
||||
var globalInputList = ['display_size', 'file', 'association_measures', 'labeled_trees', 'node_type_upos', 'fixed_order', 'input_url', 'node_type_lemma', 'root_restriction', 'node_type_form', 'frequency_threshold', 'node_type_none', 'query', 'compare_url', 'compare_file', 'ignored_labels'];
|
||||
|
||||
// Function to store values to local storage
|
||||
function storeValuesToLocalstorage() {
|
||||
@@ -63,19 +63,6 @@ document.addEventListener("DOMContentLoaded", function(event) {
|
||||
return valuesForSlider.indexOf(Number(value));
|
||||
}
|
||||
};
|
||||
var slider = document.getElementById('slider');
|
||||
noUiSlider.create(slider, {
|
||||
start: [tree_size[0], tree_size[1]],
|
||||
connect: true,
|
||||
tooltips: true,
|
||||
step: 1,
|
||||
range: {
|
||||
'min': 0,
|
||||
'max': valuesForSlider.length - 1
|
||||
},
|
||||
format: format
|
||||
});
|
||||
|
||||
var urlParams = new URLSearchParams(window.location.search);
|
||||
var lang='en'
|
||||
if (urlParams.has('lang')) {
|
||||
@@ -146,38 +133,30 @@ document.addEventListener("DOMContentLoaded", function(event) {
|
||||
});
|
||||
|
||||
$("#submit-form").submit( function(eventObj) {
|
||||
var spans = $(".noUi-tooltip").find('span');
|
||||
var tree_size_min = spans[0].innerText;
|
||||
var tree_size_max = spans[1].innerText;
|
||||
console.log('amm');
|
||||
$("<input />").attr("type", "hidden")
|
||||
.attr("name", "tree_size_min")
|
||||
.attr("value", tree_size_min)
|
||||
.appendTo("#submit-form");
|
||||
$("<input />").attr("type", "hidden")
|
||||
.attr("name", "tree_size_max")
|
||||
.attr("value", tree_size_max)
|
||||
.appendTo("#submit-form");
|
||||
|
||||
storeValuesToLocalstorage();
|
||||
return true;
|
||||
});
|
||||
$("#switch-language").click(function(e) {
|
||||
var spans = $(".noUi-tooltip").find('span');
|
||||
var tree_size_min = spans[0].innerText;
|
||||
var tree_size_max = spans[1].innerText;
|
||||
console.log('amm');
|
||||
$("<input />").attr("type", "hidden")
|
||||
.attr("name", "tree_size_min")
|
||||
.attr("value", tree_size_min)
|
||||
.appendTo("#submit-form");
|
||||
$("<input />").attr("type", "hidden")
|
||||
.attr("name", "tree_size_max")
|
||||
.attr("value", tree_size_max)
|
||||
.appendTo("#submit-form");
|
||||
|
||||
storeValuesToLocalstorage();
|
||||
return true;
|
||||
});
|
||||
$('input.node_type').on('change', function(e) {
|
||||
if (this.name == 'node_type_none') {
|
||||
$('input.node_type').not(this).prop('checked', false);
|
||||
} else {
|
||||
$('input.node_type_none').prop('checked', false);
|
||||
}
|
||||
});
|
||||
$('a.example-input-link').click(function(e) {
|
||||
$('#input_url').val(this.href)
|
||||
e.preventDefault();
|
||||
});
|
||||
$('a.example-compare-link').click(function(e) {
|
||||
$('#compare_url').val(this.href)
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
|
||||
|
||||
})(jQuery);
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
1
static/js/nouislider.min.js
vendored
1
static/js/nouislider.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user