Permalink
Browse files

Fixing the picker to include search results

  • Loading branch information...
1 parent 33f0ac2 commit e0cc12de784c02d7cdd880fc5c90c5aaf9e81435 @PaulKinlan committed Aug 9, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 server/demos/cloudfilepicker/pages/index.html
@@ -32,8 +32,10 @@
pickerBuilder.addViewGroup(
new google.picker.ViewGroup(google.picker.ViewId.PHOTOS).
addView(new google.picker.PhotosView().
- setType(google.picker.PhotosView.Type.UPLOADED)));
- pickerBuilder.enableFeature(google.picker.Feature.NAV_HIDDEN);
+ setType(google.picker.PhotosView.Type.UPLOADED)).
+ addView(new google.picker.ImageSearchView().
+ setLicense(google.picker.ImageSearchView.License.None))
+ );
}
else if(window.intent.type.indexOf('video') == 0) {
pickerBuilder.addViewGroup(
@@ -68,7 +70,7 @@
function pickerCallback(data) {
if (data.action == google.picker.Action.PICKED) {
- returnImage(data.docs[0].thumbnails[data.docs[0].thumbnails.length > 4 ? 4 : 3].url);
+ returnImage(data.docs[0].thumbnails[data.docs[0].thumbnails.length - 1].url);
}
else if(data.action == google.picker.Action.CANCEL) {
// Tell the calling app the user cancelled.

0 comments on commit e0cc12d

Please sign in to comment.