Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_web
check
Commits
e3e221f1
Commit
e3e221f1
authored
Mar 17, 2015
by
Masaru Abe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
バックアップリストア対応
parent
0f78c21c
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
913 additions
and
700 deletions
+913
-700
abvw/.htaccess
+4
-4
abvw/common/json/lang/lang-en.json
+2
-1
abvw/common/json/lang/lang-ko.json
+2
-1
abvw/js/contentsearch.js
+288
-186
abvw/js/header.js
+33
-1
abvw/js/history.js
+275
-254
abvw/js/home.js
+296
-251
abvw/js/settings.js
+9
-0
abvw/settings.html
+4
-2
No files found.
abvw/.htaccess
View file @
e3e221f1
SetEnvIf
Referer "^http://web3\.agentec\.jp/web_test/" RefererCheck
#
SetEnvIf Referer "^http://web3\.agentec\.jp/web_test/" RefererCheck
Order
deny,allow
#
Order deny,allow
Deny
from
all
#
Deny from all
Allow
from
env=RefererCheck
#
Allow from env=RefererCheck
<
Files
~ "\.(js|json)$"
>
<
Files
~ "\.(js|json)$"
>
Header
add
Pragma "no-cache"
Header
add
Pragma "no-cache"
Header
set
Cache-Control no-cache
Header
set
Cache-Control no-cache
...
...
abvw/common/json/lang/lang-en.json
View file @
e3e221f1
...
@@ -156,5 +156,6 @@
...
@@ -156,5 +156,6 @@
"txtUrlValidDate"
:
"validated period"
,
"txtUrlValidDate"
:
"validated period"
,
"txtMaxDownloadCount"
:
"number of max dl"
,
"txtMaxDownloadCount"
:
"number of max dl"
,
"msgShareUrlPassword"
:
"When you set a password, please input below."
,
"msgShareUrlPassword"
:
"When you set a password, please input below."
,
"msgStreamingOpenError"
:
"It is the contents that I cannot read in the streaming."
"msgStreamingOpenError"
:
"It is the contents that I cannot read in the streaming."
,
"txtBkContentStatus"
:
"Content Status"
}
}
abvw/common/json/lang/lang-ko.json
View file @
e3e221f1
...
@@ -156,5 +156,6 @@
...
@@ -156,5 +156,6 @@
"txtUrlValidDate"
:
"URL유효기간"
,
"txtUrlValidDate"
:
"URL유효기간"
,
"txtMaxDownloadCount"
:
"최대DL횟수"
,
"txtMaxDownloadCount"
:
"최대DL횟수"
,
"msgShareUrlPassword"
:
"암호를 설정할경우 다음의 입력란에 입력하십시오."
,
"msgShareUrlPassword"
:
"암호를 설정할경우 다음의 입력란에 입력하십시오."
,
"msgStreamingOpenError"
:
"스트리밍에서는 열람 할 수 없는 컨텐츠입니다."
"msgStreamingOpenError"
:
"스트리밍에서는 열람 할 수 없는 컨텐츠입니다."
,
"txtBkContentStatus"
:
"콘텐츠 상태"
}
}
abvw/js/contentsearch.js
View file @
e3e221f1
...
@@ -881,192 +881,294 @@ CONTENTSEARCH.checkContentMarkingMemoOption = function(contentId){
...
@@ -881,192 +881,294 @@ CONTENTSEARCH.checkContentMarkingMemoOption = function(contentId){
//Check if User has read content
//Check if User has read content
CONTENTSEARCH
.
checkUserHasReadContent
=
function
(
contId
,
resourceVer
,
metaVer
)
{
CONTENTSEARCH
.
checkUserHasReadContent
=
function
(
contId
,
resourceVer
,
metaVer
)
{
var
imgThumb
=
new
Image
();
var
imgThumb
=
new
Image
();
//imgThumb.src = CONTENTSEARCH.returnThumbnail(contId);
//imgThumb.src = CONTENTSEARCH.returnThumbnail(contId);
var
imgIconNew
=
new
Image
();
var
imgIconNew
=
new
Image
();
//imgIconNew.src = COMMON.DEFAULT_IMG_CONTENT_NEW;
//imgIconNew.src = COMMON.DEFAULT_IMG_CONTENT_NEW;
var
imgIconEdit
=
new
Image
();
var
imgIconEdit
=
new
Image
();
//imgIconEdit.src = COMMON.DEFAULT_IMG_CONTENT_EDIT;
//imgIconEdit.src = COMMON.DEFAULT_IMG_CONTENT_EDIT;
var
c
=
document
.
getElementById
(
'content-thumbnail'
+
contId
);
var
c
=
document
.
getElementById
(
'content-thumbnail'
+
contId
);
var
ctx
=
c
.
getContext
(
'2d'
);
var
ctx
=
c
.
getContext
(
'2d'
);
var
readFlg
=
false
;
var
readFlg
=
false
;
var
versionArr
=
ClientData
.
ResourceVersion
();
var
versionArr
=
ClientData
.
ResourceVersion
();
var
metaArr
=
ClientData
.
MetaVersion
();
var
metaArr
=
ClientData
.
MetaVersion
();
var
readArr
=
ClientData
.
ReadingContentIds
();
var
readArr
=
ClientData
.
ReadingContentIds
();
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Declare variable handle contentType and Thumbnail of content.
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Declare variable handle contentType and Thumbnail of content.
var
contentThumbnail
=
CONTENTSEARCH
.
returnThumbnail
(
contId
);
var
contentThumbnail
=
CONTENTSEARCH
.
returnThumbnail
(
contId
);
var
contentType
=
CONTENTSEARCH
.
returnContentType
(
contId
);
var
contentType
=
CONTENTSEARCH
.
returnContentType
(
contId
);
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Declare variable handle contentType and Thumbnail of content.
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Declare variable handle contentType and Thumbnail of content.
//コンテンツ状態バックアップ対応
if
(
readArr
==
null
||
readArr
<=
0
||
readArr
==
'undefined'
)
{
var
bkContentStatus
=
HEADER
.
getContentStatus
(
contId
);
imgThumb
.
onload
=
function
()
{
var
contentStatus
=
null
;
var
resizeImg
=
CONTENTSEARCH
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
if
(
bkContentStatus
==
0
){
ctx
.
drawImage
(
imgThumb
,
(
c
.
width
/
2
)
-
(
resizeImg
[
0
]
/
2
)
+
4
,
c
.
height
-
resizeImg
[
1
]
+
4
,
resizeImg
[
0
],
resizeImg
[
1
]);
contentStatus
=
0
;
//READ
imgIconNew
.
onload
=
function
()
{
}
else
if
(
bkContentStatus
==
1
||
bkContentStatus
==
2
||
bkContentStatus
==
4
){
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
contentStatus
=
1
;
//NEW
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
}
else
if
(
bkContentStatus
==
3
){
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
contentStatus
=
2
;
//UPDATE
});
}
};
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
if
(
readArr
==
null
||
readArr
<=
0
||
readArr
==
'undefined'
)
{
};
imgThumb
.
onload
=
function
()
{
var
resizeImg
=
CONTENTSEARCH
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
ctx
.
drawImage
(
imgThumb
,
(
c
.
width
/
2
)
-
(
resizeImg
[
0
]
/
2
)
+
4
,
c
.
height
-
resizeImg
[
1
]
+
4
,
resizeImg
[
0
],
resizeImg
[
1
]);
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
if
(
contentStatus
==
null
||
contentStatus
==
1
){
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
imgIconNew
.
onload
=
function
()
{
if
(
src
!=
''
){
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
imgThumb
.
src
=
src
;
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
}
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
}
});
}
else
{
};
imgThumb
.
src
=
contentThumbnail
;
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
}
}
else
{
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
}
});
else
{
}
//Check if user has read this content or not
};
for
(
var
nIndex1
=
0
;
nIndex1
<
ClientData
.
ReadingContentIds
().
length
;
nIndex1
++
)
{
if
(
ClientData
.
ReadingContentIds
()[
nIndex1
].
contentid
==
contId
)
{
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
imgThumb
.
onload
=
function
()
{
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
var
resizeImg
=
CONTENTSEARCH
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
ctx
.
drawImage
(
imgThumb
,
(
c
.
width
/
2
)
-
(
resizeImg
[
0
]
/
2
)
+
4
,
c
.
height
-
resizeImg
[
1
]
+
4
,
resizeImg
[
0
],
resizeImg
[
1
]);
if
(
src
!=
''
){
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
imgThumb
.
src
=
src
;
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
}
});
}
};
}
else
{
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
imgThumb
.
src
=
contentThumbnail
;
}
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
//未読はここで終了
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
return
;
if
(
src
!=
''
){
}
else
{
imgThumb
.
src
=
src
;
//Check if user has read this content or not
}
for
(
var
nIndex1
=
0
;
nIndex1
<
readArr
.
length
;
nIndex1
++
)
{
}
if
(
readArr
[
nIndex1
].
contentid
==
contId
)
{
}
else
{
imgThumb
.
onload
=
function
()
{
imgThumb
.
src
=
contentThumbnail
;
var
resizeImg
=
CONTENTSEARCH
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
}
ctx
.
drawImage
(
imgThumb
,
(
c
.
width
/
2
)
-
(
resizeImg
[
0
]
/
2
)
+
4
,
c
.
height
-
resizeImg
[
1
]
+
4
,
resizeImg
[
0
],
resizeImg
[
1
]);
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if
(
contentStatus
==
1
){
readFlg
=
true
;
imgIconNew
.
onload
=
function
()
{
break
;
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
}
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
else
{
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
imgThumb
.
onload
=
function
()
{
});
var
resizeImg
=
CONTENTSEARCH
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
};
ctx
.
drawImage
(
imgThumb
,
(
c
.
width
/
2
)
-
(
resizeImg
[
0
]
/
2
)
+
4
,
c
.
height
-
resizeImg
[
1
]
+
4
,
resizeImg
[
0
],
resizeImg
[
1
]);
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
imgIconNew
.
onload
=
function
()
{
}
else
if
(
contentStatus
==
2
){
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
imgIconEdit
.
onload
=
function
()
{
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
});
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
};
});
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
};
};
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
}
else
{
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
});
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
}
if
(
src
!=
''
){
};
imgThumb
.
src
=
src
;
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
}
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
}
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
}
else
{
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
imgThumb
.
src
=
contentThumbnail
;
if
(
src
!=
''
){
}
imgThumb
.
src
=
src
;
}
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
}
}
}
else
{
}
imgThumb
.
src
=
contentThumbnail
;
}
}
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
//Check if resource version has change
readFlg
=
true
;
if
(
readFlg
)
{
break
;
if
(
versionArr
==
null
||
versionArr
<=
0
||
versionArr
==
'undefined'
)
{
}
else
{
}
/*
else
{
imgThumb.onload = function () {
for
(
var
nIndex2
=
0
;
nIndex2
<
versionArr
.
length
;
nIndex2
++
)
{
var resizeImg = CONTENTSEARCH.resizeResourceThumbnail(imgThumb, c.width, c.height);
if
(
versionArr
[
nIndex2
].
contentid
==
contId
)
{
ctx.drawImage(imgThumb, (c.width / 2) - (resizeImg[0] / 2) + 4, c.height - resizeImg[1] + 4, resizeImg[0], resizeImg[1]);
if
(
versionArr
[
nIndex2
].
resourceversion
!=
resourceVer
)
{
imgThumb
.
onload
=
function
()
{
if(contentStatus == null || contentStatus == 1){
var
resizeImg
=
CONTENTSEARCH
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
imgIconNew.onload = function () {
ctx
.
drawImage
(
imgThumb
,
(
c
.
width
/
2
)
-
(
resizeImg
[
0
]
/
2
)
+
4
,
c
.
height
-
resizeImg
[
1
]
+
4
,
resizeImg
[
0
],
resizeImg
[
1
]);
ctx.drawImage(imgIconNew, c.width / 2 - resizeImg[0] / 2, c.height - resizeImg[1]);
imgIconEdit
.
onload
=
function
()
{
$("#loadingIcon" + contId).fadeOut('slow', function () {
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
$('#content-thumbnail' + contId).fadeIn('slow');
});
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
};
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
imgIconNew.src = COMMON.DEFAULT_IMG_CONTENT_NEW;
});
} else {
};
$("#loadingIcon" + contId).fadeOut('slow', function () {
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
$('#content-thumbnail' + contId).fadeIn('slow');
};
});
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
}
};
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
if(contentThumbnail == '' || contentThumbnail == null){
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
if(!COMMON.isPdfContent(contentType)){
if
(
src
!=
''
){
var src = HEADER.getThumbnailForOtherType(contentType);
imgThumb
.
src
=
src
;
if( src != '' ){
}
imgThumb.src = src;
}
}
}
else
{
}
imgThumb
.
src
=
contentThumbnail
;
}else{
}
imgThumb.src = contentThumbnail;
}
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
break
;
*/
}
}
}
}
}
}
}
//Check if resource version has change
if
(
metaArr
==
null
||
metaArr
<=
0
||
metaArr
==
'undefined'
)
{
if
(
readFlg
)
{
}
if
(
versionArr
==
null
||
versionArr
<=
0
||
versionArr
==
'undefined'
)
{
else
{
}
else
{
for
(
var
nIndex2
=
0
;
nIndex2
<
metaArr
.
length
;
nIndex2
++
)
{
for
(
var
nIndex2
=
0
;
nIndex2
<
versionArr
.
length
;
nIndex2
++
)
{
if
(
metaArr
[
nIndex2
].
contentid
==
contId
)
{
if
(
versionArr
[
nIndex2
].
contentid
==
contId
)
{
if
(
metaArr
[
nIndex2
].
metaversion
!=
metaVer
)
{
if
(
versionArr
[
nIndex2
].
resourceversion
!=
resourceVer
)
{
imgThumb
.
onload
=
function
()
{
imgThumb
.
onload
=
function
()
{
var
resizeImg
=
CONTENTSEARCH
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
var
resizeImg
=
CONTENTSEARCH
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
ctx
.
drawImage
(
imgThumb
,
(
c
.
width
/
2
)
-
(
resizeImg
[
0
]
/
2
)
+
4
,
c
.
height
-
resizeImg
[
1
]
+
4
,
resizeImg
[
0
],
resizeImg
[
1
]);
ctx
.
drawImage
(
imgThumb
,
(
c
.
width
/
2
)
-
(
resizeImg
[
0
]
/
2
)
+
4
,
c
.
height
-
resizeImg
[
1
]
+
4
,
resizeImg
[
0
],
resizeImg
[
1
]);
imgIconEdit
.
onload
=
function
()
{
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
if
(
contentStatus
==
1
){
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
imgIconNew
.
onload
=
function
()
{
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
});
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
};
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
});
};
};
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
}
else
{
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
imgIconEdit
.
onload
=
function
()
{
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
if
(
src
!=
''
){
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
imgThumb
.
src
=
src
;
});
}
};
}
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
}
else
{
imgThumb
.
src
=
contentThumbnail
;
//バックアップデータのステータス更新
}
HEADER
.
setContentStatus
(
contId
,
3
);
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
}
break
;
};
}
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
}
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
}
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
}
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
readFlg
=
false
;
if
(
src
!=
''
){
}
imgThumb
.
src
=
src
;
}
}
}
else
{
imgThumb
.
src
=
contentThumbnail
;
}
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
//break;
}
break
;
}
}
}
if
(
metaArr
==
null
||
metaArr
<=
0
||
metaArr
==
'undefined'
)
{
}
else
{
for
(
var
nIndex2
=
0
;
nIndex2
<
metaArr
.
length
;
nIndex2
++
)
{
if
(
metaArr
[
nIndex2
].
contentid
==
contId
)
{
if
(
metaArr
[
nIndex2
].
metaversion
!=
metaVer
)
{
imgThumb
.
onload
=
function
()
{
var
resizeImg
=
CONTENTSEARCH
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
ctx
.
drawImage
(
imgThumb
,
(
c
.
width
/
2
)
-
(
resizeImg
[
0
]
/
2
)
+
4
,
c
.
height
-
resizeImg
[
1
]
+
4
,
resizeImg
[
0
],
resizeImg
[
1
]);
if
(
contentStatus
==
1
){
imgIconNew
.
onload
=
function
()
{
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
});
};
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
}
else
{
imgIconEdit
.
onload
=
function
()
{
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
});
};
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
//バックアップデータのステータス更新
HEADER
.
setContentStatus
(
contId
,
3
);
}
};
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
if
(
src
!=
''
){
imgThumb
.
src
=
src
;
}
}
}
else
{
imgThumb
.
src
=
contentThumbnail
;
}
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
//break;
}
break
;
}
}
}
//readFlg = false;
}
else
{
imgThumb
.
onload
=
function
()
{
var
resizeImg
=
CONTENTSEARCH
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
ctx
.
drawImage
(
imgThumb
,
(
c
.
width
/
2
)
-
(
resizeImg
[
0
]
/
2
)
+
4
,
c
.
height
-
resizeImg
[
1
]
+
4
,
resizeImg
[
0
],
resizeImg
[
1
]);
if
(
contentStatus
==
null
||
contentStatus
==
1
){
imgIconNew
.
onload
=
function
()
{
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
});
};
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
}
else
if
(
contentStatus
==
2
){
imgIconEdit
.
onload
=
function
()
{
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
});
};
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
}
else
{
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
});
}
};
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
if
(
src
!=
''
){
imgThumb
.
src
=
src
;
}
}
}
else
{
imgThumb
.
src
=
contentThumbnail
;
}
}
};
};
//draw Edit Image
//draw Edit Image
...
...
abvw/js/header.js
View file @
e3e221f1
...
@@ -620,7 +620,8 @@ HEADER.DoBackup = function(isBackupMarking, isBackupMemo, isBackupBookmark, isBa
...
@@ -620,7 +620,8 @@ HEADER.DoBackup = function(isBackupMarking, isBackupMemo, isBackupBookmark, isBa
//READステータス追加
//READステータス追加
if
(
ClientData
.
ReadingContentIds
().
length
>
0
){
if
(
ClientData
.
ReadingContentIds
().
length
>
0
){
for
(
var
nIndex
=
0
;
nIndex
<
ClientData
.
ReadingContentIds
().
length
;
nIndex
++
){
for
(
var
nIndex
=
0
;
nIndex
<
ClientData
.
ReadingContentIds
().
length
;
nIndex
++
){
HEADER
.
setContentStatus
(
ClientData
.
ReadingContentIds
()[
nIndex
].
contentid
,
0
);
//存在しない場合追加
HEADER
.
addContentStatusRead
(
ClientData
.
ReadingContentIds
()[
nIndex
].
contentid
);
}
}
}
}
...
@@ -1218,8 +1219,39 @@ HEADER.setContentStatus = function(contentId, status) {
...
@@ -1218,8 +1219,39 @@ HEADER.setContentStatus = function(contentId, status) {
var
newArray
=
[];
var
newArray
=
[];
ClientData
.
ContentStatusData
(
newArray
);
ClientData
.
ContentStatusData
(
newArray
);
ClientData
.
ContentStatusData
(
arrContentStatus
);
ClientData
.
ContentStatusData
(
arrContentStatus
);
};
};
//JSONバックアップ前にWebでリード済のステータスがJSONになければ追加
HEADER
.
addContentStatusRead
=
function
(
contentId
)
{
var
arr
=
ClientData
.
ContentStatusData
();
var
hitFlg
=
false
;
for
(
var
nIndex1
=
0
;
nIndex1
<
arr
.
length
;
nIndex1
++
)
{
if
(
arr
[
nIndex1
].
contentId
==
contentId
){
hitFlg
=
true
;
break
;
}
}
if
(
hitFlg
==
false
){
var
obj
=
new
ContentStatusEntity
();
obj
.
contentId
=
contentId
;
obj
.
status
=
0
;
//read
// Add object to client
arr
.
push
(
obj
);
//バックアップ対象フラグセット
ClientData
.
isChangedContentStatus
(
true
);
//初期化したほうが良い?
var
newArray
=
[];
ClientData
.
ContentStatusData
(
newArray
);
ClientData
.
ContentStatusData
(
arr
);
}
};
HEADER
.
getContentStatus
=
function
(
contentId
)
{
HEADER
.
getContentStatus
=
function
(
contentId
)
{
var
arr
=
ClientData
.
ContentStatusData
();
var
arr
=
ClientData
.
ContentStatusData
();
for
(
var
nIndex1
=
0
;
nIndex1
<
arr
.
length
;
nIndex1
++
)
{
for
(
var
nIndex1
=
0
;
nIndex1
<
arr
.
length
;
nIndex1
++
)
{
...
...
abvw/js/history.js
View file @
e3e221f1
...
@@ -39,7 +39,7 @@ $(document).ready(function(){
...
@@ -39,7 +39,7 @@ $(document).ready(function(){
ClientData
.
BookmarkScreen
(
COMMON
.
ScreenIds
.
History
);
ClientData
.
BookmarkScreen
(
COMMON
.
ScreenIds
.
History
);
if
(
ClientData
.
requirePasswordChange
()
!=
1
){
if
(
ClientData
.
requirePasswordChange
()
!=
1
){
if
(
ClientData
.
ReadingContentIds
()
==
null
||
ClientData
.
ReadingContentIds
()
==
'undefined'
||
ClientData
.
ReadingContentIds
().
length
==
0
){
if
(
ClientData
.
ReadingContentIds
()
==
null
||
ClientData
.
ReadingContentIds
()
==
'undefined'
||
ClientData
.
ReadingContentIds
().
length
==
0
){
}
else
{
}
else
{
HISTORY
.
syncReadingContent
();
HISTORY
.
syncReadingContent
();
}
}
...
@@ -128,123 +128,110 @@ $(document).ready(function(){
...
@@ -128,123 +128,110 @@ $(document).ready(function(){
///Render Content
///Render Content
HISTORY
.
renderContent
=
function
(
id
,
text
,
division
,
type
,
order
,
from
,
to
,
cateid
,
grpid
)
{
HISTORY
.
renderContent
=
function
(
id
,
text
,
division
,
type
,
order
,
from
,
to
,
cateid
,
grpid
)
{
var
params
=
{
var
params
=
{
sid
:
id
,
sid
:
id
,
searchText
:
text
,
searchText
:
text
,
searchDivision
:
division
,
searchDivision
:
division
,
sortType
:
type
,
sortType
:
type
,
sortOrder
:
order
,
sortOrder
:
order
,
//recordFrom: from,
//recordFrom: from,
//recordTo: to,
//recordTo: to,
categoryId
:
cateid
,
categoryId
:
cateid
,
groupId
:
grpid
groupId
:
grpid
};
};
AVWEB
.
avwCmsApiSync
(
ClientData
.
userInfo_accountPath
(),
'webContentList'
,
'POST'
,
params
,
AVWEB
.
avwCmsApiSync
(
function
(
data
)
{
ClientData
.
userInfo_accountPath
(),
'webContentList'
,
$
(
'#content-grid'
).
html
(
''
);
'POST'
,
//var htmlTemp = "";
params
,
for
(
var
i
=
0
;
i
<
data
.
contentList
.
length
;
i
++
)
{
function
(
data
)
{
post
=
data
.
contentList
[
i
];
$
(
'#content-grid'
).
html
(
''
);
//var htmlTemp = "";
var
outputDate
=
COMMON
.
formatDeliveryDate
(
post
.
contentDeliveryDate
);
for
(
var
i
=
0
;
i
<
data
.
contentList
.
length
;
i
++
)
{
//renderViewDate
post
=
data
.
contentList
[
i
];
var
viewdate
=
HISTORY
.
renderViewDate
(
post
.
contentId
);
var
outputDate
=
COMMON
.
formatDeliveryDate
(
post
.
contentDeliveryDate
);
if
(
viewdate
!=
null
&&
viewdate
!=
'undefined'
&&
viewdate
!=
''
)
{
//renderViewDate
var
htmlTemp
=
'<section class="sectionhistory">'
var
viewdate
=
HISTORY
.
renderViewDate
(
post
.
contentId
);
+
' <div class="cnt_section_list">'
+
' <a class="img">'
// save alert message level
+
' <canvas height="110" width="150" id="content-thumbnail'
+
post
.
contentId
+
'" contentid="'
+
post
.
contentId
+
'" style="display:none;">'
LIMIT_ACCESS_CONTENT
.
messageLevel
[
post
.
contentId
]
=
{
alertMessageLevel
:
post
.
alertMessageLevel
,
alertMessage
:
post
.
alertMessage
};
+
' </canvas>'
+
' <img id="imgloading'
+
post
.
contentId
+
'" src="./img/data_loading.gif" height="25px" width="25px" style="padding: 46px; "/>'
if
(
viewdate
!=
null
&&
viewdate
!=
'undefined'
&&
viewdate
!=
''
)
{
+
' </a>'
/*
+
' <div class="text">'
var htmlTemp = '<section class="sectionhistory">'
+
' <a id="title'
+
post
.
contentId
+
'" class="name dialog" contentid="'
+
post
.
contentId
+
'">'
+ ' <div class="cnt_section_list">'
+
' <img class="listIcon" src="'
+
HEADER
.
getIconTypeContent
(
post
.
contentType
)
+
'" width="20" height="20">'
+ ' <a class="img">'
+
COMMON
.
truncate
(
COMMON
.
htmlEncode
(
post
.
contentTitle
),
20
)
+ ' <canvas height="110" width="150" id="content-thumbnail' + post.contentId + '" contentid="' + post.contentId + '" style="display:none;">'
+
' </a>'
+ ' </canvas>'
+
' <div class="info">'
+ ' <img id="imgloading' + post.contentId + '" src="./img/data_loading.gif" height="25px" width="25px" style="padding: 46px; "/>'
+
' <ul class="date">'
+ ' </a>'
+
' <li><span class="lang" lang="txtPubDt"> </span> : '
+
outputDate
+
'</li>'
+ ' <div class="text">'
+
' <li><span class="lang" lang="txtViewDt"> </span>:<span id="lblVdate'
+
post
.
contentId
+
'"> </span></li>'
+ ' <a id="title' + post.contentId + '" class="name dialog" contentid="' + post.contentId + '">'
+
' </ul>'
+ ' <img class="listIcon" src="' + HEADER.getIconTypeContent(post.contentType)+'" width="20" height="20">'
+
' <ul class="pic">'
+ COMMON.truncate(COMMON.htmlEncode(post.contentTitle), 20)
+
' <li><img src="'
+
COMMON
.
DEFAULT_IMG_OPTION_MEMO
+
'" id="imgMemo'
+
post
.
contentId
+
'" class="sticker" /></li>'
+ ' </a>'
+
' <li><img src="'
+
COMMON
.
DEFAULT_IMG_OPTION_MARKING
+
'" id="imgBookMark'
+
post
.
contentId
+
'" class="pen" /></li>'
+ ' <div class="info">'
+
' <li><ul class="iconList">{share}<li><a class="read lang button-details" contentid="'
+
post
.
contentId
+
'" lang="txtRead">'
+
I18N
.
i18nText
(
"txtRead"
)
+
'</a></li></ul></li>'
+ ' <ul class="date">'
+
' </ul>'
+ ' <li><span class="lang" lang="txtPubDt"> </span> : ' + outputDate + '</li>'
+
' </div>'
+ ' <li><span class="lang" lang="txtViewDt"> </span>:<span id="lblVdate' + post.contentId + '"> </span></li>'
+
' </div>'
+ ' </ul>'
+
' </div>'
+ ' <ul class="pic">'
+
'</section>'
;
+ ' <li><img src="' + COMMON.DEFAULT_IMG_OPTION_MEMO + '" id="imgMemo' + post.contentId + '" class="sticker" /></li>'
+ ' <li><img src="' + COMMON.DEFAULT_IMG_OPTION_MARKING + '" id="imgBookMark' + post.contentId + '" class="pen" /></li>'
+ ' <li><ul class="iconList">{share}<li><a class="read lang button-details" contentid="' + post.contentId + '" lang="txtRead">'+I18N.i18nText("txtRead")+'</a></li></ul></li>'
+ ' </ul>'
+ ' </div>'
+ ' </div>'
+ ' </div>'
+ '</section>';
var shareHtml = "";
var shareHtml = "";
if( post.readerShare == '1' ){
if( post.readerShare == '1' ){
shareHtml ='<li><a class="read lang button-share" contentid="' + post.contentId + '" lang="txtShare">'+I18N.i18nText("txtShare")+'</a></li>';
shareHtml ='<li><a class="read lang button-share" contentid="' + post.contentId + '" lang="txtShare">'+I18N.i18nText("txtShare")+'</a></li>';
}
}
htmlTemp = htmlTemp.replace(/\{share\}/g, shareHtml);
htmlTemp = htmlTemp.replace(/\{share\}/g, shareHtml);
*/
//効率化
//効率化
//$('#content-grid').append(htmlTemp);
//$('#content-grid').append(htmlTemp);
}
}
//assign thumbnail to array
var
formatThumbnail
=
post
.
contentThumbnail
;
if
((
formatThumbnail
!=
null
)
&&
(
formatThumbnail
!=
'undefined'
)
&&
(
formatThumbnail
!=
''
)){
for
(
var
i
=
0
;
i
<
data
.
contentList
.
length
;
i
++
)
{
formatThumbnail
=
COMMON
.
formatStringBase64
(
formatThumbnail
);
post
=
data
.
contentList
[
i
];
}
var
viewdate
=
HISTORY
.
renderViewDate
(
post
.
contentId
);
HISTORY
.
thumbnailArr
.
push
({
contentId
:
post
.
contentId
,
thumbnail
:
formatThumbnail
});
// save alert message level
LIMIT_ACCESS_CONTENT
.
messageLevel
[
post
.
contentId
]
=
{
alertMessageLevel
:
post
.
alertMessageLevel
,
alertMessage
:
post
.
alertMessage
};
HISTORY
.
contentTypeArr
.
push
({
contentId
:
post
.
contentId
,
contentType
:
post
.
contentType
});
if
(
viewdate
!=
null
&&
viewdate
!=
'undefined'
&&
viewdate
!=
''
)
{
//assign version to array
COMMON
.
resourceVersionArr
.
push
({
contentid
:
post
.
contentId
,
resourceversion
:
post
.
resourceVersion
});
//assign thumbnail to array
var
formatThumbnail
=
post
.
contentThumbnail
;
//assign meta version to array
if
((
formatThumbnail
!=
null
)
&&
(
formatThumbnail
!=
'undefined'
)
&&
(
formatThumbnail
!=
''
)){
COMMON
.
metaVersionArr
.
push
({
contentid
:
post
.
contentId
,
metaversion
:
post
.
metaVersion
});
formatThumbnail
=
COMMON
.
formatStringBase64
(
formatThumbnail
);
}
//Check if content has marking or memo
HISTORY
.
checkContentMarkingMemoOption
(
post
.
contentId
);
HISTORY
.
thumbnailArr
.
push
({
contentId
:
post
.
contentId
,
thumbnail
:
formatThumbnail
});
HISTORY
.
addReadContentToArray
(
post
.
contentId
,
post
.
resourceVersion
,
post
.
metaVersion
,
post
.
contentThumbnail
,
post
.
contentTitle
,
HISTORY
.
returnContentTitleKana
(
post
.
contentId
),
post
.
contentDeliveryDate
,
post
.
contentType
,
post
.
readerShare
);
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Assign content type to array to manage.
//assign content type to array
}
HISTORY
.
contentTypeArr
.
push
({
contentId
:
post
.
contentId
,
contentType
:
post
.
contentType
});
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Assign content type to array to manage.
}
//効率化
if
(
data
.
recordFrom
)
{
//Check if user has read this content or not.
ClientData
.
searchCond_recordFrom
(
data
.
recordFrom
);
//HISTORY.checkUserHasReadContent(post.contentId, post.resourceVersion, post.metaVersion);
}
if
(
data
.
recordTo
)
{
//assign version to array
ClientData
.
searchCond_recordTo
(
data
.
recordTo
);
COMMON
.
resourceVersionArr
.
push
({
contentid
:
post
.
contentId
,
resourceversion
:
post
.
resourceVersion
});
}
HISTORY
.
totalPage
=
data
.
totalRecord
;
//assign meta version to array
//Render Page number
COMMON
.
metaVersionArr
.
push
({
contentid
:
post
.
contentId
,
metaversion
:
post
.
metaVersion
});
HISTORY
.
reRenderPageNumber
(
HISTORY
.
totalPage
,
HISTORY
.
totalPage
);
//Check if content has marking or memo
},
null
HISTORY
.
checkContentMarkingMemoOption
(
post
.
contentId
);
);
//効率化
//$('#lblVdate' + post.contentId).html(viewdate);
HISTORY
.
addReadContentToArray
(
post
.
contentId
,
post
.
resourceVersion
,
post
.
metaVersion
,
post
.
contentThumbnail
,
post
.
contentTitle
,
HISTORY
.
returnContentTitleKana
(
post
.
contentId
),
post
.
contentDeliveryDate
,
post
.
contentType
,
post
.
readerShare
);
//HISTORY.showContentThumbnail();
}
}
if
(
data
.
recordFrom
)
{
ClientData
.
searchCond_recordFrom
(
data
.
recordFrom
);
}
if
(
data
.
recordTo
)
{
ClientData
.
searchCond_recordTo
(
data
.
recordTo
);
}
HISTORY
.
totalPage
=
data
.
totalRecord
;
//Render Page number
HISTORY
.
reRenderPageNumber
(
HISTORY
.
totalPage
,
HISTORY
.
totalPage
);
},
null
);
};
};
//Handle language
//Handle language
...
@@ -738,43 +725,42 @@ HISTORY.checkContentMarkingMemoOption = function(contentId){
...
@@ -738,43 +725,42 @@ HISTORY.checkContentMarkingMemoOption = function(contentId){
//Check if User has read content
//Check if User has read content
HISTORY
.
checkUserHasReadContent
=
function
(
contId
,
resourceVer
,
metaVer
){
HISTORY
.
checkUserHasReadContent
=
function
(
contId
,
resourceVer
,
metaVer
){
var
imgThumb
=
new
Image
();
var
imgThumb
=
new
Image
();
//imgThumb.src = HISTORY.returnThumbnail(contId);
//imgThumb.src = HISTORY.returnThumbnail(contId);
var
imgIconNew
=
new
Image
();
var
imgIconNew
=
new
Image
();
//imgIconNew.src = COMMON.DEFAULT_IMG_CONTENT_NEW;
//imgIconNew.src = COMMON.DEFAULT_IMG_CONTENT_NEW;
var
imgIconEdit
=
new
Image
();
var
imgIconEdit
=
new
Image
();
//imgIconEdit.src = COMMON.DEFAULT_IMG_CONTENT_EDIT;
//imgIconEdit.src = COMMON.DEFAULT_IMG_CONTENT_EDIT;
var
c
=
document
.
getElementById
(
'content-thumbnail'
+
contId
);
var
c
=
document
.
getElementById
(
'content-thumbnail'
+
contId
);
var
ctx
=
c
.
getContext
(
'2d'
);
var
ctx
=
c
.
getContext
(
'2d'
);
var
readFlg
=
false
;
var
readFlg
=
false
;
var
versionArr
=
ClientData
.
ResourceVersion
();
var
versionArr
=
ClientData
.
ResourceVersion
();
var
metaArr
=
ClientData
.
MetaVersion
();
var
metaArr
=
ClientData
.
MetaVersion
();
var
readArr
=
ClientData
.
ReadingContentIds
();
var
readArr
=
ClientData
.
ReadingContentIds
();
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Declare variable handle contentType and Thumbnail of content.
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Declare variable handle contentType and Thumbnail of content.
var
contentThumbnail
=
HISTORY
.
returnThumbnail
(
contId
);
var
contentThumbnail
=
HISTORY
.
returnThumbnail
(
contId
);
var
contentType
=
HISTORY
.
returnContentType
(
contId
);
var
contentType
=
HISTORY
.
returnContentType
(
contId
);
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Declare variable handle contentType and Thumbnail of content.
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Declare variable handle contentType and Thumbnail of content.
//コンテンツ状態バックアップ対応
//コンテンツ状態バックアップ対応
var
bkContentStatus
=
HEADER
.
getContentStatus
(
contId
);
var
bkContentStatus
=
HEADER
.
getContentStatus
(
contId
);
var
contentStatus
=
null
;
var
contentStatus
=
null
;
if
(
bkContentStatus
==
0
){
if
(
bkContentStatus
==
0
){
contentStatus
=
0
;
//READ
contentStatus
=
0
;
//READ
}
else
if
(
bkContentStatus
==
1
||
bkContentStatus
==
2
||
bkContentStatus
==
3
){
}
else
if
(
bkContentStatus
==
1
||
bkContentStatus
==
2
||
bkContentStatus
==
4
){
contentStatus
=
1
;
//NEW
contentStatus
=
1
;
//NEW
}
else
if
(
bkContentStatus
==
5
){
}
else
if
(
bkContentStatus
==
3
){
contentStatus
=
2
;
//UPDATE
contentStatus
=
2
;
//UPDATE
}
}
if
(
readArr
==
null
||
readArr
<=
0
||
readArr
==
'undefined'
){
if
(
readArr
==
null
||
readArr
<=
0
||
readArr
==
'undefined'
){
imgThumb
.
onload
=
function
(){
imgThumb
.
onload
=
function
(){
var
resizeImg
=
HISTORY
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
var
resizeImg
=
HISTORY
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
ctx
.
drawImage
(
imgThumb
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
,
resizeImg
[
0
],
resizeImg
[
1
]);
ctx
.
drawImage
(
imgThumb
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
,
resizeImg
[
0
],
resizeImg
[
1
]);
...
@@ -790,27 +776,26 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){
...
@@ -790,27 +776,26 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){
};
};
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
if
(
src
!=
''
){
if
(
src
!=
''
){
imgThumb
.
src
=
src
;
imgThumb
.
src
=
src
;
}
}
}
}
}
else
{
}
else
{
imgThumb
.
src
=
contentThumbnail
;
imgThumb
.
src
=
contentThumbnail
;
}
}
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
}
//未読はここで終了
else
{
return
;
//Check if user has read this content or not
for
(
var
nIndex1
=
0
;
nIndex1
<
ClientData
.
ReadingContentIds
().
length
;
nIndex1
++
)
{
}
else
{
if
(
ClientData
.
ReadingContentIds
()[
nIndex1
].
contentid
==
contId
){
//Check if user has read this content or not
imgThumb
.
onload
=
function
(){
for
(
var
nIndex1
=
0
;
nIndex1
<
readArr
.
length
;
nIndex1
++
)
{
var
resizeImg
=
HISTORY
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
if
(
readArr
[
nIndex1
].
contentid
==
contId
){
imgThumb
.
onload
=
function
(){
var
resizeImg
=
HISTORY
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
ctx
.
drawImage
(
imgThumb
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
,
resizeImg
[
0
],
resizeImg
[
1
]);
ctx
.
drawImage
(
imgThumb
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
,
resizeImg
[
0
],
resizeImg
[
1
]);
if
(
contentStatus
==
1
){
if
(
contentStatus
==
1
){
...
@@ -820,32 +805,29 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){
...
@@ -820,32 +805,29 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){
};
};
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
}
else
if
(
contentStatus
==
2
){
}
else
if
(
contentStatus
==
2
){
imgIconEdit
.
onload
=
function
(){
imgIconEdit
.
onload
=
function
(){
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
HISTORY
.
showContentThumbnail
(
contId
);
HISTORY
.
showContentThumbnail
(
contId
);
};
};
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
}
else
{
}
else
{
HISTORY
.
showContentThumbnail
(
contId
);
HISTORY
.
showContentThumbnail
(
contId
);
}
}
};
};
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
if
(
src
!=
''
){
if
(
src
!=
''
){
imgThumb
.
src
=
src
;
imgThumb
.
src
=
src
;
}
}
}
}
}
else
{
}
else
{
imgThumb
.
src
=
contentThumbnail
;
imgThumb
.
src
=
contentThumbnail
;
}
}
readFlg
=
true
;
break
;
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
}
else
{
readFlg
=
true
;
/*
break
;
}
else
{
imgThumb.onload = function(){
imgThumb.onload = function(){
var resizeImg = HISTORY.resizeResourceThumbnail(imgThumb, c.width, c.height);
var resizeImg = HISTORY.resizeResourceThumbnail(imgThumb, c.width, c.height);
ctx.drawImage(imgThumb, c.width/2 - resizeImg[0]/2, 0, resizeImg[0], resizeImg[1]);
ctx.drawImage(imgThumb, c.width/2 - resizeImg[0]/2, 0, resizeImg[0], resizeImg[1]);
...
@@ -860,112 +842,151 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){
...
@@ -860,112 +842,151 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){
HISTORY.showContentThumbnail(contId);
HISTORY.showContentThumbnail(contId);
}
}
};
};
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
if(contentThumbnail == '' || contentThumbnail == null){
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
if(!COMMON.isPdfContent(contentType)){
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
var src = HEADER.getThumbnailForOtherType(contentType);
if
(
src
!=
''
){
if( src != '' ){
imgThumb
.
src
=
src
;
imgThumb.src = src;
}
}
}
}
}
else
{
}else{
imgThumb
.
src
=
contentThumbnail
;
imgThumb.src = contentThumbnail;
}
}
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
*/
}
}
}
}
}
}
//Check if resource version has change
//Check if resource version has change
if
(
readFlg
){
if
(
readFlg
){
if
(
versionArr
==
null
||
versionArr
<=
0
||
versionArr
==
'undefined'
){
if
(
versionArr
==
null
||
versionArr
<=
0
||
versionArr
==
'undefined'
){
}
}
else
{
else
{
for
(
var
nIndex2
=
0
;
nIndex2
<
versionArr
.
length
;
nIndex2
++
){
for
(
var
nIndex2
=
0
;
nIndex2
<
versionArr
.
length
;
nIndex2
++
){
if
(
versionArr
[
nIndex2
].
contentid
==
contId
){
if
(
versionArr
[
nIndex2
].
contentid
==
contId
){
if
(
versionArr
[
nIndex2
].
resourceversion
!=
resourceVer
){
if
(
versionArr
[
nIndex2
].
resourceversion
!=
resourceVer
){
imgThumb
.
onload
=
function
(){
imgThumb
.
onload
=
function
(){
var
resizeImg
=
HISTORY
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
var
resizeImg
=
HISTORY
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
ctx
.
drawImage
(
imgThumb
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
,
resizeImg
[
0
],
resizeImg
[
1
]);
ctx
.
drawImage
(
imgThumb
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
,
resizeImg
[
0
],
resizeImg
[
1
]);
if
(
contentStatus
==
1
){
if
(
contentStatus
==
1
){
HISTORY
.
showContentThumbnail
(
contId
);
imgIconNew
.
onload
=
function
(){
imgIconNew
.
onload
=
function
(){
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
HISTORY
.
showContentThumbnail
(
contId
);
};
};
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
}
else
{
}
else
{
HISTORY
.
showContentThumbnail
(
contId
);
imgIconEdit
.
onload
=
function
(){
imgIconEdit
.
onload
=
function
(){
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
HISTORY
.
showContentThumbnail
(
contId
);
};
};
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
}
};
//バックアップデータのステータス更新
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
HEADER
.
setContentStatus
(
contId
,
3
);
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
}
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
};
if
(
src
!=
''
){
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
imgThumb
.
src
=
src
;
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
}
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
}
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
}
else
{
if
(
src
!=
''
){
imgThumb
.
src
=
contentThumbnail
;
imgThumb
.
src
=
src
;
}
}
}
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
}
else
{
break
;
imgThumb
.
src
=
contentThumbnail
;
}
}
}
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
//break;
}
break
;
}
}
}
}
}
if
(
metaArr
==
null
||
metaArr
<=
0
||
metaArr
==
'undefined'
){
if
(
metaArr
==
null
||
metaArr
<=
0
||
metaArr
==
'undefined'
){
}
}
else
{
else
{
for
(
var
nIndex2
=
0
;
nIndex2
<
metaArr
.
length
;
nIndex2
++
){
for
(
var
nIndex2
=
0
;
nIndex2
<
metaArr
.
length
;
nIndex2
++
){
if
(
metaArr
[
nIndex2
].
contentid
==
contId
){
if
(
metaArr
[
nIndex2
].
contentid
==
contId
){
if
(
metaArr
[
nIndex2
].
metaversion
!=
metaVer
){
if
(
metaArr
[
nIndex2
].
metaversion
!=
metaVer
){
imgThumb
.
onload
=
function
(){
imgThumb
.
onload
=
function
(){
var
resizeImg
=
HISTORY
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
var
resizeImg
=
HISTORY
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
ctx
.
drawImage
(
imgThumb
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
,
resizeImg
[
0
],
resizeImg
[
1
]);
ctx
.
drawImage
(
imgThumb
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
,
resizeImg
[
0
],
resizeImg
[
1
]);
if
(
contentStatus
==
1
){
if
(
contentStatus
==
1
){
HISTORY
.
showContentThumbnail
(
contId
);
imgIconNew
.
onload
=
function
(){
imgIconNew
.
onload
=
function
(){
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
HISTORY
.
showContentThumbnail
(
contId
);
};
};
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
}
else
{
}
else
{
HISTORY
.
showContentThumbnail
(
contId
);
imgIconEdit
.
onload
=
function
(){
imgIconEdit
.
onload
=
function
(){
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
HISTORY
.
showContentThumbnail
(
contId
);
};
};
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
//バックアップデータのステータス更新
HEADER
.
setContentStatus
(
contId
,
3
);
}
};
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
if
(
src
!=
''
){
imgThumb
.
src
=
src
;
}
}
}
};
}
else
{
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
imgThumb
.
src
=
contentThumbnail
;
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
}
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
//break;
if
(
src
!=
''
){
}
imgThumb
.
src
=
src
;
break
;
}
}
}
}
else
{
imgThumb
.
src
=
contentThumbnail
;
}
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
break
;
}
}
}
}
}
}
readFlg
=
false
;
//readFlg = false;
}
else
{
imgThumb
.
onload
=
function
(){
var
resizeImg
=
HISTORY
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
ctx
.
drawImage
(
imgThumb
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
,
resizeImg
[
0
],
resizeImg
[
1
]);
if
(
contentStatus
==
null
||
contentStatus
==
1
){
imgIconNew
.
onload
=
function
(){
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
HISTORY
.
showContentThumbnail
(
contId
);
};
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
}
else
if
(
contentStatus
==
2
){
imgIconEdit
.
onload
=
function
(){
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
HISTORY
.
showContentThumbnail
(
contId
);
};
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
}
else
{
HISTORY
.
showContentThumbnail
(
contId
);
}
};
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
if
(
src
!=
''
){
imgThumb
.
src
=
src
;
}
}
}
else
{
imgThumb
.
src
=
contentThumbnail
;
}
}
}
};
};
...
@@ -1474,7 +1495,7 @@ HISTORY.renderContentAfterSort = function(contentSortArr){
...
@@ -1474,7 +1495,7 @@ HISTORY.renderContentAfterSort = function(contentSortArr){
$
(
'#lblVdate'
+
post
.
contentid
).
html
(
viewdate
);
$
(
'#lblVdate'
+
post
.
contentid
).
html
(
viewdate
);
HISTORY
.
showContentThumbnail
();
//
HISTORY.showContentThumbnail();
}
}
};
};
...
...
abvw/js/home.js
View file @
e3e221f1
...
@@ -1889,260 +1889,305 @@ HOME.checkContentMarkingMemoOption = function(contentId) {
...
@@ -1889,260 +1889,305 @@ HOME.checkContentMarkingMemoOption = function(contentId) {
//Check if User has read content
//Check if User has read content
HOME
.
checkUserHasReadContent
=
function
(
contId
,
resourceVer
,
metaVer
)
{
HOME
.
checkUserHasReadContent
=
function
(
contId
,
resourceVer
,
metaVer
)
{
var
imgThumb
=
new
Image
();
var
imgThumb
=
new
Image
();
//imgThumb.src = HOME.returnThumbnail(contId);
//imgThumb.src = HOME.returnThumbnail(contId);
var
imgIconNew
=
new
Image
();
var
imgIconNew
=
new
Image
();
//imgIconNew.src = COMMON.DEFAULT_IMG_CONTENT_NEW;
//imgIconNew.src = COMMON.DEFAULT_IMG_CONTENT_NEW;
var
imgIconEdit
=
new
Image
();
var
imgIconEdit
=
new
Image
();
//imgIconEdit.src = COMMON.DEFAULT_IMG_CONTENT_EDIT;
//imgIconEdit.src = COMMON.DEFAULT_IMG_CONTENT_EDIT;
var
c
=
document
.
getElementById
(
'content-thumbnail'
+
contId
);
var
c
=
document
.
getElementById
(
'content-thumbnail'
+
contId
);
var
ctx
=
c
.
getContext
(
'2d'
);
var
ctx
=
c
.
getContext
(
'2d'
);
var
readFlg
=
false
;
var
versionArr
=
ClientData
.
ResourceVersion
();
var
metaArr
=
ClientData
.
MetaVersion
();
var
readArr
=
ClientData
.
ReadingContentIds
();
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Declare variable handle contentType and Thumbnail of content.
var
contentThumbnail
=
HOME
.
returnThumbnail
(
contId
);
var
contentType
=
HOME
.
returnContentType
(
contId
);
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Declare variable handle contentType and Thumbnail of content.
//コンテンツ状態バックアップ対応
var
bkContentStatus
=
HEADER
.
getContentStatus
(
contId
);
//console.log("contId:" + contId + " bkStatus:" + bkContentStatus);
var
contentStatus
=
null
;
if
(
bkContentStatus
==
0
){
contentStatus
=
0
;
//READ
}
else
if
(
bkContentStatus
==
1
||
bkContentStatus
==
2
||
bkContentStatus
==
4
){
contentStatus
=
1
;
//NEW
}
else
if
(
bkContentStatus
==
3
){
contentStatus
=
2
;
//UPDATE
}
var
readFlg
=
false
;
if
(
readArr
==
null
||
readArr
<=
0
||
readArr
==
'undefined'
)
{
var
versionArr
=
ClientData
.
ResourceVersion
();
imgThumb
.
onload
=
function
()
{
var
metaArr
=
ClientData
.
MetaVersion
();
var
resizeImg
=
HOME
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
var
readArr
=
ClientData
.
ReadingContentIds
();
ctx
.
drawImage
(
imgThumb
,
(
c
.
width
/
2
)
-
(
resizeImg
[
0
]
/
2
)
+
4
,
c
.
height
-
resizeImg
[
1
]
+
4
,
resizeImg
[
0
],
resizeImg
[
1
]);
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Declare variable handle contentType and Thumbnail of content.
if
(
contentStatus
==
null
||
contentStatus
==
1
){
var
contentThumbnail
=
HOME
.
returnThumbnail
(
contId
);
imgIconNew
.
onload
=
function
()
{
var
contentType
=
HOME
.
returnContentType
(
contId
);
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Declare variable handle contentType and Thumbnail of content.
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
//コンテンツ状態バックアップ対応
});
var
bkContentStatus
=
HEADER
.
getContentStatus
(
contId
);
};
console
.
log
(
"contId:"
+
contId
+
" bkStatus:"
+
bkContentStatus
);
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
var
contentStatus
=
null
;
}
else
{
if
(
bkContentStatus
==
0
){
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
contentStatus
=
0
;
//READ
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
}
else
if
(
bkContentStatus
==
1
||
bkContentStatus
==
2
||
bkContentStatus
==
3
){
});
contentStatus
=
1
;
//NEW
}
}
else
if
(
bkContentStatus
==
5
){
};
contentStatus
=
2
;
//UPDATE
}
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
if
(
readArr
==
null
||
readArr
<=
0
||
readArr
==
'undefined'
)
{
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
imgThumb
.
onload
=
function
()
{
if
(
src
!=
''
){
var
resizeImg
=
HOME
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
imgThumb
.
src
=
src
;
ctx
.
drawImage
(
imgThumb
,
(
c
.
width
/
2
)
-
(
resizeImg
[
0
]
/
2
)
+
4
,
c
.
height
-
resizeImg
[
1
]
+
4
,
resizeImg
[
0
],
resizeImg
[
1
]);
}
}
if
(
contentStatus
==
null
||
contentStatus
==
1
){
}
else
{
imgIconNew
.
onload
=
function
()
{
imgThumb
.
src
=
contentThumbnail
;
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
}
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
//未読はここで終了
});
return
;
};
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
}
else
{
}
else
{
//Check if user has read this content or not
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
for
(
var
nIndex1
=
0
;
nIndex1
<
readArr
.
length
;
nIndex1
++
)
{
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
if
(
readArr
[
nIndex1
].
contentid
==
contId
)
{
});
//console.log("ClientData.ReadingContentIds:" + contId + " status:" + contentStatus);
}
imgThumb
.
onload
=
function
()
{
var
resizeImg
=
HOME
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
};
ctx
.
drawImage
(
imgThumb
,
(
c
.
width
/
2
)
-
(
resizeImg
[
0
]
/
2
)
+
4
,
c
.
height
-
resizeImg
[
1
]
+
4
,
resizeImg
[
0
],
resizeImg
[
1
]);
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if
(
contentStatus
==
1
){
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
imgIconNew
.
onload
=
function
()
{
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
if
(
src
!=
''
){
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
imgThumb
.
src
=
src
;
});
}
};
}
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
}
else
{
}
else
if
(
contentStatus
==
2
){
imgThumb
.
src
=
contentThumbnail
;
imgIconEdit
.
onload
=
function
()
{
}
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
}
});
else
{
};
//Check if user has read this content or not
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
for
(
var
nIndex1
=
0
;
nIndex1
<
ClientData
.
ReadingContentIds
().
length
;
nIndex1
++
)
{
}
else
{
if
(
ClientData
.
ReadingContentIds
()[
nIndex1
].
contentid
==
contId
)
{
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
imgThumb
.
onload
=
function
()
{
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
var
resizeImg
=
HOME
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
});
ctx
.
drawImage
(
imgThumb
,
(
c
.
width
/
2
)
-
(
resizeImg
[
0
]
/
2
)
+
4
,
c
.
height
-
resizeImg
[
1
]
+
4
,
resizeImg
[
0
],
resizeImg
[
1
]);
}
};
if
(
contentStatus
==
1
){
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
imgIconNew
.
onload
=
function
()
{
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
if
(
src
!=
''
){
});
imgThumb
.
src
=
src
;
};
}
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
}
}
else
if
(
contentStatus
==
2
){
}
else
{
imgIconEdit
.
onload
=
function
()
{
imgThumb
.
src
=
contentThumbnail
;
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
}
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
readFlg
=
true
;
});
break
;
};
}
else
{
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
/*
}
else
{
imgThumb.onload = function () {
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
var resizeImg = HOME.resizeResourceThumbnail(imgThumb, c.width, c.height);
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
ctx.drawImage(imgThumb, (c.width / 2) - (resizeImg[0] / 2) + 4, c.height - resizeImg[1] + 4, resizeImg[0], resizeImg[1]);
});
}
if(contentStatus == null || contentStatus == 1){
imgIconNew.onload = function () {
};
ctx.drawImage(imgIconNew, c.width / 2 - resizeImg[0] / 2, c.height - resizeImg[1]);
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
$("#loadingIcon" + contId).fadeOut('slow', function () {
$('#content-thumbnail' + contId).fadeIn('slow');
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
});
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
};
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
imgIconNew.src = COMMON.DEFAULT_IMG_CONTENT_NEW;
if
(
src
!=
''
){
} else {
imgThumb
.
src
=
src
;
$("#loadingIcon" + contId).fadeOut('slow', function () {
}
$('#content-thumbnail' + contId).fadeIn('slow');
}
});
}
else
{
}
imgThumb
.
src
=
contentThumbnail
;
};
}
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if(contentThumbnail == '' || contentThumbnail == null){
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if(!COMMON.isPdfContent(contentType)){
readFlg
=
true
;
var src = HEADER.getThumbnailForOtherType(contentType);
break
;
if( src != '' ){
}
imgThumb.src = src;
else
{
}
imgThumb
.
onload
=
function
()
{
}
var
resizeImg
=
HOME
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
}else{
ctx
.
drawImage
(
imgThumb
,
(
c
.
width
/
2
)
-
(
resizeImg
[
0
]
/
2
)
+
4
,
c
.
height
-
resizeImg
[
1
]
+
4
,
resizeImg
[
0
],
resizeImg
[
1
]);
imgThumb.src = contentThumbnail;
}
if
(
contentStatus
==
null
||
contentStatus
==
1
){
break;
imgIconNew
.
onload
=
function
()
{
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
*/
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
}
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
}
});
}
};
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
}
else
{
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
});
}
};
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
if
(
src
!=
''
){
imgThumb
.
src
=
src
;
}
}
}
else
{
imgThumb
.
src
=
contentThumbnail
;
}
break
;
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
}
}
}
//Check if resource version has change
//Check if resource version has change
if
(
readFlg
)
{
if
(
readFlg
)
{
if
(
versionArr
==
null
||
versionArr
<=
0
||
versionArr
==
'undefined'
)
{
if
(
versionArr
==
null
||
versionArr
<=
0
||
versionArr
==
'undefined'
)
{
}
}
else
{
else
{
for
(
var
nIndex2
=
0
;
nIndex2
<
versionArr
.
length
;
nIndex2
++
)
{
for
(
var
nIndex2
=
0
;
nIndex2
<
versionArr
.
length
;
nIndex2
++
)
{
if
(
versionArr
[
nIndex2
].
contentid
==
contId
)
{
if
(
versionArr
[
nIndex2
].
contentid
==
contId
)
{
if
(
versionArr
[
nIndex2
].
resourceversion
!=
resourceVer
)
{
if
(
versionArr
[
nIndex2
].
resourceversion
!=
resourceVer
)
{
imgThumb
.
onload
=
function
()
{
imgThumb
.
onload
=
function
()
{
var
resizeImg
=
HOME
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
var
resizeImg
=
HOME
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
ctx
.
drawImage
(
imgThumb
,
(
c
.
width
/
2
)
-
(
resizeImg
[
0
]
/
2
)
+
4
,
c
.
height
-
resizeImg
[
1
]
+
4
,
resizeImg
[
0
],
resizeImg
[
1
]);
ctx
.
drawImage
(
imgThumb
,
(
c
.
width
/
2
)
-
(
resizeImg
[
0
]
/
2
)
+
4
,
c
.
height
-
resizeImg
[
1
]
+
4
,
resizeImg
[
0
],
resizeImg
[
1
]);
if
(
contentStatus
==
1
){
if
(
contentStatus
==
1
){
imgIconNew
.
onload
=
function
()
{
imgIconNew
.
onload
=
function
()
{
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
});
});
};
};
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
}
else
{
}
else
{
imgIconEdit
.
onload
=
function
()
{
imgIconEdit
.
onload
=
function
()
{
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
});
});
};
};
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
}
//バックアップデータのステータス更新
};
HEADER
.
setContentStatus
(
contId
,
3
);
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
}
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
};
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
if
(
src
!=
''
){
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
imgThumb
.
src
=
src
;
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
}
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
}
if
(
src
!=
''
){
}
else
{
imgThumb
.
src
=
src
;
imgThumb
.
src
=
contentThumbnail
;
}
}
}
}
else
{
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
imgThumb
.
src
=
contentThumbnail
;
break
;
}
}
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
}
//break;
}
}
}
break
;
}
}
}
if
(
metaArr
==
null
||
metaArr
<=
0
||
metaArr
==
'undefined'
)
{
if
(
metaArr
==
null
||
metaArr
<=
0
||
metaArr
==
'undefined'
)
{
}
}
else
{
else
{
for
(
var
nIndex2
=
0
;
nIndex2
<
metaArr
.
length
;
nIndex2
++
)
{
for
(
var
nIndex2
=
0
;
nIndex2
<
metaArr
.
length
;
nIndex2
++
)
{
if
(
metaArr
[
nIndex2
].
contentid
==
contId
)
{
if
(
metaArr
[
nIndex2
].
contentid
==
contId
)
{
if
(
metaArr
[
nIndex2
].
metaversion
!=
metaVer
)
{
if
(
metaArr
[
nIndex2
].
metaversion
!=
metaVer
)
{
imgThumb
.
onload
=
function
()
{
imgThumb
.
onload
=
function
()
{
var
resizeImg
=
HOME
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
var
resizeImg
=
HOME
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
ctx
.
drawImage
(
imgThumb
,
(
c
.
width
/
2
)
-
(
resizeImg
[
0
]
/
2
)
+
4
,
c
.
height
-
resizeImg
[
1
]
+
4
,
resizeImg
[
0
],
resizeImg
[
1
]);
ctx
.
drawImage
(
imgThumb
,
(
c
.
width
/
2
)
-
(
resizeImg
[
0
]
/
2
)
+
4
,
c
.
height
-
resizeImg
[
1
]
+
4
,
resizeImg
[
0
],
resizeImg
[
1
]);
if
(
contentStatus
==
1
){
if
(
contentStatus
==
1
){
imgIconNew
.
onload
=
function
()
{
imgIconNew
.
onload
=
function
()
{
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
});
});
};
};
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
}
else
{
}
else
{
imgIconEdit
.
onload
=
function
()
{
imgIconEdit
.
onload
=
function
()
{
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
});
});
};
};
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
}
//バックアップデータのステータス更新
};
HEADER
.
setContentStatus
(
contId
,
3
);
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
}
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
};
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
if
(
src
!=
''
){
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
imgThumb
.
src
=
src
;
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
}
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
}
if
(
src
!=
''
){
}
else
{
imgThumb
.
src
=
src
;
imgThumb
.
src
=
contentThumbnail
;
}
}
}
}
else
{
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
imgThumb
.
src
=
contentThumbnail
;
break
;
}
}
}
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
}
//break;
}
}
readFlg
=
false
;
break
;
}
}
}
}
//readFlg = false;
}
else
{
imgThumb
.
onload
=
function
()
{
var
resizeImg
=
HOME
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
ctx
.
drawImage
(
imgThumb
,
(
c
.
width
/
2
)
-
(
resizeImg
[
0
]
/
2
)
+
4
,
c
.
height
-
resizeImg
[
1
]
+
4
,
resizeImg
[
0
],
resizeImg
[
1
]);
if
(
contentStatus
==
null
||
contentStatus
==
1
){
imgIconNew
.
onload
=
function
()
{
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
});
};
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
}
else
if
(
contentStatus
==
2
){
imgIconEdit
.
onload
=
function
()
{
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
});
};
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
}
else
{
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
});
}
};
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
if
(
src
!=
''
){
imgThumb
.
src
=
src
;
}
}
}
else
{
imgThumb
.
src
=
contentThumbnail
;
}
//break;
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
}
};
};
//draw Edit Image
//draw Edit Image
...
...
abvw/js/settings.js
View file @
e3e221f1
...
@@ -713,6 +713,8 @@ SETTINGS.dspOptReset_Click = function(e) {
...
@@ -713,6 +713,8 @@ SETTINGS.dspOptReset_Click = function(e) {
$
(
'#chkBkMemo'
).
attr
(
'checked'
,
'checked'
);
$
(
'#chkBkMemo'
).
attr
(
'checked'
,
'checked'
);
// set default backup bookmark
// set default backup bookmark
$
(
'#chkBkShiori'
).
attr
(
'checked'
,
'checked'
);
$
(
'#chkBkShiori'
).
attr
(
'checked'
,
'checked'
);
// set default backup contentStatus
$
(
'#chkBkContentStatus'
).
attr
(
'checked'
,
'checked'
);
// reset page transition no.4
// reset page transition no.4
$
(
'#txtValueAnimation'
).
val
(
1
);
$
(
'#txtValueAnimation'
).
val
(
1
);
...
@@ -1044,6 +1046,13 @@ SETTINGS.initScreen = function() {
...
@@ -1044,6 +1046,13 @@ SETTINGS.initScreen = function() {
$
(
"#chkBkShiori"
).
attr
(
'checked'
,
'checked'
);
$
(
"#chkBkShiori"
).
attr
(
'checked'
,
'checked'
);
}
}
if
(
ClientData
.
userOpt_bkContentStatusFlag
()
==
0
)
{
$
(
"#chkBkContentStatus"
).
removeAttr
(
'checked'
);
}
else
{
$
(
"#chkBkContentStatus"
).
attr
(
'checked'
,
'checked'
);
}
// load config page transition & page transition period No.4
// load config page transition & page transition period No.4
$
(
'#cboAnimation'
).
val
(
ClientData
.
userOpt_pageTransition
());
$
(
'#cboAnimation'
).
val
(
ClientData
.
userOpt_pageTransition
());
...
...
abvw/settings.html
View file @
e3e221f1
...
@@ -153,13 +153,15 @@
...
@@ -153,13 +153,15 @@
<label
id=
"txtOptBkCfm"
for=
"chkOptBkCfm"
lang=
"txtOptBkCfm"
class=
"lang"
>
<!--毎回ログアウトの時、バックアップするかどうかは必ず確認する-->
</label>
<label
id=
"txtOptBkCfm"
for=
"chkOptBkCfm"
lang=
"txtOptBkCfm"
class=
"lang"
>
<!--毎回ログアウトの時、バックアップするかどうかは必ず確認する-->
</label>
</label>
</label>
<br
/>
<br
/>
<label
class=
"option_backup"
>
<!--<label class="option_backup">-->
<p
class=
"option_backup"
style=
"font-size: 13px;margin-left:50px"
>
<label
id=
"txtBkDefault"
lang=
"txtBkDefault"
class=
"lang"
>
<!--バックアップのデフォルト : -->
</label>
<label
id=
"txtBkDefault"
lang=
"txtBkDefault"
class=
"lang"
>
<!--バックアップのデフォルト : -->
</label>
<input
type=
"checkbox"
id=
"chkBkMarking"
class=
"chkbx"
checked=
"checked"
/><label
id=
"txtBkMarking"
for=
"chkBkMarking"
lang=
"txtBkMarking"
class=
"lang"
>
<!--マーキング-->
</label>
<input
type=
"checkbox"
id=
"chkBkMarking"
class=
"chkbx"
checked=
"checked"
/><label
id=
"txtBkMarking"
for=
"chkBkMarking"
lang=
"txtBkMarking"
class=
"lang"
>
<!--マーキング-->
</label>
<input
type=
"checkbox"
id=
"chkBkMemo"
class=
"chkbx"
checked=
"checked"
/><label
id=
"txtBkMemo"
for=
"chkBkMemo"
lang=
"txtBkMemo"
class=
"lang"
>
<!--メモ-->
</label>
<input
type=
"checkbox"
id=
"chkBkMemo"
class=
"chkbx"
checked=
"checked"
/><label
id=
"txtBkMemo"
for=
"chkBkMemo"
lang=
"txtBkMemo"
class=
"lang"
>
<!--メモ-->
</label>
<input
type=
"checkbox"
id=
"chkBkShiori"
class=
"chkbx"
checked=
"checked"
/><label
id=
"txtBkShiori"
for=
"chkBkShiori"
lang=
"txtBkShiori"
class=
"lang"
>
<!--しおり-->
</label>
<input
type=
"checkbox"
id=
"chkBkShiori"
class=
"chkbx"
checked=
"checked"
/><label
id=
"txtBkShiori"
for=
"chkBkShiori"
lang=
"txtBkShiori"
class=
"lang"
>
<!--しおり-->
</label>
<input
type=
"checkbox"
id=
"chkBkContentStatus"
class=
"chkbx"
checked=
"checked"
/><label
id=
"txtBkContentStatus"
for=
"chkBkContentStatus"
lang=
"txtBkContentStatus"
class=
"lang"
>
<!--コンテンツ状態-->
</label>
<input
type=
"checkbox"
id=
"chkBkContentStatus"
class=
"chkbx"
checked=
"checked"
/><label
id=
"txtBkContentStatus"
for=
"chkBkContentStatus"
lang=
"txtBkContentStatus"
class=
"lang"
>
<!--コンテンツ状態-->
</label>
</label>
</p>
<!--</label>-->
</p>
</p>
<p
class=
"backupbtn"
><a
class=
"backup lang"
lang=
"dspOptBk"
id=
"dspOptBk"
href=
"#"
style=
"display:none;"
>
<!--バックアップ-->
</a><a
href=
"#"
id=
"dspOptRes"
lang=
"dspOptRes"
class=
"lang"
style=
"visibility:hidden;"
>
<!--リストア-->
</a></p>
<p
class=
"backupbtn"
><a
class=
"backup lang"
lang=
"dspOptBk"
id=
"dspOptBk"
href=
"#"
style=
"display:none;"
>
<!--バックアップ-->
</a><a
href=
"#"
id=
"dspOptRes"
lang=
"dspOptRes"
class=
"lang"
style=
"visibility:hidden;"
>
<!--リストア-->
</a></p>
<p
class=
"savebtn"
><a
class=
"save lang"
href=
"#"
id=
"dspSave"
lang=
"dspSave"
>
<!--保存する-->
</a><a
class=
"default lang"
href=
"#"
id=
"dspOptReset"
lang=
"dspOptReset"
>
<!--初期設定に戻る-->
</a><div
style=
"clear:both;"
></div></p>
<p
class=
"savebtn"
><a
class=
"save lang"
href=
"#"
id=
"dspSave"
lang=
"dspSave"
>
<!--保存する-->
</a><a
class=
"default lang"
href=
"#"
id=
"dspOptReset"
lang=
"dspOptReset"
>
<!--初期設定に戻る-->
</a><div
style=
"clear:both;"
></div></p>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment