You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Plugins/dataRender/numberTo.min.js

2 lines
951 B
JavaScript

/*! © SpryMedia Ltd, Alireza Mohammadi Doost - datatables.net/license */
!function(t){"function"==typeof define&&define.amd?define(["datatables.net"],function(e){return t(e,window,document)}):"object"==typeof exports?module.exports=function(e,n){return e=e||window,n.fn.dataTable||require("datatables.net")(e,n),t(n,0,e.document)}:t(jQuery,window,document)}(function(e,n,t,r){"use strict";e=e.fn.dataTable;return e.render.numberTo=function(r="fa"){let a=null;const u=["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],i=["0","1","2","3","4","5","6","7","8","9"],o=["۰","١","٢","٣","٤","٥","٦","٧","٨","٩"];return function(e,n,t){if("display"!==n)return e;if(!e&&"fa"===r)return"مقدار ورودی صحیح نمی‌باشد.";if(!e)return"numbers is empty.";switch(r){case"fa":a=e.toString().replace(/\d/g,e=>u[e]);break;case"en":a=e.toString().replace(/\d/g,e=>i[e]);break;case"ar":a=e.toString().replace(/\d/g,e=>o[e])}return a}},e});