Added missing semicolons to javascript snippets returned after publish

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@58346 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-07-18 03:40:32 +00:00
parent bb3c40cdd2
commit 3b602a3390
2 changed files with 5 additions and 5 deletions

View File

@ -811,7 +811,7 @@ HTML;
FormResponse::update_status($page->Status); FormResponse::update_status($page->Status);
if($JS_stageURL || $JS_liveURL) { if($JS_stageURL || $JS_liveURL) {
FormResponse::add("\$('sitetree').setNodeTitle($page->ID, '$JS_title')"); FormResponse::add("\$('sitetree').setNodeTitle($page->ID, '$JS_title');");
} else { } else {
FormResponse::add("var node = $('sitetree').getTreeNodeByIdx('$page->ID');"); FormResponse::add("var node = $('sitetree').getTreeNodeByIdx('$page->ID');");
FormResponse::add("if(node.parentTreeNode) node.parentTreeNode.removeTreeNode(node);"); FormResponse::add("if(node.parentTreeNode) node.parentTreeNode.removeTreeNode(node);");
@ -819,8 +819,8 @@ HTML;
} }
FormResponse::status_message($statusMessage, 'good'); FormResponse::status_message($statusMessage, 'good');
FormResponse::add("$('Form_EditForm').elements.StageURLSegment.value = '$JS_stageURL'"); FormResponse::add("$('Form_EditForm').elements.StageURLSegment.value = '$JS_stageURL';");
FormResponse::add("$('Form_EditForm').elements.LiveURLSegment.value = '$JS_liveURL'"); FormResponse::add("$('Form_EditForm').elements.LiveURLSegment.value = '$JS_liveURL';");
FormResponse::add("$('Form_EditForm').notify('PagePublished', $('Form_EditForm').elements.ID.value);"); FormResponse::add("$('Form_EditForm').notify('PagePublished', $('Form_EditForm').elements.ID.value);");
return FormResponse::respond(); return FormResponse::respond();

View File

@ -499,7 +499,7 @@ JS;
foreach($changed as $page) { foreach($changed as $page) {
if($page->ID != $record->ID) { if($page->ID != $record->ID) {
$title = Convert::raw2js($page->TreeTitle()); $title = Convert::raw2js($page->TreeTitle());
FormResponse::add("$('sitetree').setNodeTitle($page->ID, \"$title\")"); FormResponse::add("$('sitetree').setNodeTitle($page->ID, \"$title\");");
} }
} }
} }
@ -672,7 +672,7 @@ JS;
$movedNode->write(); $movedNode->write();
$title = Convert::raw2js($movedNode->TreeTitle()); $title = Convert::raw2js($movedNode->TreeTitle());
$js .="$('sitetree').setNodeTitle($movedNode->ID, \"$title\")\n"; $js .="$('sitetree').setNodeTitle($movedNode->ID, \"$title\");\n";
// Nodes that weren't "actually moved" shouldn't be registered as having been edited; do a direct SQL update instead // Nodes that weren't "actually moved" shouldn't be registered as having been edited; do a direct SQL update instead
} else if(is_numeric($id)) { } else if(is_numeric($id)) {