forked from extern/egroupware
use egw_link_handler to stop calendar reload whole framework when switching away from listview
This commit is contained in:
parent
a79f7b87a6
commit
042db5996a
@ -679,7 +679,7 @@ class calendar_ui
|
|||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'text' => lang('listview'),
|
'text' => lang('listview'),
|
||||||
'value' => 'menuaction=calendar.calendar_uilist.listview',
|
'value' => 'menuaction=calendar.calendar_uilist.listview&ajax=true',
|
||||||
'selected' => $this->view == 'listview',
|
'selected' => $this->view == 'listview',
|
||||||
),
|
),
|
||||||
) as $data)
|
) as $data)
|
||||||
@ -694,7 +694,7 @@ class calendar_ui
|
|||||||
$file[++$n] = array(
|
$file[++$n] = array(
|
||||||
'text' => html::form('<input name="keywords" value="'.$value.'" style="width: 97.5%;"'.
|
'text' => html::form('<input name="keywords" value="'.$value.'" style="width: 97.5%;"'.
|
||||||
' placeholder="'.$blur.'" title="'.lang('Search').'">',
|
' placeholder="'.$blur.'" title="'.lang('Search').'">',
|
||||||
'','/index.php',array('menuaction'=>'calendar.calendar_uilist.listview')),
|
'','/index.php',array('menuaction'=>'calendar.calendar_uilist.listview','ajax'=>'true')),
|
||||||
'no_lang' => True,
|
'no_lang' => True,
|
||||||
'link' => False,
|
'link' => False,
|
||||||
'icon' => false,
|
'icon' => false,
|
||||||
@ -798,7 +798,7 @@ class calendar_ui
|
|||||||
$current_view_url = egw::link('/index.php',array(
|
$current_view_url = egw::link('/index.php',array(
|
||||||
'menuaction' => $this->view_menuaction,
|
'menuaction' => $this->view_menuaction,
|
||||||
'date' => $this->date,
|
'date' => $this->date,
|
||||||
),false);
|
)+($this->view == 'listview' ? array('ajax' => 'true') : array()),false);
|
||||||
$file[] = array(
|
$file[] = array(
|
||||||
'text' => "
|
'text' => "
|
||||||
<script type=\"text/javascript\" src=\"{$GLOBALS['egw_info']['server']['webserver_url']}/calendar/js/navigation.js\" id=\"calendar-navigation-script\" data-current-view-url=\"".htmlspecialchars($current_view_url)."\"/></script>\n".
|
<script type=\"text/javascript\" src=\"{$GLOBALS['egw_info']['server']['webserver_url']}/calendar/js/navigation.js\" id=\"calendar-navigation-script\" data-current-view-url=\"".htmlspecialchars($current_view_url)."\"/></script>\n".
|
||||||
|
@ -32,13 +32,15 @@
|
|||||||
}
|
}
|
||||||
if (owner) {
|
if (owner) {
|
||||||
if (typeof no_reset == 'unknown') no_reset = false;
|
if (typeof no_reset == 'unknown') no_reset = false;
|
||||||
egw_appWindow('calendar').location=url+'&owner='+(no_reset?'':'0,')+owner;
|
url += '&owner='+(no_reset?'':'0,')+owner;
|
||||||
|
if (url.match('&ajax=true')) url = url.replace('&ajax=true', '')+'&ajax=true';
|
||||||
|
egw_link_handler(url, 'calendar');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load template specific app.css file in top window too as sidebox needs it
|
* Load template specific app.css file in top window too as sidebox needs it
|
||||||
*
|
*
|
||||||
* @returns {Boolean}
|
* @returns {Boolean}
|
||||||
*/
|
*/
|
||||||
function load_top_app_css()
|
function load_top_app_css()
|
||||||
@ -73,7 +75,7 @@
|
|||||||
load_top_app_css();
|
load_top_app_css();
|
||||||
// change handlers setting a certain url, eg. view
|
// change handlers setting a certain url, eg. view
|
||||||
$j('#calendar_view').change(function(){
|
$j('#calendar_view').change(function(){
|
||||||
calendar_window.location = egw_webserverUrl+'/index.php?'+this.value;
|
egw_link_handler(egw_webserverUrl+'/index.php?'+this.value, 'calendar');
|
||||||
});
|
});
|
||||||
// calendar owner selection change
|
// calendar owner selection change
|
||||||
$j('#uical_select_owner,#uical_select_resource').change(function(e){
|
$j('#uical_select_owner,#uical_select_resource').change(function(e){
|
||||||
@ -87,8 +89,9 @@
|
|||||||
$j('#calendar_merge,#calendar_filter,#calendar_cat_id').change(function(){
|
$j('#calendar_merge,#calendar_filter,#calendar_cat_id').change(function(){
|
||||||
var val = $j(this).val();
|
var val = $j(this).val();
|
||||||
if ($j.isArray(val)) val = val.join(',');
|
if ($j.isArray(val)) val = val.join(',');
|
||||||
calendar_window.location = current_view_url+
|
var url = current_view_url+(current_view_url.search.length ? '&' : '?')+this.name+'='+val;
|
||||||
(current_view_url.search.length ? '&' : '?')+this.name+'='+val;
|
if (url.match('&ajax=true')) url = url.replace('&ajax=true', '')+'&ajax=true';
|
||||||
|
egw_link_handler(url, 'calendar');
|
||||||
if (this.name == 'merge') this.value='';
|
if (this.name == 'merge') this.value='';
|
||||||
});
|
});
|
||||||
// click handler to switch selectbox to multiple
|
// click handler to switch selectbox to multiple
|
||||||
|
Loading…
Reference in New Issue
Block a user