Revision 7e4d9e8e
Von Bernd Bleßmann vor etwa 2 Monaten hinzugefügt
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), |
Auch abrufbar als: Unified diff
weitere Picker: Zum direkten Lostippen bei Klick das Input-Feld selektieren.