Skip to content

Commit

Permalink
VFS: dropbox - now uses popupà driver (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
andersevenrud committed Dec 29, 2014
1 parent 60cf91f commit 1038479
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions dist-dev/vendor/dropboxOauthReceiver.html
13 changes: 13 additions & 0 deletions dist/vendor/dropboxOauthReceiver.html
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<script src="dropbox.js" type="text/javascript"></script>
<script type="text/javascript">
Dropbox.AuthDriver.Popup.oauthReceiver();
</script>
</head>
<body>
<h1>Dropbox sign-in successful</h1>
<p>Please close this window.</p>
</body>
</html>
9 changes: 7 additions & 2 deletions src/javascript/vfs/dropbox.js
Expand Up @@ -105,13 +105,18 @@
var clientKey = _getConfig('ClientKey');
this.client = new window.Dropbox.Client({ key: clientKey });

/*
if ( this.client ) {
var href = window.location.href;
if ( !href.match(/\/$/) ) {
href += '/';
}
href += 'vendor/dropboxOauthReceiver.html';

var authDriver = new window.Dropbox.AuthDriver.Popup({
receiverUrl: href
});
this.client.authDriver(authDriver);
}
*/
}

DropboxVFS.prototype.init = function(callback) {
Expand Down

0 comments on commit 1038479

Please sign in to comment.