Ver código fonte

Ajout d'une methode js displayPageNeedToReload

develop
Fabien Normand 1 mês atrás
pai
commit
3e6343e544
1 arquivos alterados com 10 adições e 2 exclusões
  1. +10
    -2
      Resources/assets/functions/tools.js

+ 10
- 2
Resources/assets/functions/tools.js Ver arquivo

@@ -66,10 +66,10 @@ export class SovTools {
}

static formatNumberWithoutRounding(number, toFixed) {
if (number){
if (number) {
let factor = Math.pow(10, toFixed);
return Math.floor(number * factor) / factor
}else{
} else {
return null
}
}
@@ -136,4 +136,12 @@ export class SovTools {
$textarea.next().html(totalCharacterCurrentSms + '/160 -<strong>' + totalSms + ' sms</strong>');

}
static displayPageNeedToReload(){
const reloadDiv = document.createElement('div');
reloadDiv.id = 'page-need-to-reload';
// Ajoute le bouton à l'intérieur de ce div
reloadDiv.innerHTML = '<button type="button" class="btn btn-info" onclick="window.location.reload()">Recharger la page</button>';
// Ajoute le div à la fin du body
document.body.appendChild(reloadDiv);
}
}

Carregando…
Cancelar
Salvar