From bdd0ce2d894449c29b865a3e2d51e8db6d4ec66a Mon Sep 17 00:00:00 2001 From: Ty Voliter Date: Tue, 24 Jul 2012 11:05:46 -0700 Subject: [PATCH 1/2] fix JSLint Errors and move event comments to correct location in FileViewController. --- src/project/FileViewController.js | 7 +++++++ src/project/WorkingSetView.js | 7 +------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/project/FileViewController.js b/src/project/FileViewController.js index 05e16fad8c1..f60c061d7b5 100644 --- a/src/project/FileViewController.js +++ b/src/project/FileViewController.js @@ -30,6 +30,13 @@ * ProjectManager can show file selection. In general the WorkingSetView takes higher * priority until the user selects a file in the ProjectManager. * + * Events dispatched: + * - documentSelectionFocusChange - indicates a document change has caused the focus to + * change between the working set and file tree. + * + * - fileViewFocusChange - indicates the selection focus has changed between the working + * set and the project tree, but the document selection has NOT changed + * * Current file selection rules in views: * - select a file in WorkingSetView > select in WorkingSetView * - add a file to the WorkingSetView > select in WorkingSetView diff --git a/src/project/WorkingSetView.js b/src/project/WorkingSetView.js index 4d0703a709b..0801a18b172 100644 --- a/src/project/WorkingSetView.js +++ b/src/project/WorkingSetView.js @@ -29,11 +29,6 @@ * WorkingSetView generates the UI for the list of the files user is editing based on the model provided by EditorManager. * The UI allows the user to see what files are open/dirty and allows them to close files and specify the current editor. * - * Events dispatched: - * documentSelectionFocusChange - indicates a document change has caused the focus to change between the working - * set and file tree. - * fileViewFocusChange - indicates the selection focus has changed between the working set and the project tree, but the - * document selection has NOT changed */ define(function (require, exports, module) { "use strict"; @@ -358,7 +353,7 @@ define(function (require, exports, module) { _handleDirtyFlagChanged(doc); }); - $(FileViewController).on("documentSelectionFocusChange fileViewFocusChange", _handleDocumentSelectionChange ) + $(FileViewController).on("documentSelectionFocusChange fileViewFocusChange", _handleDocumentSelectionChange); // Show scroller shadows when open-files-container scrolls ViewUtils.addScrollerShadow($openFilesContainer[0], null, true); From 0eea9c5e311ae3740b572ad0b7aa14a3c95c2270 Mon Sep 17 00:00:00 2001 From: Ty Voliter Date: Wed, 25 Jul 2012 13:47:08 -0700 Subject: [PATCH 2/2] JSLint clean-up --- src/project/FileViewController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/project/FileViewController.js b/src/project/FileViewController.js index f60c061d7b5..a8791fa0c1f 100644 --- a/src/project/FileViewController.js +++ b/src/project/FileViewController.js @@ -188,7 +188,7 @@ define(function (require, exports, module) { promise.done(function (doc) { // FILE_ADD_TO_WORKING_SET command sets the current document. Update the // selection focus and trigger documentSelectionFocusChange event - _fileSelectionFocus = selectIn ? selectIn : WORKING_SET_VIEW; + _fileSelectionFocus = selectIn || WORKING_SET_VIEW; _selectCurrentDocument(); result.resolve(doc);