Hi,
when I change the class in the Behaviour tab and save the page, then there's twice:
FormResponse::add("$('Form_EditForm').getPageFromServer($record->ID);");
FormResponse::add("$('Form_EditForm').getPageFromServer($record->ID);");
in the response. So the page is read twice from the server. I have comented the first one in the LeftAndMain.php:
// Update the icon if the class has changed
if($originalClass != $record->ClassName) {
$record->setClassName( $record->ClassName );
$newClass = $record->ClassName;
$record = $record->newClassInstance( $newClass );
FormResponse::add("if(\$('sitetree').setNodeIcon) \$('sitetree').setNodeIcon($record->ID, '$originalClass', '$record->ClassName');");
// fixed double reading //FormResponse::add("$('Form_EditForm').getPageFromServer($record->ID);");
}
// HACK: This should be turned into somethign more general
if( ($record->class == 'VirtualPage' && $originalURLSegment != $record->URLSegment) ||
($originalClass != $record->ClassName) || self::$ForceReload == true) {
FormResponse::add("$('Form_EditForm').getPageFromServer($record->ID);");
}