Commit 8fb81e720bdf25000b418f028dd823f6c7ccb97c
1 parent
a479f295
1.增加练习列表页和布置练习页面
Showing
5 changed files
with
418 additions
and
337 deletions
WebRoot/WEB-INF/jsp/sunvote/homework/homework_edit2.jsp
0 → 100644
1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | |
2 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | |
3 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | |
4 | +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> | |
5 | +<% | |
6 | + String path = request.getContextPath(); | |
7 | + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; | |
8 | +%> | |
9 | +<!DOCTYPE html> | |
10 | +<html lang="en"> | |
11 | + <head> | |
12 | + <base href="<%=basePath%>"> | |
13 | + <!-- 下拉框 --> | |
14 | + <link rel="stylesheet" href="static/ace/css/chosen.css" /> | |
15 | + <!-- jsp文件头和头部 --> | |
16 | + <%@ include file="../../system/index/top.jsp"%> | |
17 | + <!-- 日期框 --> | |
18 | + <link rel="stylesheet" href="static/ace/css/datepicker.css" /> | |
19 | + | |
20 | + | |
21 | + <link rel="stylesheet" href="static/css/edit.css" /> | |
22 | + <style> | |
23 | + .subject_body_tabel{border-collapse: separate;border-spacing:0 10px;} | |
24 | + .subject_body_tabel td{border:1px solid #000;} | |
25 | + .subject_body_tabel .first{border-right:0;} | |
26 | + .subject_body_tabel .middle{border-left:0;border-right:0;} | |
27 | + .subject_body_tabel .last{border-left:0;} | |
28 | + | |
29 | + </style> | |
30 | +</head> | |
31 | +<body class="no-skin"> | |
32 | +<!-- /section:basics/navbar.layout --> | |
33 | +<div class="main-container" id="main-container"> | |
34 | + <!-- /section:basics/sidebar --> | |
35 | + <div class="main-content"> | |
36 | + <div class="main-content-inner"> | |
37 | + <div class="page-content"> | |
38 | + <div class="row"> | |
39 | + <div class="col-xs-12"> | |
40 | + | |
41 | + <form action="homework/${msg }.do" name="Form" id="Form" method="post"> | |
42 | + <input type="hidden" name="HOMEWORK_ID" id="HOMEWORK_ID" value="${pd.HOMEWORK_ID}"/> | |
43 | + <div id="zhongxin" style="padding-top: 13px;"> | |
44 | + <table id="table_report" class="table"> | |
45 | + <tr> | |
46 | + <td style="width:75px;text-align: right;padding-top: 13px;">练习标题</td> | |
47 | + <td><input type="text" name="CODE" id="CODE" value="${pd.CODE}" maxlength="255" placeholder="输入练习标题,不超过20个汉字" title="作业代码" style="width:98%;"/></td> | |
48 | + </tr> | |
49 | + <tr> | |
50 | + <td style="width:75px;text-align: right;padding-top: 13px;">练习说明</td> | |
51 | + <td><input type="text" name="NAME" id="NAME" value="${pd.NAME}" maxlength="255" placeholder="输入题目说明,如教材第12页1-5题,教辅第5页1-3题,尽量精简,不超过100个汉字" title="作业名称" style="width:98%;"/></td> | |
52 | + </tr> | |
53 | + <tr> | |
54 | + <td style="width:75px;text-align: right;padding-top: 13px;">指定班级完成时间</td> | |
55 | + <td> | |
56 | + <div class="classBox"> | |
57 | + <ul> | |
58 | + <li><input type="radio" name="className" value="1" checked="true" /> 1班 <input class="date-picker" type="text" placeholder="完成日期" name="lastStart" id="lastStart" data-date-format="yyyy-mm-dd" readonly="readonly" value=""/></li> | |
59 | + <li><input type="radio" name="className" value="1" /> 2班 <input class="date-picker" type="text" placeholder="完成日期" name="lastStart" id="lastStart" data-date-format="yyyy-mm-dd" readonly="readonly" value=""/></li> | |
60 | + <li><input type="radio" name="className" value="1" /> 3班 <input class="date-picker" type="text" placeholder="完成日期" name="lastStart" id="lastStart" data-date-format="yyyy-mm-dd" readonly="readonly" value=""/></li> | |
61 | + </ul> | |
62 | + </div> | |
63 | + | |
64 | + </td> | |
65 | + </tr> | |
66 | + | |
67 | + </table> | |
68 | + </div> | |
69 | + <hr /> | |
70 | + <div class="subject"> | |
71 | + <table width="100%"> | |
72 | + <col width="50%"/> | |
73 | + <col width="20%"/> | |
74 | + <col width="20%"/> | |
75 | + <col width="10%"/> | |
76 | + <thead> | |
77 | + <tr> | |
78 | + <th><span>题目数量</span><input type="number" value="1"/></th> | |
79 | + <th><span>选项个数</span><input type="number" value="1"/></th> | |
80 | + <th><span>分值</span><input type="number" value="1"/></th> | |
81 | + <th></th> | |
82 | + </tr> | |
83 | + </thead> | |
84 | + </table> | |
85 | + <table width="100%" border="0" class="subject_body_tabel"> | |
86 | + <col width="10%"/> | |
87 | + <col width="40%"/> | |
88 | + <col width="20%"/> | |
89 | + <col width="20%"/> | |
90 | + <col width="10%"/> | |
91 | + <tbody> | |
92 | + <tr> | |
93 | + <td class="first">1</td> | |
94 | + <td class="middle">1</td> | |
95 | + <td class="middle"><span>选项个数</span><input type="number" value="1"/></td> | |
96 | + <td class="middle"><span>分值</span><input type="number" value="1"/></td> | |
97 | + <td class="last"><input type="button" value="删除"/></td> | |
98 | + </tr> | |
99 | + <tr> | |
100 | + <td class="first">1</td> | |
101 | + <td class="middle">1</td> | |
102 | + <td class="middle"><span>选项个数</span><input type="number" value="1"/></td> | |
103 | + <td class="middle"><span>分值</span><input type="number" value="1"/></td> | |
104 | + <td class="last"><input type="button" value="删除"/></td> | |
105 | + </tr> | |
106 | + </tbody> | |
107 | + </table> | |
108 | + </div> | |
109 | + <hr /> | |
110 | + <div> | |
111 | + <div style="text-align: center;" colspan="10"> | |
112 | + <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | |
113 | + <a class="btn btn-mini btn-danger" onclick="window.top.modal.remove();">取消</a> | |
114 | + </div> | |
115 | + </div> | |
116 | + <div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div> | |
117 | + </form> | |
118 | + </div> | |
119 | + <!-- /.col --> | |
120 | + </div> | |
121 | + <!-- /.row --> | |
122 | + </div> | |
123 | + <!-- /.page-content --> | |
124 | + </div> | |
125 | + </div> | |
126 | + <!-- /.main-content --> | |
127 | +</div> | |
128 | +<!-- /.main-container --> | |
129 | + | |
130 | + | |
131 | + <!-- 页面底部js¨ --> | |
132 | + <%@ include file="../../system/index/foot.jsp"%> | |
133 | + <!-- 下拉框 --> | |
134 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
135 | + <!-- 日期框 --> | |
136 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
137 | + <!--提示框--> | |
138 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
139 | + <script type="text/javascript"> | |
140 | + | |
141 | + function save(){ | |
142 | + if($("#CODE").val()==""){ | |
143 | + $("#CODE").tips({ | |
144 | + side:3, | |
145 | + msg:'请输入作业代码', | |
146 | + bg:'#AE81FF', | |
147 | + time:2 | |
148 | + }); | |
149 | + $("#CODE").focus(); | |
150 | + return false; | |
151 | + } | |
152 | + if($("#NAME").val()==""){ | |
153 | + $("#NAME").tips({ | |
154 | + side:3, | |
155 | + msg:'请输入作业名称', | |
156 | + bg:'#AE81FF', | |
157 | + time:2 | |
158 | + }); | |
159 | + $("#NAME").focus(); | |
160 | + return false; | |
161 | + } | |
162 | + if($("#SUBJECT_ID").val()==""){ | |
163 | + $("#SUBJECT_ID").tips({ | |
164 | + side:3, | |
165 | + msg:'请输入科目ID', | |
166 | + bg:'#AE81FF', | |
167 | + time:2 | |
168 | + }); | |
169 | + $("#SUBJECT_ID").focus(); | |
170 | + return false; | |
171 | + } | |
172 | + if($("#CLASS_ID").val()==""){ | |
173 | + $("#CLASS_ID").tips({ | |
174 | + side:3, | |
175 | + msg:'请输入班级ID', | |
176 | + bg:'#AE81FF', | |
177 | + time:2 | |
178 | + }); | |
179 | + $("#CLASS_ID").focus(); | |
180 | + return false; | |
181 | + } | |
182 | + if($("#GRADE_ID").val()==""){ | |
183 | + $("#GRADE_ID").tips({ | |
184 | + side:3, | |
185 | + msg:'请输入年级ID', | |
186 | + bg:'#AE81FF', | |
187 | + time:2 | |
188 | + }); | |
189 | + $("#GRADE_ID").focus(); | |
190 | + return false; | |
191 | + } | |
192 | + if($("#SCHOOL_ID").val()==""){ | |
193 | + $("#SCHOOL_ID").tips({ | |
194 | + side:3, | |
195 | + msg:'请输入学校ID', | |
196 | + bg:'#AE81FF', | |
197 | + time:2 | |
198 | + }); | |
199 | + $("#SCHOOL_ID").focus(); | |
200 | + return false; | |
201 | + } | |
202 | + if($("#COMPLETE_DATE").val()==""){ | |
203 | + $("#COMPLETE_DATE").tips({ | |
204 | + side:3, | |
205 | + msg:'请输入需要完成时间', | |
206 | + bg:'#AE81FF', | |
207 | + time:2 | |
208 | + }); | |
209 | + $("#COMPLETE_DATE").focus(); | |
210 | + return false; | |
211 | + } | |
212 | + if($("#CREATE_DATE").val()==""){ | |
213 | + $("#CREATE_DATE").tips({ | |
214 | + side:3, | |
215 | + msg:'请输入创建时间', | |
216 | + bg:'#AE81FF', | |
217 | + time:2 | |
218 | + }); | |
219 | + $("#CREATE_DATE").focus(); | |
220 | + return false; | |
221 | + } | |
222 | + if($("#MODIFY_DATE").val()==""){ | |
223 | + $("#MODIFY_DATE").tips({ | |
224 | + side:3, | |
225 | + msg:'请输入修改时间', | |
226 | + bg:'#AE81FF', | |
227 | + time:2 | |
228 | + }); | |
229 | + $("#MODIFY_DATE").focus(); | |
230 | + return false; | |
231 | + } | |
232 | + if($("#COMPLETE_COUNT").val()==""){ | |
233 | + $("#COMPLETE_COUNT").tips({ | |
234 | + side:3, | |
235 | + msg:'请输入完成次数', | |
236 | + bg:'#AE81FF', | |
237 | + time:2 | |
238 | + }); | |
239 | + $("#COMPLETE_COUNT").focus(); | |
240 | + return false; | |
241 | + } | |
242 | + if($("#ALL_SCORE").val()==""){ | |
243 | + $("#ALL_SCORE").tips({ | |
244 | + side:3, | |
245 | + msg:'请输入总分', | |
246 | + bg:'#AE81FF', | |
247 | + time:2 | |
248 | + }); | |
249 | + $("#ALL_SCORE").focus(); | |
250 | + return false; | |
251 | + } | |
252 | + $("#Form").submit(); | |
253 | + $("#zhongxin").hide(); | |
254 | + $("#zhongxin2").show(); | |
255 | + } | |
256 | + | |
257 | + $(function() { | |
258 | + //日期框 | |
259 | + $('.date-picker').datepicker({ | |
260 | + autoclose: true, | |
261 | + todayHighlight: true | |
262 | + }); | |
263 | + }); | |
264 | + </script> | |
265 | +</body> | |
266 | +</html> | |
0 | 267 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/homework/homework_list.jsp
... | ... | @@ -14,192 +14,106 @@ |
14 | 14 | <!-- 下拉框 --> |
15 | 15 | <link rel="stylesheet" href="static/ace/css/chosen.css" /> |
16 | 16 | <!-- jsp文件头和头部 --> |
17 | -<%@ include file="../../system/index/top.jsp"%> | |
17 | + | |
18 | 18 | <!-- 日期框 --> |
19 | 19 | <link rel="stylesheet" href="static/ace/css/datepicker.css" /> |
20 | +<link | |
21 | + href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" | |
22 | + rel="stylesheet"> | |
23 | +<link href="static/css/teach.css" rel="stylesheet"> | |
20 | 24 | </head> |
21 | 25 | <body class="no-skin"> |
22 | - | |
23 | - <!-- /section:basics/navbar.layout --> | |
24 | - <div class="main-container" id="main-container"> | |
25 | - <!-- /section:basics/sidebar --> | |
26 | - <div class="main-content"> | |
27 | - <div class="main-content-inner"> | |
28 | - <div class="page-content"> | |
29 | - <div class="row"> | |
30 | - <div class="col-xs-12"> | |
31 | - | |
32 | - <!-- 检索 --> | |
33 | - <form action="homework/list.do" method="post" name="Form" id="Form"> | |
34 | - <table style="margin-top:5px;"> | |
26 | + <form action="../paper/list2.do" method="post" name="Form" id="Form"> | |
27 | + <div class="head_box"> | |
28 | + <div class="box_header"> | |
29 | + <div class="head_box_l"> | |
30 | + <p> | |
31 | + <span class="right_b"></span>练习列表 | |
32 | + </p> | |
33 | + </div> | |
34 | + <div class="head_box_r"> | |
35 | + <select name="status" id="status" style="width:90px;height:26px;margin-right:5px;padding:0;border-color:#aaa;"> | |
36 | + <option value="0">全部</option> | |
37 | + <option value="1">完成</option> | |
38 | + <option value="2">未完成</option> | |
39 | + </select> | |
40 | + <input class="date-picker" type="text" placeholder="开始日期" name="lastStart" id="lastStart" data-date-format="yyyy-mm-dd" readonly="readonly" value="${pd.LASTSTART }"/> | |
41 | + <input type="text" class="date-picker" placeholder="结束日期" name="lastEnd" name="lastEnd" data-date-format="yyyy-mm-dd" readonly="readonly" value="${pd.LASTEND}"/> | |
42 | + <a href="#" onclick="tosearch();"><img | |
43 | + src="static/images/search.png" /></a> | |
44 | + </div> | |
45 | + <div class="clear"></div> | |
46 | + </div> | |
47 | + <div style="padding:0 5%;background:#fff;"> | |
48 | + <table class="table table-striped"> | |
49 | + <col style="width: 10%" /> | |
50 | + <col style="width: 20%" /> | |
51 | + <col style="width: 20%" /> | |
52 | + <col style="width: 20%" /> | |
53 | + <col style="width: 20%" /> | |
54 | + <col style="width: 10%" /> | |
55 | + <thead> | |
56 | + <tr> | |
57 | + <th><input type="checkbox" name='ids' id="ids" />序号</th> | |
58 | + <th>测验标题</th> | |
59 | + <th>创建时间</th> | |
60 | + <th>建议考试时长</th> | |
61 | + <th>总分</th> | |
62 | + <th>操作</th> | |
63 | + </tr> | |
64 | + </thead> | |
65 | + </table> | |
66 | + </div> | |
67 | + </div> | |
68 | + <div class="table_box"> | |
69 | + <table class="table table-striped"> | |
70 | + <col style="width: 10%" /> | |
71 | + <col style="width: 20%" /> | |
72 | + <col style="width: 20%" /> | |
73 | + <col style="width: 20%" /> | |
74 | + <col style="width: 20%" /> | |
75 | + <col style="width: 10%" /> | |
76 | + <tbody> | |
77 | + <c:choose> | |
78 | + <c:when test="${not empty varList}"> | |
79 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | |
35 | 80 | <tr> |
81 | + <td><input type="checkbox" name='ids' id="ids" value="${var.PAPER_ID}"/>${vs.index+1}</td> | |
82 | + <td ><a target="_blank" href="<%=basePath%>paper/iteminfo.do?paper_id=${var.PAPER_ID}">${var.TITLE}</a></td> | |
83 | + <td >${var.CREATE_DATE}</td> | |
84 | + <td >${var.EXAM_TIME}</td> | |
85 | + <td >${var.SCORE}</td> | |
36 | 86 | <td> |
37 | - <div class="nav-search"> | |
38 | - <span class="input-icon"> | |
39 | - <input type="text" placeholder="这里输入关键词" class="nav-search-input" id="nav-search-input" autocomplete="off" name="keywords" value="${pd.keywords }" placeholder="这里输入关键词"/> | |
40 | - <i class="ace-icon fa fa-search nav-search-icon"></i> | |
41 | - </span> | |
42 | - </div> | |
43 | - </td> | |
44 | - <td style="padding-left:2px;"><input class="span10 date-picker" name="lastStart" id="lastStart" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="开始日期" title="开始日期"/></td> | |
45 | - <td style="padding-left:2px;"><input class="span10 date-picker" name="lastEnd" name="lastEnd" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="结束日期" title="结束日期"/></td> | |
46 | - <td style="vertical-align:top;padding-left:2px;"> | |
47 | - <select class="chosen-select form-control" name="name" id="id" data-placeholder="请选择" style="vertical-align:top;width: 120px;"> | |
48 | - <option value=""></option> | |
49 | - <option value="">全部</option> | |
50 | - <option value="">1</option> | |
51 | - <option value="">2</option> | |
52 | - </select> | |
87 | + <a onclick="del('${var.PAPER_ID}');"><img src="static/images/remove.png" /></a> | |
88 | + <a onclick="del('${var.PAPER_ID}');"><img src="static/images/eidtor.png" /></a> | |
53 | 89 | </td> |
54 | - <c:if test="${QX.cha == 1 }"> | |
55 | - <td style="vertical-align:top;padding-left:2px"><a class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><i id="nav-search-icon" class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td> | |
56 | - </c:if> | |
57 | - <c:if test="${QX.toExcel == 1 }"><td style="vertical-align:top;padding-left:2px;"><a class="btn btn-light btn-xs" onclick="toExcel();" title="导出到EXCEL"><i id="nav-search-icon" class="ace-icon fa fa-download bigger-110 nav-search-icon blue"></i></a></td></c:if> | |
58 | 90 | </tr> |
59 | - </table> | |
60 | - <!-- 检索 --> | |
61 | - | |
62 | - <table id="simple-table" class="table table-striped table-bordered table-hover" style="margin-top:5px;"> | |
63 | - <thead> | |
64 | - <tr> | |
65 | - <th class="center" style="width:35px;"> | |
66 | - <label class="pos-rel"><input type="checkbox" class="ace" id="zcheckbox" /><span class="lbl"></span></label> | |
67 | - </th> | |
68 | - <th class="center" style="width:50px;">序号</th> | |
69 | - <th class="center">作业代码</th> | |
70 | - <th class="center">作业名称</th> | |
71 | - <th class="center">科目ID</th> | |
72 | - <th class="center">班级ID</th> | |
73 | - <th class="center">年级ID</th> | |
74 | - <th class="center">学校ID</th> | |
75 | - <th class="center">需要完成时间</th> | |
76 | - <th class="center">创建时间</th> | |
77 | - <th class="center">修改时间</th> | |
78 | - <th class="center">完成次数</th> | |
79 | - <th class="center">总分</th> | |
80 | - <th class="center">操作</th> | |
81 | - </tr> | |
82 | - </thead> | |
83 | - | |
84 | - <tbody> | |
85 | - <!-- 开始循环 --> | |
86 | - <c:choose> | |
87 | - <c:when test="${not empty varList}"> | |
88 | - <c:if test="${QX.cha == 1 }"> | |
89 | - <c:forEach items="${varList}" var="var" varStatus="vs"> | |
90 | - <tr> | |
91 | - <td class='center'> | |
92 | - <label class="pos-rel"><input type='checkbox' name='ids' value="${var.HOMEWORK_ID}" class="ace" /><span class="lbl"></span></label> | |
93 | - </td> | |
94 | - <td class='center' style="width: 30px;">${vs.index+1}</td> | |
95 | - <td class='center'>${var.CODE}</td> | |
96 | - <td class='center'>${var.NAME}</td> | |
97 | - <td class='center'>${var.SUBJECT_ID}</td> | |
98 | - <td class='center'>${var.CLASS_ID}</td> | |
99 | - <td class='center'>${var.GRADE_ID}</td> | |
100 | - <td class='center'>${var.SCHOOL_ID}</td> | |
101 | - <td class='center'>${var.COMPLETE_DATE}</td> | |
102 | - <td class='center'>${var.CREATE_DATE}</td> | |
103 | - <td class='center'>${var.MODIFY_DATE}</td> | |
104 | - <td class='center'>${var.COMPLETE_COUNT}</td> | |
105 | - <td class='center'>${var.ALL_SCORE}</td> | |
106 | - <td class="center"> | |
107 | - <c:if test="${QX.edit != 1 && QX.del != 1 }"> | |
108 | - <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | |
109 | - </c:if> | |
110 | - <div class="hidden-sm hidden-xs btn-group"> | |
111 | - <c:if test="${QX.edit == 1 }"> | |
112 | - <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.HOMEWORK_ID}');"> | |
113 | - <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | |
114 | - </a> | |
115 | - </c:if> | |
116 | - <c:if test="${QX.del == 1 }"> | |
117 | - <a class="btn btn-xs btn-danger" onclick="del('${var.HOMEWORK_ID}');"> | |
118 | - <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | |
119 | - </a> | |
120 | - </c:if> | |
121 | - </div> | |
122 | - <div class="hidden-md hidden-lg"> | |
123 | - <div class="inline pos-rel"> | |
124 | - <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | |
125 | - <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | |
126 | - </button> | |
127 | - | |
128 | - <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | |
129 | - <c:if test="${QX.edit == 1 }"> | |
130 | - <li> | |
131 | - <a style="cursor:pointer;" onclick="edit('${var.HOMEWORK_ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
132 | - <span class="green"> | |
133 | - <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | |
134 | - </span> | |
135 | - </a> | |
136 | - </li> | |
137 | - </c:if> | |
138 | - <c:if test="${QX.del == 1 }"> | |
139 | - <li> | |
140 | - <a style="cursor:pointer;" onclick="del('${var.HOMEWORK_ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
141 | - <span class="red"> | |
142 | - <i class="ace-icon fa fa-trash-o bigger-120"></i> | |
143 | - </span> | |
144 | - </a> | |
145 | - </li> | |
146 | - </c:if> | |
147 | - </ul> | |
148 | - </div> | |
149 | - </div> | |
150 | - </td> | |
151 | - </tr> | |
152 | - | |
153 | - </c:forEach> | |
154 | - </c:if> | |
155 | - <c:if test="${QX.cha == 0 }"> | |
156 | - <tr> | |
157 | - <td colspan="100" class="center">您无权查看</td> | |
158 | - </tr> | |
159 | - </c:if> | |
160 | - </c:when> | |
161 | - <c:otherwise> | |
162 | - <tr class="main_info"> | |
163 | - <td colspan="100" class="center" >没有相关数据</td> | |
164 | - </tr> | |
165 | - </c:otherwise> | |
166 | - </c:choose> | |
167 | - </tbody> | |
168 | - </table> | |
169 | - <div class="page-header position-relative"> | |
170 | - <table style="width:100%;"> | |
171 | - <tr> | |
172 | - <td style="vertical-align:top;"> | |
173 | - <c:if test="${QX.add == 1 }"> | |
174 | - <a class="btn btn-mini btn-success" onclick="add();">新增</a> | |
175 | - </c:if> | |
176 | - <c:if test="${QX.del == 1 }"> | |
177 | - <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | |
178 | - </c:if> | |
179 | - </td> | |
180 | - <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | |
181 | - </tr> | |
182 | - </table> | |
183 | - </div> | |
184 | - </form> | |
91 | + | |
92 | + | |
93 | + </c:forEach> | |
94 | + </c:when> | |
95 | + <c:otherwise> | |
96 | + <tr class="main_info"> | |
97 | + <td colspan="100" class="center" >没有相关数据</td> | |
98 | + </tr> | |
99 | + </c:otherwise> | |
100 | + </c:choose> | |
101 | + </tbody> | |
102 | + </table> | |
103 | + <div class="footer"> | |
104 | + <div class="creat"> | |
105 | + <input type="button" onclick="edit()" value="布置练习" /> | |
106 | + </div> | |
107 | + <div class="removeAll"> | |
108 | + <input type="button" onclick="deleteAll()" value="批量删除" /> | |
109 | + </div> | |
110 | + <div class="page_box"> | |
185 | 111 | |
186 | - </div> | |
187 | - <!-- /.col --> | |
188 | - </div> | |
189 | - <!-- /.row --> | |
112 | + <div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div> | |
190 | 113 | </div> |
191 | - <!-- /.page-content --> | |
192 | 114 | </div> |
193 | 115 | </div> |
194 | - <!-- /.main-content --> | |
195 | - | |
196 | - <!-- 返回顶部 --> | |
197 | - <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | |
198 | - <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | |
199 | - </a> | |
200 | - | |
201 | - </div> | |
202 | - <!-- /.main-container --> | |
116 | + </form> | |
203 | 117 | |
204 | 118 | <!-- basic scripts --> |
205 | 119 | <!-- 页面底部js¨ --> |
... | ... | @@ -215,168 +129,25 @@ |
215 | 129 | <!--提示框--> |
216 | 130 | <script type="text/javascript" src="static/js/jquery.tips.js"></script> |
217 | 131 | <script type="text/javascript"> |
218 | - $(top.hangge());//关闭加载状态 | |
219 | - //检索 | |
220 | - function tosearch(){ | |
221 | - top.jzts(); | |
222 | - $("#Form").submit(); | |
223 | - } | |
224 | - $(function() { | |
225 | - | |
226 | - //日期框 | |
227 | - $('.date-picker').datepicker({ | |
228 | - autoclose: true, | |
229 | - todayHighlight: true | |
230 | - }); | |
231 | - | |
232 | - //下拉框 | |
233 | - if(!ace.vars['touch']) { | |
234 | - $('.chosen-select').chosen({allow_single_deselect:true}); | |
235 | - $(window) | |
236 | - .off('resize.chosen') | |
237 | - .on('resize.chosen', function() { | |
238 | - $('.chosen-select').each(function() { | |
239 | - var $this = $(this); | |
240 | - $this.next().css({'width': $this.parent().width()}); | |
241 | - }); | |
242 | - }).trigger('resize.chosen'); | |
243 | - $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | |
244 | - if(event_name != 'sidebar_collapsed') return; | |
245 | - $('.chosen-select').each(function() { | |
246 | - var $this = $(this); | |
247 | - $this.next().css({'width': $this.parent().width()}); | |
248 | - }); | |
249 | - }); | |
250 | - $('#chosen-multiple-style .btn').on('click', function(e){ | |
251 | - var target = $(this).find('input[type=radio]'); | |
252 | - var which = parseInt(target.val()); | |
253 | - if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | |
254 | - else $('#form-field-select-4').removeClass('tag-input-style'); | |
255 | - }); | |
256 | - } | |
257 | - | |
258 | - | |
259 | - //复选框全选控制 | |
260 | - var active_class = 'active'; | |
261 | - $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | |
262 | - var th_checked = this.checked;//checkbox inside "TH" table header | |
263 | - $(this).closest('table').find('tbody > tr').each(function(){ | |
264 | - var row = this; | |
265 | - if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | |
266 | - else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | |
267 | - }); | |
268 | - }); | |
132 | + $(document).ready(function() { | |
133 | + window.top.loading.remove(); | |
134 | + //日期框 | |
135 | + $('.date-picker').datepicker({ | |
136 | + autoclose: true, | |
137 | + todayHighlight: true | |
269 | 138 | }); |
270 | - | |
271 | - //新增 | |
272 | - function add(){ | |
273 | - top.jzts(); | |
274 | - var diag = new top.Dialog(); | |
275 | - diag.Drag=true; | |
276 | - diag.Title ="新增"; | |
277 | - diag.URL = '<%=basePath%>homework/goAdd.do'; | |
278 | - diag.Width = 450; | |
279 | - diag.Height = 355; | |
280 | - diag.Modal = true; //有无遮罩窗口 | |
281 | - diag. ShowMaxButton = true; //最大化按钮 | |
282 | - diag.ShowMinButton = true; //最小化按钮 | |
283 | - diag.CancelEvent = function(){ //关闭事件 | |
284 | - if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
285 | - if('${page.currentPage}' == '0'){ | |
286 | - tosearch(); | |
287 | - }else{ | |
288 | - tosearch(); | |
289 | - } | |
290 | - } | |
291 | - diag.close(); | |
292 | - }; | |
293 | - diag.show(); | |
294 | - } | |
295 | - | |
296 | - //删除 | |
297 | - function del(Id){ | |
298 | - bootbox.confirm("确定要删除吗?", function(result) { | |
299 | - if(result) { | |
300 | - top.jzts(); | |
301 | - var url = "<%=basePath%>homework/delete.do?HOMEWORK_ID="+Id+"&tm="+new Date().getTime(); | |
302 | - $.get(url,function(data){ | |
303 | - tosearch(); | |
304 | - }); | |
305 | - } | |
306 | - }); | |
307 | - } | |
308 | - | |
309 | - //修改 | |
310 | - function edit(Id){ | |
311 | - top.jzts(); | |
312 | - var diag = new top.Dialog(); | |
313 | - diag.Drag=true; | |
314 | - diag.Title ="编辑"; | |
315 | - diag.URL = '<%=basePath%>homework/goEdit.do?HOMEWORK_ID='+Id; | |
316 | - diag.Width = 450; | |
317 | - diag.Height = 355; | |
318 | - diag.Modal = true; //有无遮罩窗口 | |
319 | - diag. ShowMaxButton = true; //最大化按钮 | |
320 | - diag.ShowMinButton = true; //最小化按钮 | |
321 | - diag.CancelEvent = function(){ //关闭事件 | |
322 | - if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
323 | - tosearch(); | |
324 | - } | |
325 | - diag.close(); | |
326 | - }; | |
327 | - diag.show(); | |
328 | - } | |
329 | - | |
330 | - //批量操作 | |
331 | - function makeAll(msg){ | |
332 | - bootbox.confirm(msg, function(result) { | |
333 | - if(result) { | |
334 | - var str = ''; | |
335 | - for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
336 | - if(document.getElementsByName('ids')[i].checked){ | |
337 | - if(str=='') str += document.getElementsByName('ids')[i].value; | |
338 | - else str += ',' + document.getElementsByName('ids')[i].value; | |
339 | - } | |
340 | - } | |
341 | - if(str==''){ | |
342 | - bootbox.dialog({ | |
343 | - message: "<span class='bigger-110'>您没有选择任何内容!</span>", | |
344 | - buttons: | |
345 | - { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | |
346 | - }); | |
347 | - $("#zcheckbox").tips({ | |
348 | - side:1, | |
349 | - msg:'点这里全选', | |
350 | - bg:'#AE81FF', | |
351 | - time:8 | |
352 | - }); | |
353 | - return; | |
354 | - }else{ | |
355 | - if(msg == '确定要删除选中的数据吗?'){ | |
356 | - top.jzts(); | |
357 | - $.ajax({ | |
358 | - type: "POST", | |
359 | - url: '<%=basePath%>homework/deleteAll.do?tm='+new Date().getTime(), | |
360 | - data: {DATA_IDS:str}, | |
361 | - dataType:'json', | |
362 | - //beforeSend: validateData, | |
363 | - cache: false, | |
364 | - success: function(data){ | |
365 | - $.each(data.list, function(i, list){ | |
366 | - tosearch(); | |
367 | - }); | |
368 | - } | |
369 | - }); | |
370 | - } | |
371 | - } | |
372 | - } | |
373 | - }); | |
374 | - }; | |
375 | - | |
376 | - //导出excel | |
377 | - function toExcel(){ | |
378 | - window.location.href='<%=basePath%>homework/excel.do'; | |
139 | + }); | |
140 | + function edit(Id){ | |
141 | + window.top.modal.init({ | |
142 | + 'title':'布置练习', | |
143 | + 'width':1200, | |
144 | + 'url':'<%=basePath%>homework/goEdit2.do?school_id=${pd.SCHOOL_ID}&ID='+Id, | |
145 | + func:function() { | |
146 | + tosearch(); | |
379 | 147 | } |
148 | + }); | |
149 | + window.top.modal.show(); | |
150 | + } | |
380 | 151 | </script> |
381 | 152 | |
382 | 153 | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_main.jsp
... | ... | @@ -94,16 +94,16 @@ |
94 | 94 | </ul> |
95 | 95 | </div> |
96 | 96 | <div class="analyse tab1"> |
97 | - <p> | |
97 | + <p > | |
98 | 98 | 课后练<span class="right jiao"></span> |
99 | 99 | </p> |
100 | 100 | |
101 | 101 | <ul class="menu_1"> |
102 | 102 | <li> |
103 | - <p id="practice_do">布置练习</p> | |
103 | + <p id="practice_manage" onclick="event.stopPropagation();homeWork('${SCHOOL_ID}')">练习列表</p> | |
104 | 104 | </li> |
105 | 105 | <li> |
106 | - <p id="practice_manage">练习管理</p> | |
106 | + <p id="practice_do" >布置练习</p> | |
107 | 107 | </li> |
108 | 108 | <li> |
109 | 109 | <p id="practice_report">练习报表</p> |
... | ... | @@ -176,6 +176,14 @@ |
176 | 176 | window.top.loading.show(); |
177 | 177 | } |
178 | 178 | } |
179 | + function homeWork(schoolId){ | |
180 | + //var path = "../school/goEdit2.do?ID=" + schoolId ; | |
181 | + | |
182 | + var path = '<%=basePath%>homework/list.do?ID=' + schoolId ; | |
183 | + | |
184 | + $("#mainFrame").attr('src',path); | |
185 | + window.top.loading.show(); | |
186 | + } | |
179 | 187 | |
180 | 188 | function report(classId){ |
181 | 189 | //window.open('<%=basePath%>report/report.do?classid=' + classId); | ... | ... |
WebRoot/static/js/dailog.js
... | ... | @@ -3,16 +3,35 @@ |
3 | 3 | this.init.title=obj.title; |
4 | 4 | this.init.url=obj.url; |
5 | 5 | this.init.func = obj.func; |
6 | + this.init.width = obj.width; | |
7 | + this.init.height = obj.height; | |
6 | 8 | }, |
7 | 9 | show:function(){ |
8 | 10 | if(window.top!=window.self){ |
9 | 11 | $("body",top.document).append('<div class="mb"><div class="mb_box"><div class="mb_head"><p>'+window.top.init.title+'</p><div class="close"><img src="../static/images/close.png" /></div></div><div class="mb_content"><iframe src="'+window.top.modal.init.url+'"></iframe></div></div></div>'); |
12 | + if(window.top.init.width){ | |
13 | + var w=(window.top.init.width>window.document.body.clientWidth)?window.document.body.clientWidth:window.top.init.width; | |
14 | + $(".mb_box",top.document).css("width",w); | |
15 | + } | |
16 | + if(window.top.init.height){ | |
17 | + var h=(window.top.init.height>window.document.body.clientHeight)?window.document.body.clientHeight:window.top.init.height; | |
18 | + $(".mb_box",top.document).css("height",h); | |
19 | + } | |
10 | 20 | }else{ |
11 | 21 | if($(".loading").length==0) |
12 | 22 | { |
13 | 23 | $("body").append('<div class="mb"><div class="mb_box"><div class="mb_head"><p>'+window.top.modal.init.title+'</p><div class="close"><img src="../static/images/close.png" /></div></div><div class="mb_content"><iframe src="'+window.top.modal.init.url+'"></iframe></div></div></div>'); |
24 | + if(window.top.modal.init.width){ | |
25 | + var w=(window.top.modal.init.width>window.document.body.clientWidth)?window.document.body.clientWidth:window.top.modal.init.width; | |
26 | + $(".mb_box").css("width",w); | |
27 | + } | |
28 | + if(window.top.modal.init.height){ | |
29 | + var h=(window.top.modal.init.height>window.document.body.clientHeight)?window.document.body.clientHeight:window.top.modal.init.height; | |
30 | + $(".mb_box").css("height",h); | |
31 | + } | |
14 | 32 | } |
15 | 33 | } |
34 | + | |
16 | 35 | |
17 | 36 | }, |
18 | 37 | remove:function(){ | ... | ... |
src/com/fh/controller/sunvote/homework/HomeworkController.java
... | ... | @@ -162,6 +162,23 @@ public class HomeworkController extends BaseController { |
162 | 162 | mv.addObject("pd", pd); |
163 | 163 | return mv; |
164 | 164 | } |
165 | + /** | |
166 | + * 去修改页面 | |
167 | + * | |
168 | + * @param | |
169 | + * @throws Exception | |
170 | + */ | |
171 | + @RequestMapping(value = "/goEdit2") | |
172 | + public ModelAndView goEdit2() throws Exception { | |
173 | + ModelAndView mv = this.getModelAndView(); | |
174 | + PageData pd = new PageData(); | |
175 | + pd = this.getPageData(); | |
176 | + pd = homeworkService.findById(pd); // 根据ID读取 | |
177 | + mv.setViewName("sunvote/homework/homework_edit2"); | |
178 | + mv.addObject("msg", "edit"); | |
179 | + mv.addObject("pd", pd); | |
180 | + return mv; | |
181 | + } | |
165 | 182 | |
166 | 183 | /** |
167 | 184 | * 批量删除 | ... | ... |