Hide hover when removal is not allowed

pull/4510/head
Oliver Günther 9 years ago
parent 86b8222ad3
commit 08e95ee68c
  1. 6
      app/assets/stylesheets/content/_in_place_editing.sass
  2. 4
      app/assets/stylesheets/content/_watchers.sass
  3. 4
      frontend/app/components/wp-panels/watchers-panel/watchers-panel.directive.html
  4. 1
      frontend/app/templates/work_packages/watchers/watcher.html
  5. 3
      frontend/app/work_packages/directives/work-package-watcher-directive.js

@ -309,11 +309,15 @@ a.inplace-editing--trigger-link,
.inplace-edit--icon-wrapper
visibility: visible
// Otherwise the description will show up in one line on IE10
.inplace-edit--read-value
display: block
// Do not hover trigger-link when element is read-only
.-read-only
.inplace-editing--trigger-link:hover .inplace-editing--container
border-color: transparent
.inplace-editing--container,
@include grid-block
border-color: transparent

@ -40,3 +40,7 @@
padding: 0
float: left
line-height: $user-avatar-mini-width
.work-package--watchers.-read-only
.remove-watcher-btn
display: none

@ -8,9 +8,9 @@
<p>{{ ::vm.text.loading }}</p>
</div>
<div ng-hide="vm.loading || vm.error">
<div class="work-package--watchers work-package--details--long-field">
<div class="work-package--watchers work-package--details--long-field"
ng-class="{'-read-only': !vm.allowedToRemove}">
<work-package-watcher watcher="watcher"
allowed-to-remove="vm.allowedToRemove"
ng-repeat="watcher in vm.watching track by watcher.id"></work-package-watcher>
</div>
<work-package-watchers-lookup watchers="vm.available" ng-show="vm.allowedToAdd"></work-package-watchers-lookup>

@ -16,7 +16,6 @@
</span>
<a href = ''
class="inplace-edit--icon-wrapper remove-watcher-btn"
ng-show="allowedToRemove"
data-ng-click="remove()"
data-ng-focus="focus()"
data-ng-blur="blur()">

@ -56,8 +56,7 @@ module.exports = function(I18n) {
templateUrl: '/templates/work_packages/watchers/watcher.html',
link: workPackageWatcherController,
scope: {
watcher: '=',
allowedToRemove: '='
watcher: '='
}
};
};

Loading…
Cancel
Save