Core: Prevent adding multiple icons on refresh

This commit is contained in:
Mottie 2015-02-02 10:57:27 -06:00
parent e3558664f8
commit 9202a900e7

View File

@ -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