Merge pull request #4501 from murrant/disable-resize-refresh

fix: Disable refreshing on window resize when $no_refresh is set.
This commit is contained in:
Neil Lathwood
2016-09-20 16:28:10 +01:00
committed by GitHub
3 changed files with 3 additions and 1 deletions

View File

@ -385,6 +385,7 @@ if ($no_refresh !== true && $config['page_refresh'] != 0) {
</script>');
} else {
echo('<script type="text/javascript">
var no_refresh = ' . var_export((bool)$no_refresh, true) . ';
$(document).ready(function() {
$("#countdown_timer").html("Refresh disabled");
$("#countdown_timer_status").html("<i class=\"fa fa-pause fa-fw\"></i>");

View File

@ -167,7 +167,7 @@ var newW;
$(window).on('resize', function(){
rtime = new Date();
if (timeout === false) {
if (timeout === false && !(typeof no_refresh === 'boolean' && no_refresh === true)) {
timeout = true;
setTimeout(resizeend, delta);
}

View File

@ -1,6 +1,7 @@
<?php
$details_visible = var_export($vars['format'] == 'list_detail', 1);
$errors_visible = var_export($vars['format'] == 'list_detail' || $vars['errors'], 1);
$no_refresh = true;
if ($vars['errors']) {
$error_sort = ' data-order="desc"';