fix new tab link
parent
ae9f4608dc
commit
451125de35
|
@ -70,18 +70,29 @@ NavigationUrlsDirective = ($navurls, $auth, $q, $location) ->
|
|||
return [name, options]
|
||||
|
||||
link = ($scope, $el, $attrs) ->
|
||||
$el.on "click", (event) ->
|
||||
event.preventDefault()
|
||||
|
||||
parseNav($attrs.tgNav, $scope).then (result) ->
|
||||
[name, options] = result
|
||||
user = $auth.getUser()
|
||||
options.user = user.username if user
|
||||
|
||||
url = $navurls.resolve(name)
|
||||
|
||||
fullUrl = $navurls.formatUrl(url, options)
|
||||
|
||||
$el.data("fullUrl", fullUrl)
|
||||
|
||||
if $el.is("a")
|
||||
$el.attr("href", fullUrl)
|
||||
|
||||
$el.on "click", (event) ->
|
||||
event.preventDefault()
|
||||
|
||||
fullUrl = $(event.currentTarget).data('fullUrl')
|
||||
|
||||
if event.which != 2
|
||||
$location.url(fullUrl)
|
||||
$scope.$apply()
|
||||
else
|
||||
window.open fullUrl
|
||||
|
||||
$scope.$on "$destroy", ->
|
||||
$el.off()
|
||||
|
|
|
@ -105,7 +105,7 @@ ProjectMenuDirective = ($log, $compile, $auth, $rootscope, $tgAuth, $location) -
|
|||
</a>
|
||||
</li>
|
||||
<% if (project.is_backlog_activated && project.my_permissions.indexOf("view_us") != -1) { %>
|
||||
<li id="nav-backlog" tg-nav="project-backlog:project=project.slug">
|
||||
<li id="nav-backlog">
|
||||
<a href="" title="Backlog" tg-nav="project-backlog:project=project.slug">
|
||||
<span class="icon icon-backlog"></span>
|
||||
<span class="item">Backlog</span>
|
||||
|
|
Loading…
Reference in New Issue