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:
@@ -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
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
|
@@ -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: [] })
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user