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
d2e384b5
Commit
d2e384b5
authored
May 22, 2015
by
vietdo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#9394【Web 1.1】タップしてPlayで再生中に再度タップしても止まらない
parent
fd0dbf2b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
247 additions
and
247 deletions
+247
-247
abvw-preview/js/contentview_CreateObjects.js
+247
-247
No files found.
abvw-preview/js/contentview_CreateObjects.js
View file @
d2e384b5
...
...
@@ -130,10 +130,10 @@ WebGetContentTyp4Object.prototype.drawObject = function (context, opt) {
context
.
globalAlpha
=
0.4
;
context
.
drawImage
(
imageObj
,
posX
,
posY
,
objWidth
,
objHeigth
);
//Start Function : No.4 - Editor: Long - Date : 08/14/2013 - Summary : handle lazy loading
flip
(
opt
);
//Start Function : No.4 - Editor: Long - Date : 08/14/2013 - Summary : handle lazy loading
//Start Function : No.4 - Editor: Long - Date : 08/14/2013 - Summary : handle lazy loading
context
.
globalAlpha
=
1
;
};
imageObj
.
src
=
this
.
imageUrl
;
...
...
@@ -149,12 +149,12 @@ var webContentType4 = function (id, x, y, w, h, imageUrl, linkKind, destURI, des
window
.
onbeforeunload
=
null
;
//window.open(destURI, "_blank", "new window");
window
.
open
(
destURI
,
"_self"
);
setTimeout
(
function
(){
ToogleLogoutNortice
();},
200
);
//END TRB00070
}
}
else
if
(
linkKind
==
"0"
)
{
changePage
(
changePageNo
(
destPageNumber
));
}
...
...
@@ -165,7 +165,7 @@ webContentType4.prototype = new WebGetContentTyp4Object();
/* ----------------------------------- End create webGetContentType4 -----------------------------*/
/**
* PageObject Class Definition
* PageObject Class Definition
*/
/* constructor */
...
...
@@ -203,9 +203,9 @@ var check;
/* draw page Object */
//Start Function: No.4 - Editor : Long - Date: 08/09/2013 - Summary : Edit function to draw object on next page
PageObject
.
prototype
.
drawPageObject
=
function
(
context
,
opt
)
{
var
nObjectCnt
=
0
;
//Check which pageObject to be count
if
(
opt
==
null
||
opt
==
0
){
nObjectCnt
=
pageObjects
.
length
;
...
...
@@ -216,7 +216,7 @@ PageObject.prototype.drawPageObject = function (context, opt) {
else
if
(
opt
==
2
){
nObjectCnt
=
prevPageObjects
.
length
;
}
if
(
this
.
visible
)
{
/* init data */
var
mediaType
=
this
.
mediaType
;
...
...
@@ -227,19 +227,19 @@ PageObject.prototype.drawPageObject = function (context, opt) {
var
h
=
this
.
height
;
var
tempUrl
=
this
.
imageUrl
;
var
isUsedTempImg
=
false
;
//START TRB00046 - Editor : Long - Date: 09/19/2013 - Summary : Fix for draw video object at center
if
(
mediaType
==
'6'
&&
tempUrl
==
'img/iPad_video.png'
){
isUsedTempImg
=
true
;
}
//END TRB00046 - Editor : Long - Date: 09/19/2013 - Summary : Fix for draw video object at center
if
(
mediaType
==
'5'
)
{
nCountObjectLoad
++
;
context
.
strokeStyle
=
"black"
;
context
.
lineWidth
=
"1"
;
context
.
strokeRect
(
x
,
y
,
w
,
h
);
flip
(
opt
);
}
...
...
@@ -280,34 +280,34 @@ PageObject.prototype.drawPageObject = function (context, opt) {
}
}
}
}
else
if
(
mediaType
==
'3'
)
{
/* audio */
img
.
width
=
50
;
img
.
height
=
50
;
//START TRB00035 - Editor : Long - Date: 09/17/2013 - Summary : Fix for draw audio object at center
context
.
drawImage
(
img
,
x
+
(
w
/
2
-
img
.
width
/
2
),
y
+
(
h
/
2
-
img
.
height
/
2
),
img
.
width
,
img
.
height
);
//END TRB00035 - Editor : Long - Date: 09/17/2013 - Summary : Fix for draw audio object at center
context
.
drawImage
(
img
,
x
+
(
w
/
2
-
img
.
width
/
2
),
y
+
(
h
/
2
-
img
.
height
/
2
),
img
.
width
,
img
.
height
);
//END TRB00035 - Editor : Long - Date: 09/17/2013 - Summary : Fix for draw audio object at center
}
else
if
(
mediaType
==
'6'
&&
isUsedTempImg
){
img
.
width
=
50
;
img
.
height
=
50
;
//START TRB00046 - Editor : Long - Date: 09/19/2013 - Summary : Fix for draw video object at center
context
.
drawImage
(
img
,
x
+
(
w
/
2
-
img
.
width
/
2
),
y
+
(
h
/
2
-
img
.
height
/
2
),
img
.
width
,
img
.
height
);
isUsedTempImg
=
false
;
//END TRB00046 - Editor : Long - Date: 09/19/2013 - Summary : Fix for draw video object at center
context
.
drawImage
(
img
,
x
+
(
w
/
2
-
img
.
width
/
2
),
y
+
(
h
/
2
-
img
.
height
/
2
),
img
.
width
,
img
.
height
);
isUsedTempImg
=
false
;
//END TRB00046 - Editor : Long - Date: 09/19/2013 - Summary : Fix for draw video object at center
}
else
{
context
.
drawImage
(
img
,
x
,
y
,
w
,
h
);
}
flip
(
opt
);
if
(
nCountObjectLoad
>=
nObjectCnt
)
{
if
(
nCountObjectLoad
>=
nObjectCnt
)
{
/* draw marking */
drawMarkingOnScreen
(
opt
);
...
...
@@ -322,7 +322,7 @@ PageObject.prototype.drawPageObject = function (context, opt) {
}
else
{
isLoadingObject
=
false
;
}
}
}
else
{
isLoadingObject
=
false
;
...
...
@@ -337,17 +337,17 @@ PageObject.prototype.drawPageObject = function (context, opt) {
if
(
totalPage
>
1
){
if
(
opt
!=
0
&&
opt
!=
null
){
enableButtonMarking
();
}
}
}
else
{
enableButtonMarking
();
}
}
}
else
{
enableButtonMarking
();
}
//End Function : No.4 - Summary : make sure all page is loaded
}
//End Function : No.4 - Summary : make sure all page is loaded
}
else
{
//Start Function : No.4 - Summary : make sure all page is loaded
if
(
contentType
==
ContentTypeKeys
.
Type_PDF
||
contentType
==
ContentTypeKeys
.
Type_NoFile
){
...
...
@@ -358,12 +358,12 @@ PageObject.prototype.drawPageObject = function (context, opt) {
}
else
{
enableAllControl
();
}
}
}
else
{
enableAllControl
();
}
//End Function : No.4 - Summary : make sure all page is loaded
//End Function : No.4 - Summary : make sure all page is loaded
}
/*finish loading */
...
...
@@ -376,7 +376,7 @@ PageObject.prototype.drawPageObject = function (context, opt) {
}
else
{
$
(
'#divImageLoading'
).
css
(
'display'
,
'none'
);
}
}
}
else
{
$
(
'#divImageLoading'
).
css
(
'display'
,
'none'
);
...
...
@@ -388,7 +388,7 @@ PageObject.prototype.drawPageObject = function (context, opt) {
}
};
img
.
src
=
this
.
imageUrl
;
}
}
else
{
if
(
nCountObjectLoad
>=
nObjectCnt
)
{
/* draw marking */
...
...
@@ -408,23 +408,23 @@ PageObject.prototype.drawPageObject = function (context, opt) {
}
else
{
enableButtonMarking
();
}
}
}
else
{
enableButtonMarking
();
}
//End Function : No.4 - Summary : make sure all page is loaded
//End Function : No.4 - Summary : make sure all page is loaded
}
else
{
//Start Function : No.4 - Summary : make sure all page is loaded
if
(
contentType
==
ContentTypeKeys
.
Type_PDF
||
contentType
==
ContentTypeKeys
.
Type_NoFile
){
if
(
totalPage
>
1
){
if
(
opt
!=
0
&&
opt
!=
null
){
enableAllControl
();
}
}
}
else
{
enableAllControl
();
}
enableAllControl
();
}
}
else
{
enableAllControl
();
...
...
@@ -432,17 +432,17 @@ PageObject.prototype.drawPageObject = function (context, opt) {
//End Function : No.4 - Summary : mak
}
/*finish loading */
/*finish loading */
//Start Function : No.4 - Summary : make sure all page is loaded
if
(
contentType
==
ContentTypeKeys
.
Type_PDF
||
contentType
==
ContentTypeKeys
.
Type_NoFile
){
if
(
totalPage
>
1
){
if
(
opt
!=
0
&&
opt
!=
null
){
$
(
'#divImageLoading'
).
css
(
'display'
,
'none'
);
}
}
}
else
{
$
(
'#divImageLoading'
).
css
(
'display'
,
'none'
);
}
}
}
else
{
$
(
'#divImageLoading'
).
css
(
'display'
,
'none'
);
...
...
@@ -461,10 +461,10 @@ PageObject.prototype.drawPageObject = function (context, opt) {
/*mediaType = 8 3d object*/
var
_isEnableRotate
=
false
;
var
object3d
=
function
(
mediaType
,
actionType
,
id
,
imageUrl
,
x
,
y
,
w
,
h
,
hCnt
,
vCnt
,
visible
,
imageObjects
){
this
.
setup
(
mediaType
,
actionType
,
id
,
imageUrl
,
x
,
y
,
w
,
h
,
visible
,
null
,
null
);
this
.
action
=
function
(
imagePt
){
this
.
action
=
function
(
imagePt
){
if
(
_3dAction
==
_3dActionType
.
TouchStart_MouseDown
){
OnMouseDown3D
(
id
,
imagePt
,
x
,
y
);
}
...
...
@@ -473,7 +473,7 @@ var object3d = function (mediaType, actionType, id, imageUrl, x, y, w, h, hCnt,
}
else
if
(
_3dAction
==
_3dActionType
.
TouchEnd_MouseUp
){
OnMouseEnd3D
(
id
,
hCnt
,
vCnt
);
}
}
};
};
object3d
.
prototype
=
new
PageObject
();
...
...
@@ -528,7 +528,7 @@ listVideo.prototype = new PageObject();
var
trigger
=
function
(
mediaType
,
actionType
,
id
,
imageUrl
,
x
,
y
,
w
,
h
,
index
,
target
,
visible
,
actionFunction
)
{
this
.
setup
(
mediaType
,
actionType
,
id
,
imageUrl
,
x
,
y
,
w
,
h
,
visible
,
actionFunction
,
null
);
this
.
action
=
function
()
{
// draw object
// draw object
for
(
var
nIndex
=
0
;
nIndex
<
objType4_5
.
length
;
nIndex
++
)
{
for
(
var
nIndex1
=
0
;
nIndex1
<
objType4_5
[
nIndex
].
dataObjects
.
length
;
nIndex1
++
)
{
...
...
@@ -548,54 +548,54 @@ var trigger = function (mediaType, actionType, id, imageUrl, x, y, w, h, index,
};
trigger
.
prototype
=
new
PageObject
();
//Start Function : No.9 - Editor : Long - Date: 08/16/2013 - Summary :
//Start Function : No.9 - Editor : Long - Date: 08/16/2013 - Summary :
var
htmlLinkButton
=
function
(
mediaType
,
actionType
,
id
,
imageUrl
,
x
,
y
,
w
,
h
,
visible
,
resourceUrl
)
{
this
.
setup
(
mediaType
,
actionType
,
id
,
imageUrl
,
x
,
y
,
w
,
h
,
visible
,
null
,
null
);
this
.
action
=
function
()
{
/*stop audio on page */
stopAllAudio
();
if
(
resourceUrl
!=
""
)
{
showHtml
(
resourceUrl
);
showDialog
(
true
);
}
}
};
};
htmlLinkButton
.
prototype
=
new
PageObject
();
function
showHtml
(
url
){
var
$container
=
$
(
'#dialog'
);
$container
.
html
(
''
);
$container
.
attr
(
'style'
,
'background-color: white; width:100%; left:0% !important'
);
$container
.
attr
(
'style'
,
'background-color: white; width:100%; left:0% !important'
);
//START TRB00076 - EDITOR : Long - Date : 09/24/2013 - Summary : Fix for scrolling on ipad
if
(
avwUserEnvObj
.
os
==
"ipad"
){
if
(
avwUserEnvObj
.
os
==
"ipad"
){
$container
.
html
(
'<h1>'
+
'<img src="img/viewer/x.png" style="margin:3px 3px 0px 21px" id="btnClose" class="align_right" ></img>'
'<h1>'
+
'<img src="img/viewer/x.png" style="margin:3px 3px 0px 21px" id="btnClose" class="align_right" ></img>'
+
'</h1>'
+
'<div id="html-wrap" style="height: 95%; position: absolute; width: 100%;">'
+
'<iframe src="'
+
url
+
'" style="position: absolute; width: 100%; height: 100%; ">'
+
'</iframe>'
+
'</div>'
);
$
(
'#html-wrap'
).
css
(
'overflow'
,
'scroll'
);
$
(
'#html-wrap'
).
css
(
'-webkit-overflow-scrolling'
,
'touch'
);
}
else
{
$container
.
html
(
'<h1>'
+
'<img src="img/viewer/x.png" style="margin:3px 3px 0px 21px" id="btnClose" class="align_right" ></img>'
'<h1>'
+
'<img src="img/viewer/x.png" style="margin:3px 3px 0px 21px" id="btnClose" class="align_right" ></img>'
+
'</h1>'
+
'<iframe src="'
+
url
+
'" style="position: absolute; width: 100%; height: 95%; ">'
+
'</iframe>'
);
}
//END TRB00076 - EDITOR : Long - Date : 09/24/2013 - Summary : Fix for scrolling on ipad
//END TRB00076 - EDITOR : Long - Date : 09/24/2013 - Summary : Fix for scrolling on ipad
$
(
'#dialog h1 img'
).
click
(
function
(){
$container
.
removeAttr
(
'style'
);
hideDialog
();
...
...
@@ -608,22 +608,22 @@ var anket = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible,
this
.
action
=
function
()
{
/*stop audio on page */
stopAllAudio
();
var
url
=
getURLPageImage
(
"webEnqueteReply/init"
)
+
"/?abObjectId="
+
objectId
+
"&sid="
+
ClientData
.
userInfo_sid
()
+
'&pid='
+
pid
;
var
isFullScreen
=
false
;
if
(
parseInt
(
fullscreen
)
==
1
){
isFullScreen
=
true
;
}
showAnket
(
url
,
isFullScreen
);
showDialog
(
true
);
};
};
anket
.
prototype
=
new
PageObject
();
//End Function : No.9 - Editor : Long - Date: 08/16/2013 - Summary :
//End Function : No.9 - Editor : Long - Date: 08/16/2013 - Summary :
/* mediaType=3 Audio object : extends PageObject */
var
audioType3
=
function
(
mediaType
,
actionType
,
id
,
imageUrl
,
x
,
y
,
w
,
h
,
visible
,
audioFile
,
playType
)
{
...
...
@@ -637,7 +637,7 @@ var audioType3 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visi
else
{
//START : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
if
(
playType
==
'2'
||
playType
==
2
){
}
else
{
createAudio
(
audioFile
,
playType
);
...
...
@@ -645,7 +645,7 @@ var audioType3 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visi
//END : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
this
.
setup
(
mediaType
,
actionType
,
id
,
null
,
x
,
y
,
w
,
h
,
visible
,
null
,
null
);
this
.
action
=
function
()
{
};
}
};
...
...
@@ -655,9 +655,9 @@ audioType3.prototype = new PageObject();
var
jumpPage
=
function
(
mediaType
,
actionType
,
id
,
imageUrl
,
x
,
y
,
w
,
h
,
visible
,
jumpPage
)
{
this
.
setup
(
mediaType
,
actionType
,
id
,
imageUrl
,
x
,
y
,
w
,
h
,
visible
,
null
,
null
);
this
.
action
=
function
()
{
if
((
Number
(
jumpPage
)
-
1
)
!=
getPageIndex
())
{
if
((
Number
(
jumpPage
)
-
1
)
!=
getPageIndex
())
{
createLockLayout
(
true
);
changePage
(
Number
(
jumpPage
)
-
1
);
changePage
(
Number
(
jumpPage
)
-
1
);
}
};
};
...
...
@@ -699,10 +699,10 @@ var moveToContent = function (mediaType, actionType, id, imageUrl, x, y, w, h, v
this
.
action
=
function
()
{
var
$dialog
=
$
(
'#contentAudioConfirm'
);
var
$overlay
=
$
(
'#overlay'
);
$dialog
.
find
(
"#txtContentAudio"
).
html
(
i18nText
(
"txtPreventLink"
));
$dialog
.
find
(
"#txtContentAudio"
).
attr
(
"lang"
,
'txtPreventLink'
);
$dialog
.
center
();
$dialog
.
show
();
$overlay
.
show
();
...
...
@@ -710,20 +710,20 @@ var moveToContent = function (mediaType, actionType, id, imageUrl, x, y, w, h, v
$overlay
.
hide
();
$dialog
.
hide
();
$dialog
.
find
(
"#txtContentAudio"
).
attr
(
"lang"
,
'txtContentAudio'
);
});
});
};
};
moveToContent
.
prototype
=
new
PageObject
();
//START TRB00033 - EDITOR: Long - Date : 09/12/2013 - Summary : limit content
var
alertMessageLevel
=
{
ShowAlert
:
'1'
,
RequirePassword
:
'2'
,
None
:
'0'
None
:
'0'
};
function
showContentConfirmDialog
(
type
,
msg
)
{
function
showContentConfirmDialog
(
type
,
msg
)
{
if
(
type
==
alertMessageLevel
.
ShowAlert
){
createAlertTypeDialog
(
msg
);
showDialog
(
true
);
...
...
@@ -743,31 +743,31 @@ function createAlertTypeDialog(msg){
$container
.
html
(
' <h1 class="lang" lang="txtContentWarning">'
+
i18nText
(
"txtContentWarning"
)
+
'</h1>'
+
' <p class="message">'
+
msg
+
msg
+
' </p>'
+
' <p class="deletebtn">'
+
' <a lang="dspOK" class="ok lang" id="contentAlertOk">OK</a>'
+
' <a lang="dspCancel" class="cancel lang" id="contentAlertCancel">キャンセル</a>'
+
' </p>'
);
$container
.
center
();
);
$container
.
center
();
$
(
'#dialog a#contentAlertCancel'
).
click
(
function
(){
hideDialog
();
hideDialog
();
var
removeTimeOut
=
setTimeout
(
function
(){
$container
.
removeClass
(
'sectionLimitAccess'
);
},
200
);
},
200
);
});
$
(
'#dialog a#contentAlertOk'
).
click
(
function
(){
ClientData
.
common_preContentId
(
moveContentParam
.
preContentId
);
ClientData
.
common_prePageNo
(
moveContentParam
.
prePageNo
);
/* store old page */
var
dataJump
=
ClientData
.
JumpQueue
();
dataJump
.
push
(
moveContentParam
.
oldContent
);
ClientData
.
JumpQueue
(
dataJump
);
avwScreenMove
(
ScreenIds
.
ContentView
);
/* store old page */
var
dataJump
=
ClientData
.
JumpQueue
();
dataJump
.
push
(
moveContentParam
.
oldContent
);
ClientData
.
JumpQueue
(
dataJump
);
avwScreenMove
(
ScreenIds
.
ContentView
);
});
};
...
...
@@ -781,24 +781,24 @@ function createPwdRequiredTypeDialog(){
+
' <p class="message">'
+
' <label class="text lang" lang="txtContentPWMsg">'
+
i18nText
(
"txtContentPWMsg"
)
+
'</label>'
+
' <input type="password" />'
+
' <label class="error" id="lblMessageLimitError"></label> '
+
' <label class="error" id="lblMessageLimitError"></label> '
+
' </p>'
+
' <p class="deletebtn">'
+
' <a lang="dspOK" class="ok lang" id="contentAlertOk">OK</a>'
+
' <a lang="dspCancel" class="cancel lang" id="contentAlertCancel">キャンセル</a>'
+
' </p>'
);
$container
.
center
();
);
$container
.
center
();
$
(
'#dialog a#contentAlertCancel'
).
click
(
function
(){
hideDialog
();
hideDialog
();
var
removeTimeOut
=
setTimeout
(
function
(){
$container
.
removeClass
(
'sectionLimitAccess'
);
},
200
);
});
$
(
'#dialog a#contentAlertOk'
).
click
(
function
()
{
var
password
=
$
(
'.sectionLimitAccess .message input'
).
val
();
...
...
@@ -820,20 +820,20 @@ function createPwdRequiredTypeDialog(){
avwCmsApiSyncWithUrl
(
apiLoginUrl
,
null
,
'webClientLogin'
,
'GET'
,
params
,
function
(
data
)
{
if
(
data
.
result
==
'success'
)
{
if
(
data
.
result
==
'success'
)
{
ClientData
.
common_preContentId
(
moveContentParam
.
preContentId
);
ClientData
.
common_prePageNo
(
moveContentParam
.
prePageNo
);
/* store old page */
var
dataJump
=
ClientData
.
JumpQueue
();
dataJump
.
push
(
moveContentParam
.
oldContent
);
ClientData
.
JumpQueue
(
dataJump
);
/* store old page */
var
dataJump
=
ClientData
.
JumpQueue
();
dataJump
.
push
(
moveContentParam
.
oldContent
);
ClientData
.
JumpQueue
(
dataJump
);
// update sid id
ClientData
.
userInfo_sid
(
data
.
sid
);
avwScreenMove
(
ScreenIds
.
ContentView
);
ClientData
.
userInfo_sid
(
data
.
sid
);
avwScreenMove
(
ScreenIds
.
ContentView
);
}
else
{
$
(
'#lblMessageLimitError'
).
html
(
format
(
i18nText
(
'msgLoginErrWrong'
),
data
.
errorMessage
).
toString
()).
show
();
...
...
@@ -861,7 +861,7 @@ var videoType2 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visi
stopAllAudio
();
if
(
embed
==
"1"
)
{
showVideoObject
(
x
,
y
,
w
,
h
,
mediaFile
,
false
);
}
}
else
{
if
(
media
!=
''
)
{
$
(
'#playvideo'
).
children
().
remove
();
...
...
@@ -972,7 +972,7 @@ Rect.prototype.center = function () {
};
/**
* Content Class Definition
* Content Class Definition
*/
var
Content
=
function
()
{
...
...
@@ -1022,7 +1022,7 @@ Content.prototype.hasNextPage = function () {
Content
.
prototype
.
nextPage
=
function
()
{
this
.
pageIndex
++
;
if
(
this
.
pageIndex
>
(
this
.
pageCount
-
1
))
{
this
.
pageIndex
=
this
.
pageCount
-
1
;
}
this
.
setUpPage
(
this
.
pageIndex
,
1
);
...
...
@@ -1054,7 +1054,7 @@ Content.prototype.toPage = function (index) {
this
.
pageIndex
=
0
;
}
this
.
setUpPage
(
this
.
pageIndex
);
//START : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
createPageBGM
();
//END : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
...
...
@@ -1062,14 +1062,14 @@ Content.prototype.toPage = function (index) {
};
/**
* Transition Class Definition
* Transition Class Definition
*/
var
Transition
=
function
()
{
};
//Start Functon : No.4 - Editor : Long - Date : 08/09/2013 - Summary :
//Start Functon : No.4 - Editor : Long - Date : 08/09/2013 - Summary :
/* Flip Next Page Transition */
Transition
.
prototype
.
flipNextPage
=
function
()
{
var
w
=
$
(
'#canvasWrapper'
).
width
();
removeObject
();
if
(
animateType
==
animateTypeKeys
.
Type_FadeIn
){
...
...
@@ -1080,58 +1080,58 @@ Transition.prototype.flipNextPage = function () {
else
{
$
(
'#mainNext'
).
css
(
'display'
,
'block'
);
}
if
(
getContent
().
hasNextPage
())
{
if
(
animateType
==
animateTypeKeys
.
Type_Slide
){
$
(
'#canvasWrapper'
).
stop
(
true
).
animate
(
{
left
:
'-'
+
w
+
'px'
},
{
duration
:
animatePeriod
,
complete
:
function
()
{
complete
:
function
()
{
assignCurrentContentPage
(
1
);
//Change id of canvas
switchCanvas
(
1
);
//restore canvas event
setDefaultEvent
();
//init image bookmark
//init image bookmark
initImageBookmark
();
//Change slider
changeSlider
(
getContent
().
pageIndex
);
//Draw marking on current screen
//drawMarkingOnScreen();
//drawMarkingOnScreen();
//Correct position of canvas for next flipping
correctCanvasPosition
();
//START : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
createPageBGM
();
//END : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
//END : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
if
(
getPageIndex
()
<
totalPage
-
1
){
//Get Next Page Object
getNextPageObjectsByPageIndex
(
pageObjectsData
,
getPageIndex
()
+
1
);
//Load Next
renderNextPage
();
renderNextPage
();
}
else
{
//Enable all control
enableAllControl
();
enableAllControl
();
$
(
'#divImageLoading'
).
css
(
'display'
,
'none'
);
isLoadingObject
=
false
;
}
}
/* init image had draw */
initDisplayMarking
();
/* change title of page */
if
(
dataPageTitle
[
getContent
().
pageIndex
])
{
if
(
dataPageTitle
[
getContent
().
pageIndex
]
!=
''
)
{
...
...
@@ -1151,50 +1151,50 @@ Transition.prototype.flipNextPage = function () {
}
else
if
(
animateType
==
animateTypeKeys
.
Type_FadeIn
){
$
(
'#main'
).
stop
(
true
).
fadeOut
(
{
{
duration
:
animatePeriod
,
complete
:
function
()
{
complete
:
function
()
{
assignCurrentContentPage
(
1
);
//Change id of canvas
switchCanvas
(
1
);
//restore canvas event
setDefaultEvent
();
//init image bookmark
//init image bookmark
initImageBookmark
();
//Change slider
changeSlider
(
getContent
().
pageIndex
);
//Draw marking on current screen
//drawMarkingOnScreen();
//drawMarkingOnScreen();
//Correct position of canvas for next flipping
correctCanvasPosition
();
if
(
getPageIndex
()
<
totalPage
-
1
){
//Get Next Page Object
getNextPageObjectsByPageIndex
(
pageObjectsData
,
getPageIndex
()
+
1
);
//Load Next
renderNextPage
();
}
else
{
//Enable all control
enableAllControl
();
enableAllControl
();
$
(
'#divImageLoading'
).
css
(
'display'
,
'none'
);
isLoadingObject
=
false
;
}
}
/* init image had draw */
initDisplayMarking
();
/* change title of page */
if
(
dataPageTitle
[
getContent
().
pageIndex
])
{
if
(
dataPageTitle
[
getContent
().
pageIndex
]
!=
''
)
{
...
...
@@ -1212,7 +1212,7 @@ Transition.prototype.flipNextPage = function () {
}
});
}
initImageCheckMarking
();
initImageCheckMarking
();
}
};
/* Flip Previous Page Transition */
...
...
@@ -1227,51 +1227,51 @@ Transition.prototype.flipPreviousPage = function () {
else
{
$
(
'#mainPre'
).
css
(
'display'
,
'block'
);
}
if
(
getContent
().
hasPreviousPage
())
{
if
(
getContent
().
hasPreviousPage
())
{
if
(
animateType
==
animateTypeKeys
.
Type_Slide
){
$
(
'#canvasWrapper'
).
stop
(
true
).
animate
(
{
left
:
w
+
'px'
},
{
duration
:
animatePeriod
,
complete
:
function
()
{
complete
:
function
()
{
assignCurrentContentPage
(
2
);
//Change id of canvas
switchCanvas
(
2
);
//restore canvas event
setDefaultEvent
();
//init image bookmark
//init image bookmark
initImageBookmark
();
//Change slider
changeSlider
(
getContent
().
pageIndex
);
//Draw marking on current screen
//drawMarkingOnScreen();
//drawMarkingOnScreen();
//Correct position of canvas for next flipping
correctCanvasPosition
();
//START : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
//START : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
createPageBGM
();
//END : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
if
(
getPageIndex
()
>
0
){
//Get Next Page Object
getPrevPageObjectsByPageIndex
(
pageObjectsData
,
getPageIndex
()
-
1
);
//Load Next
renderPrevPage
();
}
else
{
//Enable all control
enableAllControl
();
enableAllControl
();
$
(
'#divImageLoading'
).
css
(
'display'
,
'none'
);
isLoadingObject
=
false
;
}
}
/* init image had draw */
initDisplayMarking
();
/* change title of page */
...
...
@@ -1295,46 +1295,46 @@ Transition.prototype.flipPreviousPage = function () {
$
(
'#main'
).
stop
(
true
).
fadeOut
(
{
duration
:
animatePeriod
,
complete
:
function
()
{
complete
:
function
()
{
assignCurrentContentPage
(
2
);
//Change id of canvas
switchCanvas
(
2
);
//restore canvas event
setDefaultEvent
();
//init image bookmark
//init image bookmark
initImageBookmark
();
//Change slider
changeSlider
(
getContent
().
pageIndex
);
//Draw marking on current screen
//drawMarkingOnScreen();
//drawMarkingOnScreen();
//Correct position of canvas for next flipping
correctCanvasPosition
();
if
(
getPageIndex
()
>
0
){
//Get Next Page Object
getPrevPageObjectsByPageIndex
(
pageObjectsData
,
getPageIndex
()
-
1
);
//Load Next
renderPrevPage
();
}
else
{
//Enable all control
enableAllControl
();
enableAllControl
();
$
(
'#divImageLoading'
).
css
(
'display'
,
'none'
);
isLoadingObject
=
false
;
}
}
/* init image had draw */
initDisplayMarking
();
/* change title of page */
if
(
dataPageTitle
[
getContent
().
pageIndex
])
{
if
(
dataPageTitle
[
getContent
().
pageIndex
]
!=
''
)
{
...
...
@@ -1352,18 +1352,18 @@ Transition.prototype.flipPreviousPage = function () {
}
});
}
}
};
//Start Functon : No.4 - Editor : Long - Date : 08/09/2013 - Summary :
//Start Functon : No.4 - Editor : Long - Date : 08/09/2013 - Summary :
/* Flip Page Transition */
Transition
.
prototype
.
flipToPage
=
function
(
index
)
{
var
w
=
$
(
'#main'
).
attr
(
'width'
);
if
(
index
==
getContent
().
pageIndex
)
{
/* init image had draw */
initDisplayMarking
();
initDisplayMarking
();
}
else
if
(
index
<
getContent
().
pageIndex
)
{
context_main
.
clearRect
(
0
,
0
,
canvas_main
.
width
,
canvas_main
.
height
);
removeObject
();
...
...
@@ -1384,39 +1384,39 @@ Transition.prototype.flipToPage = function (index) {
//change pageIndex and image bookmark
userScale
=
1
;
//START TRB00097
//changeScale(userScale);
//changeScale(userScale);
srcRect
=
new
Rect
(
0
,
0
,
0
,
0
);
srcRectNext
=
new
Rect
(
0
,
0
,
0
,
0
);
srcRectPrev
=
new
Rect
(
0
,
0
,
0
,
0
);
destRect
=
new
Rect
(
0
,
0
,
0
,
0
);
destRectNext
=
new
Rect
(
0
,
0
,
0
,
0
);
destRectPrev
=
new
Rect
(
0
,
0
,
0
,
0
);
//END TRB00097
//END TRB00097
checkDisableButtonZoom
();
getContent
().
toPage
(
index
);
getContent
().
toPage
(
index
);
if
(
index
>
0
){
prevContent
.
pageIndex
=
getPageIndex
();
getPrevPageObjectsByPageIndex
(
pageObjectsData
,
index
-
1
);
getPrevPageObjectsByPageIndex
(
pageObjectsData
,
index
-
1
);
renderPrevPage
();
}
if
(
index
<
totalPage
-
1
){
nextContent
.
pageIndex
=
getPageIndex
();
getNextPageObjectsByPageIndex
(
pageObjectsData
,
index
+
1
);
renderNextPage
();
}
initImageBookmark
();
checkExistNextPrePage
();
changeSlider
(
index
);
/* init image had draw */
initDisplayMarking
();
/* change title of page */
if
(
dataPageTitle
[
index
])
{
if
(
dataPageTitle
[
index
])
{
if
(
dataPageTitle
[
index
]
!=
''
)
{
document
.
title
=
contentName
+
'_'
+
dataPageTitle
[
index
]
+
' | '
+
i18nText
(
'sysAppTitle'
);
}
else
{
...
...
@@ -1428,12 +1428,12 @@ Transition.prototype.flipToPage = function (index) {
/* set end log */
SetEndLog
(
contentID
);
initImageCheckMarking
();
createLockLayout
(
false
);
}
}
);
}
}
else
{
context_main
.
clearRect
(
0
,
0
,
canvas_main
.
width
,
canvas_main
.
height
);
removeObject
();
...
...
@@ -1454,26 +1454,26 @@ Transition.prototype.flipToPage = function (index) {
//change pageIndex and image bookmark
userScale
=
1
;
//START TRB00097
//changeScale(userScale);
//changeScale(userScale);
srcRect
=
new
Rect
(
0
,
0
,
0
,
0
);
srcRectNext
=
new
Rect
(
0
,
0
,
0
,
0
);
srcRectPrev
=
new
Rect
(
0
,
0
,
0
,
0
);
destRect
=
new
Rect
(
0
,
0
,
0
,
0
);
destRectNext
=
new
Rect
(
0
,
0
,
0
,
0
);
destRectPrev
=
new
Rect
(
0
,
0
,
0
,
0
);
//END TRB00097
//END TRB00097
checkDisableButtonZoom
();
getContent
().
toPage
(
index
);
getContent
().
toPage
(
index
);
if
(
index
>
0
){
prevContent
.
pageIndex
=
getPageIndex
();
getPrevPageObjectsByPageIndex
(
pageObjectsData
,
index
-
1
);
getPrevPageObjectsByPageIndex
(
pageObjectsData
,
index
-
1
);
renderPrevPage
();
}
if
(
index
<
totalPage
-
1
){
nextContent
.
pageIndex
=
getPageIndex
();
getNextPageObjectsByPageIndex
(
pageObjectsData
,
index
+
1
);
...
...
@@ -1498,12 +1498,12 @@ Transition.prototype.flipToPage = function (index) {
/* set end log */
SetEndLog
(
contentID
);
initImageCheckMarking
();
createLockLayout
(
false
);
}
});
}
}
};
function
createTextConfirmAudio
()
{
...
...
@@ -1636,9 +1636,9 @@ function createAudio(audio, type) {
document
.
getElementById
(
"play_audio_0"
).
play
();
}
}
else
if
(
type
==
"1"
)
{
/* play all page */
}
else
if
(
type
==
"1"
)
{
/* play all page */
if
(
document
.
getElementById
(
"play_audio_1"
)
!=
undefined
)
{
if
(
ClientData
.
userOpt_musicMode
()
==
"1"
)
{
...
...
@@ -1647,12 +1647,12 @@ function createAudio(audio, type) {
$('#playaudioallpage').html(
' <embed id="play_audio_1" src="' + audio + '&key=' + (new Date()).toIdString() + '" autostart="true" loop="true" hidden="true"> </embed>'
);*/
}
}
else
{
if
(
!
isPendingContentBGM
){
document
.
getElementById
(
"play_audio_1"
).
play
();
}
}
}
}
else
{
...
...
@@ -1668,18 +1668,18 @@ function createAudio(audio, type) {
}
}
}
}
}
else
{
TypeAudio1
=
type
;
srcAudioType1
=
audio
;
if
(
ClientData
.
userOpt_musicMode
()
==
"1"
)
{
if
(
ClientData
.
userOpt_musicMode
()
==
"1"
)
{
if
(
avwUserEnvObj
.
browser
==
'firefox'
)
{
$
(
'#playaudioallpage'
).
html
(
' <embed id="play_audio_1" src="'
+
audio
+
'&key='
+
(
new
Date
()).
toIdString
()
+
'" autostart="true" loop="true" hidden="true"> </embed>'
);
}
}
else
if
(
avwUserEnvObj
.
os
==
"ipad"
)
{
$
(
'#playaudioallpage'
).
html
(
' <audio id="play_audio_1" loop="loop" >'
+
...
...
@@ -1687,7 +1687,7 @@ function createAudio(audio, type) {
' </audio>'
);
}
else
{
else
{
if
(
isPendingContentBGM
){
$
(
'#playaudioallpage'
).
html
(
' <audio id="play_audio_1" loop="loop" >'
+
...
...
@@ -1696,7 +1696,7 @@ function createAudio(audio, type) {
);
document
.
getElementById
(
'play_audio_1'
).
load
();
isPendingContentBGM
=
false
;
}
else
{
$
(
'#playaudioallpage'
).
html
(
...
...
@@ -1727,7 +1727,7 @@ function createAudio(audio, type) {
);
document
.
getElementById
(
'play_audio_1'
).
load
();
isPendingContentBGM
=
false
;
}
else
{
$
(
'#playaudioallpage'
).
html
(
...
...
@@ -1764,8 +1764,8 @@ function createAudio(audio, type) {
}
}
}
else
if
(
type
==
"2"
)
{
/* play on page */
else
if
(
type
==
"2"
)
{
/* play on page */
if
(
document
.
getElementById
(
"play_audio_2"
)
==
undefined
)
{
stopAllAudio
();
...
...
@@ -1837,24 +1837,24 @@ function createAudio(audio, type) {
//START : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
function
createPageBGM
(){
var
currentPageObject
=
getContent
().
pageObjects
;
var
audioFile
=
''
;
var
playType
=
''
;
$
(
'#playaudiopage'
).
html
(
''
);
for
(
var
i
=
0
;
i
<
currentPageObject
.
length
;
i
++
){
var
BGMObject
=
currentPageObject
[
i
];
if
(
BGMObject
.
mediaType
==
'3'
&&
BGMObject
.
actionType
==
'2'
&&
BGMObject
.
playType
==
'2'
){
if
(
BGMObject
.
mediaType
==
'3'
&&
BGMObject
.
actionType
==
'2'
&&
BGMObject
.
playType
==
'2'
){
audioFile
=
BGMObject
.
audioFile
;
playType
=
BGMObject
.
playType
;
createAudio
(
audioFile
,
playType
);
break
;
}
}
}
};
//END : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
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