mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-04-14 08:28:23 +02:00
add deprecation message
This commit is contained in:
@@ -16,18 +16,21 @@ utils.getLanguage = function () {
|
||||
|
||||
|
||||
utils.makeNumbersHumanReadable = function (elements) {
|
||||
console.warn('[deprecated] utils.makeNumbersHumanReadable is deprecated! Use {humanReadableNumber(value)} helper directly in the template');
|
||||
elements.each(function () {
|
||||
const $this = $(this);
|
||||
const toFixed = $this.attr('data-toFixed') || 1;
|
||||
$this.html(utils.makeNumberHumanReadable($(this).attr('title'), toFixed))
|
||||
$this.html(utils.makeNumberHumanReadable($this.attr('title'), toFixed))
|
||||
.removeClass('hidden');
|
||||
});
|
||||
};
|
||||
|
||||
utils.addCommasToNumbers = function (elements) {
|
||||
console.warn('[deprecated] utils.addCommasToNumbers is deprecated! Use {formattedNumber(value)} helper directly in the template');
|
||||
elements.each(function (index, element) {
|
||||
$(element)
|
||||
.html(utils.addCommas($(element).html()))
|
||||
const $element = $(element);
|
||||
$element
|
||||
.html(utils.addCommas($element.html()))
|
||||
.removeClass('hidden');
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user