modal-sa.html 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <style>
  2. .modal {
  3. display: none;
  4. position: fixed;
  5. z-index: 1;
  6. padding-top: 100px;
  7. left: 0;
  8. top: 0;
  9. width: 100%;
  10. height: 100%;
  11. overflow: auto;
  12. background-color: rgb(0,0,0);
  13. background-color: rgba(0,0,0,0.4);
  14. }
  15. .modal-content {
  16. background-color: #fefefe;
  17. margin: auto;
  18. padding: 20px;
  19. border: 1px solid #888;
  20. width: 80%;
  21. }
  22. .close {
  23. color: #aaaaaa;
  24. float: right;
  25. font-size: 28px;
  26. font-weight: bold;
  27. }
  28. .close:hover,
  29. .close:focus {
  30. color: #000;
  31. text-decoration: none;
  32. cursor: pointer;
  33. }
  34. </style>
  35. <!-- Trigger/Open The Modal -->
  36. <span id="myBtn" class="cursor-pointer"><i class="fas fa-bell"></i> Suchagent aktivieren</span>
  37. <!-- The Modal -->
  38. <div id="SearchAgentModal" class="modal">
  39. <!-- Modal content -->
  40. <div class="modal-content">
  41. <span id="agentClose" class="close">&times;</span>
  42. <iframe src="{% url 'search-agent-create-embed' %}" style="border:0px #ffffff none;" name="myiFrame" scrolling="yes" frameborder="1" marginheight="0px" marginwidth="0px" height="600px" width="100%" allowfullscreen></iframe>
  43. </div>
  44. </div>
  45. <script>
  46. var modal = document.getElementById("SearchAgentModal");
  47. var btn = document.getElementById("myBtn");
  48. var agentSpan = document.getElementById("agentClose");
  49. btn.onclick = function() {
  50. modal.style.display = "block";
  51. }
  52. agentSpan.onclick = function() {
  53. modal.style.display = "none";
  54. }
  55. /*
  56. window.onclick = function(event) {
  57. if (event.target == modal) {
  58. modal.style.display = "none";
  59. }
  60. }
  61. */
  62. </script>