df7155a58a09d35fe6b12c546fe7f68c38f774bf.svn-base 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%
  3. String path = request.getContextPath();
  4. %>
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  6. <html xmlns="http://www.w3.org/1999/xhtml">
  7. <head>
  8. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  9. <title>基本表格模板</title>
  10. <!--框架必需start-->
  11. <script type="text/javascript" src="<%=path%>/libs/js/jquery.js"></script>
  12. <script type="text/javascript" src="<%=path%>/libs/js/language/cn.js"></script>
  13. <script type="text/javascript" src="<%=path%>/libs/js/framework.js"></script>
  14. <link href="<%=path%>/libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
  15. <link rel="stylesheet" type="text/css" id="skin" prePath="<%=path%>/" scrollerY="false"/>
  16. <link rel="stylesheet" type="text/css" id="customSkin"/>
  17. <!--框架必需end-->
  18. <!--树组件start -->
  19. <script type="text/javascript" src="<%=path%>/libs/js/tree/ztree/ztree.js"></script>
  20. <link href="<%=path%>/libs/js/tree/ztree/ztree.css" rel="stylesheet" type="text/css"/>
  21. <!--树组件end -->
  22. <!-- 树形双选器start -->
  23. <script type="text/javascript" src="<%=path%>/libs/js/form/listerTree.js"></script>
  24. <!-- 树形双选器end -->
  25. </head>
  26. <body>
  27. <table width="100%" >
  28. <tr>
  29. <!--左侧区域start-->
  30. <td class="ver01" >
  31. <div class="box2" overflow="auto" showStatus="false" panelTitle="角色列表">
  32. <div id="cusBoxContent1" style="width:150px;">
  33. <ul id="tree-1" class="ztree"></ul>
  34. </div>
  35. </div>
  36. </td>
  37. <!--左侧区域end-->
  38. <!--右侧区域start-->
  39. <td width="100%" class="ver01" >
  40. <div class="box2" panelTitle="为角色分配资源" showStatus="false">
  41. <div id="cusBoxContent2" >
  42. <form>
  43. <table width="500">
  44. <tr><td>
  45. <div class="listerTree" id="listerTree1" fromTitle="未选资源" toTitle="已选资源" listerHeight="300"></div>
  46. </td></tr>
  47. <tr><td class="ali02"><input type="button" value="确定"/>&nbsp;<input type="reset" value="重置" onclick="resetForm()"/></td></tr>
  48. </table>
  49. </form>
  50. </div>
  51. </div>
  52. </td>
  53. <!--右侧区域end-->
  54. </tr>
  55. </table>
  56. <script type="text/javascript">
  57. //选择的树节点
  58. var selectTreeNode = null;
  59. var nodes1 = [
  60. { id:1, parentId:0, name:"角色列表", open: true,icon:"<%=path%>/libs/icons/list.gif"},
  61. { id:11, parentId:1, name:"公司总经理",icon:"<%=path%>/libs/icons/star.gif"},
  62. { id:12, parentId:1, name:"产品经理",icon:"<%=path%>/libs/icons/star.gif"},
  63. { id:13, parentId:1, name:"项目经理",icon:"<%=path%>/libs/icons/star.gif"},
  64. { id:14, parentId:1, name:"办公室主任",icon:"<%=path%>/libs/icons/star.gif"},
  65. { id:15, parentId:1, name:"测试人员",icon:"<%=path%>/libs/icons/star.gif"},
  66. { id:16, parentId:1, name:"程序开发人员",icon:"<%=path%>/libs/icons/star.gif"},
  67. { id:17, parentId:1, name:"界面设计师",icon:"<%=path%>/libs/icons/star.gif"},
  68. { id:18, parentId:1, name:"前台",icon:"<%=path%>/libs/icons/star.gif"}
  69. ];
  70. var selectData ={"fromList":[
  71. { id:1, parentId:0, name:"栏目1", open: true,"oldParentId":"null","drag":"false",icon:"<%=path%>/libs/icons/list.gif"},
  72. { id:11, parentId:1, name:"资源1","oldParentId":"1",icon:"<%=path%>/libs/icons/mark.gif"},
  73. { id:12, parentId:1, name:"资源2","oldParentId":"1",icon:"<%=path%>/libs/icons/mark.gif"},
  74. { id:13, parentId:1, name:"资源3","oldParentId":"1",icon:"<%=path%>/libs/icons/mark.gif"},
  75. { id:2, parentId:0, name:"栏目2", open: true,"oldParentId":"null","drag":"false",icon:"<%=path%>/libs/icons/list.gif"},
  76. { id:21, parentId:2, name:"资源4","oldParentId":"2",icon:"<%=path%>/libs/icons/mark.gif"},
  77. { id:22, parentId:2, name:"资源5","oldParentId":"2",icon:"<%=path%>/libs/icons/mark.gif"},
  78. { id:23, parentId:2, name:"资源6","oldParentId":"2",icon:"<%=path%>/libs/icons/mark.gif"}
  79. ],"toList":[]};
  80. function initComplete(){
  81. //初始化tree
  82. $.fn.zTree.init($("#tree-1"), {}, nodes1);
  83. $("#listerTree1").data("data",selectData);
  84. $("#listerTree1").render();
  85. }
  86. function resetForm(){
  87. $("#listerTree1").render();
  88. }
  89. //高度处理
  90. function customHeightSet(contentHeight){
  91. $("#cusBoxContent1").height(contentHeight-55)
  92. $("#cusBoxContent2").height(contentHeight-55)
  93. }
  94. </script>
  95. </body>
  96. </html>