ajaxgetdropmenu.html.php 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**
  3. * The head switcher view file of repo module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
  6. * @license LGPL (http://www.gnu.org/licenses/lgpl.html)
  7. * @author Yidong Wang <yidong@cnezsoft.com>
  8. * @package repo
  9. * @version $Id$
  10. * @link https://www.zentao.net
  11. */
  12. ?>
  13. <style>
  14. #dropMenu .tree li {padding: 3px 0 0 10px;}
  15. #dropMenu .tree li.has-list.open:before {border-left: 0px;}
  16. #dropMenu .tree li > a {max-width: 100%; line-height: 20px; border-radius: 2px; padding-top: 5px;}
  17. #dropMenu .col-left {padding: 0;}
  18. #dropMenu .label {margin-left: 3px;}
  19. #dropMenu .hide-in-search {padding-left: 8px;}
  20. #dropMenu .hide-in-search .hidden {display: block !important; visibility: inherit !important;}
  21. #dropMenuRepo > div.table-row > div > div > ul > li > div {padding-left: 10px;}
  22. #dropMenu ul.tree-angles {margin-bottom: 0;}
  23. #dropMenu {margin: 0;}
  24. #dropMenu ul > li > ul > li > a:hover {color: white; background-color: #0c64eb; text-decoration: none;}
  25. #dropMenu .tree .has-list > ul > li {padding-top: 0;}
  26. .search-list .list-group {padding: 7px 10px;}
  27. #swapper li>div.hide-in-search>a:focus, #swapper li>div.hide-in-search>a:hover {color: #838a9d; cursor: default;}
  28. #dropMenu .label-type {margin: 1px 10px;}
  29. </style>
  30. <div class="table-row">
  31. <div class="table-col col-left">
  32. <div class="list-group" id="repoList">
  33. <ul class='tree tree-angles' data-ride='tree' data-idx='0'>
  34. <?php foreach($repoGroup as $groupName => $group):?>
  35. <?php if(empty($group)) continue;?>
  36. <li data-idx='$groupName' data-id='<?php echo $groupName?>' class='has-list open in'>
  37. <i class='list-toggle icon'></i>
  38. <div class='label-type'>
  39. <a class='text-muted not-list-item'><?php echo $groupName;?></a>
  40. </div>
  41. <ul data-idx='<?php echo $groupName;?>'>
  42. <?php foreach($group as $id => $repoName):?>
  43. <?php $isSelected = $id == $repoID ? 'selected' : '';?>
  44. <?php $repoName = trim($repoName);?>
  45. <li data-idx='<?php echo $repoName;?>' data-id='<?php echo $groupName . '-' . $repoName;?>'>
  46. <a href='<?php echo sprintf($link, $id);?>' id='<?php echo $groupName. '-' . $repoName?>' class='<?php echo $isSelected;?> text-ellipsis' title='<?php echo $repoName;?>' data-key='<?php echo $repoName;?>' data-app='<?php echo $this->app->tab;?>'><?php echo $repoName;?></a>
  47. </li>
  48. <?php endforeach;?>
  49. </ul>
  50. </li>
  51. <?php endforeach;?>
  52. </ul>
  53. </div>
  54. </div>
  55. </div>
  56. <script>
  57. $('.tree').tree();
  58. </script>