includes/clientside/static/acl.js
changeset 407 35d94240a197
parent 377 bb3e6c3bd4f4
child 419 b8b4e38825db
equal deleted inserted replaced
406:7468a663315f 407:35d94240a197
    23       'namespace' : namespace
    23       'namespace' : namespace
    24     };
    24     };
    25   params = toJSONString(params);
    25   params = toJSONString(params);
    26   params = ajaxEscape(params);
    26   params = ajaxEscape(params);
    27   ajaxPost(stdAjaxPrefix+'&_mode=acljson', 'acl_params='+params, function() {
    27   ajaxPost(stdAjaxPrefix+'&_mode=acljson', 'acl_params='+params, function() {
    28       if(ajax.readyState == 4)
    28       if ( ajax.readyState == 4 && ajax.status == 200 )
    29       {
    29       {
    30         var response = String(ajax.responseText + '');
    30         var response = String(ajax.responseText + '');
    31         if ( response.substr(0, 1) != '{' )
    31         if ( response.substr(0, 1) != '{' )
    32         {
    32         {
    33           handle_invalid_json(ajax.responseText);
    33           handle_invalid_json(ajax.responseText);
    64     params.namespace = aclDataCache.namespace;
    64     params.namespace = aclDataCache.namespace;
    65   }
    65   }
    66   params = toJSONString(params);
    66   params = toJSONString(params);
    67   params = ajaxEscape(params);
    67   params = ajaxEscape(params);
    68   ajaxPost(stdAjaxPrefix+'&_mode=acljson', 'acl_params='+params, function() {
    68   ajaxPost(stdAjaxPrefix+'&_mode=acljson', 'acl_params='+params, function() {
    69       if(ajax.readyState == 4)
    69       if ( ajax.readyState == 4 && ajax.status == 200 )
    70       {
    70       {
    71         document.getElementById(aclManagerID+'_main').innerHTML = '';
    71         document.getElementById(aclManagerID+'_main').innerHTML = '';
    72         document.getElementById(aclManagerID + '_back').style.display = 'none';
    72         document.getElementById(aclManagerID + '_back').style.display = 'none';
    73         document.getElementById(aclManagerID + '_next').value = $lang.get('etc_wizard_next');
    73         document.getElementById(aclManagerID + '_next').value = $lang.get('etc_wizard_next');
    74         groups = parseJSON(ajax.responseText);
    74         groups = parseJSON(ajax.responseText);
   314 function __aclJSONSubmitAjaxHandler(params)
   314 function __aclJSONSubmitAjaxHandler(params)
   315 {
   315 {
   316   params = toJSONString(params);
   316   params = toJSONString(params);
   317   params = ajaxEscape(params);
   317   params = ajaxEscape(params);
   318   ajaxPost(stdAjaxPrefix+'&_mode=acljson', 'acl_params='+params, function() {
   318   ajaxPost(stdAjaxPrefix+'&_mode=acljson', 'acl_params='+params, function() {
   319       if(ajax.readyState == 4)
   319       if ( ajax.readyState == 4 && ajax.status == 200 )
   320       {
   320       {
   321         var response = String(ajax.responseText + '');
   321         var response = String(ajax.responseText + '');
   322         if ( response.substr(0, 1) != '{' )
   322         if ( response.substr(0, 1) != '{' )
   323         {
   323         {
   324           handle_invalid_json(ajax.responseText);
   324           handle_invalid_json(ajax.responseText);
   457               'mode' : 'listgroups'
   457               'mode' : 'listgroups'
   458             };
   458             };
   459           params = toJSONString(params);
   459           params = toJSONString(params);
   460           params = ajaxEscape(params);
   460           params = ajaxEscape(params);
   461           ajaxPost(stdAjaxPrefix+'&_mode=acljson', 'acl_params='+params, function() {
   461           ajaxPost(stdAjaxPrefix+'&_mode=acljson', 'acl_params='+params, function() {
   462               if(ajax.readyState == 4)
   462               if ( ajax.readyState == 4 && ajax.status == 200 )
   463               {
   463               {
   464                 document.getElementById(aclManagerID+'_main').innerHTML = '';
   464                 document.getElementById(aclManagerID+'_main').innerHTML = '';
   465                 document.getElementById(aclManagerID + '_back').style.display = 'none';
   465                 document.getElementById(aclManagerID + '_back').style.display = 'none';
   466                 document.getElementById(aclManagerID + '_next').value = $lang.get('etc_wizard_next');
   466                 document.getElementById(aclManagerID + '_next').value = $lang.get('etc_wizard_next');
   467                 var thispage = strToPageID(title);
   467                 var thispage = strToPageID(title);