Move autosave to general config panel

This commit is contained in:
Nathan Sobo 2013-04-10 18:45:30 -06:00 committed by Corey Johnson & Kevin Sawicki
parent f0cddf9f32
commit ff76911e4c
3 changed files with 11 additions and 5 deletions

View File

@ -1,6 +1,7 @@
{View, $$} = require 'space-pen'
$ = require 'jquery'
_ = require 'underscore'
GeneralConfigPanel = require 'general-config-panel'
EditorConfigPanel = require 'editor-config-panel'
module.exports =
@ -23,7 +24,7 @@ class ConfigView extends View
@on 'click', '#panel-menu li', (e) =>
@showPanel($(e.target).attr('name'))
@addPanel('General', $$ -> @div "General")
@addPanel('General', new GeneralConfigPanel)
@addPanel('Editor', new EditorConfigPanel)
addPanel: (name, panel) ->

View File

@ -24,10 +24,6 @@ class EditorConfigPanel extends ConfigPanel
@label for: 'editor.autoIndentOnPaste', "Auto Indent on Paste:"
@input id: 'editor.autoIndentOnPaste', type: 'checkbox'
@div class: 'row', =>
@label for: 'editor.autosave', "Autosave on Unfocus:"
@input id: 'editor.autosave', type: 'checkbox'
@div class: 'row', =>
@label for: 'editor.showInvisibles', "Show Invisible Characters:"
@input id: 'editor.showInvisibles', type: 'checkbox'

View File

@ -0,0 +1,9 @@
ConfigPanel = require 'config-panel'
module.exports =
class GeneralConfigPanel extends ConfigPanel
@content: ->
@div class: 'config-panel', =>
@div class: 'row', =>
@label for: 'core.autosave', "Autosave on Unfocus:"
@input id: 'core.autosave', type: 'checkbox'