includes/clientside/static/ajax.js
changeset 651 ce9d78d7251d
parent 650 e45183014778
child 672 08a7875258b4
equal deleted inserted replaced
650:e45183014778 651:ce9d78d7251d
   176     {
   176     {
   177       if ( ajax.readyState == 4 && ajax.status == 200 )
   177       if ( ajax.readyState == 4 && ajax.status == 200 )
   178       {
   178       {
   179         whiteout.parentNode.removeChild(whiteout);
   179         whiteout.parentNode.removeChild(whiteout);
   180         var response = String(ajax.responseText);
   180         var response = String(ajax.responseText);
   181         if ( response.substr(0, 1) != '{' )
   181         if ( !check_json_response(response) )
   182         {
   182         {
   183           handle_invalid_json(response);
   183           handle_invalid_json(response);
   184           return false;
   184           return false;
   185         }
   185         }
   186         response = parseJSON(response);
   186         response = parseJSON(response);
   414   ajaxGet(stdAjaxPrefix+'&_mode=rollback&id='+id, function() {
   414   ajaxGet(stdAjaxPrefix+'&_mode=rollback&id='+id, function() {
   415     if ( ajax.readyState == 4 && ajax.status == 200 ) {
   415     if ( ajax.readyState == 4 && ajax.status == 200 ) {
   416       unsetAjaxLoading();
   416       unsetAjaxLoading();
   417       
   417       
   418       var response = String(ajax.responseText + '');
   418       var response = String(ajax.responseText + '');
   419       if ( response.substr(0, 1) != '{' )
   419       if ( !check_json_response(response) )
   420       {
   420       {
   421         handle_invalid_json(response);
   421         handle_invalid_json(response);
   422         return false;
   422         return false;
   423       }
   423       }
   424       
   424       
  1040   }
  1040   }
  1041 };
  1041 };
  1042 
  1042 
  1043 window.aboutKeepAlive = function()
  1043 window.aboutKeepAlive = function()
  1044 {
  1044 {
       
  1045   load_component('messagebox');
  1045   new MessageBox(MB_OK|MB_ICONINFORMATION, $lang.get('user_keepalive_info_title'), $lang.get('user_keepalive_info_body'));
  1046   new MessageBox(MB_OK|MB_ICONINFORMATION, $lang.get('user_keepalive_info_title'), $lang.get('user_keepalive_info_body'));
  1046 }
  1047 }
  1047 
  1048 
  1048 window.ajaxUpdateCheck = function(targetelement)
  1049 window.ajaxUpdateCheck = function(targetelement)
  1049 {
  1050 {
  1280   ajaxPost(makeUrlNS('Admin', 'PluginManager/action.json'), 'r=' + ajaxEscape(request), function()
  1281   ajaxPost(makeUrlNS('Admin', 'PluginManager/action.json'), 'r=' + ajaxEscape(request), function()
  1281     {
  1282     {
  1282       if ( ajax.readyState == 4 && ajax.status == 200 )
  1283       if ( ajax.readyState == 4 && ajax.status == 200 )
  1283       {
  1284       {
  1284         var response = String(ajax.responseText + '');
  1285         var response = String(ajax.responseText + '');
  1285         if ( response.substr(0, 1) != '{' )
  1286         if ( !check_json_response(response) )
  1286         {
  1287         {
  1287           handle_invalid_json(response);
  1288           handle_invalid_json(response);
  1288           return false;
  1289           return false;
  1289         }
  1290         }
  1290         response = parseJSON(response);
  1291         response = parseJSON(response);