diff --git a/app/profile/develop/develop.controller.js b/app/profile/develop/develop.controller.js index d45e93434..a52796786 100644 --- a/app/profile/develop/develop.controller.js +++ b/app/profile/develop/develop.controller.js @@ -13,6 +13,7 @@ vm.domain = CONSTANTS.domain; vm.challenges = []; vm.profile = {}; + vm.loading = true; activate(); @@ -28,6 +29,9 @@ vm.challenges = data; }); }); + if (vm.altResolve) { + vm.deferred.resolve(vm); + } } } diff --git a/app/profile/develop/develop.jade b/app/profile/develop/develop.jade index 271ffb262..cb2540e83 100644 --- a/app/profile/develop/develop.jade +++ b/app/profile/develop/develop.jade @@ -1,4 +1,4 @@ -.profile-develop-container +.profile-develop-container(ng-hide='vm.loading', ng-cloak) hr h1.type Develop: {{vm.subTrack}} hr @@ -33,6 +33,9 @@ challenge-tile(challenge="challenge", domain="vm.domain") .stats(ng-show="vm.viewing == 'stats'") + .graphs + img(src="images/rating-graphs.png") + h2.detailed Detailed Stats ul.vertical-stats diff --git a/app/profile/profile.controller.js b/app/profile/profile.controller.js index eedaf3b58..d932c3b7d 100644 --- a/app/profile/profile.controller.js +++ b/app/profile/profile.controller.js @@ -12,6 +12,7 @@ vm.title = "Profile"; vm.message = "Message" vm.profile = {}; + vm.loading = true; vm.userHandle = userHandle; activate(vms); @@ -42,12 +43,24 @@ // until horizontal scroll is implemented vm.skills = skills.skills; vm.categories = ProfileService.getRanks(vm.stats); + vm.loading = false; }); }); } - $scope.initProfile = function(vm) { - vms.push(vm); + $scope.initProfile = function(newVm) { + if (!vm.stats) { + vms.push(newVm); + } else { + newVm.profile = vm.profile; + newVm.stats = vm.stats; + newVm.numProjects = vm.numProjects; + newVm.numWins = vm.numWins; + newVm.skills = vm.skills; + newVm.categories = vm.categories; + newVm.altResolve = true; + newVm.loading = false; + } } } diff --git a/app/profile/profile.jade b/app/profile/profile.jade index 6a14de3eb..f83a19763 100644 --- a/app/profile/profile.jade +++ b/app/profile/profile.jade @@ -1,7 +1,7 @@ -.profile-header-container +.profile-header-container(ng-hide="vm.loading", ng-cloak) .left profile-widget(profile="vm.profile", edit-profile-link="vm.showEditProfileLink") .right h4 member for {{vm.tenure}} years -ui-view +ui-view(ng-hide="vm.loading", ng-cloak) diff --git a/assets/css/profile/develop.scss b/assets/css/profile/develop.scss index 100bd5a68..10ac1c204 100644 --- a/assets/css/profile/develop.scss +++ b/assets/css/profile/develop.scss @@ -6,6 +6,14 @@ font-size: 18px; } .stats { + .graphs { + display: flex; + flex-direction: row; + justify-content: center; + img { + width: 700px; + } + } h2.detailed { margin: 50px auto 25px auto; text-align: center; diff --git a/assets/images/rating-graphs.png b/assets/images/rating-graphs.png new file mode 100644 index 000000000..18246bf01 Binary files /dev/null and b/assets/images/rating-graphs.png differ