You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

72 rivejä
2.6 KiB

  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <title>pannellum embed configuration</title>
  5. <meta charset="utf-8">
  6. <link type="text/css" rel="Stylesheet" href="css/pannellum.css" />
  7. <SCRIPT LANGUAGE="JavaScript">
  8. function processForm (form)
  9. {
  10. var id = 'pannellum_' + randomString();
  11. var embed_code = document.getElementById('embed_code');
  12. embed_code.innerHTML = '<iframe title="pannellum panorama viewer"' +
  13. ' width="' + escape(form.embed_width.value) +
  14. '" height="' + escape(form.embed_height.value) +
  15. 'webkitAllowFullScreen mozallowfullscreen allowFullScreen' +
  16. '" style="border-style:none;"' +
  17. ' id="' + escape(id) +
  18. '" src="' + escape(form.pannellum_url.value) +
  19. '?' +
  20. 'panorama=' + escape(form.pano_url.value) +
  21. '&amp;amp;id=' + id;
  22. if(form.use_logo.checked)
  23. {
  24. embed_code.innerHTML += '&amp;amp;logo=yes';
  25. }
  26. if(form.pano_title.value != '')
  27. {
  28. embed_code.innerHTML += '&amp;amp;title=' + escape(form.pano_title.value);
  29. }
  30. if(form.pano_author.value != '')
  31. {
  32. embed_code.innerHTML += '&amp;amp;author=' + escape(form.pano_author.value);
  33. }
  34. if(form.autoload.checked)
  35. {
  36. embed_code.innerHTML += '&amp;amp;autoload=yes';
  37. }
  38. embed_code.innerHTML += '"></iframe>';
  39. return false;
  40. }
  41. function randomString()
  42. {
  43. var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
  44. var randomstring = '';
  45. for (var i=0;i<10;i++)
  46. {
  47. var rnum = Math.floor(Math.random() * chars.length);
  48. randomstring += chars.substring(rnum,rnum+1);
  49. }
  50. return randomstring;
  51. }
  52. </SCRIPT>
  53. </head>
  54. <body>
  55. <form name="embed_gen_form" onsubmit="return processForm(embed_gen_form); return false;">
  56. pannellum location:<br>
  57. <input name="pannellum_url" placeholder="pannellum.htm Location" required><p>
  58. Panorama URL:<br>
  59. <input name="pano_url" placeholder="Image File" required><p>
  60. Basic Information:<br>
  61. <input name="pano_title" placeholder="Title"> <input name="pano_author" placeholder="Author"><p>
  62. Embed Size:<br>
  63. <input name="embed_width" type="number" min="200" placeholder="Width" required> <input name="embed_height" type="number" min="150" placeholder="Height" required><p>
  64. Include pannellum logo: <input name="use_logo" type="checkbox"><p>
  65. Auto Load: <input name="autoload" type="checkbox"><p>
  66. <input type="submit" value="Generate" onclick="document.getElementById('embed_code').innerHTML = ''"><p>
  67. </form>
  68. <textarea id="embed_code" style="resize: none;" cols="100" readonly></textarea>
  69. </body>
  70. </html>