package SortableList;
use strict;
use warnings;
use base qw(CGI::Application);
use CGI::Application::Plugin::TT;
use CGI::Application::Plugin::HTMLPrototype;
use CGI::Application::Plugin::ViewSource;
sub setup {
my $self = shift;
$self->run_modes([qw(
start
)]);
}
sub start {
my $self = shift;
return $self->tt_process(\*DATA);
}
1;
__DATA__
CGI::Application::Plugin::HTMLPrototype - SortableList Example
[% c.prototype.define_javascript_functions %]
CGI::Application::Plugin::HTMLPrototype - SortableList Example
Code: SortableList source
Sortable lists
- Item 1.1
- Item 1.2
- Item 1.3
- Item 1.4
- Item 2.1
- Item 2.2
- Item 2.3
- Item 2.4
[% c.prototype.sortable_element( 'sortablelist_1' { containment='["sortablelist_1","sortablelist_2"]' } ) %]
[% c.prototype.sortable_element( 'sortablelist_2' { containment='["sortablelist_1","sortablelist_2"]' } ) %]