Mattthew
commited on
Commit
·
b9051ed
1
Parent(s):
4568396
small bug fix
Browse fileswhen using search, hidden tags appeared as results but couldn't be selected. now a message tells you what to do
index.js
CHANGED
@@ -1408,6 +1408,7 @@ function showInfo() {
|
|
1408 |
function hideInfo() {
|
1409 |
document.getElementById('info_search_input').value = '';
|
1410 |
document.getElementById('information').classList.remove('shown');
|
|
|
1411 |
informationMode = false;
|
1412 |
}
|
1413 |
|
@@ -1449,10 +1450,20 @@ function searchForTagsInfo(event) {
|
|
1449 |
tags.forEach(function(tag) {
|
1450 |
let tagName = tag.querySelector('input').name;
|
1451 |
if(tagName.toLowerCase().indexOf(input.value.toLowerCase()) > -1) {
|
1452 |
-
let result
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1456 |
output.appendChild(result);
|
1457 |
match = tagName;
|
1458 |
matches++;
|
|
|
1408 |
function hideInfo() {
|
1409 |
document.getElementById('info_search_input').value = '';
|
1410 |
document.getElementById('information').classList.remove('shown');
|
1411 |
+
delete document.getElementById('info_search_input').dataset.match;
|
1412 |
informationMode = false;
|
1413 |
}
|
1414 |
|
|
|
1450 |
tags.forEach(function(tag) {
|
1451 |
let tagName = tag.querySelector('input').name;
|
1452 |
if(tagName.toLowerCase().indexOf(input.value.toLowerCase()) > -1) {
|
1453 |
+
let result;
|
1454 |
+
if(tag.classList.contains('hidden')) {
|
1455 |
+
result = document.createElement('label');
|
1456 |
+
if(tag.querySelector('.count').textContent.indexOf('- 0') > -1) {
|
1457 |
+
result.textContent = tagName + ' - is hidden because zero artist match that tag';
|
1458 |
+
} else {
|
1459 |
+
result.textContent = tagName + ' - is hidden because "hide low-use tags" is checked';
|
1460 |
+
}
|
1461 |
+
} else {
|
1462 |
+
result = tag.cloneNode(true);
|
1463 |
+
result.addEventListener('change', function(e) {
|
1464 |
+
toggleMatchingTag(this);
|
1465 |
+
});
|
1466 |
+
}
|
1467 |
output.appendChild(result);
|
1468 |
match = tagName;
|
1469 |
matches++;
|