diff options
author | Ananya Sen | 2012-02-13 18:48:18 -0800 |
---|---|---|
committer | Ananya Sen | 2012-02-13 18:48:18 -0800 |
commit | a6948e635389768fc316f1fb86df2524b482b47c (patch) | |
tree | 427c0f16696d858d5cc2813749c65a224d14e885 /js/components/ui/FilePicker | |
parent | 021dc7f835065a062e65b3325f9b45c5a271cbcf (diff) | |
download | ninja-a6948e635389768fc316f1fb86df2524b482b47c.tar.gz |
added logical drive selection to file picker
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/components/ui/FilePicker')
-rw-r--r-- | js/components/ui/FilePicker/pickerNavigator.reel/pickerNavigator.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/js/components/ui/FilePicker/pickerNavigator.reel/pickerNavigator.js b/js/components/ui/FilePicker/pickerNavigator.reel/pickerNavigator.js index ff9c7073..6b0d92f7 100644 --- a/js/components/ui/FilePicker/pickerNavigator.reel/pickerNavigator.js +++ b/js/components/ui/FilePicker/pickerNavigator.reel/pickerNavigator.js | |||
@@ -149,6 +149,12 @@ var PickerNavigator = exports.PickerNavigator = Montage.create(Component, { | |||
149 | leftNav.appendChild(newDiv); | 149 | leftNav.appendChild(newDiv); |
150 | if(dirObj.uri === this.pickerModel.currentRoot){ | 150 | if(dirObj.uri === this.pickerModel.currentRoot){ |
151 | newDiv.classList.add("highlighted"); | 151 | newDiv.classList.add("highlighted"); |
152 | //enable ok for logical drive selections, when in directory selection mode | ||
153 | if(this.pickerModel.inFileMode === false){ | ||
154 | this.okButton.removeAttribute("disabled"); | ||
155 | //put into selectedItems..currently single selection is supported | ||
156 | this.selectedItems = [dirObj.uri]; | ||
157 | } | ||
152 | } | 158 | } |
153 | 159 | ||
154 | newDiv.addEventListener("click", function(evt){that.handleTopLevelDirectoryClicks(evt, dirObj);}, false); | 160 | newDiv.addEventListener("click", function(evt){that.handleTopLevelDirectoryClicks(evt, dirObj);}, false); |
@@ -571,6 +577,13 @@ var PickerNavigator = exports.PickerNavigator = Montage.create(Component, { | |||
571 | if(!evt.target.classList.contains("highlighted")){ | 577 | if(!evt.target.classList.contains("highlighted")){ |
572 | evt.target.classList.add("highlighted"); | 578 | evt.target.classList.add("highlighted"); |
573 | } | 579 | } |
580 | |||
581 | //enable ok for logical drive selections, when in directory selection mode | ||
582 | if(this.pickerModel.inFileMode === false){ | ||
583 | this.okButton.removeAttribute("disabled"); | ||
584 | //put into selectedItems..currently single selection is supported | ||
585 | this.selectedItems = [dirObj.uri]; | ||
586 | } | ||
574 | } | 587 | } |
575 | }, | 588 | }, |
576 | 589 | ||