Commit 119583b1 by vietdo

Merge branch 'feature/1.6.2_doutor' of…

Merge branch 'feature/1.6.2_doutor' of git@gitlab.agentec.jp:abook_web/web-viewer.git into feature/1.6.2_doutor
parents 015ce521 97a5715f
......@@ -455,6 +455,11 @@ AVWEB._callCmsApi = function(url, accountPath, apiName, type, params, async, suc
}
apiUrl = apiUrl + '/' + apiName + '/';
//オーサリングプレビュー対応
if(COMMON.isAuthoringPreview() && CONTENTVIEW_GENERAL.pid != ''){
params.pid = CONTENTVIEW_GENERAL.pid;
}
//----------------------------------------------------------------------------------
// for IE: 暫定的に対応 (これをすることでIE9でもCrossDomainリクエストが可能だがアクセスのたびに警告が出る)
$.support.cors = true;
......@@ -515,6 +520,11 @@ AVWEB._callCmsApiWhen = function(accountPath, apiName, type, params ) {
}
apiUrl = apiUrl + '/' + apiName + '/';
//オーサリングプレビュー対応
if(COMMON.isAuthoringPreview() && CONTENTVIEW_GENERAL.pid != ''){
params.pid = CONTENTVIEW_GENERAL.pid;
}
//----------------------------------------------------------------------------------
// for IE: 暫定的に対応 (これをすることでIE9でもCrossDomainリクエストが可能だがアクセスのたびに警告が出る)
$.support.cors = true;
......@@ -636,6 +646,11 @@ AVWEB.avwGrabContentPageImage = function(accountPath, params, success, error) {
// 送信パラメータの構築
var requestParams = 'contentId=' + params.contentId + '&sid=' + params.sid + '&pageNo=' + params.pageNo;
//オーサリングプレビュー対応
if(COMMON.isAuthoringPreview() && CONTENTVIEW_GENERAL.pid != ''){
requestParams = requestParams + '&pid=' + CONTENTVIEW_GENERAL.pid;
}
apiUrl += '?' + requestParams + '&isBase64=true';
if( ClientData.isStreamingMode() ){
apiUrl += '&isStreaming=true';
......@@ -852,7 +867,7 @@ AVWEB.showSystemError = function(textId) {
sticky: true,
text: errMes,
close: function() {
if( ClientData.isStreamingMode() == false ){
if( ClientData.isStreamingMode() == false && COMMON.isAuthoringPreview() == false){
//ストリーミングでなければログアウト時と同じ後始末処理をしてログイン画面に戻す
if( !HEADER.webLogoutEvent() ){
//ログアウト出来なかった
......@@ -969,6 +984,11 @@ AVWEB.getURL = function(apiName) {
var url = ClientData.conf_apiResourceDlUrl(); //sysSettings.apiResourceDlUrl;
url = AVWEB.format(url, ClientData.userInfo_accountPath()) + '/' + apiName + '/?isStreaming=' + isStreaming;
//オーサリングプレビュー対応
if(COMMON.isAuthoringPreview() && CONTENTVIEW_GENERAL.pid != ''){
url = url + '&pid=' + CONTENTVIEW_GENERAL.pid;
}
return url;
};
......
......@@ -2501,6 +2501,11 @@ COMMON.SetPageLog = function(strContentId, strPageNo){
// 1アクションのオブジェクトログを作成
COMMON.SetObjectLog = function(strContentId, objectLog){
//オーサリングプレビューなら無視
if(COMMON.isAuthoringPreview()){
return;
}
var arrContentLogs = ClientData.ContentLogData();
for(var nIndex = 0; nIndex < arrContentLogs.length; nIndex++) {
......@@ -2537,6 +2542,11 @@ COMMON.SetObjectLogActionTime = function( strContentId, objectId, actionTime ){
*/
COMMON.RegisterLog = function(is) {
//オーサリングプレビューなら無視
if(COMMON.isAuthoringPreview()){
return;
}
var arrContentLogs = ClientData.ContentLogData();
var isError = false;
......@@ -3191,5 +3201,15 @@ COMMON.getUrlParam = function(name, url){
}
};
//オーサリングプレビューモードか判定
COMMON.isAuthoringPreview = function(){
if( AVWEB.avwSysSetting().previewFlg != undefined ){
return AVWEB.avwSysSetting().previewFlg;
} else {
return false;
}
};
<!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/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="./common/css/jquery.toastmessage.css" />
<link rel="stylesheet" type="text/css" href="./common/css/default.css" />
<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="css/layout/viewer.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="css/theme/viewer.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="common/css/jquery.powertip.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="css/layout/Anket.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="css/theme/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.toastmessage.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/contentpreview.js?__UPDATEID__"></script>
<style>
html{
-ms-touch-action : none;
touch-action : none ;
}
</style>
<script type="text/javascript">
$(document).ready(function() {
CONTENTPREVIEW.ready();
});
</script>
</head>
<body id="previewviewer" oncontextmenu="return true">
<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>
......@@ -1722,3 +1722,12 @@ span.no-item{
}
.closebtn {
width: 30px;
height: 30px;
display: block;
margin-left: 230px;
margin-top:15px;
position:absolute;
}
......@@ -1444,3 +1444,8 @@ span.no-item{
.picker-choose-off{
border:1px solid #d3d5d6 !important;
}
.closebtn {
background: url(../../img/login/close.png) 0 0 no-repeat;
}
......@@ -48,13 +48,16 @@
<a id="imgmarkingtoolbar" class="markingToolbar" title="マーキングツールバー表示" lang="txtTooltipShowMarkingTool"> </a>
</span>
</div>
<div class="hdRcolumn">
<div id="search_toolbar" class="hdRcolumn">
<input id="txtSearch" type="text">
<aside id="boxSearching" class="bookmarkBox" style="display: none;">
<h1 id="bookmarkBoxHdSearching" class="bookmarkBoxHd"></h1>
<ul id="divSearchResult" class="bookmarkBoxBody_on"></ul>
</aside>
</div>
<div id="close_toolbar" class="hdRcolumn" style="display:none;">
<a id="close_screen" href="#" class="closebtn"> </a>
</div>
</div>
</header>
......
//名前空間用のオブジェクトを用意する
var CONTENTPREVIEW = {};
CONTENTPREVIEW.ready = function(){
if(!AVWEB.avwUserSessionObj){
AVWEB.avwCreateUserSession();
}
var sysSettings = AVWEB.avwSysSetting(); // get info in conf.json
var sid = COMMON.getUrlParam('sid','');
var contentId = COMMON.getUrlParam('contentId','');
ClientData.userInfo_sid(sid);
ClientData.userInfo_sid_local(sid);
ClientData.userInfo_accountPath(COMMON.getUrlParam('urlpath',''));
ClientData.contentInfo_contentId(contentId);
ClientData.conf_apiUrl( sysSettings.apiUrl );
ClientData.conf_apiLoginUrl( sysSettings.apiLoginUrl );
ClientData.conf_apiResourceDlUrl( sysSettings. apiResourceDlUrl );
//ビューア、共有表示パーツ読み込み
$("#viewer").load("./inc_contentview.html?__UPDATEID__", function (myData, myStatus, xhr){
//メニュー表示設定
$('#top_toolbar').hide();
$('#search_toolbar').hide();
$('#close_toolbar').show();
//読み込み完了時の処理
I18N.i18nReplaceText();
CONTENTPREVIEW.defaultValue = {
pageTransition : CONTENTVIEW_GENERAL.animateTypeKeys.Type_Slide,
pageTransitionPeriod : 1,
bookmarkData : [],
memoData: [],
markingData: [],
isMarkingDsp : false,
isMemoDsp: false,
userOpt_marking : 'N'
};
ClientData.userOpt_pageTransition(CONTENTPREVIEW.defaultValue.pageTransition);
ClientData.userOpt_pageTransitionPeriod(CONTENTPREVIEW.defaultValue.pageTransitionPeriod);
ClientData.BookMarkData(CONTENTPREVIEW.defaultValue.bookmarkData);
ClientData.MemoData(CONTENTPREVIEW.defaultValue.memoData);
ClientData.MarkingData(CONTENTPREVIEW.defaultValue.markingData);
ClientData.userOpt_makingDsp(CONTENTPREVIEW.defaultValue.isMarkingDsp);
ClientData.serviceOpt_marking(CONTENTPREVIEW.defaultValue.userOpt_marking);
ClientData.IsAddingMarking(false);
ClientData.IsAddingMemo(false);
ClientData.IsDisplayMarking(false);
ClientData.IsDisplayMemo(false);
CONTENTVIEW_INITOBJECT.clearViewerComponent();
CONTENTVIEW.cssInit();
$("#viewer").show();
CONTENTVIEW.ready(contentId);
});
};
$(document).ready(function(){
//
});
......@@ -934,7 +934,17 @@ CONTENTVIEW.showErrorScreen = function() {
});
$('.toast-type-error').css('height', '100px');
$('.toast-type-error > p').css('padding-top', '35px');
$('.toast-item-close').live('click', CONTENTVIEW_EVENTS.imgBack_click);
//オーサリングプレビュー対応
if(COMMON.isAuthoringPreview() && CONTENTVIEW_GENERAL.pid != ''){
$('.toast-item-close').live('click', function(){
window.open('', '_self', '');
window.close();
});
} else {
$('.toast-item-close').live('click', CONTENTVIEW_EVENTS.imgBack_click);
}
};
/* display alert screen*/
......@@ -3648,6 +3658,15 @@ CONTENTVIEW.setDefaultEvent = function() {
$('#button_pre_canvas').css('opacity', '0');
$('#button_next_canvas').css('opacity', '0');
});
//オーサリングプレビュー対応
if(COMMON.isAuthoringPreview() && CONTENTVIEW_GENERAL.pid != ''){
$('#close_screen').click(function(){
window.open('', '_self', '');
window.close();
});
}
};
/*disable all control when click copy memo */
......@@ -5558,14 +5577,14 @@ $(function () {
//CONTENTVIEW.ready();
});
CONTENTVIEW.ready = function(){
CONTENTVIEW.ready = function(initContentId){
CONTENTVIEW_CALLAPI.ready();
CONTENTVIEW_EVENTS.ready();
CONTENTVIEW_GETDATA.ready();
CONTENTVIEW_INITOBJECT.ready();
CONTENTVIEW_CREATEOBJECT.ready();
CONTENTVIEW_GENERAL.ready();
CONTENTVIEW_GENERAL.ready(initContentId);
CONTENTVIEW_MEMO.ready();
CONTENTVIEW_GOMU.ready();
CONTENTVIEW_MAKER.ready();
......@@ -5630,12 +5649,16 @@ CONTENTVIEW.ready = function(){
CONTENTVIEW.marginY = 65;
}
/* check login */
if (!AVWEB.avwCheckLogin(COMMON.ScreenIds.Login)) return;
// Set event to prevent leave
COMMON.ToogleLogoutNortice();
//START TRB00048 - EDITOR : Long - Date : 09/18/2013 - Summary : Fix Jumpcontent
CONTENTVIEW_GETDATA.getContentID();
if(COMMON.isAuthoringPreview() && CONTENTVIEW_GENERAL.pid != ''){
//プレビューモード
} else {
/* check login */
if (!AVWEB.avwCheckLogin(COMMON.ScreenIds.Login)) return;
// Set event to prevent leave
COMMON.ToogleLogoutNortice();
//START TRB00048 - EDITOR : Long - Date : 09/18/2013 - Summary : Fix Jumpcontent
CONTENTVIEW_GETDATA.getContentID();
}
var params = {
contentId: CONTENTVIEW_GENERAL.contentID,
......
......@@ -962,11 +962,7 @@ CONTENTVIEW_CREATEOBJECT.anket = function (mediaType, actionType, id, imageUrl,
/*stop audio on page */
CONTENTVIEW.stopAllAudio();
var url = CONTENTVIEW_GETDATA.getURLPageImage("webEnqueteReply/init") + "/?abObjectId="+objectId + "&sid=" + CONTENTVIEW.getSessionId();
if(ClientData.isStreamingMode()){
//ストリーミング
url = url + "&isStreaming=true";
}
var url = CONTENTVIEW_GETDATA.getURLPageImage("webEnqueteReply/init") + "&abObjectId="+objectId + "&sid=" + CONTENTVIEW.getSessionId();
var isFullScreen = false;
if(parseInt(fullscreen) == 1){
......@@ -1014,11 +1010,7 @@ CONTENTVIEW_CREATEOBJECT.exam = function (mediaType, actionType, id, imageUrl, x
} else {
isSendResult = false;
}
var url = CONTENTVIEW_GETDATA.getURLPageImage("webEnqueteReply/init") + "/?abObjectId="+objectId + "&sid=" + CONTENTVIEW.getSessionId()+"&isShowResult="+isShowResult+"&isSendResult="+isSendResult;
if(ClientData.isStreamingMode()){
//ストリーミング
url = url + "&isStreaming=true";
}
var url = CONTENTVIEW_GETDATA.getURLPageImage("webEnqueteReply/init") + "&abObjectId="+objectId + "&sid=" + CONTENTVIEW.getSessionId()+"&isShowResult="+isShowResult+"&isSendResult="+isSendResult;
var isFullScreen = false;
if(parseInt(fullscreen) == 1){
isFullScreen = true;
......@@ -1055,12 +1047,7 @@ CONTENTVIEW_CREATEOBJECT.quiz = function (mediaType, actionType, id, imageUrl, x
/*stop audio on page */
CONTENTVIEW.stopAllAudio();
var url = CONTENTVIEW_GETDATA.getURLPageImage("webEnqueteReply/init") + "/?abObjectId="+objectId + "&sid=" + CONTENTVIEW.getSessionId();
if(ClientData.isStreamingMode()){
//ストリーミング
url = url + "&isStreaming=true";
}
var url = CONTENTVIEW_GETDATA.getURLPageImage("webEnqueteReply/init") + "&abObjectId="+objectId + "&sid=" + CONTENTVIEW.getSessionId();
var isFullScreen = false;
if(parseInt(fullscreen) == 1){
isFullScreen = true;
......@@ -1248,8 +1235,30 @@ CONTENTVIEW_CREATEOBJECT.openPopUp.prototype = new CONTENTVIEW_CREATEOBJECT.Page
/* mediaType = 1 and actionType = 10 move to Content object*/
CONTENTVIEW_CREATEOBJECT.moveToContent = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible, contentId, pageNo, objectId) {
this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, null, null, objectId);
this.action = function () {
this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, null, null, objectId);
this.action = function () {
//オーサリングプレビュー対応
if(COMMON.isAuthoringPreview() && CONTENTVIEW_GENERAL.pid != ''){
var $dialog = $('#contentAudioConfirm');
var $overlay = $('#overlay');
$dialog.find("#txtContentAudio").html(i18nText("txtPreventLink"));
$dialog.find("#txtContentAudio").attr("lang",'txtPreventLink');
$dialog.center();
$dialog.show();
$overlay.show();
$('#contentAudioConfirm_OK').click(function(){
$overlay.hide();
$dialog.hide();
$dialog.find("#txtContentAudio").attr("lang",'txtContentAudio');
});
return;
}
//詳細ログ作成
var objectLog = new ObjectLogEntity();
......
......@@ -392,7 +392,12 @@ $(function () {
//CONTENTVIEW_GENERAL.ready();
});
CONTENTVIEW_GENERAL.ready = function(){
CONTENTVIEW_GENERAL.animateTypeKeys = {
Type_Slide : 0,
Type_FadeIn : 1
};
CONTENTVIEW_GENERAL.ready = function(initContentId){
/* init variable */
CONTENTVIEW_GENERAL.pageImages = '';
......@@ -406,7 +411,13 @@ CONTENTVIEW_GENERAL.ready = function(){
CONTENTVIEW_GENERAL.dataPageTitle = undefined;
CONTENTVIEW_GENERAL.dataJsonType4 = undefined;
CONTENTVIEW_GENERAL.dataJsonType5 = undefined;
CONTENTVIEW_GENERAL.contentID = undefined;
//オーサリングプレビュー対応
if(initContentId != null && initContentId != undefined){
CONTENTVIEW_GENERAL.contentID = initContentId;
} else {
CONTENTVIEW_GENERAL.contentID = undefined;
}
CONTENTVIEW_GENERAL.isOpenPopUpText = false;
CONTENTVIEW_GENERAL.isOpenPopUpMemo = true;
CONTENTVIEW_GENERAL.objEditMemo = undefined;
......@@ -505,10 +516,6 @@ CONTENTVIEW_GENERAL.ready = function(){
CONTENTVIEW_GENERAL.prevPageObjects = [];
CONTENTVIEW_GENERAL.prevPageImage = '';
CONTENTVIEW_GENERAL.prevContent = new CONTENTVIEW_CREATEOBJECT.Content();
CONTENTVIEW_GENERAL.animateTypeKeys = {
Type_Slide : 0,
Type_FadeIn : 1
};
CONTENTVIEW_GENERAL.animateType = undefined;
CONTENTVIEW_GENERAL.animatePeriod = undefined;
......@@ -541,7 +548,13 @@ CONTENTVIEW_GENERAL.ready = function(){
//Start Function : No.9
CONTENTVIEW_GENERAL._object3DImageArr = [];
//オーサリングプレビュー対応
if(initContentId != null && initContentId != undefined){
CONTENTVIEW_GENERAL.pid = initContentId;
} else {
CONTENTVIEW_GENERAL.pid = '';
}
};
......@@ -4,10 +4,20 @@ var CONTENTVIEW_GETDATA = {};
/* get url */
CONTENTVIEW_GETDATA.getURLPageImage = function(apiName) {
//var sysSettings = AVWEB.avwSysSetting();
//var url = sysSettings.apiUrl;
var isStreaming = "false";
if(ClientData.isStreamingMode()){
isStreaming = "true";
}
var url = ClientData.conf_apiUrl();
url = AVWEB.format(url, ClientData.userInfo_accountPath()) + '/' + apiName;
url = AVWEB.format(url, ClientData.userInfo_accountPath()) + '/' + apiName + '/?isStreaming=' + isStreaming;
//オーサリングプレビュー対応
if(COMMON.isAuthoringPreview() && CONTENTVIEW_GENERAL.pid != ''){
url = url + '&pid=' + CONTENTVIEW_GENERAL.pid;
}
return url;
};
......
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