Commit e79454e9 authored by Gabriel Monnerat's avatar Gabriel Monnerat

- fix identation and added event id in request when the event will be updated

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42769 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1a43838d
......@@ -1168,7 +1168,7 @@
}\n
//to populate the data \n
function populate() {\n
if (option.isloading) {\n
if (option.isloading){\n
return true;\n
}\n
if (option.url && option.url != "") {\n
......@@ -1179,30 +1179,25 @@
}\n
var zone = new Date().getTimezoneOffset() / 60 * -1;\n
var param = [\n
{ name: "showdate", value: dateFormat.call(option.showday, i18n.xgcalendar.dateformat.fulldayvalue) },\n
{ name: "viewtype", value: option.view },\n
{ name: "timezone", value: zone }\n
];\n
{name: "showdate", value: dateFormat.call(option.showday, i18n.xgcalendar.dateformat.fulldayvalue)},\n
{name: "viewtype", value: option.view},\n
{name: "timezone", value: zone}\n
];\n
if (option.extParam) {\n
for (var pi = 0; pi < option.extParam.length; pi++) {\n
param[param.length] = option.extParam[pi];\n
}\n
}\n
\n
$.ajax({\n
type: option.method, //\n
type: option.method,//\n
url: option.url,\n
data: param, \n
//dataType: "text", // fixed jquery 1.4 not support Ms Date Json Format /Date(@Tickets)/\n
dataType: "json",\n
dataFilter: function(data, type) { \n
//return data.replace(/"\\\\\\/(Date\\([0-9-]+\\))\\\\\\/"/gi, "new $1");\n
\n
return data;\n
},\n
success: function(data) {//function(datastr) { \n
//datastr =datastr.replace(/"\\\\\\/(Date\\([0-9-]+\\))\\\\\\/"/gi, \'new $1\'); \n
//var data = (new Function("return " + datastr))();\n
success: function(data) {\n
if (data != null && data.error != null) {\n
if (option.onRequestDataError) {\n
option.onRequestDataError(1, data);\n
......@@ -1735,7 +1730,8 @@
{ "name": "CalendarEndTime", value: dateFormat.call(end, i18n.xgcalendar.dateformat.fulldayvalue + " HH:mm") },\n
{ "name": "timezone", value: zone },\n
{ "name": "title", value: title },\n
];\n
{ "name": "event_id", value: data[9]},\n
];\n
var d;\n
if (option.quickUpdateHandler && $.isFunction(option.quickUpdateHandler)) {\n
option.quickUpdateHandler.call(this, param);\n
......@@ -1835,7 +1831,7 @@
$("#bbit-cal-buddle").css("visibility", "hidden");\n
var newdata = [];\n
var tId = -1;\n
option.onBeforeRequestData && option.onBeforeRequestData(2);\n
option.onBeforeRequestData && option.onBeforeRequestData(2); \n
$.post(option.quickAddUrl, param, function(data) {\n
if (data) {\n
if (data.IsSuccess == true) {\n
......@@ -1850,9 +1846,7 @@
option.isloading = false;\n
option.onAfterRequestData && option.onAfterRequestData(2);\n
}\n
\n
}\n
\n
}, "json");\n
\n
newdata.push(-1, what);\n
......
9
\ No newline at end of file
10
\ 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