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/ellipsis.min.js

2 lines
875 B
JavaScript

/*! © SpryMedia Ltd - datatables.net/license */
!function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return t(e,window,document)}):"object"==typeof exports?module.exports=function(e,n){return e=e||window,(n=n||("undefined"!=typeof window?require("jquery"):require("jquery")(e))).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.ellipsis=function(r,u,i){function o(e){return(""+e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}return function(e,n,t){return"display"!==n?e:"number"!=typeof e&&"string"!=typeof e||(e=e.toString()).length<=r?i?o(e):e:(n=e.substr(0,r-1),u&&(n=n.replace(/\s([^\s]*)$/,"")),i&&(n=o(n)),'<span class="ellipsis" title="'+o(e)+'">'+n+"&#8230;</span>")}},e});