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

(-)a/koha-tmpl/intranet-tmpl/js/browser.js (-4 / +13 lines)
Lines 60-68 KOHA.browser = function (searchid, biblionumber) { Link Here
60
        }
60
        }
61
        $.cookie(me.searchid, JSON.stringify(me.searchCookie), { path: '/' });
61
        $.cookie(me.searchid, JSON.stringify(me.searchCookie), { path: '/' });
62
        $(document).ready(function () {
62
        $(document).ready(function () {
63
            $('#searchresults table tr a[href*="detail.pl"]').click(function (ev) {
63
            //FIXME It's not a good idea to modify the click events
64
                ev.preventDefault();
64
            $('#searchresults table tr a[href*="detail.pl"]').on('mousedown', function (ev) {
65
                window.location = $(this).attr('href') + '&searchid=' + me.searchid;
65
                if ( ev.which == 2 || ev.which == 1 && ev.ctrlKey ) {
66
                    // Middle click or ctrl + click
67
                    ev.preventDefault();
68
                    var newwindow = window.open( $(this).attr('href') + '&searchid=' + me.searchid, '_blank' )
69
                    newwindow.blur();
70
                    window.focus();
71
                } else if ( ev.which == 1 ) {
72
                    // Left click
73
                    ev.preventDefault();
74
                    window.location = $(this).attr('href') + '&searchid=' + me.searchid;
75
                }
66
            });
76
            });
67
        });
77
        });
68
    };
78
    };
69
- 

Return to bug 11890