Commit 52c95412 by Masaru Abe

#15764 CMSオーサリングプレビューの試験クイズ対応

parent e1ebe974
......@@ -455,6 +455,14 @@ AVWEB._callCmsApi = function(url, accountPath, apiName, type, params, async, suc
}
apiUrl = apiUrl + '/' + apiName + '/';
//オーサリングプレビュー対応
if(COMMON.isAuthoringPreview() && CONTENTVIEW_GENERAL.pid != ''){
console.log("CONTENTVIEW_GENERAL.pid:" + CONTENTVIEW_GENERAL.pid);
params.pid = CONTENTVIEW_GENERAL.pid;
}
//----------------------------------------------------------------------------------
// for IE: 暫定的に対応 (これをすることでIE9でもCrossDomainリクエストが可能だがアクセスのたびに警告が出る)
$.support.cors = true;
......@@ -515,6 +523,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 +649,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';
......@@ -969,6 +987,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;
};
......
......@@ -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>
......
......@@ -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 */
......@@ -3775,9 +3794,15 @@ CONTENTVIEW.enableControlsCopyMemo = function() {
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF){
$('#listindex').bind('click', CONTENTVIEW_EVENTS.showListPageIndex);
$('#listindex').removeClass();
$('#copytext').bind('click', CONTENTVIEW_EVENTS.showCopyText);
$('#copytext').removeClass();
if(ClientData.serviceOpt_copy_text() == 'Y') {
$('#copytext').bind('click', CONTENTVIEW_EVENTS.showCopyText);
$('#copytext').removeClass();
} else {
$('#copytext').unbind('click');
$('#copytext').removeClass();
$('#copytext').addClass('copy_off');
}
//sessionStorage.removeItem('copy_text');
}
//Start Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary :
......@@ -5552,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();
......@@ -5624,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,
......
......@@ -1248,8 +1248,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();
......
......@@ -177,8 +177,17 @@ CONTENTVIEW_GENERAL.enableAllControl = function() {
$('#listindex').bind('click', CONTENTVIEW_EVENTS.showListPageIndex);
$('#listindex').removeClass();
$('#copytext').bind('click', CONTENTVIEW_EVENTS.showCopyText);
$('#copytext').removeClass();
if(ClientData.serviceOpt_copy_text() == 'Y') {
$('#copytext').bind('click', CONTENTVIEW_EVENTS.showCopyText);
$('#copytext').removeClass();
} else {
$('#copytext').unbind('click');
$('#copytext').removeClass();
$('#copytext').addClass('copy_off');
}
// sessionStorage.removeItem('copy_text');
// $('#copytext').bind('click', CONTENTVIEW_EVENTS.showCopyText);
// $('#copytext').removeClass();
}
//End Function: No.12
......@@ -383,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 = '';
......@@ -397,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;
......@@ -496,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;
......@@ -532,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 = '';
}
};
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