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
7ca6b4aa
Commit
7ca6b4aa
authored
Aug 28, 2013
by
Vo Duc Thang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
リリース
・3D、HTMLオブジェクト ・アノニマスログイン ・コンテンツコンテナ(Noneタイプ)
parent
489ea73a
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
334 additions
and
71 deletions
+334
-71
abvw/bookmark.html
+1
-1
abvw/common/js/common.js
+1
-1
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
+1
-1
abvw/contentview.html
+1
-0
abvw/css/Anket.css
+2
-2
abvw/history.html
+1
-1
abvw/home.html
+1
-1
abvw/js/contentview.js
+105
-15
abvw/js/contentview_Anket.js
+2
-2
abvw/js/contentview_CallApi.js
+13
-0
abvw/js/contentview_ContentTypeNone.js
+35
-0
abvw/js/contentview_CreateObjects.js
+1
-0
abvw/js/contentview_Events.js
+125
-36
abvw/js/contentview_GetData.js
+21
-2
abvw/js/contentview_InitObjects.js
+13
-4
abvw/js/header.js
+7
-1
abvw/settings.html
+1
-1
No files found.
abvw/bookmark.html
View file @
7ca6b4aa
...
...
@@ -47,7 +47,7 @@
<a
class=
"logo"
href=
"javascript:void(0);"
onclick=
"avwScreenMove(ScreenIds.Home)"
>
</a>
<div
class=
"menu_language"
>
<ul>
<li><label
class=
"lang"
lang=
"txtLoginUser"
>
こんにちは
</label><label
id=
"login-username"
>
</label></li>
<li
id=
"li-login-username"
style=
"display:none;"
><label
class=
"lang"
lang=
"txtLoginUser"
>
こんにちは
</label><label
id=
"login-username"
>
</label></li>
<li
class=
"pushmessage hide"
id=
"liPushMessage"
><label
class=
"lang"
lang=
"txtPushAlert"
>
新着 :
</label><label
id=
"numbermessage"
></label><span></span>
<div
id=
"list-push-message"
>
...
...
abvw/common/js/common.js
View file @
7ca6b4aa
...
...
@@ -64,7 +64,7 @@ var ContentTypeKeys = {
Type_Video
:
'movie'
,
Type_Music
:
'music'
,
Type_Others
:
'other'
,
Type_NoFile
:
'no'
,
Type_NoFile
:
'no
ne
'
,
Type_Html
:
'html'
,
Type_Enquete
:
'enquete'
};
...
...
abvw/common/json/lang/lang-en.json
View file @
7ca6b4aa
...
...
@@ -64,7 +64,7 @@
"dspBkCancel"
:
"Logout"
,
"txtSearchResult"
:
"Result"
,
"dspHome"
:
"Home"
,
"txtLoginUser"
:
"(Ver.2013082
7
)User:"
,
"txtLoginUser"
:
"(Ver.2013082
8
)User:"
,
"txtAll"
:
"All"
,
"txtMkgSize"
:
"Size"
,
"txtMkgS"
:
"S"
,
...
...
abvw/common/json/lang/lang-ja.json
View file @
7ca6b4aa
...
...
@@ -64,7 +64,7 @@
"dspBkCancel"
:
"バックアップせずにログアウト"
,
"txtSearchResult"
:
"検索結果"
,
"dspHome"
:
"ホーム"
,
"txtLoginUser"
:
"(Ver.2013082
7
)ログイン中:"
,
"txtLoginUser"
:
"(Ver.2013082
8
)ログイン中:"
,
"txtAll"
:
"すべて"
,
"txtMkgSize"
:
"太さ"
,
"txtMkgS"
:
"小"
,
...
...
abvw/common/json/lang/lang-ko.json
View file @
7ca6b4aa
...
...
@@ -64,7 +64,7 @@
"dspBkCancel"
:
"로그아웃"
,
"txtSearchResult"
:
"검색 결과"
,
"dspHome"
:
"홈"
,
"txtLoginUser"
:
"(Ver.2013082
7
)로그인 중:"
,
"txtLoginUser"
:
"(Ver.2013082
8
)로그인 중:"
,
"txtAll"
:
"전체"
,
"txtMkgSize"
:
"두께"
,
"txtMkgS"
:
"소"
,
...
...
abvw/contentsearch.html
View file @
7ca6b4aa
...
...
@@ -48,7 +48,7 @@
<a
class=
"logo"
href=
"javascript:void(0);"
onclick=
"avwScreenMove(ScreenIds.Home)"
>
</a>
<div
class=
"menu_language"
>
<ul>
<li><label
class=
"lang"
lang=
"txtLoginUser"
>
こんにちは
</label><label
id=
"login-username"
>
</label></li>
<li
id=
"li-login-username"
style=
"display:none;"
><label
class=
"lang"
lang=
"txtLoginUser"
>
こんにちは
</label><label
id=
"login-username"
>
</label></li>
<li
class=
"pushmessage hide"
id=
"liPushMessage"
><label
class=
"lang"
lang=
"txtPushAlert"
>
新着 :
</label><label
id=
"numbermessage"
></label><span></span>
<div
id=
"list-push-message"
>
...
...
abvw/contentview.html
View file @
7ca6b4aa
...
...
@@ -51,6 +51,7 @@
<script
src=
"./js/contentview_Paint.js"
></script>
<script
src=
"./js/contentview_Anket.js"
></script>
<script
src=
"./js/contentview_3d.js"
></script>
<script
src=
"./js/contentview_ContentTypeNone.js"
></script>
<script
src=
"common/js/zoomDetector.js"
type=
"text/javascript"
></script>
<link
type=
"text/css"
rel=
"stylesheet"
href=
"css/reset.css"
/>
...
...
abvw/css/Anket.css
View file @
7ca6b4aa
...
...
@@ -42,14 +42,14 @@
line-height
:
60px
;
margin
:
0
;
padding
:
0
;
background-color
:
#fff
;
/*background-color:#fff;*/
}
.anket-dialog
.anket-commands
input
[
type
=
'button'
]
{
border-radius
:
10px
;
padding
:
0
10px
;
border
:
solid
1px
#333
;
background-color
:
#
eee
;
background-color
:
#
ccc
;
cursor
:
pointer
;
margin-right
:
5px
;
width
:
100px
;
...
...
abvw/history.html
View file @
7ca6b4aa
...
...
@@ -47,7 +47,7 @@
<a
class=
"logo"
href=
"javascript:void(0);"
onclick=
"avwScreenMove(ScreenIds.Home)"
>
</a>
<div
class=
"menu_language"
>
<ul>
<li><label
class=
"lang"
lang=
"txtLoginUser"
>
こんにちは
</label><label
id=
"login-username"
>
</label></li>
<li
id=
"li-login-username"
style=
"display:none;"
><label
class=
"lang"
lang=
"txtLoginUser"
>
こんにちは
</label><label
id=
"login-username"
>
</label></li>
<li
class=
"pushmessage hide"
id=
"liPushMessage"
><label
class=
"lang"
lang=
"txtPushAlert"
>
新着 :
</label><label
id=
"numbermessage"
></label><span></span>
<div
id=
"list-push-message"
>
...
...
abvw/home.html
View file @
7ca6b4aa
...
...
@@ -58,7 +58,7 @@
<a
class=
"logo"
href=
"javascript:void(0);"
onclick=
"avwScreenMove(ScreenIds.Home)"
>
</a>
<div
class=
"menu_language"
>
<ul>
<li><label
class=
"lang"
lang=
"txtLoginUser"
>
こんにちは
</label><label
id=
"login-username"
>
</label></li>
<li
id=
"li-login-username"
style=
"display:none;"
><label
class=
"lang"
lang=
"txtLoginUser"
>
こんにちは
</label><label
id=
"login-username"
>
</label></li>
<li
class=
"pushmessage hide"
id=
"liPushMessage"
><label
class=
"lang"
lang=
"txtPushAlert"
>
新着 :
</label><label
id=
"numbermessage"
></label><span></span>
<div
id=
"list-push-message"
>
...
...
abvw/js/contentview.js
View file @
7ca6b4aa
...
...
@@ -308,7 +308,7 @@ function handleAPIWebContentPage(dataJson, pos) {
//Start Function : No.4 - Editor : Long - Date : 08/20/2013
if
(
contentType
==
ContentTypeKeys
.
Type_PDF
||
contentType
==
ContentTypeKeys
.
Type_NoFile
){
if
(
contentType
==
ContentTypeKeys
.
Type_PDF
){
for
(
var
nIndex
=
0
;
nIndex
<
bmList
.
length
;
nIndex
++
)
{
nIndexBookMark
=
-
1
;
var
contentPage
=
dataJson
.
pages
;
...
...
@@ -353,7 +353,8 @@ function handleAPIWebContentPage(dataJson, pos) {
imgTemp
.
src
=
formatStringBase64
(
dataStored
[
nStored
].
pageThumbnail
);
}
else
{
/* data not loaded*/
}
else
{
/* data not loaded*/
$
(
'#divListBookmark'
).
append
(
' <li id="'
+
changePageNo
(
bmList
[
nIndex
].
pageNo
)
+
'">'
+
' <img id="img_bookmark_'
+
bmList
[
nIndex
].
pageNo
+
'" class="imgbox" src="img/view_loading.gif" />'
+
...
...
@@ -388,7 +389,8 @@ function handleAPIWebContentPage(dataJson, pos) {
}
}
else
{
/* page deleted */
}
else
{
/* page deleted */
$
(
'#divListBookmark'
).
append
(
' <li id="'
+
changePageNo
(
bmList
[
nIndex
].
pageNo
)
+
'">'
+
' <span class="mdltext">'
+
...
...
@@ -405,7 +407,7 @@ function handleAPIWebContentPage(dataJson, pos) {
}
}
}
else
if
(
contentType
==
ContentTypeKeys
.
Type_Image
){
else
if
(
contentType
==
ContentTypeKeys
.
Type_Image
){
for
(
var
nIndex
=
0
;
nIndex
<
bmList
.
length
;
nIndex
++
)
{
nIndexBookMark
=
-
1
;
...
...
@@ -475,10 +477,83 @@ function handleAPIWebContentPage(dataJson, pos) {
}
}
}
else
if
(
contentType
==
ContentTypeKeys
.
Type_NoFile
){
for
(
var
nIndex
=
0
;
nIndex
<
bmList
.
length
;
nIndex
++
)
{
nIndexBookMark
=
-
1
;
var
contentPage
=
dataJson
.
pages
;
for
(
var
nIndexJson
=
0
;
nIndexJson
<
contentPage
.
length
;
nIndexJson
++
)
{
if
(
contentPage
[
nIndexJson
].
pageNo
==
bmList
[
nIndex
].
pageNo
)
{
nIndexBookMark
=
nIndexJson
;
break
;
}
}
if
(
nIndexBookMark
!=
-
1
)
{
/* page exist */
$
(
'#divListBookmark'
).
append
(
' <li id="'
+
1
+
'">'
+
' <img id="img_bookmark_'
+
bmList
[
nIndex
].
pageNo
+
'" class="imgbox" src="img/view_loading.gif" />'
+
' <span class="mdltext">'
+
i18nText
(
'txtPage'
)
+
(
changePageNo
(
bmList
[
nIndex
].
pageNo
)
+
1
)
+
'<br /> '
+
truncate
(
htmlEncode
(
contentPage
[
nIndexBookMark
].
pageText
),
20
)
+
' </span>'
+
' </li>'
);
//Resize Image
var
imgTemp
=
new
Image
();
var
imageContent
=
new
Image
();
var
imageUrl
=
pageImages
;
imgTemp
.
onload
=
function
()
{
if
(
imgTemp
.
width
>
imgTemp
.
height
)
{
$
(
"img.imgbox"
).
attr
(
'height'
,
''
);
$
(
"img.imgbox"
).
removeAttr
(
'height'
);
$
(
"img.imgbox"
).
attr
(
'width'
,
'43'
);
}
else
{
$
(
"img.imgbox"
).
attr
(
'width'
,
''
);
$
(
"img.imgbox"
).
removeAttr
(
'width'
);
$
(
"img.imgbox"
).
attr
(
'height'
,
'43'
);
}
imageContent
.
onload
=
function
(){
$
(
"img.imgbox"
).
attr
(
'src'
,
imageUrl
);
};
imageContent
.
src
=
imageUrl
;
};
imgTemp
.
src
=
"img/view_loading.gif"
;
lstPageNoBookMark
.
push
(
bmList
[
nIndex
].
pageNo
);
}
else
{
/* page deleted */
$
(
'#divListBookmark'
).
append
(
' <li id="'
+
0
+
'">'
+
' <span class="mdltext">'
+
' <span>'
+
i18nText
(
'txtPage'
)
+
bmList
[
nIndex
].
pageNo
+
'</span> <br /> '
+
' </span>'
+
' </li>'
+
' <li>'
+
' <span class="mdltext">'
+
' <span style="color:red">'
+
i18nText
(
'msgShioriDeleted'
)
+
'</span>'
+
' </span>'
+
' </li>'
);
}
}
}
//End Function : No.4 - Editor : Long - Date : 08/20/2013
if
(
contentType
==
ContentTypeKeys
.
Type_PDF
||
contentType
==
ContentTypeKeys
.
Type_NoFile
){
if
(
contentType
==
ContentTypeKeys
.
Type_PDF
){
if
(
lstPageNoBookMark
.
length
>
0
)
{
isSendingData
=
true
;
loadDataBookmark
(
lstPageNoBookMark
);
...
...
@@ -3092,6 +3167,14 @@ function setDefaultEvent() {
document
.
getElementById
(
'main'
).
addEventListener
(
'touchstart'
,
onTouchstart
,
false
);
document
.
getElementById
(
'main'
).
addEventListener
(
'touchmove'
,
onTouchmove
,
false
);
document
.
getElementById
(
'main'
).
addEventListener
(
'touchend'
,
onTouchend
,
false
);
document
.
getElementById
(
'canvasWrapper'
).
addEventListener
(
'touchstart'
,
function
(
event
){
event
.
preventDefault
();},
false
);
document
.
getElementById
(
'canvasWrapper'
).
addEventListener
(
'touchmove'
,
function
(
event
){
event
.
preventDefault
();},
false
);
document
.
getElementById
(
'canvasWrapper'
).
addEventListener
(
'touchend'
,
function
(
event
){
event
.
preventDefault
();},
false
);
//document.getElementById('wrapper').addEventListener('touchstart', function(event){event.preventDefault();}, false);
//document.getElementById('wrapper').addEventListener('touchmove', function(event){event.preventDefault();}, false);
//document.getElementById('wrapper').addEventListener('touchend', function(event){event.preventDefault();}, false);
}
$
(
'#main'
).
mouseout
(
function
(
event
)
{
...
...
@@ -3225,11 +3308,15 @@ function enableControlsCopyMemo() {
$
(
'#imgbookmark'
).
bind
(
'click'
,
bookmarkPage
);
$
(
'#imgbookmark'
).
removeClass
();
//Start Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary :
if
(
contentType
==
ContentTypeKeys
.
Type_PDF
){
$
(
'#listindex'
).
bind
(
'click'
,
showListPageIndex
);
$
(
'#listindex'
).
removeClass
();
$
(
'#copytext'
).
bind
(
'click'
,
showCopyText
);
$
(
'#copytext'
).
removeClass
();
}
//Start Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary :
/* image memo */
$
(
'#imgmemo'
).
bind
(
'click'
,
handleMemo
);
...
...
@@ -3247,16 +3334,15 @@ function enableControlsCopyMemo() {
$
(
'#imgmarkingtoolbar'
).
removeClass
();
}
/*$('#firstpage').bind('click',firstPage_click);
$('#firstpage').removeClass();
$('#prevpage').bind('click',prevPage_click);
$('#prevpage').removeClass();
$('#nextpage').bind('click',nextPage_click);
$('#nextpage').removeClass();
$('#lastpage').bind('click',lastPage_click);
$('#lastpage').removeClass();*/
if
(
contentType
==
ContentTypeKeys
.
Type_PDF
){
$
(
"#slider_page"
).
slider
(
"option"
,
"disabled"
,
false
);
enable
(
'#txtSearch'
,
'#txtSlider'
);
}
else
if
(
contentType
==
ContentTypeKeys
.
Type_NoFile
){
$
(
"#slider_page"
).
slider
(
"option"
,
"disabled"
,
false
);
enable
(
'#txtSlider'
);
}
if
(
avwUserEnvObj
.
os
!=
"ipad"
&&
avwUserEnvObj
.
os
!=
"android"
)
{
$
(
'#button_next_canvas'
).
css
(
'display'
,
'block'
);
...
...
@@ -4450,11 +4536,14 @@ function changeScaleDrawCanvas(scale) {
//Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
function
is3DObject
(
pageContent
){
var
result
=
false
;
if
(
pageContent
==
null
||
pageContent
==
undefined
){
result
=
false
;
}
else
{
if
(
pageContent
.
actionType
==
9
&&
pageContent
.
mediaType
==
8
){
result
=
true
;
}
}
return
result
;
};
//End Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
\ No newline at end of file
abvw/js/contentview_Anket.js
View file @
7ca6b4aa
...
...
@@ -2,7 +2,7 @@
function
showAnket
(
url
,
fullscreen
)
{
var
$container
=
$
(
'#dialog'
);
url
=
url
+
"?sid="
+
ClientData
.
userInfo_sid
();
//
url = url + "?sid=" + ClientData.userInfo_sid();
$container
.
html
(
''
);
$container
.
addClass
(
'anket-dialog'
);
...
...
@@ -57,7 +57,7 @@ function showAnket(url, fullscreen) {
{
opacity
=
0.7
;
}
$
(
'#dialog'
).
css
(
'opacity'
,
opacity
);
$
(
'#dialog
,#dialog iframe,#dialog .anket-commands,#dialog .anket-commands input
'
).
css
(
'opacity'
,
opacity
);
}
);
// resize anket
...
...
abvw/js/contentview_CallApi.js
View file @
7ca6b4aa
...
...
@@ -145,6 +145,19 @@ function getDataJsonFile() {
}
}
}
//Get Data Of page to draw page
if
(
contentType
==
ContentTypeKeys
.
Type_NoFile
){
var
pageDataInfo
=
[];
pageDataInfo
[
"height"
]
=
JsonFile
.
content
.
height
;
pageDataInfo
[
"width"
]
=
JsonFile
.
content
.
width
;
pageDataInfo
[
"alpha"
]
=
JsonFile
.
content
.
backgroundAlpha
;
pageDataInfo
[
"color"
]
=
JsonFile
.
content
.
backgroundColor
;
pageImages
=
returnImageString
(
pageDataInfo
);
}
//End : Function : No.12 - Editor : Long - Date: 08/27/2013 - Summary : Get Page Object for content type none
getPageObjectsByPageIndex
(
pageObjectsData
,
0
);
...
...
abvw/js/contentview_ContentTypeNone.js
0 → 100644
View file @
7ca6b4aa
function
getJsonContentInfoTyeNone
()
{
webGetContentData
();
getSearchDataFromJson
();
getJsonDataPageTitle
();
getJsonDataType4
();
getJsonDataType5
();
getDataJsonFile
();
webGetPageImageContentSize
();
};
//Return a string base 64 image has drawn with specify data
function
returnImageString
(
data
){
if
(
data
){
var
height
=
data
.
height
;
var
width
=
data
.
width
;
var
color
=
data
.
color
;
var
alpha
=
data
.
alpha
;
}
var
imageUrl
=
''
;
var
typeNoneCanvas
=
document
.
createElement
(
'canvas'
);
var
typeNoneContext
=
typeNoneCanvas
.
getContext
(
'2d'
);
typeNoneCanvas
.
height
=
height
;
typeNoneCanvas
.
width
=
width
;
typeNoneContext
.
clearRect
(
0
,
0
,
width
,
height
)
typeNoneContext
.
fillStyle
=
color
;
typeNoneContext
.
globalAlpha
=
alpha
;
typeNoneContext
.
fillRect
(
0
,
0
,
width
,
height
);
imageUrl
=
typeNoneCanvas
.
toDataURL
();
return
imageUrl
;
};
abvw/js/contentview_CreateObjects.js
View file @
7ca6b4aa
...
...
@@ -519,6 +519,7 @@ var htmlLinkButton = function (mediaType, actionType, id, imageUrl, x, y, w, h,
stopAllAudio
();
if
(
resourceUrl
!=
""
)
{
showHtml
(
resourceUrl
);
showDialog
(
true
);
}
...
...
abvw/js/contentview_Events.js
View file @
7ca6b4aa
...
...
@@ -14,6 +14,7 @@
/* add memo click */
function
handleAddMemo
(
event
)
{
if
(
ClientData
.
IsAddingMemo
()
==
true
)
{
ClientData
.
IsAddingMemo
(
false
);
isCopyMemo
=
false
;
...
...
@@ -44,7 +45,8 @@ function handleAddMemo(event) {
$
(
'#imgaddmemo'
).
removeClass
();
$
(
'#imgaddmemo'
).
addClass
(
'memoAdd'
);
}
else
{
}
else
{
ClientData
.
IsDisplayMemo
(
true
);
ClientData
.
IsAddingMemo
(
true
);
...
...
@@ -680,17 +682,23 @@ function onClick_CanvasMain(event) {
if
(
isClickLinkList
==
false
&&
ClientData
.
IsAddingMarking
()
==
false
)
{
/* area next and prev page */
var
cwMain
=
$
(
'#main'
).
width
();
//Start : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013 - Summary : Prevent click when transit
if
(
event
.
pageX
>
0
&&
event
.
pageX
<
300
)
{
if
(
!
isPreventClick
){
prevPage_click
();
}
else
{
isPreventClick
=
false
;
}
}
else
if
(
event
.
pageX
>
(
cwMain
-
300
)
&&
event
.
pageX
<
cwMain
)
{
if
(
!
isPreventClick
){
nextPage_click
();
}
else
{
isPreventClick
=
false
;
}
}
//End : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013 - Summary : Prevent click when transit
}
}
}
...
...
@@ -699,16 +707,26 @@ function onClick_CanvasMain(event) {
else
{
if
(
ClientData
.
IsAddingMarking
()
==
false
&&
isCopyMemo
==
false
)
{
var
cwMain
=
$
(
'#main'
).
width
();
//Start : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013 - Summary : Prevent click when transit
if
(
event
.
pageX
>
0
&&
event
.
pageX
<
300
)
{
if
(
!
isPreventClick
){
prevPage_click
();
//isPreventClick = true;
}
else
{
isPreventClick
=
false
;
}
}
else
if
(
event
.
pageX
>
(
cwMain
-
300
)
&&
event
.
pageX
<
cwMain
)
{
}
else
if
(
event
.
pageX
>
(
cwMain
-
300
)
&&
event
.
pageX
<
cwMain
)
{
if
(
!
isPreventClick
){
nextPage_click
();
}
else
{
isPreventClick
=
false
;
}
}
//End : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013 - Summary : Prevent click when transit
}
}
}
...
...
@@ -777,6 +795,13 @@ function mouseMove_canvasMain(event) {
//Start Function : No.20
else
if
(
moveFlag
&&
userScale
==
1
){
//Prevent 3d animate when moving
isPageTransition
=
true
;
//Start : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013 - Summary : Prevent click when transit
isPreventClick
=
true
;
//End : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013 - Summary : Prevent click when transit
var
x
=
event
.
pageX
;
var
y
=
event
.
pageY
;
var
deltaX
=
x
-
px
;
...
...
@@ -884,8 +909,6 @@ function mouseMove_canvasMain(event) {
}
};
var
_3dAnimate
=
false
;
var
cntTime
=
0
;
function
mouseDown_CanvasMain
(
event
)
{
...
...
@@ -933,31 +956,29 @@ function mouseDown_CanvasMain(event) {
var
imagePt
=
screenToImage
(
px
,
py
);
var
hitPageObj
=
getContent
().
currentPage
.
hitTest
(
imagePt
.
x
,
imagePt
.
y
);
if
(
hitPageObj
)
{
if
(
userScale
!=
1
){
moveFlag
=
true
;
}
else
{
moveFlag
=
false
;
if
(
is3DObject
(
hitPageObj
)){
moveFlag
=
true
;
clearTimeout
(
this
.
downTimer
);
this
.
downTimer
=
setTimeout
(
function
()
{
if
(
!
isPageTransition
){
_3dAnimate
=
true
;
_3dAction
=
_3dActionType
.
TouchStart_MouseDown
;
_curr3dObject
=
hitPageObj
;
hitPageObj
.
action
(
imagePt
);
moveFlag
=
false
;
},
_3dTimeToDetect
);
}
else
{
_3dAnimate
=
false
;
moveFlag
=
true
;
}
},
_3dTimeToDetect
);
}
}
else
{
moveFlag
=
tru
e
;
_3dAnimate
=
fals
e
;
}
//End Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary:
...
...
@@ -994,6 +1015,7 @@ function mouseUp_CanvasMain(event) {
//Check if mouse move is fired to prevent click next/ prev page
//isInMouseMove = false;
}
if
(
_3dAnimate
==
true
){
...
...
@@ -1003,6 +1025,11 @@ function mouseUp_CanvasMain(event) {
_curr3dObject
.
action
();
}
if
(
isPageTransition
){
isPageTransition
=
false
;
}
//End Function : No.20
};
...
...
@@ -1113,8 +1140,7 @@ function resetNaviAction(){
correctCanvasPosition
();
};
var
_isTouching
=
false
;
var
_isClick
=
false
;
function
onTouchstart
(
evt
){
if
(
ClientData
.
IsAddingMarking
()
==
true
){
...
...
@@ -1144,6 +1170,7 @@ function onTouchstart(evt){
break
;
}
if
(
!
bContinue
){
return
;
}
...
...
@@ -1167,6 +1194,9 @@ function onTouchstart(evt){
py
=
evt
.
pageY
;
}
else
{
touchDownFirstPosX
=
evt
.
clientX
;
touchDownFirstPosY
=
evt
.
clientY
;
//Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
var
imagePt
=
screenToImage
(
evt
.
pageX
,
evt
.
pageY
);
var
hitPageObj
=
getContent
().
currentPage
.
hitTest
(
imagePt
.
x
,
imagePt
.
y
);
...
...
@@ -1176,10 +1206,17 @@ function onTouchstart(evt){
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
);
}
else
{
...
...
@@ -1262,13 +1299,19 @@ function onTouchstart(evt){
if
(
is3DObject
(
hitPageObj
)){
clearTimeout
(
this
.
downTimer
);
this
.
downTimer
=
setTimeout
(
function
()
{
var
arr3DInfo
=
[];
if
(
isPageTransition
){
_3dAnimate
=
false
;
_isClick
=
true
;
}
else
{
_3dAction
=
_3dActionType
.
TouchStart_MouseDown
;
_curr3dObject
=
hitPageObj
;
hitPageObj
.
action
(
imagePt
);
_3dAnimate
=
true
;
_isClick
=
false
;
}
},
_3dTimeToDetect
);
}
...
...
@@ -1305,12 +1348,32 @@ function onTouchstart(evt){
});
px
=
touch1
.
clientX
+
touch2
.
clientX
/
2
;
py
=
touch1
.
clientY
+
touch1
.
clientY
/
2
;
//console.log("_lastDist:" + _lastDist);
_isPageNaviTouch
=
false
;
}
}
};
//limit area to detech if it is click(on win8)
var
clickLimitArea
=
20
;
//touch position
var
touchDownFirstPosX
=
0
;
var
touchDownFirstPosY
=
0
;
//position for click event on touch device
var
_touchPageX
=
0
;
var
_touchPageY
=
0
;
//Detect touch
var
_isTouching
=
false
;
//Detect click on touch device
var
_isClick
=
false
;
//Detech if page is being transition
var
isPageTransition
=
false
;
//Is 3d animating
var
_3dAnimate
=
false
;
//Start : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013
//is prevent click event
var
isPreventClick
=
false
;
//End : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013
function
onTouchmove
(
evt
){
if
(
ClientData
.
IsAddingMarking
()
==
true
){
...
...
@@ -1339,8 +1402,6 @@ function onTouchmove(evt){
return
;
}
//console.log("pointerId: " + evt.pointerId);
if
(
avwUserEnvObj
.
os
==
"ipad"
||
avwUserEnvObj
.
os
==
"android"
)
{
evt
.
preventDefault
();
}
...
...
@@ -1351,9 +1412,9 @@ function onTouchmove(evt){
if
(
_startPoints
.
length
==
1
){
//move page case
//when change from zoom mode
if
(
userScale
!=
1
){
_isPageNaviTouch
=
false
;
$
(
'#main'
).
css
(
'cursor'
,
'pointer'
);
...
...
@@ -1394,7 +1455,7 @@ function onTouchmove(evt){
}
else
{
if
(
_3dAnimate
){
_isPageNaviTouch
=
false
;
var
imagePt
=
screenToImage
(
evt
.
pageX
,
evt
.
pageY
);
var
hitObj
=
getContent
().
currentPage
.
hitTest
(
imagePt
.
x
,
imagePt
.
y
);
...
...
@@ -1407,11 +1468,28 @@ function onTouchmove(evt){
}
}
else
{
_isPageNaviTouch
=
true
;
//Detect is page transition to prevent 3d object animate
var
posDiffX
=
evt
.
clientX
-
touchDownFirstPosX
;
var
posDiffY
=
evt
.
clientY
-
touchDownFirstPosY
;
if
(
Math
.
abs
(
posDiffX
)
<
clickLimitArea
&&
Math
.
abs
(
posDiffY
)
<
clickLimitArea
){
isPageTransition
=
false
;
isPreventClick
=
false
;
}
else
{
isPageTransition
=
true
;
//Start : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013
//Prevent CLick when page is being transit
isPreventClick
=
true
;
//End : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013
}
touch1
=
{
clientX
:
evt
.
clientX
,
clientY
:
evt
.
clientY
,
pointerId
:
evt
.
pointerId
};
_bufferPoints
.
push
(
touch1
);
// add to buffer to use for another action if occur. ex: zoom page
//console.log("move page case");
if
(
animateType
==
animateTypeKeys
.
Type_Slide
){
$
(
'#mainPre'
).
css
(
"display"
,
'block'
);
...
...
@@ -1520,6 +1598,7 @@ function onTouchmove(evt){
else
{
//update last touch position
if
(
touch2
==
null
&&
_isPageNaviTouch
){
isPageTransition
=
true
;
currPos
=
{
x
:
touch1
.
clientX
,
y
:
touch1
.
clientY
};
if
(
!
_transitionObject
.
processNaviPage
(
currPos
)){
...
...
@@ -1612,6 +1691,13 @@ function onTouchend(evt){
_3dAction
=
_3dActionType
.
TouchEnd_MouseUp
;
_curr3dObject
.
action
();
}
if
(
isPageTransition
){
isPageTransition
=
false
;
touchDownFirstPosX
=
0
;
touchDownFirstPosY
=
0
;
}
}
//move page if enough condition
...
...
@@ -1815,10 +1901,13 @@ function onTouchend(evt){
_3dAction
=
_3dActionType
.
TouchEnd_MouseUp
;
_curr3dObject
.
action
();
}
if
(
isPageTransition
){
isPageTransition
=
false
;
}
}
};
var
_touchPageX
=
0
;
var
_touchPageY
=
0
;
function
processZoomPage
(
touch1
,
touch2
){
var
dist
=
getDistance
({
...
...
abvw/js/contentview_GetData.js
View file @
7ca6b4aa
...
...
@@ -1106,6 +1106,7 @@ function renderNextPage(){
var
pageNo
=
parseInt
(
changePageIndex
(
getPageIndex
()))
+
1
;
//Get next page background image
if
(
contentType
==
ContentTypeKeys
.
Type_PDF
){
avwGrabContentPageImage
(
ClientData
.
userInfo_accountPath
(),
{
contentId
:
contentID
,
sid
:
ClientData
.
userInfo_sid
(),
pageNo
:
pageNo
},
function
(
data
)
{
...
...
@@ -1119,15 +1120,25 @@ function renderNextPage(){
function
(
xmlHttpRequest
,
txtStatus
,
errorThrown
)
{
showErrorScreen
();
});
}
//Start Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary : Render next page content image the same with the current one
else
if
(
contentType
==
ContentTypeKeys
.
Type_NoFile
){
nextContent
.
setPageImages
(
totalPage
,
pageImages
)
.
setPageObjects
(
nextPageObjects
)
.
nextPage
();
}
//End Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary : Render next page content image the same with the current one
};
//Render prev Page Content
function
renderPrevPage
(){
//Get
next
page Number
//Get
prev
page Number
var
pageNo
=
parseInt
(
changePageIndex
(
getPageIndex
()))
-
1
;
//Get next page background image
//Get prev page background image
if
(
contentType
==
ContentTypeKeys
.
Type_PDF
){
avwGrabContentPageImage
(
ClientData
.
userInfo_accountPath
(),
{
contentId
:
contentID
,
sid
:
ClientData
.
userInfo_sid
(),
pageNo
:
pageNo
},
function
(
data
)
{
...
...
@@ -1141,6 +1152,14 @@ function renderPrevPage(){
function
(
xmlHttpRequest
,
txtStatus
,
errorThrown
)
{
showErrorScreen
();
});
}
//Start Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary : Render next page content image the same with the current one
else
if
(
contentType
==
ContentTypeKeys
.
Type_NoFile
){
prevContent
.
setPageImages
(
totalPage
,
pageImages
)
.
setPageObjects
(
prevPageObjects
)
.
previousPage
();
}
//End Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary : Render next page content image the same with the current one
};
//Get next page objects by page index
...
...
abvw/js/contentview_InitObjects.js
View file @
7ca6b4aa
...
...
@@ -114,9 +114,7 @@ function initDisplayToolbarDevice() {
function
initPage
()
{
//$('body,html').animate({ scrollTop: 0 }, 350);
//animateType = animateTypeKeys.Type_FadeIn;
$
(
'#divImageLoading'
).
css
(
'display'
,
'block'
);
...
...
@@ -142,6 +140,15 @@ function initPage() {
if
(
contentType
==
ContentTypeKeys
.
Type_Image
){
getContentInfoTypeImage
();
}
else
if
(
contentType
==
ContentTypeKeys
.
Type_NoFile
){
//Start Function: No.4 - Editor : Long - Date: 08/20/2013
getPageTransitionConfig
();
//End Function : No.4 - Editor : Long - Date : 08/20/2013
//Start Function: No.12 - Editor : Long - Date: 08/28/2013
getJsonContentInfoTyeNone
();
//Start Function: No.12 - Editor : Long - Date: 08/28/2013
}
else
{
getJsonContentInfo
();
...
...
@@ -275,10 +282,14 @@ function initPage() {
//Start Function: No.12 - Editor : Long - Summary : Render next page
//Get next
if
(
totalPage
>
1
){
getNextPageObjectsByPageIndex
(
pageObjectsData
,
getPageIndex
()
+
1
);
//Render next page
renderNextPage
();
}
//End Function: No.12 - Editor : Long - Summary : Render next page
...
...
@@ -376,7 +387,6 @@ function initPage() {
});
};
function
initPageMediaAndHtmlType
(){
//$('#divImageLoading').css('display', 'block');
...
...
@@ -421,7 +431,6 @@ function initPageMediaAndHtmlType(){
disable
(
'#txtSearch'
,
'#txtSlider'
);
};
//Start: Function: No.4 - Editor : Long - Date : 08/09/2013 - Summary : Create next and previous canvas
/* Initialize PageViewer Component */
function
initializeViewerComponent
(
viewId
)
{
...
...
abvw/js/header.js
View file @
7ca6b4aa
...
...
@@ -62,9 +62,15 @@ $(document).ready(function () {
//Hide search panel until click on text field
$
(
'div#header-searchbox'
).
css
(
'display'
,
'none'
);
if
(
isAnonymousLogin
())
{
$
(
'#li-login-username'
).
hide
();
}
else
{
//li-login-username
$
(
'#li-login-username'
).
show
();
//Display user name
$
(
'#login-username'
).
text
(
ClientData
.
userInfo_userName
());
}
$
(
'#dlgConfirmBackup-backup'
).
click
(
confirmWithBackupFunction
);
...
...
abvw/settings.html
View file @
7ca6b4aa
...
...
@@ -56,7 +56,7 @@
<a
class=
"logo"
href=
"javascript:void(0);"
onclick=
"avwScreenMove(ScreenIds.Home)"
>
</a>
<div
class=
"menu_language"
>
<ul>
<li><label
class=
"lang"
lang=
"txtLoginUser"
>
こんにちは
</label><label
id=
"login-username"
>
</label></li>
<li
id=
"li-login-username"
style=
"display:none;"
><label
class=
"lang"
lang=
"txtLoginUser"
>
こんにちは
</label><label
id=
"login-username"
>
</label></li>
<li
class=
"pushmessage hide"
id=
"liPushMessage"
><label
class=
"lang"
lang=
"txtPushAlert"
>
新着 :
</label><label
id=
"numbermessage"
></label><span></span>
<div
id=
"list-push-message"
>
...
...
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