Commit d394f378 by Takumi Imai

Merge branch 'feature/1.0_check_web_dev_50267' into 'feature/1.0_check_web_dev'

change call push message list init when ready

See merge request !16
parents 3e8b4c1e abd71600
...@@ -24,12 +24,17 @@ ...@@ -24,12 +24,17 @@
<script src="../common/js/constant.js?__UPDATEID__"></script> <script src="../common/js/constant.js?__UPDATEID__"></script>
<script src="../common/js/common.js?__UPDATEID__"></script> <script src="../common/js/common.js?__UPDATEID__"></script>
<script type="text/javascript" src="../js/template/template.js"></script>
<script type="text/javascript" src="../js/pushMessageList/push-message-list.js"></script> <script type="text/javascript" src="../js/pushMessageList/push-message-list.js"></script>
<script type="text/javascript">
$(document).ready(function(){
PushMessageList.init();
});
</script>
</head> </head>
<body onload="PushMessageList.init();"> <body>
<!-- header --> <!-- header -->
<div id="includedHeader"></div> <div id="includedHeader"></div>
......
...@@ -9,9 +9,7 @@ PushMessageList.baseApiUrl = CONSTANT.URL.CMS.BASE + ClientData.userInfo_account ...@@ -9,9 +9,7 @@ PushMessageList.baseApiUrl = CONSTANT.URL.CMS.BASE + ClientData.userInfo_account
* Init when html onload * Init when html onload
*/ */
PushMessageList.init = function() { PushMessageList.init = function() {
$("#includedHeader").load("../common/header.html" , function() { TEMPLATE.loadHearder("#includedHeader");
I18N.initi18n();
});
PushMessageList.getMessageList(function(messageList) { PushMessageList.getMessageList(function(messageList) {
PushMessageList.generateMessageListHtml(messageList.pushMessageList); PushMessageList.generateMessageListHtml(messageList.pushMessageList);
}); });
...@@ -26,15 +24,12 @@ PushMessageList.getMessageList = function (callback) { ...@@ -26,15 +24,12 @@ PushMessageList.getMessageList = function (callback) {
sid: COMMON.getSid(), sid: COMMON.getSid(),
}; };
const url = PushMessageList.baseApiUrl; const url = PushMessageList.baseApiUrl;
COMMON.cmsAjax(url, param, false, function (json) { COMMON.cmsAjax(url, param, true, function (json) {
if (callback) { if (callback) {
callback(json); callback(json);
} }
}, function() { }, function() {
console.log('PushMessageList.getMessageList error'); console.log('PushMessageList.getMessageList error');
if (callback) {
callback(PushMessageList.dummyMessageListJson);
}
}); });
}; };
......
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