diff --git a/src/main/resources/static/css/style.css b/src/main/resources/static/css/style.css index ff37803..f34adb0 100644 --- a/src/main/resources/static/css/style.css +++ b/src/main/resources/static/css/style.css @@ -14,25 +14,21 @@ h1 { min-width: 640px; font-size: 15pt; font-weight: bold; - display: flex; /* フレックスボックスを使う */ - justify-content: space-between; /* 左右の要素を端に寄せる */ - align-items: center; /* 上下中央に配置 */ + display: flex; + justify-content: space-between; + align-items: center; } .rightSection { - display: flex; /* フレックスボックスを使う */ - align-items: center; /* 上下中央に配置 */ + display: flex; + align-items: center; } -/* 入力フォーム */ input, button, select { padding: 5px 15px 5px 15px; margin: 3px; - /* border-radius: 5px; /* CSS3草案 */ - /* -webkit-border-radius: 5px; /* Safari,Google Chrome用 */ - /* -moz-border-radius: 5px; /* Firefox用 */ } input.readOnly { @@ -40,7 +36,6 @@ input.readOnly { color: #ffffff; } -/* メッセージボックスデザイン */ .msgBox { font-weight: bold; @@ -64,7 +59,6 @@ input.readOnly { color: #000000; } -/* 個別デザイン */ th.header { width: 150px; @@ -74,7 +68,7 @@ th.header { .loginInfo { font-size: 9pt; color: #008080; - margin-right: 10px; /* ログアウトボタンとの間隔 */ + margin-right: 10px; } .logoutButton { @@ -91,10 +85,9 @@ td.btnArea { } .header-spacing { - margin-top: 20px; /* 上部に20ピクセルのマージン */ + margin-top: 20px; } -/* グリッドラインの追加 */ .table-grid { width: 100%; border-collapse: collapse; @@ -110,17 +103,14 @@ td.btnArea { background-color: #f2f2f2; } -/* ストライプ効果(奇数行と偶数行で色を交互に) */ .table-striped tbody tr:nth-child(odd) { background-color: #f2f2f2; } -/* ホバー効果(マウスオーバー時に行の色を変更) */ .table-hover tbody tr:hover { - background-color: #ccffcc; /* パステルグリーンの背景色 */ + background-color: #ccffcc; } -/* レスポンシブデザイン(小さい画面でスクロール) */ .table-responsive { overflow-x: auto; display: block; @@ -155,17 +145,17 @@ table.menuClass td.description { } input[type="submit"], input[type="reset"], button { - color: #008080; /* ターコイズ色 */ - text-decoration: none; /* 下線をなくす */ - padding: 10px 20px; /* パディングを追加 */ - border: 1px solid #008080; /* 枠線を追加 */ - border-radius: 5px; /* 角を丸くする */ - background-color: transparent; /* 背景色を透明に */ - cursor: pointer; /* カーソルをポインターに */ - transition: 0.3s; /* アニメーション効果 */ + color: #008080; + text-decoration: none; + padding: 10px 20px; + border: 1px solid #008080; + border-radius: 5px; + background-color: transparent; + cursor: pointer; + transition: 0.3s; } input[type="submit"]:hover, input[type="reset"]:hover, button:hover { - background-color: #008080; /* マウスオーバー時の背景色 */ - color: #ffffff; /* マウスオーバー時の文字色 */ + background-color: #008080; + color: #ffffff; } diff --git a/src/main/resources/static/js/common.js b/src/main/resources/static/js/common.js index 640a96a..b800709 100644 --- a/src/main/resources/static/js/common.js +++ b/src/main/resources/static/js/common.js @@ -1,8 +1,6 @@ function convertToKatakana(input) { - // 漢字とローマ字を削除 const valueWithoutKanjiAndRomaji = input.value.replace(/[\u4E00-\u9FFF\u0041-\u009F]/g, ''); - // ひらがなをカタカナに変換 const katakanaValue = valueWithoutKanjiAndRomaji.replace(/[\u3041-\u3096]/g, function (match) { const chr = match.charCodeAt(0) + 0x60; return String.fromCharCode(chr); @@ -16,15 +14,12 @@ function logoutSubmit() { form.setAttribute('method', 'post'); form.setAttribute('action', 'logout'); - // 動的送信用のHidden - // 動的にFormを作成する場合は何かしら送信しないと、正しく動作しない const inputField = document.createElement("input"); inputField.setAttribute("type", "hidden"); inputField.setAttribute("value", "logout"); form.appendChild(inputField); - // フォームをDOMに追加 document.body.appendChild(form); form.submit(); diff --git a/src/main/resources/templates/insertEmployeeConfirm.html b/src/main/resources/templates/insertEmployeeConfirm.html index 55bd6cb..e120162 100644 --- a/src/main/resources/templates/insertEmployeeConfirm.html +++ b/src/main/resources/templates/insertEmployeeConfirm.html @@ -4,9 +4,7 @@ - - 登録内容確認 @@ -138,7 +136,6 @@ form.setAttribute('method', 'post'); form.setAttribute('action', 'insertEmployeeInput'); - // 確認画面から編集画面に戻ってきたときのフラグ(未使用) const inputField = document.createElement("input"); inputField.setAttribute("type", "hidden"); inputField.setAttribute("name", "backFlg"); @@ -146,7 +143,6 @@ form.appendChild(inputField); - // フォームをDOMに追加 document.body.appendChild(form); form.submit(); diff --git a/src/main/resources/templates/insertEmployeeResult.html b/src/main/resources/templates/insertEmployeeResult.html index f299b4c..727ea38 100644 --- a/src/main/resources/templates/insertEmployeeResult.html +++ b/src/main/resources/templates/insertEmployeeResult.html @@ -4,9 +4,7 @@ - - 社員登録完了 @@ -23,15 +21,12 @@ form.setAttribute('method', 'post'); form.setAttribute('action', 'insertEmployeeInput'); - // 動的送信用のHidden - // 動的にFormを作成する場合は何かしら送信しないと、正しく動作しない const inputField = document.createElement("input"); inputField.setAttribute("type", "hidden"); inputField.setAttribute("value", "select"); form.appendChild(inputField); - // フォームをDOMに追加 document.body.appendChild(form); form.submit(); diff --git a/src/main/resources/templates/updateEmployeeInput.html b/src/main/resources/templates/updateEmployeeInput.html index 83d43a5..9f0c81e 100644 --- a/src/main/resources/templates/updateEmployeeInput.html +++ b/src/main/resources/templates/updateEmployeeInput.html @@ -4,9 +4,7 @@ - - 社員情報更新 @@ -93,7 +91,6 @@ - @@ -163,15 +160,12 @@ form.setAttribute('method', 'post'); form.setAttribute('action', 'selectAll'); - // 動的送信用のHidden - // 動的にFormを作成する場合は何かしら送信しないと、正しく動作しない const inputField = document.createElement("input"); inputField.setAttribute("type", "hidden"); inputField.setAttribute("value", "selectAll"); form.appendChild(inputField); - // フォームをDOMに追加 document.body.appendChild(form); form.submit(); diff --git a/src/main/resources/templates/updatePersonalEmployeeResult.html b/src/main/resources/templates/updatePersonalEmployeeResult.html index 9bee911..aecb823 100644 --- a/src/main/resources/templates/updatePersonalEmployeeResult.html +++ b/src/main/resources/templates/updatePersonalEmployeeResult.html @@ -4,9 +4,7 @@ - - 更新完了 @@ -24,15 +22,12 @@ form.setAttribute('method', 'post'); form.setAttribute('action', 'updatePersonalEmployeeResult'); - // 動的送信用のHidden - // 動的にFormを作成する場合は何かしら送信しないと、正しく動作しない const inputField = document.createElement("input"); inputField.setAttribute("type", "hidden"); inputField.setAttribute("value", "updatePersonalEmployeeResult"); form.appendChild(inputField); - // フォームをDOMに追加 document.body.appendChild(form); form.submit();