tabs-pane calls window.open

This commit is contained in:
Chris Wanstrath
2011-11-12 15:48:37 -08:00
parent c2137e602e
commit e55e237e60

View File

@@ -18,14 +18,14 @@ class TabsPane extends Pane
# click tab
tabPane = this
$('#tabs ul li').live 'mousedown', ->
tabPane.switchToTab this
window.open $(this).data 'path'
false
nextTab: ->
@switchToTab $('#tabs ul .active').next()
window.open $('#tabs ul .active').next().data 'path'
prevTab: ->
@switchToTab $('#tabs ul .active').prev()
window.open $('#tabs ul .active').prev().data 'path'
switchToTab: (tab) ->
tab = $("#tabs ul li").get(tab - 1) if _.isNumber tab
@@ -35,7 +35,6 @@ class TabsPane extends Pane
path = $(tab).data 'path'
$("#tabs ul .active").removeClass("active")
$(tab).addClass 'active'
window.open path
addTab: (path) ->
existing = $("#tabs [data-path='#{path}']")