Revision 395
- Date:
- 2013/11/15 20:43:46
- Files:
Legend:
- Added
- Removed
- Modified
-
utf8/core/comps/contenido/components/section_browse.msn
132 132 % 133 133 % } else { 134 134 % 135 <% $name | h %> \ 135 <% $name | h %>\ 136 136 % 137 137 % } 138 138 % … … 187 187 % if ( $document->$attr ) { 188 188 % $doc = $keeper->get_document_by_id( $document->$attr, %opts ); 189 189 % } 190 <td><input type="hidden" name="<% 'update_'.$document->id.'_'.$attr %>" id="<% 'update_'.$document->id.'_'.$attr %>" value="<% $document->$attr || '' %>"> 191 <input type="text" class="<% 'autocomplete_'.$attr %>" id="<% 'autocomplete_'.$document->id.'_'.$attr %>" value="<% ref $doc ? $doc->name : '' %>" 190 <td><input type="hidden" name="<% 'update_'.$document->id.'_'.$attr %>" id="<% 'update_'.$document->id.'_'.$attr %>" value="<% ($document->$attr || '') |h %>"> 191 <input type="text" class="<% 'autocomplete_'.$attr %>" id="<% 'autocomplete_'.$document->id.'_'.$attr %>" value="<% (ref $doc ? $doc->name : '') |h %>" 192 192 title="<% defined $document->$attr ? 'Значение: '.$document->$attr : '' %>" 193 193 rel="<% 'update_'.$document->id.'_'.$attr %>" style="<% $col->{inline_width} ? 'width:'.$col->{inline_width}.'px;' : '' %> <% $col->{inline_style} || '' %>" 194 old-value="<% ref $doc ? $doc->name : '' %>" onfocus="if ( )" onblur=""> 194 old-value="<% (ref $doc ? $doc->name : '') |h %>" onfocus="" onblur=""> 195 195 % } elsif ($col->{type} eq 'lookup') { 196 196 % my %opts = %{ $col->{lookup_opts} }; 197 197 % delete $opts{search_by} if exists $opts{search_by}; -
utf8/core/comps/contenido/sections.html
225 225 $updated{$oid}{$attr} = $value; 226 226 } 227 227 } 228 warn Dumper \%updated; 228 229 my %classes = map { $_->{class} => 1 } values %updated; 229 230 foreach my $update_class ( keys %classes ) { 230 231 my @ids; … … 244 245 foreach my $prop ( @props ) { 245 246 my $attr = $prop->{attr}; 246 247 my $value = ref $fields && exists $fields->{$attr} ? $fields->{$attr} : undef; 248 if ( $prop->{type} eq 'checkbox' ) { 249 $value = $value ? 1 : undef; 250 } 247 251 if ( exists $prop->{db_type} ) { 248 252 if ( $prop->{db_type} eq 'float' ) { 249 253 for ( $value ) { … … 261 265 } 262 266 } 263 267 } 264 if ( $prop->{type} eq 'checkbox' ) { 265 $value = $value ? 1 : undef; 266 } 267 268 268 269 $object->$attr($value); 269 270 }