win7.htm 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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. <title></title>
  5. <link href="../../lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  6. <script src="../../lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  7. <script src="../../lib/ligerUI/js/core/base.js" type="text/javascript"></script>
  8. <script src="../../lib/ligerUI/js/plugins/ligerDrag.js" type="text/javascript"></script>
  9. <script src="../../lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
  10. <script src="../../lib/ligerUI/js/plugins/ligerResizable.js" type="text/javascript"></script>
  11. <style type="text/css">
  12. .l-case-title
  13. {
  14. font-weight: bold;
  15. margin-top: 20px;
  16. margin-bottom: 20px;
  17. }
  18. body, html
  19. {
  20. width: 100%;
  21. height: 100%;
  22. }
  23. *
  24. {
  25. margin: 0;
  26. padding: 0;
  27. }
  28. #winlinks
  29. {
  30. position: absolute;
  31. left: 20px;
  32. top: 20px;
  33. width: 100%;
  34. }
  35. #winlinks ul
  36. {
  37. position: relative;
  38. }
  39. #winlinks li
  40. {
  41. width: 70px;
  42. cursor: pointer;
  43. height: 80px;
  44. position: absolute;
  45. z-index: 101;
  46. list-style: none;
  47. text-align: center;
  48. }
  49. #winlinks li img
  50. {
  51. width: 36px;
  52. height: 36px;
  53. }
  54. #winlinks li span
  55. {
  56. background: none repeat scroll 0 0 rgba(0, 0, 0, 0.3);
  57. border-radius: 10px 10px 10px 10px;
  58. display: block;
  59. font-size: 12px;
  60. margin-top: 1px;
  61. color: White;
  62. line-height: 18px;
  63. text-align: center;
  64. }
  65. #winlinks li.l-over div.bg
  66. {
  67. display: block;
  68. }
  69. #winlinks li div.bg
  70. {
  71. display: none;
  72. position: absolute;
  73. top: -2px;
  74. left: -2px;
  75. z-index: 0;
  76. width: 75px;
  77. height: 64px;
  78. -webkit-border-radius: 5px;
  79. -moz-border-radius: 5px;
  80. border-radius: 5px;
  81. background: #000;
  82. opacity: 0.1;
  83. filter: alpha(opacity=10);
  84. }
  85. .l-taskbar-task-icon
  86. {
  87. top: 3px; left: 6px; background-image:none;
  88. }
  89. .l-taskbar-task-content{ margin-left:30px;}
  90. .l-taskbar-task-icon img
  91. {
  92. width: 22px;
  93. height: 22px;
  94. }
  95. </style>
  96. </head>
  97. <body style="overflow: hidden; background: url(images/applebg.jpg) no-repeat center center;">
  98. <div id="winlinks">
  99. <ul>
  100. </ul>
  101. </div>
  102. </body>
  103. <script type="text/javascript">
  104. var LINKWIDTH = 90, LINKHEIGHT = 90, TASKBARHEIGHT = 43;
  105. var winlinksul = $("#winlinks ul");
  106. function f_open(url, title, icon) {
  107. var win = $.ligerDialog.open(
  108. { height: 500, url: url, width: 600, showMax: true, showToggle: true, showMin: true, isResize: true, modal: false, title: title, slide: false, buttons: [
  109. { text: '确定', onclick: function (item, Dialog, index) {
  110. win.hide();
  111. }
  112. }
  113. ]
  114. });
  115. var task = jQuery.ligerui.win.tasks[win.id];
  116. if (task) {
  117. $(".l-taskbar-task-icon:first", task).html('<img src="' + icon + '" />');
  118. }
  119. return win;
  120. }
  121. var links = [
  122. { icon: 'images/3DSMAX.png', title: '填写周报', url: '../case/week.htm' },
  123. { icon: 'images/3DSMAX.png', title: 'treegrid', url: '../grid/treegrid/treegrid.htm' },
  124. { icon: 'images/3DSMAX.png', title: '多表头', url: '../grid/mulheader/grid2.htm' },
  125. { icon: 'images/Program Files Folder.png', title: '固定列', url: '../grid/frozen/frozengrid.htm' },
  126. { icon: 'images/Program Files Folder.png', title: '可拖动', url: '../base/drag.htm' },
  127. { icon: 'images/Alien Folder.png', title: '树', url: '../tree/draggable.htm' },
  128. { icon: 'images/Xp-G5 006.png', title: '下拉框', url: '../comboBox/comboBoxGrid.htm' },
  129. { icon: 'images/Xp-G5 006.png', title: '下拉框', url: '../comboBox/comboBoxGrid.htm' },
  130. { icon: 'images/Alien Folder.png', title: 'layout', url: '../layout/layoutFullHeight.htm' },
  131. { icon: 'images/Alien Folder.png', title: 'menu', url: '../menu/menubar.htm' },
  132. { icon: 'images/Xp-G5 006.png', title: 'tab', url: '../tab/tabHtml.htm' },
  133. { icon: 'images/3DSMAX.png', title: '分组', url: '../grid/groupable/checkbox.htm' }
  134. ];
  135. function onResize() {
  136. var linksHeight = $(window).height() - TASKBARHEIGHT;
  137. var winlinks = $("#winlinks");
  138. winlinks.height(linksHeight);
  139. var colMaxNumber = parseInt(linksHeight / LINKHEIGHT);//一列最多显示几个快捷方式
  140. for (var i = 0, l = links.length; i < l; i++) {
  141. var link = links[i];
  142. var jlink = $("li[linkindex=" + i + "]", winlinks);
  143. var top = (i % colMaxNumber) * LINKHEIGHT, left = parseInt(i / colMaxNumber) * LINKWIDTH;
  144. if (isNaN(top) || isNaN(left)) continue;
  145. jlink.css({ top: top, left: left });
  146. }
  147. }
  148. function linksInit() {
  149. for (var i = 0, l = links.length; i < l; i++) {
  150. var link = links[i];
  151. var jlink;
  152. var jlink = $("<li></li>");
  153. jlink.attr("linkindex", i);
  154. jlink.append("<img src='" + link.icon + "' />");
  155. jlink.append("<span>" + link.title + "</span>");
  156. jlink.append("<div class='bg'></div>");
  157. jlink.hover(function () {
  158. $(this).addClass("l-over");
  159. }, function () {
  160. $(this).removeClass("l-over");
  161. }).click(function () {
  162. var linkindex = $(this).attr("linkindex");
  163. var link = links[linkindex];
  164. f_open(link.url, link.title, link.icon);
  165. });
  166. jlink.appendTo(winlinksul);
  167. }
  168. }
  169. $(window).resize(onResize);
  170. $.ligerui.win.removeTaskbar = function () { }; //不允许移除
  171. $.ligerui.win.createTaskbar(); //页面加载时创建任务栏
  172. linksInit();
  173. onResize();
  174. </script>
  175. </html>