|
@@ -69,6 +69,7 @@ var g_ctx = {
|
|
|
"cur_eqnum" : "",
|
|
"cur_eqnum" : "",
|
|
|
|
|
|
|
|
"current_ui" : "ui_login",
|
|
"current_ui" : "ui_login",
|
|
|
|
|
+ "ui_stack" : [],
|
|
|
|
|
|
|
|
"ui_change_timeoutid": -1,
|
|
"ui_change_timeoutid": -1,
|
|
|
"ui_watchdog_timeoutid": -1,
|
|
"ui_watchdog_timeoutid": -1,
|
|
@@ -229,8 +230,6 @@ function _switch_ui(to) {
|
|
|
var _x = _calculate_ui_main_status_width_height();
|
|
var _x = _calculate_ui_main_status_width_height();
|
|
|
g_ctx.status_text_h = _x.n_height;
|
|
g_ctx.status_text_h = _x.n_height;
|
|
|
g_ctx.status_text_w = _x.n_width;
|
|
g_ctx.status_text_w = _x.n_width;
|
|
|
-
|
|
|
|
|
- console.log(g_ctx.status_text_h, g_ctx.status_text_w);
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if ((to == "ui_main") ||
|
|
if ((to == "ui_main") ||
|
|
@@ -698,9 +697,12 @@ function _main_menu() {
|
|
|
ele.classList.add("highlight");
|
|
ele.classList.add("highlight");
|
|
|
ele = document.getElementById("ui_fareoverride_passes");
|
|
ele = document.getElementById("ui_fareoverride_passes");
|
|
|
ele.classList.remove("highlight");
|
|
ele.classList.remove("highlight");
|
|
|
|
|
+ ele = document.getElementById("ui_fareoverride_options");
|
|
|
|
|
+ ele.classList.remove("highlight");
|
|
|
|
|
|
|
|
_show_ui_element("ui_fareoverride_misc_tab");
|
|
_show_ui_element("ui_fareoverride_misc_tab");
|
|
|
_hide_ui_element("ui_fareoverride_passes_tab");
|
|
_hide_ui_element("ui_fareoverride_passes_tab");
|
|
|
|
|
+ _hide_ui_element("ui_fareoverride_options_tab");
|
|
|
_switch_ui("ui_fareoverride");
|
|
_switch_ui("ui_fareoverride");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1175,6 +1177,22 @@ function _configuration() {
|
|
|
_clear_ui_paddle();
|
|
_clear_ui_paddle();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+function _configuration_back() {
|
|
|
|
|
+ var ui_prev = "ui_login";
|
|
|
|
|
+ if (g_ctx.ui_stack.length > 0) {
|
|
|
|
|
+ ui_prev = g_ctx.ui_stack.pop();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ _switch_ui(ui_prev);
|
|
|
|
|
+
|
|
|
|
|
+ if (ui_prev == "ui_login") {
|
|
|
|
|
+ g_ctx.driver_login_state = "driver";
|
|
|
|
|
+ _clear_ui_driver();
|
|
|
|
|
+ _clear_ui_paddle();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
function _eqnum() {
|
|
function _eqnum() {
|
|
|
_switch_ui('ui_eqnum');
|
|
_switch_ui('ui_eqnum');
|
|
|
g_ctx.driver_login_state = "driver";
|
|
g_ctx.driver_login_state = "driver";
|
|
@@ -1316,7 +1334,8 @@ function init() {
|
|
|
|
|
|
|
|
// configuration
|
|
// configuration
|
|
|
//
|
|
//
|
|
|
- document.getElementById('ui_configuration_back').onclick = _mainscreen;
|
|
|
|
|
|
|
+ //document.getElementById('ui_configuration_back').onclick = _mainscreen;
|
|
|
|
|
+ document.getElementById('ui_configuration_back').onclick = _configuration_back;
|
|
|
document.getElementById('ui_configuration_volumetest').onclick = _volume_test;
|
|
document.getElementById('ui_configuration_volumetest').onclick = _volume_test;
|
|
|
document.getElementById('ui_configuration_eqnum').onclick = _eqnum;
|
|
document.getElementById('ui_configuration_eqnum').onclick = _eqnum;
|
|
|
|
|
|
|
@@ -1433,6 +1452,21 @@ function init() {
|
|
|
|
|
|
|
|
// fareoverride menu buttons
|
|
// fareoverride menu buttons
|
|
|
//
|
|
//
|
|
|
|
|
+ document.getElementById('ui_fareoverride_misc').onclick =
|
|
|
|
|
+ function() {
|
|
|
|
|
+ var ele;
|
|
|
|
|
+ ele = document.getElementById("ui_fareoverride_misc");
|
|
|
|
|
+ ele.classList.add("highlight");
|
|
|
|
|
+ ele = document.getElementById("ui_fareoverride_passes");
|
|
|
|
|
+ ele.classList.remove("highlight");
|
|
|
|
|
+ ele = document.getElementById("ui_fareoverride_options");
|
|
|
|
|
+ ele.classList.remove("highlight");
|
|
|
|
|
+
|
|
|
|
|
+ _show_ui_element("ui_fareoverride_misc_tab");
|
|
|
|
|
+ _hide_ui_element("ui_fareoverride_passes_tab");
|
|
|
|
|
+ _hide_ui_element("ui_fareoverride_options_tab");
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
document.getElementById('ui_fareoverride_passes').onclick =
|
|
document.getElementById('ui_fareoverride_passes').onclick =
|
|
|
function() {
|
|
function() {
|
|
|
var ele;
|
|
var ele;
|
|
@@ -1440,30 +1474,42 @@ function init() {
|
|
|
ele.classList.remove("highlight");
|
|
ele.classList.remove("highlight");
|
|
|
ele = document.getElementById("ui_fareoverride_passes");
|
|
ele = document.getElementById("ui_fareoverride_passes");
|
|
|
ele.classList.add("highlight");
|
|
ele.classList.add("highlight");
|
|
|
|
|
+ ele = document.getElementById("ui_fareoverride_options");
|
|
|
|
|
+ ele.classList.remove("highlight");
|
|
|
|
|
|
|
|
_hide_ui_element("ui_fareoverride_misc_tab");
|
|
_hide_ui_element("ui_fareoverride_misc_tab");
|
|
|
_show_ui_element("ui_fareoverride_passes_tab");
|
|
_show_ui_element("ui_fareoverride_passes_tab");
|
|
|
|
|
+ _hide_ui_element("ui_fareoverride_options_tab");
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- document.getElementById('ui_fareoverride_misc').onclick =
|
|
|
|
|
|
|
+ document.getElementById('ui_fareoverride_options').onclick =
|
|
|
function() {
|
|
function() {
|
|
|
var ele;
|
|
var ele;
|
|
|
ele = document.getElementById("ui_fareoverride_misc");
|
|
ele = document.getElementById("ui_fareoverride_misc");
|
|
|
- ele.classList.add("highlight");
|
|
|
|
|
|
|
+ ele.classList.remove("highlight");
|
|
|
ele = document.getElementById("ui_fareoverride_passes");
|
|
ele = document.getElementById("ui_fareoverride_passes");
|
|
|
ele.classList.remove("highlight");
|
|
ele.classList.remove("highlight");
|
|
|
|
|
+ ele = document.getElementById("ui_fareoverride_options");
|
|
|
|
|
+ ele.classList.add("highlight");
|
|
|
|
|
|
|
|
- _show_ui_element("ui_fareoverride_misc_tab");
|
|
|
|
|
|
|
+ _hide_ui_element("ui_fareoverride_misc_tab");
|
|
|
_hide_ui_element("ui_fareoverride_passes_tab");
|
|
_hide_ui_element("ui_fareoverride_passes_tab");
|
|
|
|
|
+ _show_ui_element("ui_fareoverride_options_tab");
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- document.getElementById('ui_fareoverride_menu').onclick = function() { _switch_ui("ui_main"); }
|
|
|
|
|
|
|
+ document.getElementById('ui_fareoverride_menu').onclick = function() { _switch_ui("ui_main"); };
|
|
|
|
|
+
|
|
|
|
|
+ document.getElementById('ui_fareoverride_config').onclick =
|
|
|
|
|
+ function() {
|
|
|
|
|
+ g_ctx.ui_stack.push("ui_fareoverride");
|
|
|
|
|
+ _switch_ui("ui_configuration");
|
|
|
|
|
+ };
|
|
|
document.getElementById('ui_fareoverride_logout').onclick =
|
|
document.getElementById('ui_fareoverride_logout').onclick =
|
|
|
function() {
|
|
function() {
|
|
|
_main_message_clear();
|
|
_main_message_clear();
|
|
|
_api_request("logout");
|
|
_api_request("logout");
|
|
|
_switch_ui("ui_login");
|
|
_switch_ui("ui_login");
|
|
|
- }
|
|
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
// default values for override passes
|
|
// default values for override passes
|
|
|
//
|
|
//
|