issue#1 Support error screen. Support notification balloon for neflix service preparing. Going on tune up UI.

This commit is contained in:
Paul Kim
2022-06-08 02:22:39 +09:00
parent 8b0160bfda
commit cf95ff42b0
16 changed files with 628 additions and 250 deletions

View File

@@ -129,9 +129,9 @@ HotelTV.ui_appfull = (function() {
let _typeAppFocusEvt = _evt.eventType;
if (_typeAppFocusEvt == "focused") {
HotelTV.hcap.SetSoftAp({
"enable": false,
});
// HotelTV.hcap.SetSoftAp({
// "enable": false,
// });
}
}
@@ -301,7 +301,7 @@ HotelTV.ui_appfull = (function() {
// Free count value
_elAmItemTblRecRoot.children('div#details').children(`div#freecnt_val`).text(__fxn_fmvalue(_carts.items, "freeCount", _amItem.id));
// Price value
_elAmItemTblRecRoot.children('div#details').children(`div#price_val`).text(__fxn_fmvalue(_carts.items, "price", _amItem.id)[_state.lang] + _amenity.currency[_state.lang]);
_elAmItemTblRecRoot.children('div#details').children(`div#price_val`).text(__fxn_fmvalue(_carts.items, "price", _amItem.id)[_state.lang].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + _amenity.currency[_state.lang]);
// Order Count
_elAmItemTblRecRoot.children(`div#quantity_val`).text(__fxn_fmvalue(_carts.items, "quantity", _amItem.id));
}
@@ -778,7 +778,7 @@ HotelTV.ui_appfull = (function() {
let _elRsItemTblRecRoot = _elRsMnRoot.children('div.items').children('table').children(`tr#${_rsItem.id}`).children('div.products');
if (_carts.items.length && __fxn_fmexist(_carts.items, _rsItem.id) == true) {
// amount value
_elRsItemTblRecRoot.children('div#details').children('#price').text(__fxn_fmvalue(_carts.items, "amount", _rsItem.id)[_state.lang] + _roomservice.currency[_state.lang]);
_elRsItemTblRecRoot.children('div#details').children('#price').text(__fxn_fmvalue(_carts.items, "amount", _rsItem.id)[_state.lang].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + _roomservice.currency[_state.lang]);
// Order Count
_elRsItemTblRecRoot.children('div#details').children('#quantity').children(`#value`).text(__fxn_fmvalue(_carts.items, "quantity", _rsItem.id));
}
@@ -1876,7 +1876,7 @@ HotelTV.ui_appfull = (function() {
HotelTV.api.SetMessageStatus(_cur_msgdesc._id);
_cur_msgdesc.read = true;
$('.main>.mypage>.bg>.owl-carousel .owl-item #mp_msg_tblrec tr').filter("[msgidx='" + _cur_msglst_idx.toString() + "']").children('td#num').addClass('read');
__uifxn_AppFull_Widjet_ShowMsgCnt();
__uifxn_AppFull_TopWidjet_BuildMsgCnt();
});
}
}
@@ -2956,7 +2956,7 @@ HotelTV.ui_appfull = (function() {
//
if (_state.menu.stage == "popup_message_card") {
//HIDE NEWS and USER GUIDE TIPS
if (_newsInfo == null || Object.keys(_newsInfo).length == 0) {
if (_newsInfo == null || _newsInfo.length == 0) {
if ($('.news').css('display') != "none") {
$('.news').hide();
}
@@ -2968,7 +2968,7 @@ HotelTV.ui_appfull = (function() {
return;
} else if (_state.menu.stage == "tvCtgHide") {
//HIDE NEWS and USER GUIDE TIPS
if (_newsInfo == null || Object.keys(_newsInfo).length == 0) {
if (_newsInfo == null || newsInfo.length == 0) {
if ($('.news').css('display') != "none") {
$('.news').hide();
}
@@ -3041,7 +3041,7 @@ HotelTV.ui_appfull = (function() {
if ($('.guide>.tips').css('display') == "none") {
$('.guide>.tips').fadeIn(500, function() {
//SHOW NEWS
if (_newsInfo == null || Object.keys(_newsInfo).length == 0) {
if (_newsInfo == null || _newsInfo.length == 0) {
if ($('.news').css('display') != "none") {
$('.news').hide();
}
@@ -3069,20 +3069,26 @@ HotelTV.ui_appfull = (function() {
}
} else {
//HIDE TIPS and then SHOW NEWS
if (_newsInfo == null || Object.keys(_newsInfo).length == 0) {
if ($('.news').css('display') != "none") {
$('.news').hide();
}
} else {
if ($('.guide>.tips').css('display') == "block") {
$('.guide>.tips').fadeOut(500, function() {
if ($('.guide>.tips').css('display') == "block") {
$('.guide>.tips').fadeOut(500, function() {
if (_newsInfo == null || _newsInfo.length == 0) {
if ($('.news').css('display') != "none") {
$('.news').hide();
}
} else {
if ($('.news').css('display') != "block") {
$('.news').fadeIn(500, function() {
__uifxn_AppFull_BldNews();
$('.news>.newsctz #hoteltv-news-ticker').webTicker('cont');
});
}
});
}
});
} else {
if (_newsInfo == null || _newsInfo.length == 0) {
if ($('.news').css('display') != "none") {
$('.news').hide();
}
} else {
if ($('.news').css('display') != "block") {
$('.news').fadeIn(500, function() {
@@ -3095,7 +3101,7 @@ HotelTV.ui_appfull = (function() {
}
} else {
//HIDE NEWS and USER GUIDE TIPS
if (_newsInfo == null || Object.keys(_newsInfo).length == 0) {
if (_newsInfo == null || _newsInfo.length == 0) {
if ($('.news').css('display') != "none") {
$('.news').hide();
}
@@ -3104,15 +3110,20 @@ HotelTV.ui_appfull = (function() {
if ($('.guide>.tips').css('display') != "none") {
$('.guide>.tips').fadeOut(500, function() {
if ($('.news').css('display') != "none") {
if ($('.news>.newsctz #hoteltv-news-ticker').children().length > 0) {
$('.news>.newsctz #hoteltv-news-ticker').webTicker('stop');
$('.news').fadeOut(500);
if (_newsInfo == null || _newsInfo.length == 0) {
if ($('.news').css('display') != "none") {
$('.news').hide();
}
} else {
if ($('.news').css('display') != "none") {
if ($('.news>.newsctz #hoteltv-news-ticker').children().length > 0) {
$('.news>.newsctz #hoteltv-news-ticker').webTicker('stop');
$('.news').fadeOut(500);
}
}
}
});
}
}
}
@@ -3186,7 +3197,7 @@ HotelTV.ui_appfull = (function() {
* HotelTV UI Wrapper Function::> Show Top Widjet Weather
* @param {boolean} _en show/hide
*/
function __uifxn_AppFull_Widjet_ShowWeather(_en) {
function __uifxn_AppFull_TopWidjet_BuildWeather() {
let _weather = HotelTV.weather;
$('.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");
@@ -3198,7 +3209,7 @@ HotelTV.ui_appfull = (function() {
* HotelTV UI Wrapper Function::> Show Top Widjet Message Cnt(Unread)
* @param {boolean} _en show/hide
*/
function __uifxn_AppFull_Widjet_ShowMsgCnt(_en) {
function __uifxn_AppFull_TopWidjet_BuildMsgCnt(_en) {
let _msgCnt = 0;
const _state = HotelTV.state;
const _guest = HotelTV.guestinfo;
@@ -3224,6 +3235,22 @@ HotelTV.ui_appfull = (function() {
$('div#lst_mypagebg div #mp_message_title').text(_guest.name + _trTbl.ui.mypage.message.title.title[_state.lang].replace("_XX", _msgCnt.toString()));
}
/**
* HotelTV UI Wrapper Function::> Show Top Widjet Weather
* @param {boolean} _show show/hide
*/
function __uifxn_AppFull_TopWidjetShow(_show) {
if (_show == true) {
if ($('.widjet .top').css("display") == "none") {
$('.widjet .top').fadeIn(300);
}
} else {
if ($('.widjet .top').css("display") != "none") {
$('.widjet .top').fadeOut(300);
}
}
}
/**
* HotelTV UI Wrapper Function::> Build Main Menu::> Flight
@@ -3517,10 +3544,10 @@ HotelTV.ui_appfull = (function() {
$('.widjet .top .hotellogo').css({ "background-image": "url(" + HotelTV.hotelinfo.subLogo.download + ")" });
//상단 날씨 아이콘 및 온도 표시
__uifxn_AppFull_Widjet_ShowWeather();
__uifxn_AppFull_TopWidjet_BuildWeather();
//상단 메시지(unread)개수 표시
__uifxn_AppFull_Widjet_ShowMsgCnt();
__uifxn_AppFull_TopWidjet_BuildMsgCnt();
// //상단 시계 표시
_hndl_widget_topTime = setInterval(() => {
@@ -3530,6 +3557,8 @@ HotelTV.ui_appfull = (function() {
$('.widjet .top .datetime .date').text(_szCurTm.date);
}, 1000);
__uifxn_AppFull_TopWidjetShow(true);
//Weather Contents Buildup
__uifxn_AppFull_MM_BldWeather();
@@ -3609,14 +3638,27 @@ HotelTV.ui_appfull = (function() {
} else if (_program[Number(_state.menu.main.cur)].type.toLowerCase() == "application") {
console.log("Preparing TV APP::>" + _program[Number(_state.menu.main.cur)].service);
if (_program[Number(_state.menu.main.cur)].service == "youtube") {
console.log(`Type:${_program[Number(_state.menu.main.cur)].type} preparing WIFI AP...`);
HotelTV.hcap.SetSoftAp({
"enable": true,
"ssid": "TVWIFI-" + HotelTV.guestinfo.room,
"password": "12345678",
});
// console.log(`Type:${_program[Number(_state.menu.main.cur)].type} preparing WIFI AP...`);
// HotelTV.hcap.SetSoftAp({
// "enable": true,
// "ssid": "TVWIFI-" + HotelTV.guestinfo.room,
// "password": "12345678",
// });
HotelTV.hcap.LaunchPreApp(_program[Number(_state.menu.main.cur)].service, null);
} else if (_program[Number(_state.menu.main.cur)].service == "netflix") {
let _foundNetflix = false;
for (_i = 0; _i < _state['hcap_app'].length; _i++) {
if (_state['hcap_app'][_i].title == 'Netflix') {
_foundNetflix = true;
}
}
if (_foundNetflix == true) {
HotelTV.hcap.LaunchPreApp(_program[Number(_state.menu.main.cur)].service, { "hotel_name": HotelTV.hotelinfo.name });
} else {
HotelTV.ui_utils.ShowNotificationMsgBalloon("서비스를 중비 중입니다. 잠시후에 이용해 주세요.", 5);
}
}
HotelTV.hcap.LaunchPreApp(_program[Number(_state.menu.main.cur)].service, null);
} else {
console.log(`Type:${_program[Number(_state.menu.main.cur)].type} doen's have sub menu...`);
}
@@ -3628,6 +3670,7 @@ HotelTV.ui_appfull = (function() {
$('.popup .hotkey_mm_red').fadeIn(1000, function() {
_state.menu.stage = "hotkey_mm_red";
__uifxn_AppFull_ShowMMHotKeyBtn(false);
__uifxn_AppFull_TopWidjetShow(false);
});
} else if (_state.hotkey.mm.red.type == "amenity") {
$('.popup .amenity').show(0, function() {
@@ -3654,6 +3697,7 @@ HotelTV.ui_appfull = (function() {
$('.popup .hotkey_mm_green').fadeIn(1000, function() {
_state.menu.stage = "hotkey_mm_green";
__uifxn_AppFull_ShowMMHotKeyBtn(false);
__uifxn_AppFull_TopWidjetShow(false);
});
} else if (_state.hotkey.mm.green.type == "amenity") {
$('.popup .amenity').show(0, function() {
@@ -3680,6 +3724,7 @@ HotelTV.ui_appfull = (function() {
$('.popup .hotkey_mm_yellow').fadeIn(1000, function() {
_state.menu.stage = "hotkey_mm_yellow";
__uifxn_AppFull_ShowMMHotKeyBtn(false);
__uifxn_AppFull_TopWidjetShow(false);
});
} else if (_state.hotkey.mm.yellow.type == "amenity") {
$('.popup .amenity').show(0, function() {
@@ -3706,6 +3751,7 @@ HotelTV.ui_appfull = (function() {
$('.popup .hotkey_mm_blue').fadeIn(1000, function() {
_state.menu.stage = "hotkey_mm_blue";
__uifxn_AppFull_ShowMMHotKeyBtn(false);
__uifxn_AppFull_TopWidjetShow(false);
});
} else if (_state.hotkey.mm.blue.type == "amenity") {
$('.popup .amenity').show(0, function() {
@@ -3777,6 +3823,7 @@ HotelTV.ui_appfull = (function() {
$('.popup .hotkey_mm_red').css({ "background-color": "" });
_state.menu.stage = "main";
__uifxn_AppFull_ShowMMHotKeyBtn(true);
__uifxn_AppFull_TopWidjetShow(true);
});
});
}
@@ -3792,6 +3839,7 @@ HotelTV.ui_appfull = (function() {
$('.popup .hotkey_mm_green').css({ "background-color": "" });
_state.menu.stage = "main";
__uifxn_AppFull_ShowMMHotKeyBtn(true);
__uifxn_AppFull_TopWidjetShow(true);
});
});
}
@@ -3811,6 +3859,7 @@ HotelTV.ui_appfull = (function() {
$('.popup .hotkey_mm_yellow').css({ "background-color": "" });
_state.menu.stage = "main";
__uifxn_AppFull_ShowMMHotKeyBtn(true);
__uifxn_AppFull_TopWidjetShow(true);
});
});
}
@@ -3830,6 +3879,7 @@ HotelTV.ui_appfull = (function() {
$('.popup .hotkey_mm_blue').css({ "background-color": "" });
_state.menu.stage = "main";
__uifxn_AppFull_ShowMMHotKeyBtn(true);
__uifxn_AppFull_TopWidjetShow(true);
});
});
}
@@ -4140,7 +4190,7 @@ HotelTV.ui_appfull = (function() {
$('div#lst_mypagebg div #mp_message_title').text(_guest.name + _trTbl.ui.mypage.message.title.title[_state.lang].replace("_XX", _msg_unread_cnt.toString()));
//widjet 상단 메시지(unread)개수 표시
__uifxn_AppFull_Widjet_ShowMsgCnt();
__uifxn_AppFull_TopWidjet_BuildMsgCnt();
}).catch(_error => {
console.log("Fail to get Message info");
});
@@ -4172,6 +4222,7 @@ HotelTV.ui_appfull = (function() {
UpdateEpg: function() {
let _state = HotelTV.state;
let _trTbl = HotelTV.translation;
if (_state.menu.stage != 'tvCtgHide') {
return;
@@ -4187,7 +4238,7 @@ HotelTV.ui_appfull = (function() {
if (_epg_inf != null) {
_ch.text(_egp_prog_inf.name);
} else {
_ch.text(HotelTV.ui_utils.Get_String('epg_none', _state.lang));
_ch.text(_trTbl.ui.tv.epg.msg.none_epg_info[_state.lang]);
}
});
});