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

Commit 94a2311

Browse files
author
Victor George
committed
Merge branch 'dev' of https://github.com/appirio-tech/topcoder-app into forms-refactor
# By Tom Ladendorf (3) and others # Via Tom Ladendorf (4) and others * 'dev' of https://github.com/appirio-tech/topcoder-app: updated track validation SUP-2317, Account Setting--> Spinner on 'Save' button should stop after successful message. -- Removed hardcoded Submit button for challenge tile Updated latest copy, from Anuj, for introjs stuff. more save button fixes save button fixes Updated Community nav per latest reqs Corrected image link for Ghostar Added 4th member of month and updated latest SRM winners Conflicts: app/settings/account-info/account-info.jade app/settings/edit-profile/edit-profile.jade
2 parents 38586f6 + d0e41a6 commit 94a2311

File tree

9 files changed

+44
-31
lines changed

9 files changed

+44
-31
lines changed

app/directives/busy-button/busy-button.directive.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@
2626
// remove the disabled attribute only if either element does not have disabled set
2727
// or it evaluates to false
2828
if (!attrs.disabled) {
29-
element.removeAttr('disabled').html(scope.originalContent);
29+
element.removeAttr('disabled');
3030
}
31+
element.html(scope.originalContent);
3132
}
3233
});
3334
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
.stalled-challenge(ng-hide="challenge.userCurrentPhaseEndTime") This challenge is currently paused.
2222

2323
.phase-action(ng-switch="challenge.userAction")
24-
a.tc-btn.tc-btn-s.tc-btn-wide.tc-btn-ghost.submit(ng-switch-when="Submit") Submit
24+
a.tc-btn.tc-btn-s.tc-btn-wide.tc-btn-ghost.submit(ng-switch-when="Submit", ng-href="{{challenge|challengeLinks:'detail'}}") Submit
2525

2626
.submitted(ng-switch-when="Submitted") Submitted
2727

@@ -87,7 +87,7 @@
8787
p.ends-in(ng-hide="challenge.userCurrentPhaseEndTime") This challenge is currently paused.
8888

8989
.phase-action(ng-switch="challenge.userAction")
90-
a.tc-btn.tc-btn-s.tc-btn-wide.tc-btn-ghost.submit(ng-switch-when="Submit") Submit
90+
a.tc-btn.tc-btn-s.tc-btn-wide.tc-btn-ghost.submit(ng-switch-when="Submit", ng-href="{{challenge|challengeLinks:'detail'}}") Submit
9191

9292
.submitted(ng-switch-when="Submitted") Submitted
9393

