- diabook update

-- adjust nav-bar, depending to userstatus
This commit is contained in:
tomtom84 2013-09-11 19:14:41 +02:00
parent 4487515d0c
commit ca39c2acb4
9 changed files with 108 additions and 30 deletions

View file

@ -873,12 +873,14 @@ nav .nav-notify {
nav .nav-notify.show { nav .nav-notify.show {
display: block; display: block;
} }
nav #nav-help-link, nav #nav-help-link,
nav #nav-search-link, nav #nav-search-link,
nav #nav-directory-link, nav #nav-directory-link,
nav #nav-apps-link, nav #nav-apps-link,
nav #nav-site-linkmenu, nav #nav-site-linkmenu,
nav #nav-home-link, nav #nav-home-link,
nav #nav-login-link,
nav #nav-user-linkmenu nav #nav-user-linkmenu
{ {
float: right; float: right;
@ -886,18 +888,23 @@ nav #nav-user-linkmenu
nav #nav-user-linkmenu{ nav #nav-user-linkmenu{
margin-right: 0px; margin-right: 0px;
} }
nav #nav-home-link, #nav-directory-link, #nav-apps-link{ nav #nav-home-link, #nav-directory-link, #nav-login-link, #nav-apps-link{
margin-left: 0px; margin-left: 0px;
margin-right: 0px; margin-right: 0px;
font-weight: bold; font-weight: bold;
margin: 3px 5px; margin: 3px 5px;
font-size: 14px;
} }
nav #nav-directory-link{ nav #nav-directory-link{
margin-right: 0px; margin-right: 10px;
} }
li#nav-site-linkmenu.nav-menu-icon{
display: none;
}
nav #nav-home-link{ nav #nav-home-link{
margin-left: 0px; margin-left: 0px;
display: none;
} }
nav #nav-help-link .menu-popup, nav #nav-help-link .menu-popup,
nav #nav-search-link .menu-popup, nav #nav-search-link .menu-popup,
@ -908,6 +915,7 @@ nav #nav-site-linkmenu .menu-popup {
left: auto; left: auto;
} }
nav #nav-messages-linkmenu.on .icon.messages, nav #nav-messages-linkmenu.selected .icon.messages{ nav #nav-messages-linkmenu.on .icon.messages, nav #nav-messages-linkmenu.selected .icon.messages{
background-image: url("../../../view/theme/diabook/diabook-aerith/icons/messages.png"); background-image: url("../../../view/theme/diabook/diabook-aerith/icons/messages.png");
} }

View file

@ -852,6 +852,7 @@ nav #nav-directory-link,
nav #nav-apps-link, nav #nav-apps-link,
nav #nav-site-linkmenu, nav #nav-site-linkmenu,
nav #nav-home-link, nav #nav-home-link,
nav #nav-login-link,
nav #nav-user-linkmenu nav #nav-user-linkmenu
{ {
float: right; float: right;
@ -859,17 +860,23 @@ nav #nav-user-linkmenu
nav #nav-user-linkmenu{ nav #nav-user-linkmenu{
margin-right: 0px; margin-right: 0px;
} }
nav #nav-home-link, #nav-directory-link, #nav-apps-link{ nav #nav-home-link, #nav-directory-link, #nav-login-link, #nav-apps-link{
margin-left: 0px; margin-left: 0px;
margin-right: 0px; margin-right: 0px;
font-weight: bold; font-weight: bold;
margin: 3px 5px; margin: 3px 5px;
} }
nav #nav-directory-link{ nav #nav-directory-link{
margin-right: 0px; margin-right: 10px;
} }
li#nav-site-linkmenu.nav-menu-icon{
display: none;
}
nav #nav-home-link{ nav #nav-home-link{
margin-left: 0px; margin-left: 0px;
display: none;
} }
nav #nav-help-link .menu-popup, nav #nav-help-link .menu-popup,
nav #nav-search-link .menu-popup, nav #nav-search-link .menu-popup,

View file

