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

Release dev to qa #68

Merged
merged 20 commits into from
May 29, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
ccef8fa
tell bots to request all pages as escaped fragment
thabofletcher May 26, 2015
613e811
SUP-618, Participant badge signs you up for the program and hides but…
vikasrohit May 27, 2015
55f6f44
include design challenges in API request
thabofletcher May 27, 2015
37d6402
SUP-618, Participant badge signs you up for the program and hides but…
vikasrohit May 28, 2015
0722097
Merge branch 'dev' into vikas-sup-618-participant-badge-select
vikasrohit May 28, 2015
0dc8414
Merge pull request #55 from appirio-tech/vikas-sup-618-participant-ba…
vikasrohit May 28, 2015
94e4e33
Merge pull request #60 from appirio-tech/vikas-quick-fixes
vikasrohit May 28, 2015
68779e6
SUP-649, Policy and terms links on footer of apple site are still poi…
vikasrohit May 28, 2015
c20cced
Merge pull request #62 from appirio-tech/vikas-sup-649-domain-aware-t…
vikasrohit May 28, 2015
7e0a3a5
Change button text
May 28, 2015
75f4ea1
Merge pull request #63 from appirio-tech/challenge-button
May 28, 2015
fb5116e
html5 mode push state
thabofletcher May 28, 2015
575bcd7
Merge branch 'dev' of https://github.com/appirio-tech/ap-lime-topcode…
thabofletcher May 28, 2015
a6a7150
Fix input field on learn page
May 28, 2015
2c4969e
include default platform and tech for design challenges
thabofletcher May 28, 2015
1631c06
Merge pull request #64 from appirio-tech/thabo-SUP-509-show-design-ch…
thabofletcher May 28, 2015
fc6ce21
Merge pull request #65 from appirio-tech/SUP-414-seo-support
thabofletcher May 28, 2015
ea85566
SUP-638, Add link for big nerd ranch to https://www.bignerdranch.com/…
vikasrohit May 29, 2015
4771069
Merge pull request #66 from appirio-tech/vikas-sup-638-big-nerd-ranch
vikasrohit May 29, 2015
d26cdd1
Merge branch 'qa' of https://github.com/appirio-tech/ap-lime-topcoder…
thabofletcher May 29, 2015
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
12 changes: 8 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ module.exports = function (grunt) {
auth0Domain : process.env.AUTH0_DOMAIN || 'topcoder-dev.auth0.com',
auth0Callback : 'no-callback-needed-without-social-login',
submissionDownloadPath: '/review/actions/DownloadContestSubmission?uid=',
photoLinkLocation : process.env.PHOTO_LINK_LOCATION || 'http://community.topcoder.com'
photoLinkLocation : process.env.PHOTO_LINK_LOCATION || 'http://community.topcoder.com',
LIME_PROGRAM_ID : 3445
};

// Define the configuration for all the tasks
Expand Down Expand Up @@ -55,7 +56,8 @@ module.exports = function (grunt) {
auth0Domain : appConfig.auth0Domain,
auth0Callback : appConfig.auth0Callback,
submissionDownloadPath: appConfig.submissionDownloadPath,
photoLinkLocation : appConfig.photoLinkLocation
photoLinkLocation : appConfig.photoLinkLocation,
LIME_PROGRAM_ID : appConfig.LIME_PROGRAM_ID
}
}
},
Expand All @@ -73,7 +75,8 @@ module.exports = function (grunt) {
auth0Domain : 'topcoder-qa.auth0.com',
auth0Callback : appConfig.auth0Callback,
submissionDownloadPath: appConfig.submissionDownloadPath,
photoLinkLocation : appConfig.photoLinkLocation
photoLinkLocation : appConfig.photoLinkLocation,
LIME_PROGRAM_ID : appConfig.LIME_PROGRAM_ID
}
}
},
Expand All @@ -91,7 +94,8 @@ module.exports = function (grunt) {
auth0Domain : 'topcoder.auth0.com',
auth0Callback : appConfig.auth0Callback,
submissionDownloadPath: appConfig.submissionDownloadPath,
photoLinkLocation : appConfig.photoLinkLocation
photoLinkLocation : appConfig.photoLinkLocation,
LIME_PROGRAM_ID : appConfig.LIME_PROGRAM_ID
}
}
}
Expand Down
11 changes: 9 additions & 2 deletions app/app.routes.coffee
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
'use strict'

