Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 117fefac

Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt

ActsAsList: Neue Funktion "reorder_list"

Conflicts:
SL/Controller/ProjectType.pm

Unterschiede anzeigen:

SL/Controller/PaymentTerm.pm
68 68
sub action_reorder {
69 69
  my ($self) = @_;
70 70

  
71
  my @ids = @{ $::form->{payment_term_id} || [] };
72
  my $result = SL::DB::PaymentTerm->new->db->do_transaction(sub {
73
    foreach my $idx (0 .. scalar(@ids) - 1) {
74
      SL::DB::PaymentTerm->new(id => $ids[$idx])->load->update_attributes(sortkey => $idx + 1);
75
    }
76
  });
71
  SL::DB::PaymentTerm->reorder_list(@{ $::form->{payment_term_id} || [] });
77 72

  
78 73
  $self->render('1;', { type => 'js', inline => 1 });
79 74
}

Auch abrufbar als: Unified diff