Commit 78575795 authored by Gabriel Monnerat's avatar Gabriel Monnerat

add code to make possible update the text_content field of Event

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42848 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5c192813
......@@ -115,12 +115,15 @@ elif request_type == "update":\n
if not event_id:\n
return dumps({"IsSuccess": False})\n
title = form.get("title")\n
text_content = form.get("event_text_content")\n
end_date = convertToERP5DateTime(form.get("CalendarEndTime"))\n
start_date = convertToERP5DateTime(form.get("CalendarStartTime"))\n
catalog_object = portal.portal_catalog.getResultValue(portal_type=portal_type_list, id=event_id)\n
event = context.restrictedTraverse(catalog_object.getPath())\n
if title and event.getTitle() != title:\n
event.setTitle(title)\n
if text_content and event.getTextContent() != text_content:\n
event.setTextContent(text_content)\n
event.setStartDate(start_date)\n
event.setStopDate(end_date)\n
return dumps({"IsSuccess": True})\n
......
......@@ -84,10 +84,11 @@ function Edit(data){\n
dataHash.stop_date_minute;\n
\n
var paramList = [{name : \'CalendarEndTime\', \'value\': stop_date},\n
{name : \'CalendarStartTime\', \'value\': start_date},\n
{name : \'title\', \'value\': dataHash.title},\n
{name : \'request_type\', \'value\': \'update\'},\n
{name : \'event_id\', \'value\': $("input#event_id").attr("value")}]\n
{name : \'CalendarStartTime\', \'value\': start_date},\n
{name : \'title\', \'value\': dataHash.title},\n
{name : \'request_type\', \'value\': \'update\'},\n
{name : \'event_id\', \'value\': $("input#event_id").attr("value")},\n
{name : \'event_text_content\', \'value\': dataHash.event_text_content}]\n
\n
$.post("Base_updateCalendarEventList", paramList, function(){\n
$("div#new_event_dialog").dialog("close");\n
......
207
\ No newline at end of file
208
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment