diff --git a/code/LeftAndMain.php b/code/LeftAndMain.php index 2a79fe61..23f6762e 100644 --- a/code/LeftAndMain.php +++ b/code/LeftAndMain.php @@ -924,15 +924,6 @@ JS; DB::query("UPDATE \"$className\" SET \"Sort\" = $counter WHERE \"ID\" = '$id'"); } } - // Virtual pages require selected to be null if the page is the same. - FormResponse::add( - "if( $('sitetree').selected && $('sitetree').selected[0]){ - var idx = $('sitetree').selected[0].getIdx(); - if(idx){ - $('Form_EditForm').getPageFromServer(idx); - } - }\n" . $js - ); FormResponse::status_message(_t('LeftAndMain.SAVED'), 'good'); } else { FormResponse::error(_t('LeftAndMain.REQUESTERROR',"Error in request")); diff --git a/javascript/LeftAndMain_left.js b/javascript/LeftAndMain_left.js index 8d07c056..c1eb7986 100755 --- a/javascript/LeftAndMain_left.js +++ b/javascript/LeftAndMain_left.js @@ -469,10 +469,15 @@ SiteTreeNode.prototype = { new Ajax.Request(SiteTreeHandlers.orderChanged_url, { method : 'post', postBody : parts.join('&') + '&CurrentlyOpenPageID=' + currentlyOpenPageID, - /*onSuccess : function(response) { - // statusMessage(response.responseText, 'good'); - },*/ - onSuccess: Ajax.Evaluator, + onSuccess : function(response) { + movedNode.removeNodeClass('loading'); + if( $('sitetree').selected && $('sitetree').selected[0]){ + var idx = $('sitetree').selected[0].getIdx(); + if(idx){ + $('Form_EditForm').getPageFromServer(idx); + } + } + }, onFailure : function(response) { errorMessage('error saving order', response); }