Fixed problem with event creation in the calendar; modified form POST to submit data as JSON.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@9643 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Simon Buckle
2008-07-04 09:51:47 +00:00
parent 652cd91de7
commit 43b3208641

View File

@@ -1,6 +1,34 @@
var siteId = args["site"];
var siteId = null;
if (!json.isNull("site"))
{
siteId = json.get("site");
}
model.result = createEvent(siteId, args);
var params = {};
// Variables we are expecting
var props = [
"from",
"to",
"what",
"where",
"desc",
"datefrom",
"start",
"dateto",
"end"
];
var p;
for(var k=0; k < props.length; k++)
{
p = props[k];
if (!json.isNull(p))
{
params[p] = json.get(p);
}
}
model.result = createEvent(siteId, params);
function createEvent(siteId, params)
{