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

Commit ba06b85

Browse files
committed
Merge pull request #322 from appirio-tech/feature/intro-js
Feature/intro js
2 parents 54329a4 + 96a2b47 commit ba06b85

File tree

18 files changed

+343
-163
lines changed

18 files changed

+343
-163
lines changed

app/index.jade

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ html
8383

8484
#header(ui-view="header")
8585

86+
.intro-js-container(ng-intro-options="main.introOptions", ng-intro-method="main.startIntro")
87+
8688
notifications-bar.notifications(closeIcon="fa fa-times-circle")
8789

8890
toaster-container(toaster-options="{{main.globalToasterConfig}}")

app/layout/header/header.controller.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
angular.module('tc.layout').controller('HeaderController', HeaderController);
55

6-
HeaderController.$inject = ['$state', 'TcAuthService', 'CONSTANTS', '$log', '$rootScope', 'UserService', 'ProfileService', 'IntroService'];
6+
HeaderController.$inject = ['$state', 'TcAuthService', 'CONSTANTS', '$log', '$rootScope', 'UserService', 'ProfileService'];
77

8-
function HeaderController($state, TcAuthService, CONSTANTS, $log, $rootScope, UserService, ProfileService, IntroService) {
8+
function HeaderController($state, TcAuthService, CONSTANTS, $log, $rootScope, UserService, ProfileService) {
99
var vm = this;
1010

1111
vm.constants = CONSTANTS;
@@ -89,8 +89,5 @@
8989
$state.go('home');
9090
});
9191
};
92-
93-
// Intro data
94-
vm.introOptions = IntroService.getIntroData($state.$current.name);
9592
}
9693
})();

app/layout/header/header.jade

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,60 @@
1-
// Header container
21
.header-wrapper(ng-class="{'autocomplete': main.searchTerm.length > 0}")
3-
// Main header element
4-
div(ng-intro-options="vm.introOptions", ng-intro-method="launchIntro")
52
header.top-header
63
a.logo-link(href="/")
74
// Header content visible on small screens
85
.show-small.mobile-heading
96
span.tc-text-logo(ng-if="main.menuVisible") [ topcoder ]
7+
108
button.btn-open-menu(type="button", ng-if="!main.menuVisible", ng-click="main.menuVisible = true") Menu
9+
1110
button.btn-close-menu(type="button", ng-if="main.menuVisible", ng-click="main.menuVisible = false")
11+
1212
// User link (profile or join)
1313
a(ui-sref="profile.about({userHandle: vm.userHandle})", ng-switch="vm.isAuth" class="user-link" data-ng-if="!main.menuVisible")
1414
img(ng-switch-when="true", class="user-avatar", ng-src="{{vm.profile.photoURL}}")
15+
1516
span(ng-switch-when="false" class="btn-link") JOIN
1617

17-
// main menu
1818
ul.main-menu
19-
// search container
2019
li.menu-item.search-wrapper
2120
.menu-item-header.show-large #[button.btn-expand-search.search-icon(type="button")]
21+
2222
.submenu
2323
input(type="text" placeholder="find people" ng-model="vm.searchTerm" ng-keyup="vm.checkSubmit($event)")
2424
// Suggestion list container
2525
// ul.suggestion-list(ng-if="main.searchTerm.length > 0")
26-
// li(ng-repeat="suggestion in main.suggestions | filter:main.searchTerm | limitTo:5")
26+
// li(ng-repeat="suggestion in main.suggestions | filter:main.searchTerm | limitTo:5")
2727
// a(href="javascript:;" class="menu-link") {{suggestion}}
2828
29-
// user menu
3029
li.menu-item.link-group.user-menu(ng-switch="vm.isAuth", ng-class="{'anonymous-menu': !vm.isAuth}")
3130
// links for logged in user
3231
div(ng-switch-when="true")
3332
.menu-item-header
3433
span(ui-sref="profile.about({userHandle: vm.userHandle})")
3534
img(class="user-avatar", ng-src="{{vm.profile.photoURL}}")
35+
3636
span.username {{vm.userHandle}}
37+
3738
a.btn-link.btn-edit-profile.show-small(ui-sref="settings.profile") EDIT
39+
3840
ul.submenu
3941
header-menu-item(ng-repeat="item in vm.userMenu" item="item")
42+
4043
li.submenu-item
4144
a.menu-link(ng-click="vm.logout(); main.menuVisible = vm.isAuth = false")
4245
img.menu-icon(ng-src="/images/nav/logout.svg")
4346
.menu-text LOG OUT
47+
4448
// links for anonymous user
4549
.menu-item-header(ng-switch-when="false")
4650
a.btn-link(ui-sref="register") REGISTER
51+
4752
a.btn-link.secondary-link(ui-sref="login") LOGIN
48-
a(ng-click="launchIntro();", ng-show="!!vm.introOptions") Intro
53+
54+
//- a(ng-click="launchIntro();", ng-show="!!vm.introOptions") Intro
4955
5056
li.menu-item.link-group(ng-repeat="(menu, items) in vm.menuLinks")
5157
.menu-item-header {{menu}}
58+
5259
ul.submenu
5360
header-menu-item(ng-repeat="item in items" item="item")