@ -859,6 +859,7 @@ nav #nav-directory-link,
nav #nav-apps-link, nav #nav-apps-link,
nav #nav-site-linkmenu, nav #nav-site-linkmenu,
nav #nav-home-link, nav #nav-home-link,
nav #nav-login-link,
nav #nav-user-linkmenu nav #nav-user-linkmenu
{ {
float: right; float: right;
@ -866,17 +867,23 @@ nav #nav-user-linkmenu
nav #nav-user-linkmenu{ nav #nav-user-linkmenu{
margin-right: 0px; margin-right: 0px;
} }
nav #nav-home-link, #nav-directory-link, #nav-apps-link{ nav #nav-home-link, #nav-directory-link, #nav-login-link, #nav-apps-link{
margin-left: 0px; margin-left: 0px;
margin-right: 0px; margin-right: 0px;
font-weight: bold; font-weight: bold;
margin: 3px 5px; margin: 3px 5px;
} }
nav #nav-directory-link{ nav #nav-directory-link{
margin-right: 0px; margin-right: 10px;
} }
li#nav-site-linkmenu.nav-menu-icon{
display: none;
}
nav #nav-home-link{ nav #nav-home-link{
margin-left: 0px; margin-left: 0px;
display: none;
} }
nav #nav-help-link .menu-popup, nav #nav-help-link .menu-popup,
nav #nav-search-link .menu-popup, nav #nav-search-link .menu-popup,
@ -887,6 +894,7 @@ nav #nav-site-linkmenu .menu-popup {
left: auto; left: auto;
} }
nav #nav-messages-linkmenu.on .icon.messages, nav #nav-messages-linkmenu.selected .icon.messages{ nav #nav-messages-linkmenu.on .icon.messages, nav #nav-messages-linkmenu.selected .icon.messages{
background-image: url("../../../view/theme/diabook/diabook-dark/icons/messages2.png"); background-image: url("../../../view/theme/diabook/diabook-dark/icons/messages2.png");
} }

View file

@ -859,6 +859,7 @@ nav #nav-directory-link,
nav #nav-apps-link, nav #nav-apps-link,
nav #nav-site-linkmenu, nav #nav-site-linkmenu,
nav #nav-home-link, nav #nav-home-link,
nav #nav-login-link,
nav #nav-user-linkmenu nav #nav-user-linkmenu
{ {
float: right; float: right;
@ -866,18 +867,23 @@ nav #nav-user-linkmenu
nav #nav-user-linkmenu{ nav #nav-user-linkmenu{
margin-right: 0px; margin-right: 0px;
} }
nav #nav-home-link, #nav-directory-link, #nav-apps-link{ nav #nav-home-link, #nav-directory-link, #nav-login-link, #nav-apps-link{
margin-left: 0px; margin-left: 0px;
margin-right: 0px; margin-right: 0px;
font-weight: bold; font-weight: bold;
margin: 3px 5px; margin: 3px 5px;
font-size: 14px;
} }
nav #nav-directory-link{ nav #nav-directory-link{
margin-right: 0px; margin-right: 10px;
} }
li#nav-site-linkmenu.nav-menu-icon{
display: none;
}
nav #nav-home-link{ nav #nav-home-link{
margin-left: 0px; margin-left: 0px;
display: none;
} }
nav #nav-help-link .menu-popup, nav #nav-help-link .menu-popup,
nav #nav-search-link .menu-popup, nav #nav-search-link .menu-popup,
@ -888,6 +894,7 @@ nav #nav-site-linkmenu .menu-popup {
left: auto; left: auto;
} }
nav #nav-messages-linkmenu.on .icon.messages, nav #nav-messages-linkmenu.selected .icon.messages{ nav #nav-messages-linkmenu.on .icon.messages, nav #nav-messages-linkmenu.selected .icon.messages{
background-image: url("../../../view/theme/diabook/diabook-green/icons/messages.png"); background-image: url("../../../view/theme/diabook/diabook-green/icons/messages.png");
} }

View file

@ -858,6 +858,7 @@ nav #nav-directory-link,
nav #nav-apps-link, nav #nav-apps-link,
nav #nav-site-linkmenu, nav #nav-site-linkmenu,
nav #nav-home-link, nav #nav-home-link,
nav #nav-login-link,
nav #nav-user-linkmenu nav #nav-user-linkmenu
{ {
float: right; float: right;
@ -865,18 +866,23 @@ nav #nav-user-linkmenu
nav #nav-user-linkmenu{ nav #nav-user-linkmenu{
margin-right: 0px; margin-right: 0px;
} }
nav #nav-home-link, #nav-directory-link, #nav-apps-link{ nav #nav-home-link, #nav-directory-link, #nav-login-link, #nav-apps-link{
margin-left: 0px; margin-left: 0px;
margin-right: 0px; margin-right: 0px;
font-weight: bold; font-weight: bold;
margin: 3px 5px; margin: 3px 5px;
font-size: 14px;
} }
nav #nav-directory-link{ nav #nav-directory-link{
margin-right: 0px; margin-right: 10px;
} }
li#nav-site-linkmenu.nav-menu-icon{
display: none;
}
nav #nav-home-link{ nav #nav-home-link{
margin-left: 0px; margin-left: 0px;
display: none;
} }
nav #nav-help-link .menu-popup, nav #nav-help-link .menu-popup,
nav #nav-search-link .menu-popup, nav #nav-search-link .menu-popup,
@ -887,6 +893,7 @@ nav #nav-site-linkmenu .menu-popup {
left: auto; left: auto;
} }
nav #nav-messages-linkmenu.on .icon.messages, nav #nav-messages-linkmenu.selected .icon.messages{ nav #nav-messages-linkmenu.on .icon.messages, nav #nav-messages-linkmenu.selected .icon.messages{
background-image: url("../../../view/theme/diabook/diabook-pink/icons/messages.png"); background-image: url("../../../view/theme/diabook/diabook-pink/icons/messages.png");
} }

