* pin admin tests
This commit is contained in:
parent
49e03a967c
commit
84f1e79223
|
|
@ -99,7 +99,7 @@ gem 'debugger'
|
|||
|
||||
group :development, :test do
|
||||
gem 'capybara'
|
||||
gem 'rspec-rails'
|
||||
gem 'rspec-rails', '2.14.2'
|
||||
gem 'guard-rspec', '0.5.5'
|
||||
gem 'jasmine', '1.3.1'
|
||||
gem 'execjs', '1.4.0'
|
||||
|
|
|
|||
|
|
@ -0,0 +1,119 @@
|
|||
(function (context, $) {
|
||||
|
||||
"use strict";
|
||||
|
||||
context.JK = context.JK || {};
|
||||
context.JK.ConfigureTracksDialog = function (app) {
|
||||
var logger = context.JK.logger;
|
||||
var ASSIGNMENT = context.JK.ASSIGNMENT;
|
||||
var VOICE_CHAT = context.JK.VOICE_CHAT;
|
||||
|
||||
var $dialog = null;
|
||||
var $instructions = null;
|
||||
var $musicAudioTab = null;
|
||||
var $musicAudioTabSelector = null;
|
||||
var $voiceChatTab = null;
|
||||
var $voiceChatTabSelector = null;
|
||||
|
||||
var configure_audio_instructions = {
|
||||
"Win32": "Choose the audio device you would like to use for this session. If needed, use arrow buttons to assign audio inputs " +
|
||||
"to your tracks, to indicate what instrument you are playing on each track, and to assign audio outputs for listening. " +
|
||||
"If you want to use a new audio device you have not tested/certified for latency using JamKazam, click the Add New Audio " +
|
||||
"Gear button to test that device.",
|
||||
|
||||
"MacOSX": "Choose the audio device you would like to use for this session. If needed, use arrow buttons to assign audio inputs " +
|
||||
"to your tracks, to indicate what instrument you are playing on each track, and to assign audio outputs for listening. " +
|
||||
"If you want to use a new audio device you have not tested/certified for latency using JamKazam, click the Add New Audio " +
|
||||
"Gear button to test that device.",
|
||||
|
||||
"Unix": "Choose the audio device you would like to use for this session. If needed, use arrow buttons to assign audio inputs " +
|
||||
"to your tracks, to indicate what instrument you are playing on each track, and to assign audio outputs for listening. " +
|
||||
"If you want to use a new audio device you have not tested/certified for latency using JamKazam, click the Add New Audio " +
|
||||
"Gear button to test that device."
|
||||
};
|
||||
|
||||
var configure_voice_instructions = "If you are using a microphone to capture your instrumental or vocal audio, you can simply use that mic " +
|
||||
"for both music and chat. Otherwise, choose a device to use for voice chat, and use arrow buttons to " +
|
||||
"select an input on that device.";
|
||||
|
||||
function setInstructions(type) {
|
||||
if (type === 'audio') {
|
||||
var os = context.jamClient.GetOSAsString();
|
||||
$instructions.html(configure_audio_instructions[os]);
|
||||
}
|
||||
else if (type === 'voice') {
|
||||
$instructions.html(configure_voice_instructions);
|
||||
}
|
||||
else {
|
||||
throw "unknown type in setInstructions(" + type + ')';
|
||||
}
|
||||
}
|
||||
|
||||
function activateTab(type) {
|
||||
if (type === 'voice') {
|
||||
$musicAudioTab.hide();
|
||||
$voiceChatTab.show();
|
||||
|
||||
$musicAudioTabSelector.removeClass('selected');
|
||||
$voiceChatTabSelector.addClass('selected');
|
||||
}
|
||||
else {
|
||||
$musicAudioTab.show();
|
||||
$voiceChatTab.hide();
|
||||
|
||||
$musicAudioTabSelector.addClass('selected');
|
||||
$voiceChatTabSelector.removeClass('selected');
|
||||
}
|
||||
}
|
||||
|
||||
function validateVoiceChatSettings() {
|
||||
return true;
|
||||
}
|
||||
|
||||
function showMusicAudioPanel() {
|
||||
setInstructions('audio');
|
||||
activateTab('audio');
|
||||
|
||||
}
|
||||
|
||||
function validateAudioSettings() {
|
||||
return true;
|
||||
}
|
||||
|
||||
function showVoiceChatPanel() {
|
||||
|
||||
}
|
||||
|
||||
function events() {
|
||||
$musicAudioTabSelector.click(function () {
|
||||
// validate voice chat settings
|
||||
if (validateVoiceChatSettings(true)) {
|
||||
showMusicAudioPanel(false);
|
||||
}
|
||||
});
|
||||
|
||||
$voiceChatTabSelector.click(function () {
|
||||
// validate audio settings
|
||||
if (validateAudioSettings(true)) {
|
||||
showVoiceChatPanel(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
|
||||
$dialog = $('#configure-tracks-dialog');
|
||||
$instructions = $dialog.find('.instructions span');
|
||||
$musicAudioTab = $dialog.find('div[tab-id="music-audio"]');
|
||||
$musicAudioTabSelector = $dialog.find('.tab-configure-audio');
|
||||
$voiceChatTab = $dialog.find('div[tab-id="voice-chat"]');
|
||||
$voiceChatTabSelector = $dialog.find('.tab-configure-voice');
|
||||
events();
|
||||
}
|
||||
|
||||
this.initialize = initialize;
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
})(window, jQuery);
|
||||
|
|
@ -43,6 +43,7 @@
|
|||
*= require ./invitationDialog
|
||||
*= require ./shareDialog
|
||||
*= require ./hoverBubble
|
||||
*= require ./configureTracksDialog
|
||||
*= require ./recordingFinishedDialog
|
||||
*= require ./localRecordingsDialog
|
||||
*= require ./serverErrorDialog
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
#configure-tracks-dialog {
|
||||
min-height: 500px;
|
||||
max-height: 500px;
|
||||
width:800px;
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
.dialog{ layout: 'dialog', 'layout-id' => 'configure-tracks', id: 'configure-tracks-dialog'}
|
||||
.content-head
|
||||
= image_tag "content/icon_add.png", {:width => 19, :height => 19, :class => 'content-icon' }
|
||||
%h1 configure tracks
|
||||
.dialog-inner
|
||||
.dialog-tabs
|
||||
%a.selected.tab-configure-audio Music Audio
|
||||
%a.tab-configure-voice Voice Chat
|
||||
|
||||
.instructions
|
||||
%span
|
||||
|
||||
.clearall
|
||||
|
||||
.tab{'tab-id' => 'music-audio'}
|
||||
eat it
|
||||
|
||||
|
||||
.clearall
|
||||
|
||||
|
||||
.tab{'tab-id' => 'voice-chat'}
|
||||
|
||||
.clearall
|
||||
|
|
@ -47,6 +47,7 @@
|
|||
<%= render "friendSelector" %>
|
||||
<%= render "account_profile_avatar" %>
|
||||
<%= render "account_audio_profile" %>
|
||||
<%= render "configure_tracks_dialog" %>
|
||||
<%= render "invitationDialog" %>
|
||||
<%= render "inviteMusicians" %>
|
||||
<%= render "hoverBand" %>
|
||||
|
|
@ -247,6 +248,8 @@
|
|||
var gearWizard = new JK.GearWizard(JK.app);
|
||||
gearWizard.initialize(loopbackWizard);
|
||||
|
||||
var configureTracksDialog = new JK.ConfigureTracksDialog(JK.app);
|
||||
configureTracksDialog.initialize();
|
||||
|
||||
var testBridgeScreen = new JK.TestBridgeScreen(JK.app);
|
||||
testBridgeScreen.initialize();
|
||||
|
|
|
|||
Loading…
Reference in New Issue