Handle save-as on pane. Replace 'editor:save-as' w/ 'core:save-as'

Pane will only show the saveAs dialog if the item has a `saveAs` method.
This commit is contained in:
Nathan Sobo
2013-02-28 18:00:04 -07:00
committed by probablycorey
parent 59a06acc0b
commit 3f9ee08e76
5 changed files with 33 additions and 10 deletions

View File

@@ -152,7 +152,6 @@ class Editor extends View
'core:select-down': @selectDown
'core:select-to-top': @selectToTop
'core:select-to-bottom': @selectToBottom
'editor:save-as': @saveAs
'editor:newline-below': @insertNewlineBelow
'editor:newline-above': @insertNewlineAbove
'editor:toggle-soft-tabs': @toggleSoftTabs
@@ -610,12 +609,6 @@ class Editor extends View
@removeClass 'soft-wrap'
$(window).off 'resize', @_setSoftWrapColumn
saveAs: (session=@activeEditSession, onSuccess) ->
atom.showSaveDialog (path) =>
if path
session.saveAs(path)
onSuccess?()
autosave: ->
@save() if @getPath()?