|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static formatNumberWithoutRounding(number, toFixed) { |
|
|
static formatNumberWithoutRounding(number, toFixed) { |
|
|
if (number){ |
|
|
|
|
|
|
|
|
if (number) { |
|
|
let factor = Math.pow(10, toFixed); |
|
|
let factor = Math.pow(10, toFixed); |
|
|
return Math.floor(number * factor) / factor |
|
|
return Math.floor(number * factor) / factor |
|
|
}else{ |
|
|
|
|
|
|
|
|
} else { |
|
|
return null |
|
|
return null |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$textarea.next().html(totalCharacterCurrentSms + '/160 -<strong>' + totalSms + ' sms</strong>'); |
|
|
$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); |
|
|
|
|
|
} |
|
|
} |
|
|
} |