PartPicker: Ergebnisse im Dialog nach Blättern initialisieren.
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Mon, 25 Jan 2021 18:58:27 +0000 (19:58 +0100)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Mon, 25 Jan 2021 18:58:27 +0000 (19:58 +0100)
Sonst kann man nur auf der ersten Seite Ergebnisse auswählen.

Behebt #462 (redmine)

js/kivi.Part.js
templates/webpages/part/_part_picker_result.html
templates/webpages/part/part_picker_search.html

index 4f813bb..ccc775a 100644 (file)
@@ -565,7 +565,9 @@ namespace('kivi.Part', function(ns) {
       var self = this;
       kivi.popup_dialog({
         url: 'controller.pl?action=Part/part_picker_search',
-        data: self.pp.ajax_data(this.pp.$dummy.val()),
+        data: $.extend({
+          real_id: self.pp.real_id,
+        }, self.pp.ajax_data(this.pp.$dummy.val())),
         id: 'part_selection',
         dialog: {
           title: kivi.t8('Part picker'),
index ed8ad78..cdcbf8d 100644 (file)
@@ -30,3 +30,6 @@
 <div style='clear:both'></div>
 
 [% L.paginate_controls(target='#part_picker_result', selector='#part_picker_result', models=SELF.models) %]
+<script type='text/javascript'>
+  $('#'+$('#part_picker_real_id').val()).data("part_picker").dialog.init_results();
+</script>
index 49b08c4..3147fd1 100644 (file)
@@ -5,6 +5,7 @@
 
 <div style='overflow:hidden'>
 
+[% L.hidden_tag('part_picker_real_id', FORM.real_id) %]
 [% LxERP.t8("Filter") %]: [% L.input_tag('part_picker_filter', search_term, class='part_picker_filter') %]
 
 <div class='float-right'>