aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rw-r--r--view/tpl/cdav_calendar.tpl16
-rwxr-xr-xview/tpl/jot-header.tpl2
2 files changed, 13 insertions, 5 deletions
diff --git a/view/tpl/cdav_calendar.tpl b/view/tpl/cdav_calendar.tpl
index 56f3670ba..f33ccda26 100644
--- a/view/tpl/cdav_calendar.tpl
+++ b/view/tpl/cdav_calendar.tpl
@@ -69,12 +69,20 @@ $(document).ready(function() {
eventClick: function(info) {
- console.log(info);
-
var event = info.event._def;
var dtstart = new Date(info.event._instance.range.start);
var dtend = new Date(info.event._instance.range.end);
+ if(event.extendedProps.plink) {
+ if(! $('#l2s').length)
+ $('#id_title_wrapper').prepend('<span id="l2s" class="float-right"></span>');
+
+ $('#l2s').html('<a href="' + event.extendedProps.plink[0] + '" target="_blank"><i class="fa fa-external-link"></i> ' + event.extendedProps.plink[1] + '</a>');
+ }
+ else {
+ $('#l2s').remove();
+ }
+
if(event.publicId == new_event_id) {
$('#calendar_select').trigger('change');
$('#event_submit').show();
@@ -470,12 +478,12 @@ function exportDate() {
{{include file="field_input.tpl" field=$title}}
<label for="calendar_select">{{$calendar_select_label}}</label>
<select id="calendar_select" name="target" class="form-control form-group">
- <optgroup label="Channel Calendars">
+ <optgroup label="{{$calendar_optiopns_label.0}}">
{{foreach $channel_calendars as $channel_calendar}}
<option value="channel_calendar">{{$channel_calendar.displayname}}</option>
{{/foreach}}
</optgroup>
- <optgroup label="CalDAV Calendars">
+ <optgroup label="{{$calendar_optiopns_label.1}}">
{{foreach $writable_calendars as $writable_calendar}}
<option value="{{$writable_calendar.id.0}}:{{$writable_calendar.id.1}}">{{$writable_calendar.displayname}}{{if $writable_calendar.sharer}} ({{$writable_calendar.sharer}}){{/if}}</option>
{{/foreach}}
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl
index afaaa62d9..7b1f4ee05 100755
--- a/view/tpl/jot-header.tpl
+++ b/view/tpl/jot-header.tpl
@@ -354,7 +354,7 @@ var activeCommentText = '';
}
function itemAddToCal(id) {
- $.get('{{$baseurl}}/events/add/' + id);
+ $.get('{{$baseurl}}/channel_calendar/add/' + id);
if(timer) clearTimeout(timer);
timer = setTimeout(updateInit,1000);
}