Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 4af0680d

Von Bernd Bleßmann vor etwa 4 Jahren hinzugefügt

  • ID 4af0680de7454195d92003613a03dc3eca4d94d2
  • Vorgänger ed199252
  • Nachfolger 8ad661b7

PartPicker: Mehrfachauswahl: Option um Positions-Eingabefed anzuzeigen

Die Eingabe kann im Callback verwendet werden, um die Artikel an bestimmte
Positionen zu setzen.

Unterschiede anzeigen:

SL/Presenter/Part.pm
Or you can even do it the other way round setting C<multiple> to 1 on creation
and open a single selection popup with js.
If C<%params> contains C<multiple_pos_input> an input field with the dom id
C<multi_items_position> will be rendered in the alternative popup.
This can be used in the callback for C<set_multi_items> to controll the
input postion for the items.
If C<%params> contains C<multiple_limit> the alternative popup will not
show any results if there are more than C<multiple_limit> results. A warning
message is displayed in this case. Set C<multiple_limit> to 0 to disable
js/kivi.Part.js
url: 'controller.pl?action=Part/show_multi_items_dialog',
data: $.extend({
real_id: self.pp.real_id,
show_pos_input: self.pp.o.multiple_pos_input,
}, self.pp.ajax_data(this.pp.$dummy.val())),
id: 'jq_multi_items_dialog',
dialog: {
......
$('#jq_multi_items_dialog').dialog('close');
},
disable_continue: function() {
$('#multi_items_result input').off("keydown");
$('#multi_items_result input, #multi_items_position').off("keydown");
$('#continue_button').prop('disabled', true);
},
enable_continue: function() {
var self = this;
$('#multi_items_result input').keydown(function(event) {
$('#multi_items_result input, #multi_items_position').keydown(function(event) {
if(event.keyCode == KEY.ENTER) {
event.preventDefault();
self.add_multi_items();
templates/webpages/part/_multi_items_dialog.html
<div id='multi_items_result'></div>
<hr>
[%- IF FORM.show_pos_input -%]
[% 'At position' | $T8 %]
[% L.input_tag('multi_items.position', '', id='multi_items_position', size=5, class="numeric") %]
[%- END -%]
[% L.button_tag('', LxERP.t8('Continue'), id='continue_button') %]
</form>

Auch abrufbar als: Unified diff