|
|
|
@ -72,6 +72,13 @@ jQuery.fn.dataTable.render.ellipsis = function ( cutoff, wordbreak, escapeHtml )
|
|
|
|
|
return d;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var outerTag = false
|
|
|
|
|
if (d.includes("href")) {
|
|
|
|
|
var wrapper = $(d).clone().empty().prop('outerHTML');
|
|
|
|
|
d = jQuery(d).text();
|
|
|
|
|
outerTag = true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var shortened = d.substr(0, cutoff-1);
|
|
|
|
|
|
|
|
|
|
// Find the last white space character in the string
|
|
|
|
@ -84,6 +91,10 @@ jQuery.fn.dataTable.render.ellipsis = function ( cutoff, wordbreak, escapeHtml )
|
|
|
|
|
shortened = esc( shortened );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (outerTag) {
|
|
|
|
|
return $(wrapper).html('<span class="ellipsis" title="'+esc(d)+'">'+shortened+'…</span>')[0].outerHTML
|
|
|
|
|
} else {
|
|
|
|
|
return '<span class="ellipsis" title="'+esc(d)+'">'+shortened+'…</span>';
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|