";
//var div_hdr = "
";
var div_hdr = "
";
var str = div_hdr + html_a.join("
" + div_hdr ) + "
";
ele.innerHTML = str;
}
else if (g_ctx.current_ui === "ui_main") {
var ele = document.getElementById("mainstatus");
var str = "";
str += "Rt " + m["route"] + " ";
str += "Trip " + m["trip"] + " ";
str += "Stop " + m["stop"] + " ";
str += "GPS " + m["gps"] + " ";
str += "Tun " + m["tunnel"] + ", ";
str += m["date"];
str += " " + moment().format("HH:mm");
ele.innerHTML = str;
}
}
function _cb_status_err(e) {
console.log("ERROR: _cb_status_err:", e);
}
//-------------
function _main_message_clear() {
g_ctx.status_text = "";
}
function _main_message_replace(msg, bg_color, text_color) {
var ele = document.getElementById("ui_main_status");
bg_color = ((typeof bg_color === "undefined") ? BG_COLOR : bg_color);
text_color = ((typeof text_color === "undefined") ? TEXT_COLOR : text_color);
var lines = g_ctx.status_text.split("\n");
if (lines.length > g_ctx.status_text_h) {
var n = lines.length;
lines = lines.slice(n - g_ctx.status_text_h);
}
for (var i=0; i
" + html_lines[i] + " ";
}
else if (html_lines[i].match(/REJECT/)) {
html_lines[i] = "