UI - Watch Table - Clicking anywhere on the watch list row table also activates the operations buttons and checkbox

pull/1641/head
dgtlmoon 2 years ago
parent 52f2c00308
commit 72a415144b

@ -12,7 +12,7 @@ $(function () {
$("#copied-clipboard").remove();
var range = document.createRange();
var n=$("#share-link")[0];
var n = $("#share-link")[0];
range.selectNode(n);
window.getSelection().removeAllRanges();
window.getSelection().addRange(range);
@ -20,15 +20,26 @@ $(function () {
window.getSelection().removeAllRanges();
$('.with-share-link').append('<span style="font-size: 80%; color: #fff;" id="copied-clipboard">Copied to clipboard</span>');
$("#copied-clipboard").fadeOut(2500, function() {
$("#copied-clipboard").fadeOut(2500, function () {
$(this).remove();
});
});
$(".watch-table tr").click(function (event) {
var tagName = event.target.tagName.toLowerCase();
if (tagName === 'tr' || tagName === 'td') {
var x = $('input[type=checkbox]', this);
if (x) {
$(x).click();
}
}
});
// checkboxes - check all
$("#check-all").click(function (e) {
$('input[type=checkbox]').not(this).prop('checked', this.checked);
});
// checkboxes - show/hide buttons
$("input[type=checkbox]").click(function (e) {
if ($('input[type=checkbox]:checked').length) {

Loading…
Cancel
Save