# }
if ( scalar (@wanted_files) > 0 ) {
$zip->addDirectory($item->part->partnumber);
- $zip->addFile(SL::File->get_file_path(dbfile => $_ ),
+ $zip->addFile($_->get_file,
Encode::encode($name_encoding,$item->part->partnumber.'/'.$_->{file_name})
) for @wanted_files;
}
ns.downloadOrderitemsAtt = function(type,id) {
var rowcount = $('input[name=rowcount]').val() - 1;
- var data = {
+ var data = {
action: 'FileManagement/download_zip',
type: type,
object_id: id,
};
if ( rowcount == 0 ) {
kivi.display_flash('error', kivi.t8('No articles have been added yet.'));
- return false;
+ return false;
}
for (var i = 1; i <= rowcount; i++) {
data['parts_id_'+i] = $('#id_' + i).val();