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
48b03076
Commit
48b03076
authored
Jun 04, 2015
by
vietdo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#16382 アンケートコンテンツ・試験コンテンツ
parent
82cfc9b8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
122 additions
and
90 deletions
+122
-90
abvw/common/js/avweb.js
+68
-68
abvw/js/contentview.js
+54
-22
No files found.
abvw/common/js/avweb.js
View file @
48b03076
...
@@ -13,12 +13,12 @@ AVWEB.hasErrorKey = 'AVW_HASERR';
...
@@ -13,12 +13,12 @@ AVWEB.hasErrorKey = 'AVW_HASERR';
* User Environment Check Class
* User Environment Check Class
*/
*/
var
UserEnvironment
=
function
()
{
var
UserEnvironment
=
function
()
{
this
.
appName
=
navigator
.
appName
;
this
.
appName
=
navigator
.
appName
;
this
.
userAgent
=
navigator
.
userAgent
;
this
.
userAgent
=
navigator
.
userAgent
;
this
.
os
=
checkOS
(
this
.
userAgent
);
this
.
os
=
checkOS
(
this
.
userAgent
);
this
.
browser
=
checkBrowser
(
this
.
userAgent
);
this
.
browser
=
checkBrowser
(
this
.
userAgent
);
/* windows os check */
/* windows os check */
this
.
isWindows
=
function
()
{
this
.
isWindows
=
function
()
{
return
(
this
.
os
==
"windows"
);
return
(
this
.
os
==
"windows"
);
...
@@ -27,12 +27,12 @@ var UserEnvironment = function() {
...
@@ -27,12 +27,12 @@ var UserEnvironment = function() {
this
.
isMac
=
function
()
{
this
.
isMac
=
function
()
{
return
(
this
.
os
==
"mac"
);
return
(
this
.
os
==
"mac"
);
};
};
/* ipad check */
/* ipad check */
this
.
isIpad
=
function
()
{
this
.
isIpad
=
function
()
{
return
(
this
.
os
==
"ipad"
);
return
(
this
.
os
==
"ipad"
);
};
};
/* iphone check */
/* iphone check */
this
.
isIphone
=
function
()
{
this
.
isIphone
=
function
()
{
return
(
this
.
os
==
"iphone"
);
return
(
this
.
os
==
"iphone"
);
...
@@ -57,7 +57,7 @@ var UserEnvironment = function() {
...
@@ -57,7 +57,7 @@ var UserEnvironment = function() {
return
false
;
return
false
;
}
}
};
};
/** check operating system */
/** check operating system */
function
checkOS
(
userAgent
)
{
function
checkOS
(
userAgent
)
{
if
(
userAgent
.
toLowerCase
().
indexOf
(
"windows"
)
>=
0
)
{
if
(
userAgent
.
toLowerCase
().
indexOf
(
"windows"
)
>=
0
)
{
...
@@ -79,7 +79,7 @@ var UserEnvironment = function() {
...
@@ -79,7 +79,7 @@ var UserEnvironment = function() {
};
};
/** check user browser */
/** check user browser */
function
checkBrowser
(
userAgent
)
{
function
checkBrowser
(
userAgent
)
{
if
(
userAgent
.
toLowerCase
().
indexOf
(
"msie"
)
>=
0
)
{
if
(
userAgent
.
toLowerCase
().
indexOf
(
"msie"
)
>=
0
)
{
return
"msie"
;
return
"msie"
;
}
}
...
@@ -98,7 +98,7 @@ var UserEnvironment = function() {
...
@@ -98,7 +98,7 @@ var UserEnvironment = function() {
if
(
userAgent
.
toLowerCase
().
indexOf
(
"opera"
)
>=
0
)
{
if
(
userAgent
.
toLowerCase
().
indexOf
(
"opera"
)
>=
0
)
{
return
"opera"
;
return
"opera"
;
}
}
return
"unknown"
;
return
"unknown"
;
};
};
};
};
...
@@ -166,7 +166,7 @@ UserSetting.prototype.show = function(elmid) {
...
@@ -166,7 +166,7 @@ UserSetting.prototype.show = function(elmid) {
}
}
tags
=
tags
+
"</p>"
;
tags
=
tags
+
"</p>"
;
$
(
elmid
).
html
(
tags
);
$
(
elmid
).
html
(
tags
);
}
}
};
};
/* ユーザ設定のキーリストを取得 */
/* ユーザ設定のキーリストを取得 */
UserSetting
.
prototype
.
keys
=
function
()
{
UserSetting
.
prototype
.
keys
=
function
()
{
...
@@ -204,7 +204,7 @@ UserSetting.prototype.removeAll = function() {
...
@@ -204,7 +204,7 @@ UserSetting.prototype.removeAll = function() {
var
storage
=
window
.
localStorage
;
var
storage
=
window
.
localStorage
;
if
(
storage
)
{
if
(
storage
)
{
storage
.
remove
(
this
.
US_KEY
);
storage
.
remove
(
this
.
US_KEY
);
}
}
};
};
/*
/*
...
@@ -215,7 +215,7 @@ var UserSession = function() {
...
@@ -215,7 +215,7 @@ var UserSession = function() {
};
};
/* Initialize User Session */
/* Initialize User Session */
UserSession
.
prototype
.
init
=
function
(
option
)
{
UserSession
.
prototype
.
init
=
function
(
option
)
{
this
.
available
=
false
;
this
.
available
=
false
;
if
(
option
==
'restore'
)
{
if
(
option
==
'restore'
)
{
var
value
=
null
;
var
value
=
null
;
...
@@ -230,7 +230,7 @@ UserSession.prototype.init = function(option) {
...
@@ -230,7 +230,7 @@ UserSession.prototype.init = function(option) {
}
}
}
else
{
}
else
{
this
.
set
(
"init"
,
new
Date
().
toLocaleString
());
this
.
set
(
"init"
,
new
Date
().
toLocaleString
());
this
.
available
=
true
;
this
.
available
=
true
;
}
}
};
};
/* store key, value item to user session */
/* store key, value item to user session */
...
@@ -246,7 +246,7 @@ UserSession.prototype.set = function(key, value) {
...
@@ -246,7 +246,7 @@ UserSession.prototype.set = function(key, value) {
}
else
{
}
else
{
storage
.
setItem
(
"AVWS_"
+
key
,
value
);
storage
.
setItem
(
"AVWS_"
+
key
,
value
);
}
}
}
}
};
};
/* get session item value */
/* get session item value */
UserSession
.
prototype
.
get
=
function
(
key
)
{
UserSession
.
prototype
.
get
=
function
(
key
)
{
...
@@ -256,7 +256,7 @@ UserSession.prototype.get = function(key) {
...
@@ -256,7 +256,7 @@ UserSession.prototype.get = function(key) {
}
else
{
}
else
{
throw
new
Error
(
"Session Destroyed."
);
throw
new
Error
(
"Session Destroyed."
);
}
}
return
value
;
return
value
;
};
};
/* get item value from session storage */
/* get item value from session storage */
UserSession
.
prototype
.
_get
=
function
(
key
)
{
UserSession
.
prototype
.
_get
=
function
(
key
)
{
...
@@ -273,7 +273,7 @@ UserSession.prototype.destroy = function() {
...
@@ -273,7 +273,7 @@ UserSession.prototype.destroy = function() {
if
(
storage
)
{
if
(
storage
)
{
storage
.
clear
();
storage
.
clear
();
this
.
available
=
false
;
this
.
available
=
false
;
}
}
};
};
/* show user session object list */
/* show user session object list */
UserSession
.
prototype
.
show
=
function
(
elmid
)
{
UserSession
.
prototype
.
show
=
function
(
elmid
)
{
...
@@ -287,7 +287,7 @@ UserSession.prototype.show = function(elmid) {
...
@@ -287,7 +287,7 @@ UserSession.prototype.show = function(elmid) {
}
}
tags
=
tags
+
"</p>"
;
tags
=
tags
+
"</p>"
;
$
(
elmid
).
html
(
tags
);
$
(
elmid
).
html
(
tags
);
}
}
};
};
/*
/*
* Variables
* Variables
...
@@ -299,7 +299,7 @@ AVWEB.avwSysSettingObj = null;
...
@@ -299,7 +299,7 @@ AVWEB.avwSysSettingObj = null;
/* Initialize system */
/* Initialize system */
$
(
function
()
{
$
(
function
()
{
// システム設定ファイルの配置先パスの決定
// システム設定ファイルの配置先パスの決定
var
location
=
window
.
location
.
toString
().
toLowerCase
();
var
location
=
window
.
location
.
toString
().
toLowerCase
();
var
sysFile
=
''
;
var
sysFile
=
''
;
...
@@ -324,7 +324,7 @@ $(function () {
...
@@ -324,7 +324,7 @@ $(function () {
alert
(
error
);
alert
(
error
);
}
}
});
});
// ロード時に一旦エラー状態をクリアしておく
// ロード時に一旦エラー状態をクリアしておく
AVWEB
.
avwClearError
();
AVWEB
.
avwClearError
();
});
});
...
@@ -372,13 +372,13 @@ AVWEB.avwCheckLogin = function(option) {
...
@@ -372,13 +372,13 @@ AVWEB.avwCheckLogin = function(option) {
/* エラー画面を表示 */
/* エラー画面を表示 */
var
tags
=
'<div id="avw-auth-error">'
+
var
tags
=
'<div id="avw-auth-error">'
+
'<div style="display:table; width:100%; height:100%;">'
+
'<div style="display:table; width:100%; height:100%;">'
+
'<div style="display:table-cell; text-align:center; vertical-align:middle;">'
+
'<div style="display:table-cell; text-align:center; vertical-align:middle;">'
+
'<p><h4>Authentication error</h4>Please use it after login.</p>'
+
'<p><h4>Authentication error</h4>Please use it after login.</p>'
+
'<div><button id="avw-unauth-ok">OK</button></div>'
+
'<div><button id="avw-unauth-ok">OK</button></div>'
+
'</div></div></div>'
;
'</div></div></div>'
;
$
(
'body'
).
prepend
(
tags
);
$
(
'body'
).
prepend
(
tags
);
$
(
'#avw-auth-error'
).
css
({
$
(
'#avw-auth-error'
).
css
({
'opacity'
:
1
,
'opacity'
:
1
,
'position'
:
'fixed'
,
'position'
:
'fixed'
,
'top'
:
'0'
,
'top'
:
'0'
,
...
@@ -387,14 +387,14 @@ AVWEB.avwCheckLogin = function(option) {
...
@@ -387,14 +387,14 @@ AVWEB.avwCheckLogin = function(option) {
'height'
:
$
(
window
).
height
(),
'height'
:
$
(
window
).
height
(),
'zIndex'
:
'10000'
'zIndex'
:
'10000'
});
});
// resize error page
// resize error page
$
(
window
).
resize
(
function
()
{
$
(
window
).
resize
(
function
()
{
$
(
'#avw-auth-error'
).
css
(
{
$
(
'#avw-auth-error'
).
css
(
{
'width'
:
$
(
window
).
width
(),
'width'
:
$
(
window
).
width
(),
'height'
:
$
(
window
).
height
()
'height'
:
$
(
window
).
height
()
});
});
});
});
var
returnPage
;
var
returnPage
;
if
(
option
)
{
if
(
option
)
{
returnPage
=
option
returnPage
=
option
...
@@ -439,10 +439,10 @@ AVWEB.avwCmsApiSyncWithUrl = function(url, accountPath, apiName, type, params, s
...
@@ -439,10 +439,10 @@ AVWEB.avwCmsApiSyncWithUrl = function(url, accountPath, apiName, type, params, s
/* CMS API Call */
/* CMS API Call */
AVWEB
.
_callCmsApi
=
function
(
url
,
accountPath
,
apiName
,
type
,
params
,
async
,
success
,
error
)
{
AVWEB
.
_callCmsApi
=
function
(
url
,
accountPath
,
apiName
,
type
,
params
,
async
,
success
,
error
)
{
// アプリケーション設定取得
// アプリケーション設定取得
var
sysSettings
=
AVWEB
.
avwSysSetting
();
var
sysSettings
=
AVWEB
.
avwSysSetting
();
// url 構築
// url 構築
var
apiUrl
;
var
apiUrl
;
if
(
!
url
)
{
if
(
!
url
)
{
...
@@ -454,17 +454,17 @@ AVWEB._callCmsApi = function(url, accountPath, apiName, type, params, async, suc
...
@@ -454,17 +454,17 @@ AVWEB._callCmsApi = function(url, accountPath, apiName, type, params, async, suc
apiUrl
=
AVWEB
.
format
(
apiUrl
,
accountPath
);
apiUrl
=
AVWEB
.
format
(
apiUrl
,
accountPath
);
}
}
apiUrl
=
apiUrl
+
'/'
+
apiName
+
'/'
;
apiUrl
=
apiUrl
+
'/'
+
apiName
+
'/'
;
//オーサリングプレビュー対応
//オーサリングプレビュー対応
if
(
COMMON
.
isAuthoringPreview
()
&&
CONTENTVIEW_GENERAL
.
pid
!=
''
){
if
(
COMMON
.
isAuthoringPreview
()
&&
CONTENTVIEW_GENERAL
.
pid
!=
''
){
params
.
pid
=
CONTENTVIEW_GENERAL
.
pid
;
params
.
pid
=
CONTENTVIEW_GENERAL
.
pid
;
}
}
//----------------------------------------------------------------------------------
//----------------------------------------------------------------------------------
// for IE: 暫定的に対応 (これをすることでIE9でもCrossDomainリクエストが可能だがアクセスのたびに警告が出る)
// for IE: 暫定的に対応 (これをすることでIE9でもCrossDomainリクエストが可能だがアクセスのたびに警告が出る)
$
.
support
.
cors
=
true
;
$
.
support
.
cors
=
true
;
//----------------------------------------------------------------------------------
//----------------------------------------------------------------------------------
// ajax によるAPIの実行(json)
// ajax によるAPIの実行(json)
$
.
ajax
(
{
$
.
ajax
(
{
async
:
(
async
)
?
async
:
false
,
async
:
(
async
)
?
async
:
false
,
...
@@ -499,37 +499,37 @@ AVWEB._callCmsApi = function(url, accountPath, apiName, type, params, async, suc
...
@@ -499,37 +499,37 @@ AVWEB._callCmsApi = function(url, accountPath, apiName, type, params, async, suc
else
{
else
{
AVWEB
.
showSystemError
();
AVWEB
.
showSystemError
();
}
}
}
}
}
}
});
});
};
};
/* CMS API Call */
/* CMS API Call */
AVWEB
.
_callCmsApiWhen
=
function
(
accountPath
,
apiName
,
type
,
params
)
{
AVWEB
.
_callCmsApiWhen
=
function
(
accountPath
,
apiName
,
type
,
params
)
{
// アプリケーション設定取得
// アプリケーション設定取得
var
sysSettings
=
AVWEB
.
avwSysSetting
();
var
sysSettings
=
AVWEB
.
avwSysSetting
();
// url 構築
// url 構築
var
apiUrl
=
ClientData
.
conf_apiUrl
();
var
apiUrl
=
ClientData
.
conf_apiUrl
();
if
(
accountPath
)
{
if
(
accountPath
)
{
apiUrl
=
AVWEB
.
format
(
apiUrl
,
accountPath
);
apiUrl
=
AVWEB
.
format
(
apiUrl
,
accountPath
);
}
}
apiUrl
=
apiUrl
+
'/'
+
apiName
+
'/'
;
apiUrl
=
apiUrl
+
'/'
+
apiName
+
'/'
;
//オーサリングプレビュー対応
//オーサリングプレビュー対応
if
(
COMMON
.
isAuthoringPreview
()
&&
CONTENTVIEW_GENERAL
.
pid
!=
''
){
if
(
COMMON
.
isAuthoringPreview
()
&&
CONTENTVIEW_GENERAL
.
pid
!=
''
){
params
.
pid
=
CONTENTVIEW_GENERAL
.
pid
;
params
.
pid
=
CONTENTVIEW_GENERAL
.
pid
;
}
}
//----------------------------------------------------------------------------------
//----------------------------------------------------------------------------------
// for IE: 暫定的に対応 (これをすることでIE9でもCrossDomainリクエストが可能だがアクセスのたびに警告が出る)
// for IE: 暫定的に対応 (これをすることでIE9でもCrossDomainリクエストが可能だがアクセスのたびに警告が出る)
$
.
support
.
cors
=
true
;
$
.
support
.
cors
=
true
;
//----------------------------------------------------------------------------------
//----------------------------------------------------------------------------------
// ajax によるAPIの実行(json)
// ajax によるAPIの実行(json)
var
ajaxObj
=
$
.
ajax
(
{
var
ajaxObj
=
$
.
ajax
(
{
async
:
true
,
async
:
true
,
...
@@ -549,9 +549,9 @@ AVWEB._callCmsApiWhen = function(accountPath, apiName, type, params ) {
...
@@ -549,9 +549,9 @@ AVWEB._callCmsApiWhen = function(accountPath, apiName, type, params ) {
xhr
.
setRequestHeader
(
'X-AGT-AppVersion'
,
sysSettings
.
appVersion
);
xhr
.
setRequestHeader
(
'X-AGT-AppVersion'
,
sysSettings
.
appVersion
);
}
}
});
});
return
ajaxObj
;
return
ajaxObj
;
};
};
/*
/*
...
@@ -650,23 +650,23 @@ AVWEB.avwGrabContentPageImage = function(accountPath, params, success, error) {
...
@@ -650,23 +650,23 @@ AVWEB.avwGrabContentPageImage = function(accountPath, params, success, error) {
if
(
COMMON
.
isAuthoringPreview
()
&&
CONTENTVIEW_GENERAL
.
pid
!=
''
){
if
(
COMMON
.
isAuthoringPreview
()
&&
CONTENTVIEW_GENERAL
.
pid
!=
''
){
requestParams
=
requestParams
+
'&pid='
+
CONTENTVIEW_GENERAL
.
pid
;
requestParams
=
requestParams
+
'&pid='
+
CONTENTVIEW_GENERAL
.
pid
;
}
}
apiUrl
+=
'?'
+
requestParams
+
'&isBase64=true'
;
apiUrl
+=
'?'
+
requestParams
+
'&isBase64=true'
;
if
(
ClientData
.
isStreamingMode
()
){
if
(
ClientData
.
isStreamingMode
()
){
apiUrl
+=
'&isStreaming=true'
;
apiUrl
+=
'&isStreaming=true'
;
}
}
// バイナリ形式で画像イメージを取得し、Base64にエンコードする
// バイナリ形式で画像イメージを取得し、Base64にエンコードする
var
xmlHttp
;
var
xmlHttp
;
var
ie
=
false
;
var
ie
=
false
;
//if(window.ActiveXObject) {
//if(window.ActiveXObject) {
// xmlHttp = new ActiveXObject('Msxml2.XMLHTTP');
// xmlHttp = new ActiveXObject('Msxml2.XMLHTTP');
// ie = true;
// ie = true;
//} else {
//} else {
//xmlHttp = new XMLHttpRequest();
//xmlHttp = new XMLHttpRequest();
//}
//}
//IE10以降はXMLHttpRequestを優先して使う
//IE10以降はXMLHttpRequestを優先して使う
try
{
try
{
xmlHttp
=
new
XMLHttpRequest
();
xmlHttp
=
new
XMLHttpRequest
();
...
@@ -679,14 +679,14 @@ AVWEB.avwGrabContentPageImage = function(accountPath, params, success, error) {
...
@@ -679,14 +679,14 @@ AVWEB.avwGrabContentPageImage = function(accountPath, params, success, error) {
return
;
return
;
}
}
}
}
xmlHttp
.
open
(
'get'
,
apiUrl
);
xmlHttp
.
open
(
'get'
,
apiUrl
);
xmlHttp
.
setRequestHeader
(
'X-AGT-AppId'
,
sysSettings
.
appName
);
xmlHttp
.
setRequestHeader
(
'X-AGT-AppId'
,
sysSettings
.
appName
);
xmlHttp
.
setRequestHeader
(
'X-AGT-AppVersion'
,
sysSettings
.
appVersion
);
xmlHttp
.
setRequestHeader
(
'X-AGT-AppVersion'
,
sysSettings
.
appVersion
);
/*
/*
if(xmlHttp.overrideMimeType) {
if(xmlHttp.overrideMimeType) {
// for FF, Chrome, Safari
// for FF, Chrome, Safari
xmlHttp.overrideMimeType('text/plain; charset=x-user-defined');
xmlHttp.overrideMimeType('text/plain; charset=x-user-defined');
}
}
*/
*/
xmlHttp
.
onreadystatechange
=
function
()
{
xmlHttp
.
onreadystatechange
=
function
()
{
...
@@ -696,13 +696,13 @@ AVWEB.avwGrabContentPageImage = function(accountPath, params, success, error) {
...
@@ -696,13 +696,13 @@ AVWEB.avwGrabContentPageImage = function(accountPath, params, success, error) {
//base64 encode
//base64 encode
var ids = new ImageDataScheme();
var ids = new ImageDataScheme();
var src; // Image Data URI
var src; // Image Data URI
if(ie) {
if(ie) {
// for IE
// for IE
src = ids.convImageToDataScheme(xmlHttp.responseBody, ie);
src = ids.convImageToDataScheme(xmlHttp.responseBody, ie);
} else {
} else {
// for FF, Chrome, Safari
// for FF, Chrome, Safari
src = ids.convImageToDataScheme(xmlHttp.responseText, ie);
src = ids.convImageToDataScheme(xmlHttp.responseText, ie);
}
}
*/
*/
var
src
;
// Image Data URI
var
src
;
// Image Data URI
...
@@ -712,7 +712,7 @@ AVWEB.avwGrabContentPageImage = function(accountPath, params, success, error) {
...
@@ -712,7 +712,7 @@ AVWEB.avwGrabContentPageImage = function(accountPath, params, success, error) {
src = 'data:image/png;base64,' + xmlHttp.responseBody;
src = 'data:image/png;base64,' + xmlHttp.responseBody;
} else {
} else {
// for FF, Chrome, Safari
// for FF, Chrome, Safari
src = 'data:image/png;base64,' + xmlHttp.responseText;
src = 'data:image/png;base64,' + xmlHttp.responseText;
}
}
*/
*/
src
=
'data:image/png;base64,'
+
xmlHttp
.
responseText
;
src
=
'data:image/png;base64,'
+
xmlHttp
.
responseText
;
...
@@ -742,11 +742,11 @@ AVWEB.avwGrabContentPageImage = function(accountPath, params, success, error) {
...
@@ -742,11 +742,11 @@ AVWEB.avwGrabContentPageImage = function(accountPath, params, success, error) {
* ]
* ]
*/
*/
AVWEB
.
avwUploadBackupFile
=
function
(
accountPath
,
params
,
async
,
success
,
error
)
{
AVWEB
.
avwUploadBackupFile
=
function
(
accountPath
,
params
,
async
,
success
,
error
)
{
/* API実行準備*/
/* API実行準備*/
var
sysSettings
=
AVWEB
.
avwSysSetting
();
var
sysSettings
=
AVWEB
.
avwSysSetting
();
var
apiName
=
'uploadBackupFile'
;
// API名
var
apiName
=
'uploadBackupFile'
;
// API名
//url 構築
//url 構築
var
apiUrl
;
var
apiUrl
;
apiUrl
=
ClientData
.
conf_apiUrl
();
//sysSettings.apiUrl;
apiUrl
=
ClientData
.
conf_apiUrl
();
//sysSettings.apiUrl;
...
@@ -754,25 +754,25 @@ AVWEB.avwUploadBackupFile = function(accountPath, params, async, success, error)
...
@@ -754,25 +754,25 @@ AVWEB.avwUploadBackupFile = function(accountPath, params, async, success, error)
apiUrl
=
AVWEB
.
format
(
apiUrl
,
accountPath
)
apiUrl
=
AVWEB
.
format
(
apiUrl
,
accountPath
)
}
}
apiUrl
=
apiUrl
+
'/'
+
apiName
+
'/'
;
apiUrl
=
apiUrl
+
'/'
+
apiName
+
'/'
;
/* POST(multipart/form-data)送信準備 */
/* POST(multipart/form-data)送信準備 */
var
body
=
''
;
var
body
=
''
;
var
boundary
=
''
;
var
boundary
=
''
;
// boundaryを構築
// boundaryを構築
var
date
=
new
Date
();
var
date
=
new
Date
();
boundary
=
'------------------------'
+
date
.
getMilliseconds
()
boundary
=
'------------------------'
+
date
.
getMilliseconds
()
+
(
date
.
getMonth
()
+
1
)
+
(
date
.
getMonth
()
+
1
)
+
date
.
getMinutes
()
+
date
.
getMinutes
()
+
date
.
getFullYear
()
+
date
.
getFullYear
()
+
date
.
getDay
()
+
date
.
getDay
()
+
date
.
getHours
()
+
date
.
getHours
()
+
date
.
getSeconds
();
+
date
.
getSeconds
();
// bodyを構築
// bodyを構築
for
(
var
i
=
0
;
i
<
params
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
params
.
length
;
i
++
)
{
var
item
=
params
[
i
];
var
item
=
params
[
i
];
body
+=
'--'
+
boundary
+
'
\
r
\
n'
;
body
+=
'--'
+
boundary
+
'
\
r
\
n'
;
body
+=
'Content-Disposition: form-data; name="'
+
item
.
name
+
'"'
;
body
+=
'Content-Disposition: form-data; name="'
+
item
.
name
+
'"'
;
if
(
item
.
fileName
)
{
if
(
item
.
fileName
)
{
body
+=
'; filename="'
+
item
.
fileName
+
'"
\
r
\
n'
;
body
+=
'; filename="'
+
item
.
fileName
+
'"
\
r
\
n'
;
...
@@ -786,7 +786,7 @@ AVWEB.avwUploadBackupFile = function(accountPath, params, async, success, error)
...
@@ -786,7 +786,7 @@ AVWEB.avwUploadBackupFile = function(accountPath, params, async, success, error)
body
+=
item
.
content
+
'
\
r
\
n'
;
body
+=
item
.
content
+
'
\
r
\
n'
;
}
}
body
+=
'--'
+
boundary
+
'--
\
r
\
n'
;
body
+=
'--'
+
boundary
+
'--
\
r
\
n'
;
// ajax によるAPIの実行(json)
// ajax によるAPIの実行(json)
$
.
ajax
(
{
$
.
ajax
(
{
async
:
(
async
)
?
async
:
false
,
async
:
(
async
)
?
async
:
false
,
...
@@ -801,7 +801,7 @@ AVWEB.avwUploadBackupFile = function(accountPath, params, async, success, error)
...
@@ -801,7 +801,7 @@ AVWEB.avwUploadBackupFile = function(accountPath, params, async, success, error)
*/
*/
xhr
.
setRequestHeader
(
'X-AGT-AppId'
,
sysSettings
.
appName
);
xhr
.
setRequestHeader
(
'X-AGT-AppId'
,
sysSettings
.
appName
);
xhr
.
setRequestHeader
(
'X-AGT-AppVersion'
,
sysSettings
.
appVersion
);
xhr
.
setRequestHeader
(
'X-AGT-AppVersion'
,
sysSettings
.
appVersion
);
/*
/*
* uploadBackupFileは multipart/form-data でPOST送信する
* uploadBackupFileは multipart/form-data でPOST送信する
*/
*/
...
@@ -821,11 +821,11 @@ AVWEB.avwUploadBackupFile = function(accountPath, params, async, success, error)
...
@@ -821,11 +821,11 @@ AVWEB.avwUploadBackupFile = function(accountPath, params, async, success, error)
AVWEB
.
showSystemError
();
AVWEB
.
showSystemError
();
}
}
}
}
});
});
};
};
/* show system error message */
/* show system error message */
AVWEB
.
showSystemError
=
function
(
textId
)
{
AVWEB
.
showSystemError
=
function
(
textId
)
{
if
(
AVWEB
.
avwHasError
())
{
if
(
AVWEB
.
avwHasError
())
{
// すでにエラー状態であればエラーを表示しない
// すでにエラー状態であればエラーを表示しない
return
;
return
;
...
@@ -833,11 +833,11 @@ AVWEB.showSystemError = function(textId) {
...
@@ -833,11 +833,11 @@ AVWEB.showSystemError = function(textId) {
// エラー状態にセット
// エラー状態にセット
AVWEB
.
avwSetErrorState
();
AVWEB
.
avwSetErrorState
();
}
}
if
(
!
textId
){
if
(
!
textId
){
textId
=
'sysErrorCallApi01'
;
textId
=
'sysErrorCallApi01'
;
}
}
// create DOM element for showing error message
// create DOM element for showing error message
var
errMes
=
I18N
.
i18nText
(
textId
);
var
errMes
=
I18N
.
i18nText
(
textId
);
var
tags
=
'<div id="avw-sys-error"></div>'
;
var
tags
=
'<div id="avw-sys-error"></div>'
;
...
@@ -853,12 +853,12 @@ AVWEB.showSystemError = function(textId) {
...
@@ -853,12 +853,12 @@ AVWEB.showSystemError = function(textId) {
'background'
:
'#999'
,
'background'
:
'#999'
,
'z-index'
:
90000
'z-index'
:
90000
});
});
// resize error page
// resize error page
$
(
window
).
resize
(
function
()
{
$
(
window
).
resize
(
function
()
{
$
(
'#avw-sys-error'
).
css
(
{
$
(
'#avw-sys-error'
).
css
(
{
'width'
:
$
(
window
).
width
(),
'width'
:
$
(
window
).
width
(),
'height'
:
$
(
window
).
height
()
'height'
:
$
(
window
).
height
()
});
});
});
});
// show error messages
// show error messages
$
().
toastmessage
({
position
:
'middle-center'
});
$
().
toastmessage
({
position
:
'middle-center'
});
...
@@ -886,7 +886,7 @@ AVWEB.showSystemError = function(textId) {
...
@@ -886,7 +886,7 @@ AVWEB.showSystemError = function(textId) {
sticky: true,
sticky: true,
text: errMes,
text: errMes,
close: function() { isShowErrorMessage = false; }
close: function() { isShowErrorMessage = false; }
});
});
*/
*/
};
};
/* エラー状態を取得 */
/* エラー状態を取得 */
...
@@ -927,7 +927,7 @@ AVWEB.avwSetLogoutNortice = function() {
...
@@ -927,7 +927,7 @@ AVWEB.avwSetLogoutNortice = function() {
var
e
=
event
||
window
.
event
;
var
e
=
event
||
window
.
event
;
if
(
e
)
{
if
(
e
)
{
e
.
returnValue
=
message
;
e
.
returnValue
=
message
;
}
}
return
message
;
return
message
;
}
}
};
};
...
@@ -937,7 +937,7 @@ AVWEB.avwScreenMove = function(url) {
...
@@ -937,7 +937,7 @@ AVWEB.avwScreenMove = function(url) {
window
.
onbeforeunload
=
null
;
window
.
onbeforeunload
=
null
;
window
.
location
=
url
;
window
.
location
=
url
;
};
};
/* Debug Log */
/* Debug Log */
AVWEB
.
avwLog
=
function
(
msg
)
{
AVWEB
.
avwLog
=
function
(
msg
)
{
if
(
AVWEB
.
avwSysSetting
().
debug
)
{
if
(
AVWEB
.
avwSysSetting
().
debug
)
{
console
.
log
(
msg
);
console
.
log
(
msg
);
...
@@ -969,26 +969,26 @@ AVWEB.getApiUrl = function(accountPath) {
...
@@ -969,26 +969,26 @@ AVWEB.getApiUrl = function(accountPath) {
apiUrl
=
AVWEB
.
format
(
apiUrl
,
accountPath
);
apiUrl
=
AVWEB
.
format
(
apiUrl
,
accountPath
);
}
}
return
apiUrl
;
return
apiUrl
;
};
};
/* get url */
/* get url */
AVWEB
.
getURL
=
function
(
apiName
)
{
AVWEB
.
getURL
=
function
(
apiName
)
{
//var sysSettings = AVWEB.avwSysSetting();
//var sysSettings = AVWEB.avwSysSetting();
var
isStreaming
=
"false"
;
var
isStreaming
=
"false"
;
if
(
ClientData
.
isStreamingMode
()){
if
(
ClientData
.
isStreamingMode
()){
isStreaming
=
"true"
;
isStreaming
=
"true"
;
}
}
var
url
=
ClientData
.
conf_apiResourceDlUrl
();
//sysSettings.apiResourceDlUrl;
var
url
=
ClientData
.
conf_apiResourceDlUrl
();
//sysSettings.apiResourceDlUrl;
url
=
AVWEB
.
format
(
url
,
ClientData
.
userInfo_accountPath
())
+
'/'
+
apiName
+
'/?isStreaming='
+
isStreaming
;
url
=
AVWEB
.
format
(
url
,
ClientData
.
userInfo_accountPath
())
+
'/'
+
apiName
+
'/?isStreaming='
+
isStreaming
;
//オーサリングプレビュー対応
//オーサリングプレビュー対応
if
(
COMMON
.
isAuthoringPreview
()
&&
CONTENTVIEW_GENERAL
.
pid
!=
''
){
if
(
COMMON
.
isAuthoringPreview
()
&&
CONTENTVIEW_GENERAL
.
pid
!=
''
){
url
=
url
+
'&pid='
+
CONTENTVIEW_GENERAL
.
pid
;
url
=
url
+
'&pid='
+
CONTENTVIEW_GENERAL
.
pid
;
}
}
return
url
;
return
url
;
};
};
...
...
abvw/js/contentview.js
View file @
48b03076
...
@@ -2125,8 +2125,10 @@ CONTENTVIEW.displayOverlayForSpecifyContentType = function( resourceUrl ){
...
@@ -2125,8 +2125,10 @@ CONTENTVIEW.displayOverlayForSpecifyContentType = function( resourceUrl ){
}
}
CONTENTVIEW
.
handleForContentTypeHTML
(
linkUrlTmp
);
CONTENTVIEW
.
handleForContentTypeHTML
(
linkUrlTmp
);
}
}
else
if
(
CONTENTVIEW_GENERAL
.
contentType
==
COMMON
.
ContentTypeKeys
.
Type_Exam
)
{
else
if
(
CONTENTVIEW_GENERAL
.
contentType
==
COMMON
.
ContentTypeKeys
.
Type_Exam
){
CONTENTVIEW
.
handleForContentTypeExam
(
resourceUrl
);
CONTENTVIEW
.
handleForContentTypeExam
(
resourceUrl
);
}
else
if
(
CONTENTVIEW_GENERAL
.
contentType
==
COMMON
.
ContentTypeKeys
.
Type_Enquete
){
CONTENTVIEW
.
handleForContentTypeEnquete
(
resourceUrl
);
}
}
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
if
(
CONTENTVIEW_GENERAL
.
avwUserEnvObj
.
isAndroid
())
{
if
(
CONTENTVIEW_GENERAL
.
avwUserEnvObj
.
isAndroid
())
{
...
@@ -2365,7 +2367,31 @@ CONTENTVIEW.handleForContentTypeExam = function(resourceUrl){
...
@@ -2365,7 +2367,31 @@ CONTENTVIEW.handleForContentTypeExam = function(resourceUrl){
}
}
else
{
else
{
$container
.
html
(
'<iframe src="'
+
resourceUrl
+
'" style="position: absolute; width: 100%; height: 100%; "> </iframe>'
);
$container
.
html
(
'<iframe src="'
+
resourceUrl
+
'" style="position: absolute; width: 100%; height: 100%; "> </iframe>'
);
$container
.
css
(
'overflow'
,
'hidden'
);
$container
.
css
(
'overflow'
,
'hidden'
);
}
//END TRB00076 - EDITOR : Long - Date : 09/24/2013 - Summary : Fix for scrolling on ipad
$container
.
show
();
};
CONTENTVIEW
.
handleForContentTypeEnquete
=
function
(
resourceUrl
){
//Create Dialog overlay
var
$container
=
$
(
'#dialog'
);
$container
.
html
(
''
);
$container
.
css
(
'left'
,
'0%'
);
$container
.
css
(
'width'
,
'100%'
);
$container
.
css
(
'background-color'
,
'white'
);
//START TRB00076 - EDITOR : Long - Date : 09/24/2013 - Summary : Fix for scrolling on ipad
if
(
CONTENTVIEW_GENERAL
.
avwUserEnvObj
.
isIos
()){
$container
.
html
(
'<iframe src="'
+
resourceUrl
+
'" style="position: absolute; width: 100%;"></iframe>'
);
$container
.
css
(
'overflow'
,
'scroll'
);
$container
.
css
(
'-webkit-overflow-scrolling'
,
'touch'
);
}
else
{
$container
.
html
(
'<iframe src="'
+
resourceUrl
+
'" style="position: absolute; width: 100%; height: 100%; "> </iframe>'
);
$container
.
css
(
'overflow'
,
'hidden'
);
}
}
//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
$container
.
show
();
$container
.
show
();
...
@@ -5692,7 +5718,6 @@ CONTENTVIEW.ready = function(initContentId){
...
@@ -5692,7 +5718,6 @@ CONTENTVIEW.ready = function(initContentId){
getType
:
1
,
getType
:
1
,
isStreaming
:
ClientData
.
isStreamingMode
()
isStreaming
:
ClientData
.
isStreamingMode
()
};
};
AVWEB
.
avwCmsApi
(
ClientData
.
userInfo_accountPath
(),
AVWEB
.
avwCmsApi
(
ClientData
.
userInfo_accountPath
(),
"webGetContent"
,
"webGetContent"
,
"GET"
,
"GET"
,
...
@@ -5754,18 +5779,25 @@ CONTENTVIEW.ready = function(initContentId){
...
@@ -5754,18 +5779,25 @@ CONTENTVIEW.ready = function(initContentId){
else
{
else
{
if
(
CONTENTVIEW_GENERAL
.
contentType
==
"exam"
||
CONTENTVIEW_GENERAL
.
contentType
==
"enquete"
)
{
if
(
CONTENTVIEW_GENERAL
.
contentType
==
"exam"
||
CONTENTVIEW_GENERAL
.
contentType
==
"enquete"
)
{
var
isShowResult
,
isSendResult
;
var
isShowResult
,
isSendResult
;
if
(
data
.
contentData
.
showResult
==
1
){
if
(
CONTENTVIEW_GENERAL
.
contentType
==
"exam"
)
{
isShowResult
=
true
;
if
(
data
.
contentData
.
showResult
==
1
){
}
else
{
isShowResult
=
true
;
isShowResult
=
false
;
}
else
{
}
isShowResult
=
false
;
if
(
data
.
contentData
.
sendResult
==
1
){
}
isSendResult
=
true
;
if
(
data
.
contentData
.
sendResult
==
1
){
isSendResult
=
true
;
}
else
{
isSendResult
=
false
;
}
}
var
contentId
=
data
.
contentData
.
contentId
;
var
url
;
if
(
CONTENTVIEW_GENERAL
.
contentType
==
"exam"
){
url
=
CONTENTVIEW_GETDATA
.
getURLPageImage
(
"webEnqueteReply/init"
)
+
"&abObjectId=&sid="
+
CONTENTVIEW
.
getSessionId
()
+
"&contentId="
+
contentId
+
"&isShowResult="
+
isShowResult
+
"&isSendResult="
+
isSendResult
;
}
else
{
}
else
{
isSendResult
=
false
;
url
=
CONTENTVIEW_GETDATA
.
getURLPageImage
(
"webEnqueteReply/init"
)
+
"&abObjectId=&sid="
+
CONTENTVIEW
.
getSessionId
()
+
"&contentId="
+
contentId
;
}
}
var
contentId
=
data
.
contentData
.
contentId
;
var
url
=
CONTENTVIEW_GETDATA
.
getURLPageImage
(
"webEnqueteReply/init"
)
+
"&sid="
+
CONTENTVIEW
.
getSessionId
()
+
"&contentId="
+
contentId
+
"&isShowResult="
+
isShowResult
+
"&isSendResult="
+
isSendResult
;
/* init footer toolbar */
/* init footer toolbar */
$
(
'#footer_toolbar_2'
).
hide
();
$
(
'#footer_toolbar_2'
).
hide
();
$
(
'#footer_toolbar_1'
).
show
();
$
(
'#footer_toolbar_1'
).
show
();
...
@@ -5788,7 +5820,7 @@ CONTENTVIEW.ready = function(initContentId){
...
@@ -5788,7 +5820,7 @@ CONTENTVIEW.ready = function(initContentId){
//enable SpecifyControl
//enable SpecifyControl
CONTENTVIEW
.
enableControlForMediaAndHtmlType
();
CONTENTVIEW
.
enableControlForMediaAndHtmlType
();
CONTENTVIEW
.
displayOverlayForSpecifyContentType
(
url
);
CONTENTVIEW
.
displayOverlayForSpecifyContentType
(
url
);
$
(
window
).
resize
(
function
()
{
$
(
window
).
resize
(
function
()
{
//Check if content is zooming
//Check if content is zooming
if
(
CONTENTVIEW
.
isZoomingContent
){
if
(
CONTENTVIEW
.
isZoomingContent
){
...
@@ -5799,19 +5831,19 @@ CONTENTVIEW.ready = function(initContentId){
...
@@ -5799,19 +5831,19 @@ CONTENTVIEW.ready = function(initContentId){
//$container.css('height', h);
//$container.css('height', h);
//$container.css('width', w);
//$container.css('width', w);
}
}
});
});
CONTENTVIEW
.
handleSliderBar
();
CONTENTVIEW
.
handleSliderBar
();
$
(
'#lblSlider'
).
text
(
'/ '
+
1
);
$
(
'#lblSlider'
).
text
(
'/ '
+
1
);
if
(
CONTENTVIEW_GENERAL
.
avwUserEnvObj
.
isAndroid
()
==
false
)
{
if
(
CONTENTVIEW_GENERAL
.
avwUserEnvObj
.
isAndroid
()
==
false
)
{
$
(
"#slider_page"
).
slider
(
"option"
,
"disabled"
,
true
);
$
(
"#slider_page"
).
slider
(
"option"
,
"disabled"
,
true
);
}
}
COMMON
.
disable
(
'#txtSearch'
,
'#txtSlider'
);
COMMON
.
disable
(
'#txtSearch'
,
'#txtSlider'
);
}
else
{
}
else
{
CONTENTVIEW_INITOBJECT
.
initPage
();
CONTENTVIEW_INITOBJECT
.
initPage
();
}
}
}
}
//ストリーミングならデバイス側に初期表示済通知
//ストリーミングならデバイス側に初期表示済通知
...
...
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