').append( $("#nav-" + notifyType + "-mark-all").clone() ).html()); //outerHtml hack
- var notifications_tt_only = unescape($('
').append( $("#tt-" + notifyType + "-only").clone() ).html()); //outerHtml hack
- var notifications_empty = unescape($("#nav-" + notifyType + "-menu").html());
-
var notify_menu = $("#nav-" + notifyType + "-menu");
-
var pingExCmd = 'ping/' + notifyType + ((localUser != 0) ? '?f=&uid=' + localUser : '');
+
$.get(pingExCmd, function(data) {
if(data.invalid == 1) {
window.location.href=window.location.href;
}
- $("#navbar-" + notifyType + "-menu").html(notifications_all + notifications_mark + notifications_tt_only);
- $("#nav-" + notifyType + "-menu").html(notifications_all + notifications_mark + notifications_tt_only);
+ //$("#navbar-" + notifyType + "-menu").html(notifications_all + notifications_mark + notifications_tt_only + notifications_cn_only);
+ //$("#nav-" + notifyType + "-menu").html(notifications_all + notifications_mark + notifications_tt_only + notifications_cn_only);
$("." + notifyType + "-update").html(data.notify.length);
+ notify_menu.html('');
+
$(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,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,this.thread_top);
- $("#nav-" + notifyType + "-menu").append(html);
+ notify_menu.append(html);
});
$(".dropdown-menu img[data-src], .notification img[data-src]").each(function(i, el){
@@ -915,11 +908,22 @@ function notify_popup_loader(notifyType) {
if($('#tt-' + notifyType + '-only').hasClass('active'))
$('#nav-' + notifyType + '-menu [data-thread_top=false]').hide();
+
+ var filter = $('#cn-' + notifyType + '-input').val();
+ if(filter) {
+ $('#nav-' + notifyType + '-menu .notification').each(function(i, el){
+ var cn = $(el).data('contact_name').toLowerCase();
+ if(cn.indexOf(filter) === -1)
+ $(this).addClass('d-none');
+ else
+ $(this).removeClass('d-none');
+ });
+ }
});
setTimeout(function() {
- if(notify_menu.hasClass('show')) {
+ if($('#nav-' + notifyType + '-sub').hasClass('show')) {
console.log('updating ' + notifyType + ' notifications...');
setTimeout(notify_popup_loader, updateInterval, notifyType);
}
diff --git a/view/tpl/admin_site.tpl b/view/tpl/admin_site.tpl
index 97c14b6e3..50482f03d 100755
--- a/view/tpl/admin_site.tpl
+++ b/view/tpl/admin_site.tpl
@@ -82,6 +82,7 @@
{{include file="field_checkbox.tpl" field=$feed_contacts}}
{{include file="field_checkbox.tpl" field=$force_publish}}
{{include file="field_checkbox.tpl" field=$disable_discover_tab}}
+ {{include file="field_checkbox.tpl" field=$site_firehose}}
diff --git a/view/tpl/hdr.tpl b/view/tpl/hdr.tpl
index 29137c740..e69de29bb 100644
--- a/view/tpl/hdr.tpl
+++ b/view/tpl/hdr.tpl
@@ -1,3 +0,0 @@
-
\ No newline at end of file
diff --git a/view/tpl/navbar_tucson.tpl b/view/tpl/navbar_tucson.tpl
index 08fc40656..2c9570938 100755
--- a/view/tpl/navbar_tucson.tpl
+++ b/view/tpl/navbar_tucson.tpl
@@ -16,12 +16,9 @@
{{/if}}