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

Commit 7834efe

Browse files
authored
Merge pull request #1096 from appirio-tech/dev
Promote to prod - Bug Bash 3
2 parents c4c1a74 + 46ce862 commit 7834efe

File tree

11 files changed

+188
-62
lines changed

11 files changed

+188
-62
lines changed

app/directives/challenge-tile/challenge-tile.jade

+5-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020
.stalled-challenge(ng-hide="challenge.userCurrentPhaseEndTime") This challenge is currently paused.
2121

2222
.phase-action(ng-show="challenge.userAction", ng-switch="challenge.userAction")
23-
a.tc-btn.tc-btn-s.tc-btn-wide.tc-btn-ghost.submit(ng-switch-when="Submit", ng-href="{{challenge|challengeLinks:'submit'}}") Submit
23+
a.tc-btn.tc-btn-s.tc-btn-wide.tc-btn-ghost.submit(ng-switch-when="Submit", ng-href="{{challenge|challengeLinks:'submit'}}") Submit
24+
a.tc-btn.tc-btn-s.tc-btn-wide.btn-danger.submit(ng-switch-when="Submit", ng-href="{{challenge|challengeLinks:'unRegister'}}") Unregister
2425
a.tc-btn.tc-btn-s.tc-btn-wide.tc-btn-ghost.submit(ng-switch-when="Appeal", ng-href="{{challenge|challengeLinks:'viewScorecards'}}") View Scorecards
25-
a.tc-btn.tc-btn-s.tc-btn-wide.tc-btn-ghost.submit(ng-switch-when="Appeal", ng-href="{{challenge|challengeLinks:'completeAppeals'}}") Complete Appeals
26+
a.tc-btn.tc-btn-s.tc-btn-wide.btn-danger.submit(ng-if="challenge.isSubmitter")(ng-switch-when="Appeal", ng-href="{{challenge|challengeLinks:'completeAppeals'}}") Complete Appeals
2627

2728
.submitted(ng-switch-when="Submitted") Submitted
2829

@@ -99,8 +100,9 @@
99100

100101
.phase-action(ng-switch="challenge.userAction")
101102
a.tc-btn.tc-btn-s.tc-btn-wide.tc-btn-ghost.submit(ng-switch-when="Submit", ng-href="{{challenge|challengeLinks:'submit'}}") Submit
103+
a.tc-btn.tc-btn-s.tc-btn-wide.btn-danger.submit(ng-switch-when="Submit", ng-href="{{challenge|challengeLinks:'unRegister'}}") Unregister
102104
a.tc-btn.tc-btn-s.tc-btn-wide.tc-btn-ghost.submit(ng-switch-when="Appeal", ng-href="{{challenge|challengeLinks:'viewScorecards'}}") View Scorecards
103-
a.tc-btn.tc-btn-s.tc-btn-wide.tc-btn-ghost.submit(ng-switch-when="Appeal", ng-href="{{challenge|challengeLinks:'completeAppeals'}}") Complete Appeals
105+
a.tc-btn.tc-btn-s.tc-btn-wide.btn-danger.submit(ng-switch-when="Appeal", ng-href="{{challenge|challengeLinks:'completeAppeals'}}") Complete Appeals
104106

105107
.submitted(ng-switch-when="Submitted") Submitted
106108

app/directives/responsive-carousel/responsive-carousel.directive.js

+3-7
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,10 @@ import angular from 'angular'
4545
} else if(width >= 1010) {
4646
// desktop
4747
buildCarouselSlide(5)
48-
} else if(width < 1010 && width >= 768) {
49-
// tablet
48+
} else if(width < 1010) {
49+
// tablet & mobile
5050
buildCarouselSlide(4)
51-
} else {
52-
// we don't need to build carousel for mobile as we show horizontal scroll
53-
// phone
54-
buildCarouselSlide(2)
55-
}
51+
}
5652
}
5753

5854

app/filters/challengeLinks.filter.js

+2
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ import _ from 'lodash'
7373
return String.supplant('https://software.{domain}/review/actions/ViewProjectDetails?pid={id}', data)
7474
case 'completeAppeals':
7575
return String.supplant('https://software.{domain}/review/actions/EarlyAppeals?pid={id}', data)
76+
case 'unRegister':
77+
return String.supplant('https://software.{domain}/review/actions/Unregister?pid={id}', data)
7678
}
7779
}
7880
}

