Added first cut of page rename functionality to the toolbar.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@9676 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Simon Buckle
2008-07-08 12:54:16 +00:00
parent b2eb746a0f
commit ae8d81fa5d

View File

@@ -12,13 +12,13 @@ model.result = main();
function main()
{
var newName = args.name;
if (!newName)
if (json.isNull("name"))
{
return jsonError("No name property specified");
return jsonError("No new name property specified");
}
// Remove any whitespace and replace with "_"
newName = newName.replace(/\\s+/g, "_");
var newName = String(json.get("name")).replace(/\\s+/g, "_");
var params = getTemplateArgs(["siteId", "pageTitle"]);
// Get the site