0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

d

Last updated at Posted at 2025-10-09

.```

<!-- 権限解除ダイアログ -->
<div id="permissionDialog" class="dialog-overlay">
  <div class="dialog-box">
    <p>以下のユーザの権限を解除しますか?</p>
    <table class="checked-users-table">
      <tr><th>氏名</th><td>鈴木 太郎</td></tr>
      <tr><th>所属</th><td>営業部</td></tr>
    </table>
    <div class="dialog-buttons">
      <button id="cancelBtn">キャンセル</button>
      <button id="okBtn">OK</button>
    </div>
  </div>
</div>

<!-- テスト用ボタン -->
<button id="showDialog">ダイアログを開く</button>

.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.dialog-box {
  background: #fff;
  padding: 25px 40px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  min-width: 350px;
}

/* ✅ checked-users-table に変更 */
.checked-users-table {
  margin: 15px auto;
  border-collapse: collapse;
}

.checked-users-table th {
  text-align: left;
  padding: 4px 8px;
  font-weight: normal;
}

.checked-users-table td {
  padding: 4px 8px;
}

.dialog-buttons {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.dialog-buttons button {
  padding: 6px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#okBtn {
  background-color: #007bff;
  color: white;
}

#cancelBtn {
  background-color: #ccc;
}

$(function(){
  // ダイアログを開く
  $("#showDialog").on("click", function() {
    $("#permissionDialog").fadeIn().css("display","flex");
  });

  // OKまたはキャンセルで閉じる
  $("#okBtn, #cancelBtn").on("click", function() {
    $("#permissionDialog").fadeOut();
  });
});
0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?