diff options
author | John Mayhew | 2012-04-02 16:28:39 -0700 |
---|---|---|
committer | John Mayhew | 2012-04-02 16:28:39 -0700 |
commit | b4155fb4c33675a8a7cd37473513718043fdf0ba (patch) | |
tree | 3d8c802473f2395d53d599ec9d8b70b60a4db50c /js/io/ui/file-picker/picker-navigator.reel/picker-navigator.js | |
parent | 5ba9aeac94c86049423fd5d4b37b277263939c13 (diff) | |
parent | c6de22bf42be90b403491b5f87b1818d9020310c (diff) | |
download | ninja-b4155fb4c33675a8a7cd37473513718043fdf0ba.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into WorkingBranch
Conflicts:
js/helper-classes/RDGE/rdge-compiled.js
js/helper-classes/RDGE/runtime/GLRuntime.js
js/helper-classes/RDGE/src/core/script/MeshManager.js
js/helper-classes/RDGE/src/core/script/engine.js
js/helper-classes/RDGE/src/core/script/fx/ssao.js
js/helper-classes/RDGE/src/core/script/init_state.js
js/helper-classes/RDGE/src/core/script/run_state.js
js/helper-classes/RDGE/src/core/script/scenegraphNodes.js
js/helper-classes/RDGE/src/core/script/utilities.js
js/helper-classes/RDGE/src/tools/compile-rdge-core.bat
js/helper-classes/RDGE/src/tools/compile-rdge-core.sh
js/helper-classes/RDGE/src/tools/rdge-compiled.js
js/lib/drawing/world.js
js/lib/rdge/materials/bump-metal-material.js
js/lib/rdge/materials/deform-material.js
js/lib/rdge/materials/flat-material.js
js/lib/rdge/materials/fly-material.js
js/lib/rdge/materials/julia-material.js
js/lib/rdge/materials/keleidoscope-material.js
js/lib/rdge/materials/linear-gradient-material.js
js/lib/rdge/materials/mandel-material.js
js/lib/rdge/materials/plasma-material.js
js/lib/rdge/materials/pulse-material.js
js/lib/rdge/materials/radial-blur-material.js
js/lib/rdge/materials/radial-gradient-material.js
js/lib/rdge/materials/relief-tunnel-material.js
js/lib/rdge/materials/square-tunnel-material.js
js/lib/rdge/materials/star-material.js
js/lib/rdge/materials/taper-material.js
js/lib/rdge/materials/tunnel-material.js
js/lib/rdge/materials/twist-material.js
js/lib/rdge/materials/twist-vert-material.js
js/lib/rdge/materials/uber-material.js
js/lib/rdge/materials/water-material.js
js/lib/rdge/materials/z-invert-material.js
js/preloader/Preloader.js
Diffstat (limited to 'js/io/ui/file-picker/picker-navigator.reel/picker-navigator.js')
-rw-r--r-- | js/io/ui/file-picker/picker-navigator.reel/picker-navigator.js | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/js/io/ui/file-picker/picker-navigator.reel/picker-navigator.js b/js/io/ui/file-picker/picker-navigator.reel/picker-navigator.js index 3d99ae4d..945b0301 100644 --- a/js/io/ui/file-picker/picker-navigator.reel/picker-navigator.js +++ b/js/io/ui/file-picker/picker-navigator.reel/picker-navigator.js | |||
@@ -258,12 +258,20 @@ var PickerNavigator = exports.PickerNavigator = Montage.create(Component, { | |||
258 | this.element.addEventListener("refreshTreeSegment", function(evt){that.handlePickerNavRefreshTreeSegment(evt);}, false); | 258 | this.element.addEventListener("refreshTreeSegment", function(evt){that.handlePickerNavRefreshTreeSegment(evt);}, false); |
259 | this.resultsArea.addEventListener("click", function(evt){that.handleResultsAreaClick(evt);}, false); | 259 | this.resultsArea.addEventListener("click", function(evt){that.handleResultsAreaClick(evt);}, false); |
260 | this.element.addEventListener("click", function(evt){that.handlePickerNavClick(evt);}, false); | 260 | this.element.addEventListener("click", function(evt){that.handlePickerNavClick(evt);}, false); |
261 | |||
262 | this.okButton.addEventListener("click", function(evt){that.handleOkButtonAction(evt);}, false); | 261 | this.okButton.addEventListener("click", function(evt){that.handleOkButtonAction(evt);}, false); |
263 | this.cancelButton.addEventListener("click", function(evt){that.handleCancelButtonAction(evt);}, false); | 262 | this.cancelButton.addEventListener("click", function(evt){that.handleCancelButtonAction(evt);}, false); |
264 | 263 | ||
264 | this.element.addEventListener("keyup", function(evt){ | ||
265 | if(evt.keyCode == 27) { | ||
266 | if(that.application.ninja.filePickerController.pickerNavChoices !== null){ | ||
267 | that.handleCancelButtonAction(); | ||
268 | } | ||
269 | } | ||
270 | }, true); | ||
271 | |||
265 | //ready to show picker now | 272 | //ready to show picker now |
266 | this.element.style.visibility = "visible"; | 273 | this.element.style.visibility = "visible"; |
274 | this.element.focus(); | ||
267 | } | 275 | } |
268 | }, | 276 | }, |
269 | 277 | ||
@@ -346,6 +354,11 @@ var PickerNavigator = exports.PickerNavigator = Montage.create(Component, { | |||
346 | var arr = []; | 354 | var arr = []; |
347 | var temp = new String(uri); | 355 | var temp = new String(uri); |
348 | while(temp.indexOf("/") != -1){ | 356 | while(temp.indexOf("/") != -1){ |
357 | |||
358 | if(""+temp === this.pickerModel.currentLogicalDrive){//stop at the logical drive | ||
359 | break; | ||
360 | } | ||
361 | |||
349 | temp = temp.substring(0, temp.lastIndexOf("/")); | 362 | temp = temp.substring(0, temp.lastIndexOf("/")); |
350 | 363 | ||
351 | //populate dropdown irrespective of validity | 364 | //populate dropdown irrespective of validity |
@@ -496,7 +509,7 @@ var PickerNavigator = exports.PickerNavigator = Montage.create(Component, { | |||
496 | metadata = "Name: "+data.name; | 509 | metadata = "Name: "+data.name; |
497 | } | 510 | } |
498 | metadata = metadata + "<br />" + "Type: "+data.type; | 511 | metadata = metadata + "<br />" + "Type: "+data.type; |
499 | if(data.size){metadata = metadata + "<br />" + "Size: "+data.size;} | 512 | if(data.size){metadata = metadata + "<br />" + "Size: "+data.size+" bytes";} |
500 | if(data.creationDate){metadata = metadata + "<br />" + "Creation date: "+ this.formatTimestamp(data.creationDate);} | 513 | if(data.creationDate){metadata = metadata + "<br />" + "Creation date: "+ this.formatTimestamp(data.creationDate);} |
501 | if(data.modifiedDate){metadata = metadata + "<br />" + "Modified date: "+ this.formatTimestamp(data.modifiedDate);} | 514 | if(data.modifiedDate){metadata = metadata + "<br />" + "Modified date: "+ this.formatTimestamp(data.modifiedDate);} |
502 | } | 515 | } |
@@ -560,7 +573,7 @@ var PickerNavigator = exports.PickerNavigator = Montage.create(Component, { | |||
560 | enumerable: true, | 573 | enumerable: true, |
561 | writable: false, | 574 | writable: false, |
562 | value : function(evt, dirObj){ | 575 | value : function(evt, dirObj){ |
563 | this.currentURI = dirObj.uri; | 576 | this.currentURI = this.pickerModel.currentLogicalDrive = dirObj.uri; |
564 | 577 | ||
565 | var status = this.pickerViews()[this.selectedPickerView].call(this, dirObj.uri);//dynamically calls the update function of the current picker view | 578 | var status = this.pickerViews()[this.selectedPickerView].call(this, dirObj.uri);//dynamically calls the update function of the current picker view |
566 | 579 | ||
@@ -1066,6 +1079,7 @@ var PickerNavigator = exports.PickerNavigator = Montage.create(Component, { | |||
1066 | //clear memory - TODO:check for more memory leaks | 1079 | //clear memory - TODO:check for more memory leaks |
1067 | this.pickerModel = null; | 1080 | this.pickerModel = null; |
1068 | this.application.ninja.filePickerController._directoryContentCache = {}; | 1081 | this.application.ninja.filePickerController._directoryContentCache = {}; |
1082 | this.application.ninja.filePickerController.pickerNavChoices = null; | ||
1069 | //remove listeners | 1083 | //remove listeners |
1070 | this.element.removeEventListener("openFolder", this, false);//add icon double click event listener to reload iconList with new set of data | 1084 | this.element.removeEventListener("openFolder", this, false);//add icon double click event listener to reload iconList with new set of data |
1071 | this.element.removeEventListener("selectedItem", this, false);//for single selection only | 1085 | this.element.removeEventListener("selectedItem", this, false);//for single selection only |