queue_widget.html 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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" dir="ltr">
  3. <head>
  4. <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
  5. <title>Plupload - Queue widget example</title>
  6. <style type="text/css">
  7. body {
  8. font-family:Verdana, Geneva, sans-serif;
  9. font-size:13px;
  10. color:#333;
  11. background:url(../bg.jpg);
  12. }
  13. </style>
  14. <link rel="stylesheet" href="../../js/jquery.plupload.queue/css/jquery.plupload.queue.css" type="text/css" media="screen" />
  15. <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
  16. <script type="text/javascript" src="http://bp.yahooapis.com/2.4.21/browserplus-min.js"></script>
  17. <script type="text/javascript" src="../../js/plupload.js"></script>
  18. <script type="text/javascript" src="../../js/plupload.gears.js"></script>
  19. <script type="text/javascript" src="../../js/plupload.silverlight.js"></script>
  20. <script type="text/javascript" src="../../js/plupload.flash.js"></script>
  21. <script type="text/javascript" src="../../js/plupload.browserplus.js"></script>
  22. <script type="text/javascript" src="../../js/plupload.html4.js"></script>
  23. <script type="text/javascript" src="../../js/plupload.html5.js"></script>
  24. <script type="text/javascript" src="../../js/jquery.plupload.queue/jquery.plupload.queue.js"></script>
  25. <!-- <script type="text/javascript" src="http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js"></script> -->
  26. </head>
  27. <body>
  28. <form method="post" action="dump.php">
  29. <h1>Queue widget example</h1>
  30. <p>Shows the jQuery Plupload Queue widget and under different runtimes.</p>
  31. <div style="float: left; margin-right: 20px">
  32. <h3>Flash runtime</h3>
  33. <div id="flash_uploader" style="width: 450px; height: 330px;">You browser doesn't have Flash installed.</div>
  34. <h3>Gears runtime</h3>
  35. <div id="gears_uploader" style="width: 450px; height: 330px;">You browser doesn't have Gears installed.</div>
  36. </div>
  37. <div style="float: left; margin-right: 20px">
  38. <h3>Silverlight runtime</h3>
  39. <div id="silverlight_uploader" style="width: 450px; height: 330px;">You browser doesn't have Silverlight installed.</div>
  40. <h3>HTML 5 runtime</h3>
  41. <div id="html5_uploader" style="width: 450px; height: 330px;">You browser doesn't support native upload. Try Firefox 3 or Safari 4.</div>
  42. </div>
  43. <div style="float: left; margin-right: 20px">
  44. <h3>BrowserPlus runtime</h3>
  45. <div id="browserplus_uploader" style="width: 450px; height: 330px;">You browser doesn't have BrowserPlus installed.</div>
  46. <h3>HTML 4 runtime</h3>
  47. <div id="html4_uploader" style="width: 450px; height: 330px;">You browser doesn't have HTML 4 support.</div>
  48. </div>
  49. <br style="clear: both" />
  50. <input type="submit" value="Send" />
  51. </form>
  52. <script type="text/javascript">
  53. $(function() {
  54. // Setup flash version
  55. $("#flash_uploader").pluploadQueue({
  56. // General settings
  57. runtimes : 'flash',
  58. url : '../upload.php',
  59. max_file_size : '10mb',
  60. chunk_size : '1mb',
  61. unique_names : true,
  62. filters : [
  63. {title : "Image files", extensions : "jpg,gif,png"},
  64. {title : "Zip files", extensions : "zip"}
  65. ],
  66. // Resize images on clientside if we can
  67. resize : {width : 320, height : 240, quality : 90},
  68. // Flash settings
  69. flash_swf_url : '../../js/plupload.flash.swf'
  70. });
  71. // Setup gears version
  72. $("#gears_uploader").pluploadQueue({
  73. // General settings
  74. runtimes : 'gears',
  75. url : 'upload.php',
  76. max_file_size : '10mb',
  77. chunk_size : '1mb',
  78. unique_names : true,
  79. filters : [
  80. {title : "Image files", extensions : "jpg,gif,png"},
  81. {title : "Zip files", extensions : "zip"}
  82. ],
  83. // Resize images on clientside if we can
  84. resize : {width : 320, height : 240, quality : 90}
  85. });
  86. // Setup silverlight version
  87. $("#silverlight_uploader").pluploadQueue({
  88. // General settings
  89. runtimes : 'silverlight',
  90. url : 'upload.php',
  91. max_file_size : '10mb',
  92. chunk_size : '1mb',
  93. unique_names : true,
  94. filters : [
  95. {title : "Image files", extensions : "jpg,gif,png"},
  96. {title : "Zip files", extensions : "zip"}
  97. ],
  98. // Resize images on clientside if we can
  99. resize : {width : 320, height : 240, quality : 90},
  100. // Silverlight settings
  101. silverlight_xap_url : '../../js/plupload.silverlight.xap'
  102. });
  103. // Setup html5 version
  104. $("#html5_uploader").pluploadQueue({
  105. // General settings
  106. runtimes : 'html5',
  107. url : 'upload.php',
  108. max_file_size : '10mb',
  109. chunk_size : '1mb',
  110. unique_names : true,
  111. filters : [
  112. {title : "Image files", extensions : "jpg,gif,png"},
  113. {title : "Zip files", extensions : "zip"}
  114. ],
  115. // Resize images on clientside if we can
  116. resize : {width : 320, height : 240, quality : 90}
  117. });
  118. // Setup browserplus version
  119. $("#browserplus_uploader").pluploadQueue({
  120. // General settings
  121. runtimes : 'browserplus',
  122. url : 'upload.php',
  123. max_file_size : '10mb',
  124. chunk_size : '1mb',
  125. unique_names : true,
  126. filters : [
  127. {title : "Image files", extensions : "jpg,gif,png"},
  128. {title : "Zip files", extensions : "zip"}
  129. ],
  130. // Resize images on clientside if we can
  131. resize : {width : 320, height : 240, quality : 90}
  132. });
  133. // Setup html4 version
  134. $("#html4_uploader").pluploadQueue({
  135. // General settings
  136. runtimes : 'html4',
  137. url : 'upload.php',
  138. unique_names : true,
  139. filters : [
  140. {title : "Image files", extensions : "jpg,gif,png"},
  141. {title : "Zip files", extensions : "zip"}
  142. ]
  143. });
  144. });
  145. </script>
  146. </body>
  147. </html>