* only reset selected gear if it's a completely new FTUE session

This commit is contained in:
Seth Call 2014-05-29 22:10:53 -05:00
parent 5cd947729c
commit cab835910a
3 changed files with 13 additions and 10 deletions

View File

@ -185,7 +185,7 @@
updateProgress(0, false);
backendGuardTimeout = setTimeout(function(){backendTimedOut()}, gon.ftue_network_test_duration + 1000);
backendGuardTimeout = setTimeout(function(){backendTimedOut()}, (gon.ftue_network_test_duration + 1) * 1000);
context.jamClient.TestNetworkPktBwRate(serverClientId, TEST_SUCCESS_CALLBACK, TEST_TIMEOUT_CALLBACK,
NETWORK_TEST_TYPES.PktTest400LowLatency,
@ -452,7 +452,7 @@
}
this.newSession = newSession;
this.afterHide = afterHide;
this.beforeHide = beforeHide;
this.beforeShow = beforeShow;
this.initialize = initialize;

View File

@ -1038,7 +1038,7 @@
}
}
function beforeShow() {
function newSession() {
deviceInformation = context.JK.loadDeviceInfo();
resetState();
initializeFormElements();
@ -1047,19 +1047,23 @@
initializeASIOButtons();
initializeKnobs();
initializeResync();
}
function beforeShow() {
$(window).on('focus', onFocus);
}
function beforeHide() {
logger.debug("unregistering focus watch")
$(window).off('focus', onFocus);
}
function resetState() {
invalidateScore();
clearInputPorts();
clearOutputPorts();
resetFrameBuffers();
}
function afterHide() {
logger.debug("unregistering focus watch")
$(window).off('focus', onFocus);
}
function initialize(_$step) {
$step = _$step;
@ -1098,8 +1102,9 @@
}
this.handleNext = handleNext;
this.newSession = newSession;
this.beforeShow = beforeShow;
this.afterHide = afterHide;
this.beforeHide = beforeHide;
this.initialize = initialize;
self = this;

View File

@ -285,12 +285,10 @@
// Check, disable or indeterminate
if (/^(ch|di|in)/.test(method) && !active) {
console.log("TAKING ROUTE: ", state);
on(input, state);
// Uncheck, enable or determinate
} else if (/^(un|en|de)/.test(method) && active) {
console.log("TAKING ROUTE2: ", state);
off(input, state);
// Update