vrfs152: integrated fb invites to dropdown
This commit is contained in:
parent
13df76e136
commit
1a965b298b
|
|
@ -200,8 +200,8 @@
|
|||
invitationDialog.showGoogleDialog();
|
||||
});
|
||||
|
||||
$('div[layout-id="createSession"] .btn-facebook-invitation').click(function() {
|
||||
invitationDialog.showFacebookDialog();
|
||||
$('div[layout-id="createSession"] .btn-facebook-invitation').click(function(e) {
|
||||
invitationDialog.showFacebookDialog(e);
|
||||
});
|
||||
|
||||
$('#friend-input').focus(function() { $(this).val(''); })
|
||||
|
|
|
|||
|
|
@ -180,7 +180,6 @@
|
|||
}
|
||||
|
||||
this.fb_login = function() {
|
||||
//try {}
|
||||
FB.login(function(response) {
|
||||
handle_fblogin_response(response);
|
||||
}, {scope:'publish_stream'});
|
||||
|
|
@ -204,8 +203,7 @@
|
|||
function show_feed_dialog() {
|
||||
var obj = {
|
||||
method: 'feed',
|
||||
// redirect_uri: 'http://jamkazamdev.local:3000/',
|
||||
link: fbInviteURL(), //'https://developers.facebook.com/docs/reference/dialogs/'
|
||||
link: fbInviteURL(),
|
||||
picture: 'http://jamkazam.com/assets/logo.png',
|
||||
name: 'Join me on JamKazam',
|
||||
caption: 'Play live music in real-time sessions with others over the Internet, as if in the same room.',
|
||||
|
|
@ -213,13 +211,14 @@
|
|||
actions: [{ name: 'Signup', link: fbInviteURL() }]
|
||||
};
|
||||
function fbFeedDialogCallback(response) {
|
||||
console.log("feedback dialog closed: " + response['post_id'])
|
||||
//console.log("feedback dialog closed: " + response['post_id'])
|
||||
}
|
||||
FB.ui(obj, fbFeedDialogCallback);
|
||||
}
|
||||
|
||||
function showFacebookDialog(evt) {
|
||||
evt.stopPropagation();
|
||||
if (!(evt === undefined)) evt.stopPropagation();
|
||||
|
||||
var fb_state = window.fb_logged_in_state;
|
||||
|
||||
if (fb_state == "connected") {
|
||||
|
|
|
|||
|
|
@ -37,6 +37,10 @@
|
|||
invitationDialog.showEmailDialog();
|
||||
});
|
||||
|
||||
$('.invite-friends .facebook-invite a').on('click', function(e) {
|
||||
invitationDialog.showFacebookDialog(e);
|
||||
});
|
||||
|
||||
$('#header-avatar').on('avatar_changed', function(event, newAvatarUrl) {
|
||||
updateAvatar(newAvatarUrl);
|
||||
event.preventDefault();
|
||||
|
|
|
|||
|
|
@ -426,7 +426,7 @@ ul.shortcuts {
|
|||
color:#FFCC00;
|
||||
}
|
||||
|
||||
li.google-invite, li.email-invite {
|
||||
li.google-invite, li.email-invite, li.facebook-invite {
|
||||
padding-left:9px;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
<ul class="shortcuts-submenu">
|
||||
<li class="google-invite"><%= link_to "Google", '#' %></li>
|
||||
<li class="email-invite"><%= link_to "Email", '#' %></li>
|
||||
<li class="facebook-invite"><%= link_to "Facebook", '#' %></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="download-app"><%= link_to "Download App", downloads_path, :rel => "external" %></li>
|
||||
|
|
|
|||
Loading…
Reference in New Issue