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

@@ -295,6 +295,9 @@
<span id="btn_back"></span> <span id="btn_back"></span>
</div> </div>
</div> </div>
<div class="notification">
<div class="balloon right"><span id="message"></span></div>
</div>
</div> </div>
@@ -313,9 +316,15 @@
<div class="player"></div> <div class="player"></div>
<!-- Error Frame Layout --> <!-- Error Frame Layout -->
<div class="error"></div> <div class="error">
<div id="details">
<div id="title"></div>
<div id="message"></div>
</div>
<div id="countdown">
<div id="message"></div>
</div>
</div>
<!-- Busy Animation Area --> <!-- Busy Animation Area -->
<div class="busy-frame"> <div class="busy-frame">
@@ -334,27 +343,6 @@
<div></div> <div></div>
</div> </div>
</div> </div>
<!-- Test -->
<!-- <div class="image-slider">
<ul id="imageGallery">
<li data-thumb="img/thumb/cS-1.jpg" data-src="img/largeImage.jpg">
<img src="/api/v3/downloads/62120b141a3bfd09e3608ba0/name/CTZ-THUMB-만장굴-00.jpg">
</li>
<li data-thumb="img/thumb/cS-2.jpg" data-src="img/largeImage1.jpg">
<img src="/api/v3/downloads/62120b141a3bfd09e3608ba2/name/CTZ-THUMB-만장굴-01.jpg">
</li>
<li data-thumb="img/thumb/cS-2.jpg" data-src="img/largeImage1.jpg">
<img src="/api/v3/downloads/62120b141a3bfd09e3608ba4/name/CTZ-THUMB-만장굴-02.jpg">
</li>
<li data-thumb="img/thumb/cS-2.jpg" data-src="img/largeImage1.jpg">
<img src="/api/v3/downloads/62120b141a3bfd09e3608ba6/name/CTZ-THUMB-만장굴-03.jpg">
</li>
<li data-thumb="img/thumb/cS-2.jpg" data-src="img/largeImage1.jpg">
<img src="/api/v3/downloads/62120b141a3bfd09e3608ba8/name/CTZ-THUMB-만장굴-04.jpg">
</li>
</ul>
</div> -->
</body> </body>
@@ -389,34 +377,7 @@
}); });
var _aa = null; var _aa = null;
window.addEventListener('load', function() { window.addEventListener('load', function() {
// _aa = $('.news .hoteltv-news-ticker').AcmeTicker({ console.log("Documents loaded...")
// type: 'horizontal',
// /*horizontal/horizontal/Marquee/type*/
// direction: 'right',
// /*up/down/left/right*/
// speed: true,
// waitms: 2000,
// /*true/false/number*/
// /*For vertical/horizontal 600*/
// /*For marquee 0.05*/
// /*For typewriter 50*/
// });
// setTimeout(function() {
// //_aa.isPause = true;
// _aa.restart();
// }, 10000);
// $('#imageGallery').lightSlider({
// item: 1,
// slideMargin: 0,
// mode: 'fade',
// adaptiveHeight: true,
// autoWidth: true,
// auto: true,
// loop: true
// });
}); });

View File

@@ -54,7 +54,7 @@
-webkit-backface-visibility: visible; -webkit-backface-visibility: visible;
transition: opacity .2s ease; transition: opacity .2s ease;
border: 2px solid rgb(80, 80, 80); border: 2px solid rgb(80, 80, 80);
filter: drop-shadow(0 1px 2px rgb(0, 0, 0)); filter: drop-shadow(0 1px 1px rgb(0, 0, 0));
border-radius: 30px; border-radius: 30px;
} }

View File

