Revision fa515ecf
Von Moritz Bunkus vor mehr als 13 Jahren hinzugefügt
bin/mozilla/am.pl | ||
---|---|---|
2687 | 2687 |
$units = AM->retrieve_units(\%myconfig, $form); |
2688 | 2688 |
my $ddbox = AM->unit_select_data($units, undef, 1); |
2689 | 2689 |
|
2690 |
my $updownlink = build_std_url("action=swap_units"); |
|
2691 |
|
|
2692 | 2690 |
$form->{"title"} = $locale->text("Add and edit units"); |
2693 | 2691 |
$form->header(); |
2694 | 2692 |
print($form->parse_html_template("am/edit_units", |
2695 | 2693 |
{ "UNITS" => \@unit_list, |
2696 | 2694 |
"NEW_BASE_UNIT_DDBOX" => $ddbox, |
2697 | 2695 |
"LANGUAGES" => \@languages, |
2698 |
"updownlink" => $updownlink }));
|
|
2696 |
})); |
|
2699 | 2697 |
|
2700 | 2698 |
$main::lxdebug->leave_sub(); |
2701 | 2699 |
} |
... | ... | |
2933 | 2931 |
$main::lxdebug->leave_sub(); |
2934 | 2932 |
} |
2935 | 2933 |
|
2936 |
sub swap_units { |
|
2937 |
$main::lxdebug->enter_sub(); |
|
2938 |
|
|
2939 |
my $form = $main::form; |
|
2940 |
my %myconfig = %main::myconfig; |
|
2941 |
|
|
2942 |
$main::auth->assert('config'); |
|
2943 |
|
|
2944 |
my $dir = $form->{"dir"} eq "down" ? "down" : "up"; |
|
2945 |
AM->swap_units(\%myconfig, $form, $dir, $form->{"name"}); |
|
2946 |
|
|
2947 |
edit_units(); |
|
2948 |
|
|
2949 |
$main::lxdebug->leave_sub(); |
|
2950 |
} |
|
2951 |
|
|
2952 | 2934 |
sub add_tax { |
2953 | 2935 |
$main::lxdebug->enter_sub(); |
2954 | 2936 |
|
Auch abrufbar als: Unified diff
Sortieren von Einheiten auf Drag-n-Drop & AJAX mittels jQuery UI Sortable umgestellt