diff --git a/procentric/application/app_hoteltv_full.html b/procentric/application/app_hoteltv_full.html
index ecac9af..d7b8415 100755
--- a/procentric/application/app_hoteltv_full.html
+++ b/procentric/application/app_hoteltv_full.html
@@ -110,6 +110,7 @@
+
diff --git a/procentric/application/hoteltv.app.full.mm.flight.css b/procentric/application/hoteltv.app.full.mm.flight.css
index 61b4750..359d28f 100755
--- a/procentric/application/hoteltv.app.full.mm.flight.css
+++ b/procentric/application/hoteltv.app.full.mm.flight.css
@@ -1,5 +1,5 @@
/* =============================
- Main Menu Flight Format
+ Main Menu Flight Format
*/
.main .mm .flight {
@@ -18,9 +18,33 @@
display: none;
}
+.main .mm .flight .departure {
+ width: 50%;
+ height: 100%;
+ position: absolute;
+}
+
+.main .mm .flight .arrival {
+ left: 52%;
+ width: 50%;
+ height: 100%;
+ position: absolute;
+}
+
.main .mm .flight #title {
font-size: 40px;
color: rgb(235, 235, 235);
+ height: 46px;
+}
+
+.main .mm .flight .departure #title {
+ text-align:left;
+ margin-left:10px;
+}
+
+.main .mm .flight .arrival #title {
+ text-align:right;
+ margin-right:50px;
}
.main .mm .flight table {
@@ -38,6 +62,26 @@
overflow: auto;
}
+.main .mm .flight #border_table_bottom {
+ position:absolute;
+ top:560px;
+ margin-left:10px;
+ width:900px;
+ height:20px;
+ background-color: rgba(0,0,0,0.4);
+ border-bottom-left-radius: 10px;
+ border-bottom-right-radius: 10px;
+}
+
+.main .mm .flight #caution {
+ top: 590px;
+ width: 99%;
+ height:50px;
+ text-align: right;
+ color:rgb(180,180,190);
+ position: absolute;
+}
+
/* .main .mm .flight table::-webkit-scrollbar {
display: none;
diff --git a/procentric/application/lib/hoteltv.js b/procentric/application/lib/hoteltv.js
index 3711383..2e1a67d 100755
--- a/procentric/application/lib/hoteltv.js
+++ b/procentric/application/lib/hoteltv.js
@@ -36,6 +36,12 @@ var HotelTV = HotelTV || {
'prev': null,
},
},
+ 'flight': {
+ 'cur_location': null,
+ },
+ 'weather': {
+ 'default_location': null,
+ },
'media': {
'playing': false,
},
@@ -609,10 +615,10 @@ HotelTV.LoadAppFull = async function() {
}
} else if (recvMsg.event == "update_flight") {
if (recvMsg.ret === "OK") {
- HotelTV.flight = { "count": recvMsg.data.count, "info": recvMsg.data.items };
+ HotelTV.flight =recvMsg.data;
}
} else if (recvMsg.event == "update_weather") {
-
+ //
} else if (recvMsg.event == "update_report") {
HotelTV.hcap.GetUptime();
HotelTV.hcap.GetDeviceUsage().then(_usage => {
diff --git a/procentric/application/lib/hoteltv.service.js b/procentric/application/lib/hoteltv.service.js
index 7f93fe4..68635fc 100755
--- a/procentric/application/lib/hoteltv.service.js
+++ b/procentric/application/lib/hoteltv.service.js
@@ -6,7 +6,7 @@
* @summary short description for the file
* @author Joel
*
- * Created at : 2020-11-26 02:21:56
+ * Created at : 2020-11-26 02:21:56
* Last modified : 2020-11-26 15:31:40
*/
// importScripts('./lib/hoteltv.js');
@@ -33,7 +33,7 @@ function __svcfxn_get_base_url() {
}
/**
- * API Wrapper Function::>
+ * API Wrapper Function::>
* @param {string} api_type api type.
* @param {callback} callback is callback object
*/
@@ -238,7 +238,12 @@ async function sworker_service(args) {
}
if (_bNeed_Update.weather == true) {
- g_port.postMessage({ "event": "update_weather", "ret": "OK", "data": _bNeed_Update.weather });
+ let sz_api_url = __svcfxn_get_api_url("get_flight");
+ __svcfxn_CallCmsApi(sz_api_url, "GetFlight", null).then(_result => {
+ g_port.postMessage({ "event": "update_weather", "ret": "OK", "data": JSON.parse(_result.data) });
+ }).catch(_error => {
+ g_port.postMessage({ "event": "update_weather", "ret": "ERROR", "data": null });
+ });
}
if (_bNeed_Update.report == true) {
diff --git a/procentric/application/lib/hoteltv.ui_appfull.js b/procentric/application/lib/hoteltv.ui_appfull.js
index 65817a8..8ff7ecf 100755
--- a/procentric/application/lib/hoteltv.ui_appfull.js
+++ b/procentric/application/lib/hoteltv.ui_appfull.js
@@ -9,6 +9,28 @@
* Created at : 2020-11-26 02:21:56
* Last modified : 2020-11-26 15:31:40
*/
+const gRmtKey = {
+ left: 37,
+ right: 39,
+ up: 38,
+ down: 40,
+ enter: 13,
+ back: 461,
+ red: 403,
+ green: 404,
+ yellow: 405,
+ blue: 406,
+ stop: 413,
+ play: 415,
+
+ /** ENNPLE SPECIAL KEY */
+ amenity: -2072433963,
+ roomservice: -2072437788,
+ flight: -2072437533,
+ weather: -2072438298,
+ tv: -2072443143,
+}
+
HotelTV.namespace('HotelTV.ui_appfull');
HotelTV.ui_appfull = (function() {
@@ -2690,19 +2712,19 @@ HotelTV.ui_appfull = (function() {
$(document.activeElement).keydown(function(event) { //attach event listener
if (_state.menu.stage == "mypage") {
- if (event.keyCode == 37) {
+ if (event.keyCode == gRmtKey.left) {
$('#lst_mypagesel').trigger('prev.owl')
$('#lst_mypagebg').trigger('prev.owl')
- } else if (event.keyCode == 39) {
+ } else if (event.keyCode == gRmtKey.right) {
$('#lst_mypagesel').trigger('next.owl')
$('#lst_mypagebg').trigger('next.owl')
} else if (event.keyCode == 38) {
//UP
__uifxn_AppFull_MyPageSelectMessage("up");
- } else if (event.keyCode == 40) {
+ } else if (event.keyCode == gRmtKey.down) {
//DOWN
__uifxn_AppFull_MyPageSelectMessage("down");
- } else if (event.keyCode == 13) {
+ } else if (event.keyCode == gRmtKey.enter) {
// 메시지 팝업 빌드 및 화면 전환
if (HotelTV.tvguide.program[_mmIdx].children[_state.menu.main[_mmIdx].cur].type == 'message') {
let _msginf = HotelTV.message;
@@ -2762,7 +2784,7 @@ HotelTV.ui_appfull = (function() {
});
}
}
- } else if (event.keyCode == 461) {
+ } else if (event.keyCode == gRmtKey.back) {
// 메인 메뉴로 귀환
$(document.activeElement).off('keydown');
$('.main .mm').show(function() {
@@ -2788,7 +2810,7 @@ HotelTV.ui_appfull = (function() {
console.log("MYPAGE KEYEVT: Skip events::>" + event.keyCode);
}
} else if (_state.menu.stage == "popup_message_card") {
- if (event.keyCode == 461) {
+ if (event.keyCode == gRmtKey.back) {
if ($('.popup>.mypage>.message').css('display') != "none") {
$('.popup>.mypage>.message').fadeOut(500, function() {
_state.menu.stage = "mypage";
@@ -3405,11 +3427,11 @@ HotelTV.ui_appfull = (function() {
$(document.activeElement).keydown(function(event) { //attach event listener
if (_state.menu.stage == "sub") {
- if (event.keyCode == 37) {
+ if (event.keyCode == gRmtKey.left) {
$('#lst_smsel').trigger('prev.owl', 700);
- } else if (event.keyCode == 39) {
+ } else if (event.keyCode == gRmtKey.right) {
$('#lst_smsel').trigger('next.owl', 700);
- } else if (event.keyCode == 13) {
+ } else if (event.keyCode == gRmtKey.enter) {
// 콘텐트 리스트 화면 빌드 및 화면 전환
let _program = HotelTV.tvguide.program;
let _mmIdx = _state.menu.main.cur;
@@ -3422,7 +3444,7 @@ HotelTV.ui_appfull = (function() {
__uifxn_AppFull_BldPage_CtzGeneral();
}
}
- } else if (event.keyCode == 461) {
+ } else if (event.keyCode == gRmtKey.back) {
// 컨텐트 폼의 백그라운드 에니메이션용 타이머 제거
if (_hndl_tmrCtzBgAni != null) {
clearInterval(_hndl_tmrCtzBgAni);
@@ -3463,11 +3485,11 @@ HotelTV.ui_appfull = (function() {
});
}
} else if (_state.menu.stage == "ctzgen") {
- if (event.keyCode == 37) {
+ if (event.keyCode == gRmtKey.left) {
$('#lst_ctzgenbg').trigger('prev.owl', 700);
- } else if (event.keyCode == 39) {
+ } else if (event.keyCode == gRmtKey.right) {
$('#lst_ctzgenbg').trigger('next.owl', 700);
- } else if (event.keyCode == 461) {
+ } else if (event.keyCode == gRmtKey.back) {
$('.main .sub').show();
$('.main').animate({ top: -1080, left: 0 }, 1000, () => {
$('.main .ctzgen').hide();
@@ -3484,7 +3506,7 @@ HotelTV.ui_appfull = (function() {
_state.menu.stage = "sub";
$('#lst_smsel').trigger('translate.owl.carousel', [0]);
});
- } else if (event.keyCode == 415) {
+ } else if (event.keyCode == gRmtKey.start) {
if ($('.main .ctzgen .bg .owl-carousel .owl-item.active .ctz_mv_ctrl').length == 1) {
let uri_video = $($('.main .ctzgen .bg .owl-carousel .owl-item.active .ctz_mv_ctrl')[0]).attr('video_url');
if (uri_video != null) {
@@ -3502,7 +3524,7 @@ HotelTV.ui_appfull = (function() {
);
}
}
- } else if (event.keyCode == 413) {
+ } else if (event.keyCode == gRmtKey.stop) {
if (_state.media.playing == true) {
_state.media.playing = false;
HotelTV.hcap.MediaStop(
@@ -3720,9 +3742,9 @@ HotelTV.ui_appfull = (function() {
$(document.activeElement).keydown(function(event) { //attach event listener
if (_state.menu.stage == "tvCtgShow") {
- if (event.keyCode == 37) {
+ if (event.keyCode == gRmtKey.left) {
$('#lst_tvCtgbg').trigger('prev.owl', [1000])
- } else if (event.keyCode == 39) {
+ } else if (event.keyCode == gRmtKey.right) {
$('#lst_tvCtgbg').trigger('next.owl', [1000])
} else if (event.keyCode == 38 || event.keyCode == 427) {
// 채널 리스트 아이탬 이동(UP)
@@ -3736,7 +3758,7 @@ HotelTV.ui_appfull = (function() {
__uifxn_AppFull_TVUpdateChList("ch_up");
}
- } else if (event.keyCode == 40 || event.keyCode == 428) {
+ } else if (event.keyCode == gRmtKey.down || event.keyCode == 428) {
// 채널 리스트 아이탬 이동(DOWN)
let _mmIdx = _state.menu.main.cur;
let _curChCtg = _state.menu.main[_mmIdx].cur;
@@ -3748,10 +3770,10 @@ HotelTV.ui_appfull = (function() {
__uifxn_AppFull_TVUpdateChList("ch_down");
}
- } else if (event.keyCode == 13) {
+ } else if (event.keyCode == gRmtKey.enter) {
// TV채널 플레이
- } else if (event.keyCode == 461) {
+ } else if (event.keyCode == gRmtKey.back) {
// 현재 재생중인 TV채널 종료
HotelTV.hcap.ChannelShutDown();
@@ -3810,7 +3832,7 @@ HotelTV.ui_appfull = (function() {
__uifxn_AppFull_TVUpdateChList("ch_down");
}
- } else if (event.keyCode == 461) {
+ } else if (event.keyCode == gRmtKey.back) {
// 현재 재생중인 TV채널 종료
HotelTV.hcap.ChannelShutDown();
@@ -4113,22 +4135,23 @@ HotelTV.ui_appfull = (function() {
//Shows Up Flight Contents
if (_program[(_evt.page.index + 1)].type == "flight") {
- if ($('.main .mm .flight').css("display") == "none") {
- $('.main .mm .flight').fadeIn(1000, () => {
+ if ($(`.main .mm #flight_${_program[(_evt.page.index + 1)].location}`).css("display") == "none") {
+ $(`.main .mm #flight_${_program[(_evt.page.index + 1)].location}`).fadeIn(1000, () => {
$(document.activeElement).keydown(function(_evt) {
let _curPos = 0;
let _maxHeight = 0;
switch (_evt.keyCode) {
- case 38:
- _curPos = $('.main .mm .flight .departure tbody#record').scrollTop();
- _maxHeight = $('.main .mm .flight .departure tbody#record')[0].scrollHeight;
+ case gRmtKey.up:
+ _curPos = $(`.main .mm #flight_${_program[_state.menu.main.cur].location} .departure tbody#record`).scrollTop();
+ _maxHeight = $(`.main .mm #flight_${_program[_state.menu.main.cur].location} .departure tbody#record`)[0].scrollHeight;
_curPos = (_curPos - 50) < 0 ? 0 : (_curPos - 50);
$('.main .mm .flight tbody#record').scrollTop(_curPos);
break;
- case 40:
- _curPos = $('.main .mm .flight .departure tbody#record').scrollTop();
- _maxHeight = $('.main .mm .flight .departure tbody#record')[0].scrollHeight;
+
+ case gRmtKey.down:
+ _curPos = $(`.main .mm #flight_${_program[_state.menu.main.cur].location} .departure tbody#record`).scrollTop();
+ _maxHeight = $(`.main .mm #flight_${_program[_state.menu.main.cur].location} .departure tbody#record`)[0].scrollHeight;
_curPos = (_curPos + 50) > _maxHeight ? _maxHeight : (_curPos + 50);
$('.main .mm .flight tbody#record').scrollTop(_curPos);
break;
@@ -4137,14 +4160,17 @@ HotelTV.ui_appfull = (function() {
});
}
} else {
- if ($('.main .mm .flight').css("display") != "none") {
- if ($(".main .mm .flight tbody#record").length > 0) {
- $('.main .mm .flight tbody#record').scrollTop(0);
+ $('.main .mm .flight').each(function (index, docObjFlight) {
+ console.log(index);
+ if ( $(docObjFlight).css("display")!="none" ){
+ if ( $(docObjFlight).find('#record').length>0 ){
+ $(docObjFlight).find('#record').scrollTop(0);
+ }
+ $(docObjFlight).fadeOut(300, () => {
+ $(document.activeElement).off('keydown');
+ });
}
- $('.main .mm .flight').fadeOut(300, () => {
- $(document.activeElement).off('keydown');
- });
- }
+ });
}
$('#lst_mmbg').trigger("to.owl.carousel", [_evt.page.index, 1000, true]);
}
@@ -4155,7 +4181,9 @@ HotelTV.ui_appfull = (function() {
* @param {boolean} _en show/hide
*/
function __uifxn_AppFull_TopWidjet_BuildWeather() {
- let _weather = HotelTV.weather;
+ const _state = HotelTV.state;
+ let _weather = HotelTV.weather[_state.weather.default_location];
+
$('.widjet .top .weather #icon').css({ "background-image": "url(" + _weather.smallicon_image[_weather.item.condition.code] + ")" });
$('.widjet .top .weather #temp').text(_weather.item.condition.temp + "°C");
$('.widjet .top .weather').show();
@@ -4213,148 +4241,357 @@ HotelTV.ui_appfull = (function() {
* HotelTV UI Wrapper Function::> Build Main Menu::> Flight
*/
function __uifxn_AppFull_MM_BldFlight() {
- let _flight = HotelTV.flight;
let _state = HotelTV.state;
+ let _program = HotelTV.tvguide.program;
let _trTbl = HotelTV.translation;
let _curDaTm = new Date();
- const ar_tdItem = ['airline', 'flight', 'scheduled', 'origin', 'destination', 'type', 'gate', 'status']
+ const ar_tdItem = ['airline', 'flight', 'scheduled', 'origin', 'destination', 'type', 'gate', 'status'];
+
+ let _elFlightRoot = document.querySelector('.main .mm');
+ for (let _mm_idx = 1; _mm_idx <= _program.length; _mm_idx++) {
+ if ( _program[_mm_idx].type=="flight" ){
+ let _flight = HotelTV.flight[_program[_mm_idx].location];
+ _hndl_flight_elm = $(`.main .mm #flight_${_program[_mm_idx].location}`);
+ if ( _hndl_flight_elm.length==0 )
+ {
+ let _div_flight_item = document.createElement('div');
+ _div_flight_item.setAttribute("id", "flight_" + _program[_mm_idx].location );
+ _div_flight_item.setAttribute("class", "flight");
+
+ // 1. Departure DIV 생성
+ let _div_departure_item = document.createElement('div');
+ _div_departure_item.setAttribute("class", "departure");
+ // 1.1 Departure TITLE DIV 생성
+ let _div_departure_title_item = document.createElement('div');
+ _div_departure_title_item.setAttribute("id", "title");
+ _div_departure_title_item.innerText = _trTbl.ui.flight.title.departure[_state.lang] + "["+_flight.location+"]";
+ _div_departure_item.appendChild(_div_departure_title_item);
+
+ // 1.2 Departure Table 생성
+ // 1.2.1. Table HDR 생성
+ let _departure_tblhdr = document.createElement('table');
+ _departure_tblhdr.setAttribute("class", "tbl_header");
+ _departure_tblhdr.innerHTML = '' +
+ '| ' + _trTbl.ui.flight.title.airline[_state.lang] + ' | ' +
+ '' + _trTbl.ui.flight.title.flight_no[_state.lang] + ' | ' +
+ '' + _trTbl.ui.flight.title.scheduled[_state.lang] + ' | ' +
+ '' + _trTbl.ui.flight.title.origin[_state.lang] + ' | ' +
+ '' + _trTbl.ui.flight.title.destination[_state.lang] + ' | ' +
+ '' + _trTbl.ui.flight.title.destination[_state.lang] + ' | ' +
+ '' + _trTbl.ui.flight.title.boarding_gate[_state.lang] + ' | ' +
+ '' + _trTbl.ui.flight.status[_state.lang] + ' | ' +
+ '
';
+ _div_departure_item.appendChild(_departure_tblhdr);
+
+ // 1.2.2. Table REC 생성
+ let _departure_tblrec = document.createElement('table');
+ _departure_tblrec.setAttribute("class", "tbl_record");
+ _departure_tblrec.innerHTML = '';
+ _div_departure_item.appendChild(_departure_tblrec);
+
+ // 1.3. Border Table Bottom DIV 생성
+ let _div_departure_border_item = document.createElement('div');
+ _div_departure_border_item.setAttribute("id", "border_table_bottom");
+ _div_departure_item.appendChild(_div_departure_border_item);
+
+ _div_flight_item.appendChild(_div_departure_item);
- $('.main .mm .flight .departure #title').text(_trTbl.ui.flight.title.departure[_state.lang]);
- $('.main .mm .flight .arrival #title').text(_trTbl.ui.flight.title.arrival[_state.lang]);
+ // 2. Arrive DIV 생성
+ let _div_arrival_item = document.createElement('div');
+ _div_arrival_item.setAttribute("class", "arrival");
+ // 2.1 Arrive TITLE DIV 생성
+ let _div_arrive_title_item = document.createElement('div');
+ _div_arrive_title_item.setAttribute("id", "title");
+ _div_arrive_title_item.innerText = _trTbl.ui.flight.title.arrival[_state.lang] + "["+_flight.location+"]";
+ _div_arrival_item.appendChild(_div_arrive_title_item);
- let _tblHdr = $('.main .mm .flight table th')
- for (let _i = 0; _i < _tblHdr.length; ++_i) {
- if (_tblHdr[_i].id == "airline") {
- _tblHdr[_i].innerText = _trTbl.ui.flight.title.airline[_state.lang];
- } else if (_tblHdr[_i].id == "flight") {
- _tblHdr[_i].innerText = _trTbl.ui.flight.title.flight_no[_state.lang];
- } else if (_tblHdr[_i].id == "scheduled") {
- _tblHdr[_i].innerText = _trTbl.ui.flight.title.scheduled[_state.lang];
- } else if (_tblHdr[_i].id == "origin") {
- _tblHdr[_i].innerText = _trTbl.ui.flight.title.origin[_state.lang];
- } else if (_tblHdr[_i].id == "destination") {
- _tblHdr[_i].innerText = _trTbl.ui.flight.title.destination[_state.lang];
- } else if (_tblHdr[_i].id == "type") {
- _tblHdr[_i].innerText = _trTbl.ui.flight.title.classification[_state.lang];
- } else if (_tblHdr[_i].id == "gate") {
- _tblHdr[_i].innerText = _trTbl.ui.flight.title.boarding_gate[_state.lang];
- } else if (_tblHdr[_i].id == "status") {
- _tblHdr[_i].innerText = _trTbl.ui.flight.status[_state.lang];
- }
- }
+ // 2.2 Departure Table 생성
+ // 2.2.1. Table HDR 생성
+ let _arrival_tblhdr = document.createElement('table');
+ _arrival_tblhdr.setAttribute("class", "tbl_header");
+ _arrival_tblhdr.innerHTML = '' +
+ '| ' + _trTbl.ui.flight.title.airline[_state.lang] + ' | ' +
+ '' + _trTbl.ui.flight.title.flight_no[_state.lang] + ' | ' +
+ '' + _trTbl.ui.flight.title.scheduled[_state.lang] + ' | ' +
+ '' + _trTbl.ui.flight.title.origin[_state.lang] + ' | ' +
+ '' + _trTbl.ui.flight.title.destination[_state.lang] + ' | ' +
+ '' + _trTbl.ui.flight.title.destination[_state.lang] + ' | ' +
+ '' + _trTbl.ui.flight.title.boarding_gate[_state.lang] + ' | ' +
+ '' + _trTbl.ui.flight.status[_state.lang] + ' | ' +
+ '
';
+ _div_arrival_item.appendChild(_arrival_tblhdr);
- //Delete all table record for departure & arrival
- let _el_departure_tbl_rec = document.querySelector('.main .mm .flight .departure table #record');
- let _el_arrival_tbl_rec = document.querySelector('.main .mm .flight .arrival table #record');
+ // 2.2.2. Table REC 생성
+ let _arrival_tblrec = document.createElement('table');
+ _arrival_tblrec.setAttribute("class", "tbl_record");
+ _arrival_tblrec.innerHTML = '';
+ _div_arrival_item.appendChild(_arrival_tblrec);
- //Delete all table record for departure & arrival
- $('.main .mm .flight .departure table tr#record').remove();
- $('.main .mm .flight .arrival table tr#record').remove();
+ // 2.3. Border Table Bottom DIV 생성
+ let _div_arrival_border_item = document.createElement('div');
+ _div_arrival_border_item.setAttribute("id", "border_table_bottom");
+ _div_arrival_item.appendChild(_div_arrival_border_item);
- for (let _i = 0; _i < _flight.count; _i++) {
- let _schOrg = new Date();
- let _schEdt = new Date();
- let _flitem = _flight.items[_i];
+ _div_flight_item.appendChild(_div_arrival_item);
- //let _sTmOrg = _flitem.std.length != 4 ? null : ;
- //let _sTmChanged = _flitem.etd;
+ //3 Caution 추가
+ let _div_caution_item = document.createElement('div');
+ _div_caution_item.setAttribute("id", "caution");
+ _div_flight_item.appendChild(_div_caution_item);
- if (_flitem.std.length != 4) {
- console.log("Flight Schedule org time is NULL");
- } else {
- _schOrg.setHours(Number(_flitem.std.charAt(0) + _flitem.std.charAt(1)));
- _schOrg.setMinutes(Number(_flitem.std.charAt(2) + _flitem.std.charAt(3)));
- }
-
- if (_flitem.std.length != 4) {
- console.log("Flight Schedule edited time is NULL");
- } else {
- _schEdt.setHours(Number(_flitem.std.charAt(0) + _flitem.std.charAt(1)));
- _schEdt.setMinutes(Number(_flitem.std.charAt(2) + _flitem.std.charAt(3)));
- }
-
-
-
- let diffMs = (_schOrg - _curDaTm); // milliseconds between now & Christmas
- // let diffDays = Math.floor(diffMs / 86400000); // days
- // let diffHrs = Math.floor((diffMs % 86400000) / 3600000); // hours
- // let diffMins = Math.round(((diffMs % 86400000) % 3600000) / 60000); // minutes
- // console.log(diffDays + " days, " + diffHrs + " hours, " + diffMins + " minutes");
- let diffMins = Math.round(diffMs / 60000);
- //console.log("TDiff::> " + diffMins);
-
- if ((-60 < diffMins) && (diffMins < 120)) {
- if (_flitem.io == "O") {
- let _el_tr = document.createElement('tr');
- _el_tr.setAttribute("id", "record");
- ar_tdItem.forEach(_itm => {
- let _el_td = document.createElement('td');
- _el_td.setAttribute("id", _itm);
- if (_itm == "airline") {
- _el_td.innerText = HotelTV.ui_utils.Get_Airline(_trTbl.ui.flight.airlines, _flitem.airline, _state.lang);
- } else if (_itm == "flight") {
- _el_td.innerText = _flitem.airFln;
- } else if (_itm == "scheduled") {
- _el_td.innerText = _flitem.std.charAt(0) + _flitem.std.charAt(1) + ":" + _flitem.std.charAt(2) + _flitem.std.charAt(3) + " - ";
- _el_td.innerText += _flitem.etd.charAt(0) + _flitem.etd.charAt(1) + ":" + _flitem.etd.charAt(2) + _flitem.etd.charAt(3);
- } else if (_itm == "origin") {
- _el_td.innerText = HotelTV.ui_utils.Get_Airport(_trTbl.ui.flight.city, _flitem.boarding, _state.lang);
- } else if (_itm == "destination") {
- _el_td.innerText = HotelTV.ui_utils.Get_Airport(_trTbl.ui.flight.city, _flitem.arrived, _state.lang);
- } else if (_itm == "type") {
- _el_td.innerText = _trTbl.ui.flight.line[_flitem.line][_state.lang];
- } else if (_itm == "gate") {
- _el_td.innerText = _flitem.gate;
- } else if (_itm == "status") {
- _el_td.innerText = HotelTV.ui_utils.Get_FlightStatus(_trTbl.ui.flight.result, _flitem.rmk, _state.lang);
- }
- _el_tr.appendChild(_el_td);
- });
- _el_departure_tbl_rec.appendChild(_el_tr);
- } else {
- let _el_tr = document.createElement('tr');
- _el_tr.setAttribute("id", "record");
- ar_tdItem.forEach(_itm => {
- let _el_td = document.createElement('td');
- _el_td.setAttribute("id", _itm);
- if (_itm == "airline") {
- _el_td.innerText = HotelTV.ui_utils.Get_Airline(_trTbl.ui.flight.airlines, _flitem.airline, _state.lang);
- } else if (_itm == "flight") {
- _el_td.innerText = _flitem.airFln;
- } else if (_itm == "scheduled") {
- _el_td.innerText = _flitem.std.charAt(0) + _flitem.std.charAt(1) + ":" + _flitem.std.charAt(2) + _flitem.std.charAt(3) + " - ";
- _el_td.innerText += _flitem.etd.charAt(0) + _flitem.etd.charAt(1) + ":" + _flitem.etd.charAt(2) + _flitem.etd.charAt(3);
- } else if (_itm == "origin") {
- _el_td.innerText = HotelTV.ui_utils.Get_Airport(_trTbl.ui.flight.city, _flitem.boarding, _state.lang);
- } else if (_itm == "destination") {
- _el_td.innerText = HotelTV.ui_utils.Get_Airport(_trTbl.ui.flight.city, _flitem.arrived, _state.lang);
- } else if (_itm == "type") {
- if (_trTbl.ui.flight.line[_flitem.line]) {
- _el_td.innerText = _trTbl.ui.flight.line[_flitem.line][_state.lang];
- }
- } else if (_itm == "gate") {
- _el_td.innerText = _flitem.gate;
- } else if (_itm == "status") {
- _el_td.innerText = HotelTV.ui_utils.Get_FlightStatus(_trTbl.ui.flight.result, _flitem.rmk, _state.lang);
- }
- _el_tr.appendChild(_el_td);
- });
- _el_arrival_tbl_rec.appendChild(_el_tr);
+ // 생성된 Flight를 .main .mm 아래애 추가
+ _elFlightRoot.appendChild(_div_flight_item);
}
+
+
+ //Delete all table record for departure & arrival
+ if ( $(`.main .mm #flight_${_program[_mm_idx].location} .departure table #record tr`).children().length>0 ){
+ $(`.main .mm #flight_${_program[_mm_idx].location} .departure table #record tr`).remove();
+ }
+ if ( $(`.main .mm #flight_${_program[_mm_idx].location} .arrival table #record tr`).children().length>0 ){
+ $(`.main .mm #flight_${_program[_mm_idx].location} .arrival table #record tr`).remove();
+ }
+
+ let _el_departure_tbl_rec = $(`.main .mm #flight_${_program[_mm_idx].location} .departure table #record`);
+ let _el_arrival_tbl_rec = $(`.main .mm #flight_${_program[_mm_idx].location} .arrival table #record`);
+
+ for (let _i = 0; _i < _flight.count; _i++) {
+ let _schOrg = new Date();
+ let _schEdt = new Date();
+ let _flitem = _flight.items[_i];
+
+ //let _sTmOrg = _flitem.std.length != 4 ? null : ;
+ //let _sTmChanged = _flitem.etd;
+
+ if (_flitem.std.length != 4) {
+ console.log("Flight Schedule org time is NULL");
+ } else {
+ _schOrg.setHours(Number(_flitem.std.charAt(0) + _flitem.std.charAt(1)));
+ _schOrg.setMinutes(Number(_flitem.std.charAt(2) + _flitem.std.charAt(3)));
+ }
+
+ if (_flitem.std.length != 4) {
+ console.log("Flight Schedule edited time is NULL");
+ } else {
+ _schEdt.setHours(Number(_flitem.std.charAt(0) + _flitem.std.charAt(1)));
+ _schEdt.setMinutes(Number(_flitem.std.charAt(2) + _flitem.std.charAt(3)));
+ }
+
+
+
+ let diffMs = (_schOrg - _curDaTm); // milliseconds between now & Christmas
+ // let diffDays = Math.floor(diffMs / 86400000); // days
+ // let diffHrs = Math.floor((diffMs % 86400000) / 3600000); // hours
+ // let diffMins = Math.round(((diffMs % 86400000) % 3600000) / 60000); // minutes
+ // console.log(diffDays + " days, " + diffHrs + " hours, " + diffMins + " minutes");
+ let diffMins = Math.round(diffMs / 60000);
+ //console.log("TDiff::> " + diffMins);
+
+ if ((-60 < diffMins) && (diffMins < 120)) {
+ if (_flitem.io == "O") {
+ let _el_tr = document.createElement('tr');
+ _el_tr.setAttribute("id", "record");
+ ar_tdItem.forEach(_itm => {
+ let _el_td = document.createElement('td');
+ _el_td.setAttribute("id", _itm);
+ if (_itm == "airline") {
+ _el_td.innerText = HotelTV.ui_utils.Get_Airline(_trTbl.ui.flight.airlines, _flitem.airline, _state.lang);
+ } else if (_itm == "flight") {
+ _el_td.innerText = _flitem.airFln;
+ } else if (_itm == "scheduled") {
+ _el_td.innerText = _flitem.std.charAt(0) + _flitem.std.charAt(1) + ":" + _flitem.std.charAt(2) + _flitem.std.charAt(3) + " - ";
+ _el_td.innerText += _flitem.etd.charAt(0) + _flitem.etd.charAt(1) + ":" + _flitem.etd.charAt(2) + _flitem.etd.charAt(3);
+ } else if (_itm == "origin") {
+ _el_td.innerText = HotelTV.ui_utils.Get_Airport(_trTbl.ui.flight.city, _flitem.boarding, _state.lang);
+ } else if (_itm == "destination") {
+ _el_td.innerText = HotelTV.ui_utils.Get_Airport(_trTbl.ui.flight.city, _flitem.arrived, _state.lang);
+ } else if (_itm == "type") {
+ _el_td.innerText = _trTbl.ui.flight.line[_flitem.line][_state.lang];
+ } else if (_itm == "gate") {
+ _el_td.innerText = _flitem.gate;
+ } else if (_itm == "status") {
+ _el_td.innerText = HotelTV.ui_utils.Get_FlightStatus(_trTbl.ui.flight.result, _flitem.rmk, _state.lang);
+ }
+ _el_tr.appendChild(_el_td);
+ });
+ _el_departure_tbl_rec.append(_el_tr);
+ } else {
+ let _el_tr = document.createElement('tr');
+ _el_tr.setAttribute("id", "record");
+ ar_tdItem.forEach(_itm => {
+ let _el_td = document.createElement('td');
+ _el_td.setAttribute("id", _itm);
+ if (_itm == "airline") {
+ _el_td.innerText = HotelTV.ui_utils.Get_Airline(_trTbl.ui.flight.airlines, _flitem.airline, _state.lang);
+ } else if (_itm == "flight") {
+ _el_td.innerText = _flitem.airFln;
+ } else if (_itm == "scheduled") {
+ _el_td.innerText = _flitem.std.charAt(0) + _flitem.std.charAt(1) + ":" + _flitem.std.charAt(2) + _flitem.std.charAt(3) + " - ";
+ _el_td.innerText += _flitem.etd.charAt(0) + _flitem.etd.charAt(1) + ":" + _flitem.etd.charAt(2) + _flitem.etd.charAt(3);
+ } else if (_itm == "origin") {
+ _el_td.innerText = HotelTV.ui_utils.Get_Airport(_trTbl.ui.flight.city, _flitem.boarding, _state.lang);
+ } else if (_itm == "destination") {
+ _el_td.innerText = HotelTV.ui_utils.Get_Airport(_trTbl.ui.flight.city, _flitem.arrived, _state.lang);
+ } else if (_itm == "type") {
+ if (_trTbl.ui.flight.line[_flitem.line]) {
+ _el_td.innerText = _trTbl.ui.flight.line[_flitem.line][_state.lang];
+ }
+ } else if (_itm == "gate") {
+ _el_td.innerText = _flitem.gate;
+ } else if (_itm == "status") {
+ _el_td.innerText = HotelTV.ui_utils.Get_FlightStatus(_trTbl.ui.flight.result, _flitem.rmk, _state.lang);
+ }
+ _el_tr.appendChild(_el_td);
+ });
+ _el_arrival_tbl_rec.append(_el_tr);
+ }
+ }
+ }
+ $(`.main .mm #flight_${_program[_mm_idx].location} #caution`).text(_trTbl.ui.flight.caution.body[_state.lang]);
}
}
- $('.main .mm .flight #caution').text(_trTbl.ui.flight.caution.body[_state.lang]);
+
+ // let _elWeatherToday = _elWeatherRoot.children('.today');
+ // let _elWeatherForcast = _elWeatherRoot.children('.forcast');
+ // let _elWeatherCation = _elWeatherRoot.children('#caution');
+
+
+ // $('.main .mm .flight .departure #title').text(_trTbl.ui.flight.title.departure[_state.lang]);
+ // $('.main .mm .flight .arrival #title').text(_trTbl.ui.flight.title.arrival[_state.lang]);
+
+ // let _tblHdr = $('.main .mm .flight table th')
+ // for (let _i = 0; _i < _tblHdr.length; ++_i) {
+ // if (_tblHdr[_i].id == "airline") {
+ // _tblHdr[_i].innerText = _trTbl.ui.flight.title.airline[_state.lang];
+ // } else if (_tblHdr[_i].id == "flight") {
+ // _tblHdr[_i].innerText = _trTbl.ui.flight.title.flight_no[_state.lang];
+ // } else if (_tblHdr[_i].id == "scheduled") {
+ // _tblHdr[_i].innerText = _trTbl.ui.flight.title.scheduled[_state.lang];
+ // } else if (_tblHdr[_i].id == "origin") {
+ // _tblHdr[_i].innerText = _trTbl.ui.flight.title.origin[_state.lang];
+ // } else if (_tblHdr[_i].id == "destination") {
+ // _tblHdr[_i].innerText = _trTbl.ui.flight.title.destination[_state.lang];
+ // } else if (_tblHdr[_i].id == "type") {
+ // _tblHdr[_i].innerText = _trTbl.ui.flight.title.classification[_state.lang];
+ // } else if (_tblHdr[_i].id == "gate") {
+ // _tblHdr[_i].innerText = _trTbl.ui.flight.title.boarding_gate[_state.lang];
+ // } else if (_tblHdr[_i].id == "status") {
+ // _tblHdr[_i].innerText = _trTbl.ui.flight.status[_state.lang];
+ // }
+ // }
+
+ // //Delete all table record for departure & arrival
+ // let _el_departure_tbl_rec = document.querySelector('.main .mm .flight .departure table #record');
+ // let _el_arrival_tbl_rec = document.querySelector('.main .mm .flight .arrival table #record');
+
+ // //Delete all table record for departure & arrival
+ // $('.main .mm .flight .departure table tr#record').remove();
+ // $('.main .mm .flight .arrival table tr#record').remove();
+
+ // for (let _i = 0; _i < _flight.count; _i++) {
+ // let _schOrg = new Date();
+ // let _schEdt = new Date();
+ // let _flitem = _flight.items[_i];
+
+ // //let _sTmOrg = _flitem.std.length != 4 ? null : ;
+ // //let _sTmChanged = _flitem.etd;
+
+ // if (_flitem.std.length != 4) {
+ // console.log("Flight Schedule org time is NULL");
+ // } else {
+ // _schOrg.setHours(Number(_flitem.std.charAt(0) + _flitem.std.charAt(1)));
+ // _schOrg.setMinutes(Number(_flitem.std.charAt(2) + _flitem.std.charAt(3)));
+ // }
+
+ // if (_flitem.std.length != 4) {
+ // console.log("Flight Schedule edited time is NULL");
+ // } else {
+ // _schEdt.setHours(Number(_flitem.std.charAt(0) + _flitem.std.charAt(1)));
+ // _schEdt.setMinutes(Number(_flitem.std.charAt(2) + _flitem.std.charAt(3)));
+ // }
+
+
+
+ // let diffMs = (_schOrg - _curDaTm); // milliseconds between now & Christmas
+ // // let diffDays = Math.floor(diffMs / 86400000); // days
+ // // let diffHrs = Math.floor((diffMs % 86400000) / 3600000); // hours
+ // // let diffMins = Math.round(((diffMs % 86400000) % 3600000) / 60000); // minutes
+ // // console.log(diffDays + " days, " + diffHrs + " hours, " + diffMins + " minutes");
+ // let diffMins = Math.round(diffMs / 60000);
+ // //console.log("TDiff::> " + diffMins);
+
+ // if ((-60 < diffMins) && (diffMins < 120)) {
+ // if (_flitem.io == "O") {
+ // let _el_tr = document.createElement('tr');
+ // _el_tr.setAttribute("id", "record");
+ // ar_tdItem.forEach(_itm => {
+ // let _el_td = document.createElement('td');
+ // _el_td.setAttribute("id", _itm);
+ // if (_itm == "airline") {
+ // _el_td.innerText = HotelTV.ui_utils.Get_Airline(_trTbl.ui.flight.airlines, _flitem.airline, _state.lang);
+ // } else if (_itm == "flight") {
+ // _el_td.innerText = _flitem.airFln;
+ // } else if (_itm == "scheduled") {
+ // _el_td.innerText = _flitem.std.charAt(0) + _flitem.std.charAt(1) + ":" + _flitem.std.charAt(2) + _flitem.std.charAt(3) + " - ";
+ // _el_td.innerText += _flitem.etd.charAt(0) + _flitem.etd.charAt(1) + ":" + _flitem.etd.charAt(2) + _flitem.etd.charAt(3);
+ // } else if (_itm == "origin") {
+ // _el_td.innerText = HotelTV.ui_utils.Get_Airport(_trTbl.ui.flight.city, _flitem.boarding, _state.lang);
+ // } else if (_itm == "destination") {
+ // _el_td.innerText = HotelTV.ui_utils.Get_Airport(_trTbl.ui.flight.city, _flitem.arrived, _state.lang);
+ // } else if (_itm == "type") {
+ // _el_td.innerText = _trTbl.ui.flight.line[_flitem.line][_state.lang];
+ // } else if (_itm == "gate") {
+ // _el_td.innerText = _flitem.gate;
+ // } else if (_itm == "status") {
+ // _el_td.innerText = HotelTV.ui_utils.Get_FlightStatus(_trTbl.ui.flight.result, _flitem.rmk, _state.lang);
+ // }
+ // _el_tr.appendChild(_el_td);
+ // });
+ // _el_departure_tbl_rec.appendChild(_el_tr);
+ // } else {
+ // let _el_tr = document.createElement('tr');
+ // _el_tr.setAttribute("id", "record");
+ // ar_tdItem.forEach(_itm => {
+ // let _el_td = document.createElement('td');
+ // _el_td.setAttribute("id", _itm);
+ // if (_itm == "airline") {
+ // _el_td.innerText = HotelTV.ui_utils.Get_Airline(_trTbl.ui.flight.airlines, _flitem.airline, _state.lang);
+ // } else if (_itm == "flight") {
+ // _el_td.innerText = _flitem.airFln;
+ // } else if (_itm == "scheduled") {
+ // _el_td.innerText = _flitem.std.charAt(0) + _flitem.std.charAt(1) + ":" + _flitem.std.charAt(2) + _flitem.std.charAt(3) + " - ";
+ // _el_td.innerText += _flitem.etd.charAt(0) + _flitem.etd.charAt(1) + ":" + _flitem.etd.charAt(2) + _flitem.etd.charAt(3);
+ // } else if (_itm == "origin") {
+ // _el_td.innerText = HotelTV.ui_utils.Get_Airport(_trTbl.ui.flight.city, _flitem.boarding, _state.lang);
+ // } else if (_itm == "destination") {
+ // _el_td.innerText = HotelTV.ui_utils.Get_Airport(_trTbl.ui.flight.city, _flitem.arrived, _state.lang);
+ // } else if (_itm == "type") {
+ // if (_trTbl.ui.flight.line[_flitem.line]) {
+ // _el_td.innerText = _trTbl.ui.flight.line[_flitem.line][_state.lang];
+ // }
+ // } else if (_itm == "gate") {
+ // _el_td.innerText = _flitem.gate;
+ // } else if (_itm == "status") {
+ // _el_td.innerText = HotelTV.ui_utils.Get_FlightStatus(_trTbl.ui.flight.result, _flitem.rmk, _state.lang);
+ // }
+ // _el_tr.appendChild(_el_td);
+ // });
+ // _el_arrival_tbl_rec.appendChild(_el_tr);
+ // }
+ // }
+ // }
+ // $('.main .mm .flight #caution').text(_trTbl.ui.flight.caution.body[_state.lang]);
}
/**
* HotelTV UI Wrapper Function::> Build Main Menu::> Weather
*/
function __uifxn_AppFull_MM_BldWeather() {
- let _trTbl = HotelTV.translation;
- let _weather = HotelTV.weather;
- let _cur_cond = _weather.item.condition
let _state = HotelTV.state;
+ let _trTbl = HotelTV.translation;
+ let _weather = HotelTV.weather[_state.weather.default_location];
+ let _cur_cond = _weather.item.condition
let _elWeatherRoot = $('.main .mm .weather');
let _elWeatherToday = _elWeatherRoot.children('.today');
let _elWeatherForcast = _elWeatherRoot.children('.forcast');
@@ -4400,10 +4637,24 @@ HotelTV.ui_appfull = (function() {
*/
function __uifxn_AppFull_BldPage_Main() {
let _program = HotelTV.tvguide.program;
- let _weather = HotelTV.weather;
+ let _weather = null;
let _state = HotelTV.state;
let _mmcnt = 0;
+ const _get_weather_def_location = function() {
+ let _found = false;
+ for (__j = 1; __j <= _program.length; __j++) {
+ if (_program[__j].type == "weather" || _program[__j].widget==true ) {
+ if ( _program[__j].widget==true ) {
+ _state.weather.default_location = _program[__j].location;
+ _found = true;
+ break;
+ }
+ }
+ }
+ return _found;
+ }
+
_mmcnt = _program.length;
//_mm_width = 1920 / (_mmcnt - 1);
_mm_width = 266;
@@ -4459,6 +4710,11 @@ HotelTV.ui_appfull = (function() {
}
}
+ // 디폴트 로케이션 설정
+ if ( _get_weather_def_location()==true ){
+ _weather = HotelTV.weather[_state.weather.default_location];
+ }
+
// 메인 메뉴 백그라운드 이미지 노드를 동적으로 구성
let _div_mm_bglist = document.querySelector('#lst_mmbg');
for (let _mm_idx = 1; _mm_idx <= _program.length; _mm_idx++) {
@@ -4500,9 +4756,6 @@ HotelTV.ui_appfull = (function() {
//호텔 로고 출력
$('.widjet .top .hotellogo').css({ "background-image": "url(" + HotelTV.hotelinfo.subLogo.download + ")" });
- //상단 날씨 아이콘 및 온도 표시
- __uifxn_AppFull_TopWidjet_BuildWeather();
-
//상단 메시지(unread)개수 표시
__uifxn_AppFull_TopWidjet_BuildMsgCnt();
@@ -4517,9 +4770,12 @@ HotelTV.ui_appfull = (function() {
__uifxn_AppFull_TopWidjetShow(true);
//Weather Contents Buildup
- __uifxn_AppFull_MM_BldWeather();
-
- //Flight Contents Buildup
+ if ( Object.keys(_state.weather.default_location).length != 0 ){
+ //상단 날씨 아이콘 및 온도 표시
+ __uifxn_AppFull_TopWidjet_BuildWeather();
+ __uifxn_AppFull_MM_BldWeather();
+ }
+ //Build Flight
__uifxn_AppFull_MM_BldFlight();
//Build Brochures
@@ -4571,15 +4827,15 @@ HotelTV.ui_appfull = (function() {
if (_state.menu.stage == "main") {
console.log(`MM KEY EVENT::> ${_evt.keyCode}, UINT=>${parseInt(_evt.keyCode)}`);
- if (_evt.keyCode == 37) {
+ if (_evt.keyCode == gRmtKey.left) {
$('#lst_mmsel').trigger('prev.owl', 700)
//console.log(" MM ID::> " + _state.menu.main.cur + _program[_state.menu.main.cur].name);
HotelTV.api.ReportEvent([{'power': true, 'location':{'conId':_program[_state.menu.main.cur].id}}])
- } else if (_evt.keyCode == 39) {
+ } else if (_evt.keyCode == gRmtKey.right) {
$('#lst_mmsel').trigger('next.owl', 700)
//console.log(" MM ID::> " + _state.menu.main.cur + _program[_state.menu.main.cur].name);
HotelTV.api.ReportEvent([{'power': true, 'location':{'conId':_program[_state.menu.main.cur].id}}])
- } else if (_evt.keyCode == 13) {
+ } else if (_evt.keyCode == gRmtKey.enter) {
// 서브 메뉴 빌드 및 화면 전환
__uifxn_AppFull_ShowMMHotKeyBtn(false);
if (_program[Number(_state.menu.main.cur)].type.toLowerCase() == "normal") {
@@ -4625,7 +4881,7 @@ HotelTV.ui_appfull = (function() {
} else {
console.log(`Type:${_program[Number(_state.menu.main.cur)].type} doen's have sub menu...`);
}
- } else if (_evt.keyCode == 403) {
+ } else if (_evt.keyCode == gRmtKey.red) {
// RED BUTTON
if ("red" in _state.hotkey.mm) {
$('.guide>.tips').stop().animate({ backgroundColor: "rgba(0,0,0,0.8)" }, 500, function() {
@@ -4655,7 +4911,7 @@ HotelTV.ui_appfull = (function() {
});
HotelTV.api.ReportEvent([{'power': true, 'location':{'conId':_state.hotkey.mm['red'].id}}])
}
- } else if (_evt.keyCode == 404) {
+ } else if (_evt.keyCode == gRmtKey.green) {
// GREEN BUTTON
if ("green" in _state.hotkey.mm) {
$('.guide>.tips').stop().animate({ backgroundColor: "rgba(0,0,0,0.8)" }, 500, function() {
@@ -4685,7 +4941,7 @@ HotelTV.ui_appfull = (function() {
});
HotelTV.api.ReportEvent([{'power': true, 'location':{'conId':_state.hotkey.mm['green'].id}}])
}
- } else if (_evt.keyCode == 405) {
+ } else if (_evt.keyCode == gRmtKey.yellow) {
// YELLOW BUTTON
if ("yellow" in _state.hotkey.mm) {
$('.guide>.tips').stop().animate({ backgroundColor: "rgba(0,0,0,0.8)" }, 500, function() {
@@ -4715,7 +4971,7 @@ HotelTV.ui_appfull = (function() {
});
HotelTV.api.ReportEvent([{'power': true, 'location':{'conId':_state.hotkey.mm['yellow'].id}}])
}
- } else if (_evt.keyCode == 406) {
+ } else if (_evt.keyCode == gRmtKey.blue) {
// BLUE BUTTON
if ("blue" in _state.hotkey.mm) {
$('.guide>.tips').stop().animate({ backgroundColor: "rgba(0,0,0,0.8)" }, 500, function() {
@@ -4745,7 +5001,7 @@ HotelTV.ui_appfull = (function() {
});
HotelTV.api.ReportEvent([{'power': true, 'location':{'conId':_state.hotkey.mm['blue'].id}}])
}
- } else if (_evt.keyCode == -2072433963) {
+ } else if (_evt.keyCode == gRmtKey.amenity) {
// DEDICATED HOT KEY: Amenity
// Check amenity menu enabled
if (_opening.amenity) {
@@ -4758,7 +5014,7 @@ HotelTV.ui_appfull = (function() {
});
HotelTV.api.ReportEvent([{'power': true, 'location':{'conId':_opening.amenity.id}}])
}
- } else if (_evt.keyCode == -2072437788) {
+ } else if (_evt.keyCode == gRmtKey.roomservice) {
// DEDICATED HOT KEY: Room service
// Check room service menu enabled
if (_opening.roomService) {
@@ -4771,21 +5027,21 @@ HotelTV.ui_appfull = (function() {
});
HotelTV.api.ReportEvent([{'power': true, 'location':{'conId':_opening.amenity.roomService}}])
}
- } else if (_evt.keyCode == -2072437533) {
+ } else if (_evt.keyCode == gRmtKey.flight) {
// DEDICATED HOT KEY: Flight
// Check flight main menu index and go
if (('flight' in _state['specialKey'])) {
$('#lst_mmsel').trigger("to.owl.carousel", [Number(_state['specialKey']['flight'].mm_index) - 1, 10, true]);
HotelTV.api.ReportEvent([{'power': true, 'location':{'conId':_state['specialKey']['flight'].id}}])
}
- } else if (_evt.keyCode == -2072438298) {
+ } else if (_evt.keyCode == gRmtKey.weather) {
// DEDICATED HOT KEY: Weather
// Check flight main menu index and go
if (('weather' in _state['specialKey'])) {
$('#lst_mmsel').trigger("to.owl.carousel", [Number(_state['specialKey']['weather'].mm_index) - 1, 10, true]);
HotelTV.api.ReportEvent([{'power': true, 'location':{'conId':_state['specialKey']['weather'].id}}])
}
- } else if (_evt.keyCode == -2072443143) {
+ } else if (_evt.keyCode == gRmtKey.tv) {
// DEDICATED HOT KEY: TV
// Check flight main menu index and go
if (('tv' in _state['specialKey'])) {
@@ -4795,11 +5051,11 @@ HotelTV.ui_appfull = (function() {
}
} else if (_state.menu.stage == "hotkey_mm_red") {
console.log("HOTKEY(MM:RED) KEY EVENT::> " + _evt.keyCode);
- if (_evt.keyCode == 37) {
+ if (_evt.keyCode == gRmtKey.left) {
$('#lst_hotkey_mm_red').trigger('prev.owl')
- } else if (_evt.keyCode == 39) {
+ } else if (_evt.keyCode == gRmtKey.right) {
$('#lst_hotkey_mm_red').trigger('next.owl')
- } else if (_evt.keyCode == 461) {
+ } else if (_evt.keyCode == gRmtKey.back) {
$('.popup .hotkey_mm_red').fadeOut(1000, function() {
$('.popup .hotkey_mm_red').stop().animate({ backgroundColor: "rgba(0,0,0,0.0)" }, 500, function() {
$('.popup .hotkey_mm_red').css({ "background-color": "" });
@@ -4811,11 +5067,11 @@ HotelTV.ui_appfull = (function() {
}
} else if (_state.menu.stage == "hotkey_mm_green") {
console.log("HOTKEY(MM:GREEN) KEY EVENT::> " + _evt.keyCode);
- if (_evt.keyCode == 37) {
+ if (_evt.keyCode == gRmtKey.left) {
$('#lst_hotkey_mm_green').trigger('prev.owl')
- } else if (_evt.keyCode == 39) {
+ } else if (_evt.keyCode == gRmtKey.right) {
$('#lst_hotkey_mm_green').trigger('next.owl')
- } else if (_evt.keyCode == 461) {
+ } else if (_evt.keyCode == gRmtKey.back) {
$('.popup .hotkey_mm_green').fadeOut(1000, function() {
$('.popup .hotkey_mm_green').stop().animate({ backgroundColor: "rgba(0,0,0,0.0)" }, 500, function() {
$('.popup .hotkey_mm_green').css({ "background-color": "" });
@@ -4827,15 +5083,15 @@ HotelTV.ui_appfull = (function() {
}
} else if (_state.menu.stage == "hotkey_mm_yellow") {
console.log("HOTKEY(MM:YELLOW) KEY EVENT::> " + _evt.keyCode);
- if (_evt.keyCode == 37) {
+ if (_evt.keyCode == gRmtKey.left) {
console.log("LEFT");
} else if (_evt.keyCode == 38) {
console.log("UP");
- } else if (_evt.keyCode == 39) {
+ } else if (_evt.keyCode == gRmtKey.right) {
console.log("RIGHT");
- } else if (_evt.keyCode == 40) {
+ } else if (_evt.keyCode == gRmtKey.down) {
console.log("DOWN");
- } else if (_evt.keyCode == 461) {
+ } else if (_evt.keyCode == gRmtKey.back) {
$('.popup .hotkey_mm_yellow').fadeOut(1000, function() {
$('.popup .hotkey_mm_yellow').stop().animate({ backgroundColor: "rgba(0,0,0,0.0)" }, 500, function() {
$('.popup .hotkey_mm_yellow').css({ "background-color": "" });
@@ -4847,15 +5103,15 @@ HotelTV.ui_appfull = (function() {
}
} else if (_state.menu.stage == "hotkey_mm_blue") {
console.log("HOTKEY(MM:BLUE) KEY EVENT::> " + _evt.keyCode);
- if (_evt.keyCode == 37) {
+ if (_evt.keyCode == gRmtKey.left) {
console.log("LEFT");
} else if (_evt.keyCode == 38) {
console.log("UP");
- } else if (_evt.keyCode == 39) {
+ } else if (_evt.keyCode == gRmtKey.right) {
console.log("RIGHT");
- } else if (_evt.keyCode == 40) {
+ } else if (_evt.keyCode == gRmtKey.down) {
console.log("DOWN");
- } else if (_evt.keyCode == 461) {
+ } else if (_evt.keyCode == gRmtKey.back) {
$('.popup .hotkey_mm_blue').fadeOut(1000, function() {
$('.popup .hotkey_mm_blue').stop().animate({ backgroundColor: "rgba(0,0,0,0.0)" }, 500, function() {
$('.popup .hotkey_mm_blue').css({ "background-color": "" });
@@ -4867,25 +5123,25 @@ HotelTV.ui_appfull = (function() {
}
} else if (_state.menu.stage == "hotkey_mm_amenity") {
console.log("HOTKEY(MM:AMENITY: MENU) KEY EVENT::> " + _evt.keyCode);
- if (_evt.keyCode == 37) {
+ if (_evt.keyCode == gRmtKey.left) {
console.log("AMENITY::>LEFT");
__uifxn_AppFull_HandleAmenity("left", false, false, null);
} else if (_evt.keyCode == 38) {
console.log("AMENITY::>UP");
__uifxn_AppFull_HandleAmenity("up", false, false, null);
- } else if (_evt.keyCode == 39) {
+ } else if (_evt.keyCode == gRmtKey.right) {
console.log("AMENITY::>RIGHT");
__uifxn_AppFull_HandleAmenity("right", false, false, null);
- } else if (_evt.keyCode == 40) {
+ } else if (_evt.keyCode == gRmtKey.down) {
console.log("AMENITY::>DOWN");
__uifxn_AppFull_HandleAmenity("down", false, false, null);
- } else if (_evt.keyCode == 13) {
+ } else if (_evt.keyCode == gRmtKey.enter) {
console.log("AMENITY::>ENTER");
__uifxn_AppFull_HandleAmenity("enter", false, false, function() {
_state.menu.stage = "main";
__uifxn_AppFull_ShowMMHotKeyBtn(true);
});
- } else if (_evt.keyCode == 461) {
+ } else if (_evt.keyCode == gRmtKey.back) {
__uifxn_AppFull_HandleAmenity("back", true, false, function() {
_state.menu.stage = "main";
__uifxn_AppFull_ShowMMHotKeyBtn(true);
@@ -4893,25 +5149,25 @@ HotelTV.ui_appfull = (function() {
}
} else if (_state.menu.stage == "hotkey_mm_roomservice") {
console.log("HOTKEY(MM:ROOMSERVICE: MENU) KEY EVENT::> " + _evt.keyCode);
- if (_evt.keyCode == 37) {
+ if (_evt.keyCode == gRmtKey.left) {
console.log("ROOMSERVICE::>LEFT");
__uifxn_AppFull_HandleRoomservice("left", false, false, null);
} else if (_evt.keyCode == 38) {
console.log("ROOMSERVICE::>UP");
__uifxn_AppFull_HandleRoomservice("up", false, false, null);
- } else if (_evt.keyCode == 39) {
+ } else if (_evt.keyCode == gRmtKey.right) {
console.log("ROOMSERVICE::>RIGHT");
__uifxn_AppFull_HandleRoomservice("right", false, false, null);
- } else if (_evt.keyCode == 40) {
+ } else if (_evt.keyCode == gRmtKey.down) {
console.log("ROOMSERVICE::>DOWN");
__uifxn_AppFull_HandleRoomservice("down", false, false, null);
- } else if (_evt.keyCode == 13) {
+ } else if (_evt.keyCode == gRmtKey.enter) {
console.log("ROOMSERVICE::>ENTER");
__uifxn_AppFull_HandleRoomservice("enter", false, false, function() {
_state.menu.stage = "main";
__uifxn_AppFull_ShowMMHotKeyBtn(true);
});
- } else if (_evt.keyCode == 461) {
+ } else if (_evt.keyCode == gRmtKey.back) {
__uifxn_AppFull_HandleRoomservice("back", true, false, function() {
_state.menu.stage = "main";
__uifxn_AppFull_ShowMMHotKeyBtn(true);
@@ -5045,7 +5301,7 @@ HotelTV.ui_appfull = (function() {
//widjet 상단 메시지(unread)개수 표시
__uifxn_AppFull_TopWidjet_BuildMsgCnt();
- //
+ //신규 메시지 볼룬팝업
HotelTV.ui_utils.ShowNotificationMsgBalloon(_guest.name + _trTbl.ui.mypage.message.title.title_widget[_state.lang].replace("_XX", _msg_unread_cnt.toString()), 10);
}).catch(_error => {
console.log("Fail to get Message info");