aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-10-08 22:21:19 +0200
committerMario Vavti <mario@mariovavti.com>2017-10-08 22:21:19 +0200
commitbcf4cb519ae6c7d590db6a8023b7f24332ea9160 (patch)
tree6acccef70860ef0d2082bb61deebf89d2679d063 /view
parent991db280be4c3cbbff4fb1e4dae8f303a487ed3f (diff)
downloadvolse-hubzilla-bcf4cb519ae6c7d590db6a8023b7f24332ea9160.tar.gz
volse-hubzilla-bcf4cb519ae6c7d590db6a8023b7f24332ea9160.tar.bz2
volse-hubzilla-bcf4cb519ae6c7d590db6a8023b7f24332ea9160.zip
new notification fixes
Diffstat (limited to 'view')
-rw-r--r--view/js/main.js4
-rw-r--r--view/pdl/mod_display.pdl3
-rw-r--r--view/pdl/mod_pubstream.pdl3
-rw-r--r--view/php/default.php2
-rwxr-xr-xview/tpl/nav.tpl22
-rw-r--r--view/tpl/notifications_widget.tpl26
6 files changed, 36 insertions, 24 deletions
diff --git a/view/js/main.js b/view/js/main.js
index b2210ee4c..186cefbd0 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -481,8 +481,8 @@ function NavUpdate() {
if(data.home == 0) { data.home = ''; $('.home-update, .home-button').hide(); } else { $('.home-update, .home-button').show(); }
$('.home-update').html(data.home);
- if(data.intros == 0) { data.intros = ''; $('.intro-update, .intro-button').hide(); } else { $('.intro-update, .intro-button').show(); }
- $('.intro-update').html(data.intros);
+ if(data.intros == 0) { data.intros = ''; $('.intros-update, .intros-button').hide(); } else { $('.intros-update, .intros-button').show(); }
+ $('.intros-update').html(data.intros);
if(data.mail == 0) { data.mail = ''; $('.mail-update, .mail-button').hide(); } else { $('.mail-update, .mail-button').show(); }
$('.mail-update').html(data.mail);
diff --git a/view/pdl/mod_display.pdl b/view/pdl/mod_display.pdl
new file mode 100644
index 000000000..e657fa88b
--- /dev/null
+++ b/view/pdl/mod_display.pdl
@@ -0,0 +1,3 @@
+[region=right_aside]
+[widget=notifications][/widget]
+[/region]
diff --git a/view/pdl/mod_pubstream.pdl b/view/pdl/mod_pubstream.pdl
new file mode 100644
index 000000000..e657fa88b
--- /dev/null
+++ b/view/pdl/mod_pubstream.pdl
@@ -0,0 +1,3 @@
+[region=right_aside]
+[widget=notifications][/widget]
+[/region]
diff --git a/view/php/default.php b/view/php/default.php
index bd4d7dc22..444e24197 100644
--- a/view/php/default.php
+++ b/view/php/default.php
@@ -8,7 +8,7 @@
<body <?php if($page['direction']) echo 'dir="rtl"' ?> >
<?php if(x($page,'banner')) echo $page['banner']; ?>
<header><?php if(x($page,'header')) echo $page['header']; ?></header>
- <nav class="navbar fixed-top navbar-expand-md navbar-dark bg-dark"><?php if(x($page,'nav')) echo $page['nav']; ?></nav>
+ <nav class="navbar fixed-top navbar-expand-xl navbar-dark bg-dark"><?php if(x($page,'nav')) echo $page['nav']; ?></nav>
<main>
<aside id="region_1"><div id="left_aside_spacer"><div id="left_aside_wrapper"><?php if(x($page,'aside')) echo $page['aside']; ?></div></div></aside>
<section id="region_2"><?php if(x($page,'content')) echo $page['content']; ?>
diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl
index 92ab88574..a19fa15a1 100755
--- a/view/tpl/nav.tpl
+++ b/view/tpl/nav.tpl
@@ -1,5 +1,5 @@
{{if $nav.login && !$userinfo}}
-<div class="d-md-none pt-1 pb-1">
+<div class="d-xl-none pt-1 pb-1">
<a class="btn btn-primary btn-sm text-white" href="#" title="{{$nav.loginmenu.1.3}}" id="{{$nav.loginmenu.1.4}}_collapse" data-toggle="modal" data-target="#nav-login">
{{$nav.loginmenu.1.1}}
</a>
@@ -111,11 +111,11 @@
{{/if}}
{{if $nav.messages}}
<li class="nav-item dropdown mail-button" style="display: none;">
- <a class="nav-link" href="#" title="{{$nav.messages.3}}" id="{{$nav.messages.4}}" data-toggle="dropdown" rel="#nav-messages-menu">
+ <a class="nav-link" href="#" title="{{$nav.messages.3}}" id="{{$nav.messages.4}}" data-toggle="dropdown" rel="#nav-mail-menu">
<i class="fa fa-fw fa-envelope"></i>
<span class="badge badge-pill badge-danger mail-update"></span>
</a>
- <div id="nav-messages-menu" class="dropdown-menu" rel="messages">
+ <div id="nav-mail-menu" class="dropdown-menu" rel="messages">
<a class="dropdown-item" id="nav-messages-see-all" href="{{$nav.messages.all.0}}">{{$nav.messages.all.1}}</a>
<a class="dropdown-item" id="nav-messages-mark-all" href="#" onclick="markRead('messages'); return false;">{{$nav.messages.mark.1}}</a>
{{$emptynotifications}}
@@ -136,10 +136,10 @@
</li>
{{/if}}
{{if $nav.intros}}
- <li class="nav-item dropdown intro-button" style="display: none;">
+ <li class="nav-item dropdown intros-button" style="display: none;">
<a class="nav-link" href="#" title="{{$nav.intros.3}}" id="{{$nav.intros.4}}" data-toggle="dropdown" rel="#nav-intros-menu">
<i class="fa fa-fw fa-users"></i>
- <span class="badge badge-pill badge-danger intro-update"></span>
+ <span class="badge badge-pill badge-danger intros-update"></span>
</a>
<div id="nav-intros-menu" class="dropdown-menu" rel="intros">
<a class="dropdown-item" id="nav-intros-see-all" href="{{$nav.intros.all.0}}">{{$nav.intros.all.1}}</a>
@@ -183,17 +183,17 @@
</li>
{{/if}}
{{if $nav.login && !$userinfo}}
- <li class="nav-item d-none d-md-flex">
+ <li class="nav-item d-none d-xl-flex">
<a class="nav-link" href="#" title="{{$nav.loginmenu.1.3}}" id="{{$nav.loginmenu.1.4}}" data-toggle="modal" data-target="#nav-login">{{$nav.loginmenu.1.1}}</a>
</li>
{{/if}}
{{if $nav.register}}
- <li class="nav-item {{$nav.register.2}} d-none d-md-flex">
+ <li class="nav-item {{$nav.register.2}} d-none d-xl-flex">
<a class="nav-link" href="{{$nav.register.0}}" title="{{$nav.register.3}}" id="{{$nav.register.4}}">{{$nav.register.1}}</a>
</li>
{{/if}}
{{if $nav.alogout}}
- <li class="nav-item {{$nav.alogout.2}} d-none d-md-flex">
+ <li class="nav-item {{$nav.alogout.2}} d-none d-xl-flex">
<a class="nav-link" href="{{$nav.alogout.0}}" title="{{$nav.alogout.3}}" id="{{$nav.alogout.4}}">{{$nav.alogout.1}}</a>
</li>
{{/if}}
@@ -216,9 +216,9 @@
<div class="text-white">{{$sel.active}}</div>
</div>
{{/if}}
- <div id="banner" class="navbar-text d-none d-md-flex">{{$banner}}</div>
+ <div id="banner" class="navbar-text d-none d-xl-flex">{{$banner}}</div>
- <ul id="nav-right" class="navbar-nav ml-auto d-none d-md-flex">
+ <ul id="nav-right" class="navbar-nav ml-auto d-none d-xl-flex">
<li class="nav-item collapse clearfix" id="nav-search">
<form class="form-inline" method="get" action="search" role="search">
<input class="form-control form-control-sm mt-1 mr-2" id="nav-search-text" type="text" value="" placeholder="&#xf002; {{$help}}" name="search" title="{{$nav.search.3}}" onclick="this.submit();" onblur="closeMenu('nav-search'); openMenu('nav-search-btn');"/>
@@ -272,7 +272,7 @@
</li>
</ul>
</div>
-<div class="collapse d-md-none" id="navbar-collapse-2">
+<div class="collapse d-xl-none" id="navbar-collapse-2">
<div class="navbar-nav mr-auto">
{{if $channel_apps.0}}
{{foreach $channel_apps as $channel_app}}
diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl
index 07423563a..83174b3a1 100644
--- a/view/tpl/notifications_widget.tpl
+++ b/view/tpl/notifications_widget.tpl
@@ -1,12 +1,18 @@
<style>
#notifications {
- width: 100%;
+ position: fixed;
+ top: 4.5rem;
+ width: 266px;
+ padding: 0 .5rem;
}
.notification-content {
max-height: 50vh;
overflow: auto;
- border-left: 0.2rem solid #eee;
+ }
+
+ .notification-content.collapsing {
+ overflow: hidden;
}
.fs {
@@ -22,9 +28,9 @@
}
.fs #notifications {
- position: relative !important;
- width: 100% !important;
- top: 0px !important;
+ position: relative;
+ width: 100%;
+ top: 0px;
}
</style>
@@ -36,10 +42,10 @@
</a>
</div>
-<ul id="notifications" class="navbar-nav" style="position: fixed; width: 280px; top: 64px;" data-children=".nav-item">
+<div id="notifications" class="navbar-nav" data-children=".nav-item">
{{foreach $notifications as $notification}}
- <li class="nav-item {{$notification.type}}-button" style="display: none;">
- <a class="nav-link" href="#nav-{{$notification.type}}-menu" title="{{$notification.title}}" data-toggle="collapse" data-parent="#notifications" rel="#nav-{{$notification.type}}-menu">
+ <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">
<i class="fa fa-fw fa-{{$notification.icon}}"></i> {{$notification.label}}
<span class="float-right badge badge-{{$notification.severity}} {{$notification.type}}-update"></span>
</a>
@@ -52,6 +58,6 @@
{{/if}}
{{$loading}}
</div>
- </li>
+ </div>
{{/foreach}}
-</ul>
+</div>