Merge branch 'develop' into trunk
This commit is contained in:
commit
8bcf95011a
6 changed files with 45 additions and 91979 deletions
15651
public/css/app.css
vendored
15651
public/css/app.css
vendored
File diff suppressed because one or more lines are too long
76317
public/js/app.js
vendored
76317
public/js/app.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -86,12 +86,20 @@
|
|||
this.init();
|
||||
},
|
||||
storeMedia() {
|
||||
if (Object.keys(this.storeMedia).length === 0){
|
||||
this.init();
|
||||
this.$store.commit({
|
||||
type: 'updateGrabbed',
|
||||
grabbed: []
|
||||
});
|
||||
if (Object.keys(this.storeMedia).length > 0) {
|
||||
if (this.storeMedia.close !== undefined && this.storeMedia.close === true) {
|
||||
if (this.storeMedia.isModified === true) {
|
||||
this.init();
|
||||
this.$store.commit({
|
||||
type: 'updateGrabbed',
|
||||
grabbed: []
|
||||
});
|
||||
}
|
||||
this.$store.commit({
|
||||
type: 'updateMedia',
|
||||
media: {}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
storeReload() {
|
||||
|
|
@ -189,6 +197,7 @@
|
|||
this.infiniteId = Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
|
||||
},
|
||||
edit(media) {
|
||||
media.isModified = false;
|
||||
this.$store.commit({
|
||||
type: 'updateMedia',
|
||||
media: media
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@
|
|||
{ value: 'created_at', order: 'desc', label: 'Date de création ▼' },
|
||||
{ value: 'updated_at', order: 'asc', label: 'Date de modification ▲' },
|
||||
{ value: 'updated_at', order: 'desc', label: 'Date de modification ▼' },
|
||||
{ value: 'libelle', order: 'asc', label: 'Libellé ▲' },
|
||||
{ value: 'libelle', order: 'desc', label: 'Libellé ▼' },
|
||||
{ value: 'libelle.keyword', order: 'asc', label: 'Libellé ▲' },
|
||||
{ value: 'libelle.keyword', order: 'desc', label: 'Libellé ▼' },
|
||||
{ value: 'version', order: 'asc', label: 'Version ▲' },
|
||||
{ value: 'version', order: 'desc', label: 'Version ▼' },
|
||||
]
|
||||
|
|
|
|||
|
|
@ -56,12 +56,12 @@
|
|||
},
|
||||
mounted() {
|
||||
console.log('EditComponent Mounted.');
|
||||
if (this.open !== undefined) {
|
||||
this.$store.commit({
|
||||
type: 'updateMedia',
|
||||
media: JSON.parse(this.open)
|
||||
});
|
||||
}
|
||||
// if (this.open !== undefined) { TODO : REMOVE ?
|
||||
// this.$store.commit({
|
||||
// type: 'updateMedia',
|
||||
// media: JSON.parse(this.open)
|
||||
// });
|
||||
// }
|
||||
},
|
||||
computed: {
|
||||
storeMedia () {
|
||||
|
|
@ -86,7 +86,7 @@
|
|||
return {
|
||||
display: false,
|
||||
defaultTab: 'preview',
|
||||
//currentTab: 'preview'
|
||||
//currentTab: 'preview' TODO : REMOVE ?
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
@ -143,9 +143,10 @@
|
|||
});
|
||||
},
|
||||
close(){
|
||||
console.log('close click')
|
||||
this.$store.commit({
|
||||
type: 'updateMedia',
|
||||
media: {}
|
||||
media: { close: true, isModified: this.storeMedia.isModified }
|
||||
});
|
||||
this.currentTab = this.defaultTab;
|
||||
},
|
||||
|
|
@ -154,9 +155,11 @@
|
|||
this.r.upload();
|
||||
},
|
||||
uploadFileSuccess(file, message) {
|
||||
let successMedia = JSON.parse(message);
|
||||
successMedia.isModified = true;
|
||||
this.$store.commit({
|
||||
type: 'updateMedia',
|
||||
media: JSON.parse(message)
|
||||
media: successMedia
|
||||
});
|
||||
//on vient d'upload un fichier.
|
||||
// Si c'est lié a Arcadia on check les clés refs
|
||||
|
|
@ -210,9 +213,11 @@
|
|||
}).then(response => {
|
||||
this.$loading.hide();
|
||||
if (response.data.status === true) {
|
||||
let savedMedia = response.data.datas;
|
||||
savedMedia.isModified = true;
|
||||
this.$store.commit({
|
||||
type: 'updateMedia',
|
||||
media: response.data.datas
|
||||
media: savedMedia
|
||||
});
|
||||
$.fancyMessage({
|
||||
title: "Sauvegarde d'un média",
|
||||
|
|
|
|||
|
|
@ -238,6 +238,9 @@
|
|||
watch: {
|
||||
storeMedia() {
|
||||
this.oMedia = this.storeMedia;
|
||||
if (this.oMedia.isModified === undefined) {
|
||||
this.oMedia.isModified = false;
|
||||
}
|
||||
},
|
||||
searchMarques() {
|
||||
if (this.searchMarques.length > 0) {
|
||||
|
|
@ -376,9 +379,10 @@
|
|||
this.$loading.hide();
|
||||
if (response.data.status === true) {
|
||||
_this2.oMedia = response.data.datas;
|
||||
_this2.oMedia.isModified = true;
|
||||
this.$store.commit({
|
||||
type: 'updateMedia',
|
||||
media: response.data.datas
|
||||
media: _this2.oMedia
|
||||
});
|
||||
$.fancyMessage({
|
||||
title: "Sauvegarde d'un média",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue