aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl
diff options
context:
space:
mode:
Diffstat (limited to 'view/tpl')
-rw-r--r--view/tpl/cdav_calendar.tpl62
-rwxr-xr-xview/tpl/conv_item.tpl6
-rwxr-xr-xview/tpl/conv_list.tpl6
-rw-r--r--view/tpl/field_select_grouped.tpl2
-rwxr-xr-xview/tpl/search_item.tpl2
5 files changed, 47 insertions, 31 deletions
diff --git a/view/tpl/cdav_calendar.tpl b/view/tpl/cdav_calendar.tpl
index 252d45cff..01739dd5b 100644
--- a/view/tpl/cdav_calendar.tpl
+++ b/view/tpl/cdav_calendar.tpl
@@ -58,7 +58,7 @@ $(document).ready(function() {
dayNamesShort: aStr['dayNamesShort'],
allDayText: aStr['allday'],
- snapDuration: '00:15:00',
+ snapDuration: '00:05:00',
dateClick: function(info) {
if(new_event.id) {
@@ -69,6 +69,14 @@ $(document).ready(function() {
allday = info.allDay;
+ if(allday) {
+ $('#id_dtstart_wrapper, #id_dtend_wrapper, #id_timezone_select_wrapper').hide();
+ }
+ else {
+ $('#id_dtstart_wrapper, #id_dtend_wrapper, #id_timezone_select_wrapper').show();
+ }
+
+
var dtend = new Date(info.date.toUTCString());
if(allday) {
dtend.setDate(dtend.getDate() + 1);
@@ -85,14 +93,14 @@ $(document).ready(function() {
$('#id_description').attr('disabled', false);
$('#id_location').attr('disabled', false);
$('#calendar_select').val($("#calendar_select option:first").val()).attr('disabled', false);
- $('#id_dtstart').val(info.date.toUTCString());
- $('#id_dtend').val(dtend ? dtend.toUTCString() : '');
+ $('#id_dtstart').val(info.date.toUTCString().slice(0, -4));
+ $('#id_dtend').val(dtend ? dtend.toUTCString().slice(0, -4) : '');
$('#id_description').val('');
$('#id_location').val('');
$('#event_submit').val('create_event').html('{{$create}}');
$('#event_delete').hide();
- new_event = { id: new_event_id, title: 'New event', start: $('#id_dtstart').val(), end: $('#id_dtend').val(), allDay: info.allDay, editable: true, color: '#bbb' };
+ new_event = { id: new_event_id, title: 'New event', start: info.date.toUTCString(), end: dtend ? dtend.toUTCString() : '', allDay: info.allDay, editable: true, color: '#bbb' };
calendar.addEvent(new_event);
},
@@ -114,6 +122,13 @@ $(document).ready(function() {
$('#l2s').remove();
}
+ if(event.allDay) {
+ $('#id_dtstart_wrapper, #id_dtend_wrapper, #id_timezone_select_wrapper').hide();
+ }
+ else {
+ $('#id_dtstart_wrapper, #id_dtend_wrapper, #id_timezone_select_wrapper').show();
+ }
+
if(event.publicId == new_event_id) {
$('#calendar_select').trigger('change');
$('#event_submit').show();
@@ -149,8 +164,8 @@ $(document).ready(function() {
$('#id_timezone_select').val(event.extendedProps.timezone);
$('#id_location').val(event.extendedProps.location);
$('#id_categories').tagsinput('add', event.extendedProps.categories);
- $('#id_dtstart').val(dtstart.toUTCString());
- $('#id_dtend').val(dtend.toUTCString());
+ $('#id_dtstart').val(dtstart.toUTCString().slice(0, -4));
+ $('#id_dtend').val(dtend.toUTCString().slice(0, -4));
$('#id_description').val(event.extendedProps.description);
$('#id_location').val(event.extendedProps.location);
$('#event_submit').val('update_event').html('{{$update}}');
@@ -202,8 +217,8 @@ $(document).ready(function() {
var dtend = new Date(info.event._instance.range.end);
$('#id_title').val(event.title);
- $('#id_dtstart').val(dtstart.toUTCString());
- $('#id_dtend').val(dtend.toUTCString());
+ $('#id_dtstart').val(dtstart.toUTCString().slice(0, -4));
+ $('#id_dtend').val(dtend.toUTCString().slice(0, -4));
event_id = event.extendedProps.item ? event.extendedProps.item.id : 0;
event_xchan = event.extendedProps.item ? event.extendedProps.item.event_xchan : '';
@@ -217,8 +232,8 @@ $(document).ready(function() {
'preview': 0,
'summary': event.title,
'timezone_select': event.extendedProps.timezone,
- 'dtstart': dtstart.toUTCString(),
- 'dtend': dtend.toUTCString(),
+ 'dtstart': dtstart.toUTCString().slice(0, -4),
+ 'dtend': dtend.toUTCString().slice(0, -4),
'adjust': event.allDay ? 0 : 1,
'categories': event.extendedProps.categories,
'desc': event.extendedProps.description,
@@ -234,8 +249,8 @@ $(document).ready(function() {
'id[]': event.extendedProps.calendar_id,
'uri': event.extendedProps.uri,
'timezone_select': event.extendedProps.timezone,
- 'dtstart': dtstart ? dtstart.toUTCString() : '',
- 'dtend': dtend ? dtend.toUTCString() : '',
+ 'dtstart': dtstart ? dtstart.toUTCString().slice(0, -4) : '',
+ 'dtend': dtend ? dtend.toUTCString().slice(0, -4) : '',
'allday': event.allDay ? 1 : 0
})
.fail(function() {
@@ -251,8 +266,8 @@ $(document).ready(function() {
var dtend = new Date(info.event._instance.range.end);
$('#id_title').val(event.title);
- $('#id_dtstart').val(dtstart.toUTCString());
- $('#id_dtend').val(dtend.toUTCString());
+ $('#id_dtstart').val(dtstart.toUTCString().slice(0, -4));
+ $('#id_dtend').val(dtend.toUTCString().slice(0, -4));
event_id = event.extendedProps.item ? event.extendedProps.item.id : 0;
event_xchan = event.extendedProps.item ? event.extendedProps.item.event_xchan : '';
@@ -266,8 +281,8 @@ $(document).ready(function() {
'preview': 0,
'summary': event.title,
'timezone_select': event.extendedProps.timezone,
- 'dtstart': dtstart.toUTCString(),
- 'dtend': dtend.toUTCString(),
+ 'dtstart': dtstart.toUTCString().slice(0, -4),
+ 'dtend': dtend.toUTCString().slice(0, -4),
'adjust': event.allDay ? 0 : 1,
'categories': event.extendedProps.categories,
'desc': event.extendedProps.description,
@@ -283,8 +298,8 @@ $(document).ready(function() {
'id[]': event.extendedProps.calendar_id,
'uri': event.extendedProps.uri,
'timezone_select': event.extendedProps.timezone,
- 'dtstart': dtstart ? dtstart.toUTCString() : '',
- 'dtend': dtend ? dtend.toUTCString() : '',
+ 'dtstart': dtstart ? dtstart.toUTCString().slice(0, -4) : '',
+ 'dtend': dtend ? dtend.toUTCString().slice(0, -4) : '',
'allday': event.allDay ? 1 : 0
})
.fail(function() {
@@ -352,8 +367,8 @@ $(document).ready(function() {
$('#calendar_select').val('channel_calendar').attr('disabled', true);
$('#id_title').val(resource.summary);
- $('#id_dtstart').val(new Date(resource.dtstart).toUTCString());
- $('#id_dtend').val(new Date(resource.dtend).toUTCString());
+ $('#id_dtstart').val(new Date(resource.dtstart).toUTCString().slice(0, -4));
+ $('#id_dtend').val(new Date(resource.dtend).toUTCString().slice(0, -4));
$('#id_categories').tagsinput('add', '{{$categories}}'),
$('#id_description').val(resource.description);
$('#id_location').val(resource.location);
@@ -366,20 +381,21 @@ $(document).ready(function() {
}
if(default_view === 'dayGridMonth');
- $('#id_dtstart_wrapper, #id_dtend_wrapper').hide();
+ $('#id_dtstart_wrapper, #id_dtend_wrapper, #id_timezone_select_wrapper').hide();
});
function changeView(viewName) {
+
calendar.changeView(viewName);
$('#title').text(calendar.view.title);
$('#view_selector').html(views[calendar.view.type]);
if(viewName === 'dayGridMonth') {
- $('#id_dtstart_wrapper, #id_dtend_wrapper').hide();
+ $('#id_dtstart_wrapper, #id_dtend_wrapper, #id_timezone_select_wrapper').hide();
}
else {
- $('#id_dtstart_wrapper, #id_dtend_wrapper').show();
+ $('#id_dtstart_wrapper, #id_dtend_wrapper, #id_timezone_select_wrapper').show();
}
return;
diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl
index 54f1af69d..09a2e05e0 100755
--- a/view/tpl/conv_item.tpl
+++ b/view/tpl/conv_item.tpl
@@ -9,12 +9,12 @@
<div class="wall-item-outside-wrapper{{if $item.is_comment}} comment{{/if}}{{if $item.previewing}} preview{{/if}}" data-mid="{{$item.mid}}" id="wall-item-outside-wrapper-{{$item.id}}" >
<div class="clearfix wall-item-content-wrapper{{if $item.is_comment}} comment{{/if}}" id="wall-item-content-wrapper-{{$item.id}}">
{{if $item.photo}}
- <div class="wall-photo-item{{if $item.is_new && !$item.title}} wall-item-head-new rounded-top{{/if}}" id="wall-photo-item-{{$item.id}}">
+ <div class="wall-photo-item" id="wall-photo-item-{{$item.id}}">
{{$item.photo}}
</div>
{{/if}}
{{if $item.event}}
- <div class="wall-event-item{{if $item.is_new && !$item.title}} wall-item-head-new rounded-top{{/if}}" id="wall-event-item-{{$item.id}}">
+ <div class="wall-event-item" id="wall-event-item-{{$item.id}}">
{{$item.event}}
</div>
{{/if}}
@@ -26,7 +26,7 @@
<hr class="m-0">
{{/if}}
{{/if}}
- <div class="p-2 clearfix wall-item-head{{if $item.is_new && !$item.title && !$item.event && !$item.is_comment && !$item.photo}} wall-item-head-new rounded-top{{/if}}" >
+ <div class="p-2 clearfix wall-item-head{{if !$item.title && !$item.event && !$item.photo}} rounded-top{{/if}}{{if $item.is_new && !$item.event && !$item.is_comment}} wall-item-head-new{{/if}}" >
{{if $item.thr_parent}}
<a href="javascript:doscroll('{{$item.thr_parent}}',{{$item.parent}});" title="{{$item.top_hint}}" class="float-right"><i class="fa fa-angle-double-up">&nbsp;&nbsp;&nbsp;</i></a>
{{/if}}
diff --git a/view/tpl/conv_list.tpl b/view/tpl/conv_list.tpl
index 63e74b159..a0c2cf827 100755
--- a/view/tpl/conv_list.tpl
+++ b/view/tpl/conv_list.tpl
@@ -9,12 +9,12 @@
<div class="wall-item-outside-wrapper{{if $item.is_comment}} comment{{/if}}{{if $item.previewing}} preview{{/if}}" id="wall-item-outside-wrapper-{{$item.id}}" >
<div class="clearfix wall-item-content-wrapper{{if $item.is_comment}} comment{{/if}}" id="wall-item-content-wrapper-{{$item.id}}">
{{if $item.photo}}
- <div class="wall-photo-item{{if $item.is_new && !$item.title}} wall-item-head-new rounded-top{{/if}}" id="wall-photo-item-{{$item.id}}">
+ <div class="wall-photo-item" id="wall-photo-item-{{$item.id}}">
{{$item.photo}}
</div>
{{/if}}
{{if $item.event}}
- <div class="wall-event-item{{if $item.is_new && !$item.title}} wall-item-head-new rounded-top{{/if}}" id="wall-event-item-{{$item.id}}">
+ <div class="wall-event-item" id="wall-event-item-{{$item.id}}">
{{$item.event}}
</div>
{{/if}}
@@ -26,7 +26,7 @@
<hr class="m-0">
{{/if}}
{{/if}}
- <div class="p-2 clearfix wall-item-head{{if $item.is_new && !$item.title && !$item.event && !$item.is_comment && !$item.photo}} wall-item-head-new rounded-top{{/if}}">
+ <div class="p-2 clearfix wall-item-head{{if !$item.title && !$item.event && !$item.photo}} rounded-top{{/if}}{{if $item.is_new && !$item.event && !$item.is_comment}} wall-item-head-new{{/if}}">
<div class="wall-item-info" id="wall-item-info-{{$item.id}}" >
<div class="wall-item-photo-wrapper{{if $item.owner_url}} wwfrom{{/if}} h-card p-author" id="wall-item-photo-wrapper-{{$item.id}}">
<img src="{{$item.thumb}}" class="fakelink wall-item-photo{{$item.sparkle}} u-photo p-name" id="wall-item-photo-{{$item.id}}" alt="{{$item.name}}" data-toggle="dropdown" /></a>
diff --git a/view/tpl/field_select_grouped.tpl b/view/tpl/field_select_grouped.tpl
index e6d1479de..ec067b8e7 100644
--- a/view/tpl/field_select_grouped.tpl
+++ b/view/tpl/field_select_grouped.tpl
@@ -1,4 +1,4 @@
- <div class='form-group field select'>
+ <div id='id_{{$field.0}}_wrapper' class='form-group field select'>
<label for='id_{{$field.0}}'>{{$field.1}}</label>
<select class="form-control" name='{{$field.0}}' id='id_{{$field.0}}'>
{{foreach $field.4 as $group=>$opts}}
diff --git a/view/tpl/search_item.tpl b/view/tpl/search_item.tpl
index 018e98989..3197fb893 100755
--- a/view/tpl/search_item.tpl
+++ b/view/tpl/search_item.tpl
@@ -20,7 +20,7 @@
<hr class="m-0">
{{/if}}
{{/if}}
- <div class="p-2 clearfix wall-item-head{{if $item.is_new && !$item.title && !$item.event && !$item.is_comment}} wall-item-head-new rounded-top{{/if}}">
+ <div class="p-2 clearfix wall-item-head{{if !$item.title && !$item.event && !$item.photo}} rounded-top{{/if}}{{if $item.is_new && !$item.event && !$item.is_comment}} wall-item-head-new{{/if}}" >
<div class="wall-item-info" id="wall-item-info-{{$item.id}}" >
<div class="wall-item-photo-wrapper{{if $item.owner_url}} wwfrom{{/if}}" id="wall-item-photo-wrapper-{{$item.id}}">
<img src="{{$item.thumb}}" class="fakelink wall-item-photo{{$item.sparkle}} u-photo p-name" id="wall-item-photo-{{$item.id}}" alt="{{$item.name}}" data-toggle="dropdown" />