Commit 92abfbd7 by Masaru Abe

マイグレーション対応 JSONにObjectIdがなかった場合でもエラーにならないようにする

parent 8b7fdd8a
...@@ -2512,6 +2512,8 @@ function RegisterLog() { ...@@ -2512,6 +2512,8 @@ function RegisterLog() {
for (var nIndex2 = 0; nIndex2 < objectLogArray.length; nIndex2++) { for (var nIndex2 = 0; nIndex2 < objectLogArray.length; nIndex2++) {
actionDate = new Date(objectLogArray[nIndex2].actionDate); actionDate = new Date(objectLogArray[nIndex2].actionDate);
var line = []; var line = [];
if( objectLogArray[nIndex2].objectId ){
line.push(actionDate.jpDateTimeString1()); line.push(actionDate.jpDateTimeString1());
line.push(objectLogArray[nIndex2].pageNo); line.push(objectLogArray[nIndex2].pageNo);
line.push(objectLogArray[nIndex2].objectId); line.push(objectLogArray[nIndex2].objectId);
...@@ -2527,6 +2529,7 @@ function RegisterLog() { ...@@ -2527,6 +2529,7 @@ function RegisterLog() {
lines.push(line); lines.push(line);
//alert("ObjectLog Line:" + JSON.stringify( line ) ); //alert("ObjectLog Line:" + JSON.stringify( line ) );
} }
}
//alert("ObjectLog Lines:" + JSON.stringify( lines ) ); //alert("ObjectLog Lines:" + JSON.stringify( lines ) );
if( lines.length > 0 ){ if( lines.length > 0 ){
......
...@@ -51,12 +51,16 @@ function webGetContentPageSize(){ ...@@ -51,12 +51,16 @@ function webGetContentPageSize(){
"GET", "GET",
{ contentId: contentID, sid: ClientData.userInfo_sid(), getType: 6 }, { contentId: contentID, sid: ClientData.userInfo_sid(), getType: 6 },
function (data) { function (data) {
if( data.contentData.pageInfoData.pagesInfo ){
$.each(data.contentData.pageInfoData.pagesInfo, function(i, n){ $.each(data.contentData.pageInfoData.pagesInfo, function(i, n){
contentPageSizeArr.push(n); contentPageSizeArr.push(n);
}); });
//Get Page size of firstPage //Get Page size of firstPage
getPageSizeByPageNo(1); getPageSizeByPageNo(1);
} else {
showErrorScreen();
}
}, },
null); null);
}; };
......
...@@ -145,7 +145,11 @@ function getMediaType1(iValueObj) { ...@@ -145,7 +145,11 @@ function getMediaType1(iValueObj) {
pageObject['id'] = "MediaType1_" + iValueObj.action.actionType; pageObject['id'] = "MediaType1_" + iValueObj.action.actionType;
//詳細ログ用 //詳細ログ用
try{
pageObject["objectId"] = iValueObj.action.objectId; pageObject["objectId"] = iValueObj.action.objectId;
}catch(e){
pageObject["objectId"] = "";
}
if (iValueObj.action.actionType == 0) { if (iValueObj.action.actionType == 0) {
/*get mediaInfo */ /*get mediaInfo */
...@@ -403,7 +407,11 @@ function getMediaType2(iValueObj) { ...@@ -403,7 +407,11 @@ function getMediaType2(iValueObj) {
pageObject['visible'] = true; pageObject['visible'] = true;
//詳細ログ用 //詳細ログ用
try{
pageObject["objectId"] = iValueObj.action.objectId; pageObject["objectId"] = iValueObj.action.objectId;
}catch(e){
pageObject["objectId"] = "";
}
return pageObject; return pageObject;
}; };
...@@ -448,7 +456,11 @@ function getMediaType3(iValueObj) { ...@@ -448,7 +456,11 @@ function getMediaType3(iValueObj) {
pageObject['visible'] = true; pageObject['visible'] = true;
//詳細ログ用 //詳細ログ用
try{
pageObject["objectId"] = iValueObj.action.objectId; pageObject["objectId"] = iValueObj.action.objectId;
}catch(e){
pageObject["objectId"] = "";
}
return pageObject; return pageObject;
}; };
...@@ -492,7 +504,11 @@ function getMediaType4(iValueObj) { ...@@ -492,7 +504,11 @@ function getMediaType4(iValueObj) {
pageObject['visible'] = true; pageObject['visible'] = true;
//詳細ログ用(使わない) //詳細ログ用(使わない)
try{
pageObject["objectId"] = iValueObj.action.objectId; pageObject["objectId"] = iValueObj.action.objectId;
}catch(e){
pageObject["objectId"] = "";
}
return pageObject; return pageObject;
}; };
...@@ -524,7 +540,11 @@ function getMediaType5(iValueObj) { ...@@ -524,7 +540,11 @@ function getMediaType5(iValueObj) {
pageObject['visible'] = true; pageObject['visible'] = true;
//詳細ログ用(使わない) //詳細ログ用(使わない)
try{
pageObject["objectId"] = iValueObj.action.objectId; pageObject["objectId"] = iValueObj.action.objectId;
}catch(e){
pageObject["objectId"] = "";
}
return pageObject; return pageObject;
}; };
...@@ -589,7 +609,11 @@ function getMediaType6(iValueObj) { ...@@ -589,7 +609,11 @@ function getMediaType6(iValueObj) {
pageObject['visible'] = true; pageObject['visible'] = true;
//詳細ログ用 //詳細ログ用
try{
pageObject["objectId"] = iValueObj.action.objectId; pageObject["objectId"] = iValueObj.action.objectId;
}catch(e){
pageObject["objectId"] = "";
}
return pageObject; return pageObject;
}; };
...@@ -627,7 +651,11 @@ function getMediaType7(iValueObj) { ...@@ -627,7 +651,11 @@ function getMediaType7(iValueObj) {
pageObject['visible'] = true; pageObject['visible'] = true;
//詳細ログ用(使わない) //詳細ログ用(使わない)
try{
pageObject["objectId"] = iValueObj.action.objectId; pageObject["objectId"] = iValueObj.action.objectId;
}catch(e){
pageObject["objectId"] = "";
}
return pageObject; return pageObject;
}; };
...@@ -680,7 +708,11 @@ function getMediaType8(iValueObj) { ...@@ -680,7 +708,11 @@ function getMediaType8(iValueObj) {
} }
//詳細ログ用 //詳細ログ用
try{
pageObject["objectId"] = iValueObj.action.objectId; pageObject["objectId"] = iValueObj.action.objectId;
}catch(e){
pageObject["objectId"] = "";
}
return pageObject; return pageObject;
}; };
...@@ -701,7 +733,11 @@ function getMediaType9(iValueObj) { ...@@ -701,7 +733,11 @@ function getMediaType9(iValueObj) {
pageObject['visible'] = true; pageObject['visible'] = true;
//詳細ログ用 //詳細ログ用
try{
pageObject["objectId"] = iValueObj.action.objectId; pageObject["objectId"] = iValueObj.action.objectId;
}catch(e){
pageObject["objectId"] = "";
}
if(iValueObj.action.actionType == 11){ if(iValueObj.action.actionType == 11){
var resourceId = iValueObj.mediaInfo.resourceId; var resourceId = iValueObj.mediaInfo.resourceId;
...@@ -743,7 +779,11 @@ function getMediaType11(iValueObj) { ...@@ -743,7 +779,11 @@ function getMediaType11(iValueObj) {
pageObject['visible'] = true; pageObject['visible'] = true;
//詳細ログ用 //詳細ログ用
try{
pageObject["objectId"] = iValueObj.action.objectId; pageObject["objectId"] = iValueObj.action.objectId;
}catch(e){
pageObject["objectId"] = "";
}
if(iValueObj.action.actionType == 12){ if(iValueObj.action.actionType == 12){
var resourceId = iValueObj.mediaInfo.resourceId; var resourceId = iValueObj.mediaInfo.resourceId;
......
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