issue #10 #11 #12 Apply system reboot feature on instant_power mode set as 2. Change language popup titile and usage displaying method.

This commit is contained in:
paul kim
2024-09-05 12:35:44 +09:00
parent baf7697664
commit 91cd321a59
5 changed files with 11185 additions and 47 deletions

View File

@@ -313,12 +313,12 @@ HotelTV.ui_appfull = (function() {
const _state = HotelTV.state;
let _cur_date = new Date();
let _valid_state_keyEvtOnTv = ["tvCtgShow", "tvCtgHide", "tvShortcut"];
if ( __uifxn_Utils_CheckKeyisNumber(_evt.keyCode)==true ){
if ( _valid_state_keyEvtOnTv.includes(_state.menu.stage.cur)==true ){
_tmrEvt.keyevt.tv_numBtn = _cur_date;
}
}
} else if ( _evt.keyCode == gRmtKey.up || _evt.keyCode == gRmtKey.down ||
_evt.keyCode == gRmtKey.left || _evt.keyCode == gRmtKey.right ||
_evt.keyCode == gRmtKey.chup || _evt.keyCode == gRmtKey.chdown ) {
@@ -3966,8 +3966,8 @@ HotelTV.ui_appfull = (function() {
/**
* Return tv cagegory id by name
* @param {string} _ctgy_name
* @returns
* @param {string} _ctgy_name
* @returns
*/
function __uifxn_AppFull_TVCtgyIdByName(_ctgy_name="all") {
let _program = HotelTV.tvguide.program;
@@ -4048,11 +4048,11 @@ HotelTV.ui_appfull = (function() {
_epgProgInf_Prev = _epg_prom_info[_j-1];
_schTmPrev.setHours(Number(_epgProgInf_Prev.time.charAt(0) + _epgProgInf_Prev.time.charAt(1)));
_schTmPrev.setMinutes(Number(_epgProgInf_Prev.time.charAt(3) + _epgProgInf_Prev.time.charAt(4)));
}
}
let _t_playTotal = Math.round((_schTmCur - _schTmPrev) / 60000); //Total play time in minuate
let _t_playRemain = Math.round((_schTmCur - _tm_cur) / 60000); //Remain play time in minuate
_rtn_epg = _epgProgInf_Cur;
if (_t_playRemain >= 0) {
//console.log("CHNAME::>" + _ch_name + " Remaining::> " + _t_playRemain);
@@ -4111,7 +4111,7 @@ HotelTV.ui_appfull = (function() {
}
else
{
if ( _tm_diff_ms_tvctrl>=5000 )
if ( _tm_diff_ms_tvctrl>=5000 )
{
if ( _state.menu.stage.cur=="tvCtgShow" || _state.menu.stage.cur=="tvCtgHide" )
{
@@ -4135,7 +4135,7 @@ HotelTV.ui_appfull = (function() {
___ifxn_hideTvEpgFrm();
}
}
}
}
}
}
@@ -4173,7 +4173,7 @@ HotelTV.ui_appfull = (function() {
___ifxn_fadeout_shortcutFrm();
if ( _programTv.shortcutkeyMode=="mode_0" ) {
if ( _programTv.shortcutkeyMode=="mode_0" ) {
if ( _state.tv.shortkey.ch_item_idx!=null ) {
const _mmIdx_tv = _state.menu.main.cur;
let _tvCtgAllIdx = _state.menu.main[_mmIdx].cur = __uifxn_AppFull_TVCtgyIdByName("all");
@@ -4786,8 +4786,8 @@ HotelTV.ui_appfull = (function() {
/**
* HotelTV UI[AppFull] Wrapper Function::> request tv channel function
* @param {Number} _force_ctg_item_idx
* @param {Number} _force_ch_item_idx
* @param {Number} _force_ctg_item_idx
* @param {Number} _force_ch_item_idx
* @param {function} _cbfxn_success
* @param {function} _cbfxn_failure
*/
@@ -4933,8 +4933,8 @@ HotelTV.ui_appfull = (function() {
// _chNumber는 -기준으로 잘라낸 앞숫자, 예를들면 16-1이라면 _chNumber는 16이 됨.
let _ChNumStr = __ifxn_getChItemValue(_ChItem, "number").toString();
let _ChNumber = Number(_ChNumStr.split('-')[0]);
// Find out matched channel
// Find out matched channel
if ( _ChNumber==Number(_strReqNumNext) ){
// Find out
_state.tv.shortkey.ch_item_idx = Number(__ifxn_getChItemIdxByNumber(_ChNumStr));
@@ -5155,7 +5155,7 @@ HotelTV.ui_appfull = (function() {
let _egp_prog_inf = null;
//Update channel logo image
//Update channel logo image
_elDivTvChLogo.css({ "background-image": "url(" + _tvChInfo.logo.file.download + ")" });
//Update channel number
@@ -5168,25 +5168,25 @@ HotelTV.ui_appfull = (function() {
if (_egp_prog_inf.epg_info != null) {
_elDivTvChEpgTitle.text(_egp_prog_inf.epg_info.name);
_elDivTvChEpgDetails.find('#tm_playing').text(_trTbl.ui.tv.epg.progamtime[_state.lang] + _egp_prog_inf.epg_info.playing_time);
//let _new_progress_bar_width = parseInt(_elDivTvChEpgDetails.find("#tm_chart").width()*_egp_prog_inf.epg_info.progress_pcent/100);
let _new_progress_bar_width = parseInt(835*_egp_prog_inf.epg_info.progress_pcent/100);
_elDivTvChEpgDetails.find('.progress').width(_new_progress_bar_width);
} else {
_elDivTvChEpgTitle.text("");
_elDivTvChEpgDetails.find('#tm_playing').text("");
//let _new_progress_bar_width = parseInt(_elDivTvChEpgDetails.find("#tm_chart").width()*_egp_prog_inf.epg_info.progress_pcent/100);
let _new_progress_bar_width = 0;
_elDivTvChEpgDetails.find('.progress').width(_new_progress_bar_width);
}
// Fade in epg
__uifxn_AppFull_TVEpgFadeIn();
// Fade in epg
__uifxn_AppFull_TVEpgFadeIn();
if (_action == "on_load") {
//_state.menu.stage.cur = "tvCtgShow";
// TODO: Request Channel
// TODO: Request Channel
} else if (_action == "ch_up") {
// TODO: Request Channel
} else if (_action == "ch_down") {
@@ -5975,7 +5975,7 @@ HotelTV.ui_appfull = (function() {
__ifxn_exitTvMenu();
} else if ( __uifxn_Utils_CheckKeyisNumber(event.keyCode)==true ){
//Navigate TV shortcut lists
if ( _programTv.shortcutkeyMode=="mode_0" ) {
if ( _programTv.shortcutkeyMode=="mode_0" ) {
_state.menu.stage.cur = "tvShortcut";
__uifxn_AppFull_TVDrawShortcutKey_Mode0(event.keyCode);
} else if ( _programTv.shortcutkeyMode=="mode_1" ) {
@@ -6001,10 +6001,10 @@ HotelTV.ui_appfull = (function() {
__ifxn_exitTvMenu();
} else if ( __uifxn_Utils_CheckKeyisNumber(event.keyCode)==true ) {
//Navigate TV shortcut lists
if ( _programTv.shortcutkeyMode=="mode_0" ) {
if ( _programTv.shortcutkeyMode=="mode_0" ) {
_state.menu.stage.cur = "tvShortcut";
__uifxn_AppFull_TVDrawShortcutKey_Mode0(event.keyCode);
} else if ( _programTv.shortcutkeyMode=="mode_1" ) {
} else if ( _programTv.shortcutkeyMode=="mode_1" ) {
if ( __uifxn_AppFull_TVDrawShortcutKey_Mode1(true, "build", event.keyCode)==0 ){
_state.menu.stage.prev = _state.menu.stage.cur;
_state.menu.stage.cur = "tvShortcut";
@@ -6017,18 +6017,18 @@ HotelTV.ui_appfull = (function() {
// console.log("TV shortcut routine: key:" + event.keyCode);
if (event.keyCode == gRmtKey.back) {
// TV메뉴로 복귀
if ( _programTv.shortcutkeyMode=="mode_0" ) {
if ( _programTv.shortcutkeyMode=="mode_0" ) {
//
} else if ( _programTv.shortcutkeyMode=="mode_1" ) {
} else if ( _programTv.shortcutkeyMode=="mode_1" ) {
__uifxn_AppFull_TVDrawShortcutKey_Mode1(false, "exitWithoutChchange", event.keyCode);
}
_state.menu.stage.cur = _state.menu.stage.prev;
_state.menu.stage.prev = null;
} else if (event.keyCode == gRmtKey.enter) {
// 번호키를 이용한 채널 선택 팝업 삭제
if ( _programTv.shortcutkeyMode=="mode_0" ) {
if ( _programTv.shortcutkeyMode=="mode_0" ) {
//
} else if ( _programTv.shortcutkeyMode=="mode_1" ) {
} else if ( _programTv.shortcutkeyMode=="mode_1" ) {
__uifxn_AppFull_TVDrawShortcutKey_Mode1(false, "exitWithChchange", event.keyCode);
}
_state.menu.stage.cur = _state.menu.stage.prev;
@@ -6037,13 +6037,13 @@ HotelTV.ui_appfull = (function() {
_tmrEvt.keyevt.tv_ctrl = new Date();
_tmrEvt.keyevt.tv_ctrl.setSeconds(_tmrEvt.keyevt.tv_ctrl.getSeconds() - 3);
} else if ( __uifxn_Utils_CheckKeyisNumber(event.keyCode)==true ) {
if ( _programTv.shortcutkeyMode=="mode_0" ) {
if ( _programTv.shortcutkeyMode=="mode_0" ) {
__uifxn_AppFull_TVDrawShortcutKey_Mode0(event.keyCode);
}
}
} else {
if ( _programTv.shortcutkeyMode=="mode_0" ) {
if ( _programTv.shortcutkeyMode=="mode_0" ) {
//
} else if ( _programTv.shortcutkeyMode=="mode_1" ) {
} else if ( _programTv.shortcutkeyMode=="mode_1" ) {
__uifxn_AppFull_TVDrawShortcutKey_Mode1(true, "move", event.keyCode);
}
console.log("TVSHORTCUT CHNUM: " + _state.tv.shortkey.ch_item_idx);
@@ -6126,7 +6126,7 @@ HotelTV.ui_appfull = (function() {
}
}
// Title
// Title
_elLangSelTitleDiv.text(_trTbl.system.szsellanguage[_state.lang]);
// Usages
@@ -6151,6 +6151,19 @@ HotelTV.ui_appfull = (function() {
let _elLangSelUsageDiv = _elLangSelCtrlDiv.children('.usage');
let _elLangSelButtonsDiv = _elLangSelCtrlDiv.children('.buttons');
const ___ifxn_updateLangSelTitleAndUsages = function() {
let __focusedLang = "en-US";
if ( _elLangSelButtonsDiv.find('.focus').length ) {
__focusedLang = _elLangSelButtonsDiv.find('.focus').attr('id');
}
// Title
_elLangSelTitleDiv.text(_trTbl.system.szsellanguage[__focusedLang]);
// Usages
_elLangSelUsageDiv.html(_trTbl.system.lang_sel_usage[__focusedLang]);
}
const ___ifxn_moveLangButton = function(_direction) {
let selectedBtnItemCur = _elLangSelButtonsDiv.find('.focus');
@@ -6173,6 +6186,8 @@ HotelTV.ui_appfull = (function() {
_elLangSelButtonsDiv.find('.langBtn').last().addClass("focus");
}
}
___ifxn_updateLangSelTitleAndUsages();
}
const __ifxn_sendNextLangUsrData = async function(_nextLang, __cbFxnFailure=null, __cbFxn_Success=null) {
@@ -6208,7 +6223,7 @@ HotelTV.ui_appfull = (function() {
_elLangSelDiv.fadeOut(1000, function() {
if ( __cbFxnFailure ){ __cbFxnFailure(); }
});
}
}
}
@@ -6347,7 +6362,7 @@ HotelTV.ui_appfull = (function() {
} else {
if ( _state.menu.stage.cur=="tvCtgShow" || _state.menu.stage.cur=="tvCtgHide" )
{
}
else
{