Commit ef984660 by Masaru Abe

#11270 コンテンツリンクエラー時にアラートウィンドウを表示して閲覧継続できるよう対応

parent 07c59a3e
......@@ -1002,8 +1002,12 @@ function playBGMOfContent() {
/* display error screen*/
function showErrorScreen() {
// エラーメッセージの表示
var errMes = i18nText('msgPageImgErr');
if( errMsg == undefined || errMsg == "" ){
errMes = i18nText('msgPageImgErr');
}
$('#divImageLoading').css('display', 'none');
lockLayout();
/* show error messages */
......@@ -1019,6 +1023,34 @@ function showErrorScreen() {
$('.toast-item-close').live('click', imgBack_click);
};
/* display alert screen*/
function showAlertScreen(errMes) {
// アラートメッセージの表示
if( errMes == undefined || errMes == "" ){
errMes = "message."; //i18nText('msgPageImgErr');
}
$('#divImageLoading').css('display', 'none');
lockLayout();
/* show error messages */
$().toastmessage({ position: 'middle-center' });
$().toastmessage('showToast', {
type: 'error',
sticky: true,
text: errMes,
close: function () {}
});
$('.toast-type-error').css('height', '100px');
$('.toast-type-error > p').css('padding-top', '35px');
$('.toast-item-close').live('click',
function () {
unlockLayout();
}
);
};
/* move to page ?? */
function changePage(page_index) {
......
......@@ -849,9 +849,9 @@ var jumpPage = function (mediaType, actionType, id, imageUrl, x, y, w, h, visibl
SetObjectLog(contentID, objectLog);
//---
if ((Number(jumpPage) - 1) != getPageIndex()) {
if ((Number(jumpPage) - 1) != getPageIndex()) {
createLockLayout(true);
changePage(Number(jumpPage) - 1);
changePage(Number(jumpPage) - 1);
}
};
};
......@@ -948,9 +948,9 @@ var moveToContent = function (mediaType, actionType, id, imageUrl, x, y, w, h, v
SetObjectLog(contentID, objectLog);
//---
/* set end log */
SetEndLog(contentID);
RegisterLog();
///* set end log */
//SetEndLog(contentID);
//RegisterLog();
//START TRB00033 - EDITOR: Long - Date : 09/12/2013 - Summary : limit content
avwCmsApi(ClientData.userInfo_accountPath(),
"webGetContent",
......@@ -958,6 +958,10 @@ var moveToContent = function (mediaType, actionType, id, imageUrl, x, y, w, h, v
{ contentId: contentId, sid: ClientData.userInfo_sid(), getType: 1 },
function (data) {
/* set end log */
SetEndLog(contentID);
RegisterLog();
if(data.contentData.alertMessageLevel){
if(data.contentData.alertMessageLevel == alertMessageLevel.ShowAlert){
......@@ -1013,9 +1017,17 @@ var moveToContent = function (mediaType, actionType, id, imageUrl, x, y, w, h, v
}
},
null);
//END TRB00033 - EDITOR: Long - Date : 09/12/2013 - Summary : limit content
function (xmlHttpRequest, txtStatus, errorThrown) {
if (xmlHttpRequest.status == 404) {
showAlertScreen(i18nText('msgContentNotExist'));
}
else {
// Show system error
showSystemError();
}
}
);
//END TRB00033 - EDITOR: Long - Date : 09/12/2013 - Summary : limit content
};
};
......
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