|
Lines 11-17
KOHA.browser = function (searchid, biblionumber) {
Link Here
|
| 11 |
} |
11 |
} |
| 12 |
me.searchid = searchid; |
12 |
me.searchid = searchid; |
| 13 |
|
13 |
|
| 14 |
var searches_stored = sessionStorage.getItem('searches'); |
14 |
var searches_stored = localStorage.getItem('searches'); |
| 15 |
var current_search; |
15 |
var current_search; |
| 16 |
var searches = {}; |
16 |
var searches = {}; |
| 17 |
if ( searches_stored ) { |
17 |
if ( searches_stored ) { |
|
Lines 62-85
KOHA.browser = function (searchid, biblionumber) {
Link Here
|
| 62 |
}; |
62 |
}; |
| 63 |
} |
63 |
} |
| 64 |
searches[me.searchid] = current_search; |
64 |
searches[me.searchid] = current_search; |
| 65 |
sessionStorage.setItem('searches', JSON.stringify(searches)); |
65 |
localStorage.setItem('searches', JSON.stringify(searches)); |
| 66 |
$(document).ready(function () { |
66 |
$(document).ready(function () { |
| 67 |
//FIXME It's not a good idea to modify the click events |
67 |
$('#searchresults table tr a[href*="/detail.pl"]').each(function(){ |
| 68 |
$('#searchresults table tr a[href*="/detail.pl"]').on('click auxclick', function (ev) { |
68 |
$(this).attr('href', $(this).attr('href') + '&searchid=' + me.searchid ); |
| 69 |
ev.preventDefault(); |
|
|
| 70 |
}); |
| 71 |
$('#searchresults table tr a[href*="/detail.pl"]').on('mousedown', function (ev) { |
| 72 |
if ( ev.which == 2 || ev.which == 1 && ev.ctrlKey ) { |
| 73 |
// Middle click or ctrl + click |
| 74 |
ev.preventDefault(); |
| 75 |
var newwindow = window.open( $(this).attr('href') + '&searchid=' + me.searchid, '_blank' ); |
| 76 |
newwindow.blur(); |
| 77 |
window.focus(); |
| 78 |
} else if ( ev.which == 1 ) { |
| 79 |
// Left click |
| 80 |
ev.preventDefault(); |
| 81 |
window.location = $(this).attr('href') + '&searchid=' + me.searchid; |
| 82 |
} |
| 83 |
}); |
69 |
}); |
| 84 |
}); |
70 |
}); |
| 85 |
}; |
71 |
}; |
| 86 |
- |
|
|