mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
omg new tab
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
# nice!
|
||||
|
||||
Chrome.init()
|
||||
|
||||
editor = ace.edit "editor"
|
||||
|
||||
@@ -16,11 +16,22 @@ if false
|
||||
$(this).removeAttr 'style'
|
||||
|
||||
# events
|
||||
$('#tabs ul a').click ->
|
||||
$('#tabs ul li:not(.add) a').live 'click', ->
|
||||
$('#tabs ul .active').removeClass()
|
||||
$(this).parents('li').addClass 'active'
|
||||
|
||||
idx = $('#tabs ul a').index this
|
||||
$('.content iframe').hide().eq(idx).show().focus()
|
||||
|
||||
false
|
||||
|
||||
$('#tabs .add a').click ->
|
||||
$('#tabs ul .active').removeClass()
|
||||
$('#tabs ul .add').before '<li><a href="#">untitled</a></li>'
|
||||
|
||||
$('.content iframe').hide()
|
||||
$('.content').append '<iframe src="editor.html" width="100%" height="100%"></iframe>'
|
||||
|
||||
$('#tabs ul .add').prev().addClass 'active'
|
||||
|
||||
false
|
||||
Reference in New Issue
Block a user