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
a9faf1d0
Commit
a9faf1d0
authored
Apr 30, 2015
by
Masaru Abe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
変更無しだけど変更有りになってしまうので
parent
dbc98f72
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
129 additions
and
129 deletions
+129
-129
abvw/js/contentview_Quiz.js
+129
-129
No files found.
abvw/js/contentview_Quiz.js
View file @
a9faf1d0
//名前空間用のオブジェクトを用意する
//名前空間用のオブジェクトを用意する
var
CONTENTVIEW_QUIZ
=
{};
var
CONTENTVIEW_QUIZ
=
{};
// show dialog anket content
// show dialog anket content
CONTENTVIEW_QUIZ
.
showQuiz
=
function
(
url
,
fullscreen
,
objectId
)
{
CONTENTVIEW_QUIZ
.
showQuiz
=
function
(
url
,
fullscreen
,
objectId
)
{
var
$container
=
$
(
'#dialog'
);
var
$container
=
$
(
'#dialog'
);
//url = url + "?sid=" + CONTENTVIEW.getSessionId();
//url = url + "?sid=" + CONTENTVIEW.getSessionId();
$container
.
html
(
''
);
$container
.
html
(
''
);
$container
.
addClass
(
'anket-dialog'
);
$container
.
addClass
(
'anket-dialog'
);
var
canvas
=
document
.
getElementById
(
'main'
);
var
canvas
=
document
.
getElementById
(
'main'
);
var
width
=
fullscreen
==
true
?
canvas
.
width
:
340
;
var
width
=
fullscreen
==
true
?
canvas
.
width
:
340
;
if
(
fullscreen
==
true
)
{
if
(
fullscreen
==
true
)
{
$container
.
attr
(
'style'
,
'width:'
+
width
+
'px; left:10px;right:auto;'
);
$container
.
attr
(
'style'
,
'width:'
+
width
+
'px; left:10px;right:auto;'
);
}
}
else
{
else
{
$container
.
attr
(
'style'
,
'width:'
+
width
+
'px; right:10px;left:auto;'
);
// !important
$container
.
attr
(
'style'
,
'width:'
+
width
+
'px; right:10px;left:auto;'
);
// !important
}
}
$container
.
draggable
({
handle
:
"h1"
});
$container
.
draggable
({
handle
:
"h1"
});
$container
.
html
(
$container
.
html
(
'<h1>'
+
I18N
.
i18nText
(
'txtQuizTitle'
)
'<h1>'
+
I18N
.
i18nText
(
'txtQuizTitle'
)
+
'<img src="img/viewer/x.png" style="margin:3px 3px 0px 21px" id="btnClose" class="align_right" ></img>'
+
'<img src="img/viewer/x.png" style="margin:3px 3px 0px 21px" id="btnClose" class="align_right" ></img>'
+
'</h1>'
+
'</h1>'
+
'<div class="anket-container" id="anket-container"><iframe width="'
+
width
+
'" height="100%" frameborder="0" scrolling="auto" src="'
+
url
+
'">'
+
'<div class="anket-container" id="anket-container"><iframe width="'
+
width
+
'" height="100%" frameborder="0" scrolling="auto" src="'
+
url
+
'">'
+
'</iframe></div>'
+
'</iframe></div>'
+
'<div class="anket-commands" id="anket-commands"><input type="button" value="'
+
I18N
.
i18nText
(
'txtTransparent'
)
+
'" id="btnFullOpacity"/> <input type="button" value="'
+
I18N
.
i18nText
(
'txtSemiTransparent'
)
+
'" id="btnApartOpacity"/> <input type="button" value="'
+
I18N
.
i18nText
(
'txtNoTransparent'
)
+
'" id="btnNoOpacity"/></div><div style="clear:both;"></div>'
+
'<div class="anket-commands" id="anket-commands"><input type="button" value="'
+
I18N
.
i18nText
(
'txtTransparent'
)
+
'" id="btnFullOpacity"/> <input type="button" value="'
+
I18N
.
i18nText
(
'txtSemiTransparent'
)
+
'" id="btnApartOpacity"/> <input type="button" value="'
+
I18N
.
i18nText
(
'txtNoTransparent'
)
+
'" id="btnNoOpacity"/></div><div style="clear:both;"></div>'
);
);
$
(
"#btnClose"
).
on
({
$
(
"#btnClose"
).
on
({
'click touchend'
:
function
(
ev
){
'click touchend'
:
function
(
ev
){
//時間記録
//時間記録
var
dateEnd
=
new
Date
();
var
dateEnd
=
new
Date
();
var
actionTime
=
dateEnd
.
subtractBySeconds
(
dateStart
);
var
actionTime
=
dateEnd
.
subtractBySeconds
(
dateStart
);
//alert("actionTime:" + actionTime);
//alert("actionTime:" + actionTime);
COMMON
.
SetObjectLogActionTime
(
CONTENTVIEW_GENERAL
.
contentID
,
objectId
,
actionTime
);
COMMON
.
SetObjectLogActionTime
(
CONTENTVIEW_GENERAL
.
contentID
,
objectId
,
actionTime
);
$container
.
removeAttr
(
'style'
);
$container
.
removeAttr
(
'style'
);
CONTENTVIEW_GENERAL
.
hideDialog
();
CONTENTVIEW_GENERAL
.
hideDialog
();
return
false
;
return
false
;
},
},
'touchstart touchmove'
:
function
(){
'touchstart touchmove'
:
function
(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return
false
;
return
false
;
}
}
});
});
//時間記録
//時間記録
var
dateStart
=
new
Date
();
var
dateStart
=
new
Date
();
var
avwUserEnvObj
=
new
UserEnvironment
();
var
avwUserEnvObj
=
new
UserEnvironment
();
// set overflow for container iframe
// set overflow for container iframe
if
(
avwUserEnvObj
.
isIos
())
{
if
(
avwUserEnvObj
.
isIos
())
{
$
(
'#dialog .anket-container'
).
css
(
'overflow'
,
'scroll'
);
$
(
'#dialog .anket-container'
).
css
(
'overflow'
,
'scroll'
);
//$('#dialog .anket-container').css('-webkit-overflow-scrolling', 'touch');
//$('#dialog .anket-container').css('-webkit-overflow-scrolling', 'touch');
//$('#dialog .anket-container').css('position', 'relative');
//$('#dialog .anket-container').css('position', 'relative');
if
(
fullscreen
==
true
)
{
if
(
fullscreen
==
true
)
{
$container
.
attr
(
'style'
,
'width:'
+
width
+
'px; left:10px;right:auto;'
);
// !important on ipad can't move dialog
$container
.
attr
(
'style'
,
'width:'
+
width
+
'px; left:10px;right:auto;'
);
// !important on ipad can't move dialog
}
}
else
{
else
{
if
(
avwUserEnvObj
.
isIpad
())
{
if
(
avwUserEnvObj
.
isIpad
())
{
$container
.
attr
(
'style'
,
'width:'
+
width
+
'px; right:20px;left:auto;'
);
$container
.
attr
(
'style'
,
'width:'
+
width
+
'px; right:20px;left:auto;'
);
}
else
{
}
else
{
$container
.
attr
(
'style'
,
'width:'
+
width
+
'px; right:3px;left:auto;'
);
$container
.
attr
(
'style'
,
'width:'
+
width
+
'px; right:3px;left:auto;'
);
}
}
}
}
}
}
// click on button change transparent
// click on button change transparent
$
(
'#dialog .anket-commands input'
).
click
(
$
(
'#dialog .anket-commands input'
).
click
(
function
()
{
function
()
{
//START TRB00092 - EDITOR: Long - Date: 09/26/2013 - Summary : Fix opacity
//START TRB00092 - EDITOR: Long - Date: 09/26/2013 - Summary : Fix opacity
if
(
$
(
this
).
index
()
==
0
)
{
if
(
$
(
this
).
index
()
==
0
)
{
//set transparent
//set transparent
$
(
'#dialog,#dialog iframe,#anket-commands,#anket-commands input'
).
removeClass
(
'anket-opacity anket-transparent anket-translucent anket-transparent-content'
).
addClass
(
'anket-transparent'
);
$
(
'#dialog,#dialog iframe,#anket-commands,#anket-commands input'
).
removeClass
(
'anket-opacity anket-transparent anket-translucent anket-transparent-content'
).
addClass
(
'anket-transparent'
);
$
(
'#anket-container'
).
removeClass
(
'anket-opacity anket-transparent anket-translucent anket-transparent-content'
).
addClass
(
'anket-transparent-content'
);
$
(
'#anket-container'
).
removeClass
(
'anket-opacity anket-transparent anket-translucent anket-transparent-content'
).
addClass
(
'anket-transparent-content'
);
}
}
else
if
(
$
(
this
).
index
()
==
1
)
{
else
if
(
$
(
this
).
index
()
==
1
)
{
// set translucent
// set translucent
//END TRB00092 - EDITOR: Long - Date: 09/26/2013 - Summary : Fix opacity
//END TRB00092 - EDITOR: Long - Date: 09/26/2013 - Summary : Fix opacity
$
(
'#dialog,#dialog iframe,#anket-commands,#anket-commands input,#anket-container'
).
removeClass
(
'anket-opacity anket-transparent anket-translucent anket-transparent-content'
).
addClass
(
'anket-translucent'
);
$
(
'#dialog,#dialog iframe,#anket-commands,#anket-commands input,#anket-container'
).
removeClass
(
'anket-opacity anket-transparent anket-translucent anket-transparent-content'
).
addClass
(
'anket-translucent'
);
}
}
else
{
else
{
//set opacity
//set opacity
$
(
'#dialog,#dialog iframe,#anket-commands,#anket-commands input,#anket-container'
).
removeClass
(
'anket-opacity anket-transparent anket-translucent anket-transparent-content'
).
addClass
(
'anket-opacity'
);
$
(
'#dialog,#dialog iframe,#anket-commands,#anket-commands input,#anket-container'
).
removeClass
(
'anket-opacity anket-transparent anket-translucent anket-transparent-content'
).
addClass
(
'anket-opacity'
);
}
}
}
}
);
);
// resize anket
// resize anket
CONTENTVIEW_QUIZ
.
resizeAnket
();
CONTENTVIEW_QUIZ
.
resizeAnket
();
};
};
// resize dialog anket
// resize dialog anket
CONTENTVIEW_QUIZ
.
resizeAnket
=
function
()
{
CONTENTVIEW_QUIZ
.
resizeAnket
=
function
()
{
// get canvas main
// get canvas main
var
canvas
=
document
.
getElementById
(
'main'
);
var
canvas
=
document
.
getElementById
(
'main'
);
var
height
=
canvas
.
height
;
var
height
=
canvas
.
height
;
var
top
=
(
CONTENTVIEW_GENERAL
.
isFullScreen
?
0
:
$
(
'#header_toolbar'
).
height
())
+
4
;
// get top position for dialog 4 for space
var
top
=
(
CONTENTVIEW_GENERAL
.
isFullScreen
?
0
:
$
(
'#header_toolbar'
).
height
())
+
4
;
// get top position for dialog 4 for space
// set top dialog
// set top dialog
$
(
'#dialog'
).
height
(
height
).
css
(
'top'
,
top
);
$
(
'#dialog'
).
height
(
height
).
css
(
'top'
,
top
);
var
iframeHeight
=
height
-
$
(
'#dialog h1'
).
height
()
-
$
(
'#dialog .anket-commands'
).
height
()
-
8
;
// 8 for 2xspace
var
iframeHeight
=
height
-
$
(
'#dialog h1'
).
height
()
-
$
(
'#dialog .anket-commands'
).
height
()
-
8
;
// 8 for 2xspace
// set height for iframe
// set height for iframe
$
(
'#dialog iframe'
).
attr
(
'height'
,
iframeHeight
);
$
(
'#dialog iframe'
).
attr
(
'height'
,
iframeHeight
);
// set height for anket container
// set height for anket container
$
(
'#dialog .anket-container'
).
css
(
'height'
,
iframeHeight
);
$
(
'#dialog .anket-container'
).
css
(
'height'
,
iframeHeight
);
};
};
CONTENTVIEW_QUIZ
.
ready
=
function
(){
CONTENTVIEW_QUIZ
.
ready
=
function
(){
};
};
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