includes/clientside/static/editor.js
changeset 555 ac4c6a7f01d8
parent 550 685e839d934e
child 572 c196e8f336b9
equal deleted inserted replaced
554:e87390b1f9b0 555:ac4c6a7f01d8
   648   json_packet = ajaxEscape(toJSONString(json_packet));
   648   json_packet = ajaxEscape(toJSONString(json_packet));
   649   ajaxPost(stdAjaxPrefix + '&_mode=savepage_json', 'r=' + json_packet, function()
   649   ajaxPost(stdAjaxPrefix + '&_mode=savepage_json', 'r=' + json_packet, function()
   650     {
   650     {
   651       if ( ajax.readyState == 4 && ajax.status == 200 )
   651       if ( ajax.readyState == 4 && ajax.status == 200 )
   652       {
   652       {
       
   653         ajaxUnSetEditorLoading();
   653         var response = String(ajax.responseText + '');
   654         var response = String(ajax.responseText + '');
   654         if ( response.substr(0, 1) != '{' )
   655         if ( response.substr(0, 1) != '{' )
   655         {
   656         {
   656           handle_invalid_json(response);
   657           handle_invalid_json(response);
   657           return false;
   658           return false;
   725             }
   726             }
   726           }
   727           }
   727           else
   728           else
   728           {
   729           {
   729             // The save was successful; reset flags and make another request for the new page content
   730             // The save was successful; reset flags and make another request for the new page content
   730             ajaxUnSetEditorLoading();
       
   731             setAjaxLoading();
   731             setAjaxLoading();
   732             editor_open = false;
   732             editor_open = false;
   733             enableUnload();
   733             enableUnload();
   734             changeOpac(0, 'ajaxEditContainer');
   734             changeOpac(0, 'ajaxEditContainer');
   735             ajaxGet(stdAjaxPrefix + '&_mode=getpage&noheaders', function()
   735             ajaxGet(stdAjaxPrefix + '&_mode=getpage&noheaders', function()