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

@ -1,34 +1,45 @@
$(function () { $(function () {
// Remove unviewed status when normally clicked // Remove unviewed status when normally clicked
$('.diff-link').click(function () { $('.diff-link').click(function () {
$(this).closest('.unviewed').removeClass('unviewed'); $(this).closest('.unviewed').removeClass('unviewed');
}); });
$("#checkbox-assign-tag").click(function (e) { $("#checkbox-assign-tag").click(function (e) {
$('#op_extradata').val(prompt("Enter a tag name")); $('#op_extradata').val(prompt("Enter a tag name"));
}); });
$('.with-share-link > *').click(function () { $('.with-share-link > *').click(function () {
$("#copied-clipboard").remove(); $("#copied-clipboard").remove();
var range = document.createRange();
var n = $("#share-link")[0];
range.selectNode(n);
window.getSelection().removeAllRanges();
window.getSelection().addRange(range);
document.execCommand("copy");
window.getSelection().removeAllRanges();
var range = document.createRange(); $('.with-share-link').append('<span style="font-size: 80%; color: #fff;" id="copied-clipboard">Copied to clipboard</span>');
var n=$("#share-link")[0]; $("#copied-clipboard").fadeOut(2500, function () {
range.selectNode(n); $(this).remove();
window.getSelection().removeAllRanges(); });
window.getSelection().addRange(range); });
document.execCommand("copy");
window.getSelection().removeAllRanges();
$('.with-share-link').append('<span style="font-size: 80%; color: #fff;" id="copied-clipboard">Copied to clipboard</span>'); $(".watch-table tr").click(function (event) {
$("#copied-clipboard").fadeOut(2500, function() { var tagName = event.target.tagName.toLowerCase();
$(this).remove(); if (tagName === 'tr' || tagName === 'td') {
}); var x = $('input[type=checkbox]', this);
}); if (x) {
$(x).click();
}
}
});
// checkboxes - check all // checkboxes - check all
$("#check-all").click(function (e) { $("#check-all").click(function (e) {
$('input[type=checkbox]').not(this).prop('checked', this.checked); $('input[type=checkbox]').not(this).prop('checked', this.checked);
}); });
// checkboxes - show/hide buttons // checkboxes - show/hide buttons
$("input[type=checkbox]").click(function (e) { $("input[type=checkbox]").click(function (e) {
if ($('input[type=checkbox]:checked').length) { if ($('input[type=checkbox]:checked').length) {

Loading…
Cancel
Save