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 834-840 Link Here
834
834
835
        [% IF Koha.Preference('FilterSearchResultsByLoggedInBranch') %]
835
        [% IF Koha.Preference('FilterSearchResultsByLoggedInBranch') %]
836
            $(document).ready( function() {
836
            $(document).ready( function() {
837
                if ( Cookies.get("show_local_items") == 'local' )  {
837
                if (localStorage.getItem("show_local_items") === 'local') {
838
                    $('#toggleitems').click();
838
                    $('#toggleitems').click();
839
                }
839
                }
840
            });
840
            });
Lines 850-858 Link Here
850
850
851
                $(this).toggleClass('show-local-items show-all-items');
851
                $(this).toggleClass('show-local-items show-all-items');
852
                if ($(this).hasClass('show-local-items')) {
852
                if ($(this).hasClass('show-local-items')) {
853
                    Cookies.set("show_local_items", 'all', { path: '/', sameSite: 'Lax' });
853
                    localStorage.setItem("show_local_items", 'all');
854
                } else {
854
                } else {
855
                    Cookies.set("show_local_items", 'local', { path: '/', sameSite: 'Lax' });
855
                    localStorage.setItem("show_local_items", 'local');
856
                }
856
                }
857
            });
857
            });
858
        [% END %]
858
        [% END %]
859
- 

Return to bug 37883