Revision a2aca2e1
Von Moritz Bunkus vor mehr als 16 Jahren hinzugefügt
bin/mozilla/ct.pl | ||
---|---|---|
108 | 108 |
|
109 | 109 |
$form->{IS_CUSTOMER} = $form->{db} eq 'customer'; |
110 | 110 |
|
111 |
report_generator_set_default_sort('name', 1); |
|
112 |
|
|
111 | 113 |
CT->search(\%myconfig, \%$form); |
112 | 114 |
|
113 | 115 |
my $cvar_configs = CVar->get_configs('module' => 'CT'); |
... | ... | |
159 | 161 |
my @hidden_variables = (qw(db status obsolete), map { "l_$_" } @columns); |
160 | 162 |
my @hidden_nondefault = grep({ $form->{$_} } @hidden_variables); |
161 | 163 |
my $callback = build_std_url('action=list_names', grep { $form->{$_} } @hidden_variables); |
162 |
$form->{callback} = "$callback&sort=" . E($form->{sort}); |
|
164 |
$form->{callback} = "$callback&sort=" . E($form->{sort}) . "&sortdir=" . E($form->{sortdir});
|
|
163 | 165 |
|
164 |
map { $column_defs{$_}->{link} = "${callback}&sort=${_}" } @columns; |
|
166 |
foreach (@columns) { |
|
167 |
my $sortdir = $form->{sort} eq $_ ? 1 - $form->{sortdir} : $form->{sortdir}; |
|
168 |
$column_defs{$_}->{link} = "${callback}&sort=${_}&sortdir=${sortdir}"; |
|
169 |
} |
|
165 | 170 |
|
166 | 171 |
my ($ordertype, $quotationtype, $attachment_basename); |
167 | 172 |
if ($form->{IS_CUSTOMER}) { |
... | ... | |
192 | 197 |
|
193 | 198 |
$report->set_export_options('list_names', @hidden_variables); |
194 | 199 |
|
195 |
$report->set_sort_indicator($form->{sort}, 1);
|
|
200 |
$report->set_sort_indicator($form->{sort}, $form->{sortdir});
|
|
196 | 201 |
|
197 | 202 |
CVar->add_custom_variables_to_report('module' => 'CT', |
198 | 203 |
'trans_id_field' => 'id', |
Auch abrufbar als: Unified diff
Sortierung in Berichten über Kunden und Lieferanten auch auf- und absteigbar sortierbar gemacht.