aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-06-17 10:14:23 +0000
committerMario <mario@mariovavti.com>2021-06-17 10:14:23 +0000
commitc268bc327a9c82acf05999039b0b3ab7191646eb (patch)
tree75a14ecfd2a449b6b086e5a9da2111abe6903eba
parente79a27c654589ed2ab3b3f2c1a6b603e2e642ad9 (diff)
downloadvolse-hubzilla-c268bc327a9c82acf05999039b0b3ab7191646eb.tar.gz
volse-hubzilla-c268bc327a9c82acf05999039b0b3ab7191646eb.tar.bz2
volse-hubzilla-c268bc327a9c82acf05999039b0b3ab7191646eb.zip
fix issues with browser back button and minor cleanup
-rw-r--r--Zotlabs/Module/Hq.php5
-rw-r--r--view/js/main.js6
-rw-r--r--view/js/mod_hq.js7
-rw-r--r--view/tpl/messages_widget.tpl5
4 files changed, 9 insertions, 14 deletions
diff --git a/Zotlabs/Module/Hq.php b/Zotlabs/Module/Hq.php
index a8d321b24..4d55b76b0 100644
--- a/Zotlabs/Module/Hq.php
+++ b/Zotlabs/Module/Hq.php
@@ -104,7 +104,7 @@ class Hq extends \Zotlabs\Web\Controller {
'bang' => '',
'visitor' => true,
'profile_uid' => local_channel(),
- 'return_path' => 'hq', //(($dm_mode) ? 'dm' : 'hq'),
+ 'return_path' => 'hq',
'expanded' => true,
'editor_autocomplete' => true,
'bbco_autocomplete' => 'bbcode',
@@ -123,7 +123,6 @@ class Hq extends \Zotlabs\Web\Controller {
if(! $update && ! $load) {
- //$app = (($dm_mode) ? 'Direct Messages' : 'Start');
nav_set_selected('HQ');
if($target_item) {
@@ -144,7 +143,7 @@ class Hq extends \Zotlabs\Web\Controller {
App::$page['htmlhead'] .= replace_macros(get_markup_template("build_query.tpl"),[
'$baseurl' => z_root(),
- '$pgtype' => 'hq', //(($dm_mode) ? 'dm' : 'hq'),
+ '$pgtype' => 'hq',
'$uid' => local_channel(),
'$gid' => '0',
'$cid' => '0',
diff --git a/view/js/main.js b/view/js/main.js
index a3f238a45..78bd790cd 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -204,8 +204,12 @@ $(document).ready(function() {
});
window.onpopstate = function(e) {
- if(e.state !== null && e.state.b64mid !== bParam_mid)
+ if(e.state !== null && e.state.b64mid !== bParam_mid) {
prepareLiveUpdate(e.state.b64mid, '');
+ $('.message').removeClass('active');
+ $('[data-b64mid="' + e.state.b64mid + '"].message').addClass('active');
+ }
+
};
//mod_mail only
diff --git a/view/js/mod_hq.js b/view/js/mod_hq.js
index ddcde4fcd..0a3939913 100644
--- a/view/js/mod_hq.js
+++ b/view/js/mod_hq.js
@@ -1,20 +1,13 @@
$(document).ready(function() {
$(document).on('click', '#jot-toggle', function(e) {
- e.preventDefault();
- e.stopPropagation();
$(window).scrollTop(0);
$('#jot-popup').toggle();
- $('#profile-jot-text').focus();
-
});
$(document).on('click', '#notes-toggle', function(e) {
- e.preventDefault();
- e.stopPropagation();
$(window).scrollTop(0);
$('#personal-notes').toggleClass('d-none');
- $('#note-text').focus();
});
});
diff --git a/view/tpl/messages_widget.tpl b/view/tpl/messages_widget.tpl
index 7ba02e78e..079bcdf3a 100644
--- a/view/tpl/messages_widget.tpl
+++ b/view/tpl/messages_widget.tpl
@@ -1,4 +1,4 @@
-<ul class="nav nav-tabs nav-fill">
+<ul class="nav nav-tabs nav-fill clearfix">
<li class="nav-item">
<a class="nav-link active messages-type" href="#" title="{{$strings.messages_title}}" data-messages_type="">
<i class="fa fa-fw fa-comment-o"></i>
@@ -17,7 +17,7 @@
</li>
{{/if}}
</ul>
-<div id="messages-widget" class="border border-top-0 overflow-auto mb-3" style="height: 70vh;">
+<div id="messages-widget" class="border border-top-0 overflow-auto mb-3 clearfix" style="height: 70vh;">
<div id="messages-template" rel="template" class="d-none">
<a href="{6}" class="list-group-item list-group-item-action message" data-b64mid="{0}">
<div class="d-flex w-100 justify-content-between">
@@ -119,5 +119,4 @@
});
}
-
</script>