1 package SL::Controller::PriceFactor;
5 use parent qw(SL::Controller::Base);
7 use SL::DB::PriceFactor;
9 __PACKAGE__->run_before('check_auth');
18 my @ids = @{ $::form->{price_factor_id} || [] };
19 my $result = SL::DB::PriceFactor->new->db->do_transaction(sub {
20 foreach my $idx (0 .. scalar(@ids) - 1) {
21 SL::DB::PriceFactor->new(id => $ids[$idx])->load->update_attributes(sortkey => $idx + 1);
25 $self->render(type => 'js', inline => '1;');
33 $::auth->assert('config');