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

skill-picker updates, cognitive banner update #1239

Merged
merged 11 commits into from
Oct 18, 2017
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/page-state-header/page-state-header.jade
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
.title
p Won in Prizes
.badgeItem(ng-if="vm.dashboardAchievement")
.dashboardBadge(title='{{vm.dashboardBadgeName}}')

.dashboardBadge
img( width=200 alt='{{vm.dashboardBadgeName}}' height=200 src=require("../../../assets/images/badge.png"))
3 changes: 0 additions & 3 deletions app/my-dashboard/notifications/notifications.jade
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@
img(src=require("../../../assets/images/tco17-web-logo-white.svg"), alt="TCO17")
a.banner.watson(href="https://cognitive.topcoder.com/")
img(src=require("../../../assets/images/logo_white.png"), alt="TCO17")
span Cognitive
br
span Community
27 changes: 17 additions & 10 deletions app/skill-picker/skill-picker.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import _ from 'lodash'
vm.communities = {}
vm.isPageDirty = isPageDirty
vm.isTracksDirty = isTracksDirty
vm.isCommunitySelected = isCommunitySelected
///////
activate()

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

/**
* Verfies if the communities section state has been modified by the user in any way.
Expand All @@ -64,6 +72,13 @@ import _ from 'lodash'
* Initializes the communities to show in the communities section.
*/
function initCommunities() {
vm.communities['ibm_cognitive'] = {
displayName: 'Cognitive',
programId: vm.IBM_COGNITIVE_PROGRAM_ID,
status: true,
dirty: true,
display: true
}
vm.communities['ios'] = {
displayName: 'iOS',
programId: vm.IOS_PROGRAM_ID,
Expand All @@ -78,13 +93,6 @@ import _ from 'lodash'
dirty: false,
display: true
}
vm.communities['ibm_cognitive'] = {
displayName: 'Cognitive',
programId: vm.IBM_COGNITIVE_PROGRAM_ID,
status: true,
dirty: true,
display: true
}
_addWatchToCommunity(vm.communities['ios'])
_addWatchToCommunity(vm.communities['predix'])
_addWatchToCommunity(vm.communities['ibm_cognitive'])
Expand Down Expand Up @@ -125,8 +133,7 @@ import _ from 'lodash'
if (community) {
// set display false to avoid showing already enabled/registered program
// we expect display property to be modified after first load of the page
community.display = false
community.status = true
// community.status = true
if (community.unregister){
community.unregister()
_addWatchToCommunity(community)
Expand Down Expand Up @@ -189,7 +196,7 @@ import _ from 'lodash'
}
promises.push(ProfileService.updateUserSkills(vm.username, data))
}
logger.debug('isCommunitiesDirty: ' + isCommunitiesDirty())

if (isCommunitiesDirty()) {
for(var communityName in vm.communities) {
var community = vm.communities[communityName]
Expand Down
2 changes: 1 addition & 1 deletion app/skill-picker/skill-picker.jade
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@
type="button",
tc-busy-button, tc-busy-when="vm.saving",
ng-click="vm.submitSkills()",
ng-disabled="vm.disableDoneButton || !vm.isTracksDirty()") Done
ng-disabled="vm.disableDoneButton || !vm.isPageDirty()") Done
19 changes: 17 additions & 2 deletions assets/css/directives/badge-tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -680,8 +680,23 @@ span.subBadge.selected {
}

.dashboardBadge {
background: url(../../images/badge05-70x70.png) no-repeat;
background: url(../../images/badge.png) no-repeat;
background-size: 70px 70px;
width: 70px;
height: 70px;
img {
display: none;
}
}


.dashboardBadge:hover img {
display: block;
position: absolute;
top: 55px;
left: -110px;;
z-index: 1000;
width: auto;
overflow: hidden;
padding: 8px;
background: transparent;
}
Binary file added assets/images/badge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/images/badge05-70x70.png
Binary file not shown.
Binary file modified assets/images/banner-watson.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading