From a54c4916836623adec581c57e73f6bade27ad159 Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Mon, 20 Mar 2017 23:00:15 +0100 Subject: [PATCH] add avatar to sharing dropdown Signed-off-by: Georg Ehrke --- css/app/calendarlist.css | 16 +++++--------- js/app/directives/avatarDirective.js | 32 ++++++++++++++++++++++++++++ templates/main.php | 11 ++++++++++ templates/part.calendarlist.item.php | 1 + 4 files changed, 49 insertions(+), 11 deletions(-) create mode 100644 js/app/directives/avatarDirective.js diff --git a/css/app/calendarlist.css b/css/app/calendarlist.css index 9a18541bd8..f85e79b082 100644 --- a/css/app/calendarlist.css +++ b/css/app/calendarlist.css @@ -459,17 +459,14 @@ li.calendar-share-item span { } ul.dropdown-menu { - max-height: 100px; + max-height: 200px; overflow-y: scroll; + overflow-x: hidden; border: 1px #ddd solid; - border-radius: 0 0 3px 3px; + border-radius: 0 0 4px 4px; margin-top: -7px; margin-left: 6px; - width: 94%; -} - -ul.dropdown-menu li { - height: 25px; + width: 89%; } ul.dropdown-menu li:last-child { @@ -477,10 +474,7 @@ ul.dropdown-menu li:last-child { } #app-navigation ul.dropdown-menu a { - min-height: 22px; - max-height: 22px; - padding: 0 10px; - line-height: 2; + padding: 6px; } ul.dropdown-menu li > a:hover { diff --git a/js/app/directives/avatarDirective.js b/js/app/directives/avatarDirective.js new file mode 100644 index 0000000000..52a5d49432 --- /dev/null +++ b/js/app/directives/avatarDirective.js @@ -0,0 +1,32 @@ +/** + * Calendar App + * + * @author Georg Ehrke + * @copyright 2017 Georg Ehrke + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see . + * + */ + +app.directive('avatar', function() { + 'use strict'; + + return { + restrict: 'A', + scope: {}, + link: function (scope, elm, attrs) { + $(elm).avatar(attrs.user, 32); + } + }; +}); diff --git a/templates/main.php b/templates/main.php index a00cdd3b17..dfdd69998c 100755 --- a/templates/main.php +++ b/templates/main.php @@ -120,6 +120,17 @@ + +