app/my-dashboard/my-dashboard.jade

+5-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414

1515
.tco.tco17
1616
.tc-banner-placeholder.black.bg-image
17-
.title 2017 Topcoder Open
18-
.subtitle The Ultimate Programming & Design tournament
19-
.description Earn your way to the USA!
20-
a(href="http://tco17.topcoder.com/").cta.tc-btn-white.tc-btn-radius Learn More
17+
.container
18+
.title 2017 Topcoder Open
19+
.subtitle The Ultimate Programming & Design tournament
20+
.description Earn your way to the USA!
21+
a(href="http://tco17.topcoder.com/").cta.tc-btn-white.tc-btn-radius Learn More
2122

2223
.srms(id="srms", ui-view="srms", ng-show="dashboard.showSRMs")
2324

app/services/challenge.service.js

+4
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ import moment from 'moment'
6767
challenge.userCurrentPhase = 'Stalled'
6868
challenge.userCurrentPhaseEndTime = null
6969
challenge.userAction = null
70+
challenge.isSubmitter = false
7071

7172
if (phases && phases.length) {
7273
hasCurrentPhase = true
@@ -96,6 +97,9 @@ import moment from 'moment'
9697
if (roles && roles.length > 0) {
9798
var submitterRole = _.findIndex(roles, function(role) {
9899
var lRole = role.toLowerCase()
100+
if (lRole === 'submitter') {
101+
challenge.isSubmitter = true
102+
}
99103
return lRole === 'submitter'
100104
})
101105
if (submitterRole === -1) {

assets/css/directives/challenge-tile.scss

+37-2
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,23 @@ challenge-tile .challenge.tile-view {
248248
.submit {
249249
margin: 12px;
250250
display: block;
251+
text-align: center;
252+
253+
&.btn-danger {
254+
color: #e66e66;
255+
background-color: $white;
256+
border-color: #e66e66;
257+
258+
&:hover {
259+
background-color: #e66e66;
260+
color: $white;
261+
}
262+
263+
&:active {
264+
background-color: #e0493e;
265+
box-shadow: inset 0px 1px 1px 0px rgba(0,0,0,0.30);
266+
}
267+
}
251268
}
252269

253270
.submitted {
@@ -393,7 +410,7 @@ challenge-tile .challenge.list-view {
393410
margin-bottom: 10px;
394411
padding: 20px 0;
395412
padding-left: 5px;
396-
height: 110px;
413+
min-height: 110px;
397414
border: 1px solid #E0E0E0;
398415
border-radius: 6px;
399416
box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
@@ -508,6 +525,23 @@ challenge-tile .challenge.list-view {
508525
.submit {
509526
display: block;
510527
margin: 6px 0;
528+
text-align: center;
529+
530+
&.btn-danger {
531+
color: #e66e66;
532+
background-color: $white;
533+
border-color: #e66e66;
534+
535+
&:hover {
536+
background-color: #e66e66;
537+
color: $white;
538+
}
539+
540+
&:active {
541+
background-color: #e0493e;
542+
box-shadow: inset 0px 1px 1px 0px rgba(0,0,0,0.30);
543+
}
544+
}
511545
}
512546

513547
.submitted {
@@ -578,7 +612,8 @@ challenge-tile .challenge.list-view {
578612
.completed-challenge {
579613
width: 100%;
580614
display: flex;
581-
flex-direction: row;
615+
flex-flow: row wrap;
616+
overflow: hidden;
582617
header {
583618
flex: 2;
584619
}

assets/css/directives/dev-challenge-user-place.scss

+4
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ dev-challenge-user-place {
108108
flex-direction: column;
109109
text-align: center;
110110
background-color: #F6F6F6;
111+
@media only screen and (max-width: 767px) {
112+
min-width: 84px;
113+
margin-left: 5px;
114+
}
111115

112116
.score {
113117
margin-top: 28px;

assets/css/directives/responsive-carousel.scss

+52-22
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,30 @@
88
margin: 0 auto;
99
@media only screen and (max-width: 767px) {
1010
display: none;
11+
width: auto;
1112
}
12-
&[slide-count="1"] {
13-
width: 170px;
14-
}
15-
&[slide-count="2"] {
16-
width: 340px;
17-
}
18-
&[slide-count="3"] {
19-
width: 510px;
20-
}
21-
&[slide-count="4"] {
22-
width: 680px;
23-
}
24-
&[slide-count="5"] {
25-
width: 850px;
26-
}
27-
&[slide-count="6"] {
28-
width: 1020px;
29-
}
30-
&[slide-count="7"] {
31-
width: 1190px;
13+
@media only screen and (min-width: 768px) {
14+
&[slide-count="1"] {
15+
width: 170px;
16+
}
17+
&[slide-count="2"] {
18+
width: 340px;
19+
}
20+
&[slide-count="3"] {
21+
width: 510px;
22+
}
23+
&[slide-count="4"] {
24+
width: 680px;
25+
}
26+
&[slide-count="5"] {
27+
width: 850px;
28+
}
29+
&[slide-count="6"] {
30+
width: 1020px;
31+
}
32+
&[slide-count="7"] {
33+
width: 1190px;
34+
}
3235
}
3336

3437
li {
@@ -96,6 +99,10 @@
9699

97100
.slide {
98101
display: inline-block;
102+
103+
@media only screen and (max-width: 767px) {
104+
display: block;
105+
}
99106
}
100107

101108
// .carousel-elem-list {
@@ -107,22 +114,45 @@
107114
position: absolute;
108115
top: 32px;
109116
left: -30px;
110-
@include forward-slash(1px, 60px, 0, 2px, 30deg);
111117
background-color: $gray-light;
112118
@media only screen and (min-width: 768px) {
113119
top: 32px;
114120
left: -18px;
121+
@include forward-slash(1px, 60px, 0, 2px, 30deg);
115122
}
123+
@media only screen and (max-width: 767px) {
124+
top: -30px;
125+
left: 60px;
126+
@include forward-slash(1px, 70px, 0, 2px, 90deg);
127+
}
116128
}
117129
}
118130
}
131+
132+
133+
ul[slide-count="3"] {
134+
@media only screen and (min-width: 575px) {
135+
.slide {
136+
display: inline-block;
137+
138+
&:not(:first-child) {
139+
.carousel-elem:before {
140+
top: 32px;
141+
left: -18px;
142+
@include forward-slash(1px, 60px, 0, 2px, 30deg);
143+
}
144+
}
145+
}
146+
}
147+
}
148+
119149
.carousel-elem {
120150
position: relative;
121151
display: inline-block;
122152
margin-right: 65px;
123153
padding: 20px 0;
154+
width: 130px;
124155
@media only screen and (min-width: 768px) {
125-
width: 130px;
126156
margin-right: 35px;
127157
padding: 30px 20px;
128158

assets/css/directives/tc-banner.scss

+33-19
Original file line numberDiff line numberDiff line change
@@ -150,33 +150,47 @@ $tco-color-dark: #ea690b;
150150
background-image: url(../../images/home-hero.jpg);
151151
background-size: 100%;
152152
height: 352px;
153-
background-position: center 40%;
153+
background-position: center 25%;
154154
background-repeat: no-repeat;
155+
flex-direction: row;
155156

156157
padding-top: 50px;
158+
159+
.container {
160+
width: 50%;
161+
display: flex;
162+
flex-direction: column;
163+
align-items: flex-start;
164+
margin-left: 37px;
165+
height: 95%;
166+
justify-content: space-between;
157167

158-
.title {
159-
margin-top: 10px;
160-
@include sofia-pro-bold;
161-
color: $white;
162-
}
168+
.title {
169+
margin-top: 10px;
170+
@include sofia-pro-bold;
171+
color: $white;
172+
}
163173

164-
.subtitle {
165-
margin-top: 20px;
166-
width: 450px;
167-
font-size: 20px;
168-
@extend .title;
169-
@include sofia-pro-regular;
170-
}
174+
.subtitle {
175+
margin-top: 20px;
176+
width: 450px;
177+
font-size: 20px;
178+
@extend .title;
179+
@include sofia-pro-regular;
180+
text-align: left;
181+
}
171182

172-
.description {
173-
margin-top: 20px;
174-
margin-bottom: 5px;
175-
}
183+
.description {
184+
margin-top: 20px;
185+
margin-bottom: 5px;
186+
}
176187

177-
.cta {
178-
margin-top: 20px;
188+
.cta {
189+
margin-top: 20px;
190+
}
191+
179192
}
193+
180194
}
181195

182196

0 commit comments

Comments
 (0)