Ticket 36 et 88 : sur duplication accès direct à l'onglet edition
This commit is contained in:
parent
29043a255c
commit
5cdff1aad0
3 changed files with 22 additions and 2 deletions
6
resources/js/app.js
vendored
6
resources/js/app.js
vendored
|
|
@ -99,7 +99,8 @@ const store = new Vuex.Store({
|
|||
typesvariantes: [],
|
||||
formats: [],
|
||||
grabbed: [],
|
||||
baskets: []
|
||||
baskets: [],
|
||||
mediaTab: 'preview'
|
||||
},
|
||||
mutations: {
|
||||
Reload (state, payload) {
|
||||
|
|
@ -134,6 +135,9 @@ const store = new Vuex.Store({
|
|||
},
|
||||
updateFormats (state, payload) {
|
||||
state.formats = payload.formats;
|
||||
},
|
||||
changeMediaTab (state,payload) {
|
||||
state.mediaTab = payload.tab;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -140,6 +140,11 @@
|
|||
type: 'updateMedia',
|
||||
media: response.data.datas
|
||||
});
|
||||
//switch to edit tab
|
||||
this.$store.commit({
|
||||
type: 'changeMediaTab',
|
||||
tab: 'edit'
|
||||
});
|
||||
} else {
|
||||
$.fancyMessage({title: "Dupliquer un média", message: response.data.error, type: "error"});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,13 +69,24 @@
|
|||
},
|
||||
storeRole () {
|
||||
return this.$store.state.role
|
||||
},
|
||||
currentTab: {
|
||||
get: function() {
|
||||
return this.$store.state.mediaTab
|
||||
},
|
||||
set: function(value) {
|
||||
this.$store.commit({
|
||||
type: 'changeMediaTab',
|
||||
tab: value
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
data (){
|
||||
return {
|
||||
display: false,
|
||||
defaultTab: 'preview',
|
||||
currentTab: 'preview'
|
||||
//currentTab: 'preview'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue