Commit 703924c0 authored by Hannah Stepanek's avatar Hannah Stepanek

Move selected tabs logic to a function

parent b417a3c7
......@@ -285,6 +285,17 @@ function SidebarContentController(
true
);
this.showSelectedTabs = function() {
if (
this.selectedAnnotationUnavailable() ||
this.selectedGroupUnavailable() ||
this.search.query()
) {
return false;
}
return true;
};
this.setCollapsed = function(id, collapsed) {
store.setCollapsed(id, collapsed);
};
......
<selection-tabs
ng-if="!vm.search.query() && vm.annotationsAreSelected()"
ng-if="vm.showSelectedTabs()"
is-waiting-to-anchor-annotations="vm.waitingToAnchorAnnotations"
is-loading="vm.isLoading"
selected-tab="vm.selectedTab"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment