Update scripts
This commit is contained in:
parent
050b0cd8f7
commit
216ef0d1ec
@ -380,13 +380,20 @@ function openRef(closeSidebar = true) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function closeRef() {
|
function closeRef() {
|
||||||
refQuery = document.querySelector('#refQuery');
|
document.querySelector('#referenceSearch').value = '';
|
||||||
refQuery.style.display = 'none';
|
document.querySelector('#referenceSearch').style.display = '';
|
||||||
|
document.querySelector('#referenceType').value = '';
|
||||||
|
document.querySelector('#referenceBook').value = '';
|
||||||
|
document.querySelector('#referenceBook').style.display = 'none';
|
||||||
|
document.querySelector('#chapter-range').innerText = '';
|
||||||
|
document.querySelector('#verse-range').innerText = '';
|
||||||
|
|
||||||
|
document.querySelector('#refQuery').style.display = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
function queryRef(type = null, book = null, input = null) {
|
function queryRef(type = null, book = null, input = null) {
|
||||||
if (!input) {
|
if (!input) {
|
||||||
var input = document.querySelector('#refQuery #search').value;
|
var input = document.querySelector('#refQuery #referenceSearch').value;
|
||||||
}
|
}
|
||||||
if (!type) {
|
if (!type) {
|
||||||
var type = document.querySelector('#referenceType').value;
|
var type = document.querySelector('#referenceType').value;
|
||||||
@ -419,11 +426,6 @@ function queryRef(type = null, book = null, input = null) {
|
|||||||
|
|
||||||
references[results.title] = results.text;
|
references[results.title] = results.text;
|
||||||
|
|
||||||
input.value = '';
|
|
||||||
document.querySelector('#referenceType').value = '';
|
|
||||||
document.querySelector('#referenceBook').value = '';
|
|
||||||
document.querySelector('#referenceBook').style.display = 'none';
|
|
||||||
document.querySelector('#refQuery #search').value = '';
|
|
||||||
closeRef();
|
closeRef();
|
||||||
|
|
||||||
saved = false;
|
saved = false;
|
||||||
@ -532,6 +534,7 @@ function retrieveBooks() {
|
|||||||
document.querySelector('#chapter-range').innerText = '';
|
document.querySelector('#chapter-range').innerText = '';
|
||||||
document.querySelector('#verse-range').innerText = '';
|
document.querySelector('#verse-range').innerText = '';
|
||||||
document.querySelector('#referenceSearch').value = '';
|
document.querySelector('#referenceSearch').value = '';
|
||||||
|
document.querySelector('#referenceSearch').style.display = 'none';
|
||||||
const selectedType = document.querySelector('#referenceType').value;
|
const selectedType = document.querySelector('#referenceType').value;
|
||||||
if (!selectedType) { return; }
|
if (!selectedType) { return; }
|
||||||
|
|
||||||
@ -539,6 +542,7 @@ function retrieveBooks() {
|
|||||||
bookList.style.display = "block";
|
bookList.style.display = "block";
|
||||||
bookList.innerHTML = '';
|
bookList.innerHTML = '';
|
||||||
if (selectedType == 'bible') {
|
if (selectedType == 'bible') {
|
||||||
|
document.querySelector('#referenceSearch').style.display = 'block';
|
||||||
var none = document.createElement("option");
|
var none = document.createElement("option");
|
||||||
none.value = '';
|
none.value = '';
|
||||||
none.text = '-- Select --';
|
none.text = '-- Select --';
|
||||||
|
Loading…
Reference in New Issue
Block a user