includes/clientside/static/acl.js
changeset 823 4596c40aaa94
parent 787 b0d0d429d8cf
child 907 44851d7e9bda
equal deleted inserted replaced
822:3b951ea8e758 823:4596c40aaa94
    22       'page_id' : page_id,
    22       'page_id' : page_id,
    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(ajax) {
    28       if ( ajax.readyState == 4 && ajax.status == 200 )
    28       if ( ajax.readyState == 4 && ajax.status == 200 )
    29       {
    29       {
    30         var response = String(ajax.responseText + '');
    30         var response = String(ajax.responseText + '');
    31         if ( !check_json_response(response) )
    31         if ( !check_json_response(response) )
    32         {
    32         {
    59   var params = {
    59   var params = {
    60     target_id: rule_id,
    60     target_id: rule_id,
    61     mode: 'seltarget_id'
    61     mode: 'seltarget_id'
    62   };
    62   };
    63   params = ajaxEscape(toJSONString(params));
    63   params = ajaxEscape(toJSONString(params));
    64   ajaxPost(stdAjaxPrefix+'&_mode=acljson', 'acl_params='+params, function() {
    64   ajaxPost(stdAjaxPrefix+'&_mode=acljson', 'acl_params='+params, function(ajax) {
    65       if ( ajax.readyState == 4 && ajax.status == 200 )
    65       if ( ajax.readyState == 4 && ajax.status == 200 )
    66       {
    66       {
    67         var response = String(ajax.responseText + '');
    67         var response = String(ajax.responseText + '');
    68         if ( !check_json_response(response) )
    68         if ( !check_json_response(response) )
    69         {
    69         {
   111     params.page_id   = aclDataCache.page_id;
   111     params.page_id   = aclDataCache.page_id;
   112     params.namespace = aclDataCache.namespace;
   112     params.namespace = aclDataCache.namespace;
   113   }
   113   }
   114   params = toJSONString(params);
   114   params = toJSONString(params);
   115   params = ajaxEscape(params);
   115   params = ajaxEscape(params);
   116   ajaxPost(stdAjaxPrefix+'&_mode=acljson', 'acl_params='+params, function() {
   116   ajaxPost(stdAjaxPrefix+'&_mode=acljson', 'acl_params='+params, function(ajax) {
   117       if ( ajax.readyState == 4 && ajax.status == 200 )
   117       if ( ajax.readyState == 4 && ajax.status == 200 )
   118       {
   118       {
   119         document.getElementById(aclManagerID+'_main').innerHTML = '';
   119         document.getElementById(aclManagerID+'_main').innerHTML = '';
   120         document.getElementById(aclManagerID + '_back').style.display = 'none';
   120         document.getElementById(aclManagerID + '_back').style.display = 'none';
   121         document.getElementById(aclManagerID + '_next').value = $lang.get('etc_wizard_next');
   121         document.getElementById(aclManagerID + '_next').value = $lang.get('etc_wizard_next');
   399 
   399 
   400 function __aclJSONSubmitAjaxHandler(params)
   400 function __aclJSONSubmitAjaxHandler(params)
   401 {
   401 {
   402   params = toJSONString(params);
   402   params = toJSONString(params);
   403   params = ajaxEscape(params);
   403   params = ajaxEscape(params);
   404   ajaxPost(stdAjaxPrefix+'&_mode=acljson', 'acl_params='+params, function() {
   404   ajaxPost(stdAjaxPrefix+'&_mode=acljson', 'acl_params='+params, function(ajax) {
   405       if ( ajax.readyState == 4 && ajax.status == 200 )
   405       if ( ajax.readyState == 4 && ajax.status == 200 )
   406       {
   406       {
   407         var response = String(ajax.responseText + '');
   407         var response = String(ajax.responseText + '');
   408         if ( !check_json_response(response) )
   408         if ( !check_json_response(response) )
   409         {
   409         {
   480             params = {
   480             params = {
   481               'mode' : 'listgroups'
   481               'mode' : 'listgroups'
   482             };
   482             };
   483           params = toJSONString(params);
   483           params = toJSONString(params);
   484           params = ajaxEscape(params);
   484           params = ajaxEscape(params);
   485           ajaxPost(stdAjaxPrefix+'&_mode=acljson', 'acl_params='+params, function() {
   485           ajaxPost(stdAjaxPrefix+'&_mode=acljson', 'acl_params='+params, function(ajax) {
   486               if ( ajax.readyState == 4 && ajax.status == 200 )
   486               if ( ajax.readyState == 4 && ajax.status == 200 )
   487               {
   487               {
   488                 document.getElementById(aclManagerID+'_main').innerHTML = '';
   488                 document.getElementById(aclManagerID+'_main').innerHTML = '';
   489                 document.getElementById(aclManagerID + '_back').style.display = 'none';
   489                 document.getElementById(aclManagerID + '_back').style.display = 'none';
   490                 document.getElementById(aclManagerID + '_next').value = $lang.get('etc_wizard_next');
   490                 document.getElementById(aclManagerID + '_next').value = $lang.get('etc_wizard_next');
  1497       parent.innerHTML = '<img style="display: block; margin: 0 auto;" src="' + cdnPath + '/images/loading-big.gif" />';
  1497       parent.innerHTML = '<img style="display: block; margin: 0 auto;" src="' + cdnPath + '/images/loading-big.gif" />';
  1498     });
  1498     });
  1499   var request = toJSONString({
  1499   var request = toJSONString({
  1500       mode: 'list_presets'
  1500       mode: 'list_presets'
  1501     });
  1501     });
  1502   ajaxPost(stdAjaxPrefix + '&_mode=acljson', 'acl_params=' + ajaxEscape(request), function()
  1502   ajaxPost(stdAjaxPrefix + '&_mode=acljson', 'acl_params=' + ajaxEscape(request), function(ajax)
  1503     {
  1503     {
  1504       if ( ajax.readyState == 4 && ajax.status == 200 )
  1504       if ( ajax.readyState == 4 && ajax.status == 200 )
  1505       {
  1505       {
  1506         if ( !check_json_response(ajax.responseText) )
  1506         if ( !check_json_response(ajax.responseText) )
  1507         {
  1507         {
  1756       perms: selections
  1756       perms: selections
  1757     });
  1757     });
  1758   
  1758   
  1759   var whitey = whiteOutElement(document.getElementById(aclManagerID));
  1759   var whitey = whiteOutElement(document.getElementById(aclManagerID));
  1760   
  1760   
  1761   ajaxPost(stdAjaxPrefix + '&_mode=acljson', 'acl_params=' + ajaxEscape(packet), function()
  1761   ajaxPost(stdAjaxPrefix + '&_mode=acljson', 'acl_params=' + ajaxEscape(packet), function(ajax)
  1762     {
  1762     {
  1763       if ( ajax.readyState == 4 && ajax.status == 200 )
  1763       if ( ajax.readyState == 4 && ajax.status == 200 )
  1764       {
  1764       {
  1765         if ( !check_json_response(ajax.responseText) )
  1765         if ( !check_json_response(ajax.responseText) )
  1766         {
  1766         {