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
793 B
JavaScript

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