Commit 507148a93f097ce6de94d70fccc6085ecc1bfcd5
1 parent
d70c9e8c
1.修复未选择选项时,无法点击批量删除按钮
Showing
6 changed files
with
126 additions
and
10 deletions
WebRoot/WEB-INF/jsp/sunvote/coursemanagement/coursemanagement_list2.jsp
... | ... | @@ -22,6 +22,10 @@ |
22 | 22 | <link href="static/css/teach.css" rel="stylesheet"> |
23 | 23 | <!-- 日期框 --> |
24 | 24 | <link rel="stylesheet" href="static/ace/css/datepicker.css" /> |
25 | +<style type="text/css"> | |
26 | + #remove{ | |
27 | + background:#ccc} | |
28 | +</style> | |
25 | 29 | </head> |
26 | 30 | |
27 | 31 | <body class="no-skin"> |
... | ... | @@ -91,7 +95,7 @@ |
91 | 95 | <input type="button" onclick="add()" value="分配任课" /> |
92 | 96 | </div> |
93 | 97 | <div class="removeAll"> |
94 | - <input type="button" onclick="deleteAll()" value="移除任课" /> | |
98 | + <input type="button" onclick="deleteAll()" disabled id="remove" value="移除任课" /> | |
95 | 99 | </div> |
96 | 100 | <div class="page_box"> |
97 | 101 | |
... | ... | @@ -169,7 +173,22 @@ |
169 | 173 | }}); |
170 | 174 | window.top.remove.show(); |
171 | 175 | } |
172 | - | |
176 | + $("input[type=checkbox]").on('click',function(){ | |
177 | + var str = ''; | |
178 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
179 | + if(document.getElementsByName('ids')[i].checked){ | |
180 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
181 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
182 | + } | |
183 | + } | |
184 | + if(str==''){ | |
185 | + $("#remove").attr("disabled","disabled"); | |
186 | + $("#remove").css("background","#ccc"); | |
187 | + }else{ | |
188 | + $("#remove").removeAttr("disabled"); | |
189 | + $("#remove").css("background","#f29c9f"); | |
190 | + } | |
191 | + }) | |
173 | 192 | </script> |
174 | 193 | |
175 | 194 | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/grade/grade_list2.jsp
... | ... | @@ -23,6 +23,10 @@ |
23 | 23 | rel="stylesheet"> --> |
24 | 24 | <link rel="stylesheet" href="static/css/bootstrap.min.css" /> |
25 | 25 | <link href="static/css/teach.css" rel="stylesheet"> |
26 | +<style type="text/css"> | |
27 | + #remove{ | |
28 | + background:#ccc} | |
29 | +</style> | |
26 | 30 | </head> |
27 | 31 | <body class="no-skin"> |
28 | 32 | <form action="grade/listcs.do" method="post" name="Form" id="Form"> |
... | ... | @@ -88,7 +92,7 @@ |
88 | 92 | <input type="button" onclick="add()" value="添加年级" /> |
89 | 93 | </div> |
90 | 94 | <div class="removeAll"> |
91 | - <input type="button" onclick="del()" value="移除年级" /> | |
95 | + <input type="button" onclick="del()" disabled id="remove" value="移除年级" /> | |
92 | 96 | </div> |
93 | 97 | <div class="page_box"> |
94 | 98 | |
... | ... | @@ -177,7 +181,22 @@ |
177 | 181 | }}); |
178 | 182 | window.top.remove.show(); |
179 | 183 | } |
180 | - | |
184 | + $("input[type=checkbox]").on('click',function(){ | |
185 | + var str = ''; | |
186 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
187 | + if(document.getElementsByName('ids')[i].checked){ | |
188 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
189 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
190 | + } | |
191 | + } | |
192 | + if(str==''){ | |
193 | + $("#remove").attr("disabled","disabled"); | |
194 | + $("#remove").css("background","#ccc"); | |
195 | + }else{ | |
196 | + $("#remove").removeAttr("disabled"); | |
197 | + $("#remove").css("background","#f29c9f"); | |
198 | + } | |
199 | + }) | |
181 | 200 | </script> |
182 | 201 | |
183 | 202 | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/pagetemplate/pagetemplate_list2.jsp
... | ... | @@ -21,6 +21,10 @@ |
21 | 21 | <link href="static/css/teach.css" rel="stylesheet"> |
22 | 22 | <!-- 日期框 --> |
23 | 23 | <link rel="stylesheet" href="static/ace/css/datepicker.css" /> |
24 | +<style type="text/css"> | |
25 | + #remove{ | |
26 | + background:#ccc} | |
27 | +</style> | |
24 | 28 | </head> |
25 | 29 | <body class="no-skin"> |
26 | 30 | |
... | ... | @@ -100,7 +104,7 @@ |
100 | 104 | <input type="button" onclick="$('.title_time').modal('show');" value="添加模板" /> |
101 | 105 | </div> |
102 | 106 | <div class="removeAll"> |
103 | - <input type="button" onclick="del('')" value="批量删除" /> | |
107 | + <input type="button" onclick="del('')" disabled id="remove" value="批量删除" /> | |
104 | 108 | </div> |
105 | 109 | <div class="page_box"> |
106 | 110 | |
... | ... | @@ -346,7 +350,22 @@ |
346 | 350 | window.location.href='<%=basePath%>pagetemplate/excel.do'; |
347 | 351 | } |
348 | 352 | |
349 | - | |
353 | + $("input[type=checkbox]").on('click',function(){ | |
354 | + var str = ''; | |
355 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
356 | + if(document.getElementsByName('ids')[i].checked){ | |
357 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
358 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
359 | + } | |
360 | + } | |
361 | + if(str==''){ | |
362 | + $("#remove").attr("disabled","disabled"); | |
363 | + $("#remove").css("background","#ccc"); | |
364 | + }else{ | |
365 | + $("#remove").removeAttr("disabled"); | |
366 | + $("#remove").css("background","#f29c9f"); | |
367 | + } | |
368 | + }) | |
350 | 369 | </script> |
351 | 370 | |
352 | 371 | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/paper/paper_list5.jsp
... | ... | @@ -32,6 +32,10 @@ |
32 | 32 | <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script> |
33 | 33 | <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script> |
34 | 34 | <![endif]--> |
35 | +<style type="text/css"> | |
36 | + #remove{ | |
37 | + background:#ccc} | |
38 | +</style> | |
35 | 39 | </head> |
36 | 40 | <body> |
37 | 41 | |
... | ... | @@ -119,7 +123,7 @@ |
119 | 123 | <input type="button" onclick="parent.$('.title_time').modal('show');" value="新建试卷" /> |
120 | 124 | </div> |
121 | 125 | <div class="removeAll"> |
122 | - <input type="button" onclick="deleteAll()" value="批量删除" /> | |
126 | + <input type="button" onclick="deleteAll()" disabled id="remove" value="批量删除" /> | |
123 | 127 | </div> |
124 | 128 | <div class="page_box"> |
125 | 129 | |
... | ... | @@ -215,7 +219,22 @@ |
215 | 219 | }}); |
216 | 220 | window.top.remove.show(); |
217 | 221 | } |
218 | - | |
222 | + $("input[type=checkbox]").on('click',function(){ | |
223 | + var str = ''; | |
224 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
225 | + if(document.getElementsByName('ids')[i].checked){ | |
226 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
227 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
228 | + } | |
229 | + } | |
230 | + if(str==''){ | |
231 | + $("#remove").attr("disabled","disabled"); | |
232 | + $("#remove").css("background","#ccc"); | |
233 | + }else{ | |
234 | + $("#remove").removeAttr("disabled"); | |
235 | + $("#remove").css("background","#f29c9f"); | |
236 | + } | |
237 | + }) | |
219 | 238 | |
220 | 239 | </script> |
221 | 240 | </html> |
222 | 241 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/sclass/sclass_list2.jsp
... | ... | @@ -24,6 +24,10 @@ |
24 | 24 | rel="stylesheet"> --> |
25 | 25 | <link rel="stylesheet" href="static/css/bootstrap.min.css" /> |
26 | 26 | <link href="static/css/teach.css" rel="stylesheet"> |
27 | +<style type="text/css"> | |
28 | + #remove{ | |
29 | + background:#ccc} | |
30 | +</style> | |
27 | 31 | </head> |
28 | 32 | <body class="no-skin"> |
29 | 33 | |
... | ... | @@ -104,7 +108,7 @@ |
104 | 108 | <input type="button" onclick="add();" value="添加班级" /> |
105 | 109 | </div> |
106 | 110 | <div class="removeAll"> |
107 | - <input type="button" onclick="del();" value="删除" /> | |
111 | + <input type="button" onclick="del();" disabled id="remove" value="删除" /> | |
108 | 112 | </div> |
109 | 113 | |
110 | 114 | <div class="page_box"> |
... | ... | @@ -209,6 +213,22 @@ |
209 | 213 | }); |
210 | 214 | window.top.modal.show(); |
211 | 215 | } |
216 | + $("input[type=checkbox]").on('click',function(){ | |
217 | + var str = ''; | |
218 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
219 | + if(document.getElementsByName('ids')[i].checked){ | |
220 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
221 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
222 | + } | |
223 | + } | |
224 | + if(str==''){ | |
225 | + $("#remove").attr("disabled","disabled"); | |
226 | + $("#remove").css("background","#ccc"); | |
227 | + }else{ | |
228 | + $("#remove").removeAttr("disabled"); | |
229 | + $("#remove").css("background","#f29c9f"); | |
230 | + } | |
231 | + }) | |
212 | 232 | </script> |
213 | 233 | |
214 | 234 | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_list2.jsp
... | ... | @@ -24,6 +24,10 @@ |
24 | 24 | rel="stylesheet"> --> |
25 | 25 | <link rel="stylesheet" href="static/css/bootstrap.min.css" /> |
26 | 26 | <link href="static/css/teach.css" rel="stylesheet"> |
27 | +<style type="text/css"> | |
28 | + #remove{ | |
29 | + background:#ccc} | |
30 | +</style> | |
27 | 31 | </head> |
28 | 32 | <body class="no-skin"> |
29 | 33 | |
... | ... | @@ -120,7 +124,7 @@ |
120 | 124 | <input type="button" onclick="export2();" value="批量导出" /> |
121 | 125 | </div> |
122 | 126 | <div class="removeAll"> |
123 | - <input type="button" onclick="del()" value="删除" /> | |
127 | + <input type="button" onclick="del()" disabled id="remove" value="删除" /> | |
124 | 128 | </div> |
125 | 129 | <div class="page_box"> |
126 | 130 | <div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div> |
... | ... | @@ -297,6 +301,22 @@ |
297 | 301 | function export2(){ |
298 | 302 | window.open('<%=basePath%>teacher/excel?school_id=${pd.SCHOOL_ID}','_blank'); |
299 | 303 | } |
304 | + $("input[type=checkbox]").on('click',function(){ | |
305 | + var str = ''; | |
306 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
307 | + if(document.getElementsByName('ids')[i].checked){ | |
308 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
309 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
310 | + } | |
311 | + } | |
312 | + if(str==''){ | |
313 | + $("#remove").attr("disabled","disabled"); | |
314 | + $("#remove").css("background","#ccc"); | |
315 | + }else{ | |
316 | + $("#remove").removeAttr("disabled"); | |
317 | + $("#remove").css("background","#f29c9f"); | |
318 | + } | |
319 | + }) | |
300 | 320 | </script> |
301 | 321 | |
302 | 322 | ... | ... |