|
|
@@ -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,17 @@ 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 id="reload-btn" style="display: none;" 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); |
|
|
|
//Affichage du bouton recharger la page après 5 sec |
|
|
|
let button = document.getElementById("reload-btn"); |
|
|
|
setTimeout(() => { |
|
|
|
button.style.display = "block"; |
|
|
|
}, 3000); |
|
|
|
} |
|
|
|
} |