Skip to content

Commit

Permalink
Merge pull request #1181 from appirio-tech/dev
Browse files Browse the repository at this point in the history
Nav update
  • Loading branch information
ajefts authored Apr 24, 2017
2 parents 9c12c08 + 9ca6d96 commit a801248
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
13 changes: 12 additions & 1 deletion app/listings/listings.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ import { loadUser } from '../services/userv3.service.js'
activate()

function activate() {

// listen for location hash update
$scope.$on('$locationChangeSuccess', function(event) {
if($scope.challengeFilter != null) {
$scope.challengeFilter.updateFilter($location.hash())
}
})
$scope.myChallenges = []
$scope.reactProps = {
config: CONSTANTS,
Expand All @@ -33,6 +38,9 @@ import { loadUser } from '../services/userv3.service.js'
myChallenges: [],
onSaveFilterToUrl: function(filter) {
$location.hash(filter)
},
setChallengeFilter: function(component) {
$scope.challengeFilter = component
}
}
logger.debug('Calling ListingsController activate()')
Expand Down Expand Up @@ -91,6 +99,9 @@ import { loadUser } from '../services/userv3.service.js'
myChallenges: vm.myChallenges,
onSaveFilterToUrl: function(filter) {
$location.hash(filter)
},
setChallengeFilter: function(component) {
$scope.challengeFilter = component
}
}

Expand Down
3 changes: 0 additions & 3 deletions app/services/nav.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ import angular from 'angular'
service.menuLinks = {
'compete': [
{ 'href': '/challenges/', 'text': 'ALL CHALLENGES', 'icon': require('../../assets/images/nav/rocket.svg') },
{ 'href': '/challenges/#&tracks=design&mode=6&name=All%20Challenges', 'text': 'DESIGN CHALLENGES', 'icon': require('../../assets/images/nav/track-design.svg') },
{ 'href': '/challenges/#&tracks=develop&mode=6&name=All%20Challenges', 'text': 'DEVELOPMENT CHALLENGES', 'icon': require('../../assets/images/nav/track-develop.svg') },
{ 'href': '/challenges/#&tracks=datasci&mode=6&name=All%20Challenges', 'text': 'DATA SCIENCE CHALLENGES', 'icon': require('../../assets/images/nav/track-data.svg') },
{ 'href': CONSTANTS.ARENA_URL, 'text': 'COMPETITIVE PROGRAMMING', 'icon': require('../../assets/images/nav/track-cp.svg'), 'target': '_blank' }
],
'learn': [
Expand Down

0 comments on commit a801248

Please sign in to comment.