Widget option 'filter_reset' for dynamic content

The widget option "filter_reset" only works for elements that are present in the DOM on initialization of the table. Now it works for elements that have been added to the DOM at some later point as well.
This commit is contained in:
Volker Thiel 2013-06-05 10:31:55 +02:00
parent eb48e66684
commit 9733f794aa

View File

@ -701,8 +701,8 @@ ts.addWidget({
}).get();
// reset button/link
if (wo.filter_reset && $(wo.filter_reset).length){
$(wo.filter_reset).bind('click.tsfilter', function(){
if (wo.filter_reset){
$(document).on('click.tsfilter', wo.filter_reset, function(){
$t.trigger('filterReset');
});
}