mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
Move open .atom button to config menu
This commit is contained in:
committed by
Corey Johnson & Kevin Sawicki
parent
bd7542cb0a
commit
2d5bb8bd8b
@@ -17,7 +17,9 @@ class ConfigView extends View
|
||||
|
||||
@content: ->
|
||||
@div id: 'config-view', =>
|
||||
@ul id: 'panels-menu', class: 'nav nav-pills nav-stacked', outlet: 'panelMenu'
|
||||
@div id: 'config-menu', =>
|
||||
@ul id: 'panels-menu', class: 'nav nav-pills nav-stacked', outlet: 'panelMenu'
|
||||
@button "open .atom", id: 'open-dot-atom', class: 'btn btn-default btn-small'
|
||||
@div id: 'panels', outlet: 'panels'
|
||||
|
||||
initialize: ->
|
||||
@@ -26,6 +28,9 @@ class ConfigView extends View
|
||||
@on 'click', '#panels-menu li a', (e) =>
|
||||
@showPanel($(e.target).closest('li').attr('name'))
|
||||
|
||||
@on 'click', '#open-dot-atom', ->
|
||||
atom.open(config.configDirPath)
|
||||
|
||||
@addPanel('General', new GeneralConfigPanel)
|
||||
@addPanel('Editor', new EditorConfigPanel)
|
||||
@addPanel('Themes', new ThemeConfigPanel)
|
||||
|
||||
@@ -20,8 +20,3 @@ class GeneralConfigPanel extends ConfigPanel
|
||||
@label for: 'core.autosave', =>
|
||||
@input id: 'core.autosave', type: 'checkbox'
|
||||
@text 'Auto-Save on Focus Change'
|
||||
|
||||
@button outlet: 'openDotAtomButton', type: 'button', class: 'btn btn-default', "Open '#{config.configDirPath}'"
|
||||
|
||||
initialize: ->
|
||||
@openDotAtomButton.on 'click', -> atom.open(config.configDirPath)
|
||||
|
||||
@@ -7,13 +7,25 @@
|
||||
background: white;
|
||||
display: -webkit-flex;
|
||||
|
||||
#panels-menu {
|
||||
width: 150px;
|
||||
margin-top: @line-height-base;
|
||||
margin-left: @line-height-base;
|
||||
#config-menu {
|
||||
display: -webkit-flex;
|
||||
-webkit-flex-direction: column;
|
||||
|
||||
li a {
|
||||
cursor: pointer;
|
||||
#panels-menu {
|
||||
width: 150px;
|
||||
margin-left: @line-height-base;
|
||||
margin-top: @line-height-base;
|
||||
-webkit-flex-grow: 1;
|
||||
|
||||
li a {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
#open-dot-atom {
|
||||
width: 150px;
|
||||
margin-left: @line-height-base;
|
||||
margin-bottom: @line-height-base;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user