Saddle/static/saddle.js

23 lines
674 B
JavaScript
Raw Normal View History

2019-11-01 12:25:59 -04:00
function switchFileTab(span, window_id) {
let old_span = document.querySelector('.tabSelected');
old_span.classList.remove('tabSelected');
span.classList.add('tabSelected');
let old_window = document.querySelector('.tabWindowSelected');
old_window.classList.remove('tabWindowSelected');
for (let input of old_window.querySelectorAll('input')) {
input.value = '';
}
2019-11-01 12:25:59 -04:00
let tab_window = document.querySelector('#' + window_id);
tab_window.classList.add('tabWindowSelected');
}
2020-01-02 08:31:27 -05:00
function disable_text_filename(checkbox) {
let input = document.querySelector('#text_filename');
if (checkbox.checked) {
input.disabled = true;
} else {
input.disabled = false;
}
}