app/layout/layout.module.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(function() {
22
'use strict';
33

4-
var dependencies = ['angular-intro'];
4+
var dependencies = [];
55

66
angular.module('tc.layout', dependencies);
77

app/my-dashboard/my-challenges/my-challenges.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ section.hasChallenges(ng-if="vm.userHasChallenges && !vm.loading", ng-class="{ '
4545

4646
challenge-tile(ng-repeat="challenge in vm.myChallenges | orderBy:registrationEndDate:true", challenge="challenge", view="vm.challengeView", ng-class="vm.challengeView + '-view'")
4747

48-
.my-challenges-links(ng-if="vm.userHasChallenges && !vm.loading")
48+
.my-challenges-links(id="viewAllChallenges", ng-if="vm.userHasChallenges && !vm.loading")
4949
a(ui-sref="my-challenges({status: 'active'})") View All Active Challenges
5050

5151
a(ui-sref="my-challenges({status: 'completed'})") View All Past Challenges

app/profile/about/about.jade

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
.description You can add languages, environments, frameworks, libraries, platforms, tools, and any other technologies that you know well.
2626

2727
button.link-button(ui-sref="settings.profile") ADD SKILLS
28-
29-
tc-section(id="tcActivity", ng-show="vm.displaySection.stats", state="profileVm.status.stats")
28+
29+
tc-section(ng-show="vm.displaySection.stats", state="profileVm.status.stats")
3030

3131
.categories
3232

33-
h3.activity Activity on Topcoder
33+
h3.activity(id="tcActivity") Activity on Topcoder
3434

3535
.empty-state(ng-if="!profileVm.numProjects")
3636
.action-text Start competing within the community

app/profile/subtrack/data/data.jade

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.data.develop(ng-if="vm.track == 'DATA_SCIENCE'")
22
.top
3-
ul.horizontal-stats
3+
ul.horizontal-stats(id="subtrack-stats")
44
li.stat(ng-if="vm.typeStats.rank.rating")
55
.value.rating(style="color: {{vm.typeStats.rank.rating | ratingColor}}") {{vm.typeStats.rank.rating}}
66
span.square(style="background-color: {{vm.typeStats.rank.rating | ratingColor}}")
@@ -27,11 +27,11 @@
2727
.name WINS
2828

2929
.tabs
30-
a.left(id="stats", ng-click="vm.viewing = 'stats'",
30+
a.left(id="statistics-tab", ng-click="vm.viewing = 'stats'",
3131
ng-class="vm.viewing == 'stats' ? 'selected' : ''"
3232
) Statistics
3333

34-
a.right(id="challenges", ng-click="vm.viewing = 'challenges'",
34+
a.right(id="challenges-tab", ng-click="vm.viewing = 'challenges'",
3535
ng-class="vm.viewing == 'challenges' ? 'selected' : ''"
3636
)
3737
span(ng-show="vm.subTrack == 'SRM'") Past SRMs

app/profile/subtrack/design/design.jade

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.design(ng-if="vm.track == 'DESIGN'")
22
.top
3-
ul.horizontal-stats
3+
ul.horizontal-stats(id="subtrack-stats")
44
li.stat(ng-if="vm.typeStats.wins")
55
.value(style="color: #21B2F1") {{vm.typeStats.wins}}
66
.name WINS
@@ -14,14 +14,11 @@
1414
.name CHALLENGES
1515

1616
.tabs
17-
a.right.selected(
18-
) Challenges
17+
a.right.selected(id="challenges-tab") Challenges
1918

2019
hr
2120

22-
tc-section(
23-
state="vm.status.challenges"
24-
)
21+
tc-section(state="vm.status.challenges")
2522
tc-paginator(data="vm.challenges", page-params="vm.pageParams")
2623
.challenges
2724
.challenge.tile(ng-repeat="challenge in vm.challenges")

app/profile/subtrack/develop/develop.jade

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.develop(ng-if="vm.track == 'DEVELOP'")
22
.top
3-
ul.horizontal-stats
3+
ul.horizontal-stats(id="subtrack-stats")
44
li.stat(ng-if="vm.typeStats.rank.rating")
55
.value.rating(style="color: {{vm.typeStats.rank.rating | ratingColor}}") {{vm.typeStats.rank.rating | empty}}
66
span.square(ng-if="vm.typeStats.rank.rating", style="background-color: {{vm.typeStats.rank.rating | ratingColor}}")
@@ -31,20 +31,17 @@
3131
.name RELIABILITY
3232

3333
.tabs
34-
a.left(id="stats", ng-click="vm.viewing = 'stats'",
34+
a.left(id="statistics-tab", ng-click="vm.viewing = 'stats'",
3535
ng-class="vm.viewing == 'stats' ? 'selected' : ''"
3636
) Statistics
3737

38-
a.right(id="challenges", ng-click="vm.viewing = 'challenges'",
38+
a.right(id="challenges-tab", ng-click="vm.viewing = 'challenges'",
3939
ng-class="vm.viewing == 'challenges' ? 'selected' : ''"
4040
) Challenges
4141

4242
hr
4343

44-
tc-section(
45-
ng-show="vm.viewing == 'challenges'",
46-
state="vm.status.challenges"
47-
)
44+
tc-section(ng-show="vm.viewing == 'challenges'", state="vm.status.challenges")
4845
tc-paginator(data="vm.challenges", page-params="vm.pageParams")
4946
.challenges
5047
.challenge.tile(ng-repeat="challenge in vm.challenges")
@@ -89,7 +86,7 @@
8986
li
9087
.left Submission Rate
9188
.right {{vm.typeStats.submissions.submissionRate | percentage | empty}}
92-
89+
9390
li(ng-if="profileVm.isUser")
9491
.left Passed Screening
9592
.right {{vm.typeStats.submissions.passedScreening | empty}}

app/profile/subtrack/subtrack.jade

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
.profile-subtrack-container(ng-cloak, ng-show="profileVm.status.stats === 'ready'")
2-
32
.nav
43
a(ui-sref="profile.about({userHandle: profileVm.profile.handle})")
54
img.arrow(ng-src="/images/ico-arrow-big-left.svg")
65

76
.breadcrumbs
87
.handle
98
img.profile-circle(fallback-src="/images/avatarPlaceholder.png", ng-src="{{profileVm.profile.photoURL}}")
9+
1010
a(ui-sref="profile.about({userHandle: profileVm.profile.handle})")
1111
| {{vm.userHandle}}
1212
| / 
13+
1314
.track {{vm.track | track}}
15+
1416
.subtrack  // {{vm.subTrack | track}}
1517

1618
.right
17-
i(class="fa fa-th", ng-click="vm.showNav()")
19+
i.fa.fa-th(ng-click="vm.showNav()")
1820

1921
include ./develop/develop.jade
2022
include ./design/design.jade

0 commit comments

Comments
 (0)