Commit b0fc293e authored by Gabriel Monnerat's avatar Gabriel Monnerat

- filter event list to select only events with date equal current day or more

- improve css
- add id for tr tag that the your date is the current day

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42932 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e63dc87e
......@@ -81,6 +81,7 @@ if request_type == "list":\n
if form.has_key("SearchableText"):\n
kw["SearchableText"] = form.get("SearchableText")\n
kw["sort_on"] = (("delivery.start_date", "ASC"))\n
kw["delivery.start_date"] = {"range": "min", "query": DateTime()}\n
event_list = portal.event_module.searchFolder(**kw)\n
now = DateTime()\n
event_dict = {}\n
......
......@@ -184,7 +184,7 @@ div.header-left {\n
\n
div#gridcontainer div.event-listview tr td {\n
border-bottom: 1px solid #CCC;\n
padding: 9px;\n
padding: 11px;\n
}\n
\n
div#gridcontainer div.toolbar-listview {\n
......@@ -198,8 +198,19 @@ a#back-calendar {\n
}\n
\n
td#resultview {\n
text-align: center;\n
text-align: right;\n
font-size: 10pt;\n
}\n
\n
tr#today-event td:first-child{\n
background: none repeat scroll 0 0 #FFF7D7;\n
border-color: #FAD163 #FAD163 #CCCCCC;\n
border-style: solid;\n
border-width: 0 1px 1px 0;\n
}\n
\n
div.event-listview table tbody tr td:first-child {\n
width: 12%;\n
}</string> </value>
</item>
<item>
......
......@@ -320,9 +320,17 @@ $(document).ready(function() { \n
data : paramList,\n
success: function(data){\n
var eventTableList = Array();\n
var eventList = data.events; \n
var eventList = data.events;\n
var currentDate = new Date();\n
for (var i = 0; i < eventList.length; i++){\n
eventTableList.push("<tr><td>");\n
var eventDate = new Date(eventList[i][2]);\n
if (eventDate.getMonth() == currentDate.getMonth() && eventDate.getDate() == currentDate.getDate()){\n
eventTableList.push("<tr id=\'today-event\'>");\n
}\n
else {\n
eventTableList.push("<tr>");\n
}\n
eventTableList.push("<td>");\n
eventTableList.push(eventList[i][2]);\n
eventTableList.push("</td><td>");\n
eventTableList.push(eventList[i][1]);\n
......@@ -338,7 +346,11 @@ $(document).ready(function() { \n
tableList.push("</tbody></table></div>");\n
$("div#gridcontainer").append(tableList.join(""));\n
});\n
});
});\n
\n
window.onload = function(){\n
$("div#dvCalMain.calmain").parent().css("padding", "0 0 0 1px");\n
}
]]></string> </value>
</item>
......
217
\ No newline at end of file
218
\ 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