issue #11 채널 바로가기 기능 동작 안정화 향상.
This commit is contained in:
@@ -3290,6 +3290,22 @@ HotelTV.ui_appfull = (function() {
|
|||||||
return _object[_key];
|
return _object[_key];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const __fxn_updateLastChIdxState = function(_ch_number) {
|
||||||
|
let _state = HotelTV.state;
|
||||||
|
let _mmIdx = _state.menu.main.cur;
|
||||||
|
|
||||||
|
for (let _ctgidx = 1; _ctgidx <= _tvProg.length; _ctgidx++) {
|
||||||
|
let _matched_ch_idx=null;
|
||||||
|
let _ch_info = _tvProg[_ctgidx].channels;
|
||||||
|
// 해당 카테고리의 채널 인덱스 찾기
|
||||||
|
for (let _chidx = 1; _chidx <= _ch_info.length; _chidx++) {
|
||||||
|
if ( _ch_info[_chidx].number.toString()==_ch_number ){
|
||||||
|
//_state.menu.main[_mmIdx][_ctgidx].cur = _chidx.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -3346,7 +3362,7 @@ HotelTV.ui_appfull = (function() {
|
|||||||
{
|
{
|
||||||
let _ChItem = _tvChitemAll[_idx];
|
let _ChItem = _tvChitemAll[_idx];
|
||||||
|
|
||||||
if ( __fxn_getChItemValue(_ChItem, "number").includes( _tbl_keycode_to_num[_keyCode].toString())==true )
|
if ( __fxn_getChItemValue(_ChItem, "number").toString().includes( _tbl_keycode_to_num[_keyCode].toString())==true )
|
||||||
{
|
{
|
||||||
var _elTr_ChtmesRec = document.createElement('tr');
|
var _elTr_ChtmesRec = document.createElement('tr');
|
||||||
var _elDiv_ChItmesRec = document.createElement('div');
|
var _elDiv_ChItmesRec = document.createElement('div');
|
||||||
@@ -3355,6 +3371,7 @@ HotelTV.ui_appfull = (function() {
|
|||||||
_elDiv_ChItmesRec.setAttribute("item_idx", _idx);
|
_elDiv_ChItmesRec.setAttribute("item_idx", _idx);
|
||||||
if ( first_item==true ){
|
if ( first_item==true ){
|
||||||
_state.tv.shortkey.ch_item_idx = _idx;
|
_state.tv.shortkey.ch_item_idx = _idx;
|
||||||
|
__fxn_updateLastChIdxState(__fxn_getChItemValue(_ChItem, "number"));
|
||||||
first_item = false;
|
first_item = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3385,8 +3402,11 @@ HotelTV.ui_appfull = (function() {
|
|||||||
if ( _elTvScutRoot.css('display') == 'none') {
|
if ( _elTvScutRoot.css('display') == 'none') {
|
||||||
_elTvScutRoot.fadeIn(500);
|
_elTvScutRoot.fadeIn(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
} catch (_error) {
|
} catch (_error) {
|
||||||
console.log(`Fail to call API::> ${_error}`);
|
console.log(`Fail to call API::> ${_error}`);
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( _action=="destory")
|
else if ( _action=="destory")
|
||||||
@@ -3402,6 +3422,8 @@ HotelTV.ui_appfull = (function() {
|
|||||||
if ( _elTvScutRoot.css('display') != 'none') {
|
if ( _elTvScutRoot.css('display') != 'none') {
|
||||||
_elTvScutRoot.fadeOut(500);
|
_elTvScutRoot.fadeOut(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
else if ( _action=="move" )
|
else if ( _action=="move" )
|
||||||
{
|
{
|
||||||
@@ -3415,6 +3437,8 @@ HotelTV.ui_appfull = (function() {
|
|||||||
//_state.tv.shortkey.ch_item_idx = Number(selectedTblItem.children(".scitem").children("#num").text());
|
//_state.tv.shortkey.ch_item_idx = Number(selectedTblItem.children(".scitem").children("#num").text());
|
||||||
_state.tv.shortkey.ch_item_idx = Number(selectedTblItem.children(".scitem").attr("item_idx"));
|
_state.tv.shortkey.ch_item_idx = Number(selectedTblItem.children(".scitem").attr("item_idx"));
|
||||||
|
|
||||||
|
__fxn_updateLastChIdxState(selectedTblItem.children(".scitem").children("#num").text());
|
||||||
|
|
||||||
// 스크롤이 필요한 경우 스크롤링 하기
|
// 스크롤이 필요한 경우 스크롤링 하기
|
||||||
let _scrollTopVal = _state.tv.shortkey.scroll_offset;
|
let _scrollTopVal = _state.tv.shortkey.scroll_offset;
|
||||||
_scrollTopVal -= selectedTblItem.prop('scrollHeight');
|
_scrollTopVal -= selectedTblItem.prop('scrollHeight');
|
||||||
@@ -3431,6 +3455,8 @@ HotelTV.ui_appfull = (function() {
|
|||||||
//_state.tv.shortkey.ch_item_idx = Number(selectedTblItem.children(".scitem").children("#num").text());
|
//_state.tv.shortkey.ch_item_idx = Number(selectedTblItem.children(".scitem").children("#num").text());
|
||||||
_state.tv.shortkey.ch_item_idx = Number(selectedTblItem.children(".scitem").attr("item_idx"));
|
_state.tv.shortkey.ch_item_idx = Number(selectedTblItem.children(".scitem").attr("item_idx"));
|
||||||
|
|
||||||
|
__fxn_updateLastChIdxState(selectedTblItem.children(".scitem").children("#num").text());
|
||||||
|
|
||||||
// 스크롤이 필요한 경우 스크롤링 하기
|
// 스크롤이 필요한 경우 스크롤링 하기
|
||||||
let _scrollTopVal = _state.tv.shortkey.scroll_offset;
|
let _scrollTopVal = _state.tv.shortkey.scroll_offset;
|
||||||
_scrollTopVal += selectedTblItem.prop('scrollHeight');
|
_scrollTopVal += selectedTblItem.prop('scrollHeight');
|
||||||
@@ -3438,6 +3464,8 @@ HotelTV.ui_appfull = (function() {
|
|||||||
_state.tv.shortkey.scroll_offset = _scrollTopVal;
|
_state.tv.shortkey.scroll_offset = _scrollTopVal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4214,7 +4242,7 @@ HotelTV.ui_appfull = (function() {
|
|||||||
let _div_tv_chframe = document.createElement('div');
|
let _div_tv_chframe = document.createElement('div');
|
||||||
_div_tv_chframe.setAttribute("class", "tvch_item_frame");
|
_div_tv_chframe.setAttribute("class", "tvch_item_frame");
|
||||||
_div_tv_chframe.setAttribute("idx", _tvCh_idx);
|
_div_tv_chframe.setAttribute("idx", _tvCh_idx);
|
||||||
|
_div_tv_chframe.setAttribute("ch_num", _tvChInfo.number);
|
||||||
|
|
||||||
let _div_tv_chepg = document.createElement('div');
|
let _div_tv_chepg = document.createElement('div');
|
||||||
_div_tv_chepg.setAttribute("class", "tvch_epg");
|
_div_tv_chepg.setAttribute("class", "tvch_epg");
|
||||||
@@ -4315,10 +4343,11 @@ HotelTV.ui_appfull = (function() {
|
|||||||
// TV 메뉴를 종료하고 메인 메뉴로 이동
|
// TV 메뉴를 종료하고 메인 메뉴로 이동
|
||||||
__fxn_exitTvMenu();
|
__fxn_exitTvMenu();
|
||||||
} else if ( __uifxn_Utils_CheckKeyisNumber(event.keyCode)==true ){
|
} else if ( __uifxn_Utils_CheckKeyisNumber(event.keyCode)==true ){
|
||||||
_state.menu.stage.prev = _state.menu.stage.cur;
|
|
||||||
_state.menu.stage.cur = "tvShortcut";
|
|
||||||
//Navigate TV shortcut lists
|
//Navigate TV shortcut lists
|
||||||
__uifxn_AppFull_TVDrawShortCutList(true, "build", event.keyCode);
|
if ( __uifxn_AppFull_TVDrawShortCutList(true, "build", event.keyCode)==0 ){
|
||||||
|
_state.menu.stage.prev = _state.menu.stage.cur;
|
||||||
|
_state.menu.stage.cur = "tvShortcut";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (_state.menu.stage.cur == "tvCtgHide") {
|
} else if (_state.menu.stage.cur == "tvCtgHide") {
|
||||||
if (event.keyCode == gRmtKey.chup) {
|
if (event.keyCode == gRmtKey.chup) {
|
||||||
@@ -4331,10 +4360,11 @@ HotelTV.ui_appfull = (function() {
|
|||||||
// TV 메뉴를 종료하고 메인 메뉴로 이동
|
// TV 메뉴를 종료하고 메인 메뉴로 이동
|
||||||
__fxn_exitTvMenu();
|
__fxn_exitTvMenu();
|
||||||
} else if ( __uifxn_Utils_CheckKeyisNumber(event.keyCode)==true ) {
|
} else if ( __uifxn_Utils_CheckKeyisNumber(event.keyCode)==true ) {
|
||||||
_state.menu.stage.prev = _state.menu.stage.cur;
|
|
||||||
_state.menu.stage.cur = "tvShortcut";
|
|
||||||
//Navigate TV shortcut lists
|
//Navigate TV shortcut lists
|
||||||
__uifxn_AppFull_TVDrawShortCutList(true, "build", event.keyCode);
|
if ( __uifxn_AppFull_TVDrawShortCutList(true, "build", event.keyCode)==0 ){
|
||||||
|
_state.menu.stage.prev = _state.menu.stage.cur;
|
||||||
|
_state.menu.stage.cur = "tvShortcut";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log("event.keyCode::>" + event.keyCode);
|
console.log("event.keyCode::>" + event.keyCode);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user