From 63da73600fe12145ff315b513dfcf947e62cb342 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Sat, 16 Dec 2017 11:21:59 +0100 Subject: [PATCH 1/2] Add tooltip to assigned users and info button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- js/app/Run.js | 5 +++++ templates/part.board.mainView.php | 2 +- templates/part.card.php | 5 +++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/js/app/Run.js b/js/app/Run.js index 3c80f44d9..87e342475 100644 --- a/js/app/Run.js +++ b/js/app/Run.js @@ -74,4 +74,9 @@ app.run(function ($document, $rootScope, $transitions, BoardService) { } } }); + // Select all elements with data-toggle="tooltips" in the document + $('body').tooltip({ + selector: '[data-toggle="tooltip"]' + }); + }); diff --git a/templates/part.board.mainView.php b/templates/part.board.mainView.php index 577112dd1..079006181 100644 --- a/templates/part.board.mainView.php +++ b/templates/part.board.mainView.php @@ -82,7 +82,7 @@
-
+
diff --git a/templates/part.card.php b/templates/part.card.php index c179a0439..d2c14e1ea 100644 --- a/templates/part.card.php +++ b/templates/part.card.php @@ -66,7 +66,8 @@
-
+
@@ -88,7 +89,7 @@

t('Saved')); ?> t('Unsaved changes')); ?> From 183c2665eba5430f3bfacf61ad7079bbb4ab9054 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Sat, 16 Dec 2017 17:07:30 +0100 Subject: [PATCH 2/2] Show tooltip with displayname and add contactsmenu to avatars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- css/style.scss | 12 +++++++++--- js/directive/avatar.js | 11 ++++++----- templates/part.board.mainView.php | 2 +- templates/part.board.sidebarView.php | 6 +++--- templates/part.boardlist.php | 4 ++-- templates/part.card.php | 4 ++-- 6 files changed, 23 insertions(+), 16 deletions(-) diff --git a/css/style.scss b/css/style.scss index eb4961204..296ee88c9 100644 --- a/css/style.scss +++ b/css/style.scss @@ -57,7 +57,9 @@ input.input-inline { border-radius: 0; } - +#app img { + box-sizing: content-box; +} #searchbox { display: flex !important; @@ -713,7 +715,7 @@ input.input-inline { .assigned-user { position: relative; - .avatardiv { + .avatardiv-container { margin-right: 5px; } .icon-delete { @@ -929,7 +931,7 @@ input.input-inline { #assigned-users { display: flex; - .avatardiv { + .avatardiv-container { margin: 6px; } } @@ -996,6 +998,10 @@ input.input-inline { } } +.avatardiv-container { + position: relative; +} + #board-detail-labels { ul li { input { diff --git a/js/directive/avatar.js b/js/directive/avatar.js index 85a253a26..fde199ce1 100644 --- a/js/directive/avatar.js +++ b/js/directive/avatar.js @@ -26,11 +26,12 @@ app.directive('avatar', function() { restrict: 'A', scope: true, link: function(scope, element, attr){ - attr.$observe('displayname', function(value){ - if(value!==undefined) { - $(element).avatar(value, 32); - } - }); + var value = attr.user; + $(element).wrap('
'); + if(attr.contactsmenu && oc_current_user !== value) { + $(element).contactsMenu(value, 0, $(element).parent()); + } + $(element).avatar(value, 32, false, false, false, attr.displayname); } }; }); \ No newline at end of file diff --git a/templates/part.board.mainView.php b/templates/part.board.mainView.php index 079006181..823527d11 100644 --- a/templates/part.board.mainView.php +++ b/templates/part.board.mainView.php @@ -82,7 +82,7 @@
-
+
diff --git a/templates/part.board.sidebarView.php b/templates/part.board.sidebarView.php index 1379acb74..8d44d34dd 100644 --- a/templates/part.board.sidebarView.php +++ b/templates/part.board.sidebarView.php @@ -25,7 +25,7 @@ {{ $item.participant.displayname }} -
+
{{ sharee.participant.displayname }} @@ -39,14 +39,14 @@
  • -
    +
    {{ boardservice.getCurrent().owner.displayname }}
  • -
    +
    diff --git a/templates/part.boardlist.php b/templates/part.boardlist.php index 049dfa86a..3047d0c36 100644 --- a/templates/part.boardlist.php +++ b/templates/part.boardlist.php @@ -41,8 +41,8 @@
    -
    -
    +
    +
    diff --git a/templates/part.card.php b/templates/part.card.php index d2c14e1ea..ce61812ad 100644 --- a/templates/part.card.php +++ b/templates/part.card.php @@ -62,13 +62,13 @@ {{ $item.participant.displayname }} -
    {{ user.displayname }} +
    {{ user.displayname }}
    -
    +