Make sure we reset filter or not setting it when choosing select All

This commit is contained in:
Hadi Nategh 2020-08-20 13:53:45 +02:00
parent a7e611af5f
commit 6b910cc5fe
3 changed files with 6 additions and 2 deletions

View File

@ -707,7 +707,7 @@ class timesheet_ui extends timesheet_bo
}
}
// Update start / end dates for custom
if($query_in['filter'] != 'custom' && Api\Json\Response::isJSONResponse())
if($query_in['filter'] != '0' && $query_in['filter'] != 'custom' && Api\Json\Response::isJSONResponse())
{
Api\Json\Response::get()->call(
'app.timesheet.update_timespan',

View File

@ -63,8 +63,11 @@ var TimesheetApp = /** @class */ (function (_super) {
TimesheetApp.prototype.filter_change = function () {
var filter = this.et2.getWidgetById('filter');
var dates = this.et2.getWidgetById('timesheet.index.dates');
var nm = this.et2.getDOMWidgetById('nm');
if (filter && dates) {
dates.set_disabled(filter.get_value() !== "custom");
if (filter.get_value() == 0)
nm.activeFilters.startdate = null;
if (filter.value == "custom") {
jQuery(this.et2.getWidgetById('startdate').getDOMNode()).find('input').focus();
}

View File

@ -61,10 +61,11 @@ class TimesheetApp extends EgwApp
{
var filter = this.et2.getWidgetById('filter');
var dates = this.et2.getWidgetById('timesheet.index.dates');
let nm = this.et2.getDOMWidgetById('nm');
if (filter && dates)
{
dates.set_disabled(filter.get_value() !== "custom");
if (filter.get_value() == 0) nm.activeFilters.startdate = null;
if (filter.value == "custom")
{
jQuery(this.et2.getWidgetById('startdate').getDOMNode()).find('input').focus();