Fixed autorefresh in full screen - #3739
This commit is contained in:
parent
31905f005a
commit
46f64f75c8
|
@ -80,9 +80,8 @@ function mainAgentsModules()
|
||||||
$full_modules_selected = explode(';', get_parameter('full_modules_selected', 0));
|
$full_modules_selected = explode(';', get_parameter('full_modules_selected', 0));
|
||||||
$full_agents_id = explode(';', get_parameter('full_agents_id', 0));
|
$full_agents_id = explode(';', get_parameter('full_agents_id', 0));
|
||||||
|
|
||||||
if ($save_serialize == 0 && $update_item == '') {
|
// In full screen there is no pagination neither filters.
|
||||||
// manu ha puesto esto para que funcione la pantalla completa
|
if (( ($config['pure'] == 0 && $save_serialize) && $update_item == '' ) || ( ($config['pure'] == 1 && $save_serialize == 0) && $update_item == '' )) {
|
||||||
// if ($save_serialize && $update_item == '') { // Pero debe estar asi (como antes) para que funcione la paginacion de la propia tabla
|
|
||||||
$unserialize_modules_selected = unserialize_in_temp($config['id_user'].'_agent_module', true, 1);
|
$unserialize_modules_selected = unserialize_in_temp($config['id_user'].'_agent_module', true, 1);
|
||||||
$unserialize_agents_id = unserialize_in_temp($config['id_user'].'_agents', true, 1);
|
$unserialize_agents_id = unserialize_in_temp($config['id_user'].'_agents', true, 1);
|
||||||
if ($unserialize_modules_selected) {
|
if ($unserialize_modules_selected) {
|
||||||
|
@ -654,8 +653,8 @@ $ignored_params['refresh'] = '';
|
||||||
$("#div_module_r_" + id).show();
|
$("#div_module_r_" + id).show();
|
||||||
});
|
});
|
||||||
|
|
||||||
var refr =" . $refr . ";
|
var refr = '<?php echo get_parameter('refresh', 0); ?>';
|
||||||
var pure =" . $pure_var . ";
|
var pure = '<?php echo get_parameter('pure', 0); ?>';
|
||||||
var href =' <?php echo ui_get_url_refresh($ignored_params); ?>';
|
var href =' <?php echo ui_get_url_refresh($ignored_params); ?>';
|
||||||
|
|
||||||
if (pure) {
|
if (pure) {
|
||||||
|
@ -666,18 +665,21 @@ $ignored_params['refresh'] = '';
|
||||||
t.setTime(t.getTime() + duration * 1000);
|
t.setTime(t.getTime() + duration * 1000);
|
||||||
$('div.vc-countdown').countdown({
|
$('div.vc-countdown').countdown({
|
||||||
until: t,
|
until: t,
|
||||||
|
format: 'MS',
|
||||||
layout: '(%M%nn%M:%S%nn%S <?php echo __('Until next'); ?>) ',
|
layout: '(%M%nn%M:%S%nn%S <?php echo __('Until next'); ?>) ',
|
||||||
alwaysExpire: true,
|
alwaysExpire: true,
|
||||||
onExpiry: function () {
|
onExpiry: function () {
|
||||||
$('div.vc-countdown').countdown('destroy');
|
$('div.vc-countdown').countdown('destroy');
|
||||||
url = js_html_entity_decode( href ) + duration;
|
url = js_html_entity_decode( href ) + duration;
|
||||||
$(document).attr ("location", url);
|
$(document).attr ("location", url);
|
||||||
cb();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
startCountDown(refr, false);
|
if(refr>0){
|
||||||
|
startCountDown(refr, false);
|
||||||
|
}
|
||||||
|
|
||||||
var controls = document.getElementById('vc-controls');
|
var controls = document.getElementById('vc-controls');
|
||||||
autoHideElement(controls, 1000);
|
autoHideElement(controls, 1000);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue