Commit 52c95412 by Masaru Abe

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

parent e1ebe974
...@@ -455,6 +455,14 @@ AVWEB._callCmsApi = function(url, accountPath, apiName, type, params, async, suc ...@@ -455,6 +455,14 @@ AVWEB._callCmsApi = function(url, accountPath, apiName, type, params, async, suc
} }
apiUrl = apiUrl + '/' + apiName + '/'; 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リクエストが可能だがアクセスのたびに警告が出る) // for IE: 暫定的に対応 (これをすることでIE9でもCrossDomainリクエストが可能だがアクセスのたびに警告が出る)
$.support.cors = true; $.support.cors = true;
...@@ -515,6 +523,11 @@ AVWEB._callCmsApiWhen = function(accountPath, apiName, type, params ) { ...@@ -515,6 +523,11 @@ AVWEB._callCmsApiWhen = function(accountPath, apiName, type, params ) {
} }
apiUrl = apiUrl + '/' + apiName + '/'; apiUrl = apiUrl + '/' + apiName + '/';
//オーサリングプレビュー対応
if(COMMON.isAuthoringPreview() && CONTENTVIEW_GENERAL.pid != ''){
params.pid = CONTENTVIEW_GENERAL.pid;
}
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// for IE: 暫定的に対応 (これをすることでIE9でもCrossDomainリクエストが可能だがアクセスのたびに警告が出る) // for IE: 暫定的に対応 (これをすることでIE9でもCrossDomainリクエストが可能だがアクセスのたびに警告が出る)
$.support.cors = true; $.support.cors = true;
...@@ -636,6 +649,11 @@ AVWEB.avwGrabContentPageImage = function(accountPath, params, success, error) { ...@@ -636,6 +649,11 @@ AVWEB.avwGrabContentPageImage = function(accountPath, params, success, error) {
// 送信パラメータの構築 // 送信パラメータの構築
var requestParams = 'contentId=' + params.contentId + '&sid=' + params.sid + '&pageNo=' + params.pageNo; 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'; apiUrl += '?' + requestParams + '&isBase64=true';
if( ClientData.isStreamingMode() ){ if( ClientData.isStreamingMode() ){
apiUrl += '&isStreaming=true'; apiUrl += '&isStreaming=true';
...@@ -969,6 +987,11 @@ AVWEB.getURL = function(apiName) { ...@@ -969,6 +987,11 @@ AVWEB.getURL = function(apiName) {
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 != ''){
url = url + '&pid=' + CONTENTVIEW_GENERAL.pid;
}
return url; return url;
}; };
......
...@@ -48,13 +48,16 @@ ...@@ -48,13 +48,16 @@
<a id="imgmarkingtoolbar" class="markingToolbar" title="マーキングツールバー表示" lang="txtTooltipShowMarkingTool"> </a> <a id="imgmarkingtoolbar" class="markingToolbar" title="マーキングツールバー表示" lang="txtTooltipShowMarkingTool"> </a>
</span> </span>
</div> </div>
<div class="hdRcolumn"> <div id="search_toolbar" class="hdRcolumn">
<input id="txtSearch" type="text"> <input id="txtSearch" type="text">
<aside id="boxSearching" class="bookmarkBox" style="display: none;"> <aside id="boxSearching" class="bookmarkBox" style="display: none;">
<h1 id="bookmarkBoxHdSearching" class="bookmarkBoxHd"></h1> <h1 id="bookmarkBoxHdSearching" class="bookmarkBoxHd"></h1>
<ul id="divSearchResult" class="bookmarkBoxBody_on"></ul> <ul id="divSearchResult" class="bookmarkBoxBody_on"></ul>
</aside> </aside>
</div> </div>
<div id="close_toolbar" class="hdRcolumn" style="display:none;">
<a id="close_screen" href="#" class="closebtn"> </a>
</div>
</div> </div>
</header> </header>
......
...@@ -934,7 +934,17 @@ CONTENTVIEW.showErrorScreen = function() { ...@@ -934,7 +934,17 @@ CONTENTVIEW.showErrorScreen = function() {
}); });
$('.toast-type-error').css('height', '100px'); $('.toast-type-error').css('height', '100px');
$('.toast-type-error > p').css('padding-top', '35px'); $('.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*/ /* display alert screen*/
...@@ -3648,6 +3658,15 @@ CONTENTVIEW.setDefaultEvent = function() { ...@@ -3648,6 +3658,15 @@ CONTENTVIEW.setDefaultEvent = function() {
$('#button_pre_canvas').css('opacity', '0'); $('#button_pre_canvas').css('opacity', '0');
$('#button_next_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 */ /*disable all control when click copy memo */
...@@ -3775,9 +3794,15 @@ CONTENTVIEW.enableControlsCopyMemo = function() { ...@@ -3775,9 +3794,15 @@ CONTENTVIEW.enableControlsCopyMemo = function() {
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF){ if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF){
$('#listindex').bind('click', CONTENTVIEW_EVENTS.showListPageIndex); $('#listindex').bind('click', CONTENTVIEW_EVENTS.showListPageIndex);
$('#listindex').removeClass(); $('#listindex').removeClass();
if(ClientData.serviceOpt_copy_text() == 'Y') {
$('#copytext').bind('click', CONTENTVIEW_EVENTS.showCopyText); $('#copytext').bind('click', CONTENTVIEW_EVENTS.showCopyText);
$('#copytext').removeClass(); $('#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 : //Start Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary :
...@@ -5552,14 +5577,14 @@ $(function () { ...@@ -5552,14 +5577,14 @@ $(function () {
//CONTENTVIEW.ready(); //CONTENTVIEW.ready();
}); });
CONTENTVIEW.ready = function(){ CONTENTVIEW.ready = function(initContentId){
CONTENTVIEW_CALLAPI.ready(); CONTENTVIEW_CALLAPI.ready();
CONTENTVIEW_EVENTS.ready(); CONTENTVIEW_EVENTS.ready();
CONTENTVIEW_GETDATA.ready(); CONTENTVIEW_GETDATA.ready();
CONTENTVIEW_INITOBJECT.ready(); CONTENTVIEW_INITOBJECT.ready();
CONTENTVIEW_CREATEOBJECT.ready(); CONTENTVIEW_CREATEOBJECT.ready();
CONTENTVIEW_GENERAL.ready(); CONTENTVIEW_GENERAL.ready(initContentId);
CONTENTVIEW_MEMO.ready(); CONTENTVIEW_MEMO.ready();
CONTENTVIEW_GOMU.ready(); CONTENTVIEW_GOMU.ready();
CONTENTVIEW_MAKER.ready(); CONTENTVIEW_MAKER.ready();
...@@ -5624,12 +5649,16 @@ CONTENTVIEW.ready = function(){ ...@@ -5624,12 +5649,16 @@ CONTENTVIEW.ready = function(){
CONTENTVIEW.marginY = 65; CONTENTVIEW.marginY = 65;
} }
/* check login */ if(COMMON.isAuthoringPreview() && CONTENTVIEW_GENERAL.pid != ''){
if (!AVWEB.avwCheckLogin(COMMON.ScreenIds.Login)) return; //プレビューモード
// Set event to prevent leave } else {
COMMON.ToogleLogoutNortice(); /* check login */
//START TRB00048 - EDITOR : Long - Date : 09/18/2013 - Summary : Fix Jumpcontent if (!AVWEB.avwCheckLogin(COMMON.ScreenIds.Login)) return;
CONTENTVIEW_GETDATA.getContentID(); // Set event to prevent leave
COMMON.ToogleLogoutNortice();
//START TRB00048 - EDITOR : Long - Date : 09/18/2013 - Summary : Fix Jumpcontent
CONTENTVIEW_GETDATA.getContentID();
}
var params = { var params = {
contentId: CONTENTVIEW_GENERAL.contentID, contentId: CONTENTVIEW_GENERAL.contentID,
......
...@@ -1248,8 +1248,30 @@ CONTENTVIEW_CREATEOBJECT.openPopUp.prototype = new CONTENTVIEW_CREATEOBJECT.Page ...@@ -1248,8 +1248,30 @@ CONTENTVIEW_CREATEOBJECT.openPopUp.prototype = new CONTENTVIEW_CREATEOBJECT.Page
/* mediaType = 1 and actionType = 10 move to Content object*/ /* 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) { 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.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, null, null, objectId);
this.action = function () { 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(); var objectLog = new ObjectLogEntity();
......
...@@ -177,8 +177,17 @@ CONTENTVIEW_GENERAL.enableAllControl = function() { ...@@ -177,8 +177,17 @@ CONTENTVIEW_GENERAL.enableAllControl = function() {
$('#listindex').bind('click', CONTENTVIEW_EVENTS.showListPageIndex); $('#listindex').bind('click', CONTENTVIEW_EVENTS.showListPageIndex);
$('#listindex').removeClass(); $('#listindex').removeClass();
$('#copytext').bind('click', CONTENTVIEW_EVENTS.showCopyText); if(ClientData.serviceOpt_copy_text() == 'Y') {
$('#copytext').removeClass(); $('#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 //End Function: No.12
...@@ -383,7 +392,12 @@ $(function () { ...@@ -383,7 +392,12 @@ $(function () {
//CONTENTVIEW_GENERAL.ready(); //CONTENTVIEW_GENERAL.ready();
}); });
CONTENTVIEW_GENERAL.ready = function(){ CONTENTVIEW_GENERAL.animateTypeKeys = {
Type_Slide : 0,
Type_FadeIn : 1
};
CONTENTVIEW_GENERAL.ready = function(initContentId){
/* init variable */ /* init variable */
CONTENTVIEW_GENERAL.pageImages = ''; CONTENTVIEW_GENERAL.pageImages = '';
...@@ -397,7 +411,13 @@ CONTENTVIEW_GENERAL.ready = function(){ ...@@ -397,7 +411,13 @@ CONTENTVIEW_GENERAL.ready = function(){
CONTENTVIEW_GENERAL.dataPageTitle = undefined; CONTENTVIEW_GENERAL.dataPageTitle = undefined;
CONTENTVIEW_GENERAL.dataJsonType4 = undefined; CONTENTVIEW_GENERAL.dataJsonType4 = undefined;
CONTENTVIEW_GENERAL.dataJsonType5 = 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.isOpenPopUpText = false;
CONTENTVIEW_GENERAL.isOpenPopUpMemo = true; CONTENTVIEW_GENERAL.isOpenPopUpMemo = true;
CONTENTVIEW_GENERAL.objEditMemo = undefined; CONTENTVIEW_GENERAL.objEditMemo = undefined;
...@@ -496,10 +516,6 @@ CONTENTVIEW_GENERAL.ready = function(){ ...@@ -496,10 +516,6 @@ CONTENTVIEW_GENERAL.ready = function(){
CONTENTVIEW_GENERAL.prevPageObjects = []; CONTENTVIEW_GENERAL.prevPageObjects = [];
CONTENTVIEW_GENERAL.prevPageImage = ''; CONTENTVIEW_GENERAL.prevPageImage = '';
CONTENTVIEW_GENERAL.prevContent = new CONTENTVIEW_CREATEOBJECT.Content(); CONTENTVIEW_GENERAL.prevContent = new CONTENTVIEW_CREATEOBJECT.Content();
CONTENTVIEW_GENERAL.animateTypeKeys = {
Type_Slide : 0,
Type_FadeIn : 1
};
CONTENTVIEW_GENERAL.animateType = undefined; CONTENTVIEW_GENERAL.animateType = undefined;
CONTENTVIEW_GENERAL.animatePeriod = undefined; CONTENTVIEW_GENERAL.animatePeriod = undefined;
...@@ -532,7 +548,13 @@ CONTENTVIEW_GENERAL.ready = function(){ ...@@ -532,7 +548,13 @@ CONTENTVIEW_GENERAL.ready = function(){
//Start Function : No.9 //Start Function : No.9
CONTENTVIEW_GENERAL._object3DImageArr = []; 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