From 02496caab5650179800324c46e3e7f2b2939ec35 Mon Sep 17 00:00:00 2001 From: Loic Kartono Date: Sun, 17 May 2015 17:53:58 +1100 Subject: [PATCH] Bump version 0.1.4 --- README.md | 35 +++++++++++++++++++++++++++-------- bower.json | 2 +- package.json | 2 +- 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 36faa98..a34f7aa 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ angular-google-picker ===================== -Angular directive that interact with the Google API Picker : +Angular directive that interact with the Google Picker API : * [https://developers.google.com/picker/docs/](https://developers.google.com/picker/) * [https://developers.google.com/picker/docs/](https://developers.google.com/picker/docs/) @@ -26,7 +26,7 @@ Angular directive that interact with the Google API Picker : 3. Manually -Download [https://github.com/softmonkeyjapan/angular-google-picker/archive/0.1.3.zip](https://github.com/softmonkeyjapan/angular-google-picker/archive/0.1.3.zip) +Download [https://github.com/softmonkeyjapan/angular-google-picker/archive/0.1.4.zip](https://github.com/softmonkeyjapan/angular-google-picker/archive/0.1.4.zip) # Usage @@ -51,7 +51,7 @@ Download [https://github.com/softmonkeyjapan/angular-google-picker/archive/0.1.3 ```js angular.module('myApp', ['lk-google-picker']) - .controller('ExamplaCtrl', ['$scope', function($scope) { + .controller('ExampleCtrl', ['$scope', function ($scope) { $scope.files = []; }]); ``` @@ -99,7 +99,7 @@ In order to work, Google Picker needs to connect to the Google API using an appl ```js angular.module('myApp', ['lk-google-picker']) -.config(['lkGoogleSettingsProvider', function(lkGoogleSettingsProvider) { +.config(['lkGoogleSettingsProvider', function (lkGoogleSettingsProvider) { lkGoogleSettingsProvider.configure({ apiKey : 'YOUR_API_KEY', @@ -119,7 +119,7 @@ The Picker use the concept of views and features that allow you to customize it. ```js angular.module('myApp', ['lk-google-picker']) -.config(['lkGoogleSettingsProvider', function(lkGoogleSettingsProvider) { +.config(['lkGoogleSettingsProvider', function (lkGoogleSettingsProvider) { lkGoogleSettingsProvider.features(['MULTISELECT_ENABLED', 'ANOTHER_ONE']); }]) ``` @@ -136,7 +136,7 @@ Views are objects that needs to be instanciate using the namespace `google.picke ```js angular.module('myApp', ['lk-google-picker']) -.config(['lkGoogleSettingsProvider', function(lkGoogleSettingsProvider) { +.config(['lkGoogleSettingsProvider', function (lkGoogleSettingsProvider) { lkGoogleSettingsProvider.views([ 'DocsUploadView()', 'DocsView()' @@ -144,12 +144,12 @@ angular.module('myApp', ['lk-google-picker']) }]) ``` -**NOTE** : Views classes have some usefull methods such as `setIncludeFolders` or `setStarred` (or any other methods available). In order to use them, just chain them to the class : +**NOTE** : Views classes have some useful methods such as `setIncludeFolders` or `setStarred` (or any other methods available). In order to use them, just chain them to the class : ```js angular.module('myApp', ['lk-google-picker']) -.config(['lkGoogleSettingsProvider', function(lkGoogleSettingsProvider) { +.config(['lkGoogleSettingsProvider', function (lkGoogleSettingsProvider) { lkGoogleSettingsProvider.setViews([ 'DocsUploadView().setIncludeFolders(true)', 'DocsView().setStarred(true)' @@ -162,6 +162,25 @@ angular.module('myApp', ['lk-google-picker']) Please refer to [https://developers.google.com/picker/docs/reference](https://developers.google.com/picker/docs/reference) for more informations. +# Callback + +If you want to do some logic after selecting files from the picker, you can use the `after-select` attribute and pass it a function from the active scope. + +```js +angular.module('myApp', ['lk-google-picker']) + +.controller('ExampleCtrl', ['$scope', function ($scope) { + $scope.afterSelectCallback = function (files) { + // Do something + } +}]); +``` + +```html +Open my Google Drive +``` + + # Example The demo version available at [http://softmonkeyjapan.github.io/angular-google-picker/](http://softmonkeyjapan.github.io/angular-google-picker/) can be found in the `example` folder. diff --git a/bower.json b/bower.json index 4aa4799..ee54164 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "angular-google-picker", - "version": "0.1.3", + "version": "0.1.4", "authors": [ "Loic Kartono " ], diff --git a/package.json b/package.json index ad0bf63..1510f50 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-google-picker", - "version": "0.1.3", + "version": "0.1.4", "description": "An AngularJs directive that interact with the Google API Picker", "author": "Loic Kartono (http://www.kartono-loic.com)", "devDependencies": {