app/services/communityData.service.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,21 @@
3636
"contestType": "Data Science",
3737
"description": "Rating increased in both SRMs & advanced from Div 2 to Div 1.",
3838
"class": "data-science"
39+
}, {
40+
"avatar": "https://s3.amazonaws.com/app.topcoder-dev.com/images/ico-user-default.7aa28736.svg",
41+
"name": "TBD",
42+
"contestType": "Rookie of the Month",
43+
"description": "Most impressive start...",
44+
"class": "data-science"
3945
}],
4046
"copilots": [{
4147
"avatar": "//community.topcoder.com/i/m/maroosh.jpeg",
4248
"name": "maroosh",
4349
"country": "Jordan"
4450
}, {
45-
"avatar": "//community.topcoder.com/i/m/elkhawajah.jpeg",
46-
"name": "elkhawajah",
47-
"country": "Jordan"
51+
"avatar": "//community.topcoder.com/i/m/Ghostar.jpeg",
52+
"name": "Ghostar",
53+
"country": "United States"
4854
}, {
4955
"avatar": "//community.topcoder.com/i/m/hohosky.png",
5056
"name": "hohosky",

app/services/introduction.service.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -82,34 +82,39 @@
8282
},
8383
{
8484
// element: '#skills',
85-
intro: 'The quickest way to understand a member’s skills. It includes languages, environments, frameworks, libraries, platforms, tools, and any other technologies that you know well.',
85+
intro: 'The quickest way to understand a member’s skills. It includes languages, environments, frameworks, libraries, platforms, tools, and any other technologies that the members knows well.',
8686
position: 'top'
8787
},
8888
{
8989
// element: '#tcActivity',
90-
intro: 'Topcoder activity, ratings and other statistics now live in this section. See the active sub-tracks and click on them for even more details and history.',
90+
intro: 'See the active sub-tracks and click on them for ratings, charts, history and even more details.',
9191
position: 'top'
9292
},
9393
{
9494
// element: '#externalLinks',
95-
intro: 'Best of member’s presence on the web will be highlighted here. Show off your work and experience outside of Topcoder by connecting accounts or adding links.',
95+
intro: 'View the best of your presence on the web: show off your work and experience outside of Topcoder by connecting accounts or adding links.',
9696
position: 'top'
9797
}
9898
]
9999
},
100100
subtrack: {
101101
steps: [
102102
{
103-
intro: 'Welcome to the new Sub-track details page. This page contains activity in this track and in-depth metrics in an easy-to-understand way.'
103+
intro: 'Welcome to the new Sub-track details page. This page contains activity in this track, in-depth metrics and history in an easy-to-understand way.'
104104
},
105105
{
106106
// element: '#subtrack-stats',
107-
intro: 'Find the most important metrics here to understand performance in a glance. You can scroll below to see charts and more in-depth metrics to get a very granular understanding of the activity in this subtrack.',
107+
intro: 'Find the most important metrics here to understand performance in a glance.',
108108
position: 'bottom'
109109
},
110110
{
111111
// element: '#challenges-tab',
112-
intro: 'This sections contains all the completed challenges, in order of success.',
112+
intro: 'View all the successfully completed challenges for the member in this sub-track.',
113+
position: 'top'
114+
},
115+
{
116+
// element: '#challenges-tab',
117+
intro: 'View charts and more in-depth metrics to get a very granular understanding of the activity in this sub-track.',
113118
position: 'top'
114119
}
115120
]
@@ -118,7 +123,7 @@
118123
dashboard: {
119124
steps: [
120125
{
121-
intro: 'Welcome to your new Topcoder Dashboard. We have revamped the dashboard to bring to fore the information that matters to you. Let us walk you through some of the new things to help you keep on top of your Topcoder activity.'
126+
intro: 'Welcome to the your new Topcoder Dashboard. We have revamped the dashboard to bring to fore the information that matters to you. Lets walk through some of the new features.'
122127
},
123128
{
124129
// element: '#metrics',
@@ -132,12 +137,7 @@
132137
},
133138
{
134139
// element: '#challenges',
135-
intro: 'All your active challenges can be found here. See the phase, and activity on here, or click on them to go to the challenge details. You can view these in a grid or list view.',
136-
position: 'top'
137-
},
138-
{
139-
// element: '#viewAllChallenges',
140-
intro: 'Want to see more of the challenges? Or look up a past one? Click on the buttons here to see all of your challenges.',
140+
intro: 'View your active challenges on the dashboard in a grid or list view. You can find the phase, and activity on here, or can click on them to go to the challenge details.',
141141
position: 'top'
142142
},
143143
{

app/services/nav.service.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
{ 'href': '/community/competitive%20programming/', 'text': 'COMPETITIVE PROGRAMMING', 'icon': '/images/nav/book-cp.svg' },
3030
],
3131
'community': [
32-
{ 'sref': 'community', 'text': 'HOME', 'icon': '/images/nav/community.svg' },
33-
{ 'sref': 'community.members', 'text': 'MEMBERS', 'icon': '/images/nav/members.svg' },
32+
{ 'sref': 'community.members', 'text': 'OVERVIEW', 'icon': '/images/nav/members.svg' },
3433
{ 'href': '/community/member-programs/', 'text': 'PROGRAMS', 'icon': '/images/nav/programs.svg' },
3534
{ 'href': CONSTANTS.FORUMS_APP_URL, 'text': 'FORUMS', 'icon': '/images/nav/forums.svg', 'target': '_blank' },
3635
{ 'sref': 'community.statistics', 'text': 'STATISTICS', 'icon': '/images/nav/statistics.svg' },

app/settings/account-info/account-info.controller.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
vm.formProcessing.accountInfoForm = false;
7878
toaster.pop('success', "Success!", "Your account information was updated.");
7979
for (var k in vm.userData) userData[k] = vm.userData[k];
80+
vm.accountInfoForm.$setPristine();
8081
})
8182
.catch(function() {
8283
vm.formProcessing.accountInfoForm = false;

app/settings/account-info/account-info.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,4 @@
164164

165165

166166
.save-section
167-
button.save.tc-btn.tc-btn-wide(type="submit", tc-busy-button, tc-busy-when="vm.formProcessing.accountInfoForm", ng-disabled="vm.accountInfoForm.$invalid", ng-class="{'enabled-button': vm.accountInfoForm.$valid, 'disabled': vm.accountInfoForm.$invalid || vm.accountInfoForm.$pristine}", ng-click="vm.accountInfoForm.$valid && vm.accountInfoForm.$dirty && vm.saveAccountInfo()") Save
167+
button.save.tc-btn.tc-btn-l(type="submit", tc-busy-button, tc-busy-when="vm.formProcessing.accountInfoForm", ng-disabled="vm.accountInfoForm.$invalid || vm.accountInfoForm.$pristine", ng-class="{'enabled-button': vm.accountInfoForm.$valid}", ng-click="vm.accountInfoForm.$valid && vm.accountInfoForm.$dirty && vm.saveAccountInfo()") Save

app/settings/edit-profile/edit-profile.controller.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,13 @@
3535

3636
processData(vm.userData);
3737

38-
$scope.tracks = vm.tracks;
39-
$scope.$watch('tracks', function watcher() {
40-
if (!tracksValid()) {
41-
toaster.pop('error', "Error", "Please select at least one track.");
42-
}
43-
}, true);
38+
// commenting out since this might come back
39+
// $scope.tracks = vm.tracks;
40+
// $scope.$watch('tracks', function watcher() {
41+
// if (!tracksValid()) {
42+
// toaster.pop('error', "Error", "Please select at least one track.");
43+
// }
44+
// }, true);
4445

4546
ExternalAccountService.getLinkedExternalAccounts(vm.userData.userId).then(function(data) {
4647
vm.linkedExternalAccounts = data;
@@ -117,6 +118,10 @@
117118
}
118119

119120
function updateProfile() {
121+
if (!vm.tracksValid()) {
122+
toaster.pop('error', "Error", "Please select at least one track.");
123+
return false;
124+
}
120125
vm.profileFormProcessing = true;
121126
vm.userData.tracks = _.reduce(vm.tracks, function(result, isInterested, trackName) {
122127
if (isInterested) {
@@ -128,6 +133,7 @@
128133
ProfileService.updateUserProfile(vm.userData)
129134
.then(function() {
130135
vm.profileFormProcessing = false;
136+
vm.editProfile.$setPristine();
131137
$log.info('Saved successfully');
132138
toaster.pop('success', "Success!", "Your account information was updated.");
133139
for (var k in vm.userData) userData[k] = vm.userData[k];

app/settings/edit-profile/edit-profile.jade

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
input(type='file', name='image', on-file-change='on-file-change', id="change-image-input", style="display: none;")
2323

2424
.file-delete(ng-show="vm.userData.photoURL && vm.userData.photoURL.length")
25-
button.tc-btn.tc-btn-ghost.tc-btn-warning.tc-btn-s(ng-click="vm.deleteImage()", type="button") Delete
25+
button.tc-btn.tc-btn-secondary.tc-btn-s(ng-click="vm.deleteImage()", type="button") Delete
2626

2727
.country
2828
.form-label country to represent
@@ -59,8 +59,8 @@
5959
track-toggle(tracks="vm.tracks")
6060

6161
.save-section
62-
button.tc-btn.tc-btn-primary.tc-btn-wide(ng-show="!(vm.editProfile.$invalid || vm.editProfile.$pristine || !vm.tracksValid())", type="submit", tc-busy-button, tc-busy-when="vm.profileFormProcessing" ng-disabled="vm.editProfile.$invalid || vm.editProfile.$pristine", ng-class="{' ': vm.editProfile.$valid, 'disabled': disabled}") Save
63-
button.tc-btn.tc-btn-secondary.tc-btn-wide.disabled(ng-show="vm.editProfile.$invalid || vm.editProfile.$pristine || !vm.tracksValid()", type="button") Save
62+
button.tc-btn.tc-btn-primary.tc-btn-s(ng-show="!(vm.editProfile.$invalid || vm.editProfile.$pristine)", type="submit", tc-busy-button, tc-busy-when="vm.profileFormProcessing" ng-disabled="vm.editProfile.$invalid || vm.editProfile.$pristine", ng-class="{' ': vm.editProfile.$valid, 'disabled': disabled}") Save
63+
button.tc-btn.tc-btn-secondary.tc-btn-s(ng-show="vm.editProfile.$invalid || vm.editProfile.$pristine", type="button", disabled="disabled") Save
6464

6565
.settings-section.skills
6666
.section-info

0 commit comments

Comments
 (0)