Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Add 'Rename' and 'Show in Tree' to working set context menu #1919

Merged
merged 2 commits into from
Oct 23, 2012

Conversation

peterflynn
Copy link
Member

  • Change ProjectManager.renameSelectedItem() -> renameItemInline(entry) so the item doesn't have to be selected in the tree UI.
  • Fix ProjectManager._findTreeNode() (and thus showInTree()) to work for folders
  • showInTree() now returns its Promise for tracking

Note: the diff in ProjectManager has a large block indentation change, so it might be helpful to view the diff with ?w=1 appended to the URL.

@gruehle: since you added Rename originally, I thought you might like to review?

* Change ProjectManager.renameSelectedItem() -> renameItemInline(entry) so
the item doesn't have to be selected in the tree UI.
* Fix ProjectManager._findTreeNode() (and thus showInTree()) to work for folders
* showInTree() now returns its Promise for tracking
})
.fail(function (err) {
// Error during rename. Reset to the old name and alert the user.
_projectTree.one("rename.jstree", function (event, data) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note small cleanup here: using one() in place of on() with immediate off().

@ghost ghost assigned gruehle Oct 23, 2012
@@ -767,10 +767,10 @@ define(function (require, exports, module) {


/**
* Returns the tree node corresponding to the given file/folder. Returns null if the path lies
* Finds the tree node corresponding to the given file/folder (rejected if the path lies
* outside the project, or if it doesn't exist.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: missing ")"

@gruehle
Copy link
Member

gruehle commented Oct 23, 2012

Nice additions! Merging.

gruehle added a commit that referenced this pull request Oct 23, 2012
Add 'Rename' and 'Show in Tree' to working set context menu
@gruehle gruehle merged commit 6a262f4 into master Oct 23, 2012
@@ -1166,56 +1176,58 @@ define(function (require, exports, module) {
}

/**
* Rename the selected item in the project tree
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Inline editor" leads me to think of "Quick Edit" type of inline editor that is located in the editor area.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants