Authored by simba

update

... ... @@ -43,13 +43,9 @@
<ul>
<li class=""><a href="#"><i class="icon icon-home"></i> <span>Dashboard</span></a></li>
<li class="active" onclick="clickMenuToPage('/jsp/table.jsp')"><a href="#" ><i class="icon icon-th"></i> <span>Tables</span></a></li>
<li class="submenu">
<a href="#"><i class="icon icon-th-list"></i> <span>主机</span> <span class="label">3</span></a>
<ul style="display: none;">
<li><a href="#" onclick="clickMenuToPage('jsp/host/hostGroupList.jsp')"><i class="icon icon-th"></i> <span>主机组</span></a></li>
<li><a href="#" onclick="clickMenuToPage('jsp/host/hostInfoList.jsp')"><i class="icon icon-th"></i> <span>主机信息</span></a></li>
</ul>
</li>
<li><a href="#" onclick="clickMenuToPage('jsp/host/hostGroupList.jsp')"><i class="icon icon-th"></i> <span>主机组</span></a></li>
<li><a href="#" onclick="clickMenuToPage('jsp/host/hostInfoList.jsp')"><i class="icon icon-th"></i> <span>主机信息</span></a></li>
</ul>
</div>
... ... @@ -60,7 +56,7 @@
<script type="text/javascript">
function clickMenuToPage(page){
$(this).addClass("active");
// $(this).addClass("active");
//加载左侧内容
$("#content").load(contextPath+page);
}
... ...
<%@page language="java" contentType="text/html;charset=utf-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div id="breadcrumb">
<a href="#" title="Go to Home" class="tip-bottom"><i
class="icon-home"></i> Home</a> <a href="#" class="current">Tables</a>
</div>
<div class="container-fluid">
<div class="widget-box">
<div class="widget-title">
<h5>Dynamic table</h5>
</div>
<div class="widget-content nopadding">
<div class="widget-title" style="height: 53px;">
<div>
<div class="form-inline" role="form" id="inBoxQueryDiv"
style=" margin-top: 12px;margin-left: 25px;float: left;">
<div class="input-group" style="float: left;">
<span class="input-group-addon">IP:</span>
<input type="text" id="" class="form-control" placeholder=""/>
</div>
<div class="input-group" style="float: left;">
<span class="input-group-addon">IP:</span>
<input type="text" id="" class="form-control" placeholder=""/>
</div>
<button id="submit" class="btn btn-default">搜索</button>
</div>
<button id="addBtn" class="btn btn-primary" style="margin-top: 12px;margin-left: 900px;">新增</button>
</div>
</div>
<div id="table">
</div>
</div>
</div>
</div>
<script>
$(function () {
var data = [];
for (var i = 0; i < 20; i++) {
data.push({
userId: i,
userName: "用户" + i,
status: i % 3 == 0 ? 0 : 1
});
}
$("#table").table({
striped: true,
panelClass: "panel-success",
pagination: true,
columns: [{
title: "用户id",
field: "userId"
}, {
title: "用户名称",
field: "userName"
}, {
title: "状态",
field: "status"
}],
data: data
});
});
</script>
... ...
... ... @@ -28,7 +28,7 @@
</div>
<button id="submit" class="btn btn-default">搜索</button>
</div>
<button id="addBtn" class="btn btn-primary" style="margin-top: 12px;margin-left: 900px;">新增</button>
<button id="addHostInfoBtn" class="btn btn-primary" style="margin-top: 12px;margin-left: 900px;">新增</button>
</div>
</div>
<div id="hostInfoTable">
... ... @@ -87,6 +87,7 @@
width : "15%"
}]
});
});
</script>
 
\ No newline at end of file
... ...