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
"Web Message"]\n
\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
event_dict = {}\n
event_dict["events"] = []\n
......@@ -100,7 +103,7 @@ if request_type == "list":\n
random.randrange(-1,13), 1,\n
event.getId(),\n
event.getPortalType(),\n
event.getTextContent()])\n
event.getDescription()])\n
return dumps(event_dict)\n
\n
elif request_type == "remove":\n
......@@ -122,8 +125,8 @@ elif request_type == "update":\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
if text_content and event.getDescription() != text_content:\n
event.setDescription(text_content)\n
event.setStartDate(start_date)\n
event.setStopDate(end_date)\n
return dumps({"IsSuccess": True})\n
......
......@@ -62,7 +62,7 @@ portal = context.getPortalObject()\n
event = portal.event_module.newContent(portal_type=portal_type, title=event_title)\n
event.setStartDate(start_date)\n
event.setStopDate(stop_date)\n
event.setTextContent(text_content)\n
event.setDescription(text_content)\n
</string> </value>
</item>
<item>
......
......@@ -76,6 +76,7 @@
<value>
<list>
<string>your_calendar_logo_box</string>
<string>your_search_box</string>
</list>
</value>
</item>
......
......@@ -67,10 +67,6 @@ a#BBIT_DP_CONTAINER {\n
left: 0px !important;\n
}\n
\n
input[type="text"] {\n
border: 0px;\n
}\n
\n
div.main-left div#datepicker.hasDatepicker {\n
margin: 4px -3px -3px;\n
}\n
......@@ -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
}\n
\n
textarea {\n
border: 0px;\n
}\n
\n
table.ui-datepicker-calendar thead, div.ui-datepicker-inline div.ui-datepicker-header {\n
background: none repeat scroll 0 0 transparent;\n
}\n
......@@ -162,6 +154,32 @@ div#faddbtn.fbutton span.addcal {\n
border: 1px solid #BBBBBB;\n
padding: 2px 4px;\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>
</item>
<item>
......
......@@ -278,7 +278,7 @@ $(document).ready(function() { \n
});\n
$("div#new_event_dialog").dialog({\n
autoOpen: false,\n
height: 255,\n
height: 258,\n
width: 410,\n
modal: true,\n
});\n
......@@ -294,6 +294,10 @@ $(document).ready(function() { \n
}\n
}\n
});\n
$("input#submit-search").click(function(event){\n
event.preventDefault();\n
alert($("input[name=\'searchable-text\']").val());\n
});\n
});
]]></string> </value>
......
213
\ No newline at end of file
214
\ 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