better modalCard, integrated i18n with vuejs-i18n and drupal's strings_i18n_json_export

remain to automaticly export jsons and updated json files with webpack
and to understand how to access nested translations
This commit is contained in:
2020-12-07 23:11:31 +01:00
parent a4e689c27a
commit 417b084216
23 changed files with 25454 additions and 20 deletions

View File

@@ -8,7 +8,8 @@ export default {
// initial state
state: {
items: []
items: [],
showrooms_by_tid: {}
},
// getters
@@ -18,6 +19,9 @@ export default {
mutations: {
setItems (state, items) {
state.items = state.items.concat(items)
items.forEach((item, i) => {
state.showrooms_by_tid[item.tid] = item
})
}
},

View File

@@ -257,10 +257,10 @@ export default {
imgStyle: ['card_medium_half'],
callBack: 'loadMaterialsCallBack',
callBackArgs: { collid: collid }
}).then( () => {
}).then(() => {
resolve()
})
}else{
} else {
commit('setLoadedCollItems', { collid: collid, items: [] })
resolve()
}
@@ -291,7 +291,7 @@ export default {
console.log('committing setLoadedCollItems without args')
commit('setLoadedCollItems')
}
}else{
} else {
commit('setLoadedCollItems', { collid: collid, items: [] })
}
},