https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36046

--- Comment #5 from Mirjam Vantieghem <[email protected]> ---
(In reply to Owen Leonard from comment #2)
> If you add this to IntranetUserJS it will switch to the catalog search form
> on any page where the circulation form is active by default:
> 
> $(document).ready(function(){
>     if( $("#circ_search_panel").length > 0 &&
> $("#circ_search_panel").hasClass("active") ){
>         $("#header_search").selectTabByID("#catalog_search_panel");
>     }
> });

Thanks, Owen!
Our Koha version (23.11) seems to be using different terms for id/class/hrefs,
so this didn't work for us. But after taking out "_panel", to match the terms
used in our version, it worked:

$(document).ready(function(){
    if( $("#circ_search").length > 0 && $("#circ_search").hasClass("active") ){
        $("#header_search").selectTabByID("#catalog_search");
    }
});

Because we do have circulation, we didn't want this to be default on the
circulation pages, so I changed it only on homepage and Reports module pages
(all the other pages already had the desired default action) with this JQuery:

$(document).ready(function(){
    if( $("#circ_search").length > 0 && $("#circ_search").hasClass("active") ){
        $("#main_intranet-main
#header_search").selectTabByID("#catalog_search");
    }
});
$(document).ready(function(){
    if( $("#circ_search").length > 0 && $("#circ_search").hasClass("active") ){
        $(".rep #header_search").selectTabByID("#catalog_search");
    }
});

This is fine for a temporary solution, but as I've already noticed that the
terms for id/class/hrefs change after upgrades, I also think that it would be
better to have a system pref in the staff client to set this.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to