Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 59103201

Von Bernd Bleßmann vor mehr als 4 Jahren hinzugefügt

  • ID 59103201cf9d7131024c1c3d5bbb136addb79a3f
  • Vorgänger 9fb93e8c
  • Nachfolger ffb7da30

Auftrags-Controller: Einfüge-Position eines neuen Artiklens angeben können

Unterschiede anzeigen:

SL/Controller/Order.pm
775 775
                                     SELF => $self,
776 776
  );
777 777

  
778
  $self->js
779
    ->append('#row_table_id', $row_as_html);
778
  if ($::form->{insert_before_item_id}) {
779
    $self->js
780
      ->before ('.row_entry:has(#item_' . $::form->{insert_before_item_id} . ')', $row_as_html);
781
  } else {
782
    $self->js
783
      ->append('#row_table_id', $row_as_html);
784
  }
780 785

  
781 786
  if ( $item->part->is_assortment ) {
782 787
    $form_attr->{qty_as_number} = 1 unless $form_attr->{qty_as_number};
......
800 805
                                         ID   => $item_id,
801 806
                                         SELF => $self,
802 807
      );
803
      $self->js
804
        ->append('#row_table_id', $row_as_html);
808
      if ($::form->{insert_before_item_id}) {
809
        $self->js
810
          ->before ('.row_entry:has(#item_' . $::form->{insert_before_item_id} . ')', $row_as_html);
811
      } else {
812
        $self->js
813
          ->append('#row_table_id', $row_as_html);
814
      }
805 815
    };
806 816
  };
807 817

  
808 818
  $self->js
809 819
    ->val('.add_item_input', '')
810 820
    ->run('kivi.Order.init_row_handlers')
811
    ->run('kivi.Order.row_table_scroll_down')
812 821
    ->run('kivi.Order.renumber_positions')
813 822
    ->focus('#add_item_parts_id_name');
814 823

  
824
  $self->js->run('kivi.Order.row_table_scroll_down') if !$::form->{insert_before_item_id};
825

  
815 826
  $self->js_redisplay_amounts_and_taxes;
816 827
  $self->js->render();
817 828
}
......
882 893
                                       SELF => $self,
883 894
    );
884 895

  
885
    $self->js->append('#row_table_id', $row_as_html);
896
    if ($::form->{insert_before_item_id}) {
897
      $self->js
898
        ->before ('.row_entry:has(#item_' . $::form->{insert_before_item_id} . ')', $row_as_html);
899
    } else {
900
      $self->js
901
        ->append('#row_table_id', $row_as_html);
902
    }
886 903
  }
887 904

  
888 905
  $self->js
889 906
    ->run('kivi.Order.close_multi_items_dialog')
890 907
    ->run('kivi.Order.init_row_handlers')
891
    ->run('kivi.Order.row_table_scroll_down')
892 908
    ->run('kivi.Order.renumber_positions')
893 909
    ->focus('#add_item_parts_id_name');
894 910

  
911
  $self->js->run('kivi.Order.row_table_scroll_down') if !$::form->{insert_before_item_id};
912

  
895 913
  $self->js_redisplay_amounts_and_taxes;
896 914
  $self->js->render();
897 915
}

Auch abrufbar als: Unified diff