mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
- Fix start date filter date selection
- Add end date filter (uses date selection)
This commit is contained in:
parent
96bc660ee3
commit
8b9f806b1f
@ -154,6 +154,7 @@ class infolog_bo
|
||||
'upcoming' => 'upcoming',
|
||||
'open-upcoming' => 'open and upcoming',
|
||||
'bydate' => 'startdate',
|
||||
'duedate' => 'enddate'
|
||||
);
|
||||
|
||||
/**
|
||||
@ -1027,6 +1028,11 @@ class infolog_bo
|
||||
if (is_int($query['startdate'])) $query['col_filter'][] = 'info_startdate >= '.$GLOBALS['egw']->db->quote($query['startdate']);
|
||||
if (is_int($query['enddate'])) $query['col_filter'][] = 'info_startdate <= '.$GLOBALS['egw']->db->quote($query['enddate']+(60*60*24)-1);
|
||||
}
|
||||
elseif ($query['filter'] == 'duedate')
|
||||
{
|
||||
if (is_int($query['startdate'])) $query['col_filter'][] = 'info_enddate >= '.$GLOBALS['egw']->db->quote($query['startdate']);
|
||||
if (is_int($query['enddate'])) $query['col_filter'][] = 'info_enddate <= '.$GLOBALS['egw']->db->quote($query['enddate']+(60*60*24)-1);
|
||||
}
|
||||
if (!isset($query['date_format']) || $query['date_format'] != 'server')
|
||||
{
|
||||
if (isset($query['col_filter']))
|
||||
|
@ -74,13 +74,21 @@ app.classes.infolog = AppJS.extend(
|
||||
{
|
||||
|
||||
var filter = this.et2.getWidgetById('filter');
|
||||
var temp_header_left = this.et2.getWidgetById('infolog.index.dates');
|
||||
|
||||
if (filter && temp_header_left)
|
||||
var nm = this.et2.getWidgetById('nm');
|
||||
if(nm && filter)
|
||||
{
|
||||
temp_header_left.set_disabled(filter.value !== "bydate");
|
||||
|
||||
switch(filter.getValue())
|
||||
{
|
||||
case 'bydate':
|
||||
case 'duedate':
|
||||
nm.set_header_left('infolog.index.dates');
|
||||
break;
|
||||
default:
|
||||
nm.set_header_left('infolog.index.header_left');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -1,10 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id$ -->
|
||||
<overlay>
|
||||
<template id="infolog.index.header_left" template="" lang="" group="0" version="1.0.1.001">
|
||||
<description value="InfoLog" class="infolog_headertext bold"/>
|
||||
<styles>.bold { font-weight: bold; }</styles>
|
||||
</template>
|
||||
<template id="infolog.index.header_right" template="" lang="" group="0" version="1.9.001">
|
||||
<hbox>
|
||||
<description value="Add:" class="infolog_headertext"/>
|
||||
@ -13,6 +9,12 @@
|
||||
<button statustext="Add a new Note" label="Note" id="add[note]" onclick="app.infolog.add_with_extras(widget,'note','$cont[action]','$cont[action_id]');" image="note"/>
|
||||
</hbox>
|
||||
</template>
|
||||
<template id="infolog.index.dates" template="" lang="" group="0" version="1.9.001">
|
||||
<hbox>
|
||||
<date id="startdate" label="Start"/>
|
||||
<date statustext="Leave it empty for a full week" id="enddate" label="End"/>
|
||||
</hbox>
|
||||
</template>
|
||||
<template id="infolog.index.rows" template="" lang="" group="0" version="1.9.005">
|
||||
<grid width="100%">
|
||||
<columns>
|
||||
|
Loading…
Reference in New Issue
Block a user