issue #11 Fix cannot exit on order menu(amenity and roomservice).
This commit is contained in:
@@ -588,6 +588,16 @@ HotelTV.ui_appfull = (function() {
|
||||
}
|
||||
}
|
||||
|
||||
const __uifxn_AppFull_getOrderMenuName = function(_objCtgyInfo){
|
||||
let _state = HotelTV.state;
|
||||
for (__jj = 1; __jj <= _objCtgyInfo.length; __jj++) {
|
||||
if ( _objCtgyInfo[__jj].name=="ORDER" ) {
|
||||
return _objCtgyInfo[__jj].title[_state.lang];
|
||||
}
|
||||
}
|
||||
return "ORDER";
|
||||
}
|
||||
|
||||
/**
|
||||
* HotelTV UI[AppFull] Wrapper Function::> register hotkey for amenity service
|
||||
*/
|
||||
@@ -1323,15 +1333,6 @@ HotelTV.ui_appfull = (function() {
|
||||
|
||||
try {
|
||||
_elAmCtgyBgMenuItemCartWin.fadeOut(200, async function() {
|
||||
const ____getOrderMenuName = function(){
|
||||
for (__jj = 1; __jj <= _aminfo_ctgy.length; __jj++) {
|
||||
if ( _aminfo_ctgy[__jj].name=="ORDER" ) {
|
||||
return _aminfo_ctgy[__jj].title[_state.lang];
|
||||
}
|
||||
}
|
||||
return "ORDER";
|
||||
}
|
||||
|
||||
let _str_result_message = null;
|
||||
// Remove All element under winleft&winright div
|
||||
__ifxn_removeAmSelectedItemCartWinElement();
|
||||
@@ -1345,7 +1346,7 @@ HotelTV.ui_appfull = (function() {
|
||||
} finally {
|
||||
if ( _result !=null ) {
|
||||
console.log(`Success to order Amenity cart::>`);
|
||||
_str_result_message = _trTbl.ui.amenity.message.orderSuccess[_state.lang].replace('__MENU__', ____getOrderMenuName());
|
||||
_str_result_message = _trTbl.ui.amenity.message.orderSuccess[_state.lang].replace('__MENU__', __uifxn_AppFull_getOrderMenuName(_aminfo_ctgy));
|
||||
_elAmCtgyBgMenuItemCartWinOrderWin.children('#message').text(_str_result_message);
|
||||
_elAmCtgyBgMenuItemCartWinOrderWin.fadeIn(500, async function() {
|
||||
try{
|
||||
@@ -2012,10 +2013,21 @@ HotelTV.ui_appfull = (function() {
|
||||
_elAmCtgySel.trigger('next.owl', [700]);
|
||||
} else if (event.keyCode == gRmtKey.enter) {
|
||||
// 카테고리 화면 빌드 및 화면 전환
|
||||
if ( __status_am_specific.category_sel.cur in Object.keys(_aminfo_ctgy) ){
|
||||
if ( _aminfo_ctgy[__status_am_specific.category_sel.cur].name == "CARTS" ){
|
||||
console.log("TODO::> NOTIFY cannot enter item sel on CARTS");
|
||||
}else if ( _aminfo_ctgy[__status_am_specific.category_sel.cur].name == "ORDER" ){
|
||||
console.log("TODO::> NOTIFY cannot enter item sel on ORDER");
|
||||
let __str_notify_msg = _trTbl.ui.amenity.message.invalidCategory[_state.lang].replace('__MENU__', __uifxn_AppFull_getOrderMenuName(_aminfo_ctgy));
|
||||
HotelTV.ui_utils.ShowNotificationMsgBalloon(__str_notify_msg, 5);
|
||||
}else{
|
||||
_state.menu.stage.cur = "amenity_ctgy_item_sel";
|
||||
__uifxn_AppFull_DrawAmUserGuide("amenity_ctgy_item_sel");
|
||||
__uifxn_AppFull_DrawAmItemSeletion("enter");
|
||||
}
|
||||
}
|
||||
} else if (event.keyCode == gRmtKey.back) {
|
||||
__uifxn_AppFull_DrawAmOrderList('hide');
|
||||
// 카테고리 폼의 썸네일 에니메이션용 타이머 제거
|
||||
if (_hndl_tmrAmenityThumbAni != null) {
|
||||
clearInterval(_hndl_tmrAmenityThumbAni);
|
||||
@@ -2060,6 +2072,50 @@ HotelTV.ui_appfull = (function() {
|
||||
_elAmCtgySel.trigger('prev.owl', [700]);
|
||||
} else if (event.keyCode == gRmtKey.right) {
|
||||
_elAmCtgySel.trigger('next.owl', [700]);
|
||||
} else if (event.keyCode == gRmtKey.enter) {
|
||||
let __str_notify_msg = _trTbl.ui.amenity.message.invalidCategory[_state.lang].replace('__MENU__', __uifxn_AppFull_getOrderMenuName(_aminfo_ctgy));
|
||||
HotelTV.ui_utils.ShowNotificationMsgBalloon(__str_notify_msg, 5);
|
||||
} else if (event.keyCode == gRmtKey.back) {
|
||||
__uifxn_AppFull_DrawAmOrderList('hide');
|
||||
|
||||
// 카테고리 폼의 썸네일 에니메이션용 타이머 제거
|
||||
if (_hndl_tmrAmenityThumbAni != null) {
|
||||
clearInterval(_hndl_tmrAmenityThumbAni);
|
||||
_hndl_tmrAmenityThumbAni = null;
|
||||
console.log("TMR(AMENITY CATEGORY CTZ ANI For Thumbnail)::>Destoried...");
|
||||
}
|
||||
|
||||
//카트 비움 및 사용자 가이드 지움.
|
||||
__ifxn_clrearAmCarts();
|
||||
__uifxn_AppFull_DrawAmUserGuide("destroy");
|
||||
|
||||
// 어메니티 -> 메인 메뉴로 귀환
|
||||
$(document.activeElement).off('keydown');
|
||||
_elMainMenu.show(function() {
|
||||
$('#lst_mmsel').trigger('translate.owl.carousel', [0]);
|
||||
});
|
||||
|
||||
_elAmCtgySel.off('refresh.owl.carousel');
|
||||
_elAmCtgySel.off('change.owl.carousel');
|
||||
_elAmCtgySel.off('changed.owl.carousel');
|
||||
_elAmCtgySel.off('translate.owl.carousel');
|
||||
|
||||
_elAmCtgyBg.owlCarousel('destroy');
|
||||
_elAmCtgySel.owlCarousel('destroy');
|
||||
|
||||
_elAmCtgySel.children('div').remove();
|
||||
_elAmCtgyBg.children('div').remove();
|
||||
_elAmPupRoot.children('.bg').hide();
|
||||
_elAmPupRoot.children('.slider').hide();
|
||||
|
||||
setTimeout(function() {
|
||||
$('.main').fadeIn(1000, () => {
|
||||
_state.menu.stage.cur = "main";
|
||||
$('.main').addClass("depth_mm");
|
||||
__uifxn_AppFull_HotKey_ShowBtnOnMM(true);
|
||||
__uifxn_AppFull_TopWidjetShow(true);
|
||||
});
|
||||
}, 500);
|
||||
}
|
||||
} else if (_state.menu.stage.cur == "amenity_ctgy_item_sel") {
|
||||
if (event.keyCode == gRmtKey.left) {
|
||||
@@ -2162,6 +2218,9 @@ HotelTV.ui_appfull = (function() {
|
||||
}else{
|
||||
__uifxn_AppFull_DrawAmOrderList('hide');
|
||||
if ( _state.menu.stage.prev!=null ){
|
||||
if ( _state.menu.stage.prev=="preparing_amenity" ){
|
||||
_state.menu.stage.prev="amenity_ctgy_sel";
|
||||
}
|
||||
_state.menu.stage.cur = _state.menu.stage.prev;
|
||||
}
|
||||
}
|
||||
@@ -2806,15 +2865,6 @@ HotelTV.ui_appfull = (function() {
|
||||
|
||||
try {
|
||||
_elRsCtgyBgMenuItemCartWin.fadeOut(200, async function() {
|
||||
const ____getOrderMenuName = function(){
|
||||
for (__jj = 1; __jj <= _rsinfo_ctgy.length; __jj++) {
|
||||
if ( _rsinfo_ctgy[__jj].name=="ORDER" ) {
|
||||
return _rsinfo_ctgy[__jj].title[_state.lang];
|
||||
}
|
||||
}
|
||||
return "ORDER";
|
||||
}
|
||||
|
||||
let _str_result_message = null;
|
||||
// Remove All element under winleft&winright div
|
||||
__ifxn_removeRsSelectedItemCartWinElement();
|
||||
@@ -2828,7 +2878,7 @@ HotelTV.ui_appfull = (function() {
|
||||
} finally {
|
||||
if ( _result !=null ) {
|
||||
console.log(`Success to order Roomservice cart::>`);
|
||||
_str_result_message = _trTbl.ui.roomservice.message.orderSuccess[_state.lang].replace('__MENU__', ____getOrderMenuName());
|
||||
_str_result_message = _trTbl.ui.roomservice.message.orderSuccess[_state.lang].replace('__MENU__', __uifxn_AppFull_getOrderMenuName(_rsinfo_ctgy));
|
||||
_elRsCtgyBgMenuItemCartWinOrderWin.children('#message').text(_str_result_message);
|
||||
_elRsCtgyBgMenuItemCartWinOrderWin.fadeIn(500, async function() {
|
||||
try{
|
||||
@@ -3496,10 +3546,22 @@ HotelTV.ui_appfull = (function() {
|
||||
_elRsCtgySel.trigger('next.owl', [700]);
|
||||
} else if (event.keyCode == gRmtKey.enter) {
|
||||
// 카테고리 화면 빌드 및 화면 전환
|
||||
if ( __status_rs_specific.category_sel.cur in Object.keys(_rsinfo_ctgy) ){
|
||||
if ( _rsinfo_ctgy[__status_rs_specific.category_sel.cur].name == "CARTS" ){
|
||||
console.log("TODO::> NOTIFY cannot enter item sel on CARTS");
|
||||
}else if ( _rsinfo_ctgy[__status_rs_specific.category_sel.cur].name == "ORDER" ){
|
||||
console.log("TODO::> NOTIFY cannot enter item sel on ORDER");
|
||||
let __str_notify_msg = _trTbl.ui.roomservice.message.invalidCategory[_state.lang].replace('__MENU__', __uifxn_AppFull_getOrderMenuName(_rsinfo_ctgy));
|
||||
HotelTV.ui_utils.ShowNotificationMsgBalloon(__str_notify_msg, 5);
|
||||
}else{
|
||||
_state.menu.stage.cur = "roomservice_ctgy_item_sel";
|
||||
__uifxn_AppFull_DrawRsUserGuide("roomservice_ctgy_item_sel");
|
||||
__uifxn_AppFull_DrawRsItemSeletion("enter");
|
||||
}
|
||||
}
|
||||
} else if (event.keyCode == gRmtKey.back) {
|
||||
__uifxn_AppFull_DrawRsOrderList('hide');
|
||||
|
||||
// 카테고리 폼의 썸네일 에니메이션용 타이머 제거
|
||||
if (_hndl_tmrRoomserviceThumbAni != null) {
|
||||
clearInterval(_hndl_tmrRoomserviceThumbAni);
|
||||
@@ -3543,6 +3605,49 @@ HotelTV.ui_appfull = (function() {
|
||||
_elRsCtgySel.trigger('prev.owl', [700]);
|
||||
} else if (event.keyCode == gRmtKey.right) {
|
||||
_elRsCtgySel.trigger('next.owl', [700]);
|
||||
} else if (event.keyCode == gRmtKey.enter) {
|
||||
let __str_notify_msg = _trTbl.ui.roomservice.message.invalidCategory[_state.lang].replace('__MENU__', __uifxn_AppFull_getOrderMenuName(_rsinfo_ctgy));
|
||||
HotelTV.ui_utils.ShowNotificationMsgBalloon(__str_notify_msg, 5);
|
||||
} else if (event.keyCode == gRmtKey.back) {
|
||||
__uifxn_AppFull_DrawRsOrderList('hide');
|
||||
|
||||
// 카테고리 폼의 썸네일 에니메이션용 타이머 제거
|
||||
if (_hndl_tmrRoomserviceThumbAni != null) {
|
||||
clearInterval(_hndl_tmrRoomserviceThumbAni);
|
||||
_hndl_tmrRoomserviceThumbAni = null;
|
||||
console.log("TMR(ROOMSERVICE CATEGORY CTZ ANI For Thumbnail)::>Destoried...");
|
||||
}
|
||||
//카트 비움 및 사용자 가이드 지움.
|
||||
__ifxn_clrearRsCarts();
|
||||
__uifxn_AppFull_DrawRsUserGuide("destroy");
|
||||
|
||||
// 룸서비스 -> 메인 메뉴로 귀환
|
||||
$(document.activeElement).off('keydown');
|
||||
_elMainMenu.show(function() {
|
||||
$('#lst_mmsel').trigger('translate.owl.carousel', [0]);
|
||||
});
|
||||
|
||||
_elRsCtgySel.off('refresh.owl.carousel');
|
||||
_elRsCtgySel.off('change.owl.carousel');
|
||||
_elRsCtgySel.off('changed.owl.carousel');
|
||||
_elRsCtgySel.off('translate.owl.carousel');
|
||||
|
||||
_elRsCtgyBg.owlCarousel('destroy');
|
||||
_elRsCtgySel.owlCarousel('destroy');
|
||||
|
||||
_elRsCtgySel.children('div').remove();
|
||||
_elRsCtgyBg.children('div').remove();
|
||||
_elRsPupRoot.children('.bg').hide();
|
||||
_elRsPupRoot.children('.slider').hide();
|
||||
|
||||
setTimeout(function() {
|
||||
$('.main').fadeIn(1000, () => {
|
||||
_state.menu.stage.cur = "main";
|
||||
$('.main').addClass("depth_mm");
|
||||
__uifxn_AppFull_HotKey_ShowBtnOnMM(true);
|
||||
__uifxn_AppFull_TopWidjetShow(true);
|
||||
});
|
||||
}, 500);
|
||||
}
|
||||
} else if (_state.menu.stage.cur == "roomservice_ctgy_item_sel") {
|
||||
if (event.keyCode == gRmtKey.left) {
|
||||
@@ -3645,6 +3750,9 @@ HotelTV.ui_appfull = (function() {
|
||||
}else{
|
||||
__uifxn_AppFull_DrawRsOrderList('hide');
|
||||
if ( _state.menu.stage.prev!=null ){
|
||||
if ( _state.menu.stage.prev=="preparing_roomservice" ){
|
||||
_state.menu.stage.prev="roomservice_ctgy_sel";
|
||||
}
|
||||
_state.menu.stage.cur = _state.menu.stage.prev;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user