Procházet zdrojové kódy

lightbox switching (modal cards) fix

bach před 1 rokem
rodič
revize
306c0d3f94

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
web/themes/custom/materiotheme/assets/dist/main.js


binární
web/themes/custom/materiotheme/assets/dist/main.js.gz


binární
web/themes/custom/materiotheme/assets/dist/module-article.287271970a4e18761afe.bundle.js.gz


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
web/themes/custom/materiotheme/assets/dist/module-article.d8d77f5bb48e390b376c.bundle.js


binární
web/themes/custom/materiotheme/assets/dist/module-article.d8d77f5bb48e390b376c.bundle.js.gz


+ 5 - 1
web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue

@@ -275,7 +275,7 @@
         <img
           class="blank"
           :src="blanksrc"
-          @click="setcoolLightBoxIndex(index)"
+          @click="setLightBox(index)"
         >
       </figure>
     </section>
@@ -589,6 +589,10 @@ export default {
         console.log('item', item)
         item.classList.remove('tapped')
       })
+    },
+    setLightBox(index){
+      this.setcoolLightBoxItems(this.material.images)
+      this.setcoolLightBoxIndex(index)
     }
   }
 }

+ 6 - 2
web/themes/custom/materiotheme/vuejs/components/Pages/Article.vue

@@ -31,7 +31,7 @@
               :src="image_accroche.url"
               :alt="image_accroche.alt"
               :title="image_accroche.title"
-              @click="setcoolLightBoxIndex(0)"
+              @click="setLightBox(0)"
             />
           </figure>
         </section>
@@ -68,7 +68,7 @@
             v-for="(image, imageIndex) in lightbox_items"
             v-if="imageIndex > 0"
             :key="imageIndex"
-            @click="setcoolLightBoxIndex(imageIndex)"
+            @click="setLightBox(imageIndex)"
             :style="{ backgroundImage: 'url(' + image.thumb + ')' }"
           ></div>
         </div>
@@ -291,6 +291,10 @@ export default {
         name:`article`,
         params: { alias:alias, id: pn.nid }
       })
+    },
+    setLightBox(index){
+      this.setcoolLightBoxItems(this.lightbox_items)
+      this.setcoolLightBoxIndex(index)
     }
   },
   components: {

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů