Commit 247c6574 by Masaru Abe

詳細の開くボタンが効かないバグ対応

parent b7fd44a5
......@@ -8,6 +8,9 @@
//グローバルの名前空間用のオブジェクトを用意する
var COMMON = {};
COMMON.resourceVersionArr = [];
COMMON.metaVersionArr = [];
COMMON.DEFAULT_IMG_OPTION_MEMO = 'img/list/icon_sticker.png';
COMMON.DEFAULT_IMG_OPTION_MARKING = 'img/list/icon_pen.png';
COMMON.DEFAULT_IMG_CONTENT_EDIT = 'img/common/band_updated.png';
......@@ -2850,3 +2853,93 @@ COMMON.isIE10 = function() {
}
return false;
};
//set resource version data
COMMON.setResourceVersionData = function(conId) {
var tempResourceArr;
var tempResource;
//check if insert new or edit
var flag = false;
if (ClientData.ResourceVersion().length <= 0 || ClientData.ResourceVersion() == null || ClientData.ResourceVersion() == 'undefined') {
tempResourceArr = [];
}
else {
tempResourceArr = ClientData.ResourceVersion();
}
for (var i = 0; i < COMMON.resourceVersionArr.length; i++) {
if (COMMON.resourceVersionArr[i].contentid == conId) {
tempResource = COMMON.resourceVersionArr[i].resourceversion;
break;
}
}
if (tempResourceArr.length > 0) {
for (var j = 0; j < tempResourceArr.length; j++) {
if (tempResourceArr[j].contentid == conId) {
tempResourceArr[j].resourceversion = tempResource;
flag = true;
break;
}
else {
flag = false;
}
}
if (!flag) {
tempResourceArr.push({ contentid: conId, resourceversion: tempResource });
}
} else {
tempResourceArr.push({ contentid: conId, resourceversion: tempResource });
}
ClientData.ResourceVersion(tempResourceArr);
};
//set meta Version Data
COMMON.setMetaVersionData = function(conId) {
var tempMetaArr;
var tempMeta;
//check if insert new or edit
var flag = false;
if (ClientData.MetaVersion().length <= 0 || ClientData.MetaVersion() == null || ClientData.MetaVersion() == 'undefined') {
tempMetaArr = [];
}
else {
tempMetaArr = ClientData.MetaVersion();
}
for (var i = 0; i < COMMON.metaVersionArr.length; i++) {
if (COMMON.metaVersionArr[i].contentid == conId) {
tempMeta = COMMON.metaVersionArr[i].metaversion;
break;
}
}
if (tempMetaArr.length > 0) {
for (var j = 0; j < tempMetaArr.length; j++) {
if (tempMetaArr[j].contentid == conId) {
tempMetaArr[j].metaversion = tempMeta;
flag = true;
break;
}
else {
flag = false;
}
}
if (!flag) {
tempMetaArr.push({ contentid: conId, metaversion: tempMeta });
}
} else {
tempMetaArr.push({ contentid: conId, metaversion: tempMeta });
}
ClientData.MetaVersion(tempMetaArr);
};
......@@ -30,8 +30,8 @@ var contentTypeArr = [];
//};
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Create new Array for function No.12.
var contentIdArray = [];
var resourceVersionArr = [];
var metaVersionArr = [];
//var resourceVersionArr = [];
//var metaVersionArr = [];
var totalPage;
var chkSearchTextEmpty = false;
var noRecordFlg = false;
......@@ -288,10 +288,10 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
checkUserHasReadContent(post.contentId, post.resourceVersion, post.metaVersion);
//assign version to array
resourceVersionArr.push({ contentid: post.contentId, resourceversion: post.resourceVersion });
COMMON.resourceVersionArr.push({ contentid: post.contentId, resourceversion: post.resourceVersion });
//assign meta version to array
metaVersionArr.push({ contentid: post.contentId, metaversion: post.metaVersion });
COMMON.metaVersionArr.push({ contentid: post.contentId, metaversion: post.metaVersion });
//Check if content has marking or memo
checkContentMarkingMemoOption(post.contentId);
......@@ -504,10 +504,10 @@ function canvasClickFunction(e){
ClientData.ReadingContentIds(contentIdArray);
//Set ResouceVersion for content
setResourceVersionData(outputId);
COMMON.setResourceVersionData(outputId);
//Set MetaVersion for content
setMetaVersionData(outputId);
COMMON.setMetaVersionData(outputId);
//Close Submenu
$('#dlgSubMenu').hide();
......@@ -945,10 +945,10 @@ function readSubmenuFunction_callback(contentId)
ClientData.ReadingContentIds(newArray);
//Set ResouceVersion for content
setResourceVersionData(contentId);
COMMON.setResourceVersionData(contentId);
//Set MetaVersion for content
setMetaVersionData(contentId);
COMMON.setMetaVersionData(contentId);
//Set data for readingcontentid
ClientData.ReadingContentIds(contentIdArray);
......@@ -1304,95 +1304,6 @@ function renderViewDate(id){
}
};
//set resource version data
function setResourceVersionData(conId){
var tempResourceArr;
var tempResource;
//check if insert new or edit
var flag = false;
if(ClientData.ResourceVersion().length <= 0 || ClientData.ResourceVersion() == null || ClientData.ResourceVersion() == 'undefined'){
tempResourceArr = [];
}
else{
tempResourceArr = ClientData.ResourceVersion();
}
for(var i = 0; i < resourceVersionArr.length; i++){
if(resourceVersionArr[i].contentid == conId){
tempResource = resourceVersionArr[i].resourceversion;
break;
}
}
if(tempResourceArr.length > 0){
for(var j = 0; j < tempResourceArr.length; j++){
if(tempResourceArr[j].contentid == conId){
tempResourceArr[j].resourceversion = tempResource;
flag = true;
break;
}
else{
flag = false;
}
}
if(!flag){
tempResourceArr.push({contentid: conId, resourceversion: tempResource});
}
}else{
tempResourceArr.push({contentid: conId, resourceversion: tempResource});
}
ClientData.ResourceVersion(tempResourceArr);
};
//set meta Version Data
function setMetaVersionData(conId){
var tempMetaArr;
var tempMeta;
//check if insert new or edit
var flag = false;
if(ClientData.MetaVersion().length <= 0 || ClientData.MetaVersion() == null || ClientData.MetaVersion() == 'undefined'){
tempMetaArr = [];
}
else{
tempMetaArr = ClientData.MetaVersion();
}
for(var i = 0; i < metaVersionArr.length; i++){
if(metaVersionArr[i].contentid == conId){
tempMeta = metaVersionArr[i].metaversion;
break;
}
}
if(tempMetaArr.length > 0){
for(var j = 0; j < tempMetaArr.length; j++){
if(tempMetaArr[j].contentid == conId){
tempMetaArr[j].metaversion = tempMeta;
flag = true;
break;
}
else{
flag = false;
}
}
if(!flag){
tempMetaArr.push({contentid: conId, metaversion: tempMeta});
}
}else{
tempMetaArr.push({contentid: conId, metaversion: tempMeta});
}
ClientData.MetaVersion(tempMetaArr);
};
//handle display sort direction
function handleSortDisp(){
// $('#control-sort-title').removeClass('active_tops');
......@@ -1558,10 +1469,10 @@ function titleClickFunction(e){
ClientData.ReadingContentIds(contentIdArray);
//Set ResouceVersion for content
setResourceVersionData(contentid);
COMMON.setResourceVersionData(contentid);
//Set MetaVersion for content
setMetaVersionData(contentid);
COMMON.setMetaVersionData(contentid);
//Close Submenu
$('#dlgSubMenu').hide();
......
......@@ -190,10 +190,10 @@ function contentdetail_dspRead_Click_callback(outputId) {
ClientData.ReadingContentIds(contentIdArray);
//Set ResouceVersion for content
setResourceVersionData(outputId);
COMMON.setResourceVersionData(outputId);
//Set MetaVersion for content
setMetaVersionData(outputId);
COMMON.setMetaVersionData(outputId);
// Redirect to screen: contentview
//$('body,html').animate({ scrollTop: 0 }, 0);
......@@ -371,95 +371,6 @@ function insertRow1(pageThumbnail, pageText, pageNo) {
};
//set resource version data
function setResourceVersionData(conId){
var tempResourceArr;
var tempResource;
//check if insert new or edit
var flag = false;
if(ClientData.ResourceVersion().length <= 0 || ClientData.ResourceVersion() == null || ClientData.ResourceVersion() == 'undefined'){
tempResourceArr = [];
}
else{
tempResourceArr = ClientData.ResourceVersion();
}
for(var i = 0; i < resourceVersionArr.length; i++){
if(resourceVersionArr[i].contentid == conId){
tempResource = resourceVersionArr[i].resourceversion;
break;
}
}
if(tempResourceArr.length > 0){
for(var j = 0; j < tempResourceArr.length; j++){
if(tempResourceArr[j].contentid == conId){
tempResourceArr[j].resourceversion = tempResource;
flag = true;
break;
}
else{
flag = false;
}
}
if(!flag){
tempResourceArr.push({contentid: conId, resourceversion: tempResource});
}
}else{
tempResourceArr.push({contentid: conId, resourceversion: tempResource});
}
ClientData.ResourceVersion(tempResourceArr);
};
//set meta Version Data
function setMetaVersionData(conId){
var tempMetaArr;
var tempMeta;
//check if insert new or edit
var flag = false;
if(ClientData.MetaVersion().length <= 0 || ClientData.MetaVersion() == null || ClientData.MetaVersion() == 'undefined'){
tempMetaArr = [];
}
else{
tempMetaArr = ClientData.MetaVersion();
}
for(var i = 0; i < metaVersionArr.length; i++){
if(metaVersionArr[i].contentid == conId){
tempMeta = metaVersionArr[i].metaversion;
break;
}
}
if(tempMetaArr.length > 0){
for(var j = 0; j < tempMetaArr.length; j++){
if(tempMetaArr[j].contentid == conId){
tempMetaArr[j].metaversion = tempMeta;
flag = true;
break;
}
else{
flag = false;
}
}
if(!flag){
tempMetaArr.push({contentid: conId, metaversion: tempMeta});
}
}else{
tempMetaArr.push({contentid: conId, metaversion: tempMeta});
}
ClientData.MetaVersion(tempMetaArr);
};
function formatNormalDate(day, month, year) {
var outputDate = year + '/' + (('' + month).length < 2 ? '0' : '') + month + '/' + (('' + day).length < 2 ? '0' : '') + day;
......
......@@ -32,8 +32,8 @@ var contentTypeArr = [];
//};
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Create new Array for function No.12.
var contentIdArray = [];
var resourceVersionArr = [];
var metaVersionArr = [];
//var resourceVersionArr = [];
//var metaVersionArr = [];
var totalPage;
var contentViewData = [];
var noRecordFlg = false;
......@@ -235,10 +235,10 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
checkUserHasReadContent(post.contentId, post.resourceVersion, post.metaVersion);
//assign version to array
resourceVersionArr.push({ contentid: post.contentId, resourceversion: post.resourceVersion });
COMMON.resourceVersionArr.push({ contentid: post.contentId, resourceversion: post.resourceVersion });
//assign meta version to array
metaVersionArr.push({ contentid: post.contentId, metaversion: post.metaVersion });
COMMON.metaVersionArr.push({ contentid: post.contentId, metaversion: post.metaVersion });
//Check if content has marking or memo
checkContentMarkingMemoOption(post.contentId);
......@@ -414,10 +414,10 @@ function canvasClickFunction(e){
ClientData.ReadingContentIds(contentIdArray);
//Set ResouceVersion for content
setResourceVersionData(outputId);
COMMON.setResourceVersionData(outputId);
//Set MetaVersion for content
setMetaVersionData(outputId);
COMMON.setMetaVersionData(outputId);
//Delete 'new' icon
drawEditImage(outputId);
......@@ -842,10 +842,10 @@ function readSubmenuFunction_callback(contentId)
ClientData.ReadingContentIds(newArray);
//Set ResouceVersion for content
setResourceVersionData(contentId);
COMMON.setResourceVersionData(contentId);
//Set MetaVersion for content
setMetaVersionData(contentId);
COMMON.setMetaVersionData(contentId);
//Set data for readingcontentid
ClientData.ReadingContentIds(contentIdArray);
......@@ -1331,10 +1331,10 @@ function titleClickFunction(e){
ClientData.ReadingContentIds(contentIdArray);
//Set ResouceVersion for content
setResourceVersionData(contentid);
COMMON.setResourceVersionData(contentid);
//Set MetaVersion for content
setMetaVersionData(contentid);
COMMON.setMetaVersionData(contentid);
//Delete 'new' icon
drawEditImage(contentid);
......
......@@ -20,8 +20,8 @@ HOME.thumbnailArr = [];
HOME.contentTypeArr = [];
HOME.contentIdArray = [];
HOME.resourceVersionArr = [];
HOME.metaVersionArr = [];
//HOME.resourceVersionArr = [];
//HOME.metaVersionArr = [];
HOME.errorPage = [];
HOME.errorContent = [];
HOME.dataGroup;
......@@ -509,10 +509,10 @@ HOME.canvasClickFunction_callback = function(outputId)
ClientData.ReadingContentIds(HOME.contentIdArray);
//Set ResouceVersion for content
HOME.setResourceVersionData(outputId);
COMMON.setResourceVersionData(outputId);
//Set MetaVersion for content
HOME.setMetaVersionData(outputId);
COMMON.setMetaVersionData(outputId);
//Close Submenu
$('#dlgSubMenu').hide();
......@@ -559,10 +559,10 @@ HOME.canvasClickFunction_callback = function(outputId)
ClientData.ReadingContentIds(HOME.contentIdArray);
//Set ResouceVersion for content
HOME.setResourceVersionData(outputId);
COMMON.setResourceVersionData(outputId);
//Set MetaVersion for content
HOME.setMetaVersionData(outputId);
COMMON.setMetaVersionData(outputId);
//$('body,html').animate({ scrollTop: 0 }, 0);
ClientData.IsRefresh(false);
......@@ -620,10 +620,10 @@ HOME.canvasClickFunction_callback = function(outputId)
ClientData.ReadingContentIds(HOME.contentIdArray);
//Set ResouceVersion for content
HOME.setResourceVersionData(outputId);
COMMON.setResourceVersionData(outputId);
//Set MetaVersion for content
HOME.setMetaVersionData(outputId);
COMMON.setMetaVersionData(outputId);
//Close Submenu
$('#dlgSubMenu').hide();
......@@ -670,10 +670,10 @@ HOME.canvasClickFunction_callback = function(outputId)
ClientData.ReadingContentIds(HOME.contentIdArray);
//Set ResouceVersion for content
HOME.setResourceVersionData(outputId);
COMMON.setResourceVersionData(outputId);
//Set MetaVersion for content
HOME.setMetaVersionData(outputId);
COMMON.setMetaVersionData(outputId);
//$('body,html').animate({ scrollTop: 0 }, 0);
ClientData.IsRefresh(false);
......@@ -757,10 +757,10 @@ HOME.openSubMenuDialogFunction = function(e) {
ClientData.ReadingContentIds(HOME.contentIdArray);
//Set ResouceVersion for content
HOME.setResourceVersionData(contentid);
COMMON.setResourceVersionData(contentid);
//Set MetaVersion for content
HOME.setMetaVersionData(contentid);
COMMON.setMetaVersionData(contentid);
//Close Submenu
$('#dlgSubMenu').hide();
......@@ -838,10 +838,10 @@ HOME.openSubMenuDialogFunction = function(e) {
ClientData.ReadingContentIds(HOME.contentIdArray);
//Set ResouceVersion for content
HOME.setResourceVersionData(contentid);
COMMON.setResourceVersionData(contentid);
//Set MetaVersion for content
HOME.setMetaVersionData(contentid);
COMMON.setMetaVersionData(contentid);
//Close Submenu
$('#dlgSubMenu').hide();
......@@ -1363,10 +1363,10 @@ HOME.detailsSubmenuFunction = function(e) {
ClientData.ReadingContentIds(HOME.contentIdArray);
//Set ResouceVersion for content
HOME.setResourceVersionData(contentId);
COMMON.setResourceVersionData(contentId);
//Set MetaVersion for content
HOME.setMetaVersionData(contentId);
COMMON.setMetaVersionData(contentId);
// Close popup menu
$('#dlgSubMenu').hide();
......@@ -1458,10 +1458,10 @@ HOME.readSubmenuFunction_callback = function(contentId)
ClientData.ReadingContentIds(newArray);
//Set ResouceVersion for content
HOME.setResourceVersionData(contentId);
COMMON.setResourceVersionData(contentId);
//Set MetaVersion for content
HOME.setMetaVersionData(contentId);
COMMON.setMetaVersionData(contentId);
//Set data for readingcontentid
ClientData.ReadingContentIds(HOME.contentIdArray);
......@@ -1920,10 +1920,10 @@ HOME.renderContent = function(id, text, division, type, order, from, to, cateid,
//Check if user has read this content or not.
HOME.checkUserHasReadContent(post.contentId, post.resourceVersion, post.metaVersion);
//assign version to array
HOME.resourceVersionArr.push({ contentid: post.contentId, resourceversion: post.resourceVersion });
COMMON.resourceVersionArr.push({ contentid: post.contentId, resourceversion: post.resourceVersion });
//assign meta version to array
HOME.metaVersionArr.push({ contentid: post.contentId, metaversion: post.metaVersion });
COMMON.metaVersionArr.push({ contentid: post.contentId, metaversion: post.metaVersion });
//Check if content has marking or memo
HOME.checkContentMarkingMemoOption(post.contentId);
......@@ -2330,95 +2330,6 @@ HOME.renderViewDate = function(id) {
}
};
//set resource version data
HOME.setResourceVersionData = function(conId) {
var tempResourceArr;
var tempResource;
//check if insert new or edit
var flag = false;
if (ClientData.ResourceVersion().length <= 0 || ClientData.ResourceVersion() == null || ClientData.ResourceVersion() == 'undefined') {
tempResourceArr = [];
}
else {
tempResourceArr = ClientData.ResourceVersion();
}
for (var i = 0; i < HOME.resourceVersionArr.length; i++) {
if (HOME.resourceVersionArr[i].contentid == conId) {
tempResource = HOME.resourceVersionArr[i].resourceversion;
break;
}
}
if (tempResourceArr.length > 0) {
for (var j = 0; j < tempResourceArr.length; j++) {
if (tempResourceArr[j].contentid == conId) {
tempResourceArr[j].resourceversion = tempResource;
flag = true;
break;
}
else {
flag = false;
}
}
if (!flag) {
tempResourceArr.push({ contentid: conId, resourceversion: tempResource });
}
} else {
tempResourceArr.push({ contentid: conId, resourceversion: tempResource });
}
ClientData.ResourceVersion(tempResourceArr);
};
//set meta Version Data
HOME.setMetaVersionData = function(conId) {
var tempMetaArr;
var tempMeta;
//check if insert new or edit
var flag = false;
if (ClientData.MetaVersion().length <= 0 || ClientData.MetaVersion() == null || ClientData.MetaVersion() == 'undefined') {
tempMetaArr = [];
}
else {
tempMetaArr = ClientData.MetaVersion();
}
for (var i = 0; i < HOME.metaVersionArr.length; i++) {
if (HOME.metaVersionArr[i].contentid == conId) {
tempMeta = HOME.metaVersionArr[i].metaversion;
break;
}
}
if (tempMetaArr.length > 0) {
for (var j = 0; j < tempMetaArr.length; j++) {
if (tempMetaArr[j].contentid == conId) {
tempMetaArr[j].metaversion = tempMeta;
flag = true;
break;
}
else {
flag = false;
}
}
if (!flag) {
tempMetaArr.push({ contentid: conId, metaversion: tempMeta });
}
} else {
tempMetaArr.push({ contentid: conId, metaversion: tempMeta });
}
ClientData.MetaVersion(tempMetaArr);
};
//handle display sort direction
HOME.handleSortDisp = function() {
$('#control-sort-title').removeClass('active_tops');
......
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