LigerUI的系统主界面
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
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
>
<
base
href="<%=basePath%>">
<
script
src="<%=path%>/backui/jquery/jquery-1.3.2.min.js" type="text/javascript"></
script
>
<
link
href="<%=path%>/backui/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css"/>
<
script
src="<%=path%>/backui/ligerUI/js/ligerui.all.js" type="text/javascript"></
script
>
<
script
src="<%=path%>/backui/json2.js" type="text/javascript"></
script
>
<
script
type
=
"text/javascript"
>
var mytab;
function addtab(id, atext, aurl) {
if (!mytab) return;
mytab.addTabItem({tabid: id, text: atext, url: aurl})
}
// var height = $(".l-layout-center").height();
$(function () {
$("#main").ligerLayout({topHeight: 40, leftWidth: 240});
// alert(height);
// $("#left").ligerAccordion({height: height});
var data = [];
data.push({ id: 1, pid: 0, text: '1' });
data.push({ id: 2, pid: 1, text: '1.1' });
data.push({url: 'top.html', id: 4, pid: 2, text: '第一个页面' });
data.push({url: 'top.html', id: 5, pid: 2, text: '第二个页面' });
data.push({url: 'http://www.baidu.com', id: 10, pid: 8, text: 'wefwfwfe' })
var tree1 = $("#tree1").ligerTree({
data: data,
checkbox: false,
slide: false,
textFieldName: 'text',
idFieldName: 'id',
parentIDFieldName: 'pid',
onSelect: function (node) {
if (!node.data.url) return;
var tabid = $(node.target).attr("tabid");
if (!tabid) {
tabid = new Date().getTime();
$(node.target).attr("tabid", tabid)
}
f_addTab(tabid, node.data.text, node.data.url);
}
});
mytab = $("#home").ligerTab({
width: "100%", height: "100%",
showSwitchInTab: true,
showSwitch: true,
dblClickToClose: true,
dragToMove: true,
contextmenu: true });
function f_addTab(tabid, text, url) {
mytab.addTabItem({
tabid: tabid,
text: text,
url: url,
callback: function () {
// addFrameSkinLink(tabid);
}
});
}
function onSelect(note) {
alert('onSelect:' + note.data.text);
}
})
</
script
>
</
head
>
<
body
style
=
"padding:2px; overflow: hidden;"
>
<
div
id
=
"main"
>
<
div
position
=
"top"
><
h2
>后台管理</
h2
></
div
>
<
div
position
=
"left"
>
<
ul
id
=
"tree1"
style
=
"margin-top:3px;"
/>
</
div
>
<
div
id
=
"home"
position
=
"center"
>
<
div
tabid
=
"a1"
title
=
"首页"
>
<
iframe
src
=
"http://www.baidu.com"
frameborder
=
"0"
width
=
"100%"
></
iframe
>
</
div
>
</
div
>
</
div
>
</
body
>
</
html
>
|
本文转自 leizhimin 51CTO博客,原文链接:http://blog.51cto.com/lavasoft/1407359,如需转载请自行联系原作者