e57bfe2394a4e1620a3c658419c43bebc32b5bc0.svn-base 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%
  3. String path = request.getContextPath();
  4. %>
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  6. <html xmlns="http://www.w3.org/1999/xhtml">
  7. <head>
  8. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  9. <title></title>
  10. <!--框架必需start-->
  11. <script type="text/javascript" src="<%=path%>/libs/js/jquery.js"></script>
  12. <script type="text/javascript" src="<%=path%>/libs/js/language/cn.js"></script>
  13. <script type="text/javascript" src="<%=path%>/libs/js/framework.js"></script>
  14. <link href="<%=path%>/libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
  15. <link rel="stylesheet" type="text/css" id="skin" prePath="<%=path%>/"/>
  16. <link rel="stylesheet" type="text/css" id="customSkin"/>
  17. <!--框架必需end-->
  18. <script>
  19. $(function(){
  20. //自定义菜单1
  21. $(".popupMenu_custom_demo1").each(function(){
  22. $(this).hover(function(){
  23. $(this).find(".popupMenu_custom1").show();
  24. $(this).find(".popupMenu_custom1_delete").show();
  25. },function(){
  26. $(this).find(".popupMenu_custom1").hide();
  27. $(this).find(".popupMenu_custom1_delete").hide();
  28. })
  29. })
  30. //自定义菜单2
  31. $("#select2").change(function(){
  32. $(this).parents(".popupMenu_custom2_con").hide();
  33. var objSel1 = document.getElementById("select1");
  34. var objSel2 = document.getElementById("select2");
  35. $("#link_text").text(objSel1.options[objSel1.selectedIndex].text+objSel2.options[objSel2.selectedIndex].text);
  36. });
  37. })
  38. </script>
  39. <style>
  40. /*自定义菜单1*/
  41. .popupMenu_custom_demo1{
  42. position:relative;
  43. width:560px;
  44. }
  45. .popupMenu_custom1{
  46. position:absolute;
  47. top:10px;
  48. right:32px;
  49. width:18px;
  50. display:none;
  51. }
  52. .popupMenu_custom1_link a{
  53. background-image: url(<%=path%>/libs/images/demo/dropmenu-button.png);
  54. background-repeat: no-repeat;
  55. width:18px;
  56. height:18x;
  57. display:block;
  58. text-indent:-1000px;
  59. }
  60. .popupMenu_custom1_link a:hover{
  61. background-image: url(<%=path%>/libs/images/demo/dropmenu-button2.png);
  62. }
  63. .popupMenu_custom1_delete{
  64. position:absolute;
  65. top:10px;
  66. right:10px;
  67. display:none;
  68. }
  69. .popupMenu_custom1_delete a{
  70. background-image: url(<%=path%>/libs/images/demo/close-button.png);
  71. background-repeat: no-repeat;
  72. width:18px;
  73. height:18x;
  74. display:block;
  75. text-indent:-1000px;
  76. }
  77. .popupMenu_custom1_delete a:hover{
  78. background-image: url(<%=path%>/libs/images/demo/close-button2.png);
  79. }
  80. .popupMenu_custom1_con{
  81. right:0px!important;
  82. }
  83. /*自定义菜单1*/
  84. /*自定义菜单2*/
  85. .popupMenu_custom2_link_text{
  86. background-image: url(<%=path%>/libs/images/demo/arrow.jpg);
  87. background-repeat: no-repeat;
  88. background-position:100% 0%;
  89. padding:0 0 0 5px;
  90. height:23px;
  91. line-height:23px;
  92. border:solid 1px #cccccc;
  93. width:100px!important;
  94. }
  95. .popupMenu_custom2_con{
  96. border:solid 1px #cccccc;
  97. background-color:white;
  98. padding:6px;
  99. }
  100. .popupMenu_custom2_con select{
  101. width:150px;
  102. }
  103. /*自定义菜单2*/
  104. </style>
  105. </head>
  106. <body>
  107. <div class="box1" panelWidth="800">
  108. <fieldset>
  109. <legend>1、白色背景模式</legend>
  110. 菜单链接默认宽度为50像素,菜单项默认100像素。
  111. <div class="popupMenu">
  112. <div class="popupMenu_link">
  113. <a href="javascript:;">选择</a>
  114. </div>
  115. <div class="popupMenu_con white_con">
  116. <a href="javascript:;"><span>状态</span></a>
  117. <a href="javascript:;"><span>相册</span></a>
  118. <a href="javascript:;"><span>分享</span></a>
  119. <a href="javascript:;"><span>日志</span></a>
  120. </div>
  121. </div>
  122. </fieldset>
  123. <div style="height:100px;"></div>
  124. <fieldset>
  125. <legend>2、自定义尺寸</legend>
  126. 可通过style自定义宽度。通过class添加边框和箭头。
  127. <div class="popupMenu" style="width:92px;">
  128. <div class="popupMenu_link arrow border white_bg">
  129. <a href="javascript:;">全部操作</a>
  130. </div>
  131. <div class="popupMenu_con white_con" style="width:90px;">
  132. <a href="javascript:;"><span>查看</span></a>
  133. <a href="javascript:;"><span>修改</span></a>
  134. <a href="javascript:;"><span>删除</span></a>
  135. <a href="javascript:;"><span>保存</span></a>
  136. </div>
  137. </div>
  138. </fieldset>
  139. <div style="height:100px;"></div>
  140. <fieldset>
  141. <legend>3、图片背景模式</legend>
  142. <div class="popupMenu">
  143. <div class="popupMenu_link">
  144. <a href="javascript:;">选择</a>
  145. </div>
  146. <div class="popupMenu_con pic_con">
  147. <a href="javascript:;"><span>状态</span></a>
  148. <a href="javascript:;"><span>相册</span></a>
  149. <a href="javascript:;"><span>分享</span></a>
  150. <a href="javascript:;"><span>日志</span></a>
  151. </div>
  152. </div>
  153. </fieldset>
  154. <div style="height:100px;"></div>
  155. <fieldset>
  156. <legend>4、图标模式</legend>
  157. <div class="popupMenu">
  158. <div class="popupMenu_link">
  159. <a href="javascript:;">操作</a>
  160. </div>
  161. <div class="popupMenu_con icon_con">
  162. <a href="javascript:;"><span class="icon_add">新增</span></a>
  163. <a href="javascript:;"><span class="icon_edit">修改</span></a></a>
  164. <a href="javascript:;"><span class="icon_delete">删除</span></a></a>
  165. <a href="javascript:;"><span class="icon_view">查看</span></a></a>
  166. </div>
  167. </div>
  168. </fieldset>
  169. <div style="height:100px;"></div>
  170. <fieldset>
  171. <legend>5、多列模式</legend>
  172. <div class="popupMenu">
  173. <div class="popupMenu_link">
  174. <a href="javascript:;">操作</a>
  175. </div>
  176. <div class="popupMenu_con multi_con">
  177. <div class="column">
  178. <h3>分类1</h3>
  179. <ul>
  180. <li><a href="javascript:;">选项1</a></li>
  181. <li><a href="javascript:;">选项2</a></li>
  182. <li><a href="javascript:;">选项3</a></li>
  183. <li><a href="javascript:;">选项4</a></li>
  184. </ul>
  185. </div>
  186. <div class="column">
  187. <h3>分类2</h3>
  188. <ul>
  189. <li><a href="javascript:;">选项1</a></li>
  190. <li><a href="javascript:;">选项2</a></li>
  191. <li><a href="javascript:;">选项3</a></li>
  192. <li><a href="javascript:;">选项4</a></li>
  193. </ul>
  194. </div>
  195. <div class="column">
  196. <h3>分类3</h3>
  197. <ul>
  198. <li><a href="javascript:;">选项1</a></li>
  199. <li><a href="javascript:;">选项2</a></li>
  200. <li><a href="javascript:;">选项3</a></li>
  201. <li><a href="javascript:;">选项4</a></li>
  202. </ul>
  203. </div>
  204. <div class="clear"></div>
  205. <div class="column">
  206. <h3>分类4</h3>
  207. <ul>
  208. <li><a href="javascript:;">选项1</a></li>
  209. <li><a href="javascript:;">选项2</a></li>
  210. <li><a href="javascript:;">选项3</a></li>
  211. <li><a href="javascript:;">选项4</a></li>
  212. </ul>
  213. </div>
  214. <div class="column">
  215. <h3>分类5</h3>
  216. <ul>
  217. <li><a href="javascript:;">选项1</a></li>
  218. <li><a href="javascript:;">选项2</a></li>
  219. <li><a href="javascript:;">选项3</a></li>
  220. <li><a href="javascript:;">选项4</a></li>
  221. </ul>
  222. </div>
  223. <div class="column">
  224. <h3>分类6</h3>
  225. <ul>
  226. <li><a href="javascript:;">选项1</a></li>
  227. <li><a href="javascript:;">选项2</a></li>
  228. <li><a href="javascript:;">选项3</a></li>
  229. <li><a href="javascript:;">选项4</a></li>
  230. </ul>
  231. </div>
  232. </div>
  233. </div>
  234. </fieldset>
  235. <div style="height:350px;"></div>
  236. <fieldset>
  237. <legend>6、自定义菜单示例(仿人人网)</legend>
  238. <div class="popupMenu_custom_demo1">
  239. <img src="<%=path%>/libs/images/demo/1.jpg"/>
  240. <div class="popupMenu popupMenu_custom1">
  241. <div class="popupMenu_link popupMenu_custom1_link">
  242. <a href="javascript:;">选择</a>
  243. </div>
  244. <div class="popupMenu_con white_con popupMenu_custom1_con">
  245. <a href="javascript:;"><span>关注XXX</span></a>
  246. <a href="javascript:;"><span>忽略XXX</span></a>
  247. </div>
  248. </div>
  249. <div class="popupMenu_custom1_delete"><a href="javascript:;">删除</a></div>
  250. </div>
  251. <div class="popupMenu_custom_demo1">
  252. <img src="<%=path%>/libs/images/demo/2.jpg"/>
  253. <div class="popupMenu popupMenu_custom1">
  254. <div class="popupMenu_link popupMenu_custom1_link">
  255. <a href="javascript:;">选择</a>
  256. </div>
  257. <div class="popupMenu_con white_con popupMenu_custom1_con">
  258. <a href="javascript:;"><span>关注XXX</span></a>
  259. <a href="javascript:;"><span>忽略XXX</span></a>
  260. </div>
  261. </div>
  262. <div class="popupMenu_custom1_delete"><a href="javascript:;">删除</a></div>
  263. </div>
  264. </fieldset>
  265. <div class="height_50"></div>
  266. <fieldset>
  267. <legend>7、自定义菜单示例(仿京东网)</legend>
  268. <div class="popupMenu">
  269. <div class="popupMenu_link popupMenu_custom2_link">
  270. <div class="popupMenu_custom2_link_text" id="link_text">请选择城市</div>
  271. </div>
  272. <div class="popupMenu_con popupMenu_custom2_con">
  273. <table>
  274. <tr>
  275. <td>
  276. <select id="select1" keepDefaultStyle="true" size="10"><option value="">--请选择--</option><option value="1">北京</option><option value="2">上海</option><option value="3">天津</option><option value="4">重庆</option><option value="5">河北</option><option value="6">山西</option><option value="7">河南</option><option value="8">辽宁</option><option value="9">吉林</option><option value="10">黑龙江</option><option value="11">内蒙古</option><option value="12">江苏</option><option value="13">山东</option><option value="14">安徽</option><option value="15">浙江</option><option value="16">福建</option><option value="17">湖北</option><option value="18">湖南</option><option value="19">广东</option><option value="20">广西</option><option value="21">江西</option><option value="22">四川</option><option value="23">海南</option><option value="24">贵州</option><option value="25">云南</option><option value="26">西藏</option><option value="27">陕西</option><option value="28">甘肃</option><option value="29">青海</option><option value="30">宁夏</option><option value="31">新疆</option><option value="32">台湾</option><option value="42">香港</option><option value="43">澳门</option><option value="84">钓鱼岛</option></select>
  277. </td>
  278. <td>
  279. <select id="select2" keepDefaultStyle="true" size="10"><option value="">--请选择--</option><option title="朝阳区" value="72">朝阳区</option><option title="海淀区" value="2800">海淀区</option><option title="西城区" value="2801">西城区</option><option title="东城区" value="2802">东城区</option><option title="崇文区" value="2803">崇文区</option><option title="宣武区" value="2804">宣武区</option><option title="丰台区" value="2805">丰台区</option><option title="石景山区" value="2806">石景山区</option><option title="门头沟" value="2807">门头沟</option><option title="房山区" value="2808">房山区</option><option title="通州区" value="2809">通州区</option><option title="大兴区" value="2810">大兴区</option><option title="顺义区" value="2812">顺义区</option><option title="怀柔区" value="2814">怀柔区</option><option title="密云区" value="2816">密云区</option><option title="昌平区" value="2901">昌平区</option><option title="平谷区" value="2953">平谷区</option><option title="延庆县" value="3065">延庆县</option></select>
  280. </td>
  281. </tr>
  282. </table>
  283. </div>
  284. </div>
  285. <p>这里选择框的联动请自行实现。</p>
  286. </fieldset>
  287. <div style="height:200px;"></div>
  288. <fieldset>
  289. <legend>8、动态添加</legend>
  290. <input type="button" value="点击生成" id="testBtn" onclick="createMenu()"/>
  291. </fieldset>
  292. <br/>
  293. <br/>
  294. <br/>
  295. <br/>
  296. <br/>
  297. </div>
  298. <script>
  299. function createMenu(){
  300. var $menu=$('<div class="popupMenu" style="width:20px;">'+
  301. '<div class="popupMenu_link"><span class="img_add hand"></span><br />'+
  302. '<div class="popupMenu_con white_con">'+
  303. '<a href="javascript:;"><span>状态</span></a>'+
  304. '<a href="javascript:;"><span>相册</span></a>'+
  305. '</div></div>')
  306. $("#testBtn").after($menu);
  307. $menu.render();
  308. }
  309. </script>
  310. </body>
  311. </html>