issue #1
Fix weather icon issue - using openweather's one 1. Support unread message notification on widjet
This commit is contained in:
@@ -195,8 +195,7 @@
|
|||||||
<div class="top">
|
<div class="top">
|
||||||
<div class="hotellogo"></div>
|
<div class="hotellogo"></div>
|
||||||
<div class="message">
|
<div class="message">
|
||||||
<div id="icon"> </div>
|
<div id="unread_cnt"></div>
|
||||||
<div id="count"></div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="weather">
|
<div class="weather">
|
||||||
<div id="icon"></div>
|
<div id="icon"></div>
|
||||||
@@ -443,7 +442,7 @@
|
|||||||
case 409:
|
case 409:
|
||||||
HotelTV.hcap.PwrOff();
|
HotelTV.hcap.PwrOff();
|
||||||
break;
|
break;
|
||||||
case 458: // INFO Key
|
case 457: // INFO Key
|
||||||
HotelTV.hcap.GetScrshot();
|
HotelTV.hcap.GetScrshot();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -42,38 +42,70 @@
|
|||||||
|
|
||||||
/* SETP[#003-2]: Message */
|
/* SETP[#003-2]: Message */
|
||||||
|
|
||||||
|
.widjet .top .message {
|
||||||
|
position: absolute;
|
||||||
|
top: -11px;
|
||||||
|
left: 1618px;
|
||||||
|
height: 100px;
|
||||||
|
/* float: left; */
|
||||||
|
display: block;
|
||||||
|
padding: 24px 10px 10px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widjet .top .message #unread_cnt {
|
||||||
|
/* position: relative; */
|
||||||
|
width: 66px;
|
||||||
|
height: 100%;
|
||||||
|
float: left;
|
||||||
|
background-image: url(images/icons/icon_widjet_top_message_cnt.png);
|
||||||
|
background-size: contain;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
padding: 4px 0px 0px 0px;
|
||||||
|
vertical-align: middle;
|
||||||
|
color: rgb(235, 235, 235);
|
||||||
|
font-size: 46px;
|
||||||
|
line-height: 52px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* SETP[#003-3]: Weather */
|
/* SETP[#003-3]: Weather */
|
||||||
|
|
||||||
.widjet .top .weather {
|
.widjet .top .weather {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 7px;
|
top: -11px;
|
||||||
left: 1420px;
|
left: 1370px;
|
||||||
height: 52px;
|
height: 100px;
|
||||||
float: left;
|
float: left;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
display: block;
|
display: block;
|
||||||
|
margin: 7px 0px 0px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.widjet .top .weather #icon {
|
.widjet .top .weather #icon {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 8px;
|
/* top: -10px; */
|
||||||
left: 16px;
|
left: 16px;
|
||||||
width: 80px;
|
width: 100px;
|
||||||
height: 52px;
|
height: 100%;
|
||||||
float: left;
|
float: left;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
justify-content: center;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.widjet .top .weather #temp {
|
.widjet .top .weather #temp {
|
||||||
position: relative;
|
position: relative;
|
||||||
left: 14px;
|
left: 14px;
|
||||||
float: left;
|
float: left;
|
||||||
font-size: 64px;
|
font-size: 60px;
|
||||||
|
line-height: 100px;
|
||||||
|
vertical-align: middle;
|
||||||
color: rgb(235, 235, 235);
|
color: rgb(235, 235, 235);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
BIN
procentric/application/images/icons/icon_widjet_top_message_cnt.png
Executable file
BIN
procentric/application/images/icons/icon_widjet_top_message_cnt.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
@@ -1425,10 +1425,11 @@ HotelTV.hcap = (function() {
|
|||||||
console.log("onSuccess");
|
console.log("onSuccess");
|
||||||
hcap.system.getScreenCaptureImage({
|
hcap.system.getScreenCaptureImage({
|
||||||
"onSuccess": function(s) {
|
"onSuccess": function(s) {
|
||||||
|
var _fileName = (new Date()).toISOString().slice(0, 19).replace(/[-:]/g, "").replace("T", "_");
|
||||||
console.log("onSuccess : uri = " + s.uri);
|
console.log("onSuccess : uri = " + s.uri);
|
||||||
hcap.file.downloadFileToUsb({
|
hcap.file.downloadFileToUsb({
|
||||||
"uri": s.uri,
|
"uri": s.uri,
|
||||||
"path": "/tmp/usb/sda/sda1/youtube_s3.png",
|
"path": "/tmp/usb/sda/sda1/" + _fileName + ".png",
|
||||||
"onSuccess": function() {
|
"onSuccess": function() {
|
||||||
console.log("onSuccess");
|
console.log("onSuccess");
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1823,7 +1823,7 @@ HotelTV.ui_appfull = (function() {
|
|||||||
const _mpinfo = HotelTV.tvguide.program[_mmIdx].children;
|
const _mpinfo = HotelTV.tvguide.program[_mmIdx].children;
|
||||||
// 메시지 팝업 빌드 및 화면 전환
|
// 메시지 팝업 빌드 및 화면 전환
|
||||||
if (HotelTV.tvguide.program[_mmIdx].children[_state.menu.main[_mmIdx].cur].type == 'message') {
|
if (HotelTV.tvguide.program[_mmIdx].children[_state.menu.main[_mmIdx].cur].type == 'message') {
|
||||||
const _msginf = HotelTV.message;
|
let _msginf = HotelTV.message;
|
||||||
let _cur_msglst_idx = _state.menu.main[_mmIdx]['message']['cur'];
|
let _cur_msglst_idx = _state.menu.main[_mmIdx]['message']['cur'];
|
||||||
// 현재 선택된 메시지의 디테일 정보 가져오기
|
// 현재 선택된 메시지의 디테일 정보 가져오기
|
||||||
let _cur_msgnum = $($('.main>.mypage>.bg>.owl-carousel .owl-item.center #mp_msg_tblrec tbody .focus')[0]).attr('msgnum');
|
let _cur_msgnum = $($('.main>.mypage>.bg>.owl-carousel .owl-item.center #mp_msg_tblrec tbody .focus')[0]).attr('msgnum');
|
||||||
@@ -1874,7 +1874,9 @@ HotelTV.ui_appfull = (function() {
|
|||||||
|
|
||||||
//메시지 읽음 처리
|
//메시지 읽음 처리
|
||||||
HotelTV.api.SetMessageStatus(_cur_msgdesc._id);
|
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');
|
$('.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();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3180,7 +3182,6 @@ 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
|
||||||
@@ -3193,6 +3194,37 @@ 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) {
|
||||||
|
let _msgCnt = 0;
|
||||||
|
const _state = HotelTV.state;
|
||||||
|
const _guest = HotelTV.guestinfo;
|
||||||
|
let _trTbl = HotelTV.translation;
|
||||||
|
const _get_unread_msgCnt = function(_object) {
|
||||||
|
let _msg_unread_cnt = 0;
|
||||||
|
for (__j = 1; __j <= _object.length; __j++) {
|
||||||
|
if (_object[__j].read == false) {
|
||||||
|
_msg_unread_cnt++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return _msg_unread_cnt;
|
||||||
|
}
|
||||||
|
|
||||||
|
_msgCnt = _get_unread_msgCnt(HotelTV.message);
|
||||||
|
if (_msgCnt > 0) {
|
||||||
|
$('.widjet .top .message #unread_cnt').text(_msgCnt.toString());
|
||||||
|
$('.widjet .top .message').show();
|
||||||
|
} else {
|
||||||
|
$('.widjet .top .message').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
$('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::> Build Main Menu::> Flight
|
* HotelTV UI Wrapper Function::> Build Main Menu::> Flight
|
||||||
*/
|
*/
|
||||||
@@ -3361,11 +3393,7 @@ HotelTV.ui_appfull = (function() {
|
|||||||
let _wData = _weather.daily[Number(_idx) + 1];
|
let _wData = _weather.daily[Number(_idx) + 1];
|
||||||
let _time = _wData.dt_txt.split(' ')[1];
|
let _time = _wData.dt_txt.split(' ')[1];
|
||||||
let _temp = _wData.main.temp;
|
let _temp = _wData.main.temp;
|
||||||
//OpenWeather API관련 아이콘 URL을 가져오는 방법은 아래 링크 참조:
|
$(_eltbl_fc_daily_items[_idx]).css('background-image', 'url(' + _weather.icon_image[_wData.weather.code] + ')');
|
||||||
//https://openweathermap.org/weather-conditions
|
|
||||||
$(_eltbl_fc_daily_items[_idx]).css('background-image', 'url(http://openweathermap.org/img/wn/' + _wData.weather.icon + '@2x.png)');
|
|
||||||
//$(_eltbl_fc_daily_items[_idx]).css('background-image', 'url(' + _weather.icon_image[_wData.weather.id] + ')');
|
|
||||||
|
|
||||||
$(_eltbl_fc_daily_items[_idx].children.time)[0].innerText = _time.split(":")[0] + ":" + _time.split(":")[1];
|
$(_eltbl_fc_daily_items[_idx].children.time)[0].innerText = _time.split(":")[0] + ":" + _time.split(":")[1];
|
||||||
$(_eltbl_fc_daily_items[_idx].children.temp)[0].innerText = _temp.toString() + " °C";
|
$(_eltbl_fc_daily_items[_idx].children.temp)[0].innerText = _temp.toString() + " °C";
|
||||||
}
|
}
|
||||||
@@ -3491,6 +3519,9 @@ HotelTV.ui_appfull = (function() {
|
|||||||
//상단 날씨 아이콘 및 온도 표시
|
//상단 날씨 아이콘 및 온도 표시
|
||||||
__uifxn_AppFull_Widjet_ShowWeather();
|
__uifxn_AppFull_Widjet_ShowWeather();
|
||||||
|
|
||||||
|
//상단 메시지(unread)개수 표시
|
||||||
|
__uifxn_AppFull_Widjet_ShowMsgCnt();
|
||||||
|
|
||||||
// //상단 시계 표시
|
// //상단 시계 표시
|
||||||
_hndl_widget_topTime = setInterval(() => {
|
_hndl_widget_topTime = setInterval(() => {
|
||||||
let _szCurTm = HotelTV.ui_utils.GetCur_DateTime();
|
let _szCurTm = HotelTV.ui_utils.GetCur_DateTime();
|
||||||
@@ -4107,6 +4138,9 @@ 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)개수 표시
|
||||||
|
__uifxn_AppFull_Widjet_ShowMsgCnt();
|
||||||
}).catch(_error => {
|
}).catch(_error => {
|
||||||
console.log("Fail to get Message info");
|
console.log("Fail to get Message info");
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ HotelTV.ui_utils = (function() {
|
|||||||
},
|
},
|
||||||
|
|
||||||
Get_FlightStatus: function(_obj, _status, _lang) {
|
Get_FlightStatus: function(_obj, _status, _lang) {
|
||||||
if (_obj) {
|
if (_obj && _obj.hasOwnProperty(_status) == true) {
|
||||||
if (_status && _status != "") {
|
if (_status && _status != "") {
|
||||||
return _obj[_status][_lang] || _status;
|
return _obj[_status][_lang] || _status;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user