Fixed translations + Resizing line overlap + Disabled No type + Reorganized settings + Other fixes
This commit is contained in:
@@ -33,13 +33,24 @@ function readValuesFromLocalstorage() {
|
||||
if (inputName === 'frequency_threshold' && text_val === null) {
|
||||
text_val = '1'
|
||||
}
|
||||
if (inputName === 'display_size' && text_val === null) {
|
||||
text_val = '1-10'
|
||||
}
|
||||
inputElement.val(text_val);
|
||||
|
||||
} else if (inputType === 'checkbox') {
|
||||
console.log('aaa')
|
||||
var check_value = localStorage.getItem(inputName);
|
||||
if (check_value !== null) {
|
||||
inputElement.prop('checked', check_value === 'true');
|
||||
}
|
||||
if (inputName === 'node_type_none' && check_value === null) {
|
||||
$('input.association_measures').prop('disabled', true);
|
||||
$('input.association_measures').prop('checked', false);
|
||||
} else if(inputName === 'node_type_none' && check_value == 'true') {
|
||||
$('input.association_measures').prop('disabled', true);
|
||||
$('input.association_measures').prop('checked', false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,6 +96,23 @@ document.addEventListener("DOMContentLoaded", function(event) {
|
||||
}
|
||||
});
|
||||
|
||||
function adjustLabelPosition() {
|
||||
$('.dynamic-height').each(function() {
|
||||
var $label = $(this).find('label');
|
||||
var $input = $(this).find('input');
|
||||
|
||||
// Get the original top and left positions
|
||||
var originalTop = parseFloat($label.css('top'));
|
||||
var labelHeight = parseFloat($label.css('height'));
|
||||
var labelLineHeight = parseFloat($label.css('line-height'));
|
||||
var heightDelta = (Math.floor(labelHeight / labelLineHeight) - 1) * labelLineHeight;
|
||||
|
||||
$label.css({
|
||||
top: -heightDelta
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
(function($){
|
||||
$(function(){
|
||||
|
||||
@@ -143,19 +171,29 @@ document.addEventListener("DOMContentLoaded", function(event) {
|
||||
$('input.node_type').on('change', function(e) {
|
||||
if (this.name == 'node_type_none') {
|
||||
$('input.node_type').not(this).prop('checked', false);
|
||||
$('input.association_measures').prop('disabled', true);
|
||||
$('input.association_measures').prop('checked', false);
|
||||
} else {
|
||||
$('input.node_type_none').prop('checked', false);
|
||||
$('input.association_measures').prop('disabled', false);
|
||||
}
|
||||
});
|
||||
$('a.example-input-link').click(function(e) {
|
||||
$('#input_url').val(this.href)
|
||||
$('label[for="input_url"]').addClass('active')
|
||||
e.preventDefault();
|
||||
});
|
||||
$('a.example-compare-link').click(function(e) {
|
||||
$('#compare_url').val(this.href)
|
||||
$('label[for="compare_url"]').addClass('active')
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
// Initial adjustment
|
||||
adjustLabelPosition();
|
||||
|
||||
// Adjust on window resize
|
||||
$(window).resize(adjustLabelPosition);
|
||||
|
||||
|
||||
})(jQuery);
|
||||
|
||||
Reference in New Issue
Block a user