Skip to content

Commit

Permalink
Fix details
Browse files Browse the repository at this point in the history
  • Loading branch information
HashidaTKS committed Sep 20, 2024
1 parent 61b10f5 commit 2a07201
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/web/dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<link rel="stylesheet" href="dialog.css">
</head>
<body>
<div id="myCardContainer" style="margin-left: 20px; margin-right: 20px;">
<div id="my-card-container" style="margin-left: 20px; margin-right: 20px;">
<fluent-card>
<div class="heading-container">
<h3>登録済みドメインのメールアドレス</h3><fluent-button onclick="onCheckAllTrusted()">全てチェック</fluent-button>
Expand Down
15 changes: 3 additions & 12 deletions src/web/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,10 @@ function onCancel() {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
function checkboxChanged(target_element) {
const checkTargetLength = $("fluent-checkbox.check-target").length;
let checkedTargetLength = $("fluent-checkbox.check-target.checked").length;
const checkedTargetLength = $("fluent-checkbox.check-target.checked").length;
// If the target is currently checked, the target is unchecked after this function and vice versa.
const is_currently_checked = $(target_element).hasClass('checked');

if (is_currently_checked)
{
checkedTargetLength -= 1;
}
else
{
checkedTargetLength += 1;
}
const hasUnchecked = checkTargetLength !== checkedTargetLength;
const adjustmentValue = $(target_element).hasClass('checked') ? -1 : 1;
const hasUnchecked = checkTargetLength !== (checkedTargetLength + adjustmentValue);
$("#ok-button").prop("disabled", hasUnchecked);
}

Expand Down

0 comments on commit 2a07201

Please sign in to comment.