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
0953a78e
Commit
0953a78e
authored
May 19, 2014
by
Masaru Abe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
リンクコンテンツ対応
parent
b446ac6a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
225 additions
and
28 deletions
+225
-28
abvw/common/js/common.js
+2
-1
abvw/js/contentsearch.js
+0
-0
abvw/js/detail.js
+13
-17
abvw/js/header.js
+77
-0
abvw/js/history.js
+61
-1
abvw/js/home.js
+72
-9
No files found.
abvw/common/js/common.js
View file @
0953a78e
...
...
@@ -56,7 +56,8 @@ var ContentTypeKeys = {
Type_Others
:
'other'
,
Type_NoFile
:
'none'
,
Type_Html
:
'html'
,
Type_Enquete
:
'enquete'
Type_Enquete
:
'enquete'
,
Type_Link
:
'url'
};
/*
...
...
abvw/js/contentsearch.js
View file @
0953a78e
This diff is collapsed.
Click to expand it.
abvw/js/detail.js
View file @
0953a78e
...
...
@@ -219,26 +219,13 @@ function contentdetail_dspRead_Click_callback(outputId) {
//$('body,html').animate({ scrollTop: 0 }, 0);
ClientData
.
IsRefresh
(
false
);
//var contentType = "1";
if
(
ClientData
.
contentInfo_contentType
()
==
ContentTypeKeys
.
Type_Others
)
{
// Get content detail
// avwCmsApi(ClientData.userInfo_accountPath(), "webGetContent", "GET", { contentId: ClientData.contentInfo_contentId(), sid: ClientData.userInfo_sid(), getType: 2 },
// function (data) {
// $.each(data.contentData, function (i, n) {
// if (typeof n == "object") {
// resourceIdDetail = n.resourceId;
// var resourceUrl = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceIdDetail + "&isDownload=true";
// window.open(resourceUrl, "_blank");
// }
// });
// },
// null
// );
downloadResourceById
(
ClientData
.
contentInfo_contentId
());
}
else
if
(
ClientData
.
contentInfo_contentType
()
==
ContentTypeKeys
.
Type_Link
){
// Get content detail
viewLinkContentById
(
ClientData
.
contentInfo_contentId
());
}
else
{
avwScreenMove
(
ScreenIds
.
ContentView
);
...
...
@@ -275,6 +262,11 @@ function ShowContentNotPDF(contentTitle, contentDetail, contentThumbnail, delive
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
||
contentThumbnail
==
'undefined'
){
if
(
!
isPdfContent
(
tempContentType
)){
var
src
=
header
.
getThumbnailForOtherType
(
contentType
);
if
(
src
!=
''
){
contentThumbnail
=
src
;
}
/*
if(tempContentType == ContentTypeKeys.Type_Image){
contentThumbnail = ThumbnailForOtherType.Thumbnail_ImageType;
}
...
...
@@ -293,6 +285,10 @@ function ShowContentNotPDF(contentTitle, contentDetail, contentThumbnail, delive
else if(tempContentType == ContentTypeKeys.Type_Html){
contentThumbnail = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(tempContentType == ContentTypeKeys.Type_Link){
contentThumbnail = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
}
else
{
contentThumbnail
=
contentThumbnail
;
...
...
abvw/js/header.js
View file @
0953a78e
...
...
@@ -10,6 +10,9 @@ var timeWaitCloseNewInfoPushMessage = 5000; // time wait close info new push mes
var
currentPagePushMessage
=
1
;
var
isHoverOn
=
false
;
//名前空間用のオブジェクトを用意する
var
header
=
{};
$
(
document
).
ready
(
function
()
{
if
(
!
avwCheckLogin
(
ScreenIds
.
Login
))
return
;
...
...
@@ -1052,6 +1055,11 @@ function getIconTypeContent(contentType) {
src
=
'img/bookshelf/icon_04.jpg'
;
break
;
}
case
ContentTypeKeys
.
Type_Link
:
{
src
=
'img/bookshelf/icon_08.png'
;
break
;
}
default
:
break
}
return
src
;
...
...
@@ -1097,3 +1105,72 @@ function isSafariNotOnIpad() {
}
return
false
;
};
//link content
function
viewLinkContentById
(
contentId
){
var
params
=
{
sid
:
ClientData
.
userInfo_sid
(),
contentId
:
contentId
,
getType
:
'2'
};
avwCmsApiSync
(
ClientData
.
userInfo_accountPath
(),
"webGetContent"
,
"get"
,
params
,
function
(
data
)
{
//Get linkUrl
var
linkUrl
=
data
.
contentData
.
content
.
url
;
if
(
!
linkUrl
){
return
;
}
//httpで始まる場合は別ウィンドウで開く
if
(
linkUrl
.
toLowerCase
().
indexOf
(
'http'
)
===
0
)
{
window
.
open
(
linkUrl
,
"_blank"
,
"new window, scrollbars=yes"
);
}
else
if
(
linkUrl
.
toLowerCase
().
indexOf
(
'mailto'
)
===
0
){
//window.open(linkUrl, "_self");
location
.
href
=
linkUrl
;
}
else
{
// open url to download file
if
(
isSafariNotOnIpad
())
{
window
.
onbeforeunload
=
null
;
window
.
open
(
linkUrl
,
"_self"
);
// open url to download file on safari not for ipad
var
toogleTime
=
setTimeout
(
function
()
{
ToogleLogoutNortice
()
},
200
);
}
else
{
window
.
open
(
linkUrl
);
//open url to download file on orther browser
}
}
},
function
(
xhr
,
b
,
c
)
{
});
};
// get ThumbnailForOtherType
header
.
getThumbnailForOtherType
=
function
(
contentType
){
var
src
=
''
;
if
(
contentType
==
ContentTypeKeys
.
Type_Image
){
src
=
ThumbnailForOtherType
.
Thumbnail_ImageType
;
}
else
if
(
contentType
==
ContentTypeKeys
.
Type_Music
){
src
=
ThumbnailForOtherType
.
Thumbnail_MusicType
;
}
else
if
(
contentType
==
ContentTypeKeys
.
Type_Video
){
src
=
ThumbnailForOtherType
.
Thumbnail_VideoType
;
}
else
if
(
contentType
==
ContentTypeKeys
.
Type_NoFile
){
src
=
ThumbnailForOtherType
.
Thumbnail_NoFileType
;
}
else
if
(
contentType
==
ContentTypeKeys
.
Type_Others
){
src
=
ThumbnailForOtherType
.
Thumbnail_OthersType
;
}
else
if
(
contentType
==
ContentTypeKeys
.
Type_Html
){
src
=
ThumbnailForOtherType
.
Thumbnail_HtmlType
;
}
else
if
(
contentType
==
ContentTypeKeys
.
Type_Link
){
src
=
ThumbnailForOtherType
.
Thumbnail_LinkType
;
}
return
src
;
};
abvw/js/history.js
View file @
0953a78e
...
...
@@ -876,7 +876,12 @@ function readSubmenuFunction_callback(contentId)
if
(
contentType
==
ContentTypeKeys
.
Type_Others
){
//Download content
downloadResourceById
(
contentId
);
// redraw content remove new icon
drawEditImage
(
contentId
);
}
else
if
(
contentType
==
ContentTypeKeys
.
Type_Link
){
//link content
viewLinkContentById
(
contentId
);
// redraw content remove new icon
drawEditImage
(
contentId
);
}
...
...
@@ -964,6 +969,11 @@ function checkUserHasReadContent(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
(
!
isPdfContent
(
contentType
)){
var
src
=
header
.
getThumbnailForOtherType
(
contentType
);
if
(
src
!=
''
){
imgThumb
.
src
=
src
;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
...
...
@@ -982,6 +992,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){
else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
}
else
{
imgThumb
.
src
=
contentThumbnail
;
...
...
@@ -1002,6 +1016,11 @@ function checkUserHasReadContent(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
(
!
isPdfContent
(
contentType
)){
var
src
=
header
.
getThumbnailForOtherType
(
contentType
);
if
(
src
!=
''
){
imgThumb
.
src
=
src
;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
...
...
@@ -1020,6 +1039,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){
else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
}
else
{
imgThumb
.
src
=
contentThumbnail
;
...
...
@@ -1042,6 +1065,11 @@ function checkUserHasReadContent(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
(
!
isPdfContent
(
contentType
)){
var
src
=
header
.
getThumbnailForOtherType
(
contentType
);
if
(
src
!=
''
){
imgThumb
.
src
=
src
;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
...
...
@@ -1060,6 +1088,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){
else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
}
else
{
imgThumb
.
src
=
contentThumbnail
;
...
...
@@ -1090,6 +1122,11 @@ function checkUserHasReadContent(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
(
!
isPdfContent
(
contentType
)){
var
src
=
header
.
getThumbnailForOtherType
(
contentType
);
if
(
src
!=
''
){
imgThumb
.
src
=
src
;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
...
...
@@ -1108,6 +1145,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){
else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
}
else
{
imgThumb
.
src
=
contentThumbnail
;
...
...
@@ -1138,6 +1179,11 @@ function checkUserHasReadContent(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
(
!
isPdfContent
(
contentType
)){
var
src
=
header
.
getThumbnailForOtherType
(
contentType
);
if
(
src
!=
''
){
imgThumb
.
src
=
src
;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
...
...
@@ -1156,6 +1202,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer){
else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
}
else
{
imgThumb
.
src
=
contentThumbnail
;
...
...
@@ -1182,6 +1232,12 @@ function drawEditImage(id) {
else
{
var
contentType
=
returnContentType
(
id
);
var
src
=
header
.
getThumbnailForOtherType
(
contentType
);
if
(
src
!=
''
){
imgSrc
=
src
;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgSrc = ThumbnailForOtherType.Thumbnail_ImageType;
}
...
...
@@ -1200,6 +1256,10 @@ function drawEditImage(id) {
else if(contentType == ContentTypeKeys.Type_Html){
imgSrc = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
imgSrc = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
var
c
=
document
.
getElementById
(
'content-thumbnail'
+
id
);
...
...
abvw/js/home.js
View file @
0953a78e
...
...
@@ -589,13 +589,18 @@ function canvasClickFunction_callback(outputId)
ClientData
.
IsRefresh
(
false
);
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : check for download content type other.
//contentType = ContentTypeKeys.Type_Others;
if
(
contentType
==
ContentTypeKeys
.
Type_Others
){
//Download content
downloadResourceById
(
outputId
);
// redraw content remove new icon
drawEditImage
(
outputId
);
}
else
if
(
contentType
==
ContentTypeKeys
.
Type_Link
){
//link content
viewLinkContentById
(
outputId
);
// redraw content remove new icon
drawEditImage
(
outputId
);
}
else
{
//Go to Conten view page
avwScreenMove
(
ScreenIds
.
ContentView
);
...
...
@@ -696,15 +701,17 @@ function canvasClickFunction_callback(outputId)
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Add ContentType to Storage.
//For testing without other Type.
//contentType = ContentTypeKeys.Type_Others;
if
(
contentType
==
ContentTypeKeys
.
Type_Others
){
//Download content
downloadResourceById
(
outputId
);
// redraw content remove new icon
drawEditImage
(
outputId
);
}
else
if
(
contentType
==
ContentTypeKeys
.
Type_Link
){
//link content
viewLinkContentById
(
outputId
);
// redraw content remove new icon
drawEditImage
(
outputId
);
}
else
{
//Go to Conten view page
...
...
@@ -1501,15 +1508,17 @@ function readSubmenuFunction_callback(contentId)
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Add ContentType to Storage.
//For testing without other Type.
//contentType = ContentTypeKeys.Type_Others;
if
(
contentType
==
ContentTypeKeys
.
Type_Others
){
//Download content
downloadResourceById
(
contentId
);
// redraw content remove new icon
drawEditImage
(
contentId
);
}
else
if
(
contentType
==
ContentTypeKeys
.
Type_Link
){
//link content
viewLinkContentById
(
contentId
);
// redraw content remove new icon
drawEditImage
(
contentId
);
}
else
{
//Go to Conten view page
...
...
@@ -2275,6 +2284,11 @@ function checkUserHasReadContent(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
(
!
isPdfContent
(
contentType
)){
var
src
=
header
.
getThumbnailForOtherType
(
contentType
);
if
(
src
!=
''
){
imgThumb
.
src
=
src
;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
...
...
@@ -2293,6 +2307,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
}
else
{
imgThumb
.
src
=
contentThumbnail
;
...
...
@@ -2315,6 +2333,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
if
(
!
isPdfContent
(
contentType
)){
var
src
=
header
.
getThumbnailForOtherType
(
contentType
);
if
(
src
!=
''
){
imgThumb
.
src
=
src
;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
...
...
@@ -2333,6 +2356,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
}
else
{
imgThumb
.
src
=
contentThumbnail
;
...
...
@@ -2358,6 +2385,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
if
(
!
isPdfContent
(
contentType
)){
var
src
=
header
.
getThumbnailForOtherType
(
contentType
);
if
(
src
!=
''
){
imgThumb
.
src
=
src
;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
...
...
@@ -2376,6 +2408,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
}
else
{
imgThumb
.
src
=
contentThumbnail
;
...
...
@@ -2410,6 +2446,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
if
(
!
isPdfContent
(
contentType
)){
var
src
=
header
.
getThumbnailForOtherType
(
contentType
);
if
(
src
!=
''
){
imgThumb
.
src
=
src
;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
...
...
@@ -2428,6 +2469,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
}
else
{
imgThumb
.
src
=
contentThumbnail
;
...
...
@@ -2461,6 +2506,11 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
if
(
!
isPdfContent
(
contentType
)){
var
src
=
header
.
getThumbnailForOtherType
(
contentType
);
if
(
src
!=
''
){
imgThumb
.
src
=
src
;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgThumb.src = ThumbnailForOtherType.Thumbnail_ImageType;
}
...
...
@@ -2479,6 +2529,10 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
else if(contentType == ContentTypeKeys.Type_Html){
imgThumb.src = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
imgThumb.src = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
}
else
{
imgThumb
.
src
=
contentThumbnail
;
...
...
@@ -2505,6 +2559,11 @@ function drawEditImage(id) {
else
{
var
contentType
=
returnContentType
(
id
);
var
src
=
header
.
getThumbnailForOtherType
(
contentType
);
if
(
src
!=
''
){
imgSrc
=
src
;
}
/*
if(contentType == ContentTypeKeys.Type_Image){
imgSrc = ThumbnailForOtherType.Thumbnail_ImageType;
}
...
...
@@ -2523,6 +2582,10 @@ function drawEditImage(id) {
else if(contentType == ContentTypeKeys.Type_Html){
imgSrc = ThumbnailForOtherType.Thumbnail_HtmlType;
}
else if(contentType == ContentTypeKeys.Type_Link){
imgSrc = ThumbnailForOtherType.Thumbnail_LinkType;
}
*/
}
var
c
=
document
.
getElementById
(
'content-thumbnail'
+
id
);
...
...
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