Browse Source

galleri fix

amic 1 year ago
parent
commit
24f8448d7d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      views/news/view.php

+ 2 - 1
views/news/view.php

@@ -289,7 +289,8 @@ if( strpos( $model->text, 'class="InviewElement' ) !== false ){
         var gallery = document.getElementById("gallery-0");
         var gallery = document.getElementById("gallery-0");
 		g = Array.from(document.getElementsByClassName('gallery'));
 		g = Array.from(document.getElementsByClassName('gallery'));
 		g.forEach( (gallery) =>{ console.log(gallery);
 		g.forEach( (gallery) =>{ console.log(gallery);
-        if(gallery!==null) {
+
+        if(gallery!==null && !gallery.classList.contains("splide")) {
             var wrapper = document.createElement("div");
             var wrapper = document.createElement("div");
             wrapper.classList.add('gallery-wrapper')
             wrapper.classList.add('gallery-wrapper')
             gallery.parentNode.insertBefore(wrapper, gallery)
             gallery.parentNode.insertBefore(wrapper, gallery)