diff options
author | Ananya Sen | 2012-01-30 14:18:21 -0800 |
---|---|---|
committer | Ananya Sen | 2012-01-30 14:18:21 -0800 |
commit | 92161460a6cbbdebfd1b0263ec6eb790091920a9 (patch) | |
tree | 48136ac734f6e46d902b720387ac5693ed29ee8d /js/components/ui/FilePicker | |
parent | 9c46c73141259ab4478935033cb4d8dda43f6bf2 (diff) | |
download | ninja-92161460a6cbbdebfd1b0263ec6eb790091920a9.tar.gz |
Moving changes from Gerrit, on 1/27, to the github branch:
- added file existence check and validation to save as dialog
- minor css fix for file picker, new file dialog
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/components/ui/FilePicker')
-rw-r--r--[-rwxr-xr-x] | js/components/ui/FilePicker/pickerNavigator.reel/pickerNavigator.css | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | js/components/ui/FilePicker/pickerNavigator.reel/pickerNavigator.js | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/js/components/ui/FilePicker/pickerNavigator.reel/pickerNavigator.css b/js/components/ui/FilePicker/pickerNavigator.reel/pickerNavigator.css index 61328ce0..93578ec1 100755..100644 --- a/js/components/ui/FilePicker/pickerNavigator.reel/pickerNavigator.css +++ b/js/components/ui/FilePicker/pickerNavigator.reel/pickerNavigator.css | |||
@@ -63,6 +63,7 @@ | |||
63 | 63 | ||
64 | .picker .driversList:hover{ | 64 | .picker .driversList:hover{ |
65 | cursor:pointer; | 65 | cursor:pointer; |
66 | background-color: #444444; | ||
66 | } | 67 | } |
67 | 68 | ||
68 | .picker .highlighted{ | 69 | .picker .highlighted{ |
diff --git a/js/components/ui/FilePicker/pickerNavigator.reel/pickerNavigator.js b/js/components/ui/FilePicker/pickerNavigator.reel/pickerNavigator.js index eec7c8e8..268ec41a 100755..100644 --- a/js/components/ui/FilePicker/pickerNavigator.reel/pickerNavigator.js +++ b/js/components/ui/FilePicker/pickerNavigator.reel/pickerNavigator.js | |||
@@ -621,6 +621,16 @@ var PickerNavigator = exports.PickerNavigator = Montage.create(Component, { | |||
621 | this.currentSelectedNode = evt.target; | 621 | this.currentSelectedNode = evt.target; |
622 | 622 | ||
623 | }else{ | 623 | }else{ |
624 | |||
625 | |||
626 | //test: highlight non-selectable icons too | ||
627 | if(!evt.target.classList.contains("selected")){ | ||
628 | evt.target.classList.add("selected"); | ||
629 | } | ||
630 | this.currentSelectedNode = evt.target; | ||
631 | //end- test | ||
632 | |||
633 | |||
624 | //disable OK | 634 | //disable OK |
625 | if(!this.okButton.hasAttribute("disabled")){ | 635 | if(!this.okButton.hasAttribute("disabled")){ |
626 | this.okButton.setAttribute("disabled", "true"); | 636 | this.okButton.setAttribute("disabled", "true"); |
@@ -776,6 +786,7 @@ var PickerNavigator = exports.PickerNavigator = Montage.create(Component, { | |||
776 | this.pickerModel.callback.call(this.pickerModel.callbackScope, {"uri":this.selectedItems}); | 786 | this.pickerModel.callback.call(this.pickerModel.callbackScope, {"uri":this.selectedItems}); |
777 | }catch(e){ | 787 | }catch(e){ |
778 | success = false; | 788 | success = false; |
789 | console.log("[Error] Failed to open "+ this.selectedItems.toString()); | ||
779 | console.log(e.stack); | 790 | console.log(e.stack); |
780 | } | 791 | } |
781 | }else{//else send an event with the selected files | 792 | }else{//else send an event with the selected files |