routes = ($stateProvider, $urlRouterProvider, $httpProvider) ->
routes = ($stateProvider, $urlRouterProvider, $httpProvider, $locationProvider) ->

$locationProvider.html5Mode true

states =
landing:
url : '/'
Expand All @@ -9,7 +12,10 @@ routes = ($stateProvider, $urlRouterProvider, $httpProvider) ->
learn:
url : '/learn'
templateUrl : 'learn/learn.html'
controller : 'learn'
#binded controller in view as workaround to use controller as vm style
#controllerAs property is working with coffee script
#more info: http://stackoverflow.com/questions/28953289/using-controller-as-with-the-ui-router-isnt-working-as-expected
#controller : 'learn'
login:
url : '/login?retUrl&retState'
templateUrl : 'login/login.html'
Expand Down Expand Up @@ -44,5 +50,6 @@ angular.module('lime-topcoder').config [
'$stateProvider'
'$urlRouterProvider'
'$httpProvider'
'$locationProvider'
routes
]
4 changes: 2 additions & 2 deletions app/challenges/challenges.jade
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ div(ng-controller="challenges as vm")
.ca SUBMISSIONS
.vl(ng-bind="challenge.numSubmissions")
.actns
a.btn.secondary.btnReg(ng-href="https://www.{{vm.domain}}/challenge-details/{{challenge.challengeId}}/?type=develop", target="_blank") Register
//a.lnkLiked
a.btn.secondary.btnReg(ng-href="https://www.{{vm.domain}}/challenge-details/{{challenge.challengeId}}/?type=develop", target="_blank") View

a.lnk(href='#view-challenges', du-smooth-scroll) View all challenges

.challenges-section.landing-annon-page#view-challenges
Expand Down
4 changes: 4 additions & 0 deletions app/content/css/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,7 @@ button {
.padding-reset {
padding: 0px;
}

.margin-left-2x {
margin-left: 10px;
}
8 changes: 0 additions & 8 deletions app/content/css/challenges.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1003,14 +1003,6 @@
font-size: 16px;
margin-right: 30px;
}
.lnkLiked {
height: 35px;
width: 35px;
background: #031625 url(../images/ico-heart.png) 50% 50% no-repeat;
display: inline-block;
border-radius: 3px;
margin: 0 30px 0 16px;
}
.lnk,
.lnk:hover {
line-height: 35px;
Expand Down
24 changes: 24 additions & 0 deletions app/content/css/learn.scss
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@
position: absolute;
top: 0;
}

.badge-desc {
img.achieved {
vertical-align: middle;
}
}
}

.participant-badge:before {
Expand Down Expand Up @@ -305,6 +311,24 @@
}
}


@media only screen and (max-width: 568px) {
.newsletter-form {
width: auto;

.mktoFormRow .mktoFormCol {
width: 100%;

.mktoFieldWrap {
width: 100%;
}
}
input {
width: 100% !important;
}
}
}

