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
b374e7c7
Commit
b374e7c7
authored
Sep 27, 2013
by
Vo Duc Thang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
9/27 Release
parent
3f8dd190
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
349 additions
and
209 deletions
+349
-209
abvw/common/json/lang/lang-en.json
+1
-1
abvw/common/json/lang/lang-ja.json
+1
-1
abvw/common/json/lang/lang-ko.json
+1
-1
abvw/contentsearch.html
+2
-2
abvw/css/theme/viewer.css
+3
-4
abvw/home.html
+9
-0
abvw/js/contentsearch.js
+37
-34
abvw/js/contentview.js
+47
-13
abvw/js/contentview_Anket.js
+6
-3
abvw/js/contentview_Events.js
+75
-56
abvw/js/contentview_GetData.js
+22
-13
abvw/js/contentview_InitObjects.js
+16
-2
abvw/js/detail.js
+15
-12
abvw/js/header.js
+37
-0
abvw/js/history.js
+36
-33
abvw/js/home.js
+41
-34
No files found.
abvw/common/json/lang/lang-en.json
View file @
b374e7c7
...
...
@@ -64,7 +64,7 @@
"dspBkCancel"
:
"Logout"
,
"txtSearchResult"
:
"Result"
,
"dspHome"
:
"Home"
,
"txtLoginUser"
:
"(Ver.2013092
6
)User:"
,
"txtLoginUser"
:
"(Ver.2013092
7
)User:"
,
"txtAll"
:
"All"
,
"txtMkgSize"
:
"Size"
,
"txtMkgS"
:
"S"
,
...
...
abvw/common/json/lang/lang-ja.json
View file @
b374e7c7
...
...
@@ -64,7 +64,7 @@
"dspBkCancel"
:
"バックアップせずにログアウト"
,
"txtSearchResult"
:
"検索結果"
,
"dspHome"
:
"ホーム"
,
"txtLoginUser"
:
"(Ver.2013092
6
)ログイン中:"
,
"txtLoginUser"
:
"(Ver.2013092
7
)ログイン中:"
,
"txtAll"
:
"すべて"
,
"txtMkgSize"
:
"太さ"
,
"txtMkgS"
:
"小"
,
...
...
abvw/common/json/lang/lang-ko.json
View file @
b374e7c7
...
...
@@ -64,7 +64,7 @@
"dspBkCancel"
:
"로그아웃"
,
"txtSearchResult"
:
"검색 결과"
,
"dspHome"
:
"홈"
,
"txtLoginUser"
:
"(Ver.2013092
6
)로그인 중:"
,
"txtLoginUser"
:
"(Ver.2013092
7
)로그인 중:"
,
"txtAll"
:
"전체"
,
"txtMkgSize"
:
"두께"
,
"txtMkgS"
:
"소"
,
...
...
abvw/contentsearch.html
View file @
b374e7c7
...
...
@@ -69,7 +69,7 @@
<div
class=
"menu_language"
>
<div
class=
"clearfix"
>
<ul
class=
"floatL"
>
<li
class=
"floatR"
>
<li
class=
"floatR"
id=
"li-login-username"
style=
"display:none;"
>
<label
class=
"lang"
lang=
"txtLoginUser"
>
こんにちは
</label>
<label
id=
"login-username"
>
</label>
</li>
...
...
@@ -208,7 +208,7 @@
<li
class=
"date"
><label
id=
"txtPubDt2"
lang=
"dspPubDt2"
class=
"lang"
>
発行日:
</label><label
id=
"txtPubDt2_Dsp"
>
____/__/__ __:__
</label></li>
<li
class=
"explain"
id=
"txtContentDetail"
>
スマートデバイス向け
<br
/>
統合ソリューション
</li>
</ul>
<p
class=
"read_btn"
><a
class=
"read lang"
href=
"#"
id=
"contentdetail_dspRead"
lang=
"txtRead"
>
読む
</a></p>
<p
class=
"read_btn"
><a
class=
"read lang"
id=
"contentdetail_dspRead"
lang=
"txtRead"
>
読む
</a></p>
</div>
<div
id=
"book_list"
></div>
...
...
abvw/css/theme/viewer.css
View file @
b374e7c7
...
...
@@ -818,7 +818,7 @@ aside.MemoIndexBox .indexBoxBody_off{
.transition
{
background
:
url(../../img/viewer/transitionbtn_bg.png)
0
0
no-repeat
;
/*background: url(../../img/viewer/transitionbtn_bg.png) 0 0 no-repeat;*/
}
/*ボタン設定*/
...
...
@@ -882,9 +882,8 @@ aside.MemoIndexBox .indexBoxBody_off{
/* 13. sizing setting */
/*----------------------------*/
.sizing
{
background
:
url(../../img/viewer/sizingbtn_bg.png)
0
0
no-repeat
;
.sizing
{
/*background: url(../../img/viewer/sizingbtn_bg.png) 0 0 no-repeat;*/
}
/*ボタン設定*/
...
...
abvw/home.html
View file @
b374e7c7
...
...
@@ -68,6 +68,15 @@
<script
src=
"./common/js/screenLock.js"
type=
"text/javascript"
></script>
<script
src=
"js/detail.js"
type=
"text/javascript"
></script>
<!--[if IE 9 ]>
<style>
.tab_bg_color
{
overflow-x:scroll;
}
</style>
<![endif]-->
</head>
<body
id=
"bookshelf"
>
...
...
abvw/js/contentsearch.js
View file @
b374e7c7
...
...
@@ -902,40 +902,40 @@ function isPdfContent(contentType){
return
true
;
}
};
//Get resource Id of content
function
downloadResourceById
(
contentId
){
var
params
=
{
sid
:
ClientData
.
userInfo_sid
(),
contentId
:
contentId
,
getType
:
'2'
,
};
var
resourceUrl
;
abapi
(
'webGetContent'
,
params
,
'GET'
,
function
(
data
)
{
var
resourceId
;
$
.
each
(
data
.
contentData
,
function
(
i
,
n
){
if
(
typeof
n
==
"object"
){
resourceId
=
n
.
resourceId
;
}
});
//Get resource
resourceUrl
=
getResourceByIdFromAPI
(
resourceId
);
window
.
open
(
resourceUrl
,
"_blank"
);
// redraw content remove new icon
drawEditImage
(
contentId
);
});
};
//Download resource
function
getResourceByIdFromAPI
(
resourceId
){
return
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
resourceId
+
"&isDownload=true"
;
};
//
//
Get resource Id of content
//
function downloadResourceById(contentId){
//
var params = {
//
sid: ClientData.userInfo_sid(),
//
contentId: contentId,
//
getType: '2',
//
};
//
//
var resourceUrl;
//
//
abapi('webGetContent', params, 'GET', function (data) {
//
var resourceId;
//
//
$.each(data.contentData , function(i, n){
//
if(typeof n == "object"){
//
resourceId = n.resourceId;
//
}
//
});
//
//
//Get resource
//
resourceUrl = getResourceByIdFromAPI(resourceId);
//
// window.open(resourceUrl, "_blank");
//
// redraw content remove new icon
//
drawEditImage(contentId);
//
//
});
//
};
//
//
Download resource
//
function getResourceByIdFromAPI(resourceId){
//
return getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceId + "&isDownload=true";
//
};
/* get url */
function
getURL
(
apiName
)
{
...
...
@@ -1034,6 +1034,9 @@ function readSubmenuFunction_callback(contentId)
if
(
contentType
==
ContentTypeKeys
.
Type_Others
){
//Download content
downloadResourceById
(
contentId
);
// redraw content remove new icon
drawEditImage
(
contentId
);
}
else
{
//Go to Conten view page
...
...
abvw/js/contentview.js
View file @
b374e7c7
...
...
@@ -2091,6 +2091,26 @@ function closeDialogResize() {
//Start Function : No.12
var
isZoomingContent
=
false
;
//START TRB00075 - Editor: Long - Date - 24/09/2013 - Summary : Fix for prevent moving page when display dialog
function
displayOverlayForHtmlAndMediaType
(){
var
$overlay
=
$
(
'#overlay'
);
var
$header
=
$
(
'header'
);
var
$footer
=
$
(
'footer'
);
$header
.
css
(
'position'
,
'absolute'
);
$header
.
css
(
'width'
,
'100%'
);
$header
.
css
(
'z-index'
,
'102'
);
$footer
.
css
(
'z-index'
,
'102'
);
$overlay
.
show
();
//START TRB00075 - Editor: Long - Date - 24/09/2013 - Summary : Fix for prevent moving page when display dialog
document
.
getElementById
(
'overlay'
).
addEventListener
(
'touchstart'
,
function
(
event
){
event
.
preventDefault
();
return
false
;},
false
);
document
.
getElementById
(
'overlay'
).
addEventListener
(
'touchmove'
,
function
(
event
){
event
.
preventDefault
();
return
false
;},
false
);
document
.
getElementById
(
'overlay'
).
addEventListener
(
'touchend'
,
function
(
event
){
event
.
preventDefault
();
return
false
;},
false
);
//END TRB00075 - Editor: Long - Date - 24/09/2013 - Summary : Fix for prevent moving page when display dialog
};
//END TRB00075 - Editor: Long - Date - 24/09/2013 - Summary : Fix for prevent moving page when display dialog
//Display overlay dialog for specify content type
function
displayOverlayForSpecifyContentType
(){
...
...
@@ -2127,7 +2147,17 @@ function displayOverlayForSpecifyContentType(){
}
}
//Start : TRB00082 - Editor : Long - Date : 09/25/2013 - Summary : For win 8 rotate handling.
setViewportForWin8
();
//End : TRB00082 - Editor : Long - Date : 09/25/2013 - Summary : For win 8 rotate handling.
//Start : TRB00075 - Editor : Long - Date : 09/25/2013 - Summary : prevent moving page
if
(
avwUserEnvObj
.
os
==
"ipad"
)
{
displayOverlayForHtmlAndMediaType
();
}
//End : TRB00075 - Editor : Long - Date : 09/25/2013 - Summary : prevent moving page
/* window resize event */
$
(
window
).
resize
(
function
()
{
//START : TRB00034 - DATE : 09/11/2013 - Editor : Long - Summary : Fix for center loading image
...
...
@@ -2164,8 +2194,13 @@ function displayOverlayForSpecifyContentType(){
changePosDialog
();
/* close dialog popuptext */
closeDialogResize
();
closeDialogResize
();
//START TRB00091 - Editor : LOng - Date : 09/26/2013 - Summary : Dialog at center when rotate
$
(
"#contentVideoConfirm"
).
center
();
$
(
"#contentAudioConfirm"
).
center
();
//END TRB00091 - Editor : LOng - Date : 09/26/2013 - Summary : Dialog at center when rotate
});
};
...
...
@@ -2177,14 +2212,14 @@ function handleForContentTypeVideo(resourceUrl){
$container
.
html
(
''
);
if
(
ClientData
.
userOpt_musicMode
()
==
"1"
)
{
$container
.
html
(
'<video id="content_video" autoplay="true" loop="true" preload="auto" controls style="position: absolute; width: 100%; height: 90%; bottom: 1%
">'
if
(
ClientData
.
userOpt_musicMode
()
==
"1"
)
{
$container
.
html
(
'<video id="content_video" autoplay="true" loop="true" controls="controls" style="position: absolute; width: 100%; height: 100%;
">'
+
' <source src="'
+
resourceUrl
+
'" type="video/mp4"> '
+
'</video>'
);
);
}
else
{
$container
.
html
(
'<video id="content_video" autoplay="true" controls style="position: absolute; width: 100%; height: 90%; bottom: 1%
">'
else
{
$container
.
html
(
'<video id="content_video" autoplay="true" controls="controls" style="position: absolute; width: 100%; height: 100%;
">'
+
' <source src="'
+
resourceUrl
+
'" type="video/mp4"> '
+
'</video>'
);
...
...
@@ -2201,7 +2236,7 @@ function handleForContentTypeVideo(resourceUrl){
var
myVideo
=
document
.
getElementById
(
"content_video"
);
if
(
myVideo
.
paused
)
{
myVideo
.
play
();
myVideo
.
play
();
}
$container
.
show
();
...
...
@@ -2411,7 +2446,9 @@ function fullScreenForNotPdfType(){
var
h
=
$
(
"#wrapper"
).
height
();
if
(
contentType
==
ContentTypeKeys
.
Type_Video
){
$
(
'#content_video'
).
removeAttr
(
'controls'
);
if
(
avwUserEnvObj
.
os
==
'ipad'
){
$
(
'#content_video'
).
removeAttr
(
'controls'
);
}
}
var
$container
=
$
(
'#dialog'
);
...
...
@@ -2439,10 +2476,7 @@ function originalScreenForNotPdfType(){
$
(
'#footer_toolbar_2'
).
hide
();
$
(
'#control_screen_2'
).
hide
();
$
(
'#header_toolbar'
).
show
();
var
$container
=
$
(
'#dialog'
);
$container
.
removeAttr
(
'style'
);
...
...
abvw/js/contentview_Anket.js
View file @
b374e7c7
...
...
@@ -49,14 +49,17 @@ function showAnket(url, fullscreen) {
$
(
'#dialog .anket-commands input'
).
click
(
function
()
{
var
opacity
=
1
;
//START TRB00092 - EDITOR: Long - Date: 09/26/2013 - Summary : Fix opacity
if
(
$
(
this
).
index
()
==
0
)
{
opacity
=
0.
2
;
opacity
=
0.
6
;
}
else
if
(
$
(
this
).
index
()
==
1
)
{
opacity
=
0.
7
;
opacity
=
0.
8
;
}
//END TRB00092 - EDITOR: Long - Date: 09/26/2013 - Summary : Fix opacity
$
(
'#dialog,#dialog iframe,#dialog .anket-commands,#dialog .anket-commands input'
).
css
(
'opacity'
,
opacity
);
}
);
...
...
abvw/js/contentview_Events.js
View file @
b374e7c7
...
...
@@ -481,15 +481,22 @@ function createLockLayout(opt){
}
};
//START TRB00049 - Editor: Long - Date: 09/26/2013 - Summary : Add short key alt
var
altMode
=
false
;
/* handle keydown */
$
(
document
).
keydown
(
function
(
e
)
{
/* set fag true when click ctrl */
if
(
e
.
ctrlKey
)
{
ctrlMode
=
true
;
}
if
(
e
.
altKey
){
altMode
=
true
;
}
/* set hot key */
if
(
ctrlMode
==
true
)
{
if
(
ctrlMode
==
true
&&
altMode
==
false
)
{
if
(
ClientData
.
IsAddingMarking
()
==
true
||
isLoadingObject
==
true
)
{
/* do nothing*/
}
else
{
...
...
@@ -559,12 +566,37 @@ $(document).keydown(function (e) {
}
}
}
if
(
altMode
==
true
&&
ctrlMode
==
false
){
if
(
ClientData
.
IsAddingMarking
()
==
true
||
isLoadingObject
==
true
)
{
/* do nothing*/
}
else
{
switch
(
e
.
keyCode
)
{
/* zoom */
case
ShortKeys
.
ZoomInAlt
:
/* zoomIn */
if
(
contentType
==
ContentTypeKeys
.
Type_PDF
||
contentType
==
ContentTypeKeys
.
Type_Image
||
contentType
==
ContentTypeKeys
.
Type_NoFile
){
zoomIn
();
}
break
;
case
ShortKeys
.
ZoomOutAlt
:
/* zoomOut */
if
(
contentType
==
ContentTypeKeys
.
Type_PDF
||
contentType
==
ContentTypeKeys
.
Type_Image
||
contentType
==
ContentTypeKeys
.
Type_NoFile
){
zoomOut
();
}
break
;
}
}
}
});
/* handle keydown */
$
(
document
).
keyup
(
function
(
e
)
{
ctrlMode
=
false
;
altMode
=
false
;
});
//END TRB00049 - Editor: Long - Date: 09/26/2013 - Summary : Add short key alt
function
onUnlock
()
{
removeObject
();
...
...
@@ -931,8 +963,7 @@ function mouseMove_canvasMain(event) {
if
(
is3DObject
(
hitObj
)){
_3dAction
=
_3dActionType
.
TouchMove_MouseMove
;
hitObj
.
action
(
imagePt
);
}
}
}
else
{
_3dAnimate
=
false
;
...
...
@@ -1034,24 +1065,21 @@ function mouseDown_CanvasMain(event) {
_3dAnimate
=
false
;
if
(
is3DObject
(
hitPageObj
)){
clearTimeout
(
this
.
downTimer
);
this
.
downTimer
=
setTimeout
(
function
()
{
if
(
!
isPageTransition
){
_3dAnimate
=
true
;
_3dAction
=
_3dActionType
.
TouchStart_MouseDown
;
_curr3dObject
=
hitPageObj
;
hitPageObj
.
action
(
imagePt
);
moveFlag
=
false
;
}
else
{
_3dAnimate
=
false
;
moveFlag
=
true
;
}
},
_3dTimeToDetect
);
}
//START TRB00090 - Editor: Long - Date : 09/26/2013 - Summary : remove time to detect 3d animate
if
(
!
isPageTransition
){
_3dAnimate
=
true
;
_3dAction
=
_3dActionType
.
TouchStart_MouseDown
;
_curr3dObject
=
hitPageObj
;
hitPageObj
.
action
(
imagePt
);
moveFlag
=
false
;
}
else
{
_3dAnimate
=
false
;
moveFlag
=
true
;
}
//END TRB00090 - Editor: Long - Date : 09/26/2013 - Summary : remove time to detect 3d animate
}
else
{
_3dAnimate
=
false
;
}
...
...
@@ -1278,26 +1306,22 @@ function onTouchstart(evt){
_3dAnimate
=
false
;
if
(
hitPageObj
)
{
if
(
is3DObject
(
hitPageObj
)){
clearTimeout
(
this
.
downTimer
);
this
.
downTimer
=
setTimeout
(
function
()
{
if
(
isPageTransition
){
_3dAnimate
=
false
;
}
else
{
_3dAction
=
_3dActionType
.
TouchStart_MouseDown
;
_curr3dObject
=
hitPageObj
;
hitPageObj
.
action
(
imagePt
);
_3dAnimate
=
true
;
}
},
_3dTimeToDetect
);
//START TRB00090 - Editor: Long - Date : 09/26/2013 - Summary : remove time to detect 3d animate
if
(
is3DObject
(
hitPageObj
)){
if
(
isPageTransition
){
_3dAnimate
=
false
;
}
else
{
_3dAction
=
_3dActionType
.
TouchStart_MouseDown
;
_curr3dObject
=
hitPageObj
;
hitPageObj
.
action
(
imagePt
);
_3dAnimate
=
true
;
}
}
else
{
_3dAnimate
=
false
;
}
}
//END TRB00090 - Editor: Long - Date : 09/26/2013 - Summary : remove time to detect 3d animate
}
//End Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary:
}
...
...
@@ -1322,7 +1346,6 @@ function onTouchstart(evt){
y
:
touch2
.
clientY
});
px
=
touch1
.
clientX
+
touch2
.
clientX
/
2
;
py
=
touch1
.
clientY
+
touch2
.
clientY
/
2
;
...
...
@@ -1373,23 +1396,19 @@ function onTouchstart(evt){
if
(
hitPageObj
)
{
if
(
is3DObject
(
hitPageObj
)){
clearTimeout
(
this
.
downTimer
);
this
.
downTimer
=
setTimeout
(
function
()
{
if
(
isPageTransition
){
_3dAnimate
=
false
;
_isClick
=
true
;
}
else
{
_3dAction
=
_3dActionType
.
TouchStart_MouseDown
;
_curr3dObject
=
hitPageObj
;
hitPageObj
.
action
(
imagePt
);
_3dAnimate
=
true
;
_isClick
=
false
;
}
},
_3dTimeToDetect
);
//START TRB00090 - Editor: Long - Date : 09/26/2013 - Summary : remove time to detect 3d animate
if
(
isPageTransition
){
_3dAnimate
=
false
;
_isClick
=
true
;
}
else
{
_3dAction
=
_3dActionType
.
TouchStart_MouseDown
;
_curr3dObject
=
hitPageObj
;
hitPageObj
.
action
(
imagePt
);
_3dAnimate
=
true
;
_isClick
=
false
;
}
//END TRB00090 - Editor: Long - Date : 09/26/2013 - Summary : remove time to detect 3d animate
}
else
{
_3dAnimate
=
false
;
...
...
abvw/js/contentview_GetData.js
View file @
b374e7c7
...
...
@@ -315,14 +315,19 @@ function getMediaType1(iValueObj) {
var
resourceId
=
iValueObj
.
action
.
resourceId
;
var
resourceUrl
=
""
;
for
(
var
i
=
0
;
i
<
iValueObj
.
contentDataSub
.
length
;
i
++
){
var
tempData
=
iValueObj
.
contentDataSub
[
i
];
//START TRB00093 - Editor : Long - Date: 09/26/2013 - Summary : Check undefine before get
if
(
iValueObj
.
contentDataSub
){
if
(
tempData
.
resourceId
==
resourceId
){
resourceUrl
=
tempData
.
resourceUrl
;
break
;
for
(
var
i
=
0
;
i
<
iValueObj
.
contentDataSub
.
length
;
i
++
){
var
tempData
=
iValueObj
.
contentDataSub
[
i
];
if
(
tempData
.
resourceId
==
resourceId
){
resourceUrl
=
tempData
.
resourceUrl
;
break
;
}
}
}
}
//END TRB00093 - Editor : Long - Date: 09/26/2013 - Summary : Check undefine before get
pageObject
[
"imageUrl"
]
=
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
pageObject
[
"resourceUrl"
]
=
resourceUrl
;
...
...
@@ -662,14 +667,18 @@ function getMediaType9(iValueObj) {
var
resourceId
=
iValueObj
.
mediaInfo
.
resourceId
;
var
resourceUrl
=
""
;
for
(
var
i
=
0
;
i
<
iValueObj
.
contentDataSub
.
length
;
i
++
){
var
tempData
=
iValueObj
.
contentDataSub
[
i
];
if
(
tempData
.
resourceId
==
resourceId
){
resourceUrl
=
tempData
.
resourceUrl
;
break
;
//START TRB00093 - Editor : Long - Date: 09/26/2013 - Summary : Check undefine before get
if
(
iValueObj
.
contentDataSub
){
for
(
var
i
=
0
;
i
<
iValueObj
.
contentDataSub
.
length
;
i
++
){
var
tempData
=
iValueObj
.
contentDataSub
[
i
];
if
(
tempData
.
resourceId
==
resourceId
){
resourceUrl
=
tempData
.
resourceUrl
;
break
;
}
}
}
}
//START TRB00093 - Editor : Long - Date: 09/26/2013 - Summary : Check undefine before get
pageObject
[
"imageUrl"
]
=
'img/htmltype.png'
;
pageObject
[
"resourceUrl"
]
=
resourceUrl
;
...
...
abvw/js/contentview_InitObjects.js
View file @
b374e7c7
...
...
@@ -143,7 +143,6 @@ function initPage() {
// Lock screen
LockScreen
();
StartTimerUpdateLog
();
/* set start log */
...
...
@@ -414,6 +413,10 @@ function initPage() {
sizingScreen
();
}
}
//Start : TRB00015 - Editor : Long - Date : 08/28/2013 - Summary : For win 8 rotate handling.
setViewportForWin8
();
//End : TRB00015 - Editor : Long - Date : 08/28/2013 - Summary : For win 8 rotate handling.
}
//START TRB00048 - EDITOR : Long - Date : 09/18/2013 - Summary :
else
if
(
nAjaxLoad
==
4
){
...
...
@@ -550,6 +553,10 @@ function initPage() {
sizingScreen
();
}
}
//Start : TRB00015 - Editor : Long - Date : 08/28/2013 - Summary : For win 8 rotate handling.
setViewportForWin8
();
//End : TRB00015 - Editor : Long - Date : 08/28/2013 - Summary : For win 8 rotate handling.
}
}
...
...
@@ -586,7 +593,14 @@ function initPageMediaAndHtmlType(){
// Lock screen
LockScreen
();
//START TRB00094 - Editor : Long - Date : 09/26/2013 - Summary : Setting log
StartTimerUpdateLog
();
/* set start log */
SetStartLog
(
contentID
);
//END TRB00094 - Editor : Long - Date : 09/26/2013 - Summary : Setting log
//enable SpecifyControl
enableSpecifyControl
();
...
...
abvw/js/detail.js
View file @
b374e7c7
...
...
@@ -219,18 +219,21 @@ function contentdetail_dspRead_Click_callback(outputId) {
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
;
window
.
open
(
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
resourceIdDetail
+
"&isDownload=true"
,
"_blank"
);
}
});
},
null
);
// 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
{
...
...
abvw/js/header.js
View file @
b374e7c7
...
...
@@ -1041,4 +1041,40 @@ function getIconTypeContent(contentType) {
default
:
break
}
return
src
;
};
// download resouce content id
function
downloadResourceById
(
contentId
){
var
params
=
{
sid
:
ClientData
.
userInfo_sid
(),
contentId
:
contentId
,
getType
:
'2'
};
/* abapi('webGetContent', params, 'GET', function (data) {
var resourceId=data.contentData.content.resourceId;
//Get resource
resourceUrl = getResourceByIdFromAPI(resourceId);
// open url to download file
window.open(resourceUrl);
}); */
avwCmsApiSync
(
ClientData
.
userInfo_accountPath
(),
"webGetContent"
,
"get"
,
params
,
function
(
data
)
{
//Get resourceurl
var
resourceUrl
=
getResourceByIdFromAPI
(
data
.
contentData
.
content
.
resourceId
);
// open url to download file
window
.
open
(
resourceUrl
);
},
function
(
xhr
,
b
,
c
)
{
});
};
//Download resource
function
getResourceByIdFromAPI
(
resourceId
){
return
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
resourceId
+
"&isDownload=true"
;
};
\ No newline at end of file
abvw/js/history.js
View file @
b374e7c7
...
...
@@ -725,39 +725,39 @@ function isPdfContent(contentType){
}
};
//Get resource Id of content
function
downloadResourceById
(
contentId
){
var
params
=
{
sid
:
ClientData
.
userInfo_sid
(),
contentId
:
contentId
,
getType
:
'2'
,
};
var
resourceUrl
;
abapi
(
'webGetContent'
,
params
,
'GET'
,
function
(
data
)
{
var
resourceId
;
$
.
each
(
data
.
contentData
,
function
(
i
,
n
){
if
(
typeof
n
==
"object"
){
resourceId
=
n
.
resourceId
;
}
});
//Get resource
resourceUrl
=
getResourceByIdFromAPI
(
resourceId
);
window
.
open
(
resourceUrl
,
"_blank"
);
// redraw content remove new icon
drawEditImage
(
contentId
);
});
};
//Download resource
function
getResourceByIdFromAPI
(
resourceId
){
return
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
resourceId
+
"&isDownload=true"
;
};
//
//
Get resource Id of content
//
function downloadResourceById(contentId){
//
var params = {
//
sid: ClientData.userInfo_sid(),
//
contentId: contentId,
//
getType: '2',
//
};
//
//
var resourceUrl;
//
//
abapi('webGetContent', params, 'GET', function (data) {
//
var resourceId;
//
//
$.each(data.contentData , function(i, n){
//
if(typeof n == "object"){
//
resourceId = n.resourceId;
//
}
//
});
//
//
//Get resource
//
resourceUrl = getResourceByIdFromAPI(resourceId);
//
window.open(resourceUrl, "_blank");
//
// redraw content remove new icon
//
drawEditImage(contentId);
//
});
//
};
//
//
Download resource
//
function getResourceByIdFromAPI(resourceId){
//
return getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceId + "&isDownload=true";
//
};
/* get url */
function
getURL
(
apiName
)
{
...
...
@@ -857,6 +857,9 @@ function readSubmenuFunction_callback(contentId)
if
(
contentType
==
ContentTypeKeys
.
Type_Others
){
//Download content
downloadResourceById
(
contentId
);
// redraw content remove new icon
drawEditImage
(
contentId
);
}
else
{
//Go to Conten view page
...
...
abvw/js/home.js
View file @
b374e7c7
...
...
@@ -478,6 +478,8 @@ function canvasClickFunction_callback(outputId)
if
(
contentType
==
ContentTypeKeys
.
Type_Others
){
//Download content
downloadResourceById
(
outputId
);
// redraw content remove new icon
drawEditImage
(
outputId
);
}
else
{
//Go to Conten view page
...
...
@@ -584,6 +586,10 @@ function canvasClickFunction_callback(outputId)
if
(
contentType
==
ContentTypeKeys
.
Type_Others
){
//Download content
downloadResourceById
(
outputId
);
// redraw content remove new icon
drawEditImage
(
outputId
);
}
else
{
//Go to Conten view page
...
...
@@ -1372,6 +1378,10 @@ function readSubmenuFunction_callback(contentId)
if
(
contentType
==
ContentTypeKeys
.
Type_Others
){
//Download content
downloadResourceById
(
contentId
);
// redraw content remove new icon
drawEditImage
(
contentId
);
}
else
{
//Go to Conten view page
...
...
@@ -2022,40 +2032,37 @@ function isPdfContent(contentType){
};
//Get resource Id of content
function
downloadResourceById
(
contentId
){
var
params
=
{
sid
:
ClientData
.
userInfo_sid
(),
contentId
:
contentId
,
getType
:
'2'
,
};
var
resourceUrl
;
abapi
(
'webGetContent'
,
params
,
'GET'
,
function
(
data
)
{
var
resourceId
;
$
.
each
(
data
.
contentData
,
function
(
i
,
n
){
if
(
typeof
n
==
"object"
){
resourceId
=
n
.
resourceId
;
}
});
//Get resource
resourceUrl
=
getResourceByIdFromAPI
(
resourceId
);
window
.
open
(
resourceUrl
,
"_blank"
);
// redraw content remove new icon
drawEditImage
(
contentId
);
});
};
//Download resource
function
getResourceByIdFromAPI
(
resourceId
){
return
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
resourceId
+
"&isDownload=true"
;
};
////Get resource Id of content
//function downloadResourceById(contentId){
// var params = {
// sid: ClientData.userInfo_sid(),
// contentId: contentId,
// getType: '2',
// };
//
// var resourceUrl;
//
// abapi('webGetContent', params, 'GET', function (data) {
// var resourceId;
//
// $.each(data.contentData , function(i, n){
// if(typeof n == "object"){
// resourceId = n.resourceId;
// }
// });
//
// //Get resource
// resourceUrl = getResourceByIdFromAPI(resourceId);
// window.open(resourceUrl, "_blank");
// });
//};
////Download resource
//function getResourceByIdFromAPI(resourceId){
// return getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceId + "&isDownload=true";
//};
/* get url */
function
getURL
(
apiName
)
{
...
...
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