/tests/integration/collapsible/index.html

https://bitbucket.org/zachjarvinen/jquery-mobile · HTML · 348 lines · 296 code · 52 blank · 0 comment · 0 complexity · 45e6dccb3d80a4f16284906ffd114974 MD5 · raw file

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>jQuery Mobile Collapsible Integration Test</title>
  7. <script src="../../../external/requirejs/require.js"></script>
  8. <script src="../../../js/requirejs.config.js"></script>
  9. <script src="../../../js/jquery.tag.inserter.js"></script>
  10. <script src="../../jquery.setNameSpace.js"></script>
  11. <script src="../../jquery.testHelper.js"></script>
  12. <script src="../../../external/qunit.js"></script>
  13. <script>
  14. $.testHelper.asyncLoad([
  15. [
  16. "widgets/page",
  17. "widgets/collapsible",
  18. "widgets/collapsibleSet"
  19. ],
  20. [ "jquery.mobile.init" ],
  21. [
  22. "collapsible_core.js"
  23. ]
  24. ]);
  25. </script>
  26. <link rel="stylesheet" href="../../../css/themes/default/jquery.mobile.css" />
  27. <link rel="stylesheet" href="../../../external/qunit.css"/>
  28. <script src="../../swarminject.js"></script>
  29. </head>
  30. <body>
  31. <h1 id="qunit-header">jQuery Mobile Collapsible Integration Test</h1>
  32. <h2 id="qunit-banner"></h2>
  33. <h2 id="qunit-userAgent"></h2>
  34. <ol id="qunit-tests">
  35. </ol>
  36. <div data-nstest-role="page" id='basic-collapsible-test'>
  37. <div data-nstest-role="header">
  38. <h1>Basic collapsible</h1>
  39. </div>
  40. <div data-nstest-role="content">
  41. <div data-nstest-role="collapsible">
  42. <h3>Section A</h3>
  43. <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
  44. have the "collapsed" state; you need to expand the header to see me.</p>
  45. </div>
  46. <div data-nstest-role="collapsible" data-nstest-collapsed="false">
  47. <h3>Section B</h3>
  48. <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
  49. have the "collapsed" state; you need to expand the header to see me.</p>
  50. </div>
  51. </div>
  52. </div>
  53. <div data-nstest-role="page" id='basic-collapsible-set-test'>
  54. <div data-nstest-role="header">
  55. <h1>Basic collapsible</h1>
  56. </div>
  57. <div data-nstest-role="content">
  58. <div data-nstest-role="collapsible-set">
  59. <div data-nstest-role="collapsible">
  60. <h3>Section A</h3>
  61. <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
  62. have the "collapsed" state; you need to expand the header to see me.</p>
  63. </div>
  64. <div data-nstest-role="collapsible" data-nstest-collapsed="false">
  65. <h3>Section B</h3>
  66. <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
  67. have the "collapsed" state; you need to expand the header to see me.</p>
  68. </div>
  69. <div data-nstest-role="collapsible">
  70. <h3>Section C</h3>
  71. <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
  72. have the "collapsed" state; you need to expand the header to see me.</p>
  73. </div>
  74. </div>
  75. </div>
  76. </div>
  77. <div data-nstest-role="page" id='collapsible-set-with-lonely-collapsible-test'>
  78. <div data-nstest-role="header">
  79. <h1>Basic collapsible</h1>
  80. </div>
  81. <div data-nstest-role="content">
  82. <div data-nstest-role="collapsible-set">
  83. <div data-nstest-role="collapsible" >
  84. <h3>Section D</h3>
  85. <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
  86. have the "collapsed" state; you need to expand the header to see me.</p>
  87. </div>
  88. </div>
  89. <div data-nstest-role="collapsible" >
  90. <h3>Section E</h3>
  91. <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
  92. have the "collapsed" state; you need to expand the header to see me.</p>
  93. </div>
  94. </div>
  95. </div>
  96. <div data-nstest-role="page" id='collapsible-with-custom-icons'>
  97. <div data-nstest-role="header">
  98. <h1>Custom icons for collapsibles</h1>
  99. </div>
  100. <div data-nstest-role="content">
  101. <div data-nstest-role="collapsible">
  102. <h3>Section A</h3>
  103. <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
  104. have the "collapsed" state; you need to expand the header to see me.</p>
  105. </div>
  106. <div data-nstest-role="collapsible" data-nstest-collapsed="false">
  107. <h3>Section B</h3>
  108. <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
  109. have the "collapsed" state; you need to expand the header to see me.</p>
  110. </div>
  111. <div data-nstest-role="collapsible" data-nstest-collapsed-icon="arrow-r" data-nstest-expanded-icon="arrow-d">
  112. <h3>Section C</h3>
  113. <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
  114. have the "collapsed" state; you need to expand the header to see me.</p>
  115. </div>
  116. <div data-nstest-role="collapsible" data-nstest-collapsed-icon="arrow-r" data-nstest-expanded-icon="arrow-d" data-nstest-collapsed="false">
  117. <h3>Section D</h3>
  118. <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
  119. have the "collapsed" state; you need to expand the header to see me.</p>
  120. </div>
  121. <div data-nstest-role="collapsible" data-nstest-collapsed-icon="info" data-nstest-expanded-icon="info">
  122. <h3>Section E</h3>
  123. <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
  124. have the "collapsed" state; you need to expand the header to see me.</p>
  125. </div>
  126. </div>
  127. </div>
  128. <div data-nstest-role="page" id='collapsible-set-with-custom-icons'>
  129. <div data-nstest-role="header">
  130. <h1>Custom icons for collapsible sets</h1>
  131. </div>
  132. <div data-nstest-role="content">
  133. <div data-nstest-role="collapsible-set">
  134. <div data-nstest-role="collapsible">
  135. <h3>Section A</h3>
  136. <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
  137. have the "collapsed" state; you need to expand the header to see me.</p>
  138. </div>
  139. <div data-nstest-role="collapsible" data-nstest-collapsed="false">
  140. <h3>Section B</h3>
  141. <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
  142. have the "collapsed" state; you need to expand the header to see me.</p>
  143. </div>
  144. </div>
  145. <div data-nstest-role="collapsible-set" data-nstest-collapsed-icon="arrow-r" data-nstest-expanded-icon="arrow-d">
  146. <div data-nstest-role="collapsible">
  147. <h3>Section A</h3>
  148. <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
  149. have the "collapsed" state; you need to expand the header to see me.</p>
  150. </div>
  151. <div data-nstest-role="collapsible" data-nstest-collapsed="false">
  152. <h3>Section B</h3>
  153. <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
  154. have the "collapsed" state; you need to expand the header to see me.</p>
  155. </div>
  156. <div data-nstest-role="collapsible" data-nstest-collapsed-icon="arrow-l" data-nstest-expanded-icon="arrow-u">
  157. <h3>Section C</h3>
  158. <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
  159. have the "collapsed" state; you need to expand the header to see me.</p>
  160. </div>
  161. <div data-nstest-role="collapsible" data-nstest-collapsed-icon="arrow-l" data-nstest-expanded-icon="arrow-u" data-nstest-collapsed="false">
  162. <h3>Section D</h3>
  163. <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
  164. have the "collapsed" state; you need to expand the header to see me.</p>
  165. </div>
  166. </div>
  167. </div>
  168. </div>
  169. <div data-nstest-role="page" id='collapsible-with-theming'>
  170. <div data-nstest-role="header">
  171. <h1>Themed collapsibles</h1>
  172. </div>
  173. <div data-nstest-role="content">
  174. <div data-nstest-role="collapsible" data-nstest-theme="a">
  175. <h3>Section A</h3>
  176. <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
  177. have the "collapsed" state; you need to expand the header to see me.</p>
  178. </div>
  179. <div data-nstest-role="collapsible" data-nstest-theme="b" data-nstest-content-theme="b">
  180. <h3>Section B</h3>
  181. <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
  182. have the "collapsed" state; you need to expand the header to see me.</p>
  183. </div>
  184. <div data-nstest-role="collapsible" data-nstest-theme="c" data-nstest-content-theme="c" data-nstest-collapsed="false">
  185. <h3>Section B</h3>
  186. <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
  187. have the "collapsed" state; you need to expand the header to see me.</p>
  188. </div>
  189. </div>
  190. </div>
  191. <div data-nstest-role="page" id='collapsible-set-with-theming'>
  192. <div data-nstest-role="header">
  193. <h1>Themed collapsibles</h1>
  194. </div>
  195. <div data-nstest-role="content">
  196. <div data-nstest-role="collapsible-set" data-nstest-theme="b" data-nstest-content-theme="d">
  197. <div data-nstest-role="collapsible" data-nstest-theme="a">
  198. <h3>Section A</h3>
  199. <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
  200. have the "collapsed" state; you need to expand the header to see me.</p>
  201. </div>
  202. <div data-nstest-role="collapsible" data-nstest-theme="b" data-nstest-content-theme="b">
  203. <h3>Section B</h3>
  204. <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
  205. have the "collapsed" state; you need to expand the header to see me.</p>
  206. </div>
  207. <div data-nstest-role="collapsible" data-nstest-collapsed="false">
  208. <h3>Section C</h3>
  209. <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
  210. have the "collapsed" state; you need to expand the header to see me.</p>
  211. </div>
  212. <div data-nstest-role="collapsible">
  213. <h3>Section D</h3>
  214. <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
  215. have the "collapsed" state; you need to expand the header to see me.</p>
  216. </div>
  217. </div>
  218. </div>
  219. </div>
  220. <div data-nstest-role="page" id='collapsible-set-with-dynamic-content'>
  221. <div data-nstest-role="header">
  222. <h1>Collapsible Set with dynamic content</h1>
  223. </div>
  224. <div data-nstest-role="content">
  225. <div data-nstest-role="collapsible-set"></div>
  226. </div>
  227. </div>
  228. <div data-nstest-role="page" id='collapsible-set-with-static-and-dynamic-content'>
  229. <div data-nstest-role="header">
  230. <h1>Collapsible Set with dynamic content</h1>
  231. </div>
  232. <div data-nstest-role="content">
  233. <div data-nstest-role="collapsible-set">
  234. <div data-nstest-role="collapsible">
  235. <h3>Section A</h3>
  236. <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
  237. have the "collapsed" state; you need to expand the header to see me.</p>
  238. </div>
  239. </div>
  240. </div>
  241. </div>
  242. <div data-nstest-role="page" id="collapsible-set-with-last-collapsible-expanded">
  243. <div data-nstest-role="header">
  244. <h1>uncollapsed collapsible</h1>
  245. </div>
  246. <div data-nstest-role="content">
  247. <div data-nstest-role="collapsible-set">
  248. <div data-nstest-role="collapsible">
  249. <h1>Collapsible collapsed</h1>
  250. <ul data-nstest-role="listview" data-inset="true">
  251. <li data-nstest-theme="b">Swatch b</li>
  252. <li data-nstest-theme="d">Swatch d</li>
  253. </ul>
  254. </div>
  255. <div data-nstest-role="collapsible" data-nstest-collapsed="false" data-nstest-content-theme="e">
  256. <h1>Collapsible initial uncollapsed</h1>
  257. <ul data-nstest-role="listview" data-nstest-inset="true">
  258. <li data-nstest-theme="a">Swatch a</li>
  259. <li data-nstest-theme="b">Swatch b</li>
  260. </ul>
  261. </div>
  262. </div>
  263. </div>
  264. </div>
  265. <div data-nstest-role="page" id="collapsible-set-with-legends">
  266. <div data-nstest-role="header">
  267. <h1>Collapsible set with legends</h1>
  268. </div>
  269. <div data-nstest-role="content">
  270. <form data-nstest-role="collapsible-set">
  271. <fieldset data-nstest-role="collapsible">
  272. <legend>Legend</legend>
  273. <div data-nstest-role="controlgroup">
  274. <input type="checkbox" name="checkbox-1" id="checkbox-1" />
  275. <label for="checkbox-1">Checkbox</label>
  276. </div>
  277. </fieldset>
  278. <fieldset data-nstest-role="collapsible">
  279. <legend>Legend</legend>
  280. <div data-nstest-role="controlgroup">
  281. <input type="checkbox" name="checkbox-2" id="checkbox-2" />
  282. <label for="checkbox-2">Checkbox</label>
  283. </div>
  284. </fieldset>
  285. <fieldset data-nstest-role="collapsible">
  286. <legend>Legend</legend>
  287. <div data-nstest-role="controlgroup">
  288. <input type="checkbox" name="checkbox-3" id="checkbox-3" />
  289. <label for="checkbox-3">Checkbox</label>
  290. </div>
  291. </fieldset>
  292. </form>
  293. </div>
  294. </div>
  295. </body>
  296. </html>