DmitrMakeev commited on
Commit
0b56591
·
verified ·
1 Parent(s): 0245d0a

Update pages.html

Browse files
Files changed (1) hide show
  1. pages.html +33 -8
pages.html CHANGED
@@ -1075,7 +1075,7 @@ editor.Blocks.add('menu-settings-block-block', {
1075
  <script>
1076
  var currentMaxZIndex = 20;
1077
 
1078
- // Get the modal
1079
  var modal_1 = document.getElementById("myModal_1");
1080
 
1081
  // Get the button that opens the modal
@@ -1084,20 +1084,33 @@ var btn_1 = document.getElementById("myBtn");
1084
  // Get the <span> element that closes the modal
1085
  var span_1 = document.getElementsByClassName("close_1")[0];
1086
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1087
  // When the user clicks the button, open the modal
1088
  btn_1.onclick = function() {
1089
- modal_1.style.display = "block";
1090
  }
1091
 
1092
  // When the user clicks on <span> (x), close the modal
1093
  span_1.onclick = function() {
1094
- modal_1.style.display = "none";
1095
  }
1096
 
1097
  // When the user clicks anywhere outside of the modal, close it
1098
  window.onclick = function(event) {
1099
  if (event.target == modal_1) {
1100
- modal_1.style.display = "none";
1101
  }
1102
  }
1103
 
@@ -1114,23 +1127,35 @@ var btn_2 = document.getElementById("myBtn_2");
1114
  // Get the <span> element that closes the modal
1115
  var span_2 = document.getElementsByClassName("close_2")[0];
1116
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1117
  // When the user clicks the button, open the modal
1118
  btn_2.onclick = function() {
1119
- modal_2.style.display = "block";
1120
  }
1121
 
1122
  // When the user clicks on <span> (x), close the modal
1123
  span_2.onclick = function() {
1124
- modal_2.style.display = "none";
1125
  }
1126
 
1127
  // When the user clicks anywhere outside of the modal, close it
1128
  window.onclick = function(event) {
1129
  if (event.target == modal_2) {
1130
- modal_2.style.display = "none";
1131
  }
1132
  }
1133
-
1134
  </script>
1135
 
1136
 
 
1075
  <script>
1076
  var currentMaxZIndex = 20;
1077
 
1078
+ // Get the modal_1
1079
  var modal_1 = document.getElementById("myModal_1");
1080
 
1081
  // Get the button that opens the modal
 
1084
  // Get the <span> element that closes the modal
1085
  var span_1 = document.getElementsByClassName("close_1")[0];
1086
 
1087
+ // Function to open the modal
1088
+ function openModal_1(modal) {
1089
+ currentMaxZIndex += 1;
1090
+ modal.style.zIndex = currentMaxZIndex;
1091
+ modal.style.display = "block";
1092
+ }
1093
+
1094
+ // Function to close the modal
1095
+ function closeModal_1(modal) {
1096
+ modal.style.display = "none";
1097
+ currentMaxZIndex = 20; // Reset z-index to initial value
1098
+ }
1099
+
1100
  // When the user clicks the button, open the modal
1101
  btn_1.onclick = function() {
1102
+ openModal_1(modal_1);
1103
  }
1104
 
1105
  // When the user clicks on <span> (x), close the modal
1106
  span_1.onclick = function() {
1107
+ closeModal_1(modal_1);
1108
  }
1109
 
1110
  // When the user clicks anywhere outside of the modal, close it
1111
  window.onclick = function(event) {
1112
  if (event.target == modal_1) {
1113
+ closeModal_1(modal_1);
1114
  }
1115
  }
1116
 
 
1127
  // Get the <span> element that closes the modal
1128
  var span_2 = document.getElementsByClassName("close_2")[0];
1129
 
1130
+ // Function to open the modal
1131
+ function openModal_2(modal) {
1132
+ currentMaxZIndex += 1;
1133
+ modal.style.zIndex = currentMaxZIndex;
1134
+ modal.style.display = "block";
1135
+ }
1136
+
1137
+ // Function to close the modal
1138
+ function closeModal_2(modal) {
1139
+ modal.style.display = "none";
1140
+ currentMaxZIndex = 20; // Reset z-index to initial value
1141
+ }
1142
+
1143
  // When the user clicks the button, open the modal
1144
  btn_2.onclick = function() {
1145
+ openModal_2(modal_2);
1146
  }
1147
 
1148
  // When the user clicks on <span> (x), close the modal
1149
  span_2.onclick = function() {
1150
+ closeModal_2(modal_2);
1151
  }
1152
 
1153
  // When the user clicks anywhere outside of the modal, close it
1154
  window.onclick = function(event) {
1155
  if (event.target == modal_2) {
1156
+ closeModal_2(modal_2);
1157
  }
1158
  }
 
1159
  </script>
1160
 
1161