Merge pull request #1050 from bergware/master

Docker: make popup window fit in browser window
This commit is contained in:
tom mortensen
2022-03-14 13:29:10 -07:00
committed by GitHub
4 changed files with 6 additions and 8 deletions

View File

@@ -61,8 +61,8 @@ function popupWithIframe(title, cmd, reload, func) {
autoOpen:true,
title:title,
draggable:true,
width: Math.max(screen.availWidth/2,900),
height: Math.max(screen.availHeight*3/5,600),
width: Math.min(Math.max(window.innerWidth/2,900),1600),
height: Math.max(window.innerHeight*3/5,600),
resizable:true,
modal:true,
show:{effect:'fade', duration:250},

View File

@@ -28,6 +28,7 @@ theme="white"
locale=""
raw=""
rtl=""
showBannerGradient="yes"
[parity]
mode="0"
hour="0 0"

View File

@@ -421,7 +421,7 @@ foreach ($tasks as $button) {
$page = $button['name'];
echo "<div id='nav-item'";
echo $task==$page ? " class='active'>" : ">";
echo "<a href='/$page' onclick='initab()'>"._($button['Name'] ?? $page)."</a></div>";
echo "<a href='#' onclick='initab();window.location=\"/$page\"'>"._($button['Name'] ?? $page)."</a></div>";
// create list of nchan scripts to be started
if (isset($button['Nchan'])) nchan_merge($button['root'], $button['Nchan']);
}
@@ -663,9 +663,6 @@ defaultPage.on('message', function(msg,meta) {
break;
}
});
defaultPage.on('error', function(code,error) {
swal({title:"<?=_('Nchan communication error')?>", text:"<?=_('Page will be reloaded')?>", type:"warning", html:true, confirmButtonText:"<?=_('Ok')?>"},function(){setTimeout(refresh,50);});
});
var backtotopoffset = 250;
var backtotopduration = 500;

View File

@@ -168,8 +168,8 @@ foreach ($disks as $disk) {
case 'yellow':
if ($warn!=$last) {
if ($var['fsState']!='Stopped') {
$status = $name=='parity' ? "parity-sync in progress" : "drive not ready, content being reconstructed";
exec("$notify -l '/Main' -e ".escapeshellarg("Unraid $text error")." -s ".escapeshellarg("Warning [$server] - $text, $status")." -d ".escapeshellarg("$info")." -i \"warning\" 2>/dev/null");
$status = $name=='parity' ? "parity-sync in progress" : " is being reconstructed and is available for normal operation";
exec("$notify -l '/Main' -e ".escapeshellarg("Unraid $text message")." -s ".escapeshellarg("Notice [$server] - $text, $status")." -d ".escapeshellarg("$info")." 2>/dev/null");
}
$saved[$item][$name] = $warn;
}