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

Commit 6e95006

Browse files
committed
Merge pull request #804 from appirio-tech/qa-integration
Qa integration
2 parents 062b6b9 + f8db9ce commit 6e95006

File tree

16 files changed

+57
-35
lines changed

16 files changed

+57
-35
lines changed

app/directives/tc-banner/tc-banner.jade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
.tc-banner-placeholder(class="{{vm.theme}}")
22
.image
33
img(ng-src="{{vm.img}}")
4-
.title(ng-bind="vm.title")
4+
.title(ng-bind="vm.title", ng-show="vm.title !== null")
55
.content(ng-transclude, ng-show="transcluded")
6-
.description(ng-bind-html="vm.description")
6+
.description(ng-bind-html="vm.description", ng-show="vm.description !== null")
77
.ctas
88
.cta(ng-repeat="link in vm.ctas")
99
a(class="{{link.cssClass}}", title="{{link.title}}", ng-href="{{link.url}}", ng-if="link.url") {{link.title}}

app/directives/tc-form-stockart/tc-form-stockart.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ describe('Topcoder Form Stockart Directive', function() {
8888
})
8989
})
9090

91-
describe.only('isButtonDisabled', function() {
91+
describe('isButtonDisabled', function() {
9292
var button
9393

9494
beforeEach(function() {

app/index.jade

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ html
1818
})(document);
1919

2020
include ../assets/scripts/google.analytics.jade
21+
include ../assets/scripts/zendesk-widget.jade
2122

2223
if htmlWebpackPlugin.options.NEW_RELIC_APPLICATION_ID
2324
include ../assets/scripts/newrelic.analytics.jade

app/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ require('../node_modules/font-awesome/fonts/fontawesome-webfont.woff')
4141
require('../node_modules/font-awesome/fonts/fontawesome-webfont.woff2')
4242
require('../node_modules/font-awesome/css/font-awesome.css')
4343

44-
// Require non-npm scripts
44+
// Require non-npm scripts, e.g. kissmetrics, munchkin (analytics via jade are included in index.html)
4545
requireContextFiles(require.context('../assets/scripts/', true, /^(.*\.(js$))[^.]*$/igm))
4646

4747
// Require Angular modules first

app/my-dashboard/my-dashboard.jade

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
//- .ttl
99
//- tc-banner(theme="black", banner-name="ttl")
10+
.one-million
11+
tc-banner(theme="black", banner-name="1million")
1012

1113
.tco
1214
tc-banner(theme="black", banner-name="tco16")

app/services/bannerDataService.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@ import angular from 'angular'
3535
url: 'http://tco16.topcoder.com/latest/overview/',
3636
cssClass: 'tc-btn tc-btn-s tco-cta'
3737
}]
38+
},
39+
'1million': {
40+
title: null,
41+
img: require('../../assets/images/1M-banner-hero.png'),
42+
description: null,
43+
ctas: [{
44+
title: 'Learn More',
45+
url: 'https://www.topcoder.com/blog/1-million-members-strong/',
46+
cssClass: 'tc-btn tc-btn-s'
47+
}]
3848
}
3949
// Commenting out instead of deleting in case there is
4050
// another one with a similar format soon

app/services/blog.service.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ import X2JS from 'xml2js'
3131
result.forEach(function(item) {
3232
item.title = $sce.trustAsHtml(item.title.toString())
3333
item.description = $sce.trustAsHtml(item.description.toString())
34+
if (item.link && Array.isArray(item.link) && item.link.length) {
35+
item.link = item.link[0]
36+
}
3437
})
3538

3639
deferred.resolve(result)

app/settings/email/email.controller.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import angular from 'angular'
55

66
angular.module('tc.settings').controller('EmailSettingsController', EmailSettingsController)
77

8-
EmailSettingsController.$inject = ['$rootScope', 'userProfile', 'ProfileService', 'MailchimpService', 'logger', 'CONSTANTS', 'toaster', '$q', '$scope']
8+
EmailSettingsController.$inject = ['$rootScope', 'userData', 'ProfileService', 'MailchimpService', 'logger', 'CONSTANTS', 'toaster', '$q', '$scope']
99

10-
function EmailSettingsController($rootScope, userProfile, ProfileService, MailchimpService, logger, CONSTANTS, toaster, $q, $scope) {
10+
function EmailSettingsController($rootScope, userData, ProfileService, MailchimpService, logger, CONSTANTS, toaster, $q, $scope) {
1111
var vm = this
1212
vm.loading = false
1313
vm.saving = false
@@ -34,7 +34,7 @@ import angular from 'angular'
3434
},
3535
{
3636
id: CONSTANTS.MAILCHIMP_NL_DEV,
37-
name: 'Developer Newsletter',
37+
name: 'Development Newsletter',
3838
desc: 'Software architecture, component assembly, application development, and bug hunting',
3939
enabled: false,
4040
dirty: false
@@ -63,11 +63,11 @@ import angular from 'angular'
6363
]
6464

6565
vm.loading = true
66-
return MailchimpService.getMemberSubscription(userProfile).then(function(subscription) {
66+
return MailchimpService.getMemberSubscription(userData).then(function(subscription) {
6767
vm.loading = false
6868
if (!subscription) {
69-
// add member to the list with empty preferences
70-
MailchimpService.addSubscription(userProfile, {}).then(function(resp) {
69+
// add member to the list with default preferences
70+
MailchimpService.addSubscription(userData, {}).then(function(resp) {
7171
logger.debug(resp)
7272
}).catch(function(err) {
7373
// no error to user
@@ -102,7 +102,7 @@ import angular from 'angular'
102102
vm.newsletters.forEach(function(newsletter) {
103103
preferences[newsletter.id] = newsletter.enabled
104104
})
105-
MailchimpService.addSubscription(userProfile, preferences).then(function(resp) {
105+
MailchimpService.addSubscription(userData, preferences).then(function(resp) {
106106
vm.loading = false
107107
vm.saving = false
108108
// reset dirty state for all newsletter options

app/settings/settings.routes.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,6 @@ import angular from 'angular'
5454
controllerAs: 'vm',
5555
data: {
5656
title: 'Email Preferences'
57-
},
58-
resolve: {
59-
userIdentity: ['UserService', function(UserService) {
60-
return UserService.getUserIdentity()
61-
}],
62-
userProfile: ['userIdentity', 'ProfileService', function(userIdentity, ProfileService) {
63-
return ProfileService.getUserProfile(userIdentity.handle.toLowerCase())
64-
}]
6557
}
6658
},
6759
'settings.preferences': {

app/submissions/submit-design-files/submit-design-files.jade

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.mobile-redirect__body
55
p Our team is working hard on new features, and file upload currently only works on the web. Please open this page on your desktop if you want to create a submission.
66

7-
a(ng-href="http://help.{{DOMAIN}}/design/submitting-to-a-design-challenge/formatting-your-submission-for-design-challenges/") Learn more about formatting your submission file
7+
a(ng-href="https://help.{{DOMAIN}}/hc/en-us/articles/219122667-Formatting-Your-Submission-for-Design-Challenges") Learn more about formatting your submission file
88

99
a.tc-btn.tc-btn-s(ng-href="https://www.{{DOMAIN}}/challenge-details/{{submissions.challengeId}}/?type={{submissions.track}}") Back to Challenge Details
1010

@@ -23,7 +23,7 @@
2323

2424
p Please be sure to double-check that you have submitted the correct files and that your JPG files (if applicable) are in RGB color mode.
2525

26-
a(ng-href="http://help.{{DOMAIN}}/design/submitting-to-a-design-challenge/formatting-your-submission-for-design-challenges/") Learn more about formatting your submission file
26+
a(ng-href="https://help.{{DOMAIN}}/hc/en-us/articles/219122667-Formatting-Your-Submission-for-Design-Challenges") Learn more about formatting your submission file
2727

2828
.form-block__fields
2929
.fieldset
@@ -122,7 +122,7 @@
122122
.form-block__text
123123
p Check to see if your font is on the Studio Standard Fonts list. If it is, leave the URL field blank.
124124

125-
p Read the #[a(ng-href="http://help.{{DOMAIN}}/design/design-copyright-and-font-policies/font-policy-for-design-challenges/") Studio Fonts Policy].
125+
p Read the #[a(ng-href="https://help.{{DOMAIN}}/hc/en-us/articles/217959447-Font-Policy-for-Design-Challenges") Studio Fonts Policy].
126126

127127
p If your font is not on the list, you must provide the URL to the font page (not file) from one of the approved font websites in the dropdown box.
128128

@@ -135,7 +135,7 @@
135135
.form-block__title Did you use stock art?
136136

137137
.form-block__text
138-
p If you used any stock photos in your design mocks, please provide the location and details so that the client can obtain them. Follow the guidelines at our #[a(ng-href="http://help.{{DOMAIN}}/design/design-copyright-and-font-policies/policy-for-stock-photos-in-design-submissions/") Studio Stock Art Policy].
138+
p If you used any stock photos in your design mocks, please provide the location and details so that the client can obtain them. Follow the guidelines at our #[a(ng-href="https://help.{{DOMAIN}}/hc/en-us/articles/217481408-Policy-for-Stock-Artwork-in-Design-Submissions") Studio Stock Art Policy].
139139

140140
.form-block__fields
141141
.fieldsets

app/submissions/submit-develop-files/submit-develop-files.jade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.mobile-redirect__body
55
p Our team is working hard on new features, and file upload currently only works on the web. Please open this page on your desktop if you want to create a submission.
66

7-
a(ng-href="http://help.{{DOMAIN}}/design/submitting-to-a-design-challenge/formatting-your-submission-for-design-challenges/") TODO: same link as below for help on formatting submission
7+
a(ng-href="") TODO: same link as below for help on formatting submission
88

99
a.tc-btn.tc-btn-s(ng-href="https://www.{{DOMAIN}}/challenge-details/{{submissions.challengeId}}/?type={{submissions.track}}") Back to Challenge Details
1010

@@ -23,7 +23,7 @@
2323

2424
p Need text from PMs.
2525

26-
a(ng-href="http://help.{{DOMAIN}}/design/submitting-to-a-design-challenge/formatting-your-submission-for-design-challenges/") Need link from PMs
26+
a(ng-href="") Need link from PMs
2727

2828
.form-block__fields
2929
.fieldset

assets/css/my-dashboard/my-dashboard.scss

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
background-color: $white;
1212
}
1313

14-
.challenges, .srms, .programs, .tco, .ttl, .community-updates {
14+
.challenges, .srms, .programs, .tco, .ttl, .one-million, .community-updates {
1515
@include module-l;
1616
margin-top: 1px;
1717
width: 100%;
@@ -34,7 +34,25 @@
3434
}
3535
}
3636

37-
.challenges, .srms, .programs, .tco, .ttl, .community-updates {
37+
.one-million {
38+
.tc-banner-placeholder {
39+
background: none $tc-gray-90;
40+
.image {
41+
img {
42+
width: auto;
43+
}
44+
}
45+
46+
.ctas {
47+
// specific css override to reduce the gap between image and ctas
48+
// ideally we should have separate title, image and description
49+
// however, here we have all 3 in single image
50+
margin-top: 0px;
51+
}
52+
}
53+
}
54+
55+
.challenges, .srms, .programs, .tco, .ttl, .one-million, .community-updates {
3856
padding-top: 0px;
3957
}
4058

assets/css/settings/email.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
display: flex;
99
justify-content: center;
1010
align-items: center;
11+
min-height: 100px;
1112
}
1213

1314
.newsletters {

assets/images/1M-banner-hero.png

22.1 KB
Loading

assets/scripts/usersnap.analytics.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

assets/scripts/zendesk-widget.jade

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
script(type="text/javascript").
2+
/*<![CDATA[*/window.zEmbed||function(e,t){var n,o,d,i,s,a=[],r=document.createElement("iframe");window.zEmbed=function(){a.push(arguments)},window.zE=window.zE||window.zEmbed,r.src="javascript:false",r.title="",r.role="presentation",(r.frameElement||r).style.cssText="display: none",d=document.getElementsByTagName("script"),d=d[d.length-1],d.parentNode.insertBefore(r,d),i=r.contentWindow,s=i.document;try{o=s}catch(c){n=document.domain,r.src='javascript:var d=document.open();d.domain="'+n+'";void(0);',o=s}o.open()._l=function(){var o=this.createElement("script");n&&(this.domain=n),o.id="js-iframe-async",o.src=e,this.t=+new Date,this.zendeskHost=t,this.zEQueue=a,this.body.appendChild(o)},o.write('<body onload="document._l();">'),o.close()}("https://assets.zendesk.com/embeddable_framework/main.js","topcoder.zendesk.com");
3+
/*]]>*/

0 commit comments

Comments
 (0)