Revision 560

Date:
2016/03/31 14:42:46
Author:
ahitrov
Revision Log:
Extended format for iattrs in images and binaries

Files:

Legend:

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

     
    33 33
    34 34 % foreach my $iattr (@{ $iattrs })
    35 35 % {
    36 % next if ( ($iattr eq 'filename') || ($iattr eq 'width') || ($iattr eq 'height') );
    37 % if($iattr eq 'mini') {
    36 % next if ( !ref $iattr && ($iattr eq 'filename') || ($iattr eq 'width') || ($iattr eq 'height') );
    37 % if ( ref $iattr eq 'ARRAY' ) {
    38 <tr><td><font size="-1" color="#888888"><% $iattr->[1] %> (<% $iattr->[0] %>):</font></td></tr>
    39 <tr><td><input type="text" name="<% $attr %>.<% $iattr->[0] %>" size="60" value="<% html_escape($IMAGE->{$iattr->[0]}) %>" style="width:95%;font-family:arial;font-size:9pt;"></td></tr>
    40 % } elsif ( ref $iattr eq 'HASH' ) {
    41 <tr><td><font size="-1" color="#888888"><% $iattr->{name} %> (<% $iattr->{attr} %>):</font></td></tr>
    42 <tr><td><input type="text" name="<% $attr %>.<% $iattr->{attr} %>" size="60" value="<% html_escape($IMAGE->{$iattr->{attr}}) %>" style="width:95%;font-family:arial;font-size:9pt;"></td></tr>
    43 % } elsif ( $iattr eq 'mini' ) {
    38 44 <tr><td><font size="-1" color="#888888">name="<% $attr %>_mini"</font> </td></tr>
    39 45 <tr><td><input type="file" name="<% $attr %>_mini" style="width:95%;font-family:arial;font-size:9pt;"></td></tr>
    40 46 % if (exists($IMAGE->{mini}->{filename}) )
     
    73 79 <%INIT>
    74 80
    75 81 my $iattrs = $prop->{iattrs};
    76 $iattrs ||= ['alt'];
    82 $iattrs = ['alt'] unless $iattrs;
    77 83
    78 84 my $ATTRNAMES = {
    79 85 'alt' => 'Подпись',
  • utf8/core/comps/contenido/components/inputs/multimedia_new.msn

     
    33 33 % }
    34 34 %
    35 35 % foreach my $iattr (sort (@{ $iattrs })) {
    36 % next if ( ($iattr eq 'filename') || ($iattr eq 'mini') || ($iattr eq 'width') || ($iattr eq 'height') );
    36 % next if ( !ref $iattr && ($iattr eq 'filename') || ($iattr eq 'mini') || ($iattr eq 'width') || ($iattr eq 'height') );
    37 % if ( ref $iattr eq 'ARRAY' ) {
    38 <tr><td><font size="-1" color="#888888"><% $iattr->[1] %> (<% $iattr->[0] %>):</font></td></tr>
    39 <tr><td><input type="text" name="<% $attr %>.<% $iattr->[0] %>" size="60" value="<% html_escape($MULTI->{$iattr->[0]}) %>" style="width:95%;font-family:arial;font-size:9pt;"></td></tr>
    40 % } elsif ( ref $iattr eq 'HASH' ) {
    41 <tr><td><font size="-1" color="#888888"><% $iattr->{name} %> (<% $iattr->{attr} %>):</font></td></tr>
    42 <tr><td><input type="text" name="<% $attr %>.<% $iattr->{attr} %>" size="60" value="<% html_escape($MULTI->{$iattr->{attr}}) %>" style="width:95%;font-family:arial;font-size:9pt;"></td></tr>
    43 % } else {
    37 44 <tr><td><font size="-1" color="#888888"><% $ATTRNAMES->{$iattr} %> (<% $iattr %>):</font></td></tr>
    38 45 <tr><td><input type="text" name="<% $attr %>.<% $iattr %>" size="60" value="<% html_escape($MULTI->{$iattr}) %>" style="width:95%;font-family:arial;font-size:9pt;"></td></tr>
    46 % }
    39 47 % }
    40 48 <tr><td><input type="checkbox" name="_delete_multi.<% $attr %>" value="1">Удалить<br><br></td></tr>
    41 49 </td></tr></table>
     
    56 64 <%INIT>
    57 65
    58 66 my $iattrs = $prop->{iattrs};
    59 $iattrs ||= ['alt'];
    67 $iattrs = ['alt'] unless $iattrs;
    60 68
    61 69 my $ATTRNAMES = {
    62 70 'alt' => 'Название',