Fix component loader
This commit is contained in:
parent
dd0c611845
commit
c8eaa0cc3f
2 changed files with 16 additions and 4 deletions
|
|
@ -177,6 +177,10 @@
|
|||
if(!value) {
|
||||
return;
|
||||
}
|
||||
self.$store.commit({
|
||||
type: 'Loading',
|
||||
loading: true
|
||||
})
|
||||
$.ajax({
|
||||
url: '/ajax/remove-media',
|
||||
method: 'POST',
|
||||
|
|
@ -185,6 +189,10 @@
|
|||
medias: medias.map(function(obj) { return obj.id })
|
||||
},
|
||||
success: function(result) {
|
||||
self.$store.commit({
|
||||
type: 'Loading',
|
||||
loading: false
|
||||
})
|
||||
let reload = function() {
|
||||
self.$store.commit({
|
||||
type: 'Reload',
|
||||
|
|
@ -203,6 +211,10 @@
|
|||
}
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
self.$store.commit({
|
||||
type: 'Loading',
|
||||
loading: false
|
||||
})
|
||||
$.fancybox.close()
|
||||
$.fancyMessage({title : "Attention", message : "Erreur lors de la suppression du média, merci d'actualiser la page.", type : "error"})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -427,8 +427,8 @@
|
|||
}
|
||||
self.$store.commit({
|
||||
type: 'Loading',
|
||||
reload: true
|
||||
});
|
||||
loading: true
|
||||
})
|
||||
$.ajax({
|
||||
url: '/ajax/remove-media',
|
||||
method: 'POST',
|
||||
|
|
@ -439,7 +439,7 @@
|
|||
success: function(result){
|
||||
self.$store.commit({
|
||||
type: 'Loading',
|
||||
reload: false
|
||||
loading: false
|
||||
})
|
||||
if(result.length != 1) {
|
||||
$.fancybox.close()
|
||||
|
|
@ -459,7 +459,7 @@
|
|||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
self.$store.commit({
|
||||
type: 'Loading',
|
||||
reload: false
|
||||
loading: false
|
||||
})
|
||||
$.fancybox.close()
|
||||
$.fancyMessage({title : "Attention", message : "Erreur lors de la suppression du média, merci d'actualiser la page.", type : "error"})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue