changed: show warning if ics file not found

This commit is contained in:
quenousimporte 2023-07-11 10:30:38 +02:00
parent cf954e0f47
commit c241505f06
2 changed files with 14 additions and 4 deletions

View File

@ -41,9 +41,16 @@ else if (isset($_POST['action']))
break;
case 'cal':
if (file_exists($icsfile))
{
$result = array();
$result["ics"] = file_get_contents($icsfile);
echo json_encode($result);
}
else
{
echo '{"warning": "cannot load ics file"}';
}
break;
default:

View File

@ -1449,6 +1449,10 @@ function queryremote(params)
failed("Remote handler returned an error: " + data.error);
}
}
else if (data.warning)
{
console.warn("Remote warning: " + data.warning);
}
else
{
authentpage.hidden = true;
@ -2271,7 +2275,6 @@ function editorkeydown()
else
{
newtext = selection.replaceAll("\n", "\n ");
}
md.value = md.value.substring(0, range.start)
+ newtext