70806f1c7549bc97377b28cf3a42ed95165da97f.svn-base 4.0 KB

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