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

Commit 62b934d

Browse files
authored
Merge pull request #1239 from appirio-tech/dev
skill-picker updates, cognitive banner update
2 parents fd64ad2 + 83f454d commit 62b934d

File tree

9 files changed

+6605
-2296
lines changed

9 files changed

+6605
-2296
lines changed

Diff for: app/directives/page-state-header/page-state-header.jade

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
.title
1818
p Won in Prizes
1919
.badgeItem(ng-if="vm.dashboardAchievement")
20-
.dashboardBadge(title='{{vm.dashboardBadgeName}}')
21-
20+
.dashboardBadge
21+
img( width=200 alt='{{vm.dashboardBadgeName}}' height=200 src=require("../../../assets/images/badge.png"))

Diff for: app/my-dashboard/notifications/notifications.jade

-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,3 @@
1313
img(src=require("../../../assets/images/tco17-web-logo-white.svg"), alt="TCO17")
1414
a.banner.watson(href="https://cognitive.topcoder.com/")
1515
img(src=require("../../../assets/images/logo_white.png"), alt="TCO17")
16-
span Cognitive
17-
br
18-
span Community

Diff for: app/skill-picker/skill-picker.controller.js

+17-10
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import _ from 'lodash'
2727
vm.communities = {}
2828
vm.isPageDirty = isPageDirty
2929
vm.isTracksDirty = isTracksDirty
30+
vm.isCommunitySelected = isCommunitySelected
3031
///////
3132
activate()
3233

@@ -51,6 +52,13 @@ import _ from 'lodash'
5152
function isTracksDirty() {
5253
return vm.tracks.DESIGN || vm.tracks.DEVELOP || vm.tracks.DATA_SCIENCE
5354
}
55+
/**
56+
* Verfies if the communities section state has been modified by the user in any way.
57+
*/
58+
function isCommunitySelected() {
59+
var community = _.find(vm.communities, {status: true, display: true})
60+
return !!community
61+
}
5462

5563
/**
5664
* Verfies if the communities section state has been modified by the user in any way.
@@ -64,6 +72,13 @@ import _ from 'lodash'
6472
* Initializes the communities to show in the communities section.
6573
*/
6674
function initCommunities() {
75+
vm.communities['ibm_cognitive'] = {
76+
displayName: 'Cognitive',
77+
programId: vm.IBM_COGNITIVE_PROGRAM_ID,
78+
status: true,
79+
dirty: true,
80+
display: true
81+
}
6782
vm.communities['ios'] = {
6883
displayName: 'iOS',
6984
programId: vm.IOS_PROGRAM_ID,
@@ -78,13 +93,6 @@ import _ from 'lodash'
7893
dirty: false,
7994
display: true
8095
}
81-
vm.communities['ibm_cognitive'] = {
82-
displayName: 'Cognitive',
83-
programId: vm.IBM_COGNITIVE_PROGRAM_ID,
84-
status: true,
85-
dirty: true,
86-
display: true
87-
}
8896
_addWatchToCommunity(vm.communities['ios'])
8997
_addWatchToCommunity(vm.communities['predix'])
9098
_addWatchToCommunity(vm.communities['ibm_cognitive'])
@@ -125,8 +133,7 @@ import _ from 'lodash'
125133
if (community) {
126134
// set display false to avoid showing already enabled/registered program
127135
// we expect display property to be modified after first load of the page
128-
community.display = false
129-
community.status = true
136+
// community.status = true
130137
if (community.unregister){
131138
community.unregister()
132139
_addWatchToCommunity(community)
@@ -189,7 +196,7 @@ import _ from 'lodash'
189196
}
190197
promises.push(ProfileService.updateUserSkills(vm.username, data))
191198
}
192-
logger.debug('isCommunitiesDirty: ' + isCommunitiesDirty())
199+
193200
if (isCommunitiesDirty()) {
194201
for(var communityName in vm.communities) {
195202
var community = vm.communities[communityName]

Diff for: app/skill-picker/skill-picker.jade

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,4 @@
7474
type="button",
7575
tc-busy-button, tc-busy-when="vm.saving",
7676
ng-click="vm.submitSkills()",
77-
ng-disabled="vm.disableDoneButton || !vm.isTracksDirty()") Done
77+
ng-disabled="vm.disableDoneButton || !vm.isPageDirty()") Done

Diff for: assets/css/directives/badge-tooltip.scss

+17-2
Original file line numberDiff line numberDiff line change
@@ -680,8 +680,23 @@ span.subBadge.selected {
680680
}
681681

682682
.dashboardBadge {
683-
background: url(../../images/badge05-70x70.png) no-repeat;
683+
background: url(../../images/badge.png) no-repeat;
684+
background-size: 70px 70px;
684685
width: 70px;
685686
height: 70px;
687+
img {
688+
display: none;
689+
}
686690
}
687-
691+
692+
.dashboardBadge:hover img {
693+
display: block;
694+
position: absolute;
695+
top: 55px;
696+
left: -110px;;
697+
z-index: 1000;
698+
width: auto;
699+
overflow: hidden;
700+
padding: 8px;
701+
background: transparent;
702+
}

Diff for: assets/images/badge.png

338 KB
Loading

Diff for: assets/images/badge05-70x70.png

-24.7 KB
Binary file not shown.

Diff for: assets/images/banner-watson.jpg

486 KB
Loading

0 commit comments

Comments
 (0)