Revision 620

Date:
2016/11/09 16:40:54
Author:
ahitrov
Revision Log:
Added default status map for status field

Files:

Legend:

 
Added
 
Removed
 
Modified
  • utf8/core/comps/contenido/components/section_browse.msn

     
    70 70 % my $class_name = $class;
    71 71 % $class_name =~ s/:/-/g;
    72 72 % my ($prop) = grep { $_->{attr} eq 'status' } $class->new( $keeper )->structure;
    73 % if ( ref $prop && exists $prop->{cases} && ref $prop->{cases} eq 'ARRAY' ) {
    73 % if ( ref $prop && $prop->{type} eq 'status' ) {
    74 74 % my @menu;
    75 % foreach my $case ( @{$prop->{cases}} ) {
    75 % foreach my $case ( @{ref $prop->{cases} eq 'ARRAY' ? $prop->{cases} : $keeper->default_status()} ) {
    76 76 % my $name = $case->[1];
    77 77 % $name =~ s/'/\\'/g;
    78 78 % my $key = $case->[0];
     
    177 177 % my $class_name = $class;
    178 178 % $class_name =~ s/:/-/g;
    179 179 % my ($prop) = grep { $_->{attr} eq 'status' } $class->new( $keeper )->structure;
    180 % if ( ref $prop && exists $prop->{cases} && ref $prop->{cases} eq 'ARRAY' ) {
    181 % if ( scalar @{$prop->{cases}} > 2 ) {
    180 % if ( ref $prop && $prop->{type} eq 'status' ) {
    181 % my @cases = @{ref $prop->{cases} eq 'ARRAY' ? $prop->{cases} : $keeper->default_status()};
    182 % if ( @cases > 2 ) {
    182 183 set_status( '.context-menu-<% $class_name %>', '<% $class_name %>' );
    183 184 % } else {
    184 185 $('.context-menu-<% $class_name %>').on('click', function( ev ) {