View file

@ -876,6 +876,7 @@ nav #nav-directory-link,
nav #nav-apps-link, nav #nav-apps-link,
nav #nav-site-linkmenu, nav #nav-site-linkmenu,
nav #nav-home-link, nav #nav-home-link,
nav #nav-login-link,
nav #nav-user-linkmenu nav #nav-user-linkmenu
{ {
float: right; float: right;
@ -883,18 +884,23 @@ nav #nav-user-linkmenu
nav #nav-user-linkmenu{ nav #nav-user-linkmenu{
margin-right: 0px; margin-right: 0px;
} }
nav #nav-home-link, #nav-directory-link, #nav-apps-link{ nav #nav-home-link, #nav-directory-link, #nav-login-link, #nav-apps-link{
margin-left: 0px; margin-left: 0px;
margin-right: 0px; margin-right: 0px;
font-weight: bold; font-weight: bold;
margin: 3px 5px; margin: 3px 5px;
font-size: 15px;
} }
nav #nav-directory-link{ nav #nav-directory-link{
margin-right: 0px; margin-right: 10px;
} }
li#nav-site-linkmenu.nav-menu-icon{
display: none;
}
nav #nav-home-link{ nav #nav-home-link{
margin-left: 0px; margin-left: 0px;
display: none;
} }
nav #nav-help-link .menu-popup, nav #nav-help-link .menu-popup,
nav #nav-search-link .menu-popup, nav #nav-search-link .menu-popup,
@ -905,6 +911,7 @@ nav #nav-site-linkmenu .menu-popup {
left: auto; left: auto;
} }
nav #nav-messages-linkmenu.on .icon.messages, nav #nav-messages-linkmenu.selected .icon.messages{ nav #nav-messages-linkmenu.on .icon.messages, nav #nav-messages-linkmenu.selected .icon.messages{
background-image: url("../../../view/theme/diabook/diabook-red/icons/messages2.png"); background-image: url("../../../view/theme/diabook/diabook-red/icons/messages2.png");
} }

View file

@ -845,6 +845,7 @@ nav #nav-directory-link,
nav #nav-apps-link, nav #nav-apps-link,
nav #nav-site-linkmenu, nav #nav-site-linkmenu,
nav #nav-home-link, nav #nav-home-link,
nav #nav-login-link,
nav #nav-user-linkmenu nav #nav-user-linkmenu
{ {
float: right; float: right;
@ -852,17 +853,23 @@ nav #nav-user-linkmenu
nav #nav-user-linkmenu{ nav #nav-user-linkmenu{
margin-right: 0px; margin-right: 0px;
} }
nav #nav-home-link, #nav-directory-link, #nav-apps-link{ nav #nav-home-link, #nav-directory-link, #nav-login-link, #nav-apps-link{
margin-left: 0px; margin-left: 0px;
margin-right: 0px; margin-right: 0px;
font-weight: bold; font-weight: bold;
margin: 3px 5px; margin: 3px 5px;
} }
nav #nav-directory-link{ nav #nav-directory-link{
margin-right: 0px; margin-right: 10px;
} }
li#nav-site-linkmenu.nav-menu-icon{
display: none;
}
nav #nav-home-link{ nav #nav-home-link{
margin-left: 0px; margin-left: 0px;
display: none;
} }
nav #nav-help-link .menu-popup, nav #nav-help-link .menu-popup,
nav #nav-search-link .menu-popup, nav #nav-search-link .menu-popup,
@ -873,6 +880,8 @@ nav #nav-site-linkmenu .menu-popup {
left: auto; left: auto;
} }
nav #nav-messages-linkmenu.on .icon.messages, nav #nav-messages-linkmenu.selected .icon.messages{ nav #nav-messages-linkmenu.on .icon.messages, nav #nav-messages-linkmenu.selected .icon.messages{
background-image: url("../../../view/theme/diabook/icons/messages2.png"); background-image: url("../../../view/theme/diabook/icons/messages2.png");
} }

