Bug 22785: (follow-up) Don't sort by chosen and fix selection of matches
Previously the sorting took 'chosen' into account and would move a selected match to the top on next load - it is better to preserve the same sorting every time When loading matches the 'cehcked' variable was not being cleared, so multiple matches were being marked 'checked="checked"'. Fixing this ensures the correct record displays as chosen Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Ben Daeuber <bdaeuber@cityoffargo.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
4af59f5751
commit
4d12caecea
|
|
@ -1485,7 +1485,7 @@ sub GetImportRecordMatches {
|
|||
JOIN import_record_matches USING (import_record_id)
|
||||
LEFT JOIN biblio ON (biblionumber = candidate_match_id)
|
||||
WHERE import_record_id = ?
|
||||
ORDER BY score DESC, chosen DESC, biblionumber DESC");
|
||||
ORDER BY score DESC, biblionumber DESC");
|
||||
$sth->bind_param(1, $import_record_id);
|
||||
my $results = [];
|
||||
$sth->execute();
|
||||
|
|
|
|||
|
|
@ -582,8 +582,8 @@
|
|||
);
|
||||
$('td:eq(5) ul', nRow).append('<li><a href="'
|
||||
+ diff_url.format( [% import_batch_id | html %], aData['import_record_id'], item.candidate_match_id, item.record_type) + '">' + _("View") + '</a></li>');
|
||||
checked = "";
|
||||
});
|
||||
checked = "";
|
||||
if( !any_checked ){ checked = 'checked="checked"'; }
|
||||
$('td:eq(4) ul', nRow).prepend('<li><label><input type="radio" data-import_record_id="'+aData['import_record_id']+'" class="chosen" name="import_record_id_'+aData['import_record_id']+'_match" value="none" ' + checked + disabled + ' > Ignore matches</label></li>');
|
||||
$('td:eq(5) ul', nRow).prepend('<li> </li>');
|
||||
|
|
|
|||
Loading…
Reference in New Issue