aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Module/Wiki.php7
-rw-r--r--include/nav.php19
-rw-r--r--view/js/main.js4
-rw-r--r--view/php/default.php2
-rw-r--r--view/theme/redbasic/css/style.css4
-rw-r--r--view/theme/redbasic/js/redbasic.js18
-rwxr-xr-xview/tpl/nav.tpl15
-rw-r--r--view/tpl/notifications_widget.tpl34
8 files changed, 56 insertions, 47 deletions
diff --git a/Zotlabs/Module/Wiki.php b/Zotlabs/Module/Wiki.php
index fe2bfbdfb..13144b61e 100644
--- a/Zotlabs/Module/Wiki.php
+++ b/Zotlabs/Module/Wiki.php
@@ -69,6 +69,11 @@ class Wiki extends \Zotlabs\Web\Controller {
goaway('/' . argv(0));
}
+ nav_set_selected([
+ 'name' => t('Wiki'),
+ 'url' =>'/wiki/' . $nick
+ ]);
+
$observer_hash = get_observer_hash();
// Determine if the observer is the channel owner so the ACL dialog can be populated
@@ -76,8 +81,6 @@ class Wiki extends \Zotlabs\Web\Controller {
$wiki_owner = true;
- nav_set_selected(t('Wiki'));
-
// Obtain the default permission settings of the channel
$owner_acl = array(
'allow_cid' => $owner['channel_allow_cid'],
diff --git a/include/nav.php b/include/nav.php
index 588104eda..8736133de 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -103,12 +103,12 @@ EOT;
$nav['logout'] = ['logout',t('Logout'), "", t('End this session'),'logout_nav_btn'];
// user menu
- $nav['usermenu'][] = ['profile/' . $channel['channel_address'], t('View Profile'), ((\App::$nav_sel['active'] == 'Profile') ? 'active' : ''), t('Your profile page'),'profile_nav_btn'];
+ $nav['usermenu'][] = ['profile/' . $channel['channel_address'], t('View Profile'), ((\App::$nav_sel['name'] == 'Profile') ? 'active' : ''), t('Your profile page'),'profile_nav_btn'];
if(feature_enabled(local_channel(),'multi_profiles'))
- $nav['usermenu'][] = ['profiles', t('Edit Profiles'), ((\App::$nav_sel['active'] == 'Profiles') ? 'active' : '') , t('Manage/Edit profiles'),'profiles_nav_btn'];
+ $nav['usermenu'][] = ['profiles', t('Edit Profiles'), ((\App::$nav_sel['name'] == 'Profiles') ? 'active' : '') , t('Manage/Edit profiles'),'profiles_nav_btn'];
else
- $nav['usermenu'][] = ['profiles/' . $prof[0]['id'], t('Edit Profile'), ((\App::$nav_sel['active'] == 'Profiles') ? 'active' : ''), t('Edit your profile'),'profiles_nav_btn'];
+ $nav['usermenu'][] = ['profiles/' . $prof[0]['id'], t('Edit Profile'), ((\App::$nav_sel['name'] == 'Profiles') ? 'active' : ''), t('Edit your profile'),'profiles_nav_btn'];
}
else {
@@ -258,7 +258,7 @@ EOT;
$syslist = Zlib\Apps::app_order(local_channel(),$syslist);
foreach($syslist as $app) {
- if(\App::$nav_sel['active'] == $app['name'])
+ if(\App::$nav_sel['name'] == $app['name'])
$app['active'] = true;
if($is_owner) {
@@ -309,7 +309,8 @@ EOT;
'$addapps' => t('Add Apps'),
'$orderapps' => t('Arrange Apps'),
'$sysapps_toggle' => t('Toggle System Apps'),
- '$loc' => $myident
+ '$loc' => $myident,
+ '$url' => ((App::$nav_sel['url']) ? App::$nav_sel['url'] : App::$cmd)
));
if(x($_SESSION, 'reload_avatar') && $observer) {
@@ -332,7 +333,13 @@ EOT;
*
*/
function nav_set_selected($item){
- App::$nav_sel['active'] = $item;
+ if(is_array($item)) {
+ App::$nav_sel['name'] = $item['name'];
+ App::$nav_sel['url'] = $item['url'];
+ }
+ else {
+ App::$nav_sel['name'] = $item;
+ }
}
diff --git a/view/js/main.js b/view/js/main.js
index 186cefbd0..6557b1d8e 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -445,10 +445,10 @@ function NavUpdate() {
updateCountsOnly = false;
if(data.network || data.home || data.intros || data.register || data.mail || data.all_events || data.notify || data.files || data.pubs) {
- $('#notifications-btn').css('opacity', 1);
+ $('#notifications-btn, #notifications-btn-1').css('opacity', 1);
}
else {
- $('#notifications-btn').css('opacity', 0.5);
+ $('#notifications-btn, #notifications-btn-1').css('opacity', 0.5);
$('#navbar-collapse-1').removeClass('show');
}
diff --git a/view/php/default.php b/view/php/default.php
index 444e24197..b180a6eb8 100644
--- a/view/php/default.php
+++ b/view/php/default.php
@@ -15,7 +15,7 @@
<div id="page-footer"></div>
<div id="pause"></div>
</section>
- <aside id="region_3" class="d-none d-xl-table-cell"><?php if(x($page,'right_aside')) echo $page['right_aside']; ?></aside>
+ <aside id="region_3" class="d-none d-xl-table-cell"><div id="right_aside_spacer"><div id="right_aside_wrapper"><?php if(x($page,'right_aside')) echo $page['right_aside']; ?></div></div></aside>
</main>
<footer><?php if(x($page,'footer')) echo $page['footer']; ?></footer>
</body>
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index 22bdc2dbc..2e8d71954 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -161,6 +161,10 @@ nav {
filter:alpha(opacity=$nav_percent_min_opacity);
}
+#nav-app-link {
+ white-space: nowrap;
+}
+
#powered-by {
font-size: 0.5rem;
position: absolute;
diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js
index c67c67a51..3fa9d2a76 100644
--- a/view/theme/redbasic/js/redbasic.js
+++ b/view/theme/redbasic/js/redbasic.js
@@ -22,13 +22,13 @@ $(document).ready(function() {
parent: 'main',
spacer: '#left_aside_spacer'
});
+ $('#right_aside_wrapper').stick_in_parent({
+ offset_top: parseInt($('#region_3').css('padding-top')),
+ parent: 'main',
+ spacer: '#right_aside_spacer'
+ });
}
- if(($(window).width() < 767) && ($('#left_aside_wrapper .widget, #left_aside_wrapper .vcard').length > 0))
- $('#expand-aside').show();
- else
- $('#expand-aside').hide();
-
$('#expand-aside').on('click', toggleAside);
$('section').on('click', function() {
@@ -64,8 +64,14 @@ $(document).ready(function() {
}
});
+ var notifications_parent = $('#notifications')[0].parentElement.id;
$('#notifications-btn-1').click(function() {
- $('#region_3').toggleClass('fs');
+ if($('#notifications').hasClass('fs'))
+ $('#notifications').prependTo('#' + notifications_parent);
+ else
+ $('#notifications').prependTo('body');
+
+ $('#notifications').toggleClass('fs');
if($('#navbar-collapse-2').hasClass('show')){
$('#navbar-collapse-2').removeClass('show');
}
diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl
index 1d905d173..d2bd20f8f 100755
--- a/view/tpl/nav.tpl
+++ b/view/tpl/nav.tpl
@@ -22,7 +22,7 @@
<a class="dropdown-item{{if $usermenu.2}} active{{/if}}" href="{{$usermenu.0}}" title="{{$usermenu.3}}" role="menuitem" id="{{$usermenu.4}}">{{$usermenu.1}}</a>
{{/foreach}}
{{if $nav.manage}}
- <a class="dropdown-item{{if $sel.active == Manage}} active{{/if}}" href="{{$nav.manage.0}}" title="{{$nav.manage.3}}" role="menuitem" id="{{$nav.manage.4}}">{{$nav.manage.1}}</a>
+ <a class="dropdown-item{{if $sel.name == Manage}} active{{/if}}" href="{{$nav.manage.0}}" title="{{$nav.manage.3}}" role="menuitem" id="{{$nav.manage.4}}">{{$nav.manage.1}}</a>
{{/if}}
{{if $nav.channels}}
{{foreach $nav.channels as $chan}}
@@ -34,11 +34,11 @@
{{/if}}
{{if $nav.settings}}
<div class="dropdown-divider"></div>
- <a class="dropdown-item{{if $sel.active == Settings}} active{{/if}}" href="{{$nav.settings.0}}" title="{{$nav.settings.3}}" role="menuitem" id="{{$nav.settings.4}}">{{$nav.settings.1}}</a>
+ <a class="dropdown-item{{if $sel.name == Settings}} active{{/if}}" href="{{$nav.settings.0}}" title="{{$nav.settings.3}}" role="menuitem" id="{{$nav.settings.4}}">{{$nav.settings.1}}</a>
{{/if}}
{{if $nav.admin}}
<div class="dropdown-divider"></div>
- <a class="dropdown-item{{if $sel.active == Admin}} active{{/if}}" href="{{$nav.admin.0}}" title="{{$nav.admin.3}}" role="menuitem" id="{{$nav.admin.4}}">{{$nav.admin.1}}</a>
+ <a class="dropdown-item{{if $sel.name == Admin}} active{{/if}}" href="{{$nav.admin.0}}" title="{{$nav.admin.3}}" role="menuitem" id="{{$nav.admin.4}}">{{$nav.admin.1}}</a>
{{/if}}
{{if $nav.logout}}
<div class="dropdown-divider"></div>
@@ -53,6 +53,9 @@
</div>
{{/if}}
</div>
+<div class="navbar-nav mr-auto">
+ <div><a id="nav-app-link" href="{{$url}}" class="nav-link">{{$sel.name}}</a></div>
+</div>
{{/if}}
<div class="navbar-toggler-right">
{{if $nav.help.6}}
@@ -60,7 +63,7 @@
<i class="fa fa-question-circle"></i>
</button>
{{/if}}
- <button id="expand-aside" type="button" class="navbar-toggler border-0" data-toggle="offcanvas" data-target="#region_1">
+ <button id="expand-aside" type="button" class="d-md-none navbar-toggler border-0" data-toggle="offcanvas" data-target="#region_1">
<i class="fa fa-arrow-circle-right" id="expand-aside-icon"></i>
</button>
{{if ! $experimental_notif}}
@@ -212,9 +215,7 @@
{{/if}}
</ul>
{{else}}
- <div class="navbar-nav mr-auto">
- <div class="text-white">{{$sel.active}}</div>
- </div>
+ <div class="navbar-text mr-auto d-none d-xl-flex"></div>
{{/if}}
<div id="banner" class="navbar-text d-none d-xl-flex">{{$banner}}</div>
diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl
index 83174b3a1..3323422d6 100644
--- a/view/tpl/notifications_widget.tpl
+++ b/view/tpl/notifications_widget.tpl
@@ -1,13 +1,6 @@
<style>
- #notifications {
- position: fixed;
- top: 4.5rem;
- width: 266px;
- padding: 0 .5rem;
- }
-
.notification-content {
- max-height: 50vh;
+ max-height: 70vh;
overflow: auto;
}
@@ -19,30 +12,25 @@
position: fixed;
top: 0px;
left: 0px;
- display: block !important;
+ padding: 4.5rem .5rem 0 .5rem;
background-color: white;
width: 100%;
max-width: 100%;
height: 100vh;
- z-index: 1020;
- }
-
- .fs #notifications {
- position: relative;
- width: 100%;
- top: 0px;
+ z-index: 1030;
}
</style>
-<div id="nav-notifications-template" rel="template">
- <a class="dropdown-item clearfix dropdown-notification {5}" href="{0}" title="{2} {3}">
- <img class="menu-img-3" data-src="{1}">
- <span class="contactname">{2}</span>
- <span class="dropdown-sub-text">{3}<br>{4}</span>
- </a>
-</div>
+
<div id="notifications" class="navbar-nav" data-children=".nav-item">
+ <div id="nav-notifications-template" rel="template">
+ <a class="dropdown-item clearfix dropdown-notification {5}" href="{0}" title="{2} {3}">
+ <img class="menu-img-3" data-src="{1}">
+ <span class="contactname">{2}</span>
+ <span class="dropdown-sub-text">{3}<br>{4}</span>
+ </a>
+ </div>
{{foreach $notifications as $notification}}
<div class="collapse {{$notification.type}}-button">
<a class="list-group-item" href="#nav-{{$notification.type}}-menu" title="{{$notification.title}}" data-toggle="collapse" data-parent="#notifications" rel="#nav-{{$notification.type}}-menu">