View file

@ -106,7 +106,7 @@
{{if $nav.home}} {{if $nav.home}}
<li id="nav-home-link" class="nav-menu {{$sel.home}}"> <li id="nav-home-link" class="nav-menu {{$sel.home}}">
<a class="{{$nav.home.2}}" href="{{$nav.home.0}}" title="{{$nav.home.3}}" >{{$nav.home.1}} <a class="{{$nav.home.2}}" href="{{$nav.home.0}}" title="{{$nav.home.3}}" >{{$userinfo.name}}
<span id="home-update" class="nav-notify"></span></a> <span id="home-update" class="nav-notify"></span></a>
</li> </li>
{{/if}} {{/if}}
@ -127,7 +127,7 @@
{{/if}} {{/if}}
{{if $nav.login}} {{if $nav.login}}
<li id="nav-home-link" class="nav-menu {{$sel.home}}"> <li id="nav-login-link" class="nav-menu {{$sel.home}}">
<a class="{{$nav.login.2}}" href="{{$nav.login.0}}" title="{{$nav.login.3}}" >{{$nav.login.1}}</a> <a class="{{$nav.login.2}}" href="{{$nav.login.0}}" title="{{$nav.login.3}}" >{{$nav.login.1}}</a>
<li> <li>
{{/if}} {{/if}}

View file

@ -3,7 +3,7 @@
/* /*
* Name: Diabook * Name: Diabook
* Description: Diabook: report bugs and request here: http://pad.toktan.org/p/diabook or http://bugs.friendica.com/view_all_bug_page.php * Description: Diabook: report bugs and request here: http://pad.toktan.org/p/diabook or http://bugs.friendica.com/view_all_bug_page.php
* Version: (Version: 1.027) * Version: (Version: 1.028)
* Author: * Author:
*/ */
@ -26,7 +26,7 @@ function diabook_init(&$a) {
set_template_engine($a, 'smarty3'); set_template_engine($a, 'smarty3');
//print diabook-version for debugging //print diabook-version for debugging
$diabook_version = "Diabook (Version: 1.027)"; $diabook_version = "Diabook (Version: 1.028)";
$a->page['htmlhead'] .= sprintf('<META NAME=generator CONTENT="%s"/>', $diabook_version); $a->page['htmlhead'] .= sprintf('<META NAME=generator CONTENT="%s"/>', $diabook_version);
//init css on network and profilepages //init css on network and profilepages
@ -36,6 +36,31 @@ $cssFile = null;
load_config("diabook"); load_config("diabook");
load_pconfig(local_user(), "diabook"); load_pconfig(local_user(), "diabook");
// adjust nav-bar, depending state of user
if (local_user() ) {
$a->page['htmlhead'] .= '
<script>
$(document).ready(function() {
$("li#nav-site-linkmenu.nav-menu-icon").attr("style","display: block;");
$("li#nav-directory-link.nav-menu").attr("style","margin-right: 0px;");
$("li#nav-home-link.nav-menu").attr("style","display: block;margin-right: 8px;");
});
</script>';
}
if ($a->argv[0] == "profile" && $a->argv[1] != $a->user['nickname'] ) {
$a->page['htmlhead'] .= '
<script>
$(document).ready(function() {
$("li#nav-site-linkmenu.nav-menu-icon").attr("style","display: block;");
$("li#nav-directory-link.nav-menu").attr("style","margin-right: 0px;");
$("li#nav-home-link.nav-menu").attr("style","display: block;margin-right: 8px;");
});
</script>';
}
//get statuses of boxes at right-hand-column //get statuses of boxes at right-hand-column
$close_pages = get_diabook_config( "close_pages", 1 ); $close_pages = get_diabook_config( "close_pages", 1 );
$close_profiles = get_diabook_config( "close_profiles", 0 ); $close_profiles = get_diabook_config( "close_profiles", 0 );
@ -76,7 +101,7 @@ if ($color=="dark") $color_path = "/diabook-dark/";
$(document).ready(function() { $(document).ready(function() {
$("span.group_unselected").attr("style","display: none;"); $("span.group_unselected").attr("style","display: none;");
$("span.group_selected").attr("style","display: none;"); $("span.group_selected").attr("style","display: none;");
$("input.unticked.action").attr("style","float: left; margin-top: 5px;"); $("input.unticked.action").attr("style","float: left; margin-top: 5px;-moz-appearance: none;");
$("li.menu-profile-list").attr("style","min-height: 22px;"); $("li.menu-profile-list").attr("style","min-height: 22px;");
}); });
</script>'; </script>';