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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt (-4 / +3 lines)
Lines 807-813 Link Here
807
807
808
        [% IF Koha.Preference('FilterSearchResultsByLoggedInBranch') %]
808
        [% IF Koha.Preference('FilterSearchResultsByLoggedInBranch') %]
809
            $(document).ready( function() {
809
            $(document).ready( function() {
810
                if ( Cookies.get("show_local_items") == 'local' )  {
810
                if (localStorage.getItem("show_local_items") === 'local') {
811
                    $('#toggleitems').click();
811
                    $('#toggleitems').click();
812
                }
812
                }
813
            });
813
            });
Lines 823-831 Link Here
823
823
824
                $(this).toggleClass('show-local-items show-all-items');
824
                $(this).toggleClass('show-local-items show-all-items');
825
                if ($(this).hasClass('show-local-items')) {
825
                if ($(this).hasClass('show-local-items')) {
826
                    Cookies.set("show_local_items", 'all', { path: '/', sameSite: 'Lax' });
826
                    localStorage.setItem("show_local_items", 'all');
827
                } else {
827
                } else {
828
                    Cookies.set("show_local_items", 'local', { path: '/', sameSite: 'Lax' });
828
                    localStorage.setItem("show_local_items", 'local');
829
                }
829
                }
830
            });
830
            });
831
        [% END %]
831
        [% END %]
832
- 

Return to bug 37883