uawdijnntqw1x1x1
IP : 18.191.89.23
Hostname : axolotl
Kernel : Linux axolotl 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
www
/
axolotl
/
data
/
www
/
yar.axolotls.ru
/
1c9cb
/
..
/
bitrix
/
js
/
sender
/
..
/
currency
/
core_currency.js
/
/
;(function(window) { BX.namespace('BX.Currency'); if (BX.Currency.defaultFormat) { return; } BX.mergeEx(BX.Currency, { currencyList: [], defaultFormat: { 'FORMAT_STRING': '#', 'DEC_POINT': '.', 'THOUSANDS_SEP': ' ', 'DECIMALS': 2, 'HIDE_ZERO': 'N' }, setCurrencyFormat: function(currency, format, replace) { var index = this.getCurrencyIndex(currency), currencyFormat = BX.clone(this.defaultFormat, true), i; replace = !!replace; if (index > -1 && !replace) { return; } if (index === -1) { index = this.currencyList.length; } for (i in currencyFormat) { if (currencyFormat.hasOwnProperty(i) && typeof format[i] !== 'undefined') { currencyFormat[i] = format[i]; } } this.currencyList[index] = { 'currency': currency, 'format': BX.clone(currencyFormat, true) }; }, setCurrencies: function(currencies, replace) { var i; if (!!currencies && BX.type.isArray(currencies)) { for (i = 0; i < currencies.length; i++) { if (!!currencies[i].CURRENCY && !!currencies[i].FORMAT) { this.setCurrencyFormat(currencies[i].CURRENCY, currencies[i].FORMAT, replace); } } } }, getCurrencyFormat: function(currency) { var index = this.getCurrencyIndex(currency); return (index > -1 ? this.currencyList[index].format : false); }, getCurrencyIndex: function(currency) { var i, index = -1; if (this.currencyList.length === 0) { return index; } for (i = 0; i < this.currencyList.length; i++) { if (this.currencyList[i].currency === currency) { index = i; break; } } return index; }, clearCurrency: function(currency) { var index = this.getCurrencyIndex(currency); if (index > -1) this.currencyList = BX.util.deleteFromArray(this.currencyList, index); }, clean: function() { this.currencyList = []; }, currencyFormat: function (price, currency, useTemplate) { var result = '', format; useTemplate = !!useTemplate; format = this.getCurrencyFormat(currency); if (!!format && typeof format === 'object') { format.CURRENT_DECIMALS = format.DECIMALS; if (format.HIDE_ZERO === 'Y' && price == parseInt(price, 10)) format.CURRENT_DECIMALS = 0; result = BX.util.number_format(price, format.CURRENT_DECIMALS, format.DEC_POINT, format.THOUSANDS_SEP); if (useTemplate) result = format.FORMAT_STRING.replace(/(^|[^&])#/, '$1' + result); } return result; }, loadCurrencyFormat: function (currency) { return new Promise(function (resolve, reject) { var index = this.getCurrencyIndex(currency); if(index > -1) { resolve(this.currencyList[index].format); } else { BX.ajax.runAction("currency.format.get", {data: {currencyId: currency}}).then( function(response) { var format = response.data; this.setCurrencyFormat(currency, format); resolve(format); }.bind(this) ).catch(function(response) { reject(response.errors); }) } }.bind(this)) } }); })(window);
/var/www/axolotl/data/www/yar.axolotls.ru/1c9cb/../bitrix/js/sender/../currency/core_currency.js