Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.
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
16 changes: 16 additions & 0 deletions src/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,23 @@ <h2>Comment Examples</h2>
} else {
photoLink = tcconfig.communityURL + '/i/m/nophoto_login.gif';
}

var color = '';
var ratings = data['ratingSummary'];
if (ratings) {
var maxRating = 0;
for (var i = 0; i < ratings.length; i++) {
if (maxRating < ratings[i]['rating']) {
maxRating = ratings[i]['rating'];
color = ratings[i]['colorStyle'].split(": ")[1];
}
}
} else if (data['isPM'] == true) {
color = '#FF9900';
}

$timeout(function() {
vm.handleStyle = { color: color };
vm.photoURL = photoLink;
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/js/app/header/partials/header-nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<div class="menu-item-header">
<a ng-href={{vm.profileLink}} class="profile-link-dropdown">
<img ng-src="{{vm.photoURL}}" class="user-avatar"/>
<span class="username">{{vm.userHandle}}</span>
<span ng-style="vm.handleStyle" class="username">{{vm.userHandle}}</span>
</a>
</div>
<a href="/settings/profile" class="btn-link btn-edit-profile show-small">EDIT</a>
Expand Down
16 changes: 16 additions & 0 deletions wp/wp-content/themes/tcs-responsive/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,23 @@ function _kms(u){
} else {
photoLink = tcconfig.communityURL + '/i/m/nophoto_login.gif';
}

var color = '';
var ratings = data['ratingSummary'];
if (ratings) {
var maxRating = 0;
for (var i = 0; i < ratings.length; i++) {
if (maxRating < ratings[i]['rating']) {
maxRating = ratings[i]['rating'];
color = ratings[i]['colorStyle'].split(": ")[1];
}
}
} else if (data['isPM'] == true) {
color = '#FF9900';
}

$timeout(function() {
vm.handleStyle = { color: color };
vm.photoURL = photoLink;
});
});
Expand Down