Browse Source

click on img on material card open the ModalCard, not the coollightbox #992

bach 1 month ago
parent
commit
a3dd424289

File diff suppressed because it is too large
+ 2 - 2
web/themes/custom/materiotheme/assets/dist/main.js


+ 9 - 6
web/themes/custom/materiotheme/vuejs/components/Content/Card.vue

@@ -1,7 +1,7 @@
 <template>
   <article class="card search-card">
     <header
-      @click="openModalCard"
+      @click.prevent="openModalCard"
     >
       <h1 v-if="isloggedin">{{ item.title }}</h1>
       <h4>{{ item.short_description }}</h4>
@@ -42,18 +42,18 @@
         <img
           class="blank"
           :src="blanksrc"
-          @click="lightbox_index = index"
+          @click.prevent="openModalCard"
         >
       </figure>
     </section>
-    <CoolLightBox
+    <!-- <CoolLightBox
       v-if="isloggedin"
       :items="item.images"
       :index="lightbox_index"
       srcName="style_hd_url"
       :loop="true"
       @close="lightbox_index = null">
-    </CoolLightBox>
+    </CoolLightBox> -->
   </article>
 </template>
 
@@ -72,8 +72,8 @@ export default {
   data() {
     return {
       blanksrc:`${drupalSettings.path.themePath}/assets/img/blank.gif`,
-      loadingFlag: false,
-      lightbox_index: null
+      loadingFlag: false
+      // lightbox_index: null
     }
   },
   computed: {
@@ -117,6 +117,9 @@ export default {
         })
       }
     },
+    // onClickImg (e, index) {
+    //   this.lightbox_index = index
+    // },
     openModalCard (e) {
       console.log('openModalCard', this.isLoggedin);
       if(this.isloggedin){