activated lightbox on cards, started to dev modal-card
This commit is contained in:
@@ -90,11 +90,16 @@ export default createStore(Vuex.Store, {
|
||||
item.images = []
|
||||
for (let j = 0; j < img_src.length; j++) {
|
||||
if (img_src[j].meta.imageDerivatives) {
|
||||
let img_styles = {}
|
||||
for (var k = 0; k < imgStyle.length; k++) {
|
||||
img_styles[imgStyle[k]] = img_src[j].meta.imageDerivatives.links.[imgStyle[k]].href
|
||||
}
|
||||
item.images.push({
|
||||
title: img_src[j].meta.title,
|
||||
src: img_src[j].meta.imageDerivatives.links.hd.href,
|
||||
// meta.imageDerivatives.style.href link is provided by drupal consumers_image_styles module
|
||||
// BUG: missing all image derivative but first
|
||||
url: img_src[j].meta.imageDerivatives.links.[imgStyle].href
|
||||
img_styles: img_styles
|
||||
})
|
||||
} else {
|
||||
console.warn('missing image derivative ' + j + '/' + img_src.length + ' for ' + attrs.title)
|
||||
|
@@ -110,7 +110,7 @@ export default {
|
||||
// https://github.com/huybuidac/vuex-extensions
|
||||
dispatch('loadMaterials', {
|
||||
uuids: data.uuids,
|
||||
imgStyle: 'card_medium',
|
||||
imgStyle: ['card_medium', 'card_full'],
|
||||
callBack: 'loadMaterialsCallBack'
|
||||
})
|
||||
}else{
|
||||
|
@@ -254,7 +254,7 @@ export default {
|
||||
if (state.flagcolls[collid].items_uuids.length) {
|
||||
dispatch('loadMaterials', {
|
||||
uuids: state.flagcolls[collid].items_uuids,
|
||||
imgStyle: 'card_medium_half',
|
||||
imgStyle: ['card_medium_half'],
|
||||
callBack: 'loadMaterialsCallBack',
|
||||
callBackArgs: { collid: collid }
|
||||
}).then( () => {
|
||||
@@ -282,7 +282,7 @@ export default {
|
||||
// https://github.com/huybuidac/vuex-extensions
|
||||
dispatch('loadMaterials', {
|
||||
uuids: state.flagcolls[collid].items_uuids,
|
||||
imgStyle: 'card_medium_half',
|
||||
imgStyle: ['card_medium_half'],
|
||||
callBack: 'loadMaterialsCallBack',
|
||||
callBackArgs: { collid: collid }
|
||||
})
|
||||
|
Reference in New Issue
Block a user