-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
125 lines (110 loc) · 3.41 KB
/
index.html
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<!DOCTYPE html>
<html lang="zh_CN">
<head>
<meta charset="UTF-8">
<title>EASYUI ADMIN</title>
<link rel="stylesheet" type="text/css" href="easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="easyui/themes/icon.css">
<script type="text/javascript" src="easyui/jquery.min.js"></script>
<script type="text/javascript" src="easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="easyui/locale/easyui-lang-zh_CN.js"></script>
<style>
.header{
background: #2d3e50;
color: #fff;
direction: ltr;
}
.header .navbar{
margin-bottom: 0;
display: inline-block;
vertical-align: middle;
}
.header a,.header a:hover{
color: #fff;
line-height: 50px;
}
.header .content{
padding: 0.5em 4.5%;
}
.content{
padding: 2em;
padding-left: 5%;
padding-right: 5%;
max-width: 1230px;
margin: 0 auto;
}
.hmenu{width:900px;margin:0 auto;font-size:22px;margin-top:20px;}
.foot{text-align:center;font-size:12px;height:20px;padding:5px;}
.left{padding:10px;}
</style>
<script>
$(function(){
$('#menu').tree({
url: 'tree.json',
loadFilter: function(data){
if (data.d){
return data.d;
} else {
return data;
}
},
onClick: function(node){
// alert(node.url);
openTab(node);
// alert(node.attributes.url); // alert node text property when clicked
}
});
})
function openTab(node){
if(node.url==undefined){
return;
}
if($("#tabs").tabs("exists",node.text)){
$("#tabs").tabs("select",node.text);
}else{
var content="<iframe frameborder=0 scrolling='no' style='width:100%;height:100%' src='"+node.url+"'></iframe>"
$("#tabs").tabs("add",{
title:node.text,
iconCls:node.iconCls,
closable:true,
content:content
});
}
}
function collapseAll(){
$('#menu').tree('collapseAll');
}
function expandAll(){
$('#menu').tree('expandAll');
}
</script>
</head>
<body class="easyui-layout">
<div data-options="region:'north',border:false" style="height:100px;" class="header">
<div class="hmenu">
欢迎你,<a href="ss">Admin</a> <a href="ss">退出</a>
</div>
</div>
<div data-options="region:'south',split:true" >
<div class="foot"> © 2016 All Rights Reserved </div>
</div>
<div data-options="region:'center'">
<div class="easyui-layout" data-options="fit:true">
<div data-options="region:'west',collapsed:false" style="width:180px">
<div class="left">
<div>
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="collapseAll()" >折叠所有</a>
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="expandAll()" >展开所有</a>
</div>
<div id="menu"></div>
</div>
</div>
<div data-options="region:'center'" >
<div id="tabs" class="easyui-tabs" style="width:100%;height:100%">
<div title="主页" style="padding:10px;"><h3>hello</h3></div>
</div>
</div>
</div>
</div>
</body>
</html>