@@ -26,6 +26,11 @@
align-content: center; align-content: center;
} }
.main .ctzgen .bg .owl-dots .owl-dot span {
width: 20px;
height: 20px;
}
.main .ctzgen .bg div#lst_ctzgenbg { .main .ctzgen .bg div#lst_ctzgenbg {
position: absolute; position: absolute;
width: 1920px; width: 1920px;
@@ -103,25 +108,32 @@
.main .ctzgen .bg .owl-carousel .owl-item .ctz_desc_frame { .main .ctzgen .bg .owl-carousel .owl-item .ctz_desc_frame {
position: absolute; position: absolute;
top: 150px; top: 130px;
left: 40px; left: 1280px;
width: 400px; width: 620px;
height: 800px; height: 830px;
color: rgb(255, 255, 255); color: rgb(255, 255, 255);
background-color: rgba(0, 0, 0, 0.5);
padding: 0px 12px 0px 12px;
overflow: hidden;
} }
.main .ctzgen .bg .owl-carousel .owl-item .ctz_desc_frame #ctz_title { .main .ctzgen .bg .owl-carousel .owl-item .ctz_desc_frame #ctz_title {
position: absolute; position: absolute;
font-size: 60px; font-size: 44px;
width: 1800px; line-height: 44px;
height: 100px;
width: 100%;
padding: 10px; padding: 10px;
white-space: pre-wrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis;
} }
.main .ctzgen .bg .owl-carousel .owl-item .ctz_desc_frame #ctz_thumbnail { .main .ctzgen .bg .owl-carousel .owl-item .ctz_desc_frame #ctz_thumbnail {
margin: 120px 10px 40px 10px; margin: 120px 10px 40px 10px;
height: 220px; height: 220px;
filter: drop-shadow(0 0 10px rgba(0, 0, 0, 1)); /* filter: drop-shadow(0 0 10px rgba(0, 0, 0, 1)); */
/* border: 4px solid rgb(255, 255, 255); */ /* border: 4px solid rgb(255, 255, 255); */
} }
@@ -129,20 +141,21 @@
width: auto; width: auto;
height: 212px; height: 212px;
overflow: hidden; overflow: hidden;
border: 2px solid rgb(40, 40, 40); /* border: 2px solid rgb(40, 40, 40); */
border: 2px solid rgb(160, 160, 160);
} }
.main .ctzgen .bg .owl-carousel .owl-item .ctz_desc_frame #ctz_description { .main .ctzgen .bg .owl-carousel .owl-item .ctz_desc_frame #ctz_description {
position: absolute; position: absolute;
font-size: 26px; font-size: 26px;
width: 700px; width: 100%;
line-height: 26px; line-height: 26px;
margin: 0 10px 0 10px; margin: 0 10px 0 10px;
} }
.main .ctzgen .bg .owl-carousel .owl-item .ctz_mv_ctrl { .main .ctzgen .bg .owl-carousel .owl-item .ctz_mv_ctrl {
position: absolute; position: absolute;
top: 870px; top: 970px;
left: 1700px; left: 1700px;
height: 54px; height: 54px;
line-height: 54px; line-height: 54px;

View File

@@ -100,6 +100,17 @@ div#mm_item_icon {
align-content: center; align-content: center;
} }
.main .mm .slider .owl-theme .owl-dots .owl-dot span {
width: 20px;
height: 20px;
background: none;
}
.main .mm .slider .owl-theme .owl-dots .owl-dot.active span {
/* background: rgb(181, 218, 16); */
background: rgb(245, 245, 245);
}
/* .main .mm .slider .owl-carousel .owl-item.active.focus div { /* .main .mm .slider .owl-carousel .owl-item.active.focus div {
transform: scale(1.14); transform: scale(1.14);

View File

@@ -473,7 +473,7 @@
.popup .amenity>.items { .popup .amenity>.items {
/* width: 100%; */ /* width: 100%; */
height: 390px; height: 390px;
background-color: rgba(48, 48, 48, 1.0); /* background-color: rgba(48, 48, 48, 1.0); */
/* overflow-y: auto; */ /* overflow-y: auto; */
overflow-y: hidden; overflow-y: hidden;
overflow-x: hidden; overflow-x: hidden;
@@ -484,11 +484,13 @@
.popup .amenity>.items table { .popup .amenity>.items table {
width: 100%; width: 100%;
border-collapse: collapse;
} }
.popup .amenity>.items .table tr { .popup .amenity>.items .table tr {
width: 100%; width: 100%;
height: 130px; height: 130px;
border-bottom: 1px solid rgb(52, 52, 52);
/* background-color: rgb(0, 0, 128); */ /* background-color: rgb(0, 0, 128); */
} }
@@ -586,7 +588,7 @@
} }
.popup .amenity>.items .table tr.active { .popup .amenity>.items .table tr.active {
background-color: rgba(67, 67, 67, 1); background-color: rgba(48, 48, 48, 1.0);
box-shadow: 0px 0px 30px rgba(0, 0, 0, 1); box-shadow: 0px 0px 30px rgba(0, 0, 0, 1);
} }
@@ -658,6 +660,7 @@
.popup .amenity>.order-details>.items table { .popup .amenity>.order-details>.items table {
width: 100%; width: 100%;
border-collapse: collapse;
} }
.popup .amenity>.order-details>.items .table tr { .popup .amenity>.order-details>.items .table tr {
@@ -740,7 +743,8 @@
} }
.popup .amenity>.order-details>.items .table tr.active { .popup .amenity>.order-details>.items .table tr.active {
background-color: rgba(67, 67, 67, 1); /* background-color: rgba(67, 67, 67, 1); */
background-color: rgba(48, 48, 48, 1.0);
box-shadow: 0px 0px 30px rgba(0, 0, 0, 1); box-shadow: 0px 0px 30px rgba(0, 0, 0, 1);
} }
@@ -807,7 +811,6 @@
border-color: rgb(96, 96, 96); border-color: rgb(96, 96, 96);
vertical-align: top; vertical-align: top;
/* filter: drop-shadow(0 0 10px rgba(255, 255, 255, 1)); */ /* filter: drop-shadow(0 0 10px rgba(255, 255, 255, 1)); */
background-color: rgba(67, 67, 67, 1);
/* box-shadow: 0px 0px 30px rgba(0, 0, 0, 1); */ /* box-shadow: 0px 0px 30px rgba(0, 0, 0, 1); */
} }
@@ -839,7 +842,7 @@
.popup .roomservice .menu>.items { .popup .roomservice .menu>.items {
/* width: 100%; */ /* width: 100%; */
height: 390px; height: 390px;
background-color: rgba(48, 48, 48, 1.0); /* background-color: rgba(48, 48, 48, 1.0); */
/* overflow-y: auto; */ /* overflow-y: auto; */
overflow-y: hidden; overflow-y: hidden;
overflow-x: hidden; overflow-x: hidden;
@@ -850,11 +853,13 @@
.popup .roomservice .menu>.items table { .popup .roomservice .menu>.items table {
width: 100%; width: 100%;
border-collapse: collapse;
} }
.popup .roomservice .menu>.items .table tr { .popup .roomservice .menu>.items .table tr {
width: 100%; width: 100%;
height: 106px; height: 106px;
border-bottom: 1px solid rgb(52, 52, 52);
/* background-color: rgb(0, 0, 128); */ /* background-color: rgb(0, 0, 128); */
} }
@@ -882,7 +887,7 @@
height: 70px; height: 70px;
margin: 0px 5px 0px 5px; margin: 0px 5px 0px 5px;
display: block; display: block;
vertical-align: top; /* vertical-align: top; */
font-size: 18px; font-size: 18px;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 1); text-shadow: 2px 2px 4px rgba(0, 0, 0, 1);
/* background-color: rgba(124, 124, 0, 1); */ /* background-color: rgba(124, 124, 0, 1); */
@@ -929,7 +934,8 @@
} }
.popup .roomservice .menu>.items .table tr.active { .popup .roomservice .menu>.items .table tr.active {
background-color: rgba(67, 67, 67, 1); /* background-color: rgba(67, 67, 67, 1); */
background-color: rgba(48, 48, 48, 1.0);
box-shadow: 0px 0px 30px rgba(0, 0, 0, 1); box-shadow: 0px 0px 30px rgba(0, 0, 0, 1);
} }
@@ -1267,4 +1273,72 @@
background-position: right center; background-position: right center;
background-size: contain; background-size: contain;
filter: drop-shadow(0 0 5px rgba(0, 0, 0, 1)); filter: drop-shadow(0 0 5px rgba(0, 0, 0, 1));
}
/* Notification Style */
.popup>.notification {
display: none;
position: absolute;
top: 10%;
left: 73%;
width: 26%;
height: 10%;
}
.popup>.notification>.balloon {
position: relative;
display: inline-block;
}
.popup>.notification>.balloon span {
display: inline-block;
padding: 10px;
color: #fff;
background: #ad1e51;
border-radius: 20px;
font-size: 28px;
}
.popup>.notification>.balloon:after {
content: '';
position: absolute;
width: 0;
height: 0;
border-style: solid;
}
.popup>.notification>.balloon.right:after,
.popup>.notification>.balloon.left:after {
border-width: 10px 15px;
top: 50%;
margin-top: -10px;
}
.popup>.notification>.balloon.top:after,
.popup>.notification>.balloon.bottom:after {
border-width: 15px 10px;
left: 50%;
margin-left: -10px;
}
.popup>.notification>.balloon.top:after {
border-color: #ad1e51 transparent transparent transparent;
bottom: -25px;
}
.popup>.notification>.balloon.bottom:after {
border-color: transparent transparent #ad1e51 transparent;
top: -25px;
}
.popup>.notification>.balloon.left:after {
border-color: transparent #ad1e51 transparent transparent;
left: -25px;
}
.popup>.notification>.balloon.right:after {
border-color: transparent transparent transparent #ad1e51;
right: -25px;
} }

View File

@@ -117,22 +117,23 @@ div#sm_item_icon {
align-content: center; align-content: center;
} }
.main .sub .slider .owl-dots .owl-dot span {
width: 20px;
height: 20px;
}
.main .sub .slider .owl-dots .owl-dot.active span {
background: rgb(255, 192, 0);
}
.main .sub .bg .bg_ctz_thumb_frame { .main .sub .bg .bg_ctz_thumb_frame {
position: absolute; position: absolute;
top: 130px; top: 130px;
left: 1550px; left: 1550px;
width: 360px; width: 360px;
height: 700px; height: 734px;
line-height: 50px; line-height: 50px;
/* background-color: rgba(30, 30, 30, 0.6); background-color: rgba(0, 0, 0, 0.5);
filter: drop-shadow(0 0 12px rgba(0, 0, 0, 0.8));
border-radius: 8px;
border: solid rgb(181, 218, 16);
*/
background-color: rgba(40, 40, 40, 0.6);
filter: drop-shadow(0 0 12px rgba(0, 0, 0, 0.8));
border-radius: 4px;
border: solid rgb(10, 10, 10);
overflow: hidden; overflow: hidden;
} }
@@ -141,13 +142,13 @@ div#sm_item_icon {
height: 180px; height: 180px;
float: left; float: left;
margin: 10px 20px 10px 20px; margin: 10px 20px 10px 20px;
filter: drop-shadow(0 0 10px rgba(235, 235, 235, 0.9)); /* filter: drop-shadow(0 0 10px rgba(235, 235, 235, 0.9));
border-radius: 6px; border-radius: 6px; */
text-align: center; text-align: center;
line-height: 50px; line-height: 50px;
font-size: 20px; font-size: 20px;
color: rgb(235, 235, 235); color: rgb(235, 235, 235);
border: 1px solid rgb(60, 60, 60); border: 1px solid rgb(160, 160, 160);
display: inline; display: inline;
} }
@@ -160,7 +161,7 @@ div#sm_item_icon {
.main .sub .bg .bg_ctz_thumb_frame #bg_ctz_thumb_morenotice { .main .sub .bg .bg_ctz_thumb_frame #bg_ctz_thumb_morenotice {
font-size: 22px; font-size: 22px;
margin: 20px 5px 10px 20px; margin: 20px 5px 10px 20px;
line-height: 50px; line-height: 25px;
overflow-wrap: break-word; overflow-wrap: break-word;
color: rgb(181, 218, 16); color: rgb(181, 218, 16);
animation: bg_ctz_thumb_morenotice_blinker 2s linear infinite; animation: bg_ctz_thumb_morenotice_blinker 2s linear infinite;

View File

