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 => {
|
resp.data.forEach(tanzaku => {
|
||||||
$(`#t${tanzaku.id}`).addClass("selected");
|
$(`#t${tanzaku.id}`).addClass("selected");
|
||||||
});
|
});
|
||||||
if ($("#selected")[0].checked) {
|
if ($("#selection-filter")[0].checked) {
|
||||||
$(".list-item:not(.selected)").css("display", "none");
|
$(".list-item:not(.selected)").css("display", "none");
|
||||||
} else {
|
} else {
|
||||||
$(".list-item:not(.selected)").css("display", "block");
|
$(".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 filter = $(this).val().toLowerCase();
|
||||||
let unfiltered;
|
let unfiltered;
|
||||||
if ($("#selected")[0].checked) {
|
if ($("#selection-filter")[0].checked) {
|
||||||
unfiltered = $(".list-item.selected");
|
unfiltered = $(".list-item.selected");
|
||||||
} else {
|
} else {
|
||||||
unfiltered = $(".list-item");
|
unfiltered = $(".list-item");
|
||||||
|
|||||||
@ -30,7 +30,7 @@ $(document).on("dblclick", ".item", function (e) {
|
|||||||
resp.data.forEach(sasa => {
|
resp.data.forEach(sasa => {
|
||||||
$(`#s${sasa.id}`).addClass("selected");
|
$(`#s${sasa.id}`).addClass("selected");
|
||||||
});
|
});
|
||||||
if ($("#selected")[0].checked) {
|
if ($("#selection-filter")[0].checked) {
|
||||||
$(".list-item:not(.selected)").css("display", "none");
|
$(".list-item:not(.selected)").css("display", "none");
|
||||||
} else {
|
} else {
|
||||||
$(".list-item:not(.selected)").css("display", "block");
|
$(".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) {
|
if (this.checked) {
|
||||||
$(".list-item:not(.selected)").css("display", "none");
|
$(".list-item:not(.selected)").css("display", "none");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -45,14 +45,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<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">
|
<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>
|
</div>
|
||||||
<div class="form-group form-check">
|
<div class="form-group form-check">
|
||||||
<input type="checkbox" name="related" class="form-check-input" id="selected" checked>
|
<input type="checkbox" name="selection-filter" class="form-check-input" id="selection-filter" checked>
|
||||||
<label class="form-check-label" for="selected">Show only selected</label>
|
<label class="form-check-label" for="selection-filter">Show only selected</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group list" style="height: calc(100vh - 330px)"></div>
|
<div class="form-group list" style="height: calc(100vh - 330px)"></div>
|
||||||
<div class="form-group button-flex">
|
<div class="form-group button-flex">
|
||||||
|
|||||||
@ -45,8 +45,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-check">
|
<div class="form-group form-check">
|
||||||
<input type="checkbox" name="related" class="form-check-input" id="selected" checked>
|
<input type="checkbox" name="selection-filter" class="form-check-input" id="selection-filter" checked>
|
||||||
<label class="form-check-label" for="selected">Show only selected</label>
|
<label class="form-check-label" for="selection-filter">Show only selected</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group list" style="height: calc(100vh - 270px)"></div>
|
<div class="form-group list" style="height: calc(100vh - 270px)"></div>
|
||||||
<div class="form-group button-flex">
|
<div class="form-group button-flex">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user