mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Core: Prevent adding multiple icons on refresh
This commit is contained in:
parent
e3558664f8
commit
9202a900e7
@ -467,7 +467,7 @@
|
|||||||
// if headerTemplate is empty, don't reformat the header cell
|
// if headerTemplate is empty, don't reformat the header cell
|
||||||
if ( c.headerTemplate !== '' ) {
|
if ( c.headerTemplate !== '' ) {
|
||||||
// set up header template
|
// set up header template
|
||||||
t = c.headerTemplate.replace(/\{content\}/g, $t.html()).replace(/\{icon\}/g, i);
|
t = c.headerTemplate.replace(/\{content\}/g, $t.html()).replace(/\{icon\}/g, $t.find('.' + ts.css.icon).length ? '' : i);
|
||||||
if (c.onRenderTemplate) {
|
if (c.onRenderTemplate) {
|
||||||
h = c.onRenderTemplate.apply($t, [index, t]);
|
h = c.onRenderTemplate.apply($t, [index, t]);
|
||||||
if (h && typeof h === 'string') { t = h; } // only change t if something is returned
|
if (h && typeof h === 'string') { t = h; } // only change t if something is returned
|
||||||
|
Loading…
Reference in New Issue
Block a user