2 |
use Moose; |
use Moose; |
3 |
extends 'Frey::Web::Item'; |
extends 'Frey::Web::Item'; |
4 |
with 'Frey::Web::Button'; |
with 'Frey::Web::Button'; |
5 |
|
with 'Frey::Storage'; |
6 |
|
|
7 |
=head1 NAME |
=head1 NAME |
8 |
|
|
15 |
has 'labels' => ( |
has 'labels' => ( |
16 |
is => 'rw', |
is => 'rw', |
17 |
isa => 'HashRef[Str]', |
isa => 'HashRef[Str]', |
18 |
default => sub { {} }, |
lazy_build => 1, |
19 |
); |
); |
20 |
|
|
21 |
|
sub _build_labels { |
22 |
|
my $self = shift; |
23 |
|
$self->load( 'var/design/' . $self->fey_class . '-labels' ) || {} |
24 |
|
}; |
25 |
|
|
26 |
has 'label_order' => ( |
has 'label_order' => ( |
27 |
is => 'rw', |
is => 'rw', |
28 |
isa => 'HashRef[Int]', |
isa => 'HashRef[Int]', |
65 |
# XXX we really need this since we are in continutation and have old value! |
# XXX we really need this since we are in continutation and have old value! |
66 |
$caller->value( $val ); |
$caller->value( $val ); |
67 |
warn "## saved $val new labels = ",dump( $self->labels, $caller->value ); |
warn "## saved $val new labels = ",dump( $self->labels, $caller->value ); |
68 |
|
$self->store( 'var/design/' . $self->fey_class . '-labels', $self->labels ); |
69 |
} |
} |
70 |
); |
); |
71 |
} |
} |