diff --git a/calendar/inc/class.calendar_ui.inc.php b/calendar/inc/class.calendar_ui.inc.php index ee07f5d9ce..b05bda23ea 100644 --- a/calendar/inc/class.calendar_ui.inc.php +++ b/calendar/inc/class.calendar_ui.inc.php @@ -566,11 +566,7 @@ class calendar_ui */ function sidebox_menu() { - $base_hidden_vars = $link_vars = array(); - if (@$_POST['keywords']) - { - $base_hidden_vars['keywords'] = $_POST['keywords']; - } + $link_vars = array(); // Magic etemplate2 favorites menu (from nextmatch widget) display_sidebox('calendar',lang('Favorites'),array( array( @@ -698,12 +694,9 @@ class calendar_ui $file[++$n] = $this->_select_box('displayed view','view',$options,egw::link('/index.php','',false)); // Search - $blur = addslashes(html::htmlspecialchars(lang('Search').'...')); - $value = @$_POST['keywords'] ? html::htmlspecialchars($_POST['keywords']) : ''; $file[++$n] = array( - 'text' => html::form('', - '','/index.php',array('menuaction'=>'calendar.calendar_uilist.listview','ajax'=>'true')), + 'text' => html::input('keywords', '', 'text', + 'id="calendar_keywords" style="width: 97.5%;" placeholder="'.html::htmlspecialchars(lang('Search').'...').'"'), 'no_lang' => True, 'link' => False, 'icon' => false, diff --git a/calendar/inc/class.calendar_uilist.inc.php b/calendar/inc/class.calendar_uilist.inc.php index 96823019df..e7a5ba87ae 100644 --- a/calendar/inc/class.calendar_uilist.inc.php +++ b/calendar/inc/class.calendar_uilist.inc.php @@ -173,6 +173,16 @@ class calendar_uilist extends calendar_ui { $content['nm']['search'] = $_GET['search']; } + // search via jdots ajax_exec uses $_REQUEST['json_data'] instead of regular GET parameters + if (isset($_REQUEST['json_data']) && ($json_data = json_decode($_REQUEST['json_data'], true)) && + !empty($json_data['request']['parameters'][0])) + { + parse_str(substr($json_data['request']['parameters'][0], 10), $params); // cut off "/index.php?" + if (isset($params['keywords'])) // new search => set filters so every match is shown + { + $this->adjust_for_search($params['keywords'], $content['nm']); + } + } if (isset($_REQUEST['keywords'])) // new search => set filters so every match is shown { $this->adjust_for_search($_REQUEST['keywords'],$content['nm']); diff --git a/calendar/js/navigation.js b/calendar/js/navigation.js index b0b8919a25..2d6bfc35fa 100644 --- a/calendar/js/navigation.js +++ b/calendar/js/navigation.js @@ -148,6 +148,9 @@ selectBox.multiple=true; } }); + $j('#calendar_keywords').change(function(){ + egw.open_link('calendar.calendar_uilist.listview&keywords='+encodeURIComponent(this.value)+'&ajax=true', 'calendar'); + }); }); Calendar.setup({ flat : "calendar-container",