Commit db6ea7b2 authored by Gabriel Monnerat's avatar Gabriel Monnerat

- Added script to load all events in erp5 (Initial script).

- remove dependency because this bt5 was added in erp5_web_ung_core
- add box to display the calendar that will be used to select the date

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42670 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 29d8e2db
No related merge requests found
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>"""\n
Script to load all events and organize all data to be loaded on calendar.\n
XXX - Initial Script to serialize all events\n
"""\n
from Products.ERP5Type.JSONEncoder import encodeInJson as dumps\n
import random\n
\n
event_list = context.getPortalObject().event_module.searchFolder()\n
\n
now = DateTime()\n
event_dict = {}\n
event_dict["events"] = []\n
event_dict["issort"] = True\n
event_dict["start"] = (now-30).toZone(\'UTC\').ISO()\n
event_dict["end"] = (now+30).toZone(\'UTC\').ISO()\n
event_dict["error"] = None\n
for event in event_list:\n
start = event.getStartDate().strftime("%m/%d/%Y %H:%M")\n
end = event.getStartDate().strftime("%m/%d/%Y %H:%M")\n
event_dict["events"].append([random.randrange(10000, 99999),\n
event.getTitle(),\n
start,\n
end,\n
random.randrange(0,1),1,0,\n
random.randrange(-1,13),1,\'\',\'\',])\n
\n
return dumps(event_dict)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>request_type</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_getEventListSerialized</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -112,12 +112,6 @@
<div id="sfnextbtn" title="Next" class="fbutton">\n
<span class="fnext"></span>\n
</div>\n
<div class="fshowdatep fbutton">\n
<div>\n
<input type="hidden" name="txtshow" id="hdtxtshow" />\n
<span id="txtdatetimeshow">Loading</span>\n
</div>\n
</div>\n
<div class="clear"></div>\n
</div>\n
</div>\n
......
......@@ -84,6 +84,7 @@
<value>
<list>
<string>calendar_box</string>
<string>date_selector_box</string>
</list>
</value>
</item>
......
......@@ -30,13 +30,15 @@
<key> <string>raw</string> </key>
<value> <string>div.main-right {\n
border-left: 0px !important;\n
width: 87% !important;\n
width: 85.6% !important;\n
}\n
\n
div.main-left {\n
width: 13.3% !important;\n
margin-top: -3.7px !important;\n
background-color: #FFFFFF !important;\n
}\n
\n
div.main-right fieldset.widget {\n
margin-left: 0px;\n
}\n
......@@ -60,6 +62,7 @@ div.cHead div.ptogtitle {\n
right: 20px !important;\n
top: 58px !important;\n
}\n
\n
a#BBIT_DP_CONTAINER {\n
left: 0px !important;\n
\n
......
......@@ -27,24 +27,23 @@
<value> <string encoding="cdata"><![CDATA[
$(document).ready(function() { \n
var view="day"; \n
var DATA_FEED_URL = "Base_getEventList";\n
var DATA_FEED_URL = "Base_getEventListSerialized";\n
var op = {\n
view: view,\n
theme:3,\n
view: "day",\n
showday: new Date(),\n
EditCmdhandler:Edit,\n
DeleteCmdhandler:Delete,\n
weekstartday: 0,\n
ViewCmdhandler:View, \n
onWeekOrMonthToDay:wtd,\n
onBeforeRequestData: cal_beforerequest,\n
onAfterRequestData: cal_afterrequest,\n
onRequestDataError: cal_onerror, \n
autoload:true,\n
url: DATA_FEED_URL + "?method=list", \n
quickAddUrl: DATA_FEED_URL + "?method=add", \n
quickUpdateUrl: DATA_FEED_URL + "?method=update",\n
quickDeleteUrl: DATA_FEED_URL + "?method=remove" \n
url: DATA_FEED_URL + "?request_type=list", \n
quickAddUrl: DATA_FEED_URL + "?request_type=add", \n
quickUpdateUrl: DATA_FEED_URL + "?request_type=update",\n
quickDeleteUrl: DATA_FEED_URL + "?requet_type=remove" \n
};\n
var $dv = $("#calhead");\n
var _MH = document.documentElement.clientHeight;\n
......
erp5_ingestion_mysql_innodb_catalog
erp5_web_ung_core
\ No newline at end of file
182
\ No newline at end of file
184
\ 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