質問編集履歴
2
標題を質問内容と一致させました。
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Javascriptの処理について
|
1
|
+
Javascript(JQuery)の処理について
|
test
CHANGED
File without changes
|
1
全体を見た方が把握できるのではないかとのご指摘を頂いたので、全体のコードも追加いたします。
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,4 +1,264 @@
|
|
1
|
-
|
1
|
+
```html
|
2
|
+
|
3
|
+
<!DOCTYPE html>
|
4
|
+
|
5
|
+
<html lang="ja"
|
6
|
+
|
7
|
+
xmlns:th="http://www.thymeleaf.org"
|
8
|
+
|
9
|
+
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
10
|
+
|
11
|
+
layout:decorate="~{common/layout}"
|
12
|
+
|
13
|
+
xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity">
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
<head>
|
18
|
+
|
19
|
+
<title>アカウント一覧</title>
|
20
|
+
|
21
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
22
|
+
|
23
|
+
</head>
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
<body id="page" class="staft">
|
28
|
+
|
29
|
+
<!-- ヘッダー -->
|
30
|
+
|
31
|
+
<label layout:fragment="headerTitle" class="headerTitle">アカウント一覧</label>
|
32
|
+
|
33
|
+
<!-- パンクズ -->
|
34
|
+
|
35
|
+
<th:block layout:fragment="breadcrumb" >
|
36
|
+
|
37
|
+
<label class="fLeft">アカウント一覧</label>
|
38
|
+
|
39
|
+
</th:block>
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
<!-- 本文 -->
|
44
|
+
|
45
|
+
<div layout:fragment="contents">
|
46
|
+
|
47
|
+
<script type="text/javascript">
|
48
|
+
|
49
|
+
// アカウント登録画面遷移用
|
50
|
+
|
51
|
+
function seqNo(obj){
|
52
|
+
|
53
|
+
// SEQ No
|
54
|
+
|
55
|
+
var seqNo = $(obj).parent().parent().find('input:hidden[name="id.seqNo"]').val();
|
56
|
+
|
57
|
+
$('form.accountRegistForm').children('input:hidden[name="seqNo"]').val(seqNo);
|
58
|
+
|
59
|
+
// submit
|
60
|
+
|
61
|
+
$('form.accountRegistForm').submit();
|
62
|
+
|
63
|
+
return false;
|
64
|
+
|
65
|
+
}
|
66
|
+
|
67
|
+
// ログイン履歴画面遷移用
|
68
|
+
|
69
|
+
function userId(obj){
|
70
|
+
|
71
|
+
// userId
|
72
|
+
|
73
|
+
var userId = $(obj).parent().parent().find('input:hidden[name="id.userId"]').val();
|
74
|
+
|
75
|
+
$('form.accountLoginHistoryListForm').children('input:hidden[name="userId"]').val(userId);
|
76
|
+
|
77
|
+
// submit
|
78
|
+
|
79
|
+
$('form.accountLoginHistoryListForm').submit();
|
80
|
+
|
81
|
+
return false;
|
82
|
+
|
83
|
+
}
|
84
|
+
|
85
|
+
</script>
|
86
|
+
|
87
|
+
<div class='wrapTypeB'>
|
88
|
+
|
89
|
+
<form id='edit_form' name='edit_form' th:action="@{/maintenance/account/list}" th:object="${accountListForm}" method="post">
|
90
|
+
|
91
|
+
<!-- エラーメッセージ -->
|
92
|
+
|
93
|
+
<th:block th:replace="common/erromsg :: errorMessage"></th:block>
|
94
|
+
|
95
|
+
<!-- 検索結果0件メッセージ -->
|
96
|
+
|
97
|
+
<th:block th:replace="common/erromsg :: noResultMessage"></th:block>
|
98
|
+
|
99
|
+
</form>
|
100
|
+
|
101
|
+
<!-- 処理完了メッセージ -->
|
102
|
+
|
103
|
+
<th:block th:replace="common/erromsg :: completeMessage"></th:block>
|
104
|
+
|
105
|
+
</div>
|
106
|
+
|
107
|
+
<div class='clearfix' style="margin-left: 50px; margin-top: 10px;">
|
108
|
+
|
109
|
+
<div class='input'>
|
110
|
+
|
111
|
+
<form id='edit_form' name='edit_form' th:action="@{/maintenance/account/regist}" method="post" th:if="${#authentication.principal.mAccount.authorityKbn.value} == ${T(com.pssj.saie.manager.app.common.consts.AuthorityKbn).SYSTEM_ADMIN.getValue()}">
|
112
|
+
|
113
|
+
<input type="submit" value="新規登録" class="fNone fRight w80 mainBtn" th:classappend="${@authority.isLimit('/maintenance/account/list','create')}">
|
114
|
+
|
115
|
+
</form>
|
116
|
+
|
117
|
+
<form th:action="@{/maintenance/account/list}" th:object="${accountListForm}" method="post">
|
118
|
+
|
119
|
+
<!-- 検索キー -->
|
120
|
+
|
121
|
+
<input type='text' th:field="*{searchKey}" maxlength="255" class='w200' th:errorclass="fieldError">
|
122
|
+
|
123
|
+
<input type="hidden" name="size" th:value="*{pageWrapper.page.size}" />
|
124
|
+
|
125
|
+
<input type="submit" name="search" value="検索" class="fNone fLeft w80 mL12 mainBtn" th:classappend="${@authority.isLimit('/maintenance/account/list','search')}">
|
126
|
+
|
127
|
+
<th:block th:replace="common/erromsg :: formErrorMessage(formName = 'searchKey')"></th:block>
|
128
|
+
|
129
|
+
</form>
|
130
|
+
|
131
|
+
</div>
|
132
|
+
|
133
|
+
<div style="display:flex;width:100%">
|
134
|
+
|
135
|
+
<!-- 検索結果、表示プルダウン -->
|
136
|
+
|
137
|
+
<th:block th:replace="common/pagination :: pageSize('/maintenance/account/list', ${accountListForm})"></th:block>
|
138
|
+
|
139
|
+
<!-- ページング -->
|
140
|
+
|
141
|
+
<th:block th:replace="common/pagination :: paginationbar(${accountListForm})"></th:block>
|
142
|
+
|
143
|
+
</div>
|
144
|
+
|
145
|
+
<div>
|
146
|
+
|
147
|
+
<div>
|
148
|
+
|
149
|
+
<table id='tablearea' class="fLeft tableareaB" th:unless="${accountListForm.pageWrapper.page.getTotalElements() == 0}">
|
150
|
+
|
151
|
+
<thead>
|
152
|
+
|
153
|
+
<tr class='tableheader'>
|
154
|
+
|
155
|
+
<th scope="col" style="width:125px">ユーザーID</th>
|
156
|
+
|
157
|
+
<th scope="col" style="width:125px">ユーザー名</th>
|
158
|
+
|
159
|
+
<th scope="col" style="width: 125px;">所属</th>
|
160
|
+
|
161
|
+
<th scope="col" style="width: 100px;">利用権限</th>
|
162
|
+
|
163
|
+
<th scope="col" style="width: 150px;">画像確認許可</th>
|
164
|
+
|
165
|
+
<th scope="col" style="width: 150px;">最終ログイン日時</th>
|
166
|
+
|
167
|
+
</tr>
|
168
|
+
|
169
|
+
</thead>
|
170
|
+
|
171
|
+
<tbody th:if="${accountListForm.pageWrapper != null}">
|
172
|
+
|
173
|
+
<tr th:each="line, stat : ${accountListForm.pageWrapper.page}">
|
174
|
+
|
175
|
+
<td style="text-align: left">
|
176
|
+
|
177
|
+
<input type="hidden" name="id.seqNo" th:value="${line.id.seqNo}" />
|
178
|
+
|
179
|
+
<a class="linkTitle" href="javascript:void(0);" th:text="${line.id.userId}" onclick="seqNo(this)" th:classappend="${@authority.isLimit('/maintenance/account/list','userId')}"></a>
|
180
|
+
|
181
|
+
</td>
|
182
|
+
|
183
|
+
<td style="text-align: left" th:text="${line.userName}"></td>
|
184
|
+
|
185
|
+
<td style="text-align: left" th:if="${line.userDep != null}" th:text="${line.userDep}"></td>
|
186
|
+
|
187
|
+
<td style="text-align: left" th:if="${line.userDep == null}">-</td>
|
188
|
+
|
189
|
+
<td style="text-align: left" th:text="${line.authorityKbn.text}"></td>
|
190
|
+
|
191
|
+
<td style="text-align: left" th:if="${line.angleauthFlg == null}">許可なし</td>
|
192
|
+
|
193
|
+
<td style="text-align: left" th:if="${line.angleauthFlg != null}">
|
194
|
+
|
195
|
+
<label th:if="${line.angleauthFlg.value} == ${T(com.pssj.saie.manager.app.common.consts.AngleauthFlg).WITHOUT_PERMISSION.getValue()}" th:text="${line.angleauthFlg.text}">
|
196
|
+
|
197
|
+
</label>
|
198
|
+
|
199
|
+
<label th:if="${line.angleauthFlg.value} == ${T(com.pssj.saie.manager.app.common.consts.AngleauthFlg).WITH_PERMISSION.getValue()}" th:text="${line.angleauthFlg.text} + ' (' + ${#temporals.format(line.angleauthFrom, 'yyyy/MM/dd')} + ' ~ ' + ${#temporals.format(line.angleauthTo, 'yyyy/MM/dd')} + ')'">
|
200
|
+
|
201
|
+
</label>
|
202
|
+
|
203
|
+
</td>
|
204
|
+
|
205
|
+
<td>
|
206
|
+
|
207
|
+
<input type="hidden" name="id.userId" th:value="${line.id.userId}" />
|
208
|
+
|
209
|
+
<a class="linkTitle" href="javascript:void(0);" th:if="${line.lastLoginDatetime != null}" th:text="${#temporals.format(line.lastLoginDatetime, 'yyyy/MM/dd HH:mm:ss')}" onclick="userId(this)" th:classappend="${@authority.isLimit('/maintenance/account/loginHistory','search')}">
|
210
|
+
|
211
|
+
</a>
|
212
|
+
|
213
|
+
<label th:if="${line.lastLoginDatetime == null}" th:text="ログイン履歴なし">
|
214
|
+
|
215
|
+
</label>
|
216
|
+
|
217
|
+
</td>
|
218
|
+
|
219
|
+
</tr>
|
220
|
+
|
221
|
+
</tbody>
|
222
|
+
|
223
|
+
</table>
|
224
|
+
|
225
|
+
</div>
|
226
|
+
|
227
|
+
</div>
|
228
|
+
|
229
|
+
<!-- ページング -->
|
230
|
+
|
231
|
+
<th:block th:replace="common/pagination :: paginationbar(${accountListForm})"></th:block>
|
232
|
+
|
233
|
+
<th:block th:replace="common/pagination :: form('/maintenance/account/list', ${accountListForm})"></th:block>
|
234
|
+
|
235
|
+
<!-- 新規登録画面遷移用のForm -->
|
236
|
+
|
237
|
+
<form th:action="@{/maintenance/account/regist}" th:object="${accountRegistForm}" name="accountLRegistForm" method="post" class="accountRegistForm">
|
238
|
+
|
239
|
+
<!-- SEQNo -->
|
240
|
+
|
241
|
+
<input type="hidden" name="seqNo" />
|
242
|
+
|
243
|
+
</form>
|
244
|
+
|
245
|
+
<!-- ログイン履歴画面遷移用のForm -->
|
246
|
+
|
247
|
+
<form th:action="@{/maintenance/account/loginHistory}" th:object="${accountLoginHistoryListForm}" name="accountLoginHistoryListForm" method="post" class="accountLoginHistoryListForm">
|
248
|
+
|
249
|
+
<input type="hidden" name="userId" />
|
250
|
+
|
251
|
+
</form>
|
252
|
+
|
253
|
+
</div>
|
254
|
+
|
255
|
+
</div>
|
256
|
+
|
257
|
+
</body>
|
258
|
+
|
259
|
+
</html>
|
260
|
+
|
261
|
+
```このコードについて、Javascript内でどのような処理をしているのかという事が理解できません。
|
2
262
|
|
3
263
|
具体的にこのコードはどのような処理をしているのでしょうか?
|
4
264
|
|