dialogUrl.htm 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. <title></title>
  5. <link href="../../lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  6. <link href="../../lib/ligerUI/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
  7. <script src="../../lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  8. <script src="../../lib/ligerUI/js/core/base.js" type="text/javascript"></script>
  9. <script src="../../lib/ligerUI/js/plugins/ligerDrag.js" type="text/javascript"></script>
  10. <script src="../../lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
  11. <script src="../../lib/ligerUI/js/plugins/ligerResizable.js" type="text/javascript"></script>
  12. <style type="text/css">
  13. .l-case-title
  14. {
  15. font-weight: bold;
  16. margin-top: 20px;
  17. margin-bottom: 20px;
  18. }
  19. </style>
  20. <script type="text/javascript">
  21. var win1;
  22. function f_open()
  23. {
  24. if (win1) win1.show();
  25. else win1 = $.ligerDialog.open({ height: 200, url: '../../welcome.htm', width: null, showMax: true, showToggle: true, showMin: true, isResize: true, slide: false });
  26. }
  27. function f_open3()
  28. {
  29. $.ligerDialog.open({ height: 200, url: '../../welcome.htm', isResize: true });
  30. }
  31. function f_open4()
  32. {
  33. $.ligerDialog.open({ url: '../../welcome.htm', width: null, height: 200, modal: false, isResize: true });
  34. }
  35. function f_open2()
  36. {
  37. $.ligerDialog.open({ url: '../../welcome.htm', height: 300, width: null, buttons: [
  38. { text: '确定', onclick: function (item, dialog) { alert(item.text); } },
  39. { text: '取消', onclick: function (item, dialog) { dialog.close(); } }
  40. ], isResize: true
  41. });
  42. }
  43. function f_open5()
  44. {
  45. $.ligerDialog.open({ url: '../../welcome.htm', height: 200, isResize: true });
  46. }
  47. function f_open6()
  48. {
  49. var m = $.ligerDialog.open({ url: '../../welcome.htm', height: 200, isResize: true });
  50. setTimeout(function ()
  51. {
  52. m.hide();
  53. setTimeout(function ()
  54. {
  55. m.show();
  56. }, 1000);
  57. }, 1000);
  58. }
  59. function f_open7()
  60. {
  61. var m = $.ligerDialog.open({ url: '../../welcome.htm', height: 200, isResize: true });
  62. setTimeout(function ()
  63. {
  64. m.setUrl('dialogUrl.htm');
  65. }, 1000);
  66. }
  67. </script>
  68. </head>
  69. <body style="padding: 10px; padding-bottom: 800px;">
  70. <div class="l-case-title">
  71. 实例一(保存window manager):if (win1) win1.show(); else win1 = $.ligerDialog.open({ height:
  72. 200, url: '../../welcome.htm', width: null });</div>
  73. <input type="button" onclick="f_open()" value="open window" />
  74. <div class="l-case-title">
  75. 实例二:$.ligerDialog.open({ height: 200,url: '../../welcome.htm' });</div>
  76. <input type="button" onclick="f_open3()" value="open window" />
  77. <div class="l-case-title">
  78. 实例三:$.ligerDialog.open({ url: '../../welcome.htm', height: 200,width: null, buttons:
  79. [ { text: '确定', onclick: function (item, dialog) { alert(item.text); } }, { text:
  80. '取消', onclick: function (item, dialog) { dialog.close(); } } ] });</div>
  81. <input type="button" onclick="f_open2()" value="open window with button" />
  82. <div class="l-case-title">
  83. 实例四:$.ligerDialog.open({ url: '../../welcome.htm', width: null,height:200,modal:false
  84. });</div>
  85. <input type="button" onclick="f_open4()" value="open noModal window" />
  86. <div class="l-case-title">
  87. 实例五:$.ligerDialog.open({ url: '../../welcome.htm',height: 200, isResize:true });</div>
  88. <input type="button" onclick="f_open5()" value="open Resizable window" />
  89. <div class="l-case-title">
  90. 实例六:模拟手工控制关闭和打开 var m = $.ligerDialog.open({ url: '../../welcome.htm',height: 200,
  91. isResize:true }); setTimeout(function () { m.hide(); setTimeout(function () { m.show();
  92. }, 1000); }, 1000);
  93. </div>
  94. <input type="button" onclick="f_open6()" value="模拟手工控制关闭和打开" />
  95. <div class="l-case-title">
  96. 实例七: var m = $.ligerDialog.open({ url: '../../welcome.htm', height: 200, isResize:
  97. true }); setTimeout(function () { m.setUrl('dialogUrl.htm'); }, 1000);
  98. </div>
  99. <input type="button" onclick="f_open7()" value="动态修改url" />
  100. <div style="display: none;">
  101. </div>
  102. </body>
  103. </html>