From 92fbf1bcbdd6f74d7dd4fcce586b1c79581f0b9d Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 27 Aug 2015 00:02:06 +0200 Subject: [PATCH] Vier: Use CSS for popup menu --- mod/dfrn_notify.php | 20 ++--- view/theme/vier/dark.css | 2 +- view/theme/vier/plus.css | 3 +- view/theme/vier/style.css | 24 +++++- .../theme/vier/templates/contact_template.tpl | 34 ++++++++ view/theme/vier/templates/nav.tpl | 8 +- view/theme/vier/templates/photo_item.tpl | 78 ------------------- view/theme/vier/templates/search_item.tpl | 6 +- view/theme/vier/templates/wall_thread.tpl | 6 +- 9 files changed, 79 insertions(+), 102 deletions(-) create mode 100644 view/theme/vier/templates/contact_template.tpl delete mode 100644 view/theme/vier/templates/photo_item.tpl diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index 874f17c772..474d13c4d6 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -132,16 +132,16 @@ function dfrn_notify_post(&$a) { if($importer['page-flags'] == PAGE_SOAPBOX) xml_status(0); - + if(strlen($key)) { - + // if local rino is lower than remote rino, abort: should not happen! // but only for $remote_rino > 1, because old code did't send rino version if ($rino_remote_version > 1 && $rino < $rino_remote) { logger("rino version '$rino_remote' is lower than supported '$rino'"); xml_status(0,"rino version '$rino_remote' is lower than supported '$rino'"); } - + $rawkey = hex2bin(trim($key)); logger('rino: md5 raw key: ' . md5($rawkey)); $final_key = ''; @@ -164,7 +164,7 @@ function dfrn_notify_post(&$a) { } #logger('rino: received key : ' . $final_key); - + switch($rino_remote) { case 0: case 1: @@ -195,8 +195,8 @@ function dfrn_notify_post(&$a) { logger("rino: invalid sent verision '$rino_remote'"); xml_status(0); } - - + + logger('rino: decrypted data: ' . $data, LOGGER_DATA); } @@ -243,7 +243,7 @@ function dfrn_notify_content(&$a) { dbesc($last_update) ); - logger('dfrn_notify: challenge=' . $hash, LOGGER_DEBUG ); + logger('dfrn_notify: challenge=' . $hash, LOGGER_DEBUG); $sql_extra = ''; switch($direction) { @@ -295,14 +295,14 @@ function dfrn_notify_content(&$a) { $challenge = bin2hex($challenge); $encrypted_id = bin2hex($encrypted_id); - + $rino = get_config('system','rino_encrypt'); $rino = intval($rino); - + // if requested rino is lower than enabled local rino, lower local rino version // if requested rino is higher than enabled local rino, reply with local rino if ($rino_remote < $rino) $rino = $rino_remote; - + if((($r[0]['rel']) && ($r[0]['rel'] != CONTACT_IS_SHARING)) || ($r[0]['page-flags'] == PAGE_COMMUNITY)) { $perm = 'rw'; } diff --git a/view/theme/vier/dark.css b/view/theme/vier/dark.css index d9e4cdb3d0..9501ecfe0d 100644 --- a/view/theme/vier/dark.css +++ b/view/theme/vier/dark.css @@ -58,4 +58,4 @@ input#side-peoplefind-submit, input#side-follow-submit { li :hover { color: #767676 !important; -} \ No newline at end of file +} diff --git a/view/theme/vier/plus.css b/view/theme/vier/plus.css index f334d6cdd1..2ae6e50005 100644 --- a/view/theme/vier/plus.css +++ b/view/theme/vier/plus.css @@ -47,10 +47,11 @@ nav .nav-menu { font-weight: initial; } +#nav-apps-menu, #nav-site-menu, #nav-notifications-menu, #nav-user-menu { - top: 35px; + top: 32px; } #nav-messages-menu { diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index f312b17103..77ffb53fd1 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -606,6 +606,7 @@ nav .nav-menu-icon { nav .nav-menu-icon.selected { background-color: #364e59; } +nav .nav-menu img, nav .nav-menu-icon img { width: 22px; height: 22px; @@ -613,6 +614,10 @@ nav .nav-menu-icon img { -moz-border-radius: 4px; border-radius: 4px; } +nav .nav-menu img { + margin-top: -3px; + margin-right: 4px; +} nav .nav-menu-icon .nav-notify { top: 3px; } @@ -683,7 +688,7 @@ nav #nav-user-linklabel { } nav #nav-user-linklabel { padding-left: 0px; - margin-left: 0px; + margin-top: 0px; } nav #nav-help-link .menu-popup, nav #nav-search-link .menu-popup, @@ -699,6 +704,17 @@ nav #nav-site-linkmenu { margin-left: 0px; margin-right: 0px; } +.contact-entry-photo:hover .contact-photo-menu, +.contact-photo-wrapper:hover .menu-popup, +nav #nav-user-linklabel:hover #nav-user-menu, +nav #nav-user-linkmenu:hover #nav-user-menu, +nav #nav-apps-link:hover #nav-apps-menu, +nav #nav-site-linkmenu:hover #nav-site-menu, +nav #nav-notifications-linkmenu:hover #nav-notifications-menu { + display:block; + visibility:visible; + opacity:1; +} nav #nav-notifications-linkmenu { margin-left: 0px; margin-right: 5px; @@ -754,8 +770,12 @@ nav #nav-user-linkmenu { } ul.menu-popup { + visibility:hidden; + opacity:0; + z-index:1; + transition:all 0.2s ease-in-out; + /* display: none; */ position: absolute; - display: none; width: 11em; background: #ffffff; color: #2d2d2d; diff --git a/view/theme/vier/templates/contact_template.tpl b/view/theme/vier/templates/contact_template.tpl new file mode 100644 index 0000000000..68716dfeb2 --- /dev/null +++ b/view/theme/vier/templates/contact_template.tpl @@ -0,0 +1,34 @@ + +
+
+
+ + + {{$contact.name}} + + {{if !$no_contacts_checkbox}} + + {{/if}} + {{if $contact.photo_menu}} + menu +
+
    + {{foreach $contact.photo_menu as $k=>$c}} + {{if $c.2}} +
  • {{$c.0}}
  • + {{else}} +
  • {{$c.0}}
  • + {{/if}} + {{/foreach}} +
+
+ {{/if}} +
+ +
+
+
{{$contact.name}}
+ +
+
diff --git a/view/theme/vier/templates/nav.tpl b/view/theme/vier/templates/nav.tpl index ef52e77894..cd359b152f 100644 --- a/view/theme/vier/templates/nav.tpl +++ b/view/theme/vier/templates/nav.tpl @@ -45,11 +45,11 @@ {{/if}} {{if $userinfo}} -