sample_lightbox.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <link rel="stylesheet" href="../../../themes/themeroller/default-theme/ui.all.css" type="text/css" media="screen" />
  5. <link rel="stylesheet" href="../../../themes/nokia/ext-theme/default/360x640/custom.css" type="text/css" media="screen" />
  6. <script src="../../../lib/jquery/jquery.js" type="text/javascript" charset="utf-8"></script>
  7. <script src="../../../src/defaults.js" type="text/javascript" charset="utf-8"></script>
  8. <script src="../../../src/core.js" type="text/javascript" charset="utf-8"></script>
  9. <style type="text/css" media="screen">
  10. body {
  11. font-size: 14px;
  12. padding: 15px;
  13. font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif";
  14. }
  15. p {
  16. margin: 30px 10px;
  17. text-align: justify;
  18. font-size: 20px;
  19. line-height: 22px;
  20. }
  21. h1 {
  22. margin: 0;
  23. padding: 15px 10px;
  24. font-size: 25px;
  25. }
  26. button {
  27. padding: 20px;
  28. }
  29. </style>
  30. </head>
  31. <body>
  32. <button onclick="window.dialog1.open();">Open Lightbox</button>
  33. <button onclick="window.dialog2.open();">Open Animated Lightbox</button>
  34. <button onclick="window.dialog3.open();">Info box</button>
  35. <div id="lightbox01">
  36. <h1>Lightbox Example</h1>
  37. <p>
  38. Lorem <strong>ipsum dolor</strong> sit amet, <em style="color: red;">consectetur</em> adipisicing elit, sed do <em><strong>eiusmod tempor</strong></em> incididunt ut labore et dolore magna aliqua.
  39. Lorem <strong>ipsum dolor</strong> sit amet, <em style="color: red;">consectetur</em> adipisicing elit, sed do <em><strong>eiusmod tempor</strong></em> incididunt ut labore et dolore magna aliqua.
  40. </p>
  41. </div>
  42. <div id="lightbox02">
  43. <h1>Animated Lightbox Example</h1>
  44. <p>
  45. Lorem <strong>ipsum dolor</strong> sit amet, <em style="color: red;">consectetur</em> adipisicing elit, sed do <em><strong>eiusmod tempor</strong></em> incididunt ut labore et dolore magna aliqua.
  46. </p>
  47. </div>
  48. <div id="lightbox03">
  49. <h1>Info box</h1>
  50. <p>
  51. Lorem <strong>ipsum dolor</strong> sit amet, <em style="color: red;">consectetur</em> adipisicing elit, sed do <em><strong>eiusmod tempor</strong></em> incididunt ut labore et dolore magna aliqua.
  52. </p>
  53. </div>
  54. <script type="text/javascript" charset="utf-8">
  55. if (window.widget) {
  56. widget.setNavigationEnabled(false);
  57. }
  58. var init = function() {
  59. window.dialog1 = new Nokia.LightBox({
  60. element: '#lightbox01',
  61. height: '80%',
  62. width: '80%',
  63. buttons: {
  64. "Yes": function() {
  65. alert('yes');
  66. },
  67. "No": function() {
  68. this.close();
  69. }
  70. },
  71. create: function() {
  72. console.log("Lightbox 01: Create.");
  73. },
  74. show: function() {
  75. console.log("Lightbox 01: Show.");
  76. }
  77. });
  78. window.dialog2 = new Nokia.LightBox({
  79. element: '#lightbox02',
  80. height: '65%',
  81. width: '65%',
  82. animation: true,
  83. buttons: {
  84. "Close this box": function() {
  85. this.close();
  86. }
  87. }
  88. });
  89. window.dialog3 = new Nokia.LightBox({
  90. element: '#lightbox03',
  91. height: '65%',
  92. width: '65%',
  93. animation: false,
  94. buttonClose: true
  95. });
  96. /*
  97. * Hide splash when its all done.
  98. */
  99. Nokia.hideSplash();
  100. };
  101. /*
  102. * Show splash while loading components.
  103. */
  104. Nokia.showSplash('<span>loading</span>');
  105. window.onload = function() {
  106. Nokia.use('lightbox', init);
  107. };
  108. </script>
  109. </body>
  110. </html>