@@ -377,29 +377,26 @@ define(function (require, exports, module) {
377377 // (jsTree is smart enough to replace the old tree if there's already one there)
378378 $projectTreeContainer . hide ( ) ;
379379 _projectTree = $projectTreeContainer
380- . jstree (
381- {
382- plugins : [ "ui" , "themes" , "json_data" , "crrm" , "sort" ] ,
383- ui : { select_limit : 1 , select_multiple_modifier : "" , select_range_modifier : "" } ,
384- json_data : { data : treeDataProvider , correct_state : false } ,
385- core : { animation : 0 } ,
386- themes : { theme : "brackets" , url : "styles/jsTreeTheme.css" , dots : false , icons : false } ,
387- //(note: our actual jsTree theme CSS lives in brackets.less; we specify an empty .css
388- // file because jsTree insists on loading one itself)
389- strings : { loading : "Loading ..." , new_node : "New node" } ,
390- sort : function ( a , b ) {
391- if ( brackets . platform === "win" ) {
392- // Windows: prepend folder names with a '0' and file names with a '1' so folders are listed first
393- var a1 = ( $ ( a ) . hasClass ( "jstree-leaf" ) ? "1" : "0" ) + this . get_text ( a ) . toLowerCase ( ) ,
394- b1 = ( $ ( b ) . hasClass ( "jstree-leaf" ) ? "1" : "0" ) + this . get_text ( b ) . toLowerCase ( ) ;
395- return ( a1 > b1 ) ? 1 : - 1 ;
396- } else {
397- return this . get_text ( a ) . toLowerCase ( ) > this . get_text ( b ) . toLowerCase ( ) ? 1 : - 1 ;
398- }
380+ . jstree ( {
381+ plugins : [ "ui" , "themes" , "json_data" , "crrm" , "sort" ] ,
382+ ui : { select_limit : 1 , select_multiple_modifier : "" , select_range_modifier : "" } ,
383+ json_data : { data : treeDataProvider , correct_state : false } ,
384+ core : { animation : 0 } ,
385+ themes : { theme : "brackets" , url : "styles/jsTreeTheme.css" , dots : false , icons : false } ,
386+ //(note: our actual jsTree theme CSS lives in brackets.less; we specify an empty .css
387+ // file because jsTree insists on loading one itself)
388+ strings : { loading : "Loading ..." , new_node : "New node" } ,
389+ sort : function ( a , b ) {
390+ if ( brackets . platform === "win" ) {
391+ // Windows: prepend folder names with a '0' and file names with a '1' so folders are listed first
392+ var a1 = ( $ ( a ) . hasClass ( "jstree-leaf" ) ? "1" : "0" ) + this . get_text ( a ) . toLowerCase ( ) ,
393+ b1 = ( $ ( b ) . hasClass ( "jstree-leaf" ) ? "1" : "0" ) + this . get_text ( b ) . toLowerCase ( ) ;
394+ return ( a1 > b1 ) ? 1 : - 1 ;
395+ } else {
396+ return this . get_text ( a ) . toLowerCase ( ) > this . get_text ( b ) . toLowerCase ( ) ? 1 : - 1 ;
399397 }
400398 }
401- )
402- . bind (
399+ } ) . bind (
403400 "before.jstree" ,
404401 function ( event , data ) {
405402 if ( data . func === "toggle_node" ) {
@@ -409,8 +406,7 @@ define(function (require, exports, module) {
409406 suppressToggleOpen = _projectTree . jstree ( "is_open" , data . args [ 0 ] ) ;
410407 }
411408 }
412- )
413- . bind (
409+ ) . bind (
414410 "select_node.jstree" ,
415411 function ( event , data ) {
416412 var entry = data . rslt . obj . data ( "entry" ) ;
@@ -444,8 +440,7 @@ define(function (require, exports, module) {
444440
445441 suppressToggleOpen = false ;
446442 }
447- )
448- . bind (
443+ ) . bind (
449444 "reopen.jstree" ,
450445 function ( event , data ) {
451446 // This handler fires for the initial load and subsequent
@@ -475,15 +470,13 @@ define(function (require, exports, module) {
475470 result . resolve ( ) ;
476471 }
477472 }
478- )
479- . bind (
473+ ) . bind (
480474 "scroll.jstree" ,
481475 function ( e ) {
482476 // close all dropdowns on scroll
483477 Menus . closeAll ( ) ;
484478 }
485- )
486- . bind (
479+ ) . bind (
487480 "loaded.jstree open_node.jstree close_node.jstree" ,
488481 function ( event , data ) {
489482 if ( event . type === "open_node" ) {
@@ -508,8 +501,7 @@ define(function (require, exports, module) {
508501
509502 _savePreferences ( ) ;
510503 }
511- )
512- . bind (
504+ ) . bind (
513505 "mousedown.jstree" ,
514506 function ( event ) {
515507 // select tree node on right-click
@@ -754,8 +746,8 @@ define(function (require, exports, module) {
754746 NativeFileSystem . requestNativeFileSystem ( rootPath ,
755747 function ( fs ) {
756748 var rootEntry = fs . root ;
757- var projectRootChanged = ( ! _projectRoot || ! rootEntry )
758- || _projectRoot . fullPath !== rootEntry . fullPath ;
749+ var projectRootChanged = ( ! _projectRoot || ! rootEntry ) ||
750+ _projectRoot . fullPath !== rootEntry . fullPath ;
759751
760752 // Success!
761753 var perfTimerName = PerfUtils . markStart ( "Load Project: " + rootPath ) ,
@@ -1095,8 +1087,8 @@ define(function (require, exports, module) {
10951087 } ;
10961088
10971089 var errorCallback = function ( error ) {
1098- if ( ( error . name === NativeFileError . PATH_EXISTS_ERR )
1099- || ( error . name === NativeFileError . TYPE_MISMATCH_ERR ) ) {
1090+ if ( ( error . name === NativeFileError . PATH_EXISTS_ERR ) ||
1091+ ( error . name === NativeFileError . TYPE_MISMATCH_ERR ) ) {
11001092 Dialogs . showModalDialog (
11011093 Dialogs . DIALOG_ID_ERROR ,
11021094 Strings . INVALID_FILENAME_TITLE ,
0 commit comments