Disable metadata switch if only one item is available
Single metadata item on image details looks like action button, which is confusing, so change cursor from pointer to default. Closes-Bug: #1731884 Change-Id: I50b9a9c3878866249561a58c92aeafff4dffc949 Co-Authored-By: Ivan Kolodyazhny <e0ne@e0ne.info>
This commit is contained in:
parent
550cd12bf7
commit
59b18f3056
@ -3,9 +3,10 @@
|
||||
.selector-item {
|
||||
padding: $padding-base-vertical $padding-base-horizontal;
|
||||
color: $link-color;
|
||||
cursor: pointer;
|
||||
border-radius: $nav-pills-border-radius;
|
||||
|
||||
&.clickable {
|
||||
cursor: pointer;
|
||||
}
|
||||
&.active {
|
||||
background: $nav-pills-active-link-hover-bg;
|
||||
color: $nav-pills-active-link-hover-color;
|
||||
|
@ -76,6 +76,13 @@
|
||||
return true; // break
|
||||
}
|
||||
});
|
||||
|
||||
ctrl.count = 0;
|
||||
ctrl.tree.flatTree.some(function (i) {
|
||||
if (ctrl.listFilter(i)) {
|
||||
ctrl.count += 1;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
@ -4,7 +4,7 @@
|
||||
<div class="selector-item"
|
||||
ng-repeat="item in ctrl.tree.flatTree | filter: ctrl.listFilter"
|
||||
ng-click="ctrl.onSelect(item)"
|
||||
ng-class="{ active: ctrl.selected === item }">
|
||||
ng-class="{ active: ctrl.selected === item, clickable: ctrl.count > 1 }">
|
||||
<span ng-bind="::item.label"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user