mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 06:15:11 +00:00
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge
This commit is contained in:
commit
d5763ba476
7 changed files with 65 additions and 17 deletions
|
@ -804,6 +804,8 @@ class Enotify {
|
|||
'when' => relative_date($item['created']),
|
||||
'class' => (intval($item['item_unseen']) ? 'notify-unseen' : 'notify-seen'),
|
||||
'b64mid' => ((in_array($item['verb'], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) ? 'b64.' . base64url_encode($item['thr_parent']) : 'b64.' . base64url_encode($item['mid'])),
|
||||
'notify_id' => 'undefined',
|
||||
'thread_top' => (($item['item_thread_top']) ? true : false),
|
||||
'message' => strip_tags(bbcode($itemem_text))
|
||||
);
|
||||
|
||||
|
|
|
@ -20,8 +20,10 @@ class Notifications {
|
|||
'label' => t('View your network activity')
|
||||
],
|
||||
'markall' => [
|
||||
'url' => '#',
|
||||
'label' => t('Mark all notifications read')
|
||||
],
|
||||
'filter' => [
|
||||
'label' => t('Show new posts only')
|
||||
]
|
||||
];
|
||||
|
||||
|
@ -36,8 +38,10 @@ class Notifications {
|
|||
'label' => t('View your home activity')
|
||||
],
|
||||
'markall' => [
|
||||
'url' => '#',
|
||||
'label' => t('Mark all notifications seen')
|
||||
],
|
||||
'filter' => [
|
||||
'label' => t('Show new posts only')
|
||||
]
|
||||
];
|
||||
|
||||
|
@ -52,7 +56,6 @@ class Notifications {
|
|||
'label' => t('View your private mails')
|
||||
],
|
||||
'markall' => [
|
||||
'url' => '#',
|
||||
'label' => t('Mark all messages seen')
|
||||
]
|
||||
];
|
||||
|
@ -68,7 +71,6 @@ class Notifications {
|
|||
'label' => t('View events')
|
||||
],
|
||||
'markall' => [
|
||||
'url' => '#',
|
||||
'label' => t('Mark all events seen')
|
||||
]
|
||||
];
|
||||
|
@ -104,7 +106,6 @@ class Notifications {
|
|||
'label' => t('View all notices')
|
||||
],
|
||||
'markall' => [
|
||||
'url' => '#',
|
||||
'label' => t('Mark all notices seen')
|
||||
]
|
||||
];
|
||||
|
@ -132,8 +133,10 @@ class Notifications {
|
|||
'label' => t('View the public stream')
|
||||
],
|
||||
'markall' => [
|
||||
'url' => '#',
|
||||
'label' => t('Mark all notifications seen')
|
||||
],
|
||||
'filter' => [
|
||||
'label' => t('Show new posts only')
|
||||
]
|
||||
];
|
||||
}
|
||||
|
|
2
boot.php
2
boot.php
|
@ -50,7 +50,7 @@ require_once('include/hubloc.php');
|
|||
require_once('include/attach.php');
|
||||
|
||||
define ( 'PLATFORM_NAME', 'hubzilla' );
|
||||
define ( 'STD_VERSION', '2.9.3' );
|
||||
define ( 'STD_VERSION', '2.9.4' );
|
||||
define ( 'ZOT_REVISION', '1.3' );
|
||||
|
||||
define ( 'DB_UPDATE_VERSION', 1198 );
|
||||
|
|
|
@ -874,6 +874,7 @@ function notify_popup_loader(notifyType) {
|
|||
var notifications_tpl= unescape($("#nav-notifications-template[rel=template]").html());
|
||||
var notifications_all = unescape($('<div>').append( $("#nav-" + notifyType + "-see-all").clone() ).html()); //outerHtml hack
|
||||
var notifications_mark = unescape($('<div>').append( $("#nav-" + notifyType + "-mark-all").clone() ).html()); //outerHtml hack
|
||||
var notifications_tt_only = unescape($('<div>').append( $("#tt-" + notifyType + "-only").clone() ).html()); //outerHtml hack
|
||||
var notifications_empty = unescape($("#nav-" + notifyType + "-menu").html());
|
||||
|
||||
var notify_menu = $("#nav-" + notifyType + "-menu");
|
||||
|
@ -885,14 +886,15 @@ function notify_popup_loader(notifyType) {
|
|||
window.location.href=window.location.href;
|
||||
}
|
||||
|
||||
$("#navbar-" + notifyType + "-menu").html(notifications_all + notifications_mark);
|
||||
$("#nav-" + notifyType + "-menu").html(notifications_all + notifications_mark);
|
||||
$("#navbar-" + notifyType + "-menu").html(notifications_all + notifications_mark + notifications_tt_only);
|
||||
$("#nav-" + notifyType + "-menu").html(notifications_all + notifications_mark + notifications_tt_only);
|
||||
|
||||
$("." + notifyType + "-update").html(data.notify.length);
|
||||
|
||||
$(data.notify).each(function() {
|
||||
html = navbar_notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass,this.b64mid,this.notify_id);
|
||||
html = navbar_notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass,this.b64mid,this.notify_id,this.thread_top);
|
||||
$("#navbar-" + notifyType + "-menu").append(html);
|
||||
html = notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass,this.b64mid,this.notify_id);
|
||||
html = notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass,this.b64mid,this.notify_id,this.thread_top);
|
||||
$("#nav-" + notifyType + "-menu").append(html);
|
||||
});
|
||||
|
||||
|
@ -901,8 +903,12 @@ function notify_popup_loader(notifyType) {
|
|||
$(el).attr('src', $(el).data("src"));
|
||||
$(el).removeAttr("data-src");
|
||||
});
|
||||
|
||||
if($('#tt-' + notifyType + '-only').hasClass('active'))
|
||||
$('#nav-' + notifyType + '-menu [data-thread_top=false]').hide();
|
||||
});
|
||||
|
||||
|
||||
setTimeout(function() {
|
||||
if(notify_menu.hasClass('show')) {
|
||||
console.log('updating ' + notifyType + ' notifications...');
|
||||
|
|
|
@ -23,12 +23,33 @@ function UploadInit() {
|
|||
url: 'file_upload',
|
||||
dataType: 'json',
|
||||
dropZone: filedrag,
|
||||
formData: $('#ajax-upload-files').serializeArray(),
|
||||
maxChunkSize: 4 * 1024 * 1024,
|
||||
|
||||
add: function(e,data) {
|
||||
$(data.files).each( function() { this.count = ++ count; prepareHtml(this); });
|
||||
|
||||
var allow_cid = ($('#ajax-upload-files').data('allow_cid') || []);
|
||||
var allow_gid = ($('#ajax-upload-files').data('allow_gid') || []);
|
||||
var deny_cid = ($('#ajax-upload-files').data('deny_cid') || []);
|
||||
var deny_gid = ($('#ajax-upload-files').data('deny_gid') || []);
|
||||
|
||||
$('.acl-field').remove();
|
||||
|
||||
$(allow_gid).each(function(i,v) {
|
||||
$('#ajax-upload-files').append("<input class='acl-field' type='hidden' name='group_allow[]' value='"+v+"'>");
|
||||
});
|
||||
$(allow_cid).each(function(i,v) {
|
||||
$('#ajax-upload-files').append("<input class='acl-field' type='hidden' name='contact_allow[]' value='"+v+"'>");
|
||||
});
|
||||
$(deny_gid).each(function(i,v) {
|
||||
$('#ajax-upload-files').append("<input class='acl-field' type='hidden' name='group_deny[]' value='"+v+"'>");
|
||||
});
|
||||
$(deny_cid).each(function(i,v) {
|
||||
$('#ajax-upload-files').append("<input class='acl-field' type='hidden' name='contact_deny[]' value='"+v+"'>");
|
||||
});
|
||||
|
||||
data.formData = $('#ajax-upload-files').serializeArray();
|
||||
|
||||
data.submit();
|
||||
},
|
||||
|
||||
|
|
|
@ -113,7 +113,8 @@ a:focus,
|
|||
color: $link_colour;
|
||||
}
|
||||
|
||||
.fakelink {
|
||||
.fakelink,
|
||||
.cursor-pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
});
|
||||
|
||||
{{if $module == 'display' || $module == 'hq'}}
|
||||
$(document).on('click touch', '.notification', function(e) {
|
||||
$(document).on('click', '.notification', function(e) {
|
||||
var b64mid = $(this).data('b64mid');
|
||||
var notify_id = $(this).data('notify_id');
|
||||
var path = $(this)[0].pathname.substr(1,7);
|
||||
|
@ -53,6 +53,16 @@
|
|||
});
|
||||
{{/if}}
|
||||
|
||||
{{foreach $notifications as $notification}}
|
||||
{{if $notification.filter}}
|
||||
$(document).on('click', '#tt-{{$notification.type}}-only', function(e) {
|
||||
e.preventDefault();
|
||||
$('#nav-{{$notification.type}}-menu [data-thread_top=false]').toggle();
|
||||
$(this).toggleClass('active');
|
||||
});
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
|
||||
function getData(b64mid, notify_id) {
|
||||
$('.thread-wrapper').remove();
|
||||
bParam_mid = b64mid;
|
||||
|
@ -72,7 +82,7 @@
|
|||
<div id="notifications_wrapper">
|
||||
<div id="notifications" class="navbar-nav" data-children=".nav-item">
|
||||
<div id="nav-notifications-template" rel="template">
|
||||
<a class="list-group-item clearfix notification {5}" href="{0}" title="{2} {3}" data-b64mid="{6}" data-notify_id="{7}">
|
||||
<a class="list-group-item clearfix notification {5}" href="{0}" title="{2} {3}" data-b64mid="{6}" data-notify_id="{7}" data-thread_top="{8}">
|
||||
<img class="menu-img-3" data-src="{1}">
|
||||
<span class="contactname">{2}</span>
|
||||
<span class="dropdown-sub-text">{3}<br>{4}</span>
|
||||
|
@ -91,9 +101,14 @@
|
|||
</a>
|
||||
{{/if}}
|
||||
{{if $notification.markall}}
|
||||
<a class="list-group-item text-dark" id="nav-{{$notification.type}}-mark-all" href="{{$notification.markall.url}}" onclick="markRead('{{$notification.type}}'); return false;">
|
||||
<div class="list-group-item cursor-pointer" id="nav-{{$notification.type}}-mark-all" onclick="markRead('{{$notification.type}}'); return false;">
|
||||
<i class="fa fa-fw fa-check"></i> {{$notification.markall.label}}
|
||||
</a>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if $notification.filter}}
|
||||
<div class="list-group-item cursor-pointer" id="tt-{{$notification.type}}-only">
|
||||
<i class="fa fa-fw fa-filter"></i> {{$notification.filter.label}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{$loading}}
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue