Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

New listings #923

Merged
merged 6 commits into from
Jan 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ require('angucomplete-alt')
require('angularjs-toaster')
require('ng-dialog')
require('xml2js')
require('ngreact')

require('appirio-tech-ng-ui-components')
require('appirio-tech-ng-iso-constants')
Expand Down
23 changes: 23 additions & 0 deletions app/listings/listings.controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import angular from 'angular'

(function () {
'use strict'

angular.module('tc.listings').controller('ListingsCtrl', ListingsCtrl)

ListingsCtrl.$inject = ['CONSTANTS', 'logger', '$q',
'TcAuthService', 'UserService', 'UserStatsService', 'ProfileService', 'ChallengeService', 'ExternalAccountService',
'ngDialog', '$anchorScroll'
]

function ListingsCtrl(CONSTANTS, logger, $q, TcAuthService, UserService, UserStatsService, ProfileService, ChallengeService, ExternalAccountService, ngDialog, $anchorScroll) {

activate()

function activate() {
logger.debug('Calling ListingsController activate()')

}
}

})()
1 change: 1 addition & 0 deletions app/listings/listings.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
react-component(name="ChallengeFiltersExample")
21 changes: 21 additions & 0 deletions app/listings/listings.module.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import angular from 'angular'
import { ChallengeFiltersExample } from 'appirio-tech-react-components'

(function() {
'use strict'

var dependencies = [
'angular-jwt',
'ui.router',
'ngCookies',
'tc.services',
'tcUIComponents',
'angularSlideables',
'ngDialog',
'react'
]

angular.module('tc.listings', dependencies)
.value('ChallengeFiltersExample', ChallengeFiltersExample.default)

})()
43 changes: 43 additions & 0 deletions app/listings/listings.routes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import angular from 'angular'

(function() {
'use strict'

angular.module('tc.listings').config([
'$stateProvider',
routes
]).run(['$rootScope', '$state', function($rootScope, $state) {
$rootScope.$on('$stateChangeError', function(event, toState, toParams, fromState, fromParams, error) {
// if (toState.name.indexOf('sloog') > -1 && 400 <= error.status <= 500 ) {
//
// // unable to find a member with that username
// $state.go('404')
// }
})
}])

function routes($stateProvider) {
var states = {
'listings': {
parent: 'root',
url: '/listings/',
template: require('./listings')(),
controller: 'ListingsCtrl as vm',
resolve: {
userHandle: ['$stateParams', function($stateParams) {
return $stateParams.userHandle
}]
},
data: {
authRequired: false,
title: 'Listings'
}
}
}

for (var name in states) {
var state = states[name]
$stateProvider.state(name, state)
}
}
})()
1 change: 1 addition & 0 deletions app/topcoder.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { getCurrentUser, loadUser } from './services/userv3.service.js'
'tc.account',
'tc.peer-review',
'tc.myDashboard',
'tc.listings',
'tc.mySRMs',
'tc.myChallenges',
'tc.profile',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"appirio-styles": "0.x.x",
"appirio-tech-ng-iso-constants": "^1.0.6",
"appirio-tech-ng-ui-components": "^2.1.2",
"appirio-tech-react-components": "^0.0.12",
"appirio-tech-react-components": "appirio-tech/react-components.git#challenge-filters",
"auth0-angular": "^4.1.0",
"auth0-js": "^6.8.0",
"d3": "^3.5.14",
Expand Down