@@ -20,8 +20,9 @@
width: 100%; width: 100%;
height: 100px; height: 100px;
/* background-color: rgba(0, 0, 0, 0.5); */ /* background-color: rgba(0, 0, 0, 0.5); */
filter: drop-shadow(0 0px 5px rgba(0, 0, 0, 1)); /* filter: drop-shadow(0 0px 5px rgba(0, 0, 0, 1)); */
padding: 0px; padding: 0px;
display: none;
} }
@@ -97,6 +98,7 @@
justify-content: center; justify-content: center;
display: flex; display: flex;
align-items: center; align-items: center;
filter: drop-shadow(0 0px 5px rgba(0, 0, 0, 0.5));
} }
.widjet .top .weather #temp { .widjet .top .weather #temp {
@@ -131,6 +133,7 @@
line-height: 52px; line-height: 52px;
padding: 5px 0; padding: 5px 0;
text-align: right; text-align: right;
/* -webkit-text-stroke: 1px rgb(64,64,64); */
} }
.widjet .top .datetime .date { .widjet .top .datetime .date {

View File

@@ -7,10 +7,70 @@
width: 1920px; width: 1920px;
height: 1080px; height: 1080px;
z-index: 10; z-index: 10;
background-size: cover;
display: none; display: none;
} }
.error .bg { .error #details {
position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
}
.error #details #title {
position: relative;
left: 9%;
top: 34%;
width: 100%;
height: 50%;
color: rgb(235, 235, 235);
font-size: 64px;
filter: drop-shadow(0 0 5px rgb(0, 0, 0));
display: block;
/* justify-content: center; */
/* align-items: center; */
}
.error #details #message {
position: relative;
left: 9%;
width: 100%;
height: 50%;
color: rgb(235, 0, 0);
font-size: 38px;
filter: drop-shadow(0 0 5px rgb(0, 0, 0));
display: flex;
/* vertical-align: middle; */
/* justify-content: center; */
/* align-items: center; */
white-space: pre-line;
}
.error #details #message.info {
color: rgb(0, 255, 64);
}
.error #countdown {
position: absolute;
top: 40%;
left: 20%;
width: 60%;
height: 20%;
background-color: rgba(10, 10, 10, 0.7);
border-radius: 8px;
border: solid rgb(64, 64, 64);
display: none;
}
.error #countdown #message {
position: relative;
width: 100%;
height: 100%;
color: rgb(252, 180, 43);
font-size: 38px;
filter: drop-shadow(0 0 5px rgb(0, 0, 0));
display: flex;
justify-content: center;
align-items: center;
white-space: pre-line;
} }

View File

@@ -20,9 +20,13 @@
</div> </div>
<div class="error"> <div class="error">
<div id="bg"></div> <div id="details">
<div id="title"></div> <div id="title"></div>
<div id="message"></div> <div id="message"></div>
</div>
<div id="countdown">
<div id="message"></div>
</div>
</div> </div>
<!-- Busy Animation Area --> <!-- Busy Animation Area -->

View File

