Commit 9ee218b4 authored by Gabriel Monnerat's avatar Gabriel Monnerat

clean up the code

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42973 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bfc6e410
No related merge requests found
...@@ -131,7 +131,7 @@ function Delete(data, callback){\n ...@@ -131,7 +131,7 @@ function Delete(data, callback){\n
\n \n
function wtd(p){\n function wtd(p){\n
if (p && p.datestrshow) {\n if (p && p.datestrshow) {\n
$("#txtdatetimeshow").text(p.datestrshow);\n $("#display-datetime").text(p.datestrshow);\n
}\n }\n
$("#caltoolbar div.fcurrent").each(function() {\n $("#caltoolbar div.fcurrent").each(function() {\n
$(this).removeClass("fcurrent");\n $(this).removeClass("fcurrent");\n
...@@ -185,12 +185,8 @@ $(document).ready(function() { \n ...@@ -185,12 +185,8 @@ $(document).ready(function() { \n
var _MH = document.documentElement.clientHeight;\n var _MH = document.documentElement.clientHeight;\n
var dvH = $dv.height() + 2;\n var dvH = $dv.height() + 2;\n
op.height = _MH - dvH;\n op.height = _MH - dvH;\n
op.eventItems =[];\n op.eventItems = [];\n
//ar p = $("#gridcontainer").bcalendar(op).BcalGetOp();\n $("#gridcontainer").bcalendar(op).BcalGetOp();\n
console.log($("#gridcontainer").bcalendar(op).BcalGetOp().datestrshow);\n
//if (p && p.datestrshow) {\n
// $("#txtdatetimeshow").text(p.datestrshow);\n
//}\n
$("#caltoolbar").noSelect();\n $("#caltoolbar").noSelect();\n
//to show day view\n //to show day view\n
$("#showdaybtn").click(function(e) {\n $("#showdaybtn").click(function(e) {\n
...@@ -198,10 +194,7 @@ $(document).ready(function() { \n ...@@ -198,10 +194,7 @@ $(document).ready(function() { \n
$(this).removeClass("fcurrent");\n $(this).removeClass("fcurrent");\n
})\n })\n
$(this).addClass("fcurrent");\n $(this).addClass("fcurrent");\n
var p = $("#gridcontainer").swtichView("day").BcalGetOp();\n $("#gridcontainer").swtichView("day").BcalGetOp();\n
if (p && p.datestrshow) {\n
$("#txtdatetimeshow").text(p.datestrshow);\n
}\n
});\n });\n
//to show week view\n //to show week view\n
$("#showweekbtn").click(function(e) {\n $("#showweekbtn").click(function(e) {\n
...@@ -209,10 +202,7 @@ $(document).ready(function() { \n ...@@ -209,10 +202,7 @@ $(document).ready(function() { \n
$(this).removeClass("fcurrent");\n $(this).removeClass("fcurrent");\n
})\n })\n
$(this).addClass("fcurrent");\n $(this).addClass("fcurrent");\n
var p = $("#gridcontainer").swtichView("week").BcalGetOp();\n $("#gridcontainer").swtichView("week").BcalGetOp();\n
if (p && p.datestrshow){\n
$("#txtdatetimeshow").text(p.datestrshow);\n
}\n
});\n });\n
//to show month view\n //to show month view\n
$("#showmonthbtn").click(function(e) {\n $("#showmonthbtn").click(function(e) {\n
...@@ -221,10 +211,7 @@ $(document).ready(function() { \n ...@@ -221,10 +211,7 @@ $(document).ready(function() { \n
$(this).removeClass("fcurrent");\n $(this).removeClass("fcurrent");\n
})\n })\n
$(this).addClass("fcurrent");\n $(this).addClass("fcurrent");\n
var p = $("#gridcontainer").swtichView("month").BcalGetOp();\n $("#gridcontainer").swtichView("month").BcalGetOp();\n
if (p && p.datestrshow) {\n
$("#txtdatetimeshow").text(p.datestrshow);\n
}\n
});\n });\n
$("#showreflashbtn").click(function(e){\n $("#showreflashbtn").click(function(e){\n
$("#gridcontainer").reload();\n $("#gridcontainer").reload();\n
...@@ -256,24 +243,15 @@ $(document).ready(function() { \n ...@@ -256,24 +243,15 @@ $(document).ready(function() { \n
});\n });\n
//go to today\n //go to today\n
$("#showtodaybtn").click(function() {\n $("#showtodaybtn").click(function() {\n
var p = $("#gridcontainer").gotoDate().BcalGetOp();\n $("#gridcontainer").gotoDate().BcalGetOp();\n
if (p && p.datestrshow) {\n
$("#txtdatetimeshow").text(p.datestrshow);\n
}\n
});\n });\n
//previous date range\n //previous date range\n
$("#sfprevbtn").click(function() {\n $("#sfprevbtn").click(function() {\n
var p = $("#gridcontainer").previousRange().BcalGetOp();\n $("#gridcontainer").previousRange().BcalGetOp();\n
if (p && p.datestrshow) {\n
$("#txtdatetimeshow").text(p.datestrshow);\n
}\n
});\n });\n
//next date range\n //next date range\n
$("#sfnextbtn").click(function() {\n $("#sfnextbtn").click(function() {\n
var p = $("#gridcontainer").nextRange().BcalGetOp();\n $("#gridcontainer").nextRange().BcalGetOp();\n
if (p && p.datestrshow) {\n
$("#txtdatetimeshow").text(p.datestrshow);\n
}\n
});\n });\n
$("div#new_event_dialog").dialog({\n $("div#new_event_dialog").dialog({\n
autoOpen: false,\n autoOpen: false,\n
...@@ -287,10 +265,7 @@ $(document).ready(function() { \n ...@@ -287,10 +265,7 @@ $(document).ready(function() { \n
var month = dateList[0] - 1;\n var month = dateList[0] - 1;\n
var day = dateList[1];\n var day = dateList[1];\n
var year = dateList[2];\n var year = dateList[2];\n
var p = $("#gridcontainer").gotoDate(new Date(year, month, day)).BcalGetOp();\n $("#gridcontainer").gotoDate(new Date(year, month, day)).BcalGetOp();\n
if (p && p.datestrshow) {\n
$("#txtdatetimeshow").text(p.datestrshow);\n
}\n
}\n }\n
});\n });\n
$("input#submit-search").click(function(event){\n $("input#submit-search").click(function(event){\n
......
219 220
\ No newline at end of file \ 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