includes/clientside/static/acl.js
changeset 345 4ccdfeee9a11
parent 336 bfa2e9c23f03
child 377 bb3e6c3bd4f4
equal deleted inserted replaced
344:be6c5fdd9203 345:4ccdfeee9a11
   361                   }
   361                   }
   362                   else
   362                   else
   363                   {
   363                   {
   364                     vars['FIELD_DESC'] = data.acl_descs[i];
   364                     vars['FIELD_DESC'] = data.acl_descs[i];
   365                   }
   365                   }
       
   366                   vars['FIELD_INHERIT_CHECKED'] = '';
   366                   vars['FIELD_DENY_CHECKED'] = '';
   367                   vars['FIELD_DENY_CHECKED'] = '';
   367                   vars['FIELD_DISALLOW_CHECKED'] = '';
   368                   vars['FIELD_DISALLOW_CHECKED'] = '';
   368                   vars['FIELD_WIKIMODE_CHECKED'] = '';
   369                   vars['FIELD_WIKIMODE_CHECKED'] = '';
   369                   vars['FIELD_ALLOW_CHECKED'] = '';
   370                   vars['FIELD_ALLOW_CHECKED'] = '';
   370                   vars['FIELD_NAME'] = i;
   371                   vars['FIELD_NAME'] = i;
       
   372                   if ( !data.current_perms[i] )
       
   373                   {
       
   374                     data.current_perms[i] = 'i';
       
   375                   }
   371                   switch(data.current_perms[i])
   376                   switch(data.current_perms[i])
   372                   {
   377                   {
       
   378                     case 'i':
       
   379                     default:
       
   380                       vars['FIELD_INHERIT_CHECKED'] = 'checked="checked"';
       
   381                       break;
   373                     case 1:
   382                     case 1:
   374                       vars['FIELD_DENY_CHECKED'] = 'checked="checked"';
   383                       vars['FIELD_DENY_CHECKED'] = 'checked="checked"';
   375                       break;
   384                       break;
   376                     case 2:
   385                     case 2:
   377                     default:
       
   378                       vars['FIELD_DISALLOW_CHECKED'] = 'checked="checked"';
   386                       vars['FIELD_DISALLOW_CHECKED'] = 'checked="checked"';
   379                       break;
   387                       break;
   380                     case 3:
   388                     case 3:
   381                       vars['FIELD_WIKIMODE_CHECKED'] = 'checked="checked"';
   389                       vars['FIELD_WIKIMODE_CHECKED'] = 'checked="checked"';
   382                       break;
   390                       break;