Added new updates acording to log.

This commit is contained in:
2024-02-13 15:19:22 +01:00
parent 0735ba4f5a
commit 42a3f773a9
7 changed files with 144 additions and 27 deletions

View File

@@ -55,11 +55,11 @@ label {
}
table {
table-layout: fixed;
table-layout: auto;
}
th {
width: 300px;
max-width: 300px;
padding: 10px 0 10px;
background-color: #cccccc;
text-align: center;
@@ -69,7 +69,7 @@ th {
}
td {
width: 300px;
max-width: 300px;
padding: 10px 0 10px;
text-align: center;
border-right: solid 1px #bbbbbb;
@@ -81,7 +81,7 @@ td {
color: #F44336;
position: relative;
min-height: 18px;
font-size: 12px;
font-size: 1.1rem;
}
@media only screen and (min-width: 993px) {
@@ -89,3 +89,24 @@ td {
width: 60%;
}
}
.input-field .helper-text {
font-size: 1.1rem;
}
.input-field > label:not(.label-icon).active {
-webkit-transform: translateY(-14px);
transform: translateY(-14px);
}
.file-field .file-path-wrapper {
height: 75px;
}
#advanced-tree-expand {
color: rgba(0, 0, 0, 0.87);
}
.wider-container {
width: 80%;
}

View File

@@ -1,6 +1,6 @@
// 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'];
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'];
//const URLSearchParams = window.URLSearchParams;
// Function to store values to local storage
function storeValuesToLocalstorage() {
globalInputList.forEach(function(inputName) {
@@ -30,6 +30,9 @@ function readValuesFromLocalstorage() {
// set label to active
$("label[for='" + inputElement.attr('id') + "']").addClass('active');
}
if (inputName === 'frequency_threshold' && text_val === null) {
text_val = '1'
}
inputElement.val(text_val);
} else if (inputType === 'checkbox') {
@@ -50,7 +53,7 @@ function readValuesFromLocalstorage() {
document.addEventListener("DOMContentLoaded", function(event) {
tree_size = readValuesFromLocalstorage()
var valuesForSlider = [2,3,4,5];
var valuesForSlider = [1,2,3,4,5];
var format = {
to: function(value) {
@@ -72,6 +75,40 @@ document.addEventListener("DOMContentLoaded", function(event) {
},
format: format
});
/*
// OLD VERSION
var perfEntries = performance.getEntriesByType("navigation");
for (var i = 0; i < perfEntries.length; i++) {
if (perfEntries[i].type === 'back_forward') {
window.location.href = '?noreload=true'
return;
}
}
var urlParams = new URLSearchParams(window.location.search);
if (!urlParams.has('noreload')) {
if (Object.keys(localStorage).length > 1) {
localStorage.clear();
window.location.href = '?noreload=true'
}
}*/
var perfEntries = performance.getEntriesByType("navigation");
for (var i = 0; i < perfEntries.length; i++) {
if (perfEntries[i].type === 'back_forward') {
window.location.href = '/'
return;
}
}
var urlParams = new URLSearchParams(window.location.search);
if (urlParams.has('reload')) {
// if (Object.keys(localStorage).length > 1) {
localStorage.clear();
window.location.href = '/'
// }
}
});
(function($){
@@ -81,6 +118,10 @@ document.addEventListener("DOMContentLoaded", function(event) {
}); // end of document ready
$(document).ready(function(){
$('.modal').modal();
// var instance = M.Modal.getInstance(elem);
// instance.open();
$('.input-field input[type="checkbox"]').on('change', function() {
var isChecked = $('.input-field input[type="checkbox"]:checked').length > 0;
$('#node-type-error').hide();

View File

@@ -21,7 +21,7 @@ $(document).ready(function() {
$(".table-wrapper tbody tr").click(function() {
var url = $(this).data("href");
if (url) {
window.location.href = url;
window.open(url, '_blank');
}
});
$(".th-desc").hide();