@media only screen and (max-width: 640px) {
.newsletter-form-wrapper {
padding-left: 0;
Expand Down
Binary file added app/content/images/ico-okay-check.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion app/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
- jsFiles.push('services/countries.service')
- jsFiles.push('services/helpers.service')
- jsFiles.push('services/challenge.service')
- jsFiles.push('services/member-cert.service')
- jsFiles.push('services/user.service')
- jsFiles.push('directives/checkbox')
- jsFiles.push('directives/requiredDropdown')
Expand All @@ -44,7 +45,9 @@
doctype html
html
head
base(href="/")
meta(charset="utf-8")
meta(name="fragment", content="!")

title topcoder iOS Member Program

Expand Down Expand Up @@ -115,7 +118,7 @@ html
include layout/header.jade

.view-container(ui-view, ng-class="$state.current.name", autoscroll="true")
.view-container-loading(ng-show="main.loggingIn")
.view-container-loading(ng-show="main.loading")
div.circle-3-loading
span.loading-wrapper
span.outer-circle
Expand Down
4 changes: 2 additions & 2 deletions app/layout/footer.jade
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ footer.login-footer.footer

ul
li
a(href='http://topcoder.com/community/how-it-works/privacy-policy/') Privacy Policy
a(href='http://www.{{main.domain}}/community/how-it-works/privacy-policy/') Privacy Policy
li |
li
a(href='http://topcoder.com/community/how-it-works/terms/') Terms
a(href='http://www.{{main.domain}}/community/how-it-works/terms/') Terms

section.social
a.fb-icon(href='https://www.facebook.com/topcoder')
Expand Down
16 changes: 12 additions & 4 deletions app/layout/main.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ main = ($scope, $state, ENV, AuthService, UserService) ->
vm.domain = ENV.domain

vm.loggedInUser = null
vm.loggingIn = false
vm.loading = false

vm.updatePhotoLink = () ->
user = vm.loggedInUser
Expand All @@ -26,16 +26,24 @@ main = ($scope, $state, ENV, AuthService, UserService) ->
true
false

loginHandlers = {}
vm.addLoginEventHandler = (name, handler) ->
loginHandlers[name] = handler

vm.activate = () ->
if AuthService.isAuthenticated()
vm.loggingIn = true
vm.loading = true
UserService.getLoggedInUser()
.then (data) ->
vm.loggingIn = false
vm.loading = false
vm.loggedInUser = data.data
for name of loginHandlers
handler = loginHandlers[name]
if (handler && typeof handler == 'function')
handler vm.loggedInUser
vm.updatePhotoLink()
.catch (error) ->
vm.loggingIn = false
vm.loading = false
UserService.getUsername()
.then (data) ->
vm.loggedInUser =
Expand Down
65 changes: 64 additions & 1 deletion app/learn/learn.coffee
Original file line number Diff line number Diff line change
@@ -1,12 +1,75 @@
'use strict'

learn = ($state) ->
learn = ($scope, ENV, MemberCertService, $state) ->
MktoForms2.loadForm '//app-abc.marketo.com', '921-UOU-112', 1944, (form) ->
form.onSuccess () ->
$state.go 'confirmNewsletter'
false

vm = this
vm.registered = false
vm.registrationSuccess = false
vm.registrationError = null
main = $scope.$parent.main

vm.checkRegStatus = () ->
if !main.loggedInUser
vm.registered = false
return
main.loading = true
request =
userId: main.loggedInUser.uid
programId: ENV.LIME_PROGRAM_ID
MemberCertService.getProgramForUser(request)
.then (response) ->
# set off loading flag
main.loading = false
console.log response
registered = false
if response.status == 200
result = response.data.result
program = result?.content
if program
vm.registered = true

.catch (error) ->
# TODO show error
main.loading = false
vm.registered = false


vm.registerForProgram = () ->
vm.registrationError = null
if !main.loggedInUser
vm.registrationError = 'Please login to participate'
return
main.loading = true
request =
userId: main.loggedInUser.uid
programId: ENV.LIME_PROGRAM_ID
MemberCertService.registerForProgram(request)
.then (response) ->
# set off loading flag
main.loading = false
if response.status == 200
vm.registrationSuccess = true
vm.registered = true

.catch (error) ->
# TODO show error
main.loading = false
vm.registered = false
vm.registrationSuccess = false

# registers login even handler to handle timing of multiple ajax calls
main.addLoginEventHandler('learn', vm.checkRegStatus)
# check status on load
vm.checkRegStatus()

angular.module('lime-topcoder').controller 'learn', [
'$scope'
'ENV'
'MemberCertService'
'$state'
learn
]
Loading