feat(web): introduce tag removing
This commit is contained in:
parent
b4b76fe271
commit
4b7766695e
@ -82,6 +82,21 @@ $(document).on("submit", "#menu-view form", function (e) {
|
|||||||
$(".list-item").removeClass("selected").css("display", "block");
|
$(".list-item").removeClass("selected").css("display", "block");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).on("click", "#btn-remove", function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
if (!confirm("This tag will be removed permanently. Are you sure?")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let resp = tdb_query("$TFM", 33, '' + current_tanzaku.id);
|
||||||
|
if (!resp.status) {
|
||||||
|
alert("Something went wrong!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$(".menu-wrapper").css("display", "none");
|
||||||
|
$("#menu-view").css("display", "none");
|
||||||
|
location.reload(true);
|
||||||
|
});
|
||||||
|
|
||||||
$(document).on("submit", "#menu-add form", function (e) {
|
$(document).on("submit", "#menu-add form", function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
let resp = tdb_query("$TFM", 34, $("#new-name").val() + '\n' + $("#new-description").val());
|
let resp = tdb_query("$TFM", 34, $("#new-name").val() + '\n' + $("#new-description").val());
|
||||||
|
|||||||
@ -60,6 +60,7 @@
|
|||||||
<div class="form-group list"></div>
|
<div class="form-group list"></div>
|
||||||
<div class="form-group button-flex">
|
<div class="form-group button-flex">
|
||||||
<button type="submit" class="btn btn-primary" id="btn-confirm">Confirm</button>
|
<button type="submit" class="btn btn-primary" id="btn-confirm">Confirm</button>
|
||||||
|
<button class="btn btn-danger" id="btn-remove">Remove</button>
|
||||||
<button class="btn btn-outline-danger" id="btn-close">Close</button>
|
<button class="btn btn-outline-danger" id="btn-close">Close</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user