ajaxgetdropmenu.html.php 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php js::set('programID', $programID);?>
  2. <?php js::set('module', $module);?>
  3. <?php js::set('method', $method);?>
  4. <?php
  5. foreach($programs as $program) $programNames[] = $program->name;
  6. $programsPinYin = common::convert2Pinyin($programNames);
  7. ?>
  8. <div class="table-row">
  9. <div class="table-col col-left">
  10. <div class='list-group'>
  11. <?php
  12. echo $this->program->getTreeMenu(0, 'program', '', $module, $method);
  13. ?>
  14. </div>
  15. <div class="col-footer">
  16. <div class='pull-right'>
  17. <?php echo html::checkbox('showClosed', array('1' => $lang->program->showClosed), '', $this->cookie->showClosed ? 'checked=checked' : '');?>
  18. </div>
  19. </div>
  20. </div>
  21. </div>
  22. <style>
  23. .tree li.has-list.open:before {border-left: none;}
  24. #programTree li {padding: 0 0 0 8px;}
  25. #programTree li.has-list {padding-left: 20px;}
  26. #programTree li > a {display: block; padding: 6px 0; border-radius: 2px; padding-left: 6px; height: 30px;}
  27. #programTree li > a > span {display: inline-block;}
  28. #programTree li > a > span + span {margin-left: 8px;}
  29. #programTree li.selected > a {background-color: #E8F3FC;}
  30. #programTree li.selected > a > span.title {color: #006AF1;}
  31. #programTree .label-id {border-color: #cbd0db; color: #7d8599}
  32. #programTree .label.label-type {background: #fff; border: 1px solid #7d8599; color:#7d8599}
  33. #programTree li > a > span.title {color: #3C4353; white-space: nowrap; max-width: 60%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;}
  34. #programTree li > a > span.user {color: #838a9d;}
  35. #programTree li > a > span.user > .icon-person {font-size: 14px; position: relative; top: -1px; color: #a6aab8}
  36. #programTree li > a:first-child {padding-left: 18px;}
  37. #programTree li > .list-toggle {transform: rotate(0deg); width: 16px; height: 16px; border: 4px solid #a6aab8; border-radius: 2px; top: 7px;}
  38. #programTree li > .list-toggle:before {content: ' '; display: block; position: absolute; border: 1px solid #a6aab8; top: 2px; left: -3px; right: -3px; bottom: 2px; min-width: 0; transition: all .2s;}
  39. #programTree li > .list-toggle:hover:before,
  40. #programTree li > .list-toggle:hover {border-color: #006AF1;}
  41. #programTree li.open > .list-toggle {width: 12px; height: 12px; top: 9px; background-color: #a6aab8; border-width: 3px; left: 3px;}
  42. #programTree li.open > .list-toggle:before {border: none; height: 2px; width: 6px; left: 0; top: 2px; background: #fff;}
  43. #programTree li.open > .list-toggle:hover {background: #006AF1;}
  44. #programTree ul > li:after {display: block; position: absolute; content: ' '; border-top: 1px dashed #cbd0db; top: 14px; left: -12px; z-index: 1; width: 10px;}
  45. #programTree ul > li:before,
  46. #programTree ul > li.has-list:before {background: none; content: ' '; display: block; position: absolute; width: auto; height: auto; border: none; border-left: 1px dashed #cbd0db; top: -13px; bottom: 12px; left: -12px;}
  47. #programTree ul > li:last-child:before {bottom: auto; height: 29px;}
  48. #programTree ul > li:first-child:before {top: -9px;}
  49. #programTree ul > li.has-list:first-child:before {top: -13px;}
  50. #programTree ul > li.tree-single-item:before {height: 23px;}
  51. #programTree ul > li.has-list:after {width: 14px;}
  52. #programTree ul > li.item-meas a.selected{color: #0c64eb;}
  53. #showClosed1 + label{color: #3c4353}
  54. a.programName:focus, a.programName:hover {background: #0c64eb; color: #fff !important;}
  55. </style>
  56. <script>
  57. $('#programTree').tree();
  58. $(function()
  59. {
  60. $("input[name^='showClosed']").change(function()
  61. {
  62. var showClosed = $(this).is(':checked') ? 1 : 0;
  63. $.cookie('showClosed', showClosed, {expires:config.cookieLife, path:config.webRoot});
  64. $("#dropMenu > .list-group").load(createLink('program', 'ajaxgetdropmenu', 'programID=' + programID + '&module=' + module + '&method=' + method));
  65. });
  66. });
  67. </script>