* VRFS-1279 - whats next dialog shows twice, VRFS-721 - default to 1 for kernel streaming
This commit is contained in:
parent
a9edcfa798
commit
87f4890638
|
|
@ -766,11 +766,9 @@
|
|||
// Win32, no ControlPanel = WDM/Kernel Streaming
|
||||
// frame=10, buffers=0
|
||||
$asioBtn.hide();
|
||||
$frame.val('10');
|
||||
// TODO FIXME - the old FTUE set the buffers to 1 for WDM/Kernel streaming
|
||||
// The new FTUE spec says to use 0, as I've done here...
|
||||
$bin.val('0');
|
||||
$bout.val('0');
|
||||
$frame.val('2.5');
|
||||
$bin.val('1');
|
||||
$bout.val('1');
|
||||
}
|
||||
} else { // Assuming Mac. TODO: Linux check here
|
||||
// frame=2.5, buffers=0
|
||||
|
|
|
|||
|
|
@ -1,110 +1,112 @@
|
|||
(function(context,$) {
|
||||
/** Javascript for managing the (account dropdown) */
|
||||
(function (context, $) {
|
||||
/** Javascript for managing the (account dropdown) */
|
||||
|
||||
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
context.JK = context.JK || {};
|
||||
context.JK.UserDropdown = function(app) {
|
||||
context.JK = context.JK || {};
|
||||
context.JK.UserDropdown = function (app) {
|
||||
|
||||
var logger = context.JK.logger;
|
||||
var rest = new JK.Rest();
|
||||
var userMe = null;
|
||||
var invitationDialog = null;
|
||||
var logger = context.JK.logger;
|
||||
var rest = new JK.Rest();
|
||||
var userMe = null;
|
||||
var invitationDialog = null;
|
||||
var notYetShownWhatsNext = true;
|
||||
|
||||
function menuHoverIn() {
|
||||
$('ul.shortcuts', this).show();
|
||||
}
|
||||
|
||||
function menuHoverOut() {
|
||||
$('ul.shortcuts', this).hide();
|
||||
}
|
||||
|
||||
function events() {
|
||||
$('.userinfo').hoverIntent({
|
||||
over: function () {
|
||||
$('ul.shortcuts', this).fadeIn(100);
|
||||
},
|
||||
out: function() {
|
||||
$('ul.shortcuts', this).fadeOut(100);
|
||||
},
|
||||
timeout: 500
|
||||
});
|
||||
|
||||
$('.userinfo .invite-friends .menuheader').on('click', function(e) {
|
||||
$(this).closest('li').css('height', 'auto').find('ul').toggle();
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.invite-friends .google-invite a').on('click', function(e) {
|
||||
invitationDialog.showGoogleDialog();
|
||||
});
|
||||
|
||||
$('.invite-friends .email-invite a').on('click', function(e) {
|
||||
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();
|
||||
return false;
|
||||
})
|
||||
}
|
||||
|
||||
function loadMe() {
|
||||
if(!context.JK.currentUserId) {
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: '/api/users/' + context.JK.currentUserId
|
||||
}).done(function(r) {
|
||||
userMe = r;
|
||||
// TODO - Setting global variable for local user.
|
||||
context.JK.userMe = r;
|
||||
updateHeader();
|
||||
handleWhatsNext(userMe);
|
||||
}).fail(app.ajaxError);
|
||||
}
|
||||
|
||||
function updateHeader() {
|
||||
$('#user').html(userMe.name);
|
||||
showAvatar();
|
||||
}
|
||||
|
||||
function handleWhatsNext(userProfile) {
|
||||
if(gon.isNativeClient && userProfile.show_whats_next) {
|
||||
app.layout.showDialog('whatsNext');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// initially show avatar
|
||||
function showAvatar() {
|
||||
var photoUrl = context.JK.resolveAvatarUrl(userMe.photo_url);
|
||||
$('#header-avatar').attr('src', photoUrl);
|
||||
}
|
||||
|
||||
// handle update avatar event
|
||||
function updateAvatar(avatar_url) {
|
||||
var photoUrl = context.JK.resolveAvatarUrl(avatar_url);
|
||||
var avatar = $(new Image());
|
||||
avatar.attr('src', photoUrl + '?cache_bust=' + new Date().getTime());
|
||||
avatar.attr('alt', "Avatar");
|
||||
avatar.attr('id', 'header-avatar');
|
||||
$('#header-avatar').replaceWith(avatar);
|
||||
}
|
||||
|
||||
this.initialize = function(invitationDialogInstance) {
|
||||
events();
|
||||
invitationDialog = invitationDialogInstance;
|
||||
loadMe();
|
||||
}
|
||||
this.loadMe = loadMe;
|
||||
function menuHoverIn() {
|
||||
$('ul.shortcuts', this).show();
|
||||
}
|
||||
})(window,jQuery);
|
||||
|
||||
function menuHoverOut() {
|
||||
$('ul.shortcuts', this).hide();
|
||||
}
|
||||
|
||||
function events() {
|
||||
$('.userinfo').hoverIntent({
|
||||
over: function () {
|
||||
$('ul.shortcuts', this).fadeIn(100);
|
||||
},
|
||||
out: function () {
|
||||
$('ul.shortcuts', this).fadeOut(100);
|
||||
},
|
||||
timeout: 500
|
||||
});
|
||||
|
||||
$('.userinfo .invite-friends .menuheader').on('click', function (e) {
|
||||
$(this).closest('li').css('height', 'auto').find('ul').toggle();
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.invite-friends .google-invite a').on('click', function (e) {
|
||||
invitationDialog.showGoogleDialog();
|
||||
});
|
||||
|
||||
$('.invite-friends .email-invite a').on('click', function (e) {
|
||||
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();
|
||||
return false;
|
||||
})
|
||||
}
|
||||
|
||||
function loadMe() {
|
||||
if (!context.JK.currentUserId) {
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: '/api/users/' + context.JK.currentUserId
|
||||
}).done(function (r) {
|
||||
userMe = r;
|
||||
// TODO - Setting global variable for local user.
|
||||
context.JK.userMe = r;
|
||||
updateHeader();
|
||||
handleWhatsNext(userMe);
|
||||
}).fail(app.ajaxError);
|
||||
}
|
||||
|
||||
function updateHeader() {
|
||||
$('#user').html(userMe.name);
|
||||
showAvatar();
|
||||
}
|
||||
|
||||
function handleWhatsNext(userProfile) {
|
||||
if (notYetShownWhatsNext && gon.isNativeClient && userProfile.show_whats_next) {
|
||||
notYetShownWhatsNext = false;
|
||||
app.layout.showDialog('whatsNext');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// initially show avatar
|
||||
function showAvatar() {
|
||||
var photoUrl = context.JK.resolveAvatarUrl(userMe.photo_url);
|
||||
$('#header-avatar').attr('src', photoUrl);
|
||||
}
|
||||
|
||||
// handle update avatar event
|
||||
function updateAvatar(avatar_url) {
|
||||
var photoUrl = context.JK.resolveAvatarUrl(avatar_url);
|
||||
var avatar = $(new Image());
|
||||
avatar.attr('src', photoUrl + '?cache_bust=' + new Date().getTime());
|
||||
avatar.attr('alt', "Avatar");
|
||||
avatar.attr('id', 'header-avatar');
|
||||
$('#header-avatar').replaceWith(avatar);
|
||||
}
|
||||
|
||||
this.initialize = function (invitationDialogInstance) {
|
||||
events();
|
||||
invitationDialog = invitationDialogInstance;
|
||||
loadMe();
|
||||
}
|
||||
this.loadMe = loadMe;
|
||||
}
|
||||
})(window, jQuery);
|
||||
|
|
@ -181,15 +181,6 @@ describe "Welcome", :js => true, :type => :feature, :capybara_feature => true d
|
|||
find('.feed-entry.music-session-history-entry .description', text: musicSessionHistory1.description)
|
||||
should_not have_selector('.feed-entry.recording-entry')
|
||||
|
||||
# try to mess with the music session history by removing all user histories (which makes it a bit invalid)
|
||||
# but we really don't want the front page to ever crash if we can help it
|
||||
musicSessionHistory1.music_session_user_histories.delete_all
|
||||
musicSessionHistory1.reload
|
||||
musicSessionHistory1.music_session_user_histories.length.should == 0
|
||||
|
||||
visit "/"
|
||||
find('h1', text: 'Play music together over the Internet as if in the same room')
|
||||
find('.feed-entry.music-session-history-entry .description', text: musicSessionHistory1.description)
|
||||
|
||||
# try to hide the music session
|
||||
musicSessionHistory1.fan_access = false
|
||||
|
|
@ -198,6 +189,17 @@ describe "Welcome", :js => true, :type => :feature, :capybara_feature => true d
|
|||
visit "/"
|
||||
find('h1', text: 'Play music together over the Internet as if in the same room')
|
||||
should_not have_selector('.feed-entry.music-session-history-entry')
|
||||
|
||||
# try to mess with the music session history by removing all user histories (which makes it a bit invalid)
|
||||
# but we really don't want the front page to ever crash if we can help it
|
||||
musicSessionHistory1.fan_access = true
|
||||
musicSessionHistory1.music_session_user_histories.delete_all
|
||||
musicSessionHistory1.reload
|
||||
musicSessionHistory1.music_session_user_histories.length.should == 0
|
||||
|
||||
visit "/"
|
||||
find('h1', text: 'Play music together over the Internet as if in the same room')
|
||||
should_not have_selector('.feed-entry.music-session-history-entry')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue