|
Lines 201-209
Link Here
|
| 201 |
table_settings['columns'].unshift({cannot_be_modified: 1, cannot_be_toggled: 1, columnname: 'itemnumber', is_hidden: 0}); |
201 |
table_settings['columns'].unshift({cannot_be_modified: 1, cannot_be_toggled: 1, columnname: 'itemnumber', is_hidden: 0}); |
| 202 |
[% END %] |
202 |
[% END %] |
| 203 |
</script> |
203 |
</script> |
| 204 |
|
|
|
| 205 |
<script> |
204 |
<script> |
| 206 |
$(document).ready(function() { |
205 |
$(document).ready(function () { |
| 207 |
var lostitems_table = $("#lostitems-table").kohaTable( |
206 |
var lostitems_table = $("#lostitems-table").kohaTable( |
| 208 |
{ |
207 |
{ |
| 209 |
order: [], |
208 |
order: [], |
|
Lines 216-229
Link Here
|
| 216 |
|
215 |
|
| 217 |
function itemSelectionBuildExportLink() { |
216 |
function itemSelectionBuildExportLink() { |
| 218 |
var itemnumbers = new Array(); |
217 |
var itemnumbers = new Array(); |
| 219 |
$("input[name='itemnumber'][type='checkbox']:checked").each(function() { |
218 |
$("input[name='itemnumber'][type='checkbox']:checked").each(function () { |
| 220 |
itemnumbers.push($(this).val()); |
219 |
itemnumbers.push($(this).val()); |
| 221 |
}); |
220 |
}); |
| 222 |
if (itemnumbers.length > 0) { |
221 |
if (itemnumbers.length > 0) { |
| 223 |
var csv_profile_id = $("#csv_profile_id option:selected").val(); |
222 |
var csv_profile_id = $("#csv_profile_id option:selected").val(); |
| 224 |
var url = '/cgi-bin/koha/reports/itemslost.pl?op=export&csv_profile_id='+csv_profile_id; |
223 |
var url = "/cgi-bin/koha/reports/itemslost.pl?op=export&csv_profile_id=" + csv_profile_id; |
| 225 |
url += '&itemnumber=' + itemnumbers.join('&itemnumber='); |
224 |
url += "&itemnumber=" + itemnumbers.join("&itemnumber="); |
| 226 |
$('a.itemselection_action_export').attr('href', url); |
225 |
$("a.itemselection_action_export").attr("href", url); |
| 227 |
} else { |
226 |
} else { |
| 228 |
return false; |
227 |
return false; |
| 229 |
} |
228 |
} |
|
Lines 233-264
Link Here
|
| 233 |
function itemSelectionBuildActionLinks() { |
232 |
function itemSelectionBuildActionLinks() { |
| 234 |
var export_link_ok = itemSelectionBuildExportLink(); |
233 |
var export_link_ok = itemSelectionBuildExportLink(); |
| 235 |
if (export_link_ok) { |
234 |
if (export_link_ok) { |
| 236 |
$('.itemselection_actions').show(); |
235 |
$(".itemselection_actions").show(); |
| 237 |
} else { |
236 |
} else { |
| 238 |
$('.itemselection_actions').hide(); |
237 |
$(".itemselection_actions").hide(); |
| 239 |
} |
238 |
} |
| 240 |
} |
239 |
} |
| 241 |
|
240 |
|
| 242 |
itemSelectionBuildActionLinks(); |
241 |
itemSelectionBuildActionLinks(); |
| 243 |
|
242 |
|
| 244 |
$("input[name='itemnumber'][type='checkbox']").change(function() { |
243 |
$("input[name='itemnumber'][type='checkbox']").change(function () { |
| 245 |
itemSelectionBuildActionLinks(); |
244 |
itemSelectionBuildActionLinks(); |
| 246 |
}); |
245 |
}); |
| 247 |
$("#csv_profile_id").change(function() { |
246 |
$("#csv_profile_id").change(function () { |
| 248 |
itemSelectionBuildActionLinks(); |
247 |
itemSelectionBuildActionLinks(); |
| 249 |
}); |
248 |
}); |
| 250 |
|
249 |
|
| 251 |
$(".SelectAll").on("click",function(e){ |
250 |
$(".SelectAll").on("click", function (e) { |
| 252 |
e.preventDefault(); |
251 |
e.preventDefault(); |
| 253 |
$("#lostitems-table input:checkbox").each(function(){ |
252 |
$("#lostitems-table input:checkbox").each(function () { |
| 254 |
$(this).prop("checked", true); |
253 |
$(this).prop("checked", true); |
| 255 |
}); |
254 |
}); |
| 256 |
itemSelectionBuildActionLinks(); |
255 |
itemSelectionBuildActionLinks(); |
| 257 |
}); |
256 |
}); |
| 258 |
|
257 |
|
| 259 |
$(".ClearAll").on("click",function(e){ |
258 |
$(".ClearAll").on("click", function (e) { |
| 260 |
e.preventDefault(); |
259 |
e.preventDefault(); |
| 261 |
$("#lostitems-table input:checkbox").each(function(){ |
260 |
$("#lostitems-table input:checkbox").each(function () { |
| 262 |
$(this).prop("checked", false); |
261 |
$(this).prop("checked", false); |
| 263 |
}); |
262 |
}); |
| 264 |
itemSelectionBuildActionLinks(); |
263 |
itemSelectionBuildActionLinks(); |