Author: nathangray
New Revision: 55839
URL: http://svn.stylite.de/viewvc/egroupware?rev=55839&view=rev
Log:
- Keep custom timespan start & end dates matching selected named range
- If all (or no end date) show until today, instead of a week
Modified:
trunk/timesheet/inc/class.timesheet_ui.inc.php
trunk/timesheet/js/app.js
trunk/timesheet/templates/default/index.xet
— trunk/timesheet/inc/class.timesheet_ui.inc.php (original)
+++ trunk/timesheet/inc/class.timesheet_ui.inc.php Mon Apr 25 23:21:40 2016
@@ -467,6 +467,7 @@
$this->show_sums = false;
if ($query_in[‘filter’])
{
-
$query_in['enddate'] = $query_in['enddate'] ? $query_in['enddate'] : time();
$date_filter = $this->date_filter($query_in['filter'],$query_in['startdate'],$query_in['enddate']);
if ($query_in['startdate'])
@@ -651,6 +652,15 @@
$GLOBALS[‘egw_info’][‘flags’][‘app_header’] .= ’ - '.common::show_date($query[‘enddate’]+126060,$df,false);
}
}
-
}
-
// Update start / end dates for custom
-
if($query_in['filter'] != 'custom')
-
{
-
egw_json_response::get()->call(
-
'app.timesheet.update_timespan',
-
egw_time::to($query['startdate'] ? $query['startdate'] : now() ,egw_time::ET2),
-
$query['filter'] ? egw_time::to($query['enddate'], egw_time::ET2) : null
-
);
}
$total = parent::get_rows($query,$rows,$readonlys);
— trunk/timesheet/js/app.js (original)
+++ trunk/timesheet/js/app.js Mon Apr 25 23:21:40 2016
@@ -77,10 +77,11 @@
{
dates.set_disabled(filter.value !== “custom”);
if (filter.value == “custom”)
-
{
jQuery(this.et2.getWidgetById('startdate').getDOMNode()).find('input').focus();
}
}
-
return true;
},
/**
@@ -124,6 +125,27 @@
},
/**
-
- Update custom filter timespan, without triggering a change
-
*/
-
update_timespan: function(start, end)
-
{
-
if(this && this.et2)
-
{
-
var nm = this.et2.getWidgetById('nm');
-
if(nm)
-
{
-
// Toggle update_in_progress to avoid another request
-
nm.update_in_progress = true;
-
this.et2.getWidgetById('startdate').set_value(start);
-
this.et2.getWidgetById('enddate').set_value(end);
-
nm.activeFilters.startdate = start;
-
nm.activeFilters.enddate = end;
-
nm.update_in_progress = false;
-
}
-
}
-
},
-
-
/**
- Get title in order to set it as document title
-
@returns {string}
*/
— trunk/timesheet/templates/default/index.xet (original)
+++ trunk/timesheet/templates/default/index.xet Mon Apr 25 23:21:40 2016
@@ -7,7 +7,7 @@
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs