<title><%= APPTITLE %></title>
<link rel="stylesheet" href="./erbtemp/stylesheet.css" type="text/css">
<script type="text/javascript">
+ /**
+ * ページのロード時に呼ばれるメソッド
+ */
+ function loadexec(){
+ changeOpacity("initButton", 50);
+ }
+
+ /**
+ * 対象のエレメントの半透明度を変更するメソッド
+ * @param {string} id 対象エレメントのID
+ * @param {int} alpha 半透明度(0~100で指定)
+ */
+ function changeOpacity(id, alpha){
+ if (alpha < 0 || alpha > 100) {
+ return false;
+ }
+
+ var targetElement = document.getElementById(id);
+ targetElement.style.filter = "alpha(opacity=" + alpha + ")";
+ targetElement.style.mozOpacity = alpha / 100;
+ targetElement.style.opacity = alpha / 100;
+ return true;
+ }
+
function beforeexec(form, action){
// 「OK」時の処理開始 + 確認ダイアログの表示
if (window.confirm('本当に処理を実行しますか?')) {
document.getElementsByName("action").item(0).value = action;
form.submit();
-
+ }
+ else {
+ return false;
+ }
+ }
+
+ function unlock(id){
+ // ロックされた初期化ボタンを解除する
+ if (document.getElementById(id).disabled) {
+ alert('初期化ボタンをアンロックします。');
+ var resetButton = document.getElementById(id);
+ resetButton.disabled = false;
+ changeOpacity(id, 100);
}
else {
return false;
}
</script>
</head>
- <body>
+ <body onload="loadexec()">
<br>
<%= menu %>
<br>
</tr>
<tr>
<td class="forminput" style="text-align: center;">
- <input type="hidden" name="mode" value="reset"><input type="hidden" name="action" value=""><input type="button" value="初期化を行う" onclick="beforeexec(this.form, 'exec')">
+ <input type="button" value="ロック解除" onclick="unlock('initButton')"> <input type="hidden" name="mode" value="reset"><input type="hidden" name="action" value=""><input type="button" value="初期化を行う" onclick="beforeexec(this.form, 'exec')" disabled="true" id="initButton">
</td>
</tr>
</tbody>