Revision 17

Date:
2010/04/19 15:31:40
Author:
ahitrov@rambler.ru
Revision Log:
Избавляемся от программных ошибок при попытке создания документа без указания класса.
Files:

Legend:

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

     
    12 12 % }
    13 13
    14 14 <td width="100%">
    15 <& "/contenido/components/select.msn", name=>'class', values=>$classes, check=>$default, style=>'width:100%;' &>
    15 <& "/contenido/components/select.msn", name=>'class', values=>$classes, check=>$default, style=>'width:100%;', onChange => "set_create_button(this, 'create_$btn_id')" &>
    16 16 </td>
    17 <td><input type="submit" value="Создать"></td>
    17 <td><input id="create_<% $btn_id %>" type="submit" value="Создать"<% $default ? '' : ' disabled="disabled"' %>></td>
    18 18 <td><input type="hidden" name="sect_id" value="<% $sect_id %>"></td>
    19 19 </tr></table>
    20 20
     
    36 36 'links' => ['Новая&nbsp;связь','link.html'],
    37 37 'users' => ['Новый&nbsp;пользователь','users.html'],
    38 38 };
    39 my $btn_id = int(rand(10000));
    39 40 </%INIT>
  • utf8/core/comps/contenido/document.html

     
    86 86 $deactivate => undef
    87 87 </%ARGS>
    88 88 <%INIT>
    89
    90 &abort404 unless $class;
    89 91 my $error='';
    90 92 ### !!! При добавлении переменных в ARGS их надо внести в список исключений в структуре ниже
    91 93
     
    111 113 }
    112 114 }
    113 115 }
    116 &abort404 unless ref $document;
    114 117
    115 118 my @props = $document->structure();
    116 119 my %filter_params;
  • utf8/core/comps/contenido/section.html

     
    1 1 <& "/contenido/components/header.msn" &>
    2
    3 2 <& "/contenido/components/naviline.msn", sect_id => $owner->id &>
    4 3
    4 <script type="text/javascript">
    5 <!--
    6 function set_create_button( oSelect, sBtnID ) {
    7 if ( oSelect.value == '' ) {
    8 $('#'+sBtnID).attr('disabled','disabled');
    9 } else {
    10 $('#'+sBtnID).removeAttr('disabled');
    11 }
    12 }
    13 //-->
    14 </script>
    15
    5 16 % if ( (length($class)<=0) && (! ref($section)) )
    6 17 % {
    7 18
  • utf8/core/comps/contenido/sections.html

     
    1 1 <& "/contenido/components/header.msn" &>
    2 2 <& "/contenido/components/naviline.msn", sect_id => $owner->id &>
    3 3
    4 <script type="text/javascript">
    5 <!--
    6 function set_create_button( oSelect, sBtnID ) {
    7 if ( oSelect.value == '' ) {
    8 $('#'+sBtnID).attr('disabled','disabled');
    9 } else {
    10 $('#'+sBtnID).removeAttr('disabled');
    11 }
    12 }
    13 //-->
    14 </script>
    15
    4 16 <table width="100%" cellspacing="0" cellpadding="0" border="0">
    5 17 <tr valign="top">
    6 18 <td width="35%">