Move-dialog overlays the bottom of the RootView instead of appearing next to the element

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-04-27 10:39:55 -06:00
parent d737d97a81
commit 4ca75b02c5
3 changed files with 6 additions and 11 deletions

View File

@@ -306,7 +306,7 @@ describe "TreeView", ->
beforeEach ->
fileElement.click()
treeView.trigger "tree-view:move"
moveDialog = treeView.find(".move-dialog").view()
moveDialog = rootView.find(".move-dialog").view()
it "opens a move dialog with the file's current path populated", ->
expect(moveDialog).toExist()
@@ -316,8 +316,8 @@ describe "TreeView", ->
describe "when the move dialog's editor loses focus", ->
it "removes the dialog", ->
treeView.attachToDom()
treeView.focus()
rootView.attachToDom()
rootView.focus()
expect(moveDialog.parent()).not.toExist()

View File

@@ -72,13 +72,7 @@ class TreeView extends View
@rootView.open(selectedEntry.attr('path'))
move: ->
entry = @selectedEntry()
dialog = new MoveDialog(@rootView.project, entry.attr('path'))
@append dialog
dialog.css
top: entry.position().top + entry.outerHeight() + @scrollTop()
left: 0
@rootView.append(new MoveDialog(@rootView.project, @selectedEntry().attr('path')))
selectedEntry: ->
@find('.selected')

View File

@@ -37,9 +37,10 @@
.move-dialog {
position: absolute;
bottom: 0;
width: 100%;
background-color: #444;
border: 2px solid #222;
-webkit-box-shadow: 0 0 3px 3px rgba(0, 0, 0, .5);
}
}