Revision 65e51d8e
Von Bernd Bleßmann vor fast 4 Jahren hinzugefügt
SL/Presenter/Part.pm | ||
---|---|---|
245 | 245 |
parts will be used for autocompletion which partnumber is a vendor partnumber |
246 | 246 |
(makemodel) or a customer partnumber. |
247 | 247 |
|
248 |
If C<%params> contains C<multiple> an alternative popup will be opened, |
|
249 |
allowing multiple items to be selected. Note however that this requires |
|
250 |
an additional callback C<set_multi_items> to work. |
|
251 |
Also note that you can set C<multiple> to 0 (or not set C<multiple>) on |
|
252 |
creation of the picker, but can open the alternative multi select popup |
|
253 |
with js like this: |
|
254 |
C<$("#pp_id").data("part_picker").o.multiple=1; $("#pp_id").data("part_picker").open_dialog()'> |
|
255 |
where C<pp_id> is the dom id of the part picker. |
|
256 |
Or you can even do it the other way round setting C<multiple> to 1 on creation |
|
257 |
and open a single selection popup with js. |
|
258 |
|
|
248 | 259 |
Obsolete parts will by default not be displayed for selection. However they are |
249 | 260 |
accepted as default values and can persist during updates. As with other |
250 | 261 |
selectors though, they are not selectable once overridden. |
... | ... | |
278 | 289 |
undefined. |
279 | 290 |
|
280 | 291 |
After that the action C<commit_one> will be executed, which defaults to |
281 |
opening a popup dialog for graphical interaction. If C<params> contains |
|
282 |
C<multiple> an alternative popup will be opened, allowing multiple items to be |
|
283 |
selected. Note however that this requires an additional callback |
|
284 |
C<set_multi_items> to work. |
|
292 |
opening a popup dialog for graphical interaction. |
|
285 | 293 |
|
286 | 294 |
=item * C<commit_none> |
287 | 295 |
|
Auch abrufbar als: Unified diff
PartPicker: Option für Mehrfachauswahl als default merken
Damit lässt sich die Option via js ändern, um z.B. einen Dialog
mit Mehrfachauswahl über einen Knopf zu öffnen, während die
Funktion der Lupe bei der Einfachauswahl bleibt (oder andersherum).