VRFS-604 show invalid profiles on main account screen
This commit is contained in:
parent
25a4e14e3a
commit
8dc8e99a3b
|
|
@ -28,15 +28,28 @@
|
|||
|
||||
var audioProfiles = prettyPrintAudioProfiles(context.jamClient.TrackGetDevices());
|
||||
|
||||
var badAudioConfigs = [];
|
||||
var allAudioConfigs = context.jamClient.FTUEGetAllAudioConfigurations();
|
||||
var goodAudioConfigs = context.jamClient.FTUEGetGoodAudioConfigurations();
|
||||
|
||||
for (var i=0; i < allAudioConfigs.length; i++) {
|
||||
if ($.inArray(allAudioConfigs[i], goodAudioConfigs) === -1) {
|
||||
badAudioConfigs.push(allAudioConfigs[i]);
|
||||
}
|
||||
}
|
||||
|
||||
var template = context.JK.fillTemplate($('#template-account-main').html(), {
|
||||
email: userDetail.email,
|
||||
name: userDetail.name,
|
||||
location : userDetail.location,
|
||||
instruments : prettyPrintInstruments(userDetail.instruments),
|
||||
photoUrl : context.JK.resolveAvatarUrl(userDetail.photo_url),
|
||||
profiles : audioProfiles
|
||||
validProfiles : audioProfiles,
|
||||
invalidProfiles : badAudioConfigs.length > 0 ? badAudioConfigs.join(", ") : "N/A"
|
||||
});
|
||||
$('#account-content-scroller').html(template );
|
||||
$('#account-content-scroller').html(template);
|
||||
|
||||
badAudioConfigs.join(", ")
|
||||
}
|
||||
|
||||
function prettyPrintAudioProfiles(devices) {
|
||||
|
|
|
|||
|
|
@ -13,8 +13,6 @@
|
|||
userId = data.id;
|
||||
|
||||
registerFtueSuccess();
|
||||
|
||||
$('#account-audio-content-scroller table tbody').html('');
|
||||
}
|
||||
|
||||
function afterShow(data) {
|
||||
|
|
@ -32,6 +30,8 @@
|
|||
|
||||
function populateAccountAudio() {
|
||||
|
||||
$('#account-audio-content-scroller table tbody').html('');
|
||||
|
||||
var badAudioConfigs = [];
|
||||
var allAudioConfigs = context.jamClient.FTUEGetAllAudioConfigurations();
|
||||
var goodAudioConfigs = context.jamClient.FTUEGetGoodAudioConfigurations();
|
||||
|
|
|
|||
|
|
@ -106,7 +106,8 @@
|
|||
</div>
|
||||
|
||||
<div class="account-mid audio">
|
||||
<strong>Approved Profiles:</strong> <span class="audio-profiles-short">{profiles}</span>
|
||||
<strong>Approved Profiles:</strong> <span class="audio-profiles-short">{validProfiles}</span><br />
|
||||
<strong>Invalid Profiles:</strong> <span class="audio-profiles-short">{invalidProfiles}</span>
|
||||
</div>
|
||||
|
||||
<div class="right">
|
||||
|
|
|
|||
Loading…
Reference in New Issue