changed: show warning if ics file not found
This commit is contained in:
parent
cf954e0f47
commit
c241505f06
|
@ -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:
|
||||
|
|
5
main.js
5
main.js
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue