View | Details | Raw Unified | Return to bug 36302
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc (-3 / +3 lines)
Lines 226-231 Link Here
226
[%# callback: name of the JS function that will be called when a patron is selected. Only work with action=select %]
226
[%# callback: name of the JS function that will be called when a patron is selected. Only work with action=select %]
227
[%# display_search_description: boolean, default off. Display the description of the search %]
227
[%# display_search_description: boolean, default off. Display the description of the search %]
228
[%# adjust_history: boolean, default off. Change the current url when a first letter is selected %]
228
[%# adjust_history: boolean, default off. Change the current url when a first letter is selected %]
229
[%# defer_loading: boolean, default on. If true, it will not load the table until a search is triggered %]
229
[% BLOCK patron_search_js %]
230
[% BLOCK patron_search_js %]
230
231
231
    [% IF redirect_if_one_result && !redirect_url %]
232
    [% IF redirect_if_one_result && !redirect_url %]
Lines 293-299 Link Here
293
        let Sticky;
294
        let Sticky;
294
        let singleBranchMode = '[% singleBranchMode | html %]';
295
        let singleBranchMode = '[% singleBranchMode | html %]';
295
        let logged_in_library_id = "[% Branches.GetLoggedInBranchcode | html %]";
296
        let logged_in_library_id = "[% Branches.GetLoggedInBranchcode | html %]";
296
297
        let defer_loading = Number( '[% defer_loading | html %]' || 1 );
297
        [% IF adjust_history %]
298
        [% IF adjust_history %]
298
            /* popstate event triggered by forward and back button. Need to refresh search */
299
            /* popstate event triggered by forward and back button. Need to refresh search */
299
            window.addEventListener('popstate', (event) => {
300
            window.addEventListener('popstate', (event) => {
Lines 723-730 Link Here
723
                patron_search_form.find(".searchpattern").parent().hide();
724
                patron_search_form.find(".searchpattern").parent().hide();
724
            });
725
            });
725
726
726
            let urlParams = new URLSearchParams(window.location.search);
727
            if ( !defer_loading ) {
727
            if(urlParams.size > 0){
728
                patron_search_form.submit();
728
                patron_search_form.submit();
729
            }
729
            }
730
730
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt (-2 / +1 lines)
Lines 347-353 Link Here
347
    [% ELSE %]
347
    [% ELSE %]
348
        [% SET redirect_url = '/cgi-bin/koha/members/moremember.pl' %]
348
        [% SET redirect_url = '/cgi-bin/koha/members/moremember.pl' %]
349
    [% END %]
349
    [% END %]
350
    [% PROCESS patron_search_js table_id => 'memberresultst', categories => categories, libraries => libraries, columns => columns,actions => ['edit', 'checkout'], redirect_if_one_result => 1, redirect_url => redirect_url, sticky_header => "searchheader", sticky_to => "searchresults", default_sort_column => 'name-address', display_search_description => 1, remember_selections => 1, adjust_history => 1 %]
350
    [% PROCESS patron_search_js defer_loading => defer_loading, table_id => 'memberresultst', categories => categories, libraries => libraries, columns => columns,actions => ['edit', 'checkout'], redirect_if_one_result => 1, redirect_url => redirect_url, sticky_header => "searchheader", sticky_to => "searchresults", default_sort_column => 'name-address', display_search_description => 1, remember_selections => 1, adjust_history => 1 %]
351
351
352
[% END %]
352
[% END %]
353
[% INCLUDE 'intranet-bottom.inc' %]
353
[% INCLUDE 'intranet-bottom.inc' %]
354
- 

Return to bug 36302