Bug 15682 - Only allow merging of 2 or more records form lsits (for consistency)
Test as above but on shelves.pl Signed-off-by: Chris Cormack <chrisc@catalyst.net.z> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com> (cherry picked from commit9550e37fc6) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> (cherry picked from commit9f1e23735f) Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
parent
fc387f2fba
commit
ee3caa9163
|
|
@ -185,14 +185,18 @@ $(document).ready(function(){
|
|||
* This function checks if the adequate number of records are checked for merging
|
||||
*/
|
||||
function MergeItems() {
|
||||
var checkboxes = $("input:checkbox:checked");
|
||||
var nbCheckbox = checkboxes.length;
|
||||
if (nbCheckbox != 2) {
|
||||
alert(_("Two records must be selected for merging."));
|
||||
} else {
|
||||
location.href='/cgi-bin/koha/cataloguing/merge.pl?biblionumber=' + checkboxes[0].value + '&biblionumber=' + checkboxes[1].value;
|
||||
}
|
||||
return false;
|
||||
var checkboxes = $("input:checkbox:checked");
|
||||
if (checkboxes.length < 2) {
|
||||
alert(_("At least two records must be selected for merging."));
|
||||
} else {
|
||||
var params = [];
|
||||
$(checkboxes).each(function() {
|
||||
params.push('biblionumber=' + $(this).val());
|
||||
});
|
||||
var url = '/cgi-bin/koha/cataloguing/merge.pl?' + params.join('&');
|
||||
location.href = url;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue