includes/clientside/static/login.js
changeset 827 2c20563245b2
parent 824 28d9fbcd4f0d
child 843 4415e50e4e84
equal deleted inserted replaced
826:dcf5381ce8ba 827:2c20563245b2
   364 
   364 
   365 window.ajaxLoginPerformRequest = function(json)
   365 window.ajaxLoginPerformRequest = function(json)
   366 {
   366 {
   367   json = toJSONString(json);
   367   json = toJSONString(json);
   368   json = ajaxEscape(json);
   368   json = ajaxEscape(json);
   369   ajaxPost(makeUrlNS('Special', 'Login/action.json'), 'r=' + json, function()
   369   ajaxPost(makeUrlNS('Special', 'Login/action.json'), 'r=' + json, function(ajax)
   370     {
   370     {
   371       if ( ajax.readyState == 4 && ajax.status == 200 )
   371       if ( ajax.readyState == 4 && ajax.status == 200 )
   372       {
   372       {
   373         // parse response
   373         // parse response
   374         var response = String(ajax.responseText + '');
   374         var response = String(ajax.responseText + '');
  1296     }
  1296     }
  1297     if ( level )
  1297     if ( level )
  1298     {
  1298     {
  1299       auth_level = level;
  1299       auth_level = level;
  1300     }
  1300     }
       
  1301     window.location.hash = '#auth:' + key;
  1301   }
  1302   }
  1302   else
  1303   else
  1303   {
  1304   {
  1304     auth_level = USER_LEVEL_MEMBER;
  1305     auth_level = USER_LEVEL_MEMBER;
  1305     ENANO_SID = false;
  1306     ENANO_SID = false;
  1312         {
  1313         {
  1313           links[i].href = links[i].href.replace(/\?auth=([a-f0-9]+)(&|#|$)/, '$2').replace(/&auth=([a-f0-9]+)/, '').replace(rexp, '');
  1314           links[i].href = links[i].href.replace(/\?auth=([a-f0-9]+)(&|#|$)/, '$2').replace(/&auth=([a-f0-9]+)/, '').replace(rexp, '');
  1314         }
  1315         }
  1315       }
  1316       }
  1316     }
  1317     }
  1317   }
  1318     window.location.hash = '#auth:false';
  1318 }
  1319   }
       
  1320 }