leftMenu.html
684 Bytes
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
<!DOCTYPE html>
<div id="leftMenu">
</div>
<script>
$(function() {
$("#leftMenu").myTabs({
fit : true
});
$.post(contextPath + "/loginController/getLoginUserMenu.do", function(data) {
data = data.data;
for (var key in data) {
var div = $("<div>");
div.myAccordion({
fit : true,
rootPid : 0,
idField : "id",
pidField : "parent_id",
textField : "menu_name",
dataList : data[key],
onClickMenu : function(item, parent) {
addTab(item);
}
});
$("#leftMenu").myTabs("add", {
title : key,
content : div,
cache : true
});
}
$("#leftMenu").myTabs("select", 0);
});
})
</script>