Commit 865cc2b3 by Masaru Abe

Check #31247: 設問の関連資料リンク機能

parent 7d40f81d
......@@ -923,8 +923,8 @@ AVWEB.avwClearError = function() {
/* ブラウザunload時に警告メッセージの出力設定を行う関数 */
AVWEB.avwSetLogoutNortice = function() {
window.onbeforeunload = function(event) {
if(ClientData.isGetitsMode() || ClientData.isStreamingMode()){
if(ClientData.isGetitsMode()){
if(ClientData.isGetitsMode() || ClientData.isStreamingMode() || ClientData.isCheckViewMode()){
if(ClientData.isGetitsMode() || ClientData.isCheckViewMode()){
COMMON.SetEndLog(CONTENTVIEW_GENERAL.contentID);
COMMON.RegisterLog();
}
......
......@@ -123,7 +123,8 @@ COMMON.ScreenIds = {
History : 'history.html?__UPDATEID__',
ContentViewOpenUri : 'contentview_openuri.html?__UPDATEID__',
ContentViewStreaming : 'contentview_streaming.html?__UPDATEID__',
ContentViewGetits : 'contentview_getits.html?__UPDATEID__'
ContentViewGetits : 'contentview_getits.html?__UPDATEID__',
ContentViewCheck : 'contentview_check.html?__UPDATEID__'
};
COMMON.Keys = {
......@@ -369,6 +370,7 @@ COMMON.Keys = {
isGetitsMode : 'isGetitsMode',
isStreamingMode : 'isStreamingMode',
isCheckViewMode : 'isCheckViewMode',
conf_apiUrl : 'conf_apiUrl',
conf_apiLoginUrl : 'conf_apiLoginUrl',
conf_apiResourceDlUrl : 'conf_apiResourceDlUrl',
......@@ -1681,6 +1683,20 @@ var ClientData = {
}
},
//Check 関連資料参照表示用で追加 ここらへんのコードなんとかしたい
isCheckViewMode : function(data) {
if (arguments.length > 0) {
SessionStorageUtils.set(COMMON.Keys.isCheckViewMode, JSON.stringify(data));
} else {
if (SessionStorageUtils.get(COMMON.Keys.isCheckViewMode) != 'undefined' && SessionStorageUtils.get(COMMON.Keys.isCheckViewMode) != undefined
&& SessionStorageUtils.get(COMMON.Keys.isCheckViewMode) != '' && SessionStorageUtils.get(COMMON.Keys.isCheckViewMode) != null
&& SessionStorageUtils.get(COMMON.Keys.isCheckViewMode) != 'null') {
return JSON.parse(SessionStorageUtils.get(COMMON.Keys.isCheckViewMode));
}
return false;
}
},
conf_apiUrl : function(data) {
if (arguments.length > 0) {
SessionStorageUtils.set(COMMON.Keys.conf_apiUrl, data);
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-store">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta name="viewport" content="">
<title></title>
<link rel="stylesheet" type="text/css" href="common/css/default.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="common/css/jquery-ui.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="common/css/jquery.toastmessage.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="common/css/default.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="common/css/screenLock.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="css/reset.css?__UPDATEID__" />
<!-- CSSビュー -->
<link rel="stylesheet" type="text/css" href="common/css/jquery.powertip.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="css/layout/viewer.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="css/layout/Anket.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="css/delete_shiori.css?__UPDATEID__" />
<script type="text/javascript" src="./common/js/jquery-1.8.1.min.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/jquery-ui-1.8.23.custom.min.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/jquery.ui.touch-punch.min.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/jquery.toastmessage.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/jquery.cookie.js?__UPDATEID__" ></script>
<script type="text/javascript" src="./common/js/jquery.treeview.js?__UPDATEID__" ></script>
<script type="text/javascript" src="./common/js/jquery.treeview.edit.js?__UPDATEID__" ></script>
<script type="text/javascript" src="./common/js/screenLock.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/avweb.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/i18n.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/common.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/uuid.js?__UPDATEID__"></script>
<script type="text/javascript" src="./js/contentview_OpenUri.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/html2canvas.js?__UPDATEID__" ></script>
<script type="text/javascript" src="./common/js/promise-6.1.0.min.js?__UPDATEID__" ></script>
<style>
html{
-ms-touch-action : none;
}
</style>
<script type="text/javascript">
$(document).ready(function() {
CONTENTVIEW_OPENURI.ready();
});
</script>
</head>
<body id="contentview_check" oncontextmenu="return false;">
<div id="ws-body" class="wrapper_ws" >
<div id="main-ws">
</div>
</div>
<div id="viewer" style="display:none;" >
</div>
<iframe style="height:0px;width:0px;visibility:hidden" src="about:blank">
this frame prevents back forward cache
</iframe>
</body>
</html>
\ No newline at end of file
//名前空間用のオブジェクトを用意する
var CHECKVIEW = {};
CHECKVIEW.ready = function(){
// セッションストレージクリア
SessionStorageUtils.clear();
AVWEB.avwUserSessionObj = null;
// create new session
AVWEB.avwCreateUserSession();
I18N.initi18n();
var sysSettings = AVWEB.avwSysSetting(); // get info in conf.json
// モード初期化
ClientData.isGetitsMode(false);
ClientData.isStreamingMode(false);
ClientData.isCheckViewMode(true);
ClientData.storeUrl("");
//confのパラメータセット
ClientData.conf_apiUrl( sysSettings.apiUrl );
ClientData.conf_apiLoginUrl( sysSettings.apiLoginUrl );
ClientData.conf_apiResourceDlUrl( sysSettings. apiResourceDlUrl );
// Check用引数パラメータを取得
var urlPath = COMMON.getUrlParam('urlPath', '');
var pageNo = COMMON.getUrlParam('pageNo', '');
var contentKey = COMMON.getUrlParam('key', '');
//念のため前回までの閲覧ログは削除
ClientData.ContentLogData([]);
//ページ番号指定有り
if( pageNo == "" || pageNo == "0" || pageNo == "1"){
ClientData.common_prePageNo(null)
} else {
ClientData.common_prePageNo(pageNo);
}
setTimeout(function (){
CHECKVIEW.processLogin(urlPath, contentKey);
}, 1000);
};
//Login Process
CHECKVIEW.processLogin = function(urlPath, contentKey) {
var requireChangePassword = 0;
var skipPwdDate;
var params = {
urlPath: urlPath,
};
// Get url to login
var apiLoginUrl = ClientData.conf_apiLoginUrl();
$('#main-error-message').html("loading...");
$('#main-error-message').show();
AVWEB.avwCmsApiWithUrl(apiLoginUrl, null, 'webCreateSid', 'GET', params, function (data) {
//requirePasswordChange = data.requirePasswordChange;
LOGIN.userinfo_sid = data.sid;
LOGIN.userInfo_userName = data.userName;
LOGIN.optionList = data.serviceOptionList;
LOGIN.getServiceOptionList();
if (data.result == 'success') {
// Save retrieved info
//STVIEW.saveLoginInfo(data);
// set number new push message to 0
ClientData.pushInfo_newMsgNumber(0);
//ClientData.userInfo_sid(ClientData.userInfo_sid_local());
ClientData.userInfo_sid(LOGIN.userinfo_sid);
$('#main-error-message').css('display', 'none');
CHECKVIEW.decodeContentKey(contentKey);
//コンテンツIDセット
//ClientData.contentInfo_contentId(cid);
//ストリーミングのビューアへ移動
//AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.ContentViewStreaming + "?__UPDATEID__");
} else {
LOGIN.login_errorMessage = data.errorMessage;
$('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), data.errorMessage).toString());
$('#main-error-message').show();
alert("Open Error1!");
}
}, function (xhr, statusText, errorThrown) {
if (xhr.responseText && xhr.status != 0) {
LOGIN.login_errorMessage = JSON.parse(xhr.responseText).errorMessage;
alert("Open Error21!:" + LOGIN.login_errorMessage);
$('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), JSON.parse(xhr.responseText).errorMessage).toString());
} else {
alert("Open Error22!:E001");
$('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), 'E001'));
}
$('#main-error-message').show();
});
};
//ワンタイムkeyパラメータからcontentIdを取得する
CHECKVIEW.decodeContentKey = function(contentKey) {
var contentType = '';
var result = [];
var params = {
sid : ClientData.userInfo_sid(),
contentKey : contentKey
};
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "webCheckContent", 'GET', params, function(data) {
if (data.result == 'success') {
// コンテンツIDセット
ClientData.contentInfo_contentId(data.contentId);
CHECKVIEW.showContentViewByOpenUrl(data.contentId);
}
}, function(xmlHttpRequest, txtStatus, errorThrown) {
// 見つからないかエラーなのでホームに移動
if (ClientData.isGetitsMode() == true) {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Login);
} else {
// アラートメッセージ表示
LOGIN.showAlertScreen(I18N.i18nText('msgContentNotExist'), "abvw/" + COMMON.ScreenIds.Home);
}
});
};
//OpenUriで開いた場合の直接コンテンツ表示
CHECKVIEW.showContentViewByOpenUrl = function(strContentId) {
var contentType = '';
var result = [];
var params = {
sid : ClientData.userInfo_sid(),
getType : '1',
contentId : strContentId
};
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", 'GET', params, function(data) {
// コンテンツIDセット
ClientData.contentInfo_contentId(strContentId);
// コンテツタイプ判定
contentType = data.contentData.contentType;
if (contentType == COMMON.ContentTypeKeys.Type_Others) {
// Download content
HEADER.downloadResourceById(strContentId);
} else {
// Go to Conten view page
// アラート表示組み込めるか
LIMIT_ACCESS_CONTENT.messageLevel[data.contentData.contentId] = {
alertMessageLevel : data.contentData.alertMessageLevel,
alertMessage : data.contentData.alertMessage
};
// check limit of content
LIMIT_ACCESS_CONTENT.checkLimitContent(data.contentData.contentId, function() {
CHECKVIEW.alertMessageOkFunction_callback();
}, function() {
CHECKVIEW.alertMessageCancelFunction_callback();
});
}
}, function(xmlHttpRequest, txtStatus, errorThrown) {
// check エラー時の表示検討
if (ClientData.isGetitsMode() == true) {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Login);
} else {
// アラートメッセージ表示
CHECKVIEW.showAlertScreen(I18N.i18nText('msgContentNotExist'), "abvw/" + COMMON.ScreenIds.Home);
}
});
};
// 警告表示時のOK処理
CHECKVIEW.alertMessageOkFunction_callback = function() {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.ContentViewCheck);
};
// 警告表示時のキャンセル処理
CHECKVIEW.alertMessageCancelFunction_callback = function() {
//check キャンセル時の表示検討
if (ClientData.isGetitsMode() == true) {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Login);
} else {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
}
};
CHECKVIEW.debugLog = function(msg){
//$("#debug").html(msg);
};
......@@ -2628,7 +2628,7 @@ CONTENTVIEW.enableControlForMediaAndHtmlType = function(){
}
//getits対応
if( ClientData.isGetitsMode() == true ){
if( ClientData.isGetitsMode() == true || ClientData.isCheckViewMode() == true ){
$('#imgHome').unbind('click');
$('#imgHome').removeClass();
$('#imgHome').addClass('home_off');
......
//名前空間用のオブジェクトを用意する
var CONTENTVIEW_CHECK = {};
CONTENTVIEW_CHECK.ready = function(){
//ビューア、共有表示パーツ読み込み
$("#viewer").load("./inc_contentview.html?__UPDATEID__", function (myData, myStatus, xhr){
//読み込み完了時の処理
I18N.i18nReplaceText();
setTimeout(function(){
CONTENTVIEW_CHECK.showContentView();
}, 200);
});
};
CONTENTVIEW_CHECK.showContentView = function(){
$("#ws-body").hide();
//$("#topcontrol").hide();
CONTENTVIEW_INITOBJECT.clearViewerComponent();
CONTENTVIEW.cssInit();
$("#viewer").show();
CONTENTVIEW.ready();
};
$("document").ready(function () {
//CONTENTVIEW_OPENURI.ready();
});
......@@ -340,7 +340,7 @@ CONTENTVIEW_GENERAL.enableAllControl = function() {
}
}
if( ClientData.isGetitsMode() == true ){
if( ClientData.isGetitsMode() == true || ClientData.isCheckViewMode() == true ){
$('#imgHome').unbind('click');
$('#imgHome').removeClass();
$('#imgHome').addClass('home_off');
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-store">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="-1">
<title></title>
<link rel="stylesheet" type="text/css" href="./abvw/css/layout/common.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="./abvw/common/css/jquery-ui.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="./abvw/common/css/jquery.toastmessage.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="./abvw/css/layout/login.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="./abvw/css/layout/login_validation.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="./abvw/css/layout/limit_access.css?__UPDATEID__" />
<script type="text/javascript" src="./abvw/common/js/jquery-1.8.1.min.js?__UPDATEID__"></script>
<script type="text/javascript" src="./abvw/common/js/thickbox.js?__UPDATEID__"></script>
<script type="text/javascript" src="./abvw/common/js/jquery-ui-1.8.23.custom.min.js?__UPDATEID__"></script>
<script type="text/javascript" src="./abvw/common/js/jquery.toastmessage.js?__UPDATEID__"></script>
<script type="text/javascript" src="./abvw/common/js/screenLock.js?__UPDATEID__" ></script>
<script type="text/javascript" src="./abvw/common/js/avweb.js?__UPDATEID__"></script>
<script type="text/javascript" src="./abvw/common/js/i18n.js?__UPDATEID__"></script>
<script type="text/javascript" src="./abvw/common/js/common.js?__UPDATEID__"></script>
<script type="text/javascript" src="./abvw/js/Limit_Access_Content.js?__UPDATEID__"></script>
<script type="text/javascript" src="./abvw/js/login.js?__UPDATEID__"></script>
<script type="text/javascript" src="./abvw/js/check/checkview.js?__UPDATEID__"></script>
<!--[if gte IE 9]>
<style type="text/css">
.gradient {
filter: none;
}
</style>
<![endif]-->
<script type="text/javascript">
$(document).ready(function(){
CHECKVIEW.ready();
});
</script>
</head>
<body id="login">
<div id="anonymous">
<img src="./abvw/img/login/logo_login.png" width="200" class="clearboth"/>
</div>
<div id="normalUser">
<!--
<div id="loader"><img src="./abvw/img/login/loading_icon.gif" width="200" height="200"></div>
<div id="fade"></div>
-->
<div class="wrapper">
<div id="main-ws">
<ul class="floatR" id="menu-language"><li class="language"><a id="language-ja"><img src="./abvw/img/common/flg_jpn.png" width="29" height="20"></a></li><li class="language"><a id="language-en"><img src="./abvw/img/common/flg_usa.png" width="29" height="20"></a></li><li class="language"><a id="language-ko"><img src="./abvw/img/common/flg_kor.png" width="29" height="20"></a></li></ul>
<article>
<img src="./abvw/img/login/logo_login.png" width="200" class="clearboth" id="logologin">
<section id="formlogin" style="display:none;">
<table width="440" border="0" cellspacing="0">
<tr>
<th width="33%" class="lang" lang="txtLoginAccPath">アカウントパス</th>
<td width="67%"><input type="text" id="txtAccPath" maxlength="60" /></td>
</tr>
<tr>
<th class="lang" lang="txtLoginId">ログインID</th>
<td><input type="text" id="txtAccId" maxlength="54" /></td>
</tr>
<tr>
<th class="lang" lang="txtLoginPwd">パスワード</th>
<td><input type="password" id="txtPassword"/></td>
</tr>
</table>
<p class="error lang" id="main-error-message" style="display:none;">パスワードまたはIDに誤りがあります</p>
<p class="memory"><input type="checkbox" id="chkRemember" /><label class="lang" lang="txtLoginPwdRbr" for="chkRemember">アカウントパスとログインIDを記憶する</label></p>
<a class="loginbtn lang" id="btnLogin" lang="dspLogin">ログイン</a>
</section>
</article>
</div>
</div>
<footer>
<div class="border">
<div class="cnt_footer">
COPYRIGHT &copy; 2014 AGENTEC Co., Ltd. ALL RIGHTS RESERVED.
</div>
</div>
</footer>
</div>
<section id="main-password-change" class="sectionchangepassword">
<h1 class="title lang" lang="msgChangePassword"><!--パスワードを変更してください。--></h1>
<span id="dialog-error-message" class="alertTxtDialog lang"></span>
<dl>
<dt class="lang" lang="txtPwdCurr"><!--旧パスワード:--></dt>
<dd><input type="password" id="txtCurrentPass" maxlength="16" /></dd>
</dl>
<dl>
<dt class="lang" lang="txtPwdNew"><!--旧パスワード:--></dt>
<dd><input type="password" id="txtNewPass" maxlength="16" /></dd>
</dl>
<dl>
<dt class="lang" lang="txtPwdNewRe"><!--新パスワード(確認):--></dt>
<dd><input type="password" id="txtConfirmNew" maxlength="16" /></dd>
</dl>
<p class="lang" lang="txtPwdRemind" id="txtPwdRemind"><!--※スキップを選択すると、30日間このメッセージは表示されません--></p>
<p class="loginbtn">
<a class="skip lang" id="btnSkip" lang="dspSkip"><!--スキップ--></a>
<a class="change lang" id="btnChange" lang="dspChange"><!--変更--></a>
</p>
</section>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment