app/assets/javascripts/tabulatr/application.js in tabulatr2-0.8.8 vs app/assets/javascripts/tabulatr/application.js in tabulatr2-0.8.9

- old
+ new

@@ -262,22 +262,10 @@ $('.tabulatr_mark_all[data-table='+ tableName +']').prop('checked', false).prop('indeterminate', false); Tabulatr.updateTable({}, tableId); }); - var cbfn = function(event, isInView, visiblePartX, visiblePartY) { - if (isInView) { - // element is now visible in the viewport - if (visiblePartY == 'top') { - // top part of element is visible - } else if (visiblePartY == 'bottom') { - // bottom part of element is visible - } else { - Tabulatr.updateTable({append: true}, $(event.currentTarget).data('table')); - } - } - }; $('.tabulatr_table').each(function(ix, el){ if($('.pagination[data-table="'+ $(el).attr('id') +'"]').length == 0){ $('.pagination_trigger[data-table="'+ $(el).attr('id') +'"]').bind('inview', cbfn); } @@ -452,5 +440,19 @@ select.parents('.controls').find(".from_to").show().removeClass('hidden'); } else { select.parents('.controls').find(".from_to").hide().val(''); } }); + + +var cbfn = function(event, isInView, visiblePartX, visiblePartY) { + if (isInView) { + // element is now visible in the viewport + if (visiblePartY == 'top') { + // top part of element is visible + } else if (visiblePartY == 'bottom') { + // bottom part of element is visible + } else { + Tabulatr.updateTable({append: true}, $(event.currentTarget).data('table')); + } + } +}; \ No newline at end of file