added relative_path

v1.18.x
Baris Soner Usakli 11 years ago
parent c3f7faffd3
commit e5ec5242c6

@ -29,11 +29,11 @@ define(function() {
AccountHeader.createMenu = function() { AccountHeader.createMenu = function() {
var userslug = $('.account-username-box').attr('data-userslug'); var userslug = $('.account-username-box').attr('data-userslug');
var links = $('<div class="account-sub-links inline-block pull-right">\ var links = $('<div class="account-sub-links inline-block pull-right">\
<span id="settingsLink" class="pull-right"><a href="/user/' + userslug + '/settings">settings</a></span>\ <span id="settingsLink" class="pull-right"><a href="' + RELATIVE_PATH + '/user/' + userslug + '/settings">settings</a></span>\
<span id="favouritesLink" class="pull-right"><a href="/user/' + userslug + '/favourites">favourites</a></span>\ <span id="favouritesLink" class="pull-right"><a href="' + RELATIVE_PATH + '/user/' + userslug + '/favourites">favourites</a></span>\
<span class="pull-right"><a href="/user/' + userslug + '/followers">followers</a></span>\ <span class="pull-right"><a href="' + RELATIVE_PATH + '/user/' + userslug + '/followers">followers</a></span>\
<span class="pull-right"><a href="/user/' + userslug + '/following">following</a></span>\ <span class="pull-right"><a href="' + RELATIVE_PATH + '/user/' + userslug + '/following">following</a></span>\
<span id="editLink" class="pull-right"><a href="/user/' + userslug + '/edit">edit</a></span>\ <span id="editLink" class="pull-right"><a href="' + RELATIVE_PATH + '/user/' + userslug + '/edit">edit</a></span>\
</div>'); </div>');
$('.account-username-box').append(links); $('.account-username-box').append(links);

@ -39,7 +39,7 @@
if (userLabel.length) { if (userLabel.length) {
if (data['userslug']) if (data['userslug'])
userLabel.find('#user-profile-link').attr('href', '/user/' + data['userslug']); userLabel.find('#user-profile-link').attr('href', RELATIVE_PATH + '/user/' + data['userslug']);
if (data['picture']) if (data['picture'])
userLabel.find('img').attr('src', data['picture']); userLabel.find('img').attr('src', data['picture']);
if (data['username']) if (data['username'])

@ -74,7 +74,7 @@
</a> </a>
<ul id="user-control-list" class="dropdown-menu" aria-labelledby="user_dropdown"> <ul id="user-control-list" class="dropdown-menu" aria-labelledby="user_dropdown">
<li> <li>
<a id="user-profile-link" href="/user/{userslug}" target="_top"><span>Profile</span></a> <a id="user-profile-link" href="{relative_path}/user/{userslug}" target="_top"><span>Profile</span></a>
</li> </li>
<li id="logout-link"> <li id="logout-link">
<a href="#">Log out</a> <a href="#">Log out</a>

Loading…
Cancel
Save