Commit c6b64ceb2f1ec5924508bcf14c56f29808609ce5
1 parent
f0d5a2af
1.课后练修改
Showing
3 changed files
with
36 additions
and
13 deletions
WebRoot/WEB-INF/jsp/sunvote/homework/homework_edit2.jsp
WebRoot/WEB-INF/jsp/sunvote/homework/homework_list.jsp
| ... | ... | @@ -22,6 +22,11 @@ |
| 22 | 22 | href="static/css/bootstrap.min.css" |
| 23 | 23 | rel="stylesheet"> |
| 24 | 24 | <link href="static/css/teach.css" rel="stylesheet"> |
| 25 | +<style> | |
| 26 | + .footer .removeAll input.disable{ | |
| 27 | + background:#bfb5b5; | |
| 28 | + } | |
| 29 | +</style> | |
| 25 | 30 | </head> |
| 26 | 31 | <body class="no-skin"> |
| 27 | 32 | <form action="homework/list.do" method="post" name="Form" id="Form"> |
| ... | ... | @@ -100,11 +105,11 @@ |
| 100 | 105 | <td >${var.ALL_SCORE}</td> |
| 101 | 106 | <td style="text-align:center"> |
| 102 | 107 | <c:if test="${var.COMPLETE_COUNT == '0'}"> |
| 103 | - <a onclick="edit('${var.HOMEWORK_ID}');" style="margin-left: 28px"><img src="static/images/eidtor.png" /></a> | |
| 108 | + <a onclick="edit('${var.HOMEWORK_ID}');" ><img src="static/images/eidtor.png" /></a> | |
| 104 | 109 | <a onclick="del('${var.HOMEWORK_ID}');"><img src="static/images/remove.png" /></a> |
| 105 | 110 | </c:if> |
| 106 | 111 | <c:if test="${var.COMPLETE_COUNT == '1'}"> |
| 107 | - <a onclick="homeReport('${var.HOMEWORK_ID}');" style="margin-left: 28px"><img src="static/images/view.png" /></a> | |
| 112 | + <a onclick="homeReport('${var.HOMEWORK_ID}');" ><img src="static/images/view.png" /></a> | |
| 108 | 113 | <a onclick="del('${var.HOMEWORK_ID}');" ><img src="static/images/remove.png" /></a> |
| 109 | 114 | </c:if> |
| 110 | 115 | |
| ... | ... | @@ -126,7 +131,7 @@ |
| 126 | 131 | <input type="button" onclick="add('${pd.TEACHER_ID}')" value="布置练习" /> |
| 127 | 132 | </div> |
| 128 | 133 | <div class="removeAll"> |
| 129 | - <input type="button" onclick="del()" value="批量删除" /> | |
| 134 | + <input type="button" disabled="true" class="removeBtn disable" onclick="del()" value="批量删除" /> | |
| 130 | 135 | </div> |
| 131 | 136 | <div class="page_box"> |
| 132 | 137 | |
| ... | ... | @@ -163,6 +168,8 @@ |
| 163 | 168 | $('#ids').on('click', function(){ |
| 164 | 169 | var th_checked = $("#ids").prop('checked');//checkbox inside "TH" table header |
| 165 | 170 | |
| 171 | + | |
| 172 | + | |
| 166 | 173 | $(".table_box .table").find('tbody > tr').each(function(){ |
| 167 | 174 | var row = this; |
| 168 | 175 | if(th_checked) $(row).find('input[type=checkbox]').eq(0).prop('checked', true); |
| ... | ... | @@ -170,6 +177,16 @@ |
| 170 | 177 | }); |
| 171 | 178 | }); |
| 172 | 179 | |
| 180 | + $(":checkbox").on("click",function(){ | |
| 181 | + if($("input[type='checkbox']:checked").length>0){ | |
| 182 | + $(".disable").attr("disabled","false"); | |
| 183 | + $(".disable").removeClass("disable"); | |
| 184 | + }else{ | |
| 185 | + $(".disable").attr("disabled","true"); | |
| 186 | + $(".removeBtn").addClass("disable"); | |
| 187 | + } | |
| 188 | + }) | |
| 189 | + | |
| 173 | 190 | function tosearch(){ |
| 174 | 191 | $("#Form").submit(); |
| 175 | 192 | } | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/homework/homework_view.jsp
| ... | ... | @@ -42,7 +42,10 @@ |
| 42 | 42 | <p> |
| 43 | 43 | <span class="right_b"></span>练习预览 |
| 44 | 44 | </p> |
| 45 | - </div> | |
| 45 | + </div> | |
| 46 | + <div class="head_box_r"> | |
| 47 | + <button class="btn btn-primary" onclick="history.go(-1)">返回</button> | |
| 48 | + </div> | |
| 46 | 49 | <div class="clear"></div> |
| 47 | 50 | </div> |
| 48 | 51 | <form action="homework/${msg }.do" name="Form" id="Form" method="post"> |
| ... | ... | @@ -51,11 +54,11 @@ |
| 51 | 54 | <table id="table_report" class="table"> |
| 52 | 55 | <tr> |
| 53 | 56 | <td style="width:95px;text-align: right;padding-top: 13px;">练习标题</td> |
| 54 | - <td><input type="text" name="NAME" class="form-control" id="NAME" value="${pd.NAME}" maxlength="255" placeholder="输入练习标题,不超过20个汉字" title="作业代码" /></td> | |
| 57 | + <td><input type="text" disabled="true" name="NAME" class="form-control" id="NAME" value="${pd.NAME}" maxlength="255" placeholder="输入练习标题,不超过20个汉字" title="作业代码" /></td> | |
| 55 | 58 | </tr> |
| 56 | 59 | <tr> |
| 57 | 60 | <td style="width:95px;text-align: right;padding-top: 13px;">练习说明</td> |
| 58 | - <td><input type="text" name=HOMEWORK_DESC class="form-control" id="HOMEWORK_DESC" value="${pd.HOMEWORK_DESC}" maxlength="255" placeholder="输入题目说明,如教材第12页1-5题,教辅第5页1-3题,尽量精简,不超过100个汉字" title="作业名称" /></td> | |
| 61 | + <td><input type="text" disabled="true" name=HOMEWORK_DESC class="form-control" id="HOMEWORK_DESC" value="${pd.HOMEWORK_DESC}" maxlength="255" placeholder="输入题目说明,如教材第12页1-5题,教辅第5页1-3题,尽量精简,不超过100个汉字" title="作业名称" /></td> | |
| 59 | 62 | </tr> |
| 60 | 63 | <tr> |
| 61 | 64 | <td style="width:95px;text-align: right;padding-top: 13px;">指定班级完成时间</td> |
| ... | ... | @@ -64,10 +67,10 @@ |
| 64 | 67 | <ul> |
| 65 | 68 | <c:if test="${pd.CLASS_ID != null}"> |
| 66 | 69 | <li class="checked"> |
| 67 | - <input type="checkbox" checked="true" id="class0" name="className" value="${pd.CLASS_ID}" /> | |
| 70 | + <input type="checkbox" disabled="true" checked="true" id="class0" name="className" value="${pd.CLASS_ID}" /> | |
| 68 | 71 | <label for="class0"></label> |
| 69 | 72 | <span>${myelfun:findClassName(pd.CLASS_ID)}</span> |
| 70 | - <input class="date-picker" type="text" class="form-control" style="width:150px;text-align:center;" placeholder="完成日期" name="lastStart" id="lastStart" data-date-format="yyyy-mm-dd" readonly="readonly" value="${pd.COMPLETE_DATE}"/> | |
| 73 | + <input class="date-picker" disabled="true" type="text" class="form-control" style="width:150px;text-align:center;" placeholder="完成日期" name="lastStart" id="lastStart" data-date-format="yyyy-mm-dd" readonly="readonly" value="${pd.COMPLETE_DATE}"/> | |
| 71 | 74 | </li> |
| 72 | 75 | </c:if> |
| 73 | 76 | |
| ... | ... | @@ -88,9 +91,9 @@ |
| 88 | 91 | <col width="10%"/> |
| 89 | 92 | <thead> |
| 90 | 93 | <tr> |
| 91 | - <th style="text-align:left;"><span>题目数量</span><input type="number" class="w_100" id="que_num" value="${pd.QUESTION_COUNT==null?0:pd.QUESTION_COUNT}"/></th> | |
| 92 | - <th><span>选项个数</span><input type="number" class="w_100 ans_num" id="ans_num" value="4"/></th> | |
| 93 | - <th><span>分值</span><input type="number" class="w_100 score" id="score" value="1"/></th> | |
| 94 | + <th style="text-align:left;"><span>题目数量</span><input type="number" disabled="true" class="w_100" id="que_num" value="${pd.QUESTION_COUNT==null?0:pd.QUESTION_COUNT}"/></th> | |
| 95 | + <th><span>选项个数</span><input type="number" disabled="true" class="w_100 ans_num" id="ans_num" value="4"/></th> | |
| 96 | + <th><span>分值</span><input type="number" disabled="true" class="w_100 score" id="score" value="1"/></th> | |
| 94 | 97 | <th></th> |
| 95 | 98 | </tr> |
| 96 | 99 | </thead> |
| ... | ... | @@ -120,8 +123,8 @@ |
| 120 | 123 | </div> |
| 121 | 124 | |
| 122 | 125 | </td> |
| 123 | - <td class="middle"><span>选项个数</span><input type="number" class="w_100 ans_num" value="${var.OPTION_NUM}"/></td> | |
| 124 | - <td class="middle"><span>分值</span><input type="number" class="w_100 score" value="${var.SCORE}"/></td> | |
| 126 | + <td class="middle"><span>选项个数</span><input type="number" disabled="true" class="w_100 ans_num" value="${var.OPTION_NUM}"/></td> | |
| 127 | + <td class="middle"><span>分值</span><input type="number" disabled="true" class="w_100 score" value="${var.SCORE}"/></td> | |
| 125 | 128 | <td class="last"></td> |
| 126 | 129 | </tr> |
| 127 | 130 | </c:forEach> | ... | ... |