Revision 677

Date:
2018/04/19 09:50:39
Author:
ahitrov
Revision Log:
Editor control upgrade

Files:

Legend:

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

     
    1 Добавить значение
    1 <a style="display:block; text-align:right; width:95%; margin-top:5px;" id="string_multi_anchor_<% $name %>"
    2 href="javascript:void(0)" onclick="pairset_element_add_<% $name %>(); return false;">[+] Добавить значение</a>
    2 3 <script type="text/javascript">
    3 4 <!--
    4 5 var sFirstIndex_<% $name %> = 1;
    5 6 var sLastIndex_<% $name %> = <% $i %>;
    7 function pairset_element_add_<% $name %>() {
    8 var sInput = '<tr valign="top">';
    9 sInput = sInput + '<td><input type="text" name="<% $name.'_num_' %>'+ sLastIndex_<% $name %> +'" value="'+ sLastIndex_<% $name %> +'" size="2" maxlength="3"></td>';
    10 sInput = sInput + '<td><input type="text" name="<% $name.'_name_' %>'+ sLastIndex_<% $name %> +'" value="" style="width:97%"></td>';
    11 sInput = sInput + '<td><textarea class="textarea" name="<% $name.'_value_' %>'+ sLastIndex_<% $name %> +'" rows="2" style="width:97%;"></textarea></td>';
    12 sInput = sInput + '</tr>';
    13
    14 $(sInput).appendTo('#pairset-table-<% $name %>');
    15 sLastIndex_<% $name %>++;
    16 }
    6 17 //-->
    7 18 </script>
    8 19 <%args>
     
    21 32 $fields = [] unless $fields && ref $fields eq 'ARRAY';
    22 33
    23 34 $m->out('');
    24 $m->out('<table width="95%" style="margin:5px 0;padding:5 6 5 6;border:1px solid #ccc;font-size:70%;font-family:Tahoma;background-color:#f5f5f5;color:#000;" id="parset-table-'.$name.'">');
    35 $m->out('<table width="95%" style="margin:5px 0;padding:5 6 5 6;border:1px solid #ccc;font-size:70%;font-family:Tahoma;background-color:#f5f5f5;color:#000;" id="pairset-table-'.$name.'">');
    25 36 $m->out('<tr><th width="1%"><h5 style="margin:0; padding:4px; font-size:11px; color:blue; background:silver;">#</h5></th>');
    26 37 $m->out('<th width="33%"><h5 style="margin:0; padding:4px; font-size:11px; color:blue; background:silver;">Параметр:</h5></th>');
    27 38 $m->out('<th width="66%"><h5 style="margin:0; padding:4px; font-size:11px; color:blue; background:silver;">Значение:</h5></th></tr>');