/tests/unit/dialog/index.html

https://github.com/riju/jquery-mobile · HTML · 121 lines · 109 code · 12 blank · 0 comment · 0 complexity · 22a22341c71f4cc7c6a8efb5fa0cc1f5 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 Dialog Test Suite</title>
  7. <script src="../../../external/requirejs/require.js"></script>
  8. <script src="../../../js/jquery.tag.inserter.js"></script>
  9. <script>
  10. $(document).bind('mobileinit',function(){
  11. // Expect content to inherit this theme when not explicitly set
  12. $.mobile.page.prototype.options.contentTheme = "d";
  13. });
  14. </script>
  15. <script src="../jquery.setNameSpace.js"></script>
  16. <script src="../../jquery.testHelper.js"></script>
  17. <script src="../../../external/qunit.js"></script>
  18. <script>
  19. $.testHelper.asyncLoad([
  20. [
  21. "widgets/dialog",
  22. "widgets/page",
  23. "widgets/page.sections"
  24. ],
  25. [ "jquery.mobile.init" ],
  26. [
  27. "dialog_events.js"
  28. ]
  29. ]);
  30. </script>
  31. <link rel="stylesheet" href="../../../css/themes/default/jquery.mobile.css"/>
  32. <link rel="stylesheet" href="../../../external/qunit.css"/>
  33. <script src="../swarminject.js"></script>
  34. </head>
  35. <body>
  36. <h1 id="qunit-header">jQuery Mobile Dialog Test Suite</h1>
  37. <h2 id="qunit-banner"></h2>
  38. <h2 id="qunit-userAgent"></h2>
  39. <ol id="qunit-tests">
  40. </ol>
  41. <div id="mypage" data-nstest-role="page" data-nstest-theme="a">
  42. <a href="#foo-dialog" id="foo-dialog-link" data-nstest-role="button" data-nstest-inline="true" data-nstest-rel="dialog"></a>
  43. <a href="#close-btn-test" id="close-btn-test-link" data-nstest-role="button" data-nstest-inline="true" data-nstest-rel="dialog">Go</a>
  44. <a href="#dialog-a" id="link-a" data-nstest-role="button" data-nstest-inline="true" data-nstest-rel="dialog">no theme set</a>
  45. <a href="#dialog-b" id="link-b" data-nstest-role="button" data-nstest-inline="true" data-nstest-rel="dialog">data-theme set</a>
  46. <a href="#dialog-c" id="link-c" data-nstest-role="button" data-nstest-inline="true" data-nstest-rel="dialog">data-theme & data-nstest-overlay-theme set</a>
  47. </div>
  48. <div id="doubleCloseTestPage" data-nstest-role="page">
  49. <div data-nstest-role="content">
  50. <a id="doubleCloseDialogOpener" href="#foo-dialog" data-nstest-rel="dialog">Dialog</a>
  51. </div>
  52. </div>
  53. <div id="foo-dialog" data-nstest-role="dialog" data-nstest-theme="b">
  54. <div data-nstest-role="header" data-nstest-position="inline">
  55. <h1>Dialog</h1>
  56. </div>
  57. <div data-nstest-role="content" >
  58. <a href="#" id="internal-link">foo</a>
  59. </div>
  60. <div data-nstest-role="footer">
  61. footer
  62. </div>
  63. </div>
  64. <div id="close-btn-test" data-nstest-role="dialog" data-nstest-theme="b" data-nstest-close-btn="none">
  65. <div data-nstest-role="header" data-nstest-position="inline">
  66. <h1>Dialog</h1>
  67. </div>
  68. <div data-nstest-role="content" >
  69. <a href="#" id="internal-link">foo</a>
  70. </div>
  71. <div data-nstest-role="footer">
  72. footer
  73. </div>
  74. </div>
  75. <div data-nstest-role="page" id="dialog-a">
  76. <div data-nstest-role="header" data-nstest-position="inline">
  77. <h1> No theme set </h1>
  78. </div>
  79. <div data-nstest-role="content">
  80. Some text here....
  81. </div>
  82. <div data-nstest-role="footer">
  83. footer
  84. </div>
  85. </div>
  86. <div data-nstest-role="page" data-nstest-theme="e" id="dialog-b">
  87. <div data-nstest-role="header">
  88. <h1> data-nstest-theme set </h1>
  89. </div>
  90. <div data-nstest-role="content">
  91. Some text here....
  92. </div>
  93. <div data-nstest-role="footer">
  94. footer
  95. </div>
  96. </div>
  97. <div data-nstest-role="page" id="dialog-c" data-nstest-overlay-theme="b" data-nstest-theme="e">
  98. <div data-nstest-role="header">
  99. <h1> data-nstest-theme & data-nstest-overlay-theme set </h1>
  100. </div>
  101. <div data-nstest-role="content">
  102. Some text here....
  103. </div>
  104. <div data-nstest-role="footer">
  105. footer
  106. </div>
  107. </div>
  108. </body>
  109. </html>