From 7c600b03803bfddd2d98084ef5c1976e35b84f9e Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 26 Jan 2018 11:44:24 +0100 Subject: preserve open state of notifications --- view/js/main.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'view') diff --git a/view/js/main.js b/view/js/main.js index 8eb02156b..13d002968 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -70,11 +70,21 @@ $(document).ready(function() { if(! $('#nav-' + notifyType + '-sub').hasClass('show')) { loadNotificationItems(notifyType); + sessionStorage.setItem('notification_open', notifyType); + } + else { + sessionStorage.removeItem('notification_open'); } $(this).data('clicked', true); }); + if(sessionStorage.getItem('notification_open') !== null) { + var notifyType = sessionStorage.getItem('notification_open'); + $('#nav-' + notifyType + '-sub').addClass('show'); + loadNotificationItems(notifyType); + } + // Allow folks to stop the ajax page updates with the pause/break key $(document).keydown(function(event) { if(event.keyCode == '8') { -- cgit v1.2.3 From 660079bd2a4a6dcb54390a4c2f22bbc7a0633fd4 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 26 Jan 2018 12:16:47 -0800 Subject: Issue with configurable site age limit, vagueness when informing about email validation policy; added email validation resend ability and the option to input a verification code at a webpage though both require additional work to provide these abilities. --- view/en/register_verify_member.tpl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'view') diff --git a/view/en/register_verify_member.tpl b/view/en/register_verify_member.tpl index 71f0964d4..9bdd7fa51 100644 --- a/view/en/register_verify_member.tpl +++ b/view/en/register_verify_member.tpl @@ -10,7 +10,12 @@ Login with the password you chose at registration. We need to verify your email address in order to give you full access. -If you registered this account, please visit the following link: +Your validation code is + +{{$hash}} + + +If you registered this account, please enter the validation code when requested or visit the following link: {{$siteurl}}/regver/allow/{{$hash}} -- cgit v1.2.3 From bd0f63980ba0d0e606f2dd7a65313f7e150d330a Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sat, 27 Jan 2018 12:51:48 -0800 Subject: Usability improvements to registration/verification workflow. This requires additional testing. --- view/tpl/email_validation.tpl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 view/tpl/email_validation.tpl (limited to 'view') diff --git a/view/tpl/email_validation.tpl b/view/tpl/email_validation.tpl new file mode 100644 index 000000000..f049a040f --- /dev/null +++ b/view/tpl/email_validation.tpl @@ -0,0 +1,16 @@ +

{{$title}}

+ +

{{$desc}}

+ +
+{{include file="field_input.tpl" field=$token}} + + +
+ +
+
+
+ -- cgit v1.2.3 From 2e4e56f7cc696b2c52014f0050294826caa74d7d Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 27 Jan 2018 22:23:47 +0100 Subject: if startpage is /hq redirect all notifications links to /hq and minor notifications and hq fixes --- view/js/main.js | 8 ++--- view/tpl/hq.tpl | 10 ------ view/tpl/notifications_widget.tpl | 67 +++++++++++++++++++++------------------ 3 files changed, 39 insertions(+), 46 deletions(-) (limited to 'view') diff --git a/view/js/main.js b/view/js/main.js index 13d002968..35f723a58 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -456,11 +456,7 @@ function handleNotificationsItems(notifyType, data) { notify_menu.append(html); }); - $(".dropdown-menu img[data-src], .notification img[data-src]").each(function(i, el){ - // Replace data-src attribute with src attribute for every image - $(el).attr('src', $(el).data("src")); - $(el).removeAttr("data-src"); - }); + datasrc2src('#notifications .notification img[data-src]'); if($('#tt-' + notifyType + '-only').hasClass('active')) $('#nav-' + notifyType + '-menu [data-thread_top=false]').hide(); @@ -834,7 +830,7 @@ function liveUpdate(notify_id) { // else data was valid - reset the recursion counter liveRecurse = 0; - if(typeof notify_id !== 'undefined') { + if(typeof notify_id !== 'undefined' && notify_id !== 'undefined') { $.post( "hq", { diff --git a/view/tpl/hq.tpl b/view/tpl/hq.tpl index fce11ff83..099d892bb 100755 --- a/view/tpl/hq.tpl +++ b/view/tpl/hq.tpl @@ -1,13 +1,3 @@ -{{if $no_messages}} - -{{/if}}
{{$editor}}
diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl index 69e5e15bc..e10062aed 100644 --- a/view/tpl/notifications_widget.tpl +++ b/view/tpl/notifications_widget.tpl @@ -21,7 +21,7 @@ }; }); - {{if $module == 'display' || $module == 'hq'}} + {{if $module == 'display' || $module == 'hq' || $startpage == 'hq'}} $(document).on('click', '.notification', function(e) { var b64mid = $(this).data('b64mid'); var notify_id = $(this).data('notify_id'); @@ -31,30 +31,37 @@ if(b64mid === 'undefined' && notify_id === 'undefined') return; - {{if $module == 'display'}} - history.pushState(stateObj, '', 'display/' + b64mid); - {{/if}} - {{if $module == 'hq'}} - history.pushState(stateObj, '', 'hq/' + b64mid); - {{/if}} - - {{if $module == 'hq'}} - if(b64mid !== 'undefined') { - {{else}} - if(path === 'display' && b64mid) { - {{/if}} + {{if $module != 'hq' && $startpage == 'hq'}} e.preventDefault(); - - if(! page_load) { - if($(this).parent().attr('id') !== 'nav-pubs-menu') - $(this).fadeOut(); - - getData(b64mid, notify_id); + window.location.href = 'hq/' + b64mid; + return; + {{else}} + {{if $module == 'display'}} + history.pushState(stateObj, '', 'display/' + b64mid); + {{/if}} + + {{if $module == 'hq'}} + history.pushState(stateObj, '', 'hq/' + b64mid); + {{/if}} + + {{if $module == 'hq'}} + if(b64mid !== 'undefined') { + {{else}} + if(path === 'display' && b64mid) { + {{/if}} + e.preventDefault(); + + if(! page_load) { + if($(this).parent().attr('id') !== 'nav-pubs-menu') + $(this).fadeOut(); + + getData(b64mid, notify_id); + } + + if($('#notifications_wrapper').hasClass('fs')) + $('#notifications_wrapper').prependTo('#' + notifications_parent).removeClass('fs'); } - - if($('#notifications_wrapper').hasClass('fs')) - $('#notifications_wrapper').prependTo('#' + notifications_parent).removeClass('fs'); - } + {{/if}} }); {{/if}} @@ -115,14 +122,14 @@
{{$no_notifications}}...
-