Skip to content

Commit

Permalink
Redirect if login
Browse files Browse the repository at this point in the history
  • Loading branch information
Thachnh committed Nov 9, 2013
1 parent edef564 commit bbe07fb
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions app/js/dropbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ $(function () {
$('#loginDropbox').click(function (e) {
e.preventDefault();
// This will redirect the browser to OAuth login.
client.authenticate();
client.authenticate({"redirect_uri" : "snap.html"});
});

$('#uploadDropbox').click(function (e) {
Expand Down Expand Up @@ -45,10 +45,8 @@ $(function () {
}
});

if (client.isAuthenticated()) {
// Client is authenticated. Display UI.
// $('#loginDropbox').hide();
// $('#main').show();
if (client.isAuthenticated()) {
if (window.location.pathname=="/app/index.html") window.location = "snap.html";
}

var obj = $("#draganddrop");
Expand Down

0 comments on commit bbe07fb

Please sign in to comment.