Hidden user tabs if only basic info is available
This commit is contained in:
parent
1a41e60515
commit
4c3bc0004b
2 changed files with 6 additions and 3 deletions
|
@ -72,12 +72,11 @@ App.Presenters.UserPresenter = function(
|
||||||
function changeTab(targetTab) {
|
function changeTab(targetTab) {
|
||||||
var $link = $el.find('a[data-tab=' + targetTab + ']');
|
var $link = $el.find('a[data-tab=' + targetTab + ']');
|
||||||
var $links = $link.closest('ul').find('a[data-tab]');
|
var $links = $link.closest('ul').find('a[data-tab]');
|
||||||
var tab = $link.attr('data-tab');
|
var $tabs = $el.find('.tab-wrapper').find('.tab');
|
||||||
var $tabs = $link.closest('.tab-wrapper').find('.tab');
|
|
||||||
$links.removeClass('active');
|
$links.removeClass('active');
|
||||||
$link.addClass('active');
|
$link.addClass('active');
|
||||||
$tabs.removeClass('active');
|
$tabs.removeClass('active');
|
||||||
$tabs.filter('[data-tab=' + tab + ']').addClass('active');
|
$tabs.filter('[data-tab=' + targetTab + ']').addClass('active');
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
<%= user.name %>
|
<%= user.name %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<% if ((canChangeBrowsingSettings || canChangeAccountSettings || canDeleteAccount)) { %>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href="#/user/<%= user.name %>" data-tab="basic-info">Basic information</a>
|
<a href="#/user/<%= user.name %>" data-tab="basic-info">Basic information</a>
|
||||||
|
@ -31,6 +33,8 @@
|
||||||
</li>
|
</li>
|
||||||
<% } %>
|
<% } %>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab basic-info" data-tab="basic-info">
|
<div class="tab basic-info" data-tab="basic-info">
|
||||||
|
|
Loading…
Reference in a new issue