Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

configuration.htm 3.1 KiB

13 år sedan
13 år sedan
13 år sedan
13 år sedan
13 år sedan
13 år sedan
13 år sedan
13 år sedan
13 år sedan
13 år sedan
13 år sedan
13 år sedan
13 år sedan
13 år sedan
13 år sedan
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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>
  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. if(form.use_logo.checked) {
  22. embed_code.innerHTML += '&amp;amp;logo=yes';
  23. }
  24. if(form.pano_title.value != '') {
  25. embed_code.innerHTML += '&amp;amp;title=' + escape(form.pano_title.value);
  26. }
  27. if(form.pano_author.value != '') {
  28. embed_code.innerHTML += '&amp;amp;author=' + escape(form.pano_author.value);
  29. }
  30. if(form.autoload.checked) {
  31. embed_code.innerHTML += '&amp;amp;autoload=yes';
  32. }
  33. if(form.license.value > -1) {
  34. embed_code.innerHTML += '&amp;amp;license=' + escape(form.license.value);
  35. }
  36. embed_code.innerHTML += '"></iframe>';
  37. return false;
  38. }
  39. function randomString()
  40. {
  41. var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
  42. var randomstring = '';
  43. for (var i=0;i<10;i++) {
  44. var rnum = Math.floor(Math.random() * chars.length);
  45. randomstring += chars.substring(rnum,rnum+1);
  46. }
  47. return randomstring;
  48. }
  49. </script>
  50. </head>
  51. <body>
  52. <form name="embed_gen_form" onsubmit="return processForm(embed_gen_form); return false;">
  53. Pannellum Location:<br>
  54. <input name="pannellum_url" placeholder="pannellum.htm Location" required><p>
  55. Panorama URL:<br>
  56. <input name="pano_url" placeholder="Image File" required><p>
  57. Basic Information:<br>
  58. <input name="pano_title" placeholder="Title"> <input name="pano_author" placeholder="Author"><p>
  59. Embed Size:<br>
  60. <input name="embed_width" type="number" min="200" placeholder="Width" required> <input name="embed_height" type="number" min="150" placeholder="Height" required><p>
  61. Include Pannellum Logo: <input name="use_logo" type="checkbox"><p>
  62. Auto Load: <input name="autoload" type="checkbox"><p>
  63. Creative Commons License:
  64. <select name="license">
  65. <option value="-1">None</option>
  66. <option value="0">CC BY 3.0</option>
  67. <option value="1">CC BY-SA 3.0</option>
  68. <option value="2">CC BY-ND 3.0</option>
  69. <option value="3">CC BY-NC 3.0</option>
  70. <option value="4">CC BY-NC-SA 3.0</option>
  71. <option value="5">CC BY-NC-ND 3.0</option>
  72. </select><p>
  73. <input type="submit" value="Generate" onclick="document.getElementById('embed_code').innerHTML = ''"><p>
  74. </form>
  75. <textarea id="embed_code" style="resize: none; height:200px;" onclick="this.select()" cols="100" readonly></textarea>
  76. </body>
  77. </html>