diff --git a/apps/calendar/templates/calendar.php b/apps/calendar/templates/calendar.php
index 6654568f5ad8f535f1752040e7203bf9e66753dc..bee98f43e1eabdcb86a79cfab93e364ac660cb51 100755
--- a/apps/calendar/templates/calendar.php
+++ b/apps/calendar/templates/calendar.php
@@ -15,6 +15,7 @@
 				var missing_field_totime = '<?php echo $l->t('To Time') ?>';
 				var missing_field_startsbeforeends = '<?php echo $l->t('The event ends before it starts') ?>';
 				var missing_field_dberror = '<?php echo $l->t('There was a database fail') ?>';
+				var totalurl = '<?php echo OC_Helper::linkTo('apps/calendar', 'caldav.php', null, true); ?>';
 				</script>
 				<div id="controls">
 					<div>