mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-27 16:29:22 +01:00
fix framework lost on search in Stylite/Pixelegg template
This commit is contained in:
parent
5b586c4687
commit
fc18f4d1ab
@ -566,11 +566,7 @@ class calendar_ui
|
|||||||
*/
|
*/
|
||||||
function sidebox_menu()
|
function sidebox_menu()
|
||||||
{
|
{
|
||||||
$base_hidden_vars = $link_vars = array();
|
$link_vars = array();
|
||||||
if (@$_POST['keywords'])
|
|
||||||
{
|
|
||||||
$base_hidden_vars['keywords'] = $_POST['keywords'];
|
|
||||||
}
|
|
||||||
// Magic etemplate2 favorites menu (from nextmatch widget)
|
// Magic etemplate2 favorites menu (from nextmatch widget)
|
||||||
display_sidebox('calendar',lang('Favorites'),array(
|
display_sidebox('calendar',lang('Favorites'),array(
|
||||||
array(
|
array(
|
||||||
@ -698,12 +694,9 @@ class calendar_ui
|
|||||||
$file[++$n] = $this->_select_box('displayed view','view',$options,egw::link('/index.php','',false));
|
$file[++$n] = $this->_select_box('displayed view','view',$options,egw::link('/index.php','',false));
|
||||||
|
|
||||||
// Search
|
// Search
|
||||||
$blur = addslashes(html::htmlspecialchars(lang('Search').'...'));
|
|
||||||
$value = @$_POST['keywords'] ? html::htmlspecialchars($_POST['keywords']) : '';
|
|
||||||
$file[++$n] = array(
|
$file[++$n] = array(
|
||||||
'text' => html::form('<input name="keywords" value="'.$value.'" style="width: 97.5%;"'.
|
'text' => html::input('keywords', '', 'text',
|
||||||
' placeholder="'.$blur.'" title="'.lang('Search').'">',
|
'id="calendar_keywords" style="width: 97.5%;" placeholder="'.html::htmlspecialchars(lang('Search').'...').'"'),
|
||||||
'','/index.php',array('menuaction'=>'calendar.calendar_uilist.listview','ajax'=>'true')),
|
|
||||||
'no_lang' => True,
|
'no_lang' => True,
|
||||||
'link' => False,
|
'link' => False,
|
||||||
'icon' => false,
|
'icon' => false,
|
||||||
|
@ -173,6 +173,16 @@ class calendar_uilist extends calendar_ui
|
|||||||
{
|
{
|
||||||
$content['nm']['search'] = $_GET['search'];
|
$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
|
if (isset($_REQUEST['keywords'])) // new search => set filters so every match is shown
|
||||||
{
|
{
|
||||||
$this->adjust_for_search($_REQUEST['keywords'],$content['nm']);
|
$this->adjust_for_search($_REQUEST['keywords'],$content['nm']);
|
||||||
|
@ -148,6 +148,9 @@
|
|||||||
selectBox.multiple=true;
|
selectBox.multiple=true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
$j('#calendar_keywords').change(function(){
|
||||||
|
egw.open_link('calendar.calendar_uilist.listview&keywords='+encodeURIComponent(this.value)+'&ajax=true', 'calendar');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
Calendar.setup({
|
Calendar.setup({
|
||||||
flat : "calendar-container",
|
flat : "calendar-container",
|
||||||
|
Loading…
Reference in New Issue
Block a user