d743f73938cffdfc0a1f2a0cc4c1a31f181e9f47.svn-base 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  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. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5. <title></title>
  6. <!--框架必需start-->
  7. <script type="text/javascript" src="../../libs/js/jquery.js"></script>
  8. <script type="text/javascript" src="../../libs/js/language/cn.js"></script>
  9. <script type="text/javascript" src="../../libs/js/framework.js"></script>
  10. <link href="../../libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
  11. <link rel="stylesheet" type="text/css" id="skin" prePath="../../"/>
  12. <link rel="stylesheet" type="text/css" id="customSkin"/>
  13. <!--框架必需end-->
  14. <!-- 条件过滤器3 start -->
  15. <script type="text/javascript" src="../../libs/js/form/conditionNav.js"></script>
  16. <!-- 条件过滤器3 end -->
  17. </head>
  18. <body>
  19. <script>
  20. var conditionData={"list":[
  21. {"name":"按属性","id":1,"list":[
  22. {"key":"正片","value":"11"},{"key":"连载","value":"12"},{"key":"完结","value":"13"},{"key":"短片","value":"14"}
  23. ]},
  24. {"name":"按年龄","id":2,"list":[
  25. {"key":"全部","value":"21"},{"key":"6岁以下","value":"22"},{"key":"6-12岁","value":"23"},{"key":"12-18岁","value":"24"},{"key":"18岁以上","value":"25"}
  26. ]}
  27. ]};
  28. var conditionData2={"list":[
  29. {"name":"按属性","id":1,"list":[
  30. {"key":"正片","value":"11"},{"key":"连载","value":"12"},{"key":"完结","value":"13"},{"key":"短片","value":"14"}
  31. ]},
  32. {"name":"按年龄","id":2,"list":[
  33. {"key":"全部","value":"21"},{"key":"6岁以下","value":"22"},{"key":"6-12岁","value":"23"},{"key":"12-18岁","value":"24"},{"key":"18岁以上","value":"25"}
  34. ]},
  35. {"name":"按类型","id":3,"height":150,"maxWidth":490,"list":[
  36. {"key":"全部","value":"31"},{"key":"战斗","value":"32"},{"key":"热血","value":"33"},{"key":"冒险","value":"34"},{"key":"励志 ","value":"35"},{"key":"英雄 ","value":"36"},{"key":"后宫 ","value":"37"},{"key":"百合 ","value":"38"},{"key":"耽美 ","value":"39"},{"key":"魔法 ","value":"310"},
  37. {"key":"奇幻 ","value":"311"},{"key":"搞笑 ","value":"312"},{"key":"恋爱 ","value":"313"},{"key":"校园 ","value":"314"},{"key":"宠物 ","value":"315"},{"key":"日常 ","value":"316"},{"key":"童话 ","value":"317"},{"key":"惊悚","value":"318"},{"key":"竞技","value":"319"},{"key":"都市","value":"320"},
  38. {"key":"动作","value":"321"},{"key":"科幻","value":"322"},{"key":"治愈","value":"323"},{"key":"教育","value":"324"},{"key":"怪物","value":"325"},{"key":"成人","value":"326"},{"key":"轻松","value":"327"},{"key":"神话","value":"328"},{"key":"生活","value":"329"},{"key":"益智","value":"330"},
  39. {"key":"机战","value":"331"},{"key":"运动","value":"332"},{"key":"神魔","value":"333"},{"key":"真人","value":"334"},{"key":"魔幻","value":"335"},{"key":"LOLI","value":"336"},{"key":"女性向","value":"337"},{"key":"美少女","value":"338"},{"key":"男性向","value":"339"},{"key":"悬疑推理","value":"340"}
  40. ]}
  41. ]};
  42. $(function(){
  43. $("#condition-1").data("data",conditionData);
  44. $("#condition-1").render();
  45. $("#condition-1").bind("change",function(e,values){
  46. $("#condition-1-value").val(values);
  47. })
  48. $("#condition-2").data("data",conditionData);
  49. $("#condition-2").render();
  50. $("#condition-2").bind("change",function(e,values){
  51. $("#condition-2-value").val(values);
  52. })
  53. $("#condition-3").data("data",conditionData2);
  54. $("#condition-3").render();
  55. $("#condition-3").bind("change",function(e,values){
  56. $("#condition-3-value").val(values);
  57. })
  58. $("#condition-4").data("data",conditionData);
  59. $("#condition-4").render();
  60. $("#condition-5").data("data",conditionData);
  61. $("#condition-5").render();
  62. //用cookies模拟前后台传值
  63. var cookValue=jQuery.jCookie('conditionNav');
  64. if(cookValue!=false){
  65. $("#condition-6").attr("selectedValue",cookValue.toString());
  66. }
  67. $("#condition-6").data("data",conditionData);
  68. $("#condition-6").render();
  69. $("#condition-6").bind("change",function(e,values){
  70. alert("这里将组件所有选中项:"+values+"项传入后台,通过location进行跳转,跳转后重设组件的selectedValue。这里用cookies模拟前后台传值。");
  71. //用cookies模拟前后台传值
  72. jQuery.jCookie('conditionNav',values);
  73. window.location.reload();
  74. })
  75. //用cookies模拟前后台传值
  76. var cookValue2=jQuery.jCookie('conditionNav2');
  77. if(cookValue2!=false){
  78. $("#condition-7").attr("selectedValue",cookValue2.toString());
  79. }
  80. $("#condition-7").data("data",conditionData);
  81. $("#condition-7").render();
  82. $("#condition-7").bind("change",function(e,values){
  83. alert("这里将组件所有选中项:"+values+"项传入后台,通过location进行跳转,跳转后重设组件的selectedValue。这里用cookies模拟前后台传值。");
  84. //用cookies模拟前后台传值
  85. jQuery.jCookie('conditionNav2',values);
  86. window.location.reload();
  87. })
  88. })
  89. </script>
  90. </head>
  91. <body >
  92. 单选模式:
  93. <table width="100%">
  94. <tr>
  95. <td style="vertical-align:top;">
  96. <div id="condition-1" class="conditionNav" conditionWidth="180" conditionTitle="标题" conditionTarget="conditionTarget01" itemWidth="50"></div>
  97. </td>
  98. <td style="vertical-align:top;width:100%;">
  99. <div class="conditionNavSelContent">
  100. <table>
  101. <tr>
  102. <td style="width:70px;">筛选条件:</td>
  103. <td >
  104. <ul class="conditionTarget" id="conditionTarget01"></ul>
  105. </td>
  106. </tr>
  107. </table>
  108. </div>
  109. 选中项:<br/>
  110. <textarea id="condition-1-value" style="width:90%;height:130px"></textarea>
  111. </td>
  112. </tr>
  113. </table>
  114. <br />
  115. <br />
  116. 多选模式:
  117. <table width="100%">
  118. <tr>
  119. <td style="vertical-align:top;">
  120. <div id="condition-2" class="conditionNav" conditionWidth="180" conditionTitle="标题" conditionTarget="conditionTarget02" itemWidth="50" multiMode="true"></div>
  121. </td>
  122. <td style="vertical-align:top;width:100%;">
  123. <div class="conditionNavSelContent">
  124. <table>
  125. <tr>
  126. <td style="width:70px;">筛选条件:</td>
  127. <td >
  128. <ul class="conditionTarget" id="conditionTarget02"></ul>
  129. </td>
  130. </tr>
  131. </table>
  132. </div>
  133. 选中项:<br/>
  134. <textarea id="condition-2-value" style="width:90%;height:130px"></textarea>
  135. </td>
  136. </tr>
  137. </table>
  138. <br />
  139. <br />
  140. 鼠标移入展开:
  141. <table width="100%">
  142. <tr>
  143. <td style="vertical-align:top;">
  144. <div id="condition-3" class="conditionNav" conditionWidth="180" conditionTitle="标题" conditionTarget="conditionTarget03" itemWidth="50"></div>
  145. </td>
  146. <td style="vertical-align:top;width:100%;">
  147. <div class="conditionNavSelContent">
  148. <table>
  149. <tr>
  150. <td style="width:70px;">筛选条件:</td>
  151. <td >
  152. <ul class="conditionTarget" id="conditionTarget03"></ul>
  153. </td>
  154. </tr>
  155. </table>
  156. </div>
  157. 选中项:<br/>
  158. <textarea id="condition-3-value" style="width:90%;height:130px"></textarea>
  159. </td>
  160. </tr>
  161. </table>
  162. <br />
  163. <br />
  164. 初始赋值(单选模式):
  165. <table width="100%">
  166. <tr>
  167. <td style="vertical-align:top;">
  168. <div id="condition-4" class="conditionNav" conditionWidth="180" conditionTitle="标题" conditionTarget="conditionTarget04" itemWidth="50" selectedValue="12,23"></div>
  169. </td>
  170. <td style="vertical-align:top;width:100%;">
  171. <div class="conditionNavSelContent">
  172. <table>
  173. <tr>
  174. <td style="width:70px;">筛选条件:</td>
  175. <td >
  176. <ul class="conditionTarget" id="conditionTarget04"></ul>
  177. </td>
  178. </tr>
  179. </table>
  180. </div>
  181. </td>
  182. </tr>
  183. </table>
  184. <br />
  185. <br />
  186. 初始赋值(多选模式):
  187. <table width="100%">
  188. <tr>
  189. <td style="vertical-align:top;">
  190. <div id="condition-5" class="conditionNav" conditionWidth="180" conditionTitle="标题" conditionTarget="conditionTarget05" itemWidth="50" multiMode="true" selectedValue="12,23,22,24"></div>
  191. </td>
  192. <td style="vertical-align:top;width:100%;">
  193. <div class="conditionNavSelContent">
  194. <table>
  195. <tr>
  196. <td style="width:70px;">筛选条件:</td>
  197. <td >
  198. <ul class="conditionTarget" id="conditionTarget05"></ul>
  199. </td>
  200. </tr>
  201. </table>
  202. </div>
  203. </td>
  204. </tr>
  205. </table>
  206. <br />
  207. <br />
  208. 同步模式(单选):
  209. <table width="100%">
  210. <tr>
  211. <td style="vertical-align:top;">
  212. <div id="condition-6" class="conditionNav" conditionWidth="180" conditionTitle="标题" conditionTarget="conditionTarget06" itemWidth="50" ajaxMode="false"></div>
  213. </td>
  214. <td style="vertical-align:top;width:100%;">
  215. <div class="conditionNavSelContent">
  216. <table>
  217. <tr>
  218. <td style="width:70px;">筛选条件:</td>
  219. <td >
  220. <ul class="conditionTarget" id="conditionTarget06"></ul>
  221. </td>
  222. </tr>
  223. </table>
  224. </div>
  225. </td>
  226. </tr>
  227. </table>
  228. <br />
  229. <br />
  230. 同步模式(多选):
  231. <table width="100%">
  232. <tr>
  233. <td style="vertical-align:top;">
  234. <div id="condition-7" class="conditionNav" conditionWidth="180" conditionTitle="标题" conditionTarget="conditionTarget07" itemWidth="50" ajaxMode="false" multiMode="true"></div>
  235. </td>
  236. <td style="vertical-align:top;width:100%;">
  237. <div class="conditionNavSelContent">
  238. <table>
  239. <tr>
  240. <td style="width:70px;">筛选条件:</td>
  241. <td >
  242. <ul class="conditionTarget" id="conditionTarget07"></ul>
  243. </td>
  244. </tr>
  245. </table>
  246. </div>
  247. </td>
  248. </tr>
  249. </table>
  250. </body>
  251. </html>