Lines 1-4
Link Here
|
1 |
/* global KOHA biblionumber new_results_browser addMultiple vShelfAdd openWindow search_result SEARCH_RESULTS PREF_AmazonCoverImages PREF_LocalCoverImages PREF_IntranetCoce PREF_CoceProviders CoceHost CoceProviders addRecord delSingleRecord PREF_BrowseResultSelection resetSearchContext addBibToContext delBibToContext getContextBiblioNumbers MSG_NO_ITEM_SELECTED MSG_NO_ITEM_SELECTED holdfor_cardnumber holdforclub strQuery MSG_NON_RESERVES_SELECTED PREF_NotHighlightedWords PLACE_HOLD */ |
1 |
/* global KOHA biblionumber new_results_browser addMultiple vShelfAdd openWindow search_result SEARCH_RESULTS PREF_AmazonCoverImages PREF_LocalCoverImages PREF_IntranetCoce PREF_CoceProviders CoceHost CoceProviders addRecord delSingleRecord PREF_BrowseResultSelection resetSearchContext addBibToContext delBibToContext getContextBiblioNumbers MSG_NO_ITEM_SELECTED MSG_NO_ITEM_SELECTED holdfor_cardnumber holdforclub strQuery MSG_NON_RESERVES_SELECTED PREF_NotHighlightedWords PLACE_HOLD _ */ |
2 |
|
2 |
|
3 |
if( PREF_AmazonCoverImages ){ |
3 |
if( PREF_AmazonCoverImages ){ |
4 |
$(window).load(function() { |
4 |
$(window).load(function() { |
Lines 152-157
$(document).ready(function() {
Link Here
|
152 |
} |
152 |
} |
153 |
|
153 |
|
154 |
$(".selection").change(function(){ |
154 |
$(".selection").change(function(){ |
|
|
155 |
if( $(".selection:checked").length > 0 ){ |
156 |
toggleBatchOp( true ); |
157 |
} else { |
158 |
toggleBatchOp( false ); |
159 |
} |
155 |
if ( $(this).is(':checked') == true ) { |
160 |
if ( $(this).is(':checked') == true ) { |
156 |
addBibToContext( $(this).val() ); |
161 |
addBibToContext( $(this).val() ); |
157 |
} else { |
162 |
} else { |
Lines 170-175
$(document).ready(function() {
Link Here
|
170 |
} |
175 |
} |
171 |
} |
176 |
} |
172 |
}); |
177 |
}); |
|
|
178 |
|
179 |
if( $(".selection:checked") > 0 ){ |
180 |
toggleBatchOp( true ); |
181 |
} |
182 |
|
183 |
$(".results_batch_op").on("click", function(e){ |
184 |
e.preventDefault(); |
185 |
var op = $(this).data("op"); |
186 |
resultsBatchProcess( op ); |
187 |
}); |
173 |
}); |
188 |
}); |
174 |
|
189 |
|
175 |
|
190 |
|
Lines 306-308
function verify_images() {
Link Here
|
306 |
} |
321 |
} |
307 |
}); |
322 |
}); |
308 |
} |
323 |
} |
309 |
- |
324 |
|
|
|
325 |
function toggleBatchOp( b ){ |
326 |
var results_batch_ops = $("#results_batch_ops"); |
327 |
if( b ){ |
328 |
results_batch_ops.removeClass("disabled"); |
329 |
} else { |
330 |
results_batch_ops.addClass("disabled"); |
331 |
} |
332 |
} |
333 |
|
334 |
function resultsBatchProcess( op ){ |
335 |
var selected = $(".selection:checked"); |
336 |
var params = []; |
337 |
var url = ""; |
338 |
if( op == "edit" ){ |
339 |
// batch edit selected records |
340 |
if ( selected.length < 1 ){ |
341 |
alert( _("You must select at least one record") ); |
342 |
} else { |
343 |
selected.each(function() { |
344 |
params.push( $(this).val() ); |
345 |
}); |
346 |
url = "/cgi-bin/koha/tools/batch_record_modification.pl?op=list&bib_list=" + params.join("/"); |
347 |
location.href = url; |
348 |
} |
349 |
} else if( op == "delete" ){ |
350 |
// batch delete selected records |
351 |
if ( selected.length < 1) { |
352 |
alert( _("You must select at least one record") ); |
353 |
} else { |
354 |
selected.each(function() { |
355 |
params.push( $(this).val() ); |
356 |
}); |
357 |
url = "/cgi-bin/koha/tools/batch_delete_records.pl?op=list&type=biblio&bib_list=" + params.join("/"); |
358 |
location.href = url; |
359 |
} |
360 |
} else if( op == "merge" ){ |
361 |
// merge selected records |
362 |
if ( selected.length < 2) { |
363 |
alert( _("At least two records must be selected for merging") ); |
364 |
} else { |
365 |
selected.each(function() { |
366 |
params.push('biblionumber=' + $(this).val()); |
367 |
}); |
368 |
url = "/cgi-bin/koha/cataloguing/merge.pl?" + params.join("&"); |
369 |
location.href = url; |
370 |
} |
371 |
} else { |
372 |
return false; |
373 |
} |
374 |
} |