aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl
diff options
context:
space:
mode:
Diffstat (limited to 'view/tpl')
-rw-r--r--view/tpl/cdav_calendar.tpl46
-rw-r--r--view/tpl/chat.tpl12
-rw-r--r--view/tpl/conv_item.tpl4
-rw-r--r--view/tpl/conv_list.tpl10
-rw-r--r--view/tpl/hq.tpl4
-rw-r--r--view/tpl/hq_controls.tpl6
-rw-r--r--view/tpl/jot-header.tpl4
-rw-r--r--view/tpl/messages_widget.tpl47
-rw-r--r--view/tpl/notifications_widget.tpl13
-rw-r--r--view/tpl/photo_view.tpl2
-rw-r--r--view/tpl/search_item.tpl6
-rw-r--r--view/tpl/settings.tpl7
12 files changed, 97 insertions, 64 deletions
diff --git a/view/tpl/cdav_calendar.tpl b/view/tpl/cdav_calendar.tpl
index 28cd11b2e..823453843 100644
--- a/view/tpl/cdav_calendar.tpl
+++ b/view/tpl/cdav_calendar.tpl
@@ -24,16 +24,16 @@ $(document).ready(function() {
calendar = new FullCalendar.Calendar(calendarEl, {
plugins: [ 'interaction', 'dayGrid', 'timeGrid', 'list' ],
eventSources: [ {{$sources}} ],
-
+
timeZone: '{{$timezone}}',
locale: '{{$lang}}',
eventTextColor: 'white',
header: false,
-
+
height: 'auto',
-
+
firstDay: {{$first_day}},
defaultView: default_view,
@@ -59,7 +59,7 @@ $(document).ready(function() {
allDayText: aStr['allday'],
snapDuration: '00:05:00',
-
+
dateClick: function(info) {
if(new_event.id) {
var event_poi = calendar.getEventById(new_event.id);
@@ -151,7 +151,7 @@ $(document).ready(function() {
event_poi.remove();
new_event = {};
}
-
+
var calendar_id = ((event.extendedProps.calendar_id.constructor === Array) ? event.extendedProps.calendar_id[0] + ':' + event.extendedProps.calendar_id[1] : event.extendedProps.calendar_id);
if(!event.extendedProps.recurrent) {
@@ -209,7 +209,7 @@ $(document).ready(function() {
$('#calendar_select').val(calendar_id).attr('disabled', true).trigger('change');
}
},
-
+
eventResize: function(info) {
var event = info.event._def;
@@ -258,13 +258,13 @@ $(document).ready(function() {
});
}
},
-
+
eventDrop: function(info) {
var event = info.event._def;
var dtstart = new Date(info.event._instance.range.start);
var dtend = new Date(info.event._instance.range.end);
-
+
$('#id_title').val(event.title);
$('#id_dtstart').val(dtstart.toUTCString().slice(0, -4));
$('#id_dtend').val(dtend.toUTCString().slice(0, -4));
@@ -316,24 +316,24 @@ $(document).ready(function() {
$('#today-btn > i').show();
}
}
-
+
});
-
+
calendar.render();
$('#title').text(calendar.view.title);
$('#view_selector').html(views[calendar.view.type]);
-
+
$('#today-btn').on('click', function() {
calendar.today();
$('#title').text(calendar.view.title);
});
-
+
$('#prev-btn').on('click', function() {
calendar.prev();
$('#title').text(calendar.view.title);
});
-
+
$('#next-btn').on('click', function() {
calendar.next();
$('#title').text(calendar.view.title);
@@ -345,7 +345,7 @@ $(document).ready(function() {
else
$('#dbtn-acl, #id_categories_wrapper').addClass('d-none');
});
-
+
$('.color-edit').colorpicker({ input: '.color-edit-input' });
$(document).on('click','#fullscreen-btn', updateSize);
@@ -481,9 +481,13 @@ function on_submit() {
})
.done(function() {
var eventSource = calendar.getEventSourceById('channel_calendar');
- eventSource.refetch();
+ if (eventSource) {
+ eventSource.refetch();
+ }
+ else {
+ $.jGrowl('{{$disabled_warning}}', { sticky: false, theme: 'notice', life: 10000 });
+ }
reset_form();
-
});
}
@@ -503,9 +507,13 @@ function on_submit() {
.done(function() {
var parts = $('#calendar_select').val().split(':');
var eventSource = calendar.getEventSourceById(parts[0]);
- eventSource.refetch();
+ if (eventSource) {
+ eventSource.refetch();
+ }
+ else {
+ $.jGrowl('{{$disabled_warning}}', { sticky: false, theme: 'notice', life: 10000 });
+ }
reset_form();
-
});
}
}
@@ -549,7 +557,7 @@ function reset_form() {
event_poi.remove();
new_event = {};
}
-
+
if($('#more_block').hasClass('open'))
on_more();
}
diff --git a/view/tpl/chat.tpl b/view/tpl/chat.tpl
index 7ef957b7e..2f224b3cf 100644
--- a/view/tpl/chat.tpl
+++ b/view/tpl/chat.tpl
@@ -110,7 +110,9 @@ $(document).ready(function() {
$('#chatroom_bookmarks, #vcard').hide();
$('#chatroom_list, #chatroom_members').show();
adjustInlineTopBarHeight();
- chatNotificationInit();
+ $('#toggle-notifications').one('click', function() {
+ chatNotificationInit();
+ });
});
$(window).resize(function () {
@@ -141,7 +143,7 @@ function load_chats() {
$('#chat-top-spinner').hide();
}
});
-
+
chat_timer = setTimeout(load_chats,10000);
}
@@ -218,7 +220,7 @@ var chat_notify_audio = {};
// Request notification access from the user
// TODO: Check Hubzilla member config setting before requesting permission
function chatNotificationInit() {
-
+
if (!("Notification" in window)) {
window.console.log("This browser does not support system notifications");
}
@@ -258,8 +260,8 @@ var chat_issue_notification = function (theBody,theTitle) {
}
var n = new Notification(theTitle,options);
n.onclick = function (event) {
- setTimeout(n.close.bind(n), 300);
- }
+ setTimeout(n.close.bind(n), 300);
+ }
if(chat_notify_audio_enabled) {
chat_notify_audio.play();
}
diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl
index 361392796..2134f86e7 100644
--- a/view/tpl/conv_item.tpl
+++ b/view/tpl/conv_item.tpl
@@ -189,11 +189,11 @@
{{/foreach}}
{{/if}}
{{if $item.drop.dropping}}
- <a class="dropdown-item" href="#" onclick="dropItem('item/drop/{{$item.id}}', '#thread-wrapper-{{$item.id}}'); return false;" title="{{$item.drop.delete}}" ><i class="generic-icons-nav fa fa-fw fa-trash-o"></i>{{$item.drop.delete}}</a>
+ <a class="dropdown-item" href="#" onclick="dropItem('item/drop/{{$item.id}}', '#thread-wrapper-{{$item.id}}', '{{$item.mid}}'); return false;" title="{{$item.drop.delete}}" ><i class="generic-icons-nav fa fa-fw fa-trash-o"></i>{{$item.drop.delete}}</a>
{{/if}}
{{if $item.dropdown_extras}}
<div class="dropdown-divider"></div>
- {{$item.dropdown_extras}}
+ {{$item.dropdown_extras}}
{{/if}}
{{if $item.edpost && $item.dreport}}
<div class="dropdown-divider"></div>
diff --git a/view/tpl/conv_list.tpl b/view/tpl/conv_list.tpl
index ee5dc9742..af6cc0557 100644
--- a/view/tpl/conv_list.tpl
+++ b/view/tpl/conv_list.tpl
@@ -124,7 +124,7 @@
</a>
<a class="dropdown-item" href="#" title="{{$item.conlabels.1}}" onclick="dolike({{$item.id}},'disagree'); return false;">
<i class="item-act-list fa fa-times{{if $item.my_responses.disagree}} ivoted{{/if}}" ></i> {{$item.conlabels.1}}
- </a>
+ </a>
<a class="dropdown-item" href="#" title="{{$item.conlabels.2}}" onclick="dolike({{$item.id}},'abstain'); return false;">
<i class="item-act-list fa fa-question{{if $item.my_responses.abstain}} ivoted{{/if}}" ></i> {{$item.conlabels.2}}
</a>
@@ -169,12 +169,16 @@
{{/foreach}}
{{/if}}
{{if $item.drop.dropping}}
- <a class="dropdown-item" href="#" onclick="dropItem('item/drop/{{$item.id}}', '#thread-wrapper-{{$item.id}}'); return false;" title="{{$item.drop.delete}}" ><i class="generic-icons-nav fa fa-fw fa-trash-o"></i>{{$item.drop.delete}}</a>
+ <a class="dropdown-item" href="#" onclick="dropItem('item/drop/{{$item.id}}', '#thread-wrapper-{{$item.id}}', '{{$item.mid}}'); return false;" title="{{$item.drop.delete}}" ><i class="generic-icons-nav fa fa-fw fa-trash-o"></i>{{$item.drop.delete}}</a>
{{/if}}
- <div class="dropdown-divider"></div>
{{if $item.edpost && $item.dreport}}
+ <div class="dropdown-divider"></div>
<a class="dropdown-item" href="dreport/{{$item.mid}}">{{$item.dreport}}</a>
{{/if}}
+ {{if $item.settings}}
+ <div class="dropdown-divider"></div>
+ <a class="dropdown-item conversation-settings-link" href="" data-toggle="modal" data-target="#conversation_settings">{{$item.settings}}</a>
+ {{/if}}
</div>
</div>
</div>
diff --git a/view/tpl/hq.tpl b/view/tpl/hq.tpl
deleted file mode 100644
index 099d892bb..000000000
--- a/view/tpl/hq.tpl
+++ /dev/null
@@ -1,4 +0,0 @@
-<div id="jot-popup">
-{{$editor}}
-</div>
-
diff --git a/view/tpl/hq_controls.tpl b/view/tpl/hq_controls.tpl
index 87accb5e0..3adbfa7c0 100644
--- a/view/tpl/hq_controls.tpl
+++ b/view/tpl/hq_controls.tpl
@@ -1,7 +1,7 @@
-<div class="d-grid gap-2 mb-3{{if $wrapper_class}} {{$wrapper_class}}{{/if}}">
+<div class="mb-3{{if $wrapper_class}} {{$wrapper_class}}{{/if}}">
{{foreach $entries as $e}}
- <button id="{{$e.id}}" class="{{$e.class}} rounded-circle" type="{{$e.type}}" title="{{$e.label}}"{{if $e.extra}} {{$e.extra}}{{/if}}>
- {{if $e.icon}}<i class="fa fa-{{$e.icon}}"></i>{{/if}}
+ <button class="{{$e.class}} rounded-circle{{if $entry_class}} {{$entry_class}}{{/if}}" type="{{$e.type}}" title="{{$e.label}}"{{if $e.extra}} {{$e.extra}}{{/if}}>
+ {{if $e.icon}}<i class="fa fa-{{$e.icon}} mt-1 mb-1"></i>{{/if}}
</button>
{{/foreach}}
</div>
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl
index b24283664..8da7b429d 100644
--- a/view/tpl/jot-header.tpl
+++ b/view/tpl/jot-header.tpl
@@ -320,7 +320,9 @@ var activeCommentText = '';
postSaveChanges('clean');
- {{if $reset}}
+ {{if $popup}}
+ $("#profile-jot-text").focus();
+ {{else if $reset}}
$(".jothidden").hide();
$("#profile-jot-text").removeClass('jot-expanded');
$("#profile-jot-tools").addClass('d-none');
diff --git a/view/tpl/messages_widget.tpl b/view/tpl/messages_widget.tpl
index d3dbd7be9..2d7ab99df 100644
--- a/view/tpl/messages_widget.tpl
+++ b/view/tpl/messages_widget.tpl
@@ -49,6 +49,9 @@
<small>{{$e.info}}</small>
</a>
{{/foreach}}
+ <div id="messages-empty" class="list-group-item border-0"{{if $entries}} style="display: none;"{{/if}}>
+ {{$strings.empty}}...
+ </div>
<div id="messages-loading" class="list-group-item" style="display: none;">
{{$strings.loading}}<span class="jumping-dots"><span class="dot-1">.</span><span class="dot-2">.</span><span class="dot-3">.</span></span>
</div>
@@ -59,9 +62,14 @@
var get_messages_page_active = false;
var messages_type;
+ $(document).ready(function () {
+ $('.messages-timeago').timeago();
+ $('.message[data-b64mid=\'' + bParam_mid + '\']').addClass('active');
+ });
+
$('#messages-widget').on('scroll', function() {
if(this.scrollTop > this.scrollHeight - this.clientHeight - (this.scrollHeight/7)) {
- get_messages_page('hq');
+ get_messages_page();
}
});
@@ -75,10 +83,8 @@
get_messages_page();
});
- $('.messages-timeago').timeago();
- $('.message[data-b64mid=\'' + bParam_mid + '\']').addClass('active');
-
function get_messages_page() {
+
if (get_messages_page_active)
return;
@@ -87,6 +93,8 @@
get_messages_page_active = true;
$('#messages-loading').show();
+ $('#messages-empty').hide();
+
$.ajax({
type: 'post',
url: 'hq',
@@ -99,19 +107,24 @@
messages_offset = obj.offset;
let html;
let tpl = $('#messages-template[rel=template]').html();
- obj.entries.forEach(function(e) {
- html = tpl.format(
- e.b64mid,
- e.created,
- e.summary,
- e.info,
- e.author_name,
- e.author_addr,
- e.href,
- e.icon
- );
- $('#messages-loading').before(html);
- });
+ if (obj.entries.length) {
+ obj.entries.forEach(function(e) {
+ html = tpl.format(
+ e.b64mid,
+ e.created,
+ e.summary,
+ e.info,
+ e.author_name,
+ e.author_addr,
+ e.href,
+ e.icon
+ );
+ $('#messages-loading').before(html);
+ });
+ }
+ else {
+ $('#messages-empty').show();
+ }
$('.message[data-b64mid=\'' + bParam_mid + '\']').addClass('active');
$('#messages-loading').hide();
$('.messages-timeago').timeago();
diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl
index 54008b397..5cbfcc214 100644
--- a/view/tpl/notifications_widget.tpl
+++ b/view/tpl/notifications_widget.tpl
@@ -15,14 +15,9 @@
$('.notifications-btn').click(function() {
if($('#notifications_wrapper').hasClass('fs')) {
$('#notifications_wrapper').prependTo('#' + notifications_parent);
- //undo scrollbar remove
- $('section').css('height', '');
}
else {
$('#notifications_wrapper').prependTo('section');
- //remove superfluous scrollbar
- //setting overflow to hidden here has issues with some browsers
- $('section').css('height', '100vh');
}
$('#notifications_wrapper').toggleClass('fs');
@@ -334,7 +329,7 @@
}
// load more notifications if visible notifications count becomes low
- if(sse_type && sse_offset != -1 && $('#nav-' + sse_type + '-menu').children(':visible').length < 15) {
+ if(sse_type && sse_offset != -1 && $('#nav-' + sse_type + '-menu').children(':not(.tt-filter-active)').length < 15) {
sse_bs_notifications(sse_type, false, true);
}
@@ -359,6 +354,10 @@
if($('#nav-' + notifyType + '-menu .notification[data-b64mid=\'' + this.b64mid + '\']').length)
return true;
+ if(!replace && !followup && (this.thread_top && notifyType === 'network')) {
+ $(document).trigger('hz:handleNetworkNotificationsItems', this);
+ }
+
html = notifications_tpl.format(this.notify_link,this.photo,this.name,this.addr,this.message,this.when,this.hclass,this.b64mid,this.notify_id,this.thread_top,this.unseen,this.private_forum, encodeURIComponent(this.mids), this.body);
notify_menu.append(html);
});
@@ -479,7 +478,7 @@
{{$no_notifications}}<span class="jumping-dots"><span class="dot-1">.</span><span class="dot-2">.</span><span class="dot-3">.</span></span>
</div>
<div id="nav-notifications-template" rel="template">
- <a class="list-group-item text-decoration-none text-darkclearfix notification {6}" href="{0}" title="{13}" data-b64mid="{7}" data-notify_id="{8}" data-thread_top="{9}" data-contact_name="{2}" data-contact_addr="{3}" data-when="{5}">
+ <a class="list-group-item text-decoration-none text-dark clearfix notification {6}" href="{0}" title="{13}" data-b64mid="{7}" data-notify_id="{8}" data-thread_top="{9}" data-contact_name="{2}" data-contact_addr="{3}" data-when="{5}">
<img class="menu-img-3" data-src="{1}" loading="lazy">
<div class="contactname"><span class="text-dark font-weight-bold">{2}</span> <span class="text-muted">{3}</span></div>
<span class="text-muted">{4}</span><br>
diff --git a/view/tpl/photo_view.tpl b/view/tpl/photo_view.tpl
index 6d566cab9..7698fb437 100644
--- a/view/tpl/photo_view.tpl
+++ b/view/tpl/photo_view.tpl
@@ -66,10 +66,12 @@
<label id="photo-edit-caption-label" for="photo-edit-caption">{{$edit.capt_label}}</label>
<input id="photo-edit-caption" class="form-control" type="text" name="desc" value="{{$edit.caption}}" />
</div>
+ {{*
<div class="form-group">
<label id="photo-edit-tags-label" for="photo-edit-newtag">{{$edit.tag_label}}</label>
<input name="newtag" id="photo-edit-newtag" class="form-control" title="{{$edit.help_tags}}" type="text" />
</div>
+ *}}
<div class="form-group">
{{include file="field_select.tpl" field=$edit.album_select}}
</div>
diff --git a/view/tpl/search_item.tpl b/view/tpl/search_item.tpl
index f94aaf37d..49b324f9d 100644
--- a/view/tpl/search_item.tpl
+++ b/view/tpl/search_item.tpl
@@ -71,6 +71,7 @@
<div class="spinner s"></div>
</div>
</div>
+ {{if $item.star || $item.thread_action_menu || $item.drop.dropping}}
<div class="btn-group">
<button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-cog"></i>
@@ -81,14 +82,15 @@
{{/if}}
{{if $item.thread_action_menu}}
{{foreach $item.thread_action_menu as $mitem}}
- <a class="dropdown-item" {{if $mitem.href}}href="{{$mitem.href}}"{{/if}} {{if $mitem.action}}onclick="{{$mitem.action}}"{{/if}} {{if $mitem.title}}title="{{$mitem.title}}"{{/if}} ><i class="fa fa-fw fa-{{$mitem.icon}} generic-icons-nav"></i>{{$mitem.title}}</a></li>
+ <a class="dropdown-item" {{if $mitem.href}}href="{{$mitem.href}}"{{/if}} {{if $mitem.action}}onclick="{{$mitem.action}}"{{/if}} {{if $mitem.title}}title="{{$mitem.title}}"{{/if}} ><i class="fa fa-fw fa-{{$mitem.icon}} generic-icons-nav"></i>{{$mitem.title}}</a>
{{/foreach}}
{{/if}}
{{if $item.drop.dropping}}
- <a class="dropdown-item" href="item/drop/{{$item.id}}" onclick="return confirmDelete();" title="{{$item.drop.delete}}" ><i class="fa fa-fw fa-trash-o generic-icons-nav"></i>{{$item.drop.delete}}</a></li>
+ <a class="dropdown-item" href="#" onclick="dropItem('item/drop/{{$item.id}}', '#thread-wrapper-{{$item.id}}', '{{$item.mid}}'); return false;" title="{{$item.drop.delete}}" ><i class="generic-icons-nav fa fa-fw fa-trash-o"></i>{{$item.drop.delete}}</a>
{{/if}}
</div>
</div>
+ {{/if}}
</div>
{{if $item.star && $item.star.isstarred}}
<div class="btn-group" id="star-button-{{$item.id}}">
diff --git a/view/tpl/settings.tpl b/view/tpl/settings.tpl
index c0808272d..e185707a8 100644
--- a/view/tpl/settings.tpl
+++ b/view/tpl/settings.tpl
@@ -106,7 +106,12 @@
<div class="section-content-tools-wrapper">
<div id="settings-notifications">
- {{include file="field_input.tpl" field=$mailhost}}
+ <div id="desktop-notifications-info" class="section-content-warning-wrapper" style="display: none;">
+ {{$desktop_notifications_info}}<br>
+ <a id="desktop-notifications-request" href="#">{{$desktop_notifications_request}}</a>
+ </div>
+
+ {{include file="field_input.tpl" field=$mailhost}}
<h3>{{$activity_options}}</h3>
<div class="group">