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

Dev #185

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
27 changes: 14 additions & 13 deletions src/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ <h2>Comment Examples</h2>
return {
restrict: 'C',
templateUrl: tcconfig.mainURL + '/mf/js/app/header/partials/header-nav.html',
controller: function($scope){
controller: function($scope, $timeout){
$scope.vm = vm = {};
$scope.main = {};
$scope.main.menuVisible = false;
Expand All @@ -174,12 +174,20 @@ <h2>Comment Examples</h2>
} else {
photoLink = tcconfig.communityURL + '/i/m/nophoto_login.gif';
}
//vm.photoURL = photoLink;
$('.user-avatar').attr('src', photoLink);
$timeout(function() {
vm.photoURL = photoLink;
});
});

$timeout(function() {
vm.userHandle = handle;
vm.userMenu = [
{ 'href': '/my-dashboard', 'text': 'DASHBOARD', 'icon': '/mf/i/nav/dashboard.svg' },
{ 'href': '/members/' + handle, 'text': 'MY PROFILE', 'icon': '/mf/i/nav/badge.svg' },
{ 'href': 'https:' + tcconfig.communityURL + '/PactsMemberServlet?module=PaymentHistory&full_list=false', 'text': 'PAYMENTS', 'icon': '/mf/i/nav/money-bag.svg', 'target': '_blank' },
{ 'href': '/settings/profile', 'text': 'SETTINGS', 'icon': '/mf/i/nav/gear.svg' },
];
});
//vm.userHandle = handle;
$('.username').html(handle);
$('.profile-link').attr('href', '/members/' + handle);
});
}

Expand Down Expand Up @@ -208,13 +216,6 @@ <h2>Comment Examples</h2>
]
};

vm.userMenu = [
{ 'href': '/my-dashboard', 'text': 'DASHBOARD', 'icon': '/mf/i/nav/dashboard.svg' },
{ 'href': '/profile', 'text': 'MY PROFILE', 'icon': '/mf/i/nav/badge.svg', 'class': 'profile-link' },
{ 'href': 'https:' + tcconfig.communityURL + '/PactsMemberServlet?module=PaymentHistory&full_list=false', 'text': 'PAYMENTS', 'icon': '/mf/i/nav/money-bag.svg', 'target': '_blank' },
{ 'href': '/settings/profile', 'text': 'SETTINGS', 'icon': '/mf/i/nav/gear.svg' },
];

vm.checkSubmit = function(ev) {
if (ev.keyCode === 13)
window.location.replace(tcconfig.mainURL + '/search?s=' + vm.searchTerm + '&scope=member');
Expand Down
6 changes: 3 additions & 3 deletions src/js/app/header/partials/header-nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="show-small mobile-heading"><span ng-if="main.menuVisible" class="tc-text-logo">[ topcoder ]</span>
<button type="button" ng-if="!main.menuVisible" ng-click="main.menuVisible = true" class="btn-open-menu">Menu</button>
<button type="button" ng-if="main.menuVisible" ng-click="main.menuVisible = false" class="btn-close-menu"></button>
<a href='' ng-switch="vm.isAuth" data-ng-if="!main.menuVisible" class="user-link profile-link"><img ng-switch-when="true" ng-src="{{vm.profile.photoURL}}" class="user-avatar"/><span ng-switch-when="false" class="btn-link">JOIN</span></a>
<a ng-href={{vm.profileLink}} ng-switch="vm.isAuth" data-ng-if="!main.menuVisible" class="user-link"><img ng-switch-when="true" ng-src="{{vm.photoURL}}" class="user-avatar"/><span ng-switch-when="false" class="btn-link">JOIN</span></a>
</div>
<ul class="main-menu">
<li class="menu-item search-wrapper">
Expand All @@ -18,15 +18,15 @@
<li ng-switch="vm.isAuth" ng-class="{'anonymous-menu': !vm.isAuth}" class="menu-item link-group user-menu">
<div ng-switch-when="true">
<div class="menu-item-header">
<a href='' class="profile-link profile-link-dropdown">
<a ng-href={{vm.profileLink}} class="profile-link-dropdown">
<img ng-src="{{vm.photoURL}}" class="user-avatar"/>
<span class="username">{{vm.userHandle}}</span>
</a>
</div>
<a href="/settings/profile" class="btn-link btn-edit-profile show-small">EDIT</a>
<ul class="submenu">
<li class="submenu-item" ng-repeat="item in vm.userMenu">
<a ng-href="{{item.href}}" ng-class="{ 'active': vm.isActive(item.href), 'profile-link': item.class == 'profile-link' }" class="menu-link" target="{{ item.target ? item.target : '_self'}}">
<a ng-href="{{item.href}}" ng-class="{ 'active': vm.isActive(item.href) }" class="menu-link" target="{{ item.target ? item.target : '_self'}}">
<img ng-src="{{item.icon}}" class="menu-icon"/>
<div class="menu-text">{{item.text}}</div>
</a>
Expand Down
27 changes: 14 additions & 13 deletions wp/wp-content/themes/tcs-responsive/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ function _kms(u){
return {
restrict: 'C',
templateUrl: tcconfig.mainURL + '/mf/js/app/header/partials/header-nav.html',
controller: function($scope){
controller: function($scope, $timeout){
$scope.vm = vm = {};
$scope.main = {};
$scope.main.menuVisible = false;
Expand All @@ -256,12 +256,20 @@ function _kms(u){
} else {
photoLink = tcconfig.communityURL + '/i/m/nophoto_login.gif';
}
//vm.photoURL = photoLink;
$('.user-avatar').attr('src', photoLink);
$timeout(function() {
vm.photoURL = photoLink;
});
});

$timeout(function() {
vm.userHandle = handle;
vm.userMenu = [
{ 'href': '/my-dashboard', 'text': 'DASHBOARD', 'icon': '/mf/i/nav/dashboard.svg' },
{ 'href': '/members/' + handle, 'text': 'MY PROFILE', 'icon': '/mf/i/nav/badge.svg' },
{ 'href': 'https:' + tcconfig.communityURL + '/PactsMemberServlet?module=PaymentHistory&full_list=false', 'text': 'PAYMENTS', 'icon': '/mf/i/nav/money-bag.svg', 'target': '_blank' },
{ 'href': '/settings/profile', 'text': 'SETTINGS', 'icon': '/mf/i/nav/gear.svg' },
];
});
//vm.userHandle = handle;
$('.username').html(handle);
$('.profile-link').attr('href', '/members/' + handle);
});
}

Expand Down Expand Up @@ -290,13 +298,6 @@ function _kms(u){
]
};

vm.userMenu = [
{ 'href': '/my-dashboard', 'text': 'DASHBOARD', 'icon': '/mf/i/nav/dashboard.svg' },
{ 'href': '/profile', 'text': 'MY PROFILE', 'icon': '/mf/i/nav/badge.svg', 'class': 'profile-link' },
{ 'href': 'https:' + tcconfig.communityURL + '/PactsMemberServlet?module=PaymentHistory&full_list=false', 'text': 'PAYMENTS', 'icon': '/mf/i/nav/money-bag.svg', 'target': '_blank' },
{ 'href': '/settings/profile', 'text': 'SETTINGS', 'icon': '/mf/i/nav/gear.svg' },
];

vm.checkSubmit = function(ev) {
if (ev.keyCode === 13)
window.location.replace(tcconfig.mainURL + '/search?s=' + vm.searchTerm + '&scope=member');
Expand Down
1 change: 0 additions & 1 deletion wp/wp-content/themes/tcs-responsive/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -529,4 +529,3 @@ function autoplay_youtube($html, $url, $args) {


?>