Commit ef984660 by Masaru Abe

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

parent 07c59a3e
...@@ -1002,8 +1002,12 @@ function playBGMOfContent() { ...@@ -1002,8 +1002,12 @@ function playBGMOfContent() {
/* display error screen*/ /* display error screen*/
function showErrorScreen() { function showErrorScreen() {
// エラーメッセージの表示 // エラーメッセージの表示
var errMes = i18nText('msgPageImgErr'); var errMes = i18nText('msgPageImgErr');
if( errMsg == undefined || errMsg == "" ){
errMes = i18nText('msgPageImgErr');
}
$('#divImageLoading').css('display', 'none'); $('#divImageLoading').css('display', 'none');
lockLayout(); lockLayout();
/* show error messages */ /* show error messages */
...@@ -1019,6 +1023,34 @@ function showErrorScreen() { ...@@ -1019,6 +1023,34 @@ function showErrorScreen() {
$('.toast-item-close').live('click', imgBack_click); $('.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 ?? */ /* move to page ?? */
function changePage(page_index) { function changePage(page_index) {
......
...@@ -948,9 +948,9 @@ var moveToContent = function (mediaType, actionType, id, imageUrl, x, y, w, h, v ...@@ -948,9 +948,9 @@ var moveToContent = function (mediaType, actionType, id, imageUrl, x, y, w, h, v
SetObjectLog(contentID, objectLog); SetObjectLog(contentID, objectLog);
//--- //---
/* set end log */ ///* set end log */
SetEndLog(contentID); //SetEndLog(contentID);
RegisterLog(); //RegisterLog();
//START TRB00033 - EDITOR: Long - Date : 09/12/2013 - Summary : limit content //START TRB00033 - EDITOR: Long - Date : 09/12/2013 - Summary : limit content
avwCmsApi(ClientData.userInfo_accountPath(), avwCmsApi(ClientData.userInfo_accountPath(),
"webGetContent", "webGetContent",
...@@ -958,6 +958,10 @@ var moveToContent = function (mediaType, actionType, id, imageUrl, x, y, w, h, v ...@@ -958,6 +958,10 @@ var moveToContent = function (mediaType, actionType, id, imageUrl, x, y, w, h, v
{ contentId: contentId, sid: ClientData.userInfo_sid(), getType: 1 }, { contentId: contentId, sid: ClientData.userInfo_sid(), getType: 1 },
function (data) { function (data) {
/* set end log */
SetEndLog(contentID);
RegisterLog();
if(data.contentData.alertMessageLevel){ if(data.contentData.alertMessageLevel){
if(data.contentData.alertMessageLevel == alertMessageLevel.ShowAlert){ if(data.contentData.alertMessageLevel == alertMessageLevel.ShowAlert){
...@@ -1013,8 +1017,16 @@ var moveToContent = function (mediaType, actionType, id, imageUrl, x, y, w, h, v ...@@ -1013,8 +1017,16 @@ var moveToContent = function (mediaType, actionType, id, imageUrl, x, y, w, h, v
} }
}, },
null); 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 //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