From: friendica Date: Sat, 25 Feb 2012 07:44:55 +0000 (-0800) Subject: notifications to zeros, bug in notify link X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6092567c977d9e28df9558db51bd5b3d269740e8;p=friendica.git notifications to zeros, bug in notify link --- diff --git a/mod/ping.php b/mod/ping.php index 3581253473..4260bbfb96 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -14,8 +14,8 @@ function ping_init(&$a) { $firehose = intval(get_pconfig(local_user(),'system','notify_full')); - $z = q("select * from notify where seen = 0 and uid = %d - order by date desc", + $z = q("select * from notify where uid = %d + order by seen asc, date desc limit 0, 50", intval(local_user()) ); @@ -135,7 +135,7 @@ function ping_init(&$a) { echo ' '; if(count($z)) { foreach($z as $zz) { - echo xmlize($a->get_baseurl() . '/notify/view' . $zz['id'], $zz['name'],$zz['url'],$zz['photo'],relative_date($zz['date']), strip_tags(bbcode($zz['msg']))); + echo xmlize($a->get_baseurl() . '/notify/view/' . $zz['id'], $zz['name'],$zz['url'],$zz['photo'],relative_date($zz['date']), ($zz['seen'] ? '' : '! ') .strip_tags(bbcode($zz['msg']))); } } } diff --git a/view/theme/duepuntozero/nav.tpl b/view/theme/duepuntozero/nav.tpl index afa9180651..cd524ebec7 100755 --- a/view/theme/duepuntozero/nav.tpl +++ b/view/theme/duepuntozero/nav.tpl @@ -39,8 +39,22 @@ {{ endif }} + + {{ if $nav.manage }}$nav.manage.1{{ endif }} + + {{ if $nav.notifications }} + + {{ endif }} + {{ if $nav.settings }}$nav.settings.1{{ endif }} {{ if $nav.profiles }}$nav.profiles.1{{ endif }} @@ -49,3 +63,7 @@ + + diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index cf7505ad0f..4604bedf08 100755 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -2967,3 +2967,70 @@ div.jGrowl div.info { opacity: 1.0; filter:alpha(opacity=100); } + +/* notifications popup menu */ +.nav-notify { + display: none; + position: absolute; + font-size: 10px; + padding: 1px 3px; + top: 0px; + right: -10px; + min-width: 15px; + text-align: right; +} +.nav-notify.show { + display: block; +} +ul.menu-popup { + position: absolute; + display: none; + width: 10em; + margin: 0px; + padding: 0px; + list-style: none; + z-index: 100000; + top: 90px; +} +#nav-notifications-menu { + width: 320px; + max-height: 400px; + overflow-y: scroll;overflow-style:scrollbar; + background-color:#FFFFFF; + -moz-border-radius:0px 0px 5px 5px; + -webkit-border-radius:0px 0px 5px 5px; + border-radius:0px 0px 5px 5px; + border: 1px solid #888; + border-top: none; + +} +#nav-notifications-menu .contactname { font-weight: bold; font-size: 0.9em; } +#nav-notifications-menu img { float: left; margin-right: 5px; } +#nav-notifications-menu .notif-when { font-size: 0.8em; display: block; } +#nav-notifications-menu li { + padding: 7px 0px 7px 10px; + word-wrap:normal; + border-bottom: 1px solid #000; +} + +#nav-notifications-menu li:hover { + +} + +#nav-notifications-menu a:hover { + text-decoration: underline; +} + +.notif-item a { + color: #000000; +} + +.notif-item a:hover { + text-decoration: underline; +} + +.notif-image { + width: 32px; + height: 32px; + padding: 7px 7px 0px 0px; +}