en cas d'utilisation d'un lien/clic avec .url_action, passer une éventuelle icone (.fa ou .icone) en refresh animé
This commit is contained in:
parent
0727ec3138
commit
2daacc8efd
3 changed files with 11 additions and 2 deletions
|
@ -80,7 +80,7 @@ Choisir entre la version minifiée de vuejs (sans le debug) ou la version de dev
|
||||||
```
|
```
|
||||||
* il faut ajouter data-confirm="Confirmez vous ..." si on veut ajouter un popin de confirmation
|
* il faut ajouter data-confirm="Confirmez vous ..." si on veut ajouter un popin de confirmation
|
||||||
* il faut ajouter data-id="" si on veut recharger que cette ligne
|
* il faut ajouter data-id="" si on veut recharger que cette ligne
|
||||||
* si une variable du nom de `nomBlocAjaxReload` est définie, alors, un ajaxReload de ce bloc sera joué dans la fonctione de callback de l'action
|
* si une variable du nom de `nomBlocAjaxReload` est définie (ou un id-ajaxreload), alors, un ajaxReload de ce bloc sera joué dans la fonctione de callback de l'action
|
||||||
|
|
||||||
|
|
||||||
## Utiliser les crayons :
|
## Utiliser les crayons :
|
||||||
|
|
|
@ -10,6 +10,10 @@ jQuery(function () {
|
||||||
}
|
}
|
||||||
let url = $(this).attr('href');
|
let url = $(this).attr('href');
|
||||||
let id = $(this).data('id');
|
let id = $(this).data('id');
|
||||||
|
// passer en refresh animé une éventuelle icone
|
||||||
|
if ($(this).has('i.icon, i.fa')) {
|
||||||
|
$(this).find('i.icon, i.fa').eq(0).replaceWith('<i class="fa fa-refresh fa-spin"></i>');
|
||||||
|
}
|
||||||
nomBlocAjaxReload = $(this).data('ajaxreload');
|
nomBlocAjaxReload = $(this).data('ajaxreload');
|
||||||
console.time('Chargement de VueJs APRES Ajax');
|
console.time('Chargement de VueJs APRES Ajax');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|
|
@ -35,7 +35,12 @@ jQuery(function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
var url = $(this).attr('href');
|
var url = $(this).attr('href');
|
||||||
var id = $(this).data('id');
|
var id = $(this).data('id'); // passer en refresh animé une éventuelle icone
|
||||||
|
|
||||||
|
if ($(this).has('i.icon, i.fa')) {
|
||||||
|
$(this).find('i.icon, i.fa').eq(0).replaceWith('<i class="fa fa-refresh fa-spin"></i>');
|
||||||
|
}
|
||||||
|
|
||||||
nomBlocAjaxReload = $(this).data('ajaxreload');
|
nomBlocAjaxReload = $(this).data('ajaxreload');
|
||||||
console.time('Chargement de VueJs APRES Ajax');
|
console.time('Chargement de VueJs APRES Ajax');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|
Loading…
Add table
Reference in a new issue