mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -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)
|
function createEvent(siteId, params)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user