Revision 7e4d9e8e
Von Bernd Bleßmann vor 7 Monaten hinzugefügt
SL/Presenter/CustomerVendor.pm | ||
---|---|---|
66 | 66 |
|
67 | 67 |
my $show_details = delete $params{show_details} // 0; |
68 | 68 |
|
69 |
# If there is no 'onClick' parameter, set it to 'this.select()', |
|
70 |
# so that the user can type directly in the input field |
|
71 |
# to search another customer/vendor. |
|
72 |
if (!grep { m{onclick}i } keys %params) { |
|
73 |
$params{onClick} = 'this.select()'; |
|
74 |
} |
|
75 |
|
|
69 | 76 |
my $ret = |
70 | 77 |
input_tag($name, (ref $value && $value->can('id') ? $value->id : ''), class => "@classes", type => 'hidden', id => $id, |
71 | 78 |
'data-customer-vendor-picker-data' => JSON::to_json(\%params), |
SL/Presenter/Part.pm | ||
---|---|---|
44 | 44 |
my @classes = $params{class} ? ($params{class}) : (); |
45 | 45 |
push @classes, 'part_autocomplete'; |
46 | 46 |
|
47 |
# If there is no 'onClick' parameter, set it to 'this.select()', |
|
48 |
# so that the user can type directly in the input field |
|
49 |
# to search another part. |
|
50 |
if (!grep { m{onclick}i } keys %params) { |
|
51 |
$params{onClick} = 'this.select()'; |
|
52 |
} |
|
53 |
|
|
47 | 54 |
my $ret = |
48 | 55 |
input_tag($name, (ref $value && $value->can('id') ? $value->id : ''), class => "@classes", type => 'hidden', id => $id, |
49 | 56 |
'data-part-picker-data' => JSON::to_json(\%params), |
SL/Presenter/Project.pm | ||
---|---|---|
46 | 46 |
|
47 | 47 |
my %data_params = map { $_ => delete $params{$_} } grep { defined $params{$_} } qw(customer_id active valid description_style); |
48 | 48 |
|
49 |
# If there is no 'onClick' parameter, set it to 'this.select()', |
|
50 |
# so that the user can type directly in the input field |
|
51 |
# to search another project. |
|
52 |
if (!grep { m{onclick}i } keys %params) { |
|
53 |
$params{onClick} = 'this.select()'; |
|
54 |
} |
|
55 |
|
|
49 | 56 |
my $ret = |
50 | 57 |
input_tag($name, (ref $value && $value->can('id') ? $value->id : ''), class => "@classes", type => 'hidden', id => $id, |
51 | 58 |
'data-project-picker-data' => JSON::to_json(\%data_params), |
Auch abrufbar als: Unified diff
weitere Picker: Zum direkten Lostippen bei Klick das Input-Feld selektieren.