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

Commit 65e70a4

Browse files
committed
Merge pull request #96 from appirio-tech/vikas-sup-674-shrink-header
SUP-674, Shrink header
2 parents ecf9854 + e4ad544 commit 65e70a4

File tree

7 files changed

+21
-15
lines changed

7 files changed

+21
-15
lines changed

src/css/my-dashboard.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@
111111
background-position: 50% 50%;
112112
color: #fff;
113113
}
114+
@media only screen and (min-width: 768px) {
115+
.member-profile-header {
116+
padding: 15px 0;
117+
}
118+
}
114119

115120
.member-profile {
116121
}

src/js/app/my-dashboard/head.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
<html lang="en" itemscope itemtype="http://schema.org/Article" ng-app="myDashboard" ng-controller="MyDashboardCtrl as vm">
1+
<html lang="en" itemscope itemtype="http://schema.org/Article" ng-app="myDashboard" ng-controller="MyDashboardCtrl as db">
22
<head>
3-
<title ng-bind="vm.title"></title>
3+
<title ng-bind="db.title"></title>

src/js/app/my-dashboard/index.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@@header
22

3-
<div ng-show="vm.loggedIn && vm.user" class="content">
3+
<div ng-show="db.loggedIn && db.user" class="content">
44
<style>
55
/* CSS to override bootstrap and existing css conflicts*/
66
body {
@@ -32,7 +32,7 @@
3232
</style>
3333
<div class="jumbotron my-dashboard-container member-profile-header">
3434
<div class="container">
35-
<div class="welcome-back" ng-include="vm.getTemplateURL('welcome-back.html')">
35+
<div class="welcome-back" ng-include="db.getTemplateURL('welcome-back.html')">
3636
</div>
3737
</div>
3838
</div>
@@ -41,21 +41,21 @@
4141
<div class="clearfix visible-md-block visible-lg-block"></div>
4242
<div class="row">
4343
<div class="col-xs-12 col-sm-8 col-sm-push-4 col-md-9 col-md-push-3">
44-
<!--<div class="my-dashboard-widget marketing-message" ng-include="vm.getTemplateURL('marketing-message.html')">
44+
<!--<div class="my-dashboard-widget marketing-message" ng-include="db.getTemplateURL('marketing-message.html')">
4545
</div>-->
46-
<div class="my-dashboard-widget my-challenges" ng-include="vm.getTemplateURL('my-challenges.html')">
46+
<div class="my-dashboard-widget my-challenges" ng-include="db.getTemplateURL('my-challenges.html')" ng-controller="MyChallengesCtrl as vm" ng-show="vm.renderWidget">
4747
</div>
48-
<div class="my-dashboard-widget srm-gadget" ng-include="vm.getTemplateURL('upcaming-srms.html')">
48+
<div class="my-dashboard-widget srm-gadget" ng-include="db.getTemplateURL('upcaming-srms.html')">
4949
</div>
5050
</div>
5151
<div class="col-xs-12 col-sm-4 col-sm-pull-8 col-md-3 col-md-pull-9">
52-
<div class="my-dashboard-widget member-program" ng-include="vm.getTemplateURL('member-program.html')">
52+
<div class="my-dashboard-widget member-program" ng-include="db.getTemplateURL('member-program.html')">
5353
</div>
54-
<div class="my-dashboard-widget helpful-links" ng-include="vm.getTemplateURL('helpful-links.html')">
54+
<div class="my-dashboard-widget helpful-links" ng-include="db.getTemplateURL('helpful-links.html')">
5555
</div>
56-
<div class="my-dashboard-widget subscribe-updates" ng-include="vm.getTemplateURL('subscribe-updates.html')">
56+
<div class="my-dashboard-widget subscribe-updates" ng-include="db.getTemplateURL('subscribe-updates.html')">
5757
</div>
58-
<div class="my-dashboard-widget blog-post" ng-include="vm.getTemplateURL('blog-feed.html')">
58+
<div class="my-dashboard-widget blog-post" ng-include="db.getTemplateURL('blog-feed.html')">
5959
</div>
6060
</div>
6161
</div>

src/js/app/my-dashboard/js/controllers/member-program-controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
vm.registerUser = registerUser;
4747

4848
// parent dashboard controller
49-
var db = $scope.$parent.vm;
49+
var db = $scope.$parent.db;
5050

5151
// activate controller
5252
if (AuthService.isLoggedIn === true) {

src/js/app/my-dashboard/js/controllers/my-challenges-controller.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
vm.isCurrentPage = isCurrentPage;
4949
vm.getCurrentPageClass = getCurrentPageClass;
5050
vm.sort = sort;
51+
vm.renderWidget = false;
5152

5253
// getChallenges controller
5354
if (AuthService.isLoggedIn === true) {
@@ -83,7 +84,7 @@
8384
processChallengesResponse(data);
8485
// stop loading icon
8586
vm.loading = false;
86-
87+
vm.renderWidget = vm.myChallenges && vm.myChallenges.length > 0;
8788
});
8889
}
8990

src/js/app/my-dashboard/js/controllers/welcome-back-controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
vm.statsToShow = 2;
4646

4747
// parent dashboard controller
48-
var db = $scope.$parent.vm;
48+
var db = $scope.$parent.db;
4949

5050
// activate controller
5151
if (AuthService.isLoggedIn === true) {

src/js/app/my-dashboard/partials/my-challenges.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div ng-controller="MyChallengesCtrl as vm" >
1+
<div>
22
<div class="widget-content">
33
<div class="challenges-header clearfix">
44
<div class="pull-left"><strong>My Challenges</strong></div>

0 commit comments

Comments
 (0)