|
Lines 440-446
Link Here
|
| 440 |
'data': aoData, |
440 |
'data': aoData, |
| 441 |
'success': function(json){ |
441 |
'success': function(json){ |
| 442 |
// redirect if there is only 1 result. |
442 |
// redirect if there is only 1 result. |
| 443 |
if ( json.aaData.length == 1 ) { |
443 |
if ( json.aaData.length == 1 && aoData.iDisplayStart == 0 ) { |
| 444 |
var borrowernumber = json.aaData[0].borrowernumber; |
444 |
var borrowernumber = json.aaData[0].borrowernumber; |
| 445 |
/* Overwrite history state of firstletter search since only one result was returned; This prevents a loop upon clicking back */ |
445 |
/* Overwrite history state of firstletter search since only one result was returned; This prevents a loop upon clicking back */ |
| 446 |
history.replaceState( {}, null, window.location.href.split("?" )[0]); |
446 |
history.replaceState( {}, null, window.location.href.split("?" )[0]); |
| 447 |
- |
|
|