refactor(web): change filters ids
This commit is contained in:
parent
109cc1ac32
commit
d72348e639
@ -31,17 +31,17 @@ $(document).on("dblclick", ".item", function (e) {
|
||||
resp.data.forEach(tanzaku => {
|
||||
$(`#t${tanzaku.id}`).addClass("selected");
|
||||
});
|
||||
if ($("#selected")[0].checked) {
|
||||
if ($("#selection-filter")[0].checked) {
|
||||
$(".list-item:not(.selected)").css("display", "none");
|
||||
} else {
|
||||
$(".list-item:not(.selected)").css("display", "block");
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on("input", "#filter", function (e) {
|
||||
$(document).on("input", "#text-filter", function (e) {
|
||||
let filter = $(this).val().toLowerCase();
|
||||
let unfiltered;
|
||||
if ($("#selected")[0].checked) {
|
||||
if ($("#selection-filter")[0].checked) {
|
||||
unfiltered = $(".list-item.selected");
|
||||
} else {
|
||||
unfiltered = $(".list-item");
|
||||
|
||||
@ -30,7 +30,7 @@ $(document).on("dblclick", ".item", function (e) {
|
||||
resp.data.forEach(sasa => {
|
||||
$(`#s${sasa.id}`).addClass("selected");
|
||||
});
|
||||
if ($("#selected")[0].checked) {
|
||||
if ($("#selection-filter")[0].checked) {
|
||||
$(".list-item:not(.selected)").css("display", "none");
|
||||
} else {
|
||||
$(".list-item:not(.selected)").css("display", "block");
|
||||
|
||||
@ -71,7 +71,7 @@ $(document).on("click", ".list-item", function (e) {
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on("click", "#selected", function (e) {
|
||||
$(document).on("click", "#selection-filter", function (e) {
|
||||
if (this.checked) {
|
||||
$(".list-item:not(.selected)").css("display", "none");
|
||||
} else {
|
||||
|
||||
@ -45,14 +45,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-form-label" for="filter">Tag filter</label>
|
||||
<label class="col-sm-3 col-form-label" for="text-filter">Tag filter</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" name="filter" class="form-control" id="filter">
|
||||
<input type="text" name="text-filter" class="form-control" id="text-filter">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-check">
|
||||
<input type="checkbox" name="related" class="form-check-input" id="selected" checked>
|
||||
<label class="form-check-label" for="selected">Show only selected</label>
|
||||
<input type="checkbox" name="selection-filter" class="form-check-input" id="selection-filter" checked>
|
||||
<label class="form-check-label" for="selection-filter">Show only selected</label>
|
||||
</div>
|
||||
<div class="form-group list" style="height: calc(100vh - 330px)"></div>
|
||||
<div class="form-group button-flex">
|
||||
|
||||
@ -45,8 +45,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-check">
|
||||
<input type="checkbox" name="related" class="form-check-input" id="selected" checked>
|
||||
<label class="form-check-label" for="selected">Show only selected</label>
|
||||
<input type="checkbox" name="selection-filter" class="form-check-input" id="selection-filter" checked>
|
||||
<label class="form-check-label" for="selection-filter">Show only selected</label>
|
||||
</div>
|
||||
<div class="form-group list" style="height: calc(100vh - 270px)"></div>
|
||||
<div class="form-group button-flex">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user