mirror of
https://github.com/atom/atom.git
synced 2026-02-08 05:35:04 -05:00
plugins/ (not working yet)
This commit is contained in:
@@ -149,4 +149,9 @@ bindKey 'consolelog', 'Ctrl-L', (env) ->
|
||||
env.editor.navigateLeft()
|
||||
|
||||
bindKey 'toggleProjectDrawer', 'Command-Ctrl-N', (env) ->
|
||||
Project.toggle()
|
||||
Project.toggle()
|
||||
|
||||
|
||||
## load plugins
|
||||
plugins = _.map Dir.list("./plugins"), (plugin) ->
|
||||
require plugin
|
||||
@@ -1,13 +0,0 @@
|
||||
$ = require 'jquery'
|
||||
|
||||
$ ->
|
||||
dir = OSX.NSFileManager.defaultManager.currentDirectoryPath
|
||||
$('#cwd').text(dir)
|
||||
|
||||
files = Dir.list(dir)
|
||||
files = _.map files, (file) ->
|
||||
listItems = _.map files, (file) ->
|
||||
file = file.replace(dir, "")
|
||||
"<li>#{file}</li>"
|
||||
|
||||
$('#files').append(listItems.join('\n'))
|
||||
@@ -1,31 +0,0 @@
|
||||
$ = require 'jquery'
|
||||
|
||||
{Chrome, File, Dir, Process} = require 'osx'
|
||||
|
||||
exports.show = ->
|
||||
root = OSX.NSBundle.mainBundle.resourcePath + '/HTML/'
|
||||
tabs = OSX.NSString.stringWithContentsOfFile "#{root}/tabs.html"
|
||||
edit = OSX.NSString.stringWithContentsOfFile "#{root}/editor.html"
|
||||
|
||||
Chrome.addPane 'main', tabs.replace '<%= editor %>', edit
|
||||
|
||||
# events
|
||||
$('#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