From 01da1c3bd437eba7e8523bccc322799952a67671 Mon Sep 17 00:00:00 2001 From: nathangray Date: Mon, 25 Nov 2019 15:46:36 -0700 Subject: [PATCH] Calendar: Make sure search from sidebox doesn't come back in list view after being cleared --- calendar/inc/class.calendar_uilist.inc.php | 2 ++ calendar/js/app.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/calendar/inc/class.calendar_uilist.inc.php b/calendar/inc/class.calendar_uilist.inc.php index a1557b684c..1c2f413cdc 100644 --- a/calendar/inc/class.calendar_uilist.inc.php +++ b/calendar/inc/class.calendar_uilist.inc.php @@ -172,10 +172,12 @@ class calendar_uilist extends calendar_ui { $this->adjust_for_search($params['keywords'], $content['nm']); } + unset($params['keywords']); } if (isset($_REQUEST['keywords'])) // new search => set filters so every match is shown { $this->adjust_for_search($_REQUEST['keywords'],$content['nm']); + unset($_REQUEST['keywords']); } $sel_options['filter'] = &$this->date_filters; diff --git a/calendar/js/app.js b/calendar/js/app.js index 902ae89b7d..8a7b554ecd 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -2693,7 +2693,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend( } state.state.col_filter = {participant: state.state.owner}; state.state.search = state.state.keywords ? state.state.keywords : state.state.search; - + delete state.state.keywords; var nm = view.etemplates[0].widgetContainer.getWidgetById('nm');