@iankibetsh/shframework 5.5.1 → 5.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/library.js +10 -7
- package/dist/library.mjs +10 -7
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -280,13 +280,16 @@ const showModal = modalId => {
|
|
|
280
280
|
};
|
|
281
281
|
|
|
282
282
|
const hideModal = modalId => {
|
|
283
|
-
const
|
|
284
|
-
const
|
|
285
|
-
if(
|
|
286
|
-
button.
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
283
|
+
const cleanedId = modalId.replace('#','');
|
|
284
|
+
const modalElement = document.getElementById(cleanedId);
|
|
285
|
+
if(modalElement){
|
|
286
|
+
const button = modalElement.querySelector('.sh-modal-close');
|
|
287
|
+
if(button){
|
|
288
|
+
button.click();
|
|
289
|
+
} else {
|
|
290
|
+
const modal = new bootstrap.Modal(modalElement);
|
|
291
|
+
modal.hide();
|
|
292
|
+
}
|
|
290
293
|
}
|
|
291
294
|
};
|
|
292
295
|
|
package/dist/library.mjs
CHANGED
|
@@ -268,13 +268,16 @@ const showModal = modalId => {
|
|
|
268
268
|
};
|
|
269
269
|
|
|
270
270
|
const hideModal = modalId => {
|
|
271
|
-
const
|
|
272
|
-
const
|
|
273
|
-
if(
|
|
274
|
-
button.
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
271
|
+
const cleanedId = modalId.replace('#','');
|
|
272
|
+
const modalElement = document.getElementById(cleanedId);
|
|
273
|
+
if(modalElement){
|
|
274
|
+
const button = modalElement.querySelector('.sh-modal-close');
|
|
275
|
+
if(button){
|
|
276
|
+
button.click();
|
|
277
|
+
} else {
|
|
278
|
+
const modal = new Modal(modalElement);
|
|
279
|
+
modal.hide();
|
|
280
|
+
}
|
|
278
281
|
}
|
|
279
282
|
};
|
|
280
283
|
|