/[Frey]/trunk/lib/Frey/Web/Design.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/Frey/Web/Design.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 152 by dpavlin, Wed Jul 16 21:51:23 2008 UTC revision 153 by dpavlin, Wed Jul 16 23:21:19 2008 UTC
# Line 2  package Frey::Web::Design; Line 2  package Frey::Web::Design;
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    
# Line 14  use Data::Dump qw/dump/; Line 15  use Data::Dump qw/dump/;
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]',
# Line 59  around 'field_label' => sub { Line 65  around 'field_label' => sub {
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          }          }

Legend:
Removed from v.152  
changed lines
  Added in v.153

  ViewVC Help
Powered by ViewVC 1.1.26