cbea3b4e0ad1d0054cd3232517610a38c13e2d04.svn-base
3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>测试管理</title>
<meta name="decorator" content="default"/>
<%@include file="/WEB-INF/views/include/supcan.jsp" %>
<script type="text/javascript">
$(document).ready(function() {
su = supcan(AF, "Test", {
ready: function(){
// 加载数据
page();
},
event: function(Event, p1, p2, p3, p4){
if(Event == 'DblClicked'){
edit();
}
}
});
});
// 新建
function add(){
alertx("新建数据");
location = "${ctx}/test/test/form";
}
// 修改
function edit(){
var id = su.getCellText("id");
if (id != ""){
location = "${ctx}/test/test/form?id=" + id;
alertx("修改数据:id=" + id);
}else{
alertx("请选择一行数据!");
}
}
//删除
function dele(){
var ids = su.getCellText("id", true);
if (ids != ""){
$.get("${ctx}/test/test/delete?id=" + ids, function(data){
if (data == "true"){
showTip("删除“" + su.getCellText("name", true) + "”成功。");
page();
}else{
showTip("删除“" + su.getCellText("name", true) + "”失败!");
}
});
}else{
alertx("请选择一行或多行数据!");
}
}
// 翻页
function page(pageNo, pageSize){
if (pageNo != ""){
$("#pageNo").val(pageNo);
}
if (pageSize != ""){
$("#pageSize").val(pageSize);
}
su.loadByForm("#searchForm", "#page");
return false;
}
</script>
</head>
<body>
<ul class="nav nav-tabs">
<li class="active"><a href="${ctx}/test/test/">硕正列表</a></li>
<shiro:hasPermission name="test:test:edit"><li><a href="${ctx}/test/test/form">组件表单</a></li></shiro:hasPermission>
</ul>
<div class="btn-toolbar breadcrumb">
<div class="btn-group">
<a class="btn" href="javascript:add();"><i class="icon-file"></i>新建</a>
<a class="btn" href="javascript:edit();"><i class="icon-edit"></i>修改</a>
<a class="btn" href="javascript:dele();" onclick="return confirmx('确认要删除该测试吗?', this.href)"><i class="icon-remove"></i>删除</a>
</div>
<div class="btn-group" >
<a class="btn" onclick="$('#searchForm').toggle();su.autoHeight();"><i class="icon-search"></i>查询</a>
</div>
</div>
<form:form id="searchForm" modelAttribute="test" action="${ctx}/test/test/listData.json" method="post" class="breadcrumb form-search hide" onsubmit="return page();">
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<label>名称 :</label><form:input path="name" htmlEscape="false" maxlength="50" class="input-medium"/>
<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
</form:form>
<sys:message content="${message}"/>
<div id="supcan" class="supcan">
<script>insertTreeList('AF', 'border=none;')</script>
</div>
<div id="page" class="pagination">${test.page}</div>
</body>
</html>