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

Qa integration #804

Merged
merged 17 commits into from
May 9, 2016
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
4 changes: 2 additions & 2 deletions app/directives/tc-banner/tc-banner.jade
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.tc-banner-placeholder(class="{{vm.theme}}")
.image
img(ng-src="{{vm.img}}")
.title(ng-bind="vm.title")
.title(ng-bind="vm.title", ng-show="vm.title !== null")
.content(ng-transclude, ng-show="transcluded")
.description(ng-bind-html="vm.description")
.description(ng-bind-html="vm.description", ng-show="vm.description !== null")
.ctas
.cta(ng-repeat="link in vm.ctas")
a(class="{{link.cssClass}}", title="{{link.title}}", ng-href="{{link.url}}", ng-if="link.url") {{link.title}}
Expand Down
2 changes: 1 addition & 1 deletion app/directives/tc-form-stockart/tc-form-stockart.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe('Topcoder Form Stockart Directive', function() {
})
})

describe.only('isButtonDisabled', function() {
describe('isButtonDisabled', function() {
var button

beforeEach(function() {
Expand Down
1 change: 1 addition & 0 deletions app/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ html
})(document);

include ../assets/scripts/google.analytics.jade
include ../assets/scripts/zendesk-widget.jade

if htmlWebpackPlugin.options.NEW_RELIC_APPLICATION_ID
include ../assets/scripts/newrelic.analytics.jade
Expand Down
2 changes: 1 addition & 1 deletion app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ require('../node_modules/font-awesome/fonts/fontawesome-webfont.woff')
require('../node_modules/font-awesome/fonts/fontawesome-webfont.woff2')
require('../node_modules/font-awesome/css/font-awesome.css')

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

// Require Angular modules first
Expand Down
2 changes: 2 additions & 0 deletions app/my-dashboard/my-dashboard.jade
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

//- .ttl
//- tc-banner(theme="black", banner-name="ttl")
.one-million
tc-banner(theme="black", banner-name="1million")

.tco
tc-banner(theme="black", banner-name="tco16")
Expand Down
10 changes: 10 additions & 0 deletions app/services/bannerDataService.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ import angular from 'angular'
url: 'http://tco16.topcoder.com/latest/overview/',
cssClass: 'tc-btn tc-btn-s tco-cta'
}]
},
'1million': {
title: null,
img: require('../../assets/images/1M-banner-hero.png'),
description: null,
ctas: [{
title: 'Learn More',
url: 'https://www.topcoder.com/blog/1-million-members-strong/',
cssClass: 'tc-btn tc-btn-s'
}]
}
// Commenting out instead of deleting in case there is
// another one with a similar format soon
Expand Down
3 changes: 3 additions & 0 deletions app/services/blog.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ import X2JS from 'xml2js'
result.forEach(function(item) {
item.title = $sce.trustAsHtml(item.title.toString())
item.description = $sce.trustAsHtml(item.description.toString())
if (item.link && Array.isArray(item.link) && item.link.length) {
item.link = item.link[0]
}
})

deferred.resolve(result)
Expand Down
14 changes: 7 additions & 7 deletions app/settings/email/email.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import angular from 'angular'

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

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

function EmailSettingsController($rootScope, userProfile, ProfileService, MailchimpService, logger, CONSTANTS, toaster, $q, $scope) {
function EmailSettingsController($rootScope, userData, ProfileService, MailchimpService, logger, CONSTANTS, toaster, $q, $scope) {
var vm = this
vm.loading = false
vm.saving = false
Expand All @@ -34,7 +34,7 @@ import angular from 'angular'
},
{
id: CONSTANTS.MAILCHIMP_NL_DEV,
name: 'Developer Newsletter',
name: 'Development Newsletter',
desc: 'Software architecture, component assembly, application development, and bug hunting',
enabled: false,
dirty: false
Expand Down Expand Up @@ -63,11 +63,11 @@ import angular from 'angular'
]

vm.loading = true
return MailchimpService.getMemberSubscription(userProfile).then(function(subscription) {
return MailchimpService.getMemberSubscription(userData).then(function(subscription) {
vm.loading = false
if (!subscription) {
// add member to the list with empty preferences
MailchimpService.addSubscription(userProfile, {}).then(function(resp) {
// add member to the list with default preferences
MailchimpService.addSubscription(userData, {}).then(function(resp) {
logger.debug(resp)
}).catch(function(err) {
// no error to user
Expand Down Expand Up @@ -102,7 +102,7 @@ import angular from 'angular'
vm.newsletters.forEach(function(newsletter) {
preferences[newsletter.id] = newsletter.enabled
})
MailchimpService.addSubscription(userProfile, preferences).then(function(resp) {
MailchimpService.addSubscription(userData, preferences).then(function(resp) {
vm.loading = false
vm.saving = false
// reset dirty state for all newsletter options
Expand Down
8 changes: 0 additions & 8 deletions app/settings/settings.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,6 @@ import angular from 'angular'
controllerAs: 'vm',
data: {
title: 'Email Preferences'
},
resolve: {
userIdentity: ['UserService', function(UserService) {
return UserService.getUserIdentity()
}],
userProfile: ['userIdentity', 'ProfileService', function(userIdentity, ProfileService) {
return ProfileService.getUserProfile(userIdentity.handle.toLowerCase())
}]
}
},
'settings.preferences': {
Expand Down
8 changes: 4 additions & 4 deletions app/submissions/submit-design-files/submit-design-files.jade
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.mobile-redirect__body
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.

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
a(ng-href="https://help.{{DOMAIN}}/hc/en-us/articles/219122667-Formatting-Your-Submission-for-Design-Challenges") Learn more about formatting your submission file

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

Expand All @@ -23,7 +23,7 @@

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.

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
a(ng-href="https://help.{{DOMAIN}}/hc/en-us/articles/219122667-Formatting-Your-Submission-for-Design-Challenges") Learn more about formatting your submission file

.form-block__fields
.fieldset
Expand Down Expand Up @@ -122,7 +122,7 @@
.form-block__text
p Check to see if your font is on the Studio Standard Fonts list. If it is, leave the URL field blank.

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

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.

Expand All @@ -135,7 +135,7 @@
.form-block__title Did you use stock art?

.form-block__text
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].
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].

.form-block__fields
.fieldsets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.mobile-redirect__body
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.

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
a(ng-href="") TODO: same link as below for help on formatting submission

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

Expand All @@ -23,7 +23,7 @@

p Need text from PMs.

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

.form-block__fields
.fieldset
Expand Down
22 changes: 20 additions & 2 deletions assets/css/my-dashboard/my-dashboard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
background-color: $white;
}

.challenges, .srms, .programs, .tco, .ttl, .community-updates {
.challenges, .srms, .programs, .tco, .ttl, .one-million, .community-updates {
@include module-l;
margin-top: 1px;
width: 100%;
Expand All @@ -34,7 +34,25 @@
}
}

.challenges, .srms, .programs, .tco, .ttl, .community-updates {
.one-million {
.tc-banner-placeholder {
background: none $tc-gray-90;
.image {
img {
width: auto;
}
}

.ctas {
// specific css override to reduce the gap between image and ctas
// ideally we should have separate title, image and description
// however, here we have all 3 in single image
margin-top: 0px;
}
}
}

.challenges, .srms, .programs, .tco, .ttl, .one-million, .community-updates {
padding-top: 0px;
}

Expand Down
1 change: 1 addition & 0 deletions assets/css/settings/email.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
display: flex;
justify-content: center;
align-items: center;
min-height: 100px;
}

.newsletters {
Expand Down
Binary file added assets/images/1M-banner-hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 0 additions & 8 deletions assets/scripts/usersnap.analytics.js

This file was deleted.

3 changes: 3 additions & 0 deletions assets/scripts/zendesk-widget.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
script(type="text/javascript").
/*<![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");
/*]]>*/