Subversion Repositories SmartDukaan

Rev

Rev 36064 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36064 Rev 37498
Line 241... Line 241...
241
            $('#onboardingSearch').val('');
241
            $('#onboardingSearch').val('');
242
            refreshOnboardingList(0);
242
            refreshOnboardingList(0);
243
        });
243
        });
244
 
244
 
245
        // Pagination link click handler
245
        // Pagination link click handler
-
 
246
        // Fragment is re-injected with .html(), which re-runs this script; clear the
-
 
247
        // namespace first so handlers replace rather than stack.
-
 
248
        $(document).off('.partneronboardingindex');
246
        $(document).on('click', '.onboarding-page-link', function (e) {
249
        $(document).on('click.partneronboardingindex', '.onboarding-page-link', function (e) {
247
            e.preventDefault();
250
            e.preventDefault();
248
            refreshOnboardingList($(this).data('page'));
251
            refreshOnboardingList($(this).data('page'));
249
        });
252
        });
250
 
253
 
251
        // Page size change handler
254
        // Page size change handler
252
        $(document).on('change', '.onboarding-page-size', function () {
255
        $(document).on('change.partneronboardingindex', '.onboarding-page-size', function () {
253
            refreshOnboardingList(0);  // Reset to first page on size change
256
            refreshOnboardingList(0);  // Reset to first page on size change
254
        });
257
        });
255
 
258
 
256
        // Destroy existing DataTable if it exists (prevents reinitialization error on AJAX reload)
259
        // Destroy existing DataTable if it exists (prevents reinitialization error on AJAX reload)
257
        if ($.fn.DataTable.isDataTable('#example')) {
260
        if ($.fn.DataTable.isDataTable('#example')) {