menu_test.html 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <!DOCTYPE html>
  2. <html>
  3. <!--
  4. Copyright 2008 The Closure Library Authors. All Rights Reserved.
  5. Use of this source code is governed by the Apache License, Version 2.0.
  6. See the COPYING file for details.
  7. -->
  8. <!--
  9. @author nicksantos@google.com (Nick Santos)
  10. -->
  11. <head>
  12. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  13. <meta charset="UTF-8" />
  14. <title>
  15. Closure Unit Tests - goog.ui.Menu
  16. </title>
  17. <style type="text/css">
  18. .goog-menu {
  19. position: absolute;
  20. color: #aaa;
  21. }
  22. .goog-scrollable-menu {
  23. max-height:30px;
  24. overflow-y:auto;
  25. }
  26. </style>
  27. <script src="../base.js">
  28. </script>
  29. <script>
  30. goog.require('goog.ui.MenuTest');
  31. </script>
  32. </head>
  33. <body>
  34. <p>
  35. Here's a menu defined in markup:
  36. </p>
  37. <div id="demoMenu" class="goog-menu">
  38. <div id="menuItem1" class="goog-menuitem">
  39. Annual Report.pdf
  40. </div>
  41. <div id="menuItem2" class="goog-menuitem">
  42. Quarterly Update.pdf
  43. </div>
  44. <div id="menuItem3" class="goog-menuitem">
  45. Enemies List.txt
  46. </div>
  47. </div>
  48. <p>
  49. Here's a menu which has been rendered with an explicit content node:
  50. </p>
  51. <div id="complexMenu" class="goog-menu">
  52. <div style="border:1px solid black;">
  53. <div class="goog-menu-content">
  54. <div id="complexItem1" class="goog-menuitem">
  55. Drizzle
  56. </div>
  57. <div id="complexItem2" class="goog-menuitem">
  58. Rain
  59. </div>
  60. <div id="complexItem3" class="goog-menuitem">
  61. Deluge
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. <p>
  67. Here's a scrollable menu:
  68. </p>
  69. <div id="scrollableMenu" class="goog-menu goog-scrollable-menu">
  70. <div id="scrollableMenuItem1" class="goog-menuitem">
  71. Auk
  72. </div>
  73. <div id="scrollableMenuItem2" class="goog-menuitem">
  74. Bird
  75. </div>
  76. <div id="scrollableMenuItem3" class="goog-menuitem">
  77. Crow
  78. </div>
  79. <div id="scrollableMenuItem4" class="goog-menuitem">
  80. Duck
  81. </div>
  82. <div id="scrollableMenuItem5" class="goog-menuitem">
  83. Emu
  84. </div>
  85. </div>
  86. </body>
  87. </html>