Commit 20085384 authored by Gabriel Monnerat's avatar Gabriel Monnerat

- improve css

- add search box
- refactor code to save and load notes of events in description field. This change is to use SearchableText search in event module

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42895 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4bab94f9
...@@ -77,7 +77,10 @@ portal_type_list = ["Acknowledgement",\n ...@@ -77,7 +77,10 @@ portal_type_list = ["Acknowledgement",\n
"Web Message"]\n "Web Message"]\n
\n \n
if request_type == "list":\n if request_type == "list":\n
event_list = portal.event_module.searchFolder()\n kw = {}\n
if form.has_key("SearchableText"):\n
kw["SearchableText"] = form.get("SearchableText")\n
event_list = portal.event_module.searchFolder(**kw)\n
now = DateTime()\n now = DateTime()\n
event_dict = {}\n event_dict = {}\n
event_dict["events"] = []\n event_dict["events"] = []\n
...@@ -100,7 +103,7 @@ if request_type == "list":\n ...@@ -100,7 +103,7 @@ if request_type == "list":\n
random.randrange(-1,13), 1,\n random.randrange(-1,13), 1,\n
event.getId(),\n event.getId(),\n
event.getPortalType(),\n event.getPortalType(),\n
event.getTextContent()])\n event.getDescription()])\n
return dumps(event_dict)\n return dumps(event_dict)\n
\n \n
elif request_type == "remove":\n elif request_type == "remove":\n
...@@ -122,8 +125,8 @@ elif request_type == "update":\n ...@@ -122,8 +125,8 @@ elif request_type == "update":\n
event = context.restrictedTraverse(catalog_object.getPath())\n event = context.restrictedTraverse(catalog_object.getPath())\n
if title and event.getTitle() != title:\n if title and event.getTitle() != title:\n
event.setTitle(title)\n event.setTitle(title)\n
if text_content and event.getTextContent() != text_content:\n if text_content and event.getDescription() != text_content:\n
event.setTextContent(text_content)\n event.setDescription(text_content)\n
event.setStartDate(start_date)\n event.setStartDate(start_date)\n
event.setStopDate(end_date)\n event.setStopDate(end_date)\n
return dumps({"IsSuccess": True})\n return dumps({"IsSuccess": True})\n
......
...@@ -62,7 +62,7 @@ portal = context.getPortalObject()\n ...@@ -62,7 +62,7 @@ portal = context.getPortalObject()\n
event = portal.event_module.newContent(portal_type=portal_type, title=event_title)\n event = portal.event_module.newContent(portal_type=portal_type, title=event_title)\n
event.setStartDate(start_date)\n event.setStartDate(start_date)\n
event.setStopDate(stop_date)\n event.setStopDate(stop_date)\n
event.setTextContent(text_content)\n event.setDescription(text_content)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
...@@ -76,6 +76,7 @@ ...@@ -76,6 +76,7 @@
<value> <value>
<list> <list>
<string>your_calendar_logo_box</string> <string>your_calendar_logo_box</string>
<string>your_search_box</string>
</list> </list>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="EditorField" module="Products.ERP5Form.EditorField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>your_search_box</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>line_too_long</string> </key>
<value> <string>A line was too long.</string> </value>
</item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>You entered too many characters.</string> </value>
</item>
<item>
<key> <string>too_many_lines</string> </key>
<value> <string>You entered too many lines.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_linelength</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_lines</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>text_editor</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_linelength</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_lines</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>text_editor</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string encoding="cdata"><![CDATA[
<input name="searchable-text" type="text"/>\n
<input id="submit-search" type="submit" value="Search Events" />
]]></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>5</int> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_linelength</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_lines</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>text_editor</string> </key>
<value> <string>text_area</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Search Events</string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>40</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -67,10 +67,6 @@ a#BBIT_DP_CONTAINER {\n ...@@ -67,10 +67,6 @@ a#BBIT_DP_CONTAINER {\n
left: 0px !important;\n left: 0px !important;\n
}\n }\n
\n \n
input[type="text"] {\n
border: 0px;\n
}\n
\n
div.main-left div#datepicker.hasDatepicker {\n div.main-left div#datepicker.hasDatepicker {\n
margin: 4px -3px -3px;\n margin: 4px -3px -3px;\n
}\n }\n
...@@ -134,10 +130,6 @@ td.ui-datepicker-days-cell-over, td.ui-datepicker-week-end.ui-datepicker-current ...@@ -134,10 +130,6 @@ td.ui-datepicker-days-cell-over, td.ui-datepicker-week-end.ui-datepicker-current
background: url("images/ui-bg_glass_75_dae6f6_1x400.png") repeat-x scroll 50% 50% #DAE6F6;\n background: url("images/ui-bg_glass_75_dae6f6_1x400.png") repeat-x scroll 50% 50% #DAE6F6;\n
}\n }\n
\n \n
textarea {\n
border: 0px;\n
}\n
\n
table.ui-datepicker-calendar thead, div.ui-datepicker-inline div.ui-datepicker-header {\n table.ui-datepicker-calendar thead, div.ui-datepicker-inline div.ui-datepicker-header {\n
background: none repeat scroll 0 0 transparent;\n background: none repeat scroll 0 0 transparent;\n
}\n }\n
...@@ -162,6 +154,32 @@ div#faddbtn.fbutton span.addcal {\n ...@@ -162,6 +154,32 @@ div#faddbtn.fbutton span.addcal {\n
border: 1px solid #BBBBBB;\n border: 1px solid #BBBBBB;\n
padding: 2px 4px;\n padding: 2px 4px;\n
background-color: #EDF1D5;\n background-color: #EDF1D5;\n
}\n
\n
div.header-left fieldset.widget div.field input[type="submit"] {\n
background: url("http://localhost:18080/erp5/ung_images/button_background.png") repeat scroll 0 0 transparent;\n
border: 1px solid #BBBBBB;\n
padding-top: 1px;\n
position: relative;\n
top: 1px;\n
-moz-border-radius: 4px 4px 4px 4px;\n
}\n
\n
input[type="text"], textarea {\n
border: 1px solid #B0C2C8;\n
}\n
\n
div.header-left fieldset.widget div.field {\n
display: inline-block;\n
}\n
\n
img[alt="calendar_logo_box"] {\n
position: relative;\n
top: 7px;\n
}\n
\n
div.header-left {\n
margin-top: -9px;\n
}</string> </value> }</string> </value>
</item> </item>
<item> <item>
......
...@@ -278,7 +278,7 @@ $(document).ready(function() { \n ...@@ -278,7 +278,7 @@ $(document).ready(function() { \n
});\n });\n
$("div#new_event_dialog").dialog({\n $("div#new_event_dialog").dialog({\n
autoOpen: false,\n autoOpen: false,\n
height: 255,\n height: 258,\n
width: 410,\n width: 410,\n
modal: true,\n modal: true,\n
});\n });\n
...@@ -294,6 +294,10 @@ $(document).ready(function() { \n ...@@ -294,6 +294,10 @@ $(document).ready(function() { \n
}\n }\n
}\n }\n
});\n });\n
$("input#submit-search").click(function(event){\n
event.preventDefault();\n
alert($("input[name=\'searchable-text\']").val());\n
});\n
}); });
]]></string> </value> ]]></string> </value>
......
213 214
\ 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