@@ -6,7 +6,7 @@
* @summary short description for the file * @summary short description for the file
* @author Joel <joel.kim@centirm.com> * @author Joel <joel.kim@centirm.com>
* *
* Created at : 2020-11-26 02:21:56 * Created at : 2020-11-26 02:21:56
* Last modified : 2020-11-26 15:31:40 * Last modified : 2020-11-26 15:31:40
*/ */
@@ -21,7 +21,8 @@ HotelTV.api = (function() {
_token = "aLc*eBgTijklRnopq4s", _token = "aLc*eBgTijklRnopq4s",
_registered = false, _registered = false,
_exist = false, _exist = false,
_svr_port = 0; _svr_port = 0,
_1stBoot = false;
//// 비공개 프로퍼티 //// 비공개 프로퍼티
@@ -29,7 +30,7 @@ HotelTV.api = (function() {
//// 비공개 매써드 //// 비공개 매써드
/** /**
* *
*/ */
function __apifxn_init(param) { function __apifxn_init(param) {
_api_ver = param.api_ver; _api_ver = param.api_ver;
@@ -41,6 +42,7 @@ HotelTV.api = (function() {
_token = param.apikey; _token = param.apikey;
_registered = param.registered; _registered = param.registered;
_exist = param.exist; _exist = param.exist;
_1stBoot = param.firstBoot;
} }
@@ -200,17 +202,17 @@ HotelTV.api = (function() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (HotelTV.state.token) { if (HotelTV.state.token) {
let _token = HotelTV.state.token; let _token = HotelTV.state.token;
__apifxn_init({ 'dev_familly': model, 'serial_num': serial, 'svr_ip': ip, 'svr_port': port, 'api_ver': _token.version, "license": _token.license, "apikey": _token.apikey, "registered": _token.registered, "exist": _token.exist }); __apifxn_init({ 'dev_familly': model, 'serial_num': serial, 'svr_ip': ip, 'svr_port': port, 'api_ver': _token.version, "license": _token.license, "apikey": _token.apikey, "registered": _token.registered, "exist": _token.exist, "firstBoot": false });
resolve(0); resolve(0);
} else { } else {
// licenses api format // licenses api format
// <svr ip:svr port>/api/licenses/us761h0n/103INLV4B896 // <svr ip:svr port>/api/licenses/us761h0n/103INLV4B896
var sz_api_url = "http://" + ip + ":" + port + "/api/licenses" + "/" + model + "/" + serial; var sz_api_url = "http://" + ip + ":" + port + "/api/licenses" + "/" + model + "/" + serial;
console.log("Debug: request token url:" + sz_api_url); console.log("Debug: request token url:" + sz_api_url);
__apifxn_CallCmsApi("GET", sz_api_url, "GetToken", null).then(_result => { __apifxn_CallCmsApi("GET", sz_api_url, "GetToken", null).then(_result => {
//console.log(`Success::>${_result.data}`); //console.log(`Success::>${_result.data}`);
HotelTV.state.token = JSON.parse(_result.data); HotelTV.state.token = JSON.parse(_result.data);
__apifxn_init({ 'dev_familly': model, 'serial_num': serial, 'svr_ip': ip, 'svr_port': port, 'api_ver': HotelTV.state.token.version, "license": HotelTV.state.token.license, "apikey": HotelTV.state.token.apikey, "registered": HotelTV.state.token.registered, "exist": HotelTV.state.token.exist }); __apifxn_init({ 'dev_familly': model, 'serial_num': serial, 'svr_ip': ip, 'svr_port': port, 'api_ver': HotelTV.state.token.version, "license": HotelTV.state.token.license, "apikey": HotelTV.state.token.apikey, "registered": HotelTV.state.token.registered, "exist": HotelTV.state.token.exist, "firstBoot": HotelTV.state.token.firstBoot });
resolve(0); resolve(0);
}).catch(_error => { }).catch(_error => {
console.log(`Failure::>${_error.reason}`); console.log(`Failure::>${_error.reason}`);
@@ -506,7 +508,7 @@ HotelTV.api = (function() {
}, },
/** /**
* HotelTV API ::> order amenity * HotelTV API ::> order amenity
* @param {dictionary} _cart_id if _item_id isn't null it will return specified info with _item_id * @param {dictionary} _cart_id if _item_id isn't null it will return specified info with _item_id
*/ */
PutAmenityOrders: function(_cart_item) { PutAmenityOrders: function(_cart_item) {
@@ -607,7 +609,7 @@ HotelTV.api = (function() {
}, },
/** /**
* HotelTV API ::> order room service * HotelTV API ::> order room service
* @param {dictionary} _cart_id if _item_id isn't null it will return specified info with _item_id * @param {dictionary} _cart_id if _item_id isn't null it will return specified info with _item_id
*/ */
PutRoomserviceOrders: function(_cart_item) { PutRoomserviceOrders: function(_cart_item) {

View File

@@ -649,7 +649,7 @@ HotelTV.hcap = (function() {
hcap.channel.setStartChannel({ hcap.channel.setStartChannel({
"channelType": hcap.channel.ChannelType.UNKNOWN, "channelType": hcap.channel.ChannelType.UNKNOWN,
"onSuccess": function() { "onSuccess": function() {
console.log("onSuccess::StartChanell Cetting"); console.log("onSuccess::StartChanell Setting");
}, },
"onFailure": function(f) { "onFailure": function(f) {
console.log("onFailure : errorMessage = " + f.errorMessage); console.log("onFailure : errorMessage = " + f.errorMessage);
@@ -810,6 +810,7 @@ HotelTV.hcap = (function() {
// mode : bridge, securityType : psk // mode : bridge, securityType : psk
hcap.network.setSoftAP({ hcap.network.setSoftAP({
"channel": Number(_wlan_cfg.channel), "channel": Number(_wlan_cfg.channel),
"vlanId": 0,
"signalStrength": Number(_wlan_cfg.signalStrength), "signalStrength": Number(_wlan_cfg.signalStrength),
"mode": "bridge", "mode": "bridge",
"securityType": (_wlan_cfg.securityType == "open") ? "open" : "psk", "securityType": (_wlan_cfg.securityType == "open") ? "open" : "psk",
@@ -1004,14 +1005,14 @@ HotelTV.hcap = (function() {
for (let i = 0; i < _ret.length; i++) { for (let i = 0; i < _ret.length; i++) {
let _set_item = _ret[i]; let _set_item = _ret[i];
let no_need_reboot_param = ["wifi_screen_share", "soft_ap", "soft_ap_ui", "osd_layer_id"]; let no_need_reboot_param = ["wifi_screen_share", "soft_ap", "soft_ap_ui", "osd_layer_id"];
if (no_need_reboot_param.indexOf(_set_item.key) !== -1) { if (no_need_reboot_param.indexOf(_set_item.key) == -1) {
//Needed reboot the system //Needed reboot the system
need_to_reboot = true; need_to_reboot = true;
} }
console.log(`Device config[${_set_item.key}] set to ${_set_item.value}`); console.log(`Device config[${_set_item.key}] set to ${_set_item.value}`);
} }
resolve(need_to_reboot);
}); });
resolve(need_to_reboot);
} else { } else {
resolve(need_to_reboot); resolve(need_to_reboot);
} }
@@ -1200,7 +1201,30 @@ HotelTV.hcap = (function() {
}, },
PreAppGetInfo: function(_en_show_msg) { PreAppGetInfo: function(_en_show_msg) {
if (g_hcap_info.preapp == null) { // if (g_hcap_info.preapp == null) {
// hcap.preloadedApplication.getPreloadedApplicationList({
// "onSuccess": function(s) {
// if (_en_show_msg == true) {
// console.log("onSuccess : list length = " + s.list.length);
// for (var i = 0; i < s.list.length; i++) {
// console.log(
// "list[" + i + "].id = " + s.list[i].id +
// "list[" + i + "].title = " + s.list[i].title +
// "list[" + i + "].iconFilePath = " + s.list[i].iconFilePath
// );
// }
// }
// if (s.result == true) {
// g_hcap_info.preapp = s.list;
// }
// },
// "onFailure": function(f) {
// console.log("onFailure : errorMessage = " + f.errorMessage);
// }
// });
// }
return new Promise((resolve, reject) => {
hcap.preloadedApplication.getPreloadedApplicationList({ hcap.preloadedApplication.getPreloadedApplicationList({
"onSuccess": function(s) { "onSuccess": function(s) {
if (_en_show_msg == true) { if (_en_show_msg == true) {
@@ -1215,13 +1239,15 @@ HotelTV.hcap = (function() {
} }
if (s.result == true) { if (s.result == true) {
g_hcap_info.preapp = s.list; g_hcap_info.preapp = s.list;
resolve({ "error": 0, "applist": g_hcap_info.preapp });
} }
}, },
"onFailure": function(f) { "onFailure": function(f) {
console.log("onFailure : errorMessage = " + f.errorMessage); console.log("onFailure : errorMessage = " + f.errorMessage);
resolve({ "error": -1, "applist": null });
} }
}); });
} });
}, },
LaunchPreApp: function(_name, _param) { LaunchPreApp: function(_name, _param) {
@@ -1245,7 +1271,7 @@ HotelTV.hcap = (function() {
if (item.title == 'Netflix') { if (item.title == 'Netflix') {
hcap.preloadedApplication.launchPreloadedApplication({ hcap.preloadedApplication.launchPreloadedApplication({
"id": item.id, // NETFLIX "id": item.id, // NETFLIX
"parameter": "{'params': {'hotel_id':'CENTIRM-Demo','launcher_version':'1.0'}", "parameter": `{'params': {'hotel_id':${_param.hotel_name},'launcher_version':'1.0'}`,
"onSuccess": function() { "onSuccess": function() {
console.log("onSuccess"); console.log("onSuccess");
}, },

View File

@@ -6,7 +6,7 @@
* @summary short description for the file * @summary short description for the file
* @author Joel <joel.kim@centirm.com> * @author Joel <joel.kim@centirm.com>
* *
* Created at : 2020-11-26 02:21:56 * Created at : 2020-11-26 02:21:56
* Last modified : 2020-11-26 15:31:40 * Last modified : 2020-11-26 15:31:40
*/ */
@@ -74,7 +74,7 @@ var HotelTV = HotelTV || {
HotelTV.namespace = function(ns_string) { HotelTV.namespace = function(ns_string) {
var parts = ns_string.split('.'), var parts = ns_string.split('.'),
parent = HotelTV, parent = HotelTV,
i; // 처음에 중복되는 전역 객체명은 제거한다. i; // 처음에 중복되는 전역 객체명은 제거한다.
if (parts[0] == 'HotelTV') { if (parts[0] == 'HotelTV') {
parts = parts.slice(1); parts = parts.slice(1);
} }
@@ -157,7 +157,7 @@ function __fxn_Set_DebugOpt() {
HotelTV.Init = async function() { HotelTV.Init = async function() {
console.log("Start Initialization:: "); console.log("Start Initialization:: ");
//STEP#01::> Shutdown Channel //STEP#01::> Shutdown Channel
HotelTV.hcap.ChannelShutDown(); HotelTV.hcap.ChannelShutDown();
//SETP#02::> Set Debug Options //SETP#02::> Set Debug Options
@@ -169,7 +169,24 @@ HotelTV.Init = async function() {
await HotelTV.hcap.GetDevInfo(); await HotelTV.hcap.GetDevInfo();
//await HotelTV.hcap.ShowDevInfo(); //await HotelTV.hcap.ShowDevInfo();
} catch (_error) { } catch (_error) {
console.log("Fail to get device information"); let _tmval = 10;
HotelTV.ui_utils.ShowErrMsg(true,
"system.error.get-devinfo",
"SYSTEM ERROR",
"Fail to get System Information.\r\nplease contact your system administrator.", {
"timeout": _tmval,
"cb_disp": function() {
_tmval -= 1;
console.log("time..." + _tmval);
if ($('.error #countdown').css("display") == "none") {
$('.error #countdown').fadeIn(1000);
}
$('.error #countdown #message').text(`System will be reboot in ${_tmval} second...`);
},
"cb_eoe": function() {
setTimeout(HotelTV.hcap.Reboot(), 500);
}
});
} }
//STEP#04::> API Module INIT //STEP#04::> API Module INIT
@@ -179,7 +196,24 @@ HotelTV.Init = async function() {
let __apiRet = await HotelTV.api.CheckRegistration(); let __apiRet = await HotelTV.api.CheckRegistration();
HotelTV.state['registration'] = await HotelTV.api.CheckRegistration(); HotelTV.state['registration'] = await HotelTV.api.CheckRegistration();
} catch (_error) { } catch (_error) {
console.log("Display Error page for check registration"); let _tmval = 50;
HotelTV.ui_utils.ShowErrMsg(true,
"system.error.check-registration",
"SYSTEM ERROR",
"Un registered device.\r\nplease contact your system administrator.", {
"timeout": _tmval,
"cb_disp": function() {
_tmval -= 1;
console.log("time..." + _tmval);
if ($('.error #countdown').css("display") == "none") {
$('.error #countdown').fadeIn(1000);
}
$('.error #countdown #message').text(`The Device ID is ${HotelTV.devinfo.serial_number}.\r\n\r\nSystem will be reboot in ${_tmval} second...`);
},
"cb_eoe": function() {
setTimeout(HotelTV.hcap.Reboot(), 500);
}
});
} }
if (HotelTV.state['registration'].registered != true) { if (HotelTV.state['registration'].registered != true) {
@@ -195,30 +229,115 @@ HotelTV.Init = async function() {
if (need_reboot == true) { if (need_reboot == true) {
console.log("System Need to Reboot"); console.log("System Need to Reboot");
HotelTV.ui_utils.SetBusy(false); HotelTV.ui_utils.SetBusy(false);
HotelTV.ui_utils.ShowErrMsg(true, "", "");
setTimeout(HotelTV.hcap.Reboot(), 3000); let _tmval = 20;
HotelTV.ui_utils.ShowErrMsg(true,
"system.info.change-configuration",
"SYSTEM INFO",
`System configuration was changed.\r\n\r\nSystem information summary::\r\nDevice Serial Number: ${HotelTV.devinfo.serial_number}\r\nThe Device Model Name: ${HotelTV.devinfo.model_name}\r\nNetwork Configuration:${HotelTV.devinfo.network_info.ip_address}/${HotelTV.devinfo.network_info.subnet_mask}/${HotelTV.devinfo.network_info.gateway}`, {
"timeout": _tmval,
"cb_disp": function() {
_tmval -= 1;
console.log("time..." + _tmval);
if ($('.error #countdown').css("display") == "none") {
$('.error #countdown').fadeIn(1000);
}
$('.error #countdown #message').text(`System will be reboot in ${_tmval} second...`);
},
"cb_eoe": function() {
setTimeout(HotelTV.hcap.Reboot(), 500);
}
});
return; return;
} }
} catch (_error) { } catch (_error) {
console.log("Display Error page for get stttings"); let _tmval = 50;
HotelTV.ui_utils.ShowErrMsg(true,
"system.set-devinfo",
"SYSTEM ERROR",
"Fail to configure device.\r\nplease contact your system administrator.", {
"timeout": _tmval,
"cb_disp": function() {
_tmval -= 1;
console.log("time..." + _tmval);
if ($('.error #countdown').css("display") == "none") {
$('.error #countdown').fadeIn(1000);
}
$('.error #countdown #message').text(`The Device ID is ${HotelTV.devinfo.serial_number}.\r\n\r\nSystem will be reboot in ${_tmval} second...`);
},
"cb_eoe": function() {
setTimeout(HotelTV.hcap.Reboot(), 500);
}
});
} }
try { try {
HotelTV.hotelinfo = await HotelTV.api.GetHotelInfo(); HotelTV.hotelinfo = await HotelTV.api.GetHotelInfo();
} catch (_error) { } catch (_error) {
console.log("Display Error page for get hotel info"); let _tmval = 50;
HotelTV.ui_utils.ShowErrMsg(true,
"system.error.get-hotelinfo",
"SYSTEM ERROR",
"Fail to get hotel information.\r\nplease contact your system administrator.", {
"timeout": _tmval,
"cb_disp": function() {
_tmval -= 1;
console.log("time..." + _tmval);
if ($('.error #countdown').css("display") == "none") {
$('.error #countdown').fadeIn(1000);
}
$('.error #countdown #message').text(`The Device ID is ${HotelTV.devinfo.serial_number}.\r\n\r\nSystem will be reboot in ${_tmval} second...`);
},
"cb_eoe": function() {
setTimeout(HotelTV.hcap.Reboot(), 500);
}
});
} }
try { try {
HotelTV.guestinfo = await HotelTV.api.GetGuestInfo(); HotelTV.guestinfo = await HotelTV.api.GetGuestInfo();
} catch (_error) { } catch (_error) {
console.log("Display Error page for get Guest info"); let _tmval = 50;
HotelTV.ui_utils.ShowErrMsg(true,
"system.error.get-guestinfo",
"SYSTEM ERROR",
"Fail to get guest information.\r\nplease contact your system administrator.", {
"timeout": _tmval,
"cb_disp": function() {
_tmval -= 1;
console.log("time..." + _tmval);
if ($('.error #countdown').css("display") == "none") {
$('.error #countdown').fadeIn(1000);
}
$('.error #countdown #message').text(`The Device ID is ${HotelTV.devinfo.serial_number}.\r\n\r\nSystem will be reboot in ${_tmval} second...`);
},
"cb_eoe": function() {
setTimeout(HotelTV.hcap.Reboot(), 500);
}
});
} }
try { try {
HotelTV.opening = await HotelTV.api.GetOpeningCtz(); HotelTV.opening = await HotelTV.api.GetOpeningCtz();
} catch (_error) { } catch (_error) {
console.log("Display Error page for get Opening Contents"); let _tmval = 50;
HotelTV.ui_utils.ShowErrMsg(true,
"system.error.get-openingctzinfo",
"SYSTEM ERROR",
"Fail to get opening contents information.\r\nplease contact your system administrator.", {
"timeout": _tmval,
"cb_disp": function() {
_tmval -= 1;
console.log("time..." + _tmval);
if ($('.error #countdown').css("display") == "none") {
$('.error #countdown').fadeIn(1000);
}
$('.error #countdown #message').text(`The Device ID is ${HotelTV.devinfo.serial_number}.\r\n\r\nSystem will be reboot in ${_tmval} second...`);
},
"cb_eoe": function() {
setTimeout(HotelTV.hcap.Reboot(), 500);
}
});
} }
try { try {
@@ -236,7 +355,24 @@ HotelTV.Init = async function() {
try { try {
HotelTV.tvguide = await HotelTV.api.GetProgramCtz(); HotelTV.tvguide = await HotelTV.api.GetProgramCtz();
} catch (_error) { } catch (_error) {
console.log("Display Error page for get tvguide info"); //console.log("Display Error page for get tvguide info");
HotelTV.ui_utils.ShowErrMsg(true,
"system.error.get-tvguideinfo",
"SYSTEM ERROR",
"Fail to get tv program contents information.\r\nplease contact your system administrator.", {
"timeout": _tmval,
"cb_disp": function() {
_tmval -= 1;
console.log("time..." + _tmval);
if ($('.error #countdown').css("display") == "none") {
$('.error #countdown').fadeIn(1000);
}
$('.error #countdown #message').text(`The Device ID is ${HotelTV.devinfo.serial_number}.\r\n\r\nSystem will be reboot in ${_tmval} second...`);
},
"cb_eoe": function() {
setTimeout(HotelTV.hcap.Reboot(), 500);
}
});
} }
try { try {
@@ -403,30 +539,44 @@ HotelTV.LoadAppFull = async function() {
//STEP#03: INIT HCAP for HotelTV FullAPP //STEP#03: INIT HCAP for HotelTV FullAPP
try { let tmrAppAuth = setInterval(async function() {
let siAppToken = null; let _foundNetflix = false;
let siAppName = null; let _hcapAppInfo = await HotelTV.hcap.PreAppGetInfo(false);
// siApp Token Authentication HotelTV.state['hcap_app'] = _hcapAppInfo.applist;
let _progam = HotelTV.tvguide.program; for (_i = 0; _i < HotelTV.state['hcap_app'].length; _i++) {
for (let _i = 1; _i <= _progam.length; _i++) { if (HotelTV.state['hcap_app'][_i].title == "Netflix") {
if (_progam[_i].type == "application" && _progam[_i].service == "netflix") { console.log("Found out netflix among of pre hcap app-list.")
siAppToken = await HotelTV.api.DownloadData(_progam[_i].license.file.download); clearInterval(tmrAppAuth);
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"); 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);
//STEP#05: Set Display size //STEP#05: Set Display size
let _res = HotelTV.devinfo.display_resolution.split("x"); let _res = HotelTV.devinfo.display_resolution.split("x");
HotelTV.ui_appfull.Init(_res[0], _res[1]); HotelTV.ui_appfull.Init(_res[0], _res[1]);
HotelTV.hcap.PreAppGetInfo(false);
//STEP#06; Show UI //STEP#06; Show UI
//await HotelTV.hcap.ShowDevInfo(); //await HotelTV.hcap.ShowDevInfo();
@@ -470,28 +620,28 @@ HotelTV.LoadAppFull = async function() {
// } // }
// } else if (recvMsg.event == "update_weather") { // } else if (recvMsg.event == "update_weather") {
// } else if (recvMsg.event == "update_report") { // }
// // HotelTV.hcap.GetUptime();
// // HotelTV.hcap.GetDeviceUsage().then(_usage => { // if (recvMsg.event == "update_report") {
// // //console.log(`USAGE::> CPU[${_usage.cpu}%] RAM[${_usage.mem}%]`); // HotelTV.hcap.GetUptime();
// // //HotelTV.api.ReportBrief(HotelTV.devinfo, HotelTV.guestinfo, _usage); // HotelTV.hcap.GetDeviceUsage().then(_usage => {
// // }); // console.log(`USAGE::> CPU[${_usage.cpu}%] RAM[${_usage.mem}%]`);
// } else if (recvMsg.event == "mqtt_events") { // //HotelTV.api.ReportBrief(HotelTV.devinfo, HotelTV.guestinfo, _usage);
// console.log(`MQTTMSG::> ${recvMsg.data}`); // });
// } // }
} }
} else { } else {
console.log('Your browser doesn\'t support web workers.') console.log('Your browser doesn\'t support web workers.')
} }
//STEP#07 MQTT Service //STEP#07 MQTT Service
if (HotelTV.services) { if (HotelTV.services) {
if (HotelTV.services.mqtt) { if (HotelTV.services.mqtt) {
let _mqttSvcInfo = HotelTV.services.mqtt; let _mqttSvcInfo = HotelTV.services.mqtt;
if (_mqttSvcInfo.protocol == "ws") { if (_mqttSvcInfo.protocol == "ws") {
var client = mqtt.connect( var client = mqtt.connect(
//'ws://' + HotelTV.svrinfo.ipaddr + ':9001', //'ws://' + HotelTV.svrinfo.ipaddr + ':9001',
'ws://' + _mqttSvcInfo.host + ':' + _mqttSvcInfo.port, { 'ws://' + _mqttSvcInfo.host + ':' + _mqttSvcInfo.port, {
clean: true, // retain session clean: true, // retain session
connectTimeout: 4000, // Timeout period connectTimeout: 4000, // Timeout period
@@ -502,20 +652,6 @@ HotelTV.LoadAppFull = async function() {
); );
client.on('connect', function() { client.on('connect', function() {
// let sz_topic = ['ctlxb0_' + HotelTV.devinfo.serial_number + '/topic', 'ctlxb0_all/topic'];
// client.subscribe(sz_topic[0], function(err) {
// if (err) {
// console.log(`Fail to subscribe::TOPIC[${sz_topic[0]}]`);
// }
// });
// client.subscribe(sz_topic[1], function(err) {
// if (err) {
// console.log(`Fail to subscribe::TOPIC[${sz_topic[1]}]`);
// }
// })
client.subscribe(_mqttSvcInfo.topic, function(err) { client.subscribe(_mqttSvcInfo.topic, function(err) {
if (err) { if (err) {
console.log(`Fail to subscribe::TOPIC[${_mqttSvcInfo.topic}]`); console.log(`Fail to subscribe::TOPIC[${_mqttSvcInfo.topic}]`);

View File

@@ -129,9 +129,9 @@ HotelTV.ui_appfull = (function() {
let _typeAppFocusEvt = _evt.eventType; let _typeAppFocusEvt = _evt.eventType;
if (_typeAppFocusEvt == "focused") { if (_typeAppFocusEvt == "focused") {
HotelTV.hcap.SetSoftAp({ // HotelTV.hcap.SetSoftAp({
"enable": false, // "enable": false,
}); // });
} }
} }
@@ -301,7 +301,7 @@ HotelTV.ui_appfull = (function() {
// Free count value // Free count value
_elAmItemTblRecRoot.children('div#details').children(`div#freecnt_val`).text(__fxn_fmvalue(_carts.items, "freeCount", _amItem.id)); _elAmItemTblRecRoot.children('div#details').children(`div#freecnt_val`).text(__fxn_fmvalue(_carts.items, "freeCount", _amItem.id));
// Price value // 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 // Order Count
_elAmItemTblRecRoot.children(`div#quantity_val`).text(__fxn_fmvalue(_carts.items, "quantity", _amItem.id)); _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'); 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) { if (_carts.items.length && __fxn_fmexist(_carts.items, _rsItem.id) == true) {
// amount value // 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 // Order Count
_elRsItemTblRecRoot.children('div#details').children('#quantity').children(`#value`).text(__fxn_fmvalue(_carts.items, "quantity", _rsItem.id)); _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); HotelTV.api.SetMessageStatus(_cur_msgdesc._id);
_cur_msgdesc.read = true; _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'); $('.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") { if (_state.menu.stage == "popup_message_card") {
//HIDE NEWS and USER GUIDE TIPS //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") { if ($('.news').css('display') != "none") {
$('.news').hide(); $('.news').hide();
} }
@@ -2968,7 +2968,7 @@ HotelTV.ui_appfull = (function() {
return; return;
} else if (_state.menu.stage == "tvCtgHide") { } else if (_state.menu.stage == "tvCtgHide") {
//HIDE NEWS and USER GUIDE TIPS //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") { if ($('.news').css('display') != "none") {
$('.news').hide(); $('.news').hide();
} }
@@ -3041,7 +3041,7 @@ HotelTV.ui_appfull = (function() {
if ($('.guide>.tips').css('display') == "none") { if ($('.guide>.tips').css('display') == "none") {
$('.guide>.tips').fadeIn(500, function() { $('.guide>.tips').fadeIn(500, function() {
//SHOW NEWS //SHOW NEWS
if (_newsInfo == null || Object.keys(_newsInfo).length == 0) { if (_newsInfo == null || _newsInfo.length == 0) {
if ($('.news').css('display') != "none") { if ($('.news').css('display') != "none") {
$('.news').hide(); $('.news').hide();
} }
@@ -3069,20 +3069,26 @@ HotelTV.ui_appfull = (function() {
} }
} else { } else {
//HIDE TIPS and then SHOW NEWS //HIDE TIPS and then SHOW NEWS
if (_newsInfo == null || Object.keys(_newsInfo).length == 0) { if ($('.guide>.tips').css('display') == "block") {
if ($('.news').css('display') != "none") { $('.guide>.tips').fadeOut(500, function() {
$('.news').hide(); if (_newsInfo == null || _newsInfo.length == 0) {
} if ($('.news').css('display') != "none") {
} else { $('.news').hide();
if ($('.guide>.tips').css('display') == "block") { }
$('.guide>.tips').fadeOut(500, function() { } else {
if ($('.news').css('display') != "block") { if ($('.news').css('display') != "block") {
$('.news').fadeIn(500, function() { $('.news').fadeIn(500, function() {
__uifxn_AppFull_BldNews(); __uifxn_AppFull_BldNews();
$('.news>.newsctz #hoteltv-news-ticker').webTicker('cont'); $('.news>.newsctz #hoteltv-news-ticker').webTicker('cont');
}); });
} }
}); }
});
} else {
if (_newsInfo == null || _newsInfo.length == 0) {
if ($('.news').css('display') != "none") {
$('.news').hide();
}
} else { } else {
if ($('.news').css('display') != "block") { if ($('.news').css('display') != "block") {
$('.news').fadeIn(500, function() { $('.news').fadeIn(500, function() {
@@ -3095,7 +3101,7 @@ HotelTV.ui_appfull = (function() {
} }
} else { } else {
//HIDE NEWS and USER GUIDE TIPS //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") { if ($('.news').css('display') != "none") {
$('.news').hide(); $('.news').hide();
} }
@@ -3104,15 +3110,20 @@ HotelTV.ui_appfull = (function() {
if ($('.guide>.tips').css('display') != "none") { if ($('.guide>.tips').css('display') != "none") {
$('.guide>.tips').fadeOut(500, function() { $('.guide>.tips').fadeOut(500, function() {
if ($('.news').css('display') != "none") { if (_newsInfo == null || _newsInfo.length == 0) {
if ($('.news>.newsctz #hoteltv-news-ticker').children().length > 0) { if ($('.news').css('display') != "none") {
$('.news>.newsctz #hoteltv-news-ticker').webTicker('stop'); $('.news').hide();
$('.news').fadeOut(500); }
} 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 * HotelTV UI Wrapper Function::> Show Top Widjet Weather
* @param {boolean} _en show/hide * @param {boolean} _en show/hide
*/ */
function __uifxn_AppFull_Widjet_ShowWeather(_en) { function __uifxn_AppFull_TopWidjet_BuildWeather() {
let _weather = HotelTV.weather; let _weather = HotelTV.weather;
$('.widjet .top .weather #icon').css({ "background-image": "url(" + _weather.smallicon_image[_weather.item.condition.code] + ")" }); $('.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 #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) * HotelTV UI Wrapper Function::> Show Top Widjet Message Cnt(Unread)
* @param {boolean} _en show/hide * @param {boolean} _en show/hide
*/ */
function __uifxn_AppFull_Widjet_ShowMsgCnt(_en) { function __uifxn_AppFull_TopWidjet_BuildMsgCnt(_en) {
let _msgCnt = 0; let _msgCnt = 0;
const _state = HotelTV.state; const _state = HotelTV.state;
const _guest = HotelTV.guestinfo; 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())); $('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 * 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 + ")" }); $('.widjet .top .hotellogo').css({ "background-image": "url(" + HotelTV.hotelinfo.subLogo.download + ")" });
//상단 날씨 아이콘 및 온도 표시 //상단 날씨 아이콘 및 온도 표시
__uifxn_AppFull_Widjet_ShowWeather(); __uifxn_AppFull_TopWidjet_BuildWeather();
//상단 메시지(unread)개수 표시 //상단 메시지(unread)개수 표시
__uifxn_AppFull_Widjet_ShowMsgCnt(); __uifxn_AppFull_TopWidjet_BuildMsgCnt();
// //상단 시계 표시 // //상단 시계 표시
_hndl_widget_topTime = setInterval(() => { _hndl_widget_topTime = setInterval(() => {
@@ -3530,6 +3557,8 @@ HotelTV.ui_appfull = (function() {
$('.widjet .top .datetime .date').text(_szCurTm.date); $('.widjet .top .datetime .date').text(_szCurTm.date);
}, 1000); }, 1000);
__uifxn_AppFull_TopWidjetShow(true);
//Weather Contents Buildup //Weather Contents Buildup
__uifxn_AppFull_MM_BldWeather(); __uifxn_AppFull_MM_BldWeather();
@@ -3609,14 +3638,27 @@ HotelTV.ui_appfull = (function() {
} else if (_program[Number(_state.menu.main.cur)].type.toLowerCase() == "application") { } else if (_program[Number(_state.menu.main.cur)].type.toLowerCase() == "application") {
console.log("Preparing TV APP::>" + _program[Number(_state.menu.main.cur)].service); console.log("Preparing TV APP::>" + _program[Number(_state.menu.main.cur)].service);
if (_program[Number(_state.menu.main.cur)].service == "youtube") { if (_program[Number(_state.menu.main.cur)].service == "youtube") {
console.log(`Type:${_program[Number(_state.menu.main.cur)].type} preparing WIFI AP...`); // console.log(`Type:${_program[Number(_state.menu.main.cur)].type} preparing WIFI AP...`);
HotelTV.hcap.SetSoftAp({ // HotelTV.hcap.SetSoftAp({
"enable": true, // "enable": true,
"ssid": "TVWIFI-" + HotelTV.guestinfo.room, // "ssid": "TVWIFI-" + HotelTV.guestinfo.room,
"password": "12345678", // "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 { } else {
console.log(`Type:${_program[Number(_state.menu.main.cur)].type} doen's have sub menu...`); 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() { $('.popup .hotkey_mm_red').fadeIn(1000, function() {
_state.menu.stage = "hotkey_mm_red"; _state.menu.stage = "hotkey_mm_red";
__uifxn_AppFull_ShowMMHotKeyBtn(false); __uifxn_AppFull_ShowMMHotKeyBtn(false);
__uifxn_AppFull_TopWidjetShow(false);
}); });
} else if (_state.hotkey.mm.red.type == "amenity") { } else if (_state.hotkey.mm.red.type == "amenity") {
$('.popup .amenity').show(0, function() { $('.popup .amenity').show(0, function() {
@@ -3654,6 +3697,7 @@ HotelTV.ui_appfull = (function() {
$('.popup .hotkey_mm_green').fadeIn(1000, function() { $('.popup .hotkey_mm_green').fadeIn(1000, function() {
_state.menu.stage = "hotkey_mm_green"; _state.menu.stage = "hotkey_mm_green";
__uifxn_AppFull_ShowMMHotKeyBtn(false); __uifxn_AppFull_ShowMMHotKeyBtn(false);
__uifxn_AppFull_TopWidjetShow(false);
}); });
} else if (_state.hotkey.mm.green.type == "amenity") { } else if (_state.hotkey.mm.green.type == "amenity") {
$('.popup .amenity').show(0, function() { $('.popup .amenity').show(0, function() {
@@ -3680,6 +3724,7 @@ HotelTV.ui_appfull = (function() {
$('.popup .hotkey_mm_yellow').fadeIn(1000, function() { $('.popup .hotkey_mm_yellow').fadeIn(1000, function() {
_state.menu.stage = "hotkey_mm_yellow"; _state.menu.stage = "hotkey_mm_yellow";
__uifxn_AppFull_ShowMMHotKeyBtn(false); __uifxn_AppFull_ShowMMHotKeyBtn(false);
__uifxn_AppFull_TopWidjetShow(false);
}); });
} else if (_state.hotkey.mm.yellow.type == "amenity") { } else if (_state.hotkey.mm.yellow.type == "amenity") {
$('.popup .amenity').show(0, function() { $('.popup .amenity').show(0, function() {
@@ -3706,6 +3751,7 @@ HotelTV.ui_appfull = (function() {
$('.popup .hotkey_mm_blue').fadeIn(1000, function() { $('.popup .hotkey_mm_blue').fadeIn(1000, function() {
_state.menu.stage = "hotkey_mm_blue"; _state.menu.stage = "hotkey_mm_blue";
__uifxn_AppFull_ShowMMHotKeyBtn(false); __uifxn_AppFull_ShowMMHotKeyBtn(false);
__uifxn_AppFull_TopWidjetShow(false);
}); });
} else if (_state.hotkey.mm.blue.type == "amenity") { } else if (_state.hotkey.mm.blue.type == "amenity") {
$('.popup .amenity').show(0, function() { $('.popup .amenity').show(0, function() {
@@ -3777,6 +3823,7 @@ HotelTV.ui_appfull = (function() {
$('.popup .hotkey_mm_red').css({ "background-color": "" }); $('.popup .hotkey_mm_red').css({ "background-color": "" });
_state.menu.stage = "main"; _state.menu.stage = "main";
__uifxn_AppFull_ShowMMHotKeyBtn(true); __uifxn_AppFull_ShowMMHotKeyBtn(true);
__uifxn_AppFull_TopWidjetShow(true);
}); });
}); });
} }
@@ -3792,6 +3839,7 @@ HotelTV.ui_appfull = (function() {
$('.popup .hotkey_mm_green').css({ "background-color": "" }); $('.popup .hotkey_mm_green').css({ "background-color": "" });
_state.menu.stage = "main"; _state.menu.stage = "main";
__uifxn_AppFull_ShowMMHotKeyBtn(true); __uifxn_AppFull_ShowMMHotKeyBtn(true);
__uifxn_AppFull_TopWidjetShow(true);
}); });
}); });
} }
@@ -3811,6 +3859,7 @@ HotelTV.ui_appfull = (function() {
$('.popup .hotkey_mm_yellow').css({ "background-color": "" }); $('.popup .hotkey_mm_yellow').css({ "background-color": "" });
_state.menu.stage = "main"; _state.menu.stage = "main";
__uifxn_AppFull_ShowMMHotKeyBtn(true); __uifxn_AppFull_ShowMMHotKeyBtn(true);
__uifxn_AppFull_TopWidjetShow(true);
}); });
}); });
} }
@@ -3830,6 +3879,7 @@ HotelTV.ui_appfull = (function() {
$('.popup .hotkey_mm_blue').css({ "background-color": "" }); $('.popup .hotkey_mm_blue').css({ "background-color": "" });
_state.menu.stage = "main"; _state.menu.stage = "main";
__uifxn_AppFull_ShowMMHotKeyBtn(true); __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())); $('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)개수 표시 //widjet 상단 메시지(unread)개수 표시
__uifxn_AppFull_Widjet_ShowMsgCnt(); __uifxn_AppFull_TopWidjet_BuildMsgCnt();
}).catch(_error => { }).catch(_error => {
console.log("Fail to get Message info"); console.log("Fail to get Message info");
}); });
@@ -4172,6 +4222,7 @@ HotelTV.ui_appfull = (function() {
UpdateEpg: function() { UpdateEpg: function() {
let _state = HotelTV.state; let _state = HotelTV.state;
let _trTbl = HotelTV.translation;
if (_state.menu.stage != 'tvCtgHide') { if (_state.menu.stage != 'tvCtgHide') {
return; return;
@@ -4187,7 +4238,7 @@ HotelTV.ui_appfull = (function() {
if (_epg_inf != null) { if (_epg_inf != null) {
_ch.text(_egp_prog_inf.name); _ch.text(_egp_prog_inf.name);
} else { } else {
_ch.text(HotelTV.ui_utils.Get_String('epg_none', _state.lang)); _ch.text(_trTbl.ui.tv.epg.msg.none_epg_info[_state.lang]);
} }
}); });
}); });

View File

@@ -15,50 +15,12 @@ HotelTV.ui_utils = (function() {
//// 의존 관계 선언 //// 의존 관계 선언
//// 비공개 프로퍼티 //// 비공개 프로퍼티
let g_uiTbl_imgPath_Brochure_buttons = {
'ko-KR': "./images/brochure/bt_brochure_ko.png",
'en-US': "./images/brochure/bt_brochure_en.png",
'zh-CN': "./images/brochure/bt_brochure_ch01.png",
'zh-TW': "./images/brochure/bt_brochure_ch02.png",
'ja-JP': "./images/brochure/bt_brochure_jp.png"
};
let g_uiTbl_imgPath_InRoomDining_buttons = {
'ko-KR': "./images/IRD/bt_inroom_ko.png",
'en-US': "./images/IRD/bt_inroom_en.png",
'zh-CN': "./images/IRD/bt_inroom_ch01.png",
'zh-TW': "./images/IRD/bt_inroom_ch02.png",
'ja-JP': "./images/IRD/bt_inroom_jp.png"
};
let g_uiTbl_String = {
// //Words & Sentance for Menu & Contents
// 'guide_flightschedule': {
// 'kr': '화살표를 사용하여 제주국제공항 출발, 도착하는 항공 스케줄을 확인하세요.',
// 'en': 'Use the arrows to check flight schedules arriving and leaving from Jeju International Airport.',
// 'ch': '请用箭头查看济州国际机场出发、到达航班的时刻表。',
// 'tw': '請用箭頭查看濟州國際機場出發、到達航班的時刻表。',
// 'jp': '矢印を使って済州国際空港出発便、到着便の航空スケジュールをご確認ください。'
// },
// //EPG
// 'epg_none': {
// 'kr': "프로그램 정보가 없습니다",
// 'en': "No program information",
// 'ch': "没有节目信息",
// 'tw': "沒有節目信息",
// 'jp': "プログラム情報はありません"
// },
};
var g_uiVar_Clock = { var g_uiVar_Clock = {
time: '', time: '',
date: '' date: ''
}; };
var g_uiVar_NotifyBallon = null;
/// 초기화 루틴 /// 초기화 루틴
@@ -67,6 +29,58 @@ HotelTV.ui_utils = (function() {
//// 비공개 매써드 //// 비공개 매써드
/**
* HotelTV UI Wrapper Function::> Countdown timer for Error screen
* @param {boolean} enable enable/disable
*/
const __uiFxn_TmrCDnErrScreen = function(end_of_date, _cbFxn1, _cbFxn2) {
var _vDate = new Date(end_of_date); // 전달 받은 일자
var timer;
function ____rn_cb() {
var now = new Date();
var distDt = _vDate - now;
if (distDt < 0) {
clearInterval(timer);
if (_cbFxn2) {
_cbFxn2();
}
return;
}
if (_cbFxn1) {
_cbFxn1();
}
}
timer = setInterval(____rn_cb, 1000);
}
/**
* HotelTV UI Wrapper Function::> Countdown timer for Error notification ballon
* @param {boolean} enable enable/disable
*/
const __uiFxn_TmrCDnNotiBallon = function(end_of_date, _cbClose) {
var _vDate = new Date(end_of_date); // 전달 받은 일자
function ____rn_cb() {
var now = new Date();
var distDt = _vDate - now;
if (distDt < 0) {
clearInterval(g_uiVar_NotifyBallon);
if (_cbClose) {
_cbClose();
}
g_uiVar_NotifyBallon = null;
return;
}
}
g_uiVar_NotifyBallon = setInterval(____rn_cb, 1000);
}
/** /**
* HotelTV UI Wrapper Function::> Show(Build) Busy(loading) animation * HotelTV UI Wrapper Function::> Show(Build) Busy(loading) animation
* @param {boolean} enable enable/disable * @param {boolean} enable enable/disable
@@ -103,10 +117,21 @@ HotelTV.ui_utils = (function() {
__uifxn_BusyAnimation(show); __uifxn_BusyAnimation(show);
}, },
ShowErrMsg: function(_show, _title, _msg) { ShowErrMsg: function(_show, _type, _title, _msg, _cdn_obj) {
if (_show) { if (_show) {
$('.error').css("background-color", "rgb(255,0,0)"); const typ_info = ['system.info.change-configuration'];
if (typ_info.indexOf(_type) >= 0) {
$('.error #details #message').addClass("info");
}
$('.error').css("background-image", "url('./images/hoteltv_service_error.png')");
$('.error #details #title').text(_title);
$('.error #details #message').text(_msg);
$('.error').fadeIn(500); $('.error').fadeIn(500);
if (_cdn_obj) {
var dt = new Date();
dt.setSeconds(dt.getSeconds() + Number(_cdn_obj.timeout));
__uiFxn_TmrCDnErrScreen(dt, _cdn_obj.cb_disp, _cdn_obj.cb_eoe);
}
} else { } else {
$('.error').fadeOut(500, function() { $('.error').fadeOut(500, function() {
$(this).css("background-image", "None"); $(this).css("background-image", "None");
@@ -122,18 +147,6 @@ HotelTV.ui_utils = (function() {
return g_uiVar_Clock; return g_uiVar_Clock;
}, },
Get_String: function(_key, _lang) {
return g_uiTbl_String[_key][_lang];
},
Brochure_GetBtn: function(_lang) {
return g_uiTbl_imgPath_Brochure_buttons[_lang];
},
IRD_GetBtn: function(_lang) {
return g_uiTbl_imgPath_InRoomDining_buttons[_lang];
},
Get_Airline: function(_obj, _airline, _lang) { Get_Airline: function(_obj, _airline, _lang) {
if (_obj) { if (_obj) {
if (_obj[_airline]) { if (_obj[_airline]) {
@@ -183,5 +196,21 @@ HotelTV.ui_utils = (function() {
} }
return _cvt_speed.toString() + " " + _szDir; return _cvt_speed.toString() + " " + _szDir;
}, },
ShowNotificationMsgBalloon: function(_msg, _tmoutInSec) {
if (g_uiVar_NotifyBallon) {
clearInterval(g_uiVar_NotifyBallon);
}
var dt = new Date();
dt.setSeconds(dt.getSeconds() + Number(_tmoutInSec));
if (_msg) {
$('.popup>.notification .balloon #message').text(_msg);
__uiFxn_TmrCDnNotiBallon(dt, function() {
$('.popup>.notification').fadeOut(300);
});
$('.popup>.notification').fadeIn(300);
}
},
} }
})(); })();

View File

@@ -40,6 +40,13 @@
<!-- Error Frame Layout --> <!-- Error Frame Layout -->
<div class="error"> <div class="error">
<div id="details">
<div id="title"></div>
<div id="message"></div>
</div>
<div id="countdown">
<div id="message"></div>
</div>
</div> </div>
<!-- Busy Animation Area --> <!-- Busy Animation Area -->

View File

@@ -1,5 +1,5 @@
<XAIT> <XAIT>
<versionNumber>2</versionNumber> <versionNumber>4</versionNumber>
<AbstractService> <AbstractService>
<svcName>Pro:Centric App</svcName> <svcName>Pro:Centric App</svcName>
<svcId>0x1204</svcId> <svcId>0x1204</svcId>
@@ -16,12 +16,12 @@
<controlCode>AUTOSTART</controlCode> <controlCode>AUTOSTART</controlCode>
<visibility>NOT_VISIBLE_USERS</visibility> <visibility>NOT_VISIBLE_USERS</visibility>
<priority>255</priority> <priority>255</priority>
<version>6</version> <version>7</version>
</applicationDescriptor> </applicationDescriptor>
<HcapDescriptor> <HcapDescriptor>
<url>http://10.12.200.189:80/procentric/application/index.html</url> <url>http://10.20.0.2:8880/procentric/application/index.html</url>
</HcapDescriptor> </HcapDescriptor>
</Application> </Application>
</ApplicationList> </ApplicationList>
</AbstractService> </AbstractService>
</XAIT> </XAIT>