From 647a9b2740f8b51c99909c7c059cad315b4661ba Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 16 Jan 2018 22:10:52 +0100 Subject: section-content-info-wrapper for register text --- view/tpl/register.tpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'view') diff --git a/view/tpl/register.tpl b/view/tpl/register.tpl index 493dba4c8..335d5f979 100755 --- a/view/tpl/register.tpl +++ b/view/tpl/register.tpl @@ -12,7 +12,9 @@ {{/if}} {{if $registertext}} -
{{$registertext}}
+
+
{{$registertext}}
+
{{/if}} {{if $invitations}} -- cgit v1.2.3 From eb86ffefbfb38cf76316940a6aa164530f9b9348 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 17 Jan 2018 21:30:19 -0800 Subject: provide local pubstream option (content from this site only). --- view/tpl/admin_site.tpl | 1 + 1 file changed, 1 insertion(+) (limited to 'view') 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}}
-- cgit v1.2.3 From 21d081e175ccc3201fe58f44b5aabb98a3c15671 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 18 Jan 2018 11:22:30 +0100 Subject: implement notifications name filter and slightly change the way we load notification to the ui --- view/css/widgets.css | 8 ++++++++ view/js/main.js | 29 ++++++++++++++++++++++------- view/tpl/notifications_widget.tpl | 30 ++++++++++++++++++++++++++---- 3 files changed, 56 insertions(+), 11 deletions(-) (limited to 'view') diff --git a/view/css/widgets.css b/view/css/widgets.css index 76e829b04..576445dd6 100644 --- a/view/css/widgets.css +++ b/view/css/widgets.css @@ -178,6 +178,14 @@ a.wikilist { max-height: 70vh; overflow: auto; } +.notifications-textinput input { + font-family: FontAwesome, sans-serif; +} + + +.notifications-textinput { + padding: .75rem 0.85rem; +} .notification-content.collapsing { overflow: hidden; diff --git a/view/js/main.js b/view/js/main.js index 77b8e91e7..52b836936 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -881,10 +881,11 @@ function notify_popup_loader(notifyType) { /* notifications template - different for navbar and notifications widget */ var navbar_notifications_tpl= unescape($("#navbar-notifications-template[rel=template]").html()); var notifications_tpl= unescape($("#nav-notifications-template[rel=template]").html()); - var notifications_all = unescape($('
').append( $("#nav-" + notifyType + "-see-all").clone() ).html()); //outerHtml hack - var notifications_mark = unescape($('
').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 notifications_all = unescape($('
').append( $("#nav-" + notifyType + "-see-all").clone() ).html()); //outerHtml hack + //var notifications_mark = unescape($('
').append( $("#nav-" + notifyType + "-mark-all").clone() ).html()); //outerHtml hack + //var notifications_tt_only = unescape($('
').append( $("#tt-" + notifyType + "-only").clone() ).html()); //outerHtml hack + //var notifications_cn_only = unescape($('
').append( $("#cn-" + notifyType + "-only").clone() ).html()); //outerHtml hack + //var notifications_empty = unescape($("#nav-" + notifyType + "-menu").html()); var notify_menu = $("#nav-" + notifyType + "-menu"); @@ -895,11 +896,13 @@ function notify_popup_loader(notifyType) { 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); @@ -915,11 +918,23 @@ 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/notifications_widget.tpl b/view/tpl/notifications_widget.tpl index 9d2e08c41..9489e850c 100644 --- a/view/tpl/notifications_widget.tpl +++ b/view/tpl/notifications_widget.tpl @@ -65,6 +65,23 @@ $('#nav-{{$notification.type}}-menu [data-thread_top=false]').toggle(); $(this).toggleClass('active sticky-top'); }); + $(document).on('keyup', '#cn-{{$notification.type}}-input', function(e) { + var val = $('#cn-{{$notification.type}}-input').val().toLowerCase(); + + if(val) + $('#cn-{{$notification.type}}-only').addClass('active sticky-top'); + else + $('#cn-{{$notification.type}}-only').removeClass('active sticky-top'); + + $("#nav-{{$notification.type}}-menu .notification").each(function(i, el){ + var cn = $(el).data('contact_name').toLowerCase(); + + if(cn.indexOf(val) === -1) + $(this).addClass('d-none'); + else + $(this).removeClass('d-none'); + }); + }); {{/if}} {{/foreach}} @@ -90,7 +107,7 @@