diff --git a/src/app/config-view.coffee b/src/app/config-view.coffee index db557cee0..0eb1c7a0d 100644 --- a/src/app/config-view.coffee +++ b/src/app/config-view.coffee @@ -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) -> diff --git a/src/app/editor-config-panel.coffee b/src/app/editor-config-panel.coffee index f5b76cf21..31b6eef68 100644 --- a/src/app/editor-config-panel.coffee +++ b/src/app/editor-config-panel.coffee @@ -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' diff --git a/src/app/general-config-panel.coffee b/src/app/general-config-panel.coffee new file mode 100644 index 000000000..f1b2a18a2 --- /dev/null +++ b/src/app/general-config-panel.coffee @@ -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'