Commit 86419b42 by vietdo

#15763 プッシュ通知が無効ならヘッダの「通知」ボタンを非表示にする

parent bb51b5c2
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
</ul> </ul>
</div> </div>
<ul class="button"> <ul class="button">
<li class="floatL" id="dspPushMessage"> <li class="floatL" id="dspPushMessage" style="display:none">
<a href="#" id="liPushMessage"><span class="pushMessage"><span class="icon"></span> <span class="lang" lang="txtPushAlert"><!--新着 : --></span><span id="numbermessage"></span><span class="arrow"></span></span></a> <a href="#" id="liPushMessage"><span class="pushMessage"><span class="icon"></span> <span class="lang" lang="txtPushAlert"><!--新着 : --></span><span id="numbermessage"></span><span class="arrow"></span></span></a>
<div id="accordion" style="display:none;"> <div id="accordion" style="display:none;">
<div id="show-push-message"></div> <div id="show-push-message"></div>
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
</ul> </ul>
</div> </div>
<ul class="button"> <ul class="button">
<li class="floatL" id="dspPushMessage"> <li class="floatL" id="dspPushMessage" style="display:none">
<a href="#" id="liPushMessage"><span class="pushMessage"><span class="icon"></span> <span class="lang" lang="txtPushAlert"><!--新着 : --></span><span id="numbermessage"></span><span class="arrow"></span></span></a> <a href="#" id="liPushMessage"><span class="pushMessage"><span class="icon"></span> <span class="lang" lang="txtPushAlert"><!--新着 : --></span><span id="numbermessage"></span><span class="arrow"></span></span></a>
<div id="accordion" style="display:none;"> <div id="accordion" style="display:none;">
<div id="show-push-message"></div> <div id="show-push-message"></div>
......
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
</ul> </ul>
</div> </div>
<ul class="button"> <ul class="button">
<li class="floatL" id="dspPushMessage"> <li class="floatL" id="dspPushMessage" style="display:none">
<a href="#" id="liPushMessage"><span class="pushMessage"><span class="icon"></span> <span class="lang" lang="txtPushAlert"><!--新着 : --></span><span id="numbermessage"></span><span class="arrow"></span></span></a> <a href="#" id="liPushMessage"><span class="pushMessage"><span class="icon"></span> <span class="lang" lang="txtPushAlert"><!--新着 : --></span><span id="numbermessage"></span><span class="arrow"></span></span></a>
<div id="accordion" style="display:none;"> <div id="accordion" style="display:none;">
<div id="show-push-message"></div> <div id="show-push-message"></div>
......
...@@ -82,6 +82,10 @@ $(document).ready(function () { ...@@ -82,6 +82,10 @@ $(document).ready(function () {
$('#dspPushMessage').hide(); $('#dspPushMessage').hide();
} }
if((ClientData.serviceOpt_apns() == 'Y') || (ClientData.serviceOpt_usable_push_message() == 'Y')) {
$('#dspPushMessage').show();
}
//ダイアログ関連 //ダイアログ関連
$("#dspTitleNm").click(BOOKMARK.dspTitleNm_Click); $("#dspTitleNm").click(BOOKMARK.dspTitleNm_Click);
$("#dspTitleNmKn").click(BOOKMARK.dspTitleNmKn_Click); $("#dspTitleNmKn").click(BOOKMARK.dspTitleNmKn_Click);
......
...@@ -112,6 +112,10 @@ $(document).ready(function(){ ...@@ -112,6 +112,10 @@ $(document).ready(function(){
HEADER.checkForceChangePassword(); HEADER.checkForceChangePassword();
} }
if((ClientData.serviceOpt_apns() == 'Y') || (ClientData.serviceOpt_usable_push_message() == 'Y')) {
$('#dspPushMessage').show();
}
if (COMMON.isAnonymousLogin()) { if (COMMON.isAnonymousLogin()) {
//プッシュメッセージ隠す //プッシュメッセージ隠す
$('#dspPushMessage').hide(); $('#dspPushMessage').hide();
......
...@@ -824,8 +824,11 @@ HEADER.initPushMessage = function() ...@@ -824,8 +824,11 @@ HEADER.initPushMessage = function()
// check new push message // check new push message
if (COMMON.isAnonymousLogin() == false ) { if (COMMON.isAnonymousLogin() == false ) {
if((ClientData.serviceOpt_apns() == 'Y') || (ClientData.serviceOpt_usable_push_message() == 'Y')) {
HEADER.getPushMessageNew(); HEADER.getPushMessageNew();
} }
}
}; };
// get time wait check new push message // get time wait check new push message
...@@ -860,6 +863,7 @@ HEADER.getPushMessageNew = function() ...@@ -860,6 +863,7 @@ HEADER.getPushMessageNew = function()
// callback get number new message success // callback get number new message success
HEADER.callbackGetPushMessageNewSuccess = function(data) { HEADER.callbackGetPushMessageNewSuccess = function(data) {
if (data) { if (data) {
// get current number message in session // get current number message in session
var currentMessage = parseInt(ClientData.pushInfo_newMsgNumber()); var currentMessage = parseInt(ClientData.pushInfo_newMsgNumber());
...@@ -867,7 +871,6 @@ HEADER.callbackGetPushMessageNewSuccess = function(data) { ...@@ -867,7 +871,6 @@ HEADER.callbackGetPushMessageNewSuccess = function(data) {
currentMessage = 0; currentMessage = 0;
} }
var totalMessage = currentMessage + data.count; var totalMessage = currentMessage + data.count;
if ($('#liPushMessage').hasClass('hide')) { if ($('#liPushMessage').hasClass('hide')) {
// update new number message to session // update new number message to session
ClientData.pushInfo_newMsgNumber(totalMessage); ClientData.pushInfo_newMsgNumber(totalMessage);
...@@ -917,6 +920,7 @@ HEADER.getPushMessageList = function() { ...@@ -917,6 +920,7 @@ HEADER.getPushMessageList = function() {
"post", "post",
params, params,
function (data) { function (data) {
console.log(data);
// reset number message // reset number message
ClientData.pushInfo_newMsgNumber(0); ClientData.pushInfo_newMsgNumber(0);
// hide number new message // hide number new message
......
...@@ -99,6 +99,10 @@ $(document).ready(function(){ ...@@ -99,6 +99,10 @@ $(document).ready(function(){
HEADER.checkForceChangePassword(); HEADER.checkForceChangePassword();
} }
if((ClientData.serviceOpt_apns() == 'Y') || (ClientData.serviceOpt_usable_push_message() == 'Y')) {
$('#dspPushMessage').show();
}
if (COMMON.isAnonymousLogin()) { if (COMMON.isAnonymousLogin()) {
//プッシュメッセージ隠す //プッシュメッセージ隠す
$('#dspPushMessage').hide(); $('#dspPushMessage').hide();
......
...@@ -150,9 +150,8 @@ $(document).ready(function () { ...@@ -150,9 +150,8 @@ $(document).ready(function () {
}); });
} }
} }
console.log(ClientData.serviceOpt_apns());
console.log(ClientData.serviceOpt_usable_push_message()); if((ClientData.serviceOpt_apns() == 'Y') || (ClientData.serviceOpt_usable_push_message() == 'Y')) {
if((ClientData.serviceOpt_apns() == 'Y') && (ClientData.serviceOpt_usable_push_message() == 'Y')) {
$('#dspPushMessage').show(); $('#dspPushMessage').show();
} }
......
...@@ -15,6 +15,10 @@ $(document).ready(function () { ...@@ -15,6 +15,10 @@ $(document).ready(function () {
// Set bookmark screen // Set bookmark screen
ClientData.BookmarkScreen(COMMON.ScreenIds.Setting); ClientData.BookmarkScreen(COMMON.ScreenIds.Setting);
if((ClientData.serviceOpt_apns() == 'Y') || (ClientData.serviceOpt_usable_push_message() == 'Y')) {
$('#dspPushMessage').show();
}
SETTINGS.initScreen(); SETTINGS.initScreen();
$("#dspSave").click(SETTINGS.dspSave_Click); $("#dspSave").click(SETTINGS.dspSave_Click);
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
</ul> </ul>
</div> </div>
<ul class="button"> <ul class="button">
<li class="floatL"> <li class="floatL" id="dspPushMessage" style="display:none">
<a href="#" id="liPushMessage"><span class="pushMessage"><span class="icon"></span> <span class="lang" lang="txtPushAlert"><!--新着 : --></span><span id="numbermessage"></span><span class="arrow"></span></span></a> <a href="#" id="liPushMessage"><span class="pushMessage"><span class="icon"></span> <span class="lang" lang="txtPushAlert"><!--新着 : --></span><span id="numbermessage"></span><span class="arrow"></span></span></a>
<div id="accordion" style="display:none;"> <div id="accordion" style="display:none;">
<div id="show-push-message"></div> <div id="show-push-message"></div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment