Skip to content

Commit 5068dcf

Browse files
JiaoJiao123zhx828
authored andcommitted
display second header in gene page and code clean up (#145)
* display second header and code clean up
1 parent e1a35a2 commit 5068dcf

File tree

5 files changed

+150
-140
lines changed

5 files changed

+150
-140
lines changed

app/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -164,15 +164,15 @@
164164
</div>
165165
</div>
166166
</div>
167-
<div class="subNavWrapper" ng-class="{'sub-nav-block': view.currentPage==='genes'}">
167+
<div class="subNavWrapper" ng-class="{'sub-nav-block': view.currentPage === 'gene' || view.currentPage === 'variant'}">
168168
<div class="container">
169169
<div class="subNav">
170170
<!-- In order to use last child css style, add div wrapper -->
171171
<div ng-show="view.subNavItems.length > 0"
172172
class="pull-left col-md-9 col-lg-9 col-sm-12 col-xs-12 subNav-sxn-1">
173173
<span ng-repeat="item in view.subNavItems" class="item">
174174
<span ng-if="!item.link">{{item.content}}</span>
175-
<a ng-if="item.link" ng-href="{{item.link}}" target="_self">{{item.content}}</a>
175+
<a ng-if="item.link" ng-href="{{item.link}}" target="_self" uib-tooltip-placement="top" uib-tooltip="All Variants">{{item.content}}</a>
176176
</span>
177177
</div>
178178

app/scripts/app.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,11 @@ angular.module('oncokbStaticApp').run(
193193
});
194194
$rootScope.$on('$routeChangeSuccess', function() {
195195
var path = $location.path().split('/') || [];
196-
$rootScope.view.currentPage = path.length > 2 ? path[1] : '';
196+
if (path.length === 5 && path[3] === 'variant') {
197+
$rootScope.view.currentPage = 'variant';
198+
} else {
199+
$rootScope.view.currentPage = path.length > 2 ? path[1] : '';
200+
}
197201
if (!$rootScope.view.subNavItems || $rootScope.view.subNavItems.length === 0) {
198202
$.extend(true, $rootScope.view.subNavItems, $rootScope.meta.view.subNavItems);
199203
}

0 commit comments

Comments
 (0)