issue #2 Done room service feature.

This commit is contained in:
Paul Kim
2022-08-30 00:38:43 +09:00
parent 05f5d61c84
commit 08dda21fcd
6 changed files with 61 additions and 60 deletions

View File

@@ -539,39 +539,39 @@ HotelTV.LoadAppFull = async function() {
//STEP#03: INIT HCAP for HotelTV FullAPP
// let tmrAppAuth = setInterval(async function() {
// let _foundNetflix = false;
// let _hcapAppInfo = await HotelTV.hcap.PreAppGetInfo(false);
// HotelTV.state['hcap_app'] = _hcapAppInfo.applist;
// for (_i = 0; _i < HotelTV.state['hcap_app'].length; _i++) {
// if (HotelTV.state['hcap_app'][_i].title == "Netflix") {
// console.log("Found out netflix among of pre hcap app-list.")
// clearInterval(tmrAppAuth);
// }
// }
let tmrAppAuth = setInterval(async function() {
let _foundNetflix = false;
let _hcapAppInfo = await HotelTV.hcap.PreAppGetInfo(false);
HotelTV.state['hcap_app'] = _hcapAppInfo.applist;
for (_i = 0; _i < HotelTV.state['hcap_app'].length; _i++) {
if (HotelTV.state['hcap_app'][_i].title == "Netflix") {
console.log("Found out netflix among of pre hcap app-list.")
clearInterval(tmrAppAuth);
}
}
// if (_foundNetflix == false) {
// try {
// let siAppToken = null;
// let siAppName = null;
// // siApp Token Authentication
// let _progam = HotelTV.tvguide.program;
// for (let _i = 1; _i <= _progam.length; _i++) {
// if (_progam[_i].type == "application" && _progam[_i].service == "netflix") {
// siAppToken = await HotelTV.api.DownloadData(_progam[_i].license.file.download);
// siAppName = _progam[_i].service;
// //siAppToken = _progam[_i].service;
if (_foundNetflix == false) {
try {
let siAppToken = null;
let siAppName = null;
// siApp Token Authentication
let _progam = HotelTV.tvguide.program;
for (let _i = 1; _i <= _progam.length; _i++) {
if (_progam[_i].type == "application" && _progam[_i].service == "netflix") {
siAppToken = await HotelTV.api.DownloadData(_progam[_i].license.file.download);
siAppName = _progam[_i].service;
//siAppToken = _progam[_i].service;
// if (siAppName && siAppToken) {
// HotelTV.hcap.siAppAuth(siAppName, siAppToken, false);
// }
// }
// }
// } catch (_error) {
// console.log("Display Error page for get siApp Auth");
// }
// }
// }, 5000);
if (siAppName && siAppToken) {
HotelTV.hcap.siAppAuth(siAppName, siAppToken, false);
}
}
}
} catch (_error) {
console.log("Display Error page for get siApp Auth");
}
}
}, 5000);
//STEP#05: Set Display size

View File

@@ -495,7 +495,7 @@ HotelTV.ui_appfull = (function() {
_elDiv_OdItmesRec.className = "oditem";
var _elDiv_OdItmesRecName = document.createElement('div');
_elDiv_OdItmesRecName.setAttribute("id", "name");
_elDiv_OdItmesRecName.textContent = __fxn_getRsItemValue(_roomservice.children, "title",
_elDiv_OdItmesRecName.textContent =`[${_j}] ` + __fxn_getRsItemValue(_roomservice.children, "title",
_OdItem.itemId)[_state.lang];
_elDiv_OdItmesRec.appendChild(_elDiv_OdItmesRecName);
@@ -860,6 +860,9 @@ HotelTV.ui_appfull = (function() {
}
const __fxn_close_RsPopup = function(_fxn_post_process) {
// 아이템 디스크립션(메뉴 오른쪽) 하이드
__uifxn_AppFull_DrawRoomservceItemDescription(false);
_elRsPupRoot.animate({ top: 96, left: -560 }, 500, () => {
// 아이탬 테이블 스크롤 맨 위로 이동
_elRsMnItmTbl.animate({ scrollTop: 0 }, 200);
@@ -942,6 +945,7 @@ HotelTV.ui_appfull = (function() {
_state.hotkey.mm[_roomservice.button].status.button.idx = null;
_state.hotkey.mm[_roomservice.button].status.focus = "menu";
_elRsMnItmTbl.children('tr').eq(_state.hotkey.mm[_roomservice.button].status.menu.idx).addClass('active');
__uifxn_AppFull_DrawRoomservceItemDescription(true);
}
} else {
_state.hotkey.mm[_roomservice.button].status.button.idx = null;
@@ -1157,7 +1161,7 @@ HotelTV.ui_appfull = (function() {
let _elRsMnItemTblHdr = _elRsMnItems.children('.tbl_header').children('tbody');
let _elRsMnItemTblRec = _elRsMnItems.children('.tbl_record').children('tbody');
// Drawing Item Table Headers
_elRsMnItemTblHdr.children('tr').children('th#type').text(`${_trTbl.ui.roomservice.title.item[_state.lang]}[${_roomservice.children.length}]`);
_elRsMnItemTblHdr.children('tr').children('th#type').text(`${_trTbl.ui.roomservice.title.item[_state.lang]} [${_roomservice.children.length}]`);
_elRsMnItemTblHdr.children('tr').children('th#quantity').text(_trTbl.ui.roomservice.title.quantity[_state.lang]);
// Delete elements under room service item table