Add a prompt to the move dialog

This commit is contained in:
Nathan Sobo 2012-04-27 17:27:08 -06:00
parent 69a76d1b47
commit 18ccee32b8
3 changed files with 4 additions and 3 deletions

View File

@ -313,6 +313,7 @@ describe "TreeView", ->
it "opens a move dialog with the file's current path populated", ->
expect(moveDialog).toExist()
expect(moveDialog.prompt.text()).toBe "Enter the new path for the file:"
expect(moveDialog.editor.getText()).toBe(project.relativize(filePath))
expect(moveDialog.editor.getSelectedText()).toBe fs.base(filePath)
expect(moveDialog.editor.isFocused).toBeTruthy()
@ -329,7 +330,6 @@ describe "TreeView", ->
expect(fs.exists(filePath)).toBeFalsy()
expect(moveDialog.parent()).not.toExist()
waitsFor "tree view to update", ->
treeView.root.find('> .entries > .file:contains(renamed-test-file.txt)').length > 0

View File

@ -158,6 +158,7 @@ fs = require 'fs'
class MoveDialog extends View
@content: ->
@div class: 'move-dialog', =>
@div "Enter the new path for the file:", outlet: 'prompt'
@subview 'editor', new Editor(mini: true)
initialize: (@project, @path) ->

View File

@ -39,8 +39,8 @@
position: absolute;
bottom: 0;
width: 100%;
background-color: #444;
background-color: #333;
color: white;
border: 2px solid #222;
-webkit-box-shadow: 0 0 3px 3px rgba(0, 0, 0, .5);
}