chg: [dashboard] cleanup

prevent @mokaddem's and @rommelfs's eyes from bleeding
pull/5635/head
iglocska 2020-03-04 15:08:18 +01:00
parent 1fe4d0dd57
commit c0e25c28ad
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 6 additions and 9 deletions

View File

@ -8,14 +8,11 @@
</div>
<script type="text/javascript">
$(document).ready(function() {
<?php
if ($config['autoRefreshDelay']) {
echo sprintf(
'setTimeout( function(){ updateDashboardWidget($("#widgetContentInner%s").parent().parent().parent())}, %s);',
$randomId,
$config['autoRefreshDelay'] . '000'
);
}
?>
if (<?= $config['autoRefreshDelay'] ?>) {
setTimeout( function(){
updateDashboardWidget($("#widgetContentInner<?= $randomId ?>").closest('.grid-stack-item'))},
<?= $config['autoRefreshDelay'] ?> * 1000
);
}
});
</script>