Commit a3dd3edf by vietdo

#15801 クイズ(ActionType=15)のJSON解析とビューア画面への表示

parent 9c387afc
...@@ -2827,7 +2827,7 @@ CONTENTVIEW.ContentPage.prototype.addPageObjects = function (pageObjects) { ...@@ -2827,7 +2827,7 @@ CONTENTVIEW.ContentPage.prototype.addPageObjects = function (pageObjects) {
//End Function : No.9 - Editor : Long - Summary : //End Function : No.9 - Editor : Long - Summary :
else if(obj.actionType == 15){ else if(obj.actionType == 15){
pageObj = new CONTENTVIEW_CREATEOBJECT.exam( pageObj = new CONTENTVIEW_CREATEOBJECT.quiz(
obj.mediaType, obj.mediaType,
obj.actionType, obj.actionType,
obj.id, obj.id,
......
...@@ -21,7 +21,7 @@ CONTENTVIEW_ANKET.showAnket = function(url, fullscreen, objectId) { ...@@ -21,7 +21,7 @@ CONTENTVIEW_ANKET.showAnket = function(url, fullscreen, objectId) {
else { else {
$container.attr('style', 'width:' + width + 'px; right:10px;left:auto;'); // !important $container.attr('style', 'width:' + width + 'px; right:10px;left:auto;'); // !important
} }
$container.draggable({ handle: "h1" }); $container.draggable({ handle: "h1" });
$container.html( $container.html(
'<h1>'+I18N.i18nText('txtEnqueteTitle') '<h1>'+I18N.i18nText('txtEnqueteTitle')
...@@ -31,19 +31,19 @@ CONTENTVIEW_ANKET.showAnket = function(url, fullscreen, objectId) { ...@@ -31,19 +31,19 @@ CONTENTVIEW_ANKET.showAnket = function(url, fullscreen, objectId) {
+ '</iframe></div>' + '</iframe></div>'
+ '<div class="anket-commands" id="anket-commands"><input type="button" value="' + I18N.i18nText('txtTransparent') + '" id="btnFullOpacity"/> <input type="button" value="' + I18N.i18nText('txtSemiTransparent') + '" id="btnApartOpacity"/> <input type="button" value="' + I18N.i18nText('txtNoTransparent') + '" id="btnNoOpacity"/></div><div style="clear:both;"></div>' + '<div class="anket-commands" id="anket-commands"><input type="button" value="' + I18N.i18nText('txtTransparent') + '" id="btnFullOpacity"/> <input type="button" value="' + I18N.i18nText('txtSemiTransparent') + '" id="btnApartOpacity"/> <input type="button" value="' + I18N.i18nText('txtNoTransparent') + '" id="btnNoOpacity"/></div><div style="clear:both;"></div>'
); );
$("#btnClose").on({ $("#btnClose").on({
'click touchend': function(ev){ 'click touchend': function(ev){
//時間記録 //時間記録
var dateEnd = new Date(); var dateEnd = new Date();
var actionTime = dateEnd.subtractBySeconds(dateStart); var actionTime = dateEnd.subtractBySeconds(dateStart);
//alert("actionTime:" + actionTime); //alert("actionTime:" + actionTime);
COMMON.SetObjectLogActionTime( CONTENTVIEW_GENERAL.contentID, objectId, actionTime ); COMMON.SetObjectLogActionTime( CONTENTVIEW_GENERAL.contentID, objectId, actionTime );
$container.removeAttr('style'); $container.removeAttr('style');
CONTENTVIEW_GENERAL.hideDialog(); CONTENTVIEW_GENERAL.hideDialog();
return false; return false;
}, },
'touchstart touchmove': function(){ 'touchstart touchmove': function(){
...@@ -62,7 +62,7 @@ CONTENTVIEW_ANKET.showAnket = function(url, fullscreen, objectId) { ...@@ -62,7 +62,7 @@ CONTENTVIEW_ANKET.showAnket = function(url, fullscreen, objectId) {
$('#dialog .anket-container').css('overflow', 'scroll'); $('#dialog .anket-container').css('overflow', 'scroll');
//$('#dialog .anket-container').css('-webkit-overflow-scrolling', 'touch'); //$('#dialog .anket-container').css('-webkit-overflow-scrolling', 'touch');
//$('#dialog .anket-container').css('position', 'relative'); //$('#dialog .anket-container').css('position', 'relative');
if (fullscreen == true) { if (fullscreen == true) {
$container.attr('style', 'width:' + width + 'px; left:10px;right:auto;'); // !important on ipad can't move dialog $container.attr('style', 'width:' + width + 'px; left:10px;right:auto;'); // !important on ipad can't move dialog
} }
...@@ -78,7 +78,7 @@ CONTENTVIEW_ANKET.showAnket = function(url, fullscreen, objectId) { ...@@ -78,7 +78,7 @@ CONTENTVIEW_ANKET.showAnket = function(url, fullscreen, objectId) {
// click on button change transparent // click on button change transparent
$('#dialog .anket-commands input').click( $('#dialog .anket-commands input').click(
function () { function () {
//START TRB00092 - EDITOR: Long - Date: 09/26/2013 - Summary : Fix opacity //START TRB00092 - EDITOR: Long - Date: 09/26/2013 - Summary : Fix opacity
if ($(this).index() == 0) { if ($(this).index() == 0) {
//set transparent //set transparent
...@@ -104,7 +104,7 @@ CONTENTVIEW_ANKET.showAnket = function(url, fullscreen, objectId) { ...@@ -104,7 +104,7 @@ CONTENTVIEW_ANKET.showAnket = function(url, fullscreen, objectId) {
// resize dialog anket // resize dialog anket
CONTENTVIEW_ANKET.resizeAnket = function() { CONTENTVIEW_ANKET.resizeAnket = function() {
// get canvas main // get canvas main
var canvas = document.getElementById('main'); var canvas = document.getElementById('main');
var height = canvas.height; var height = canvas.height;
...@@ -121,7 +121,7 @@ CONTENTVIEW_ANKET.resizeAnket = function() { ...@@ -121,7 +121,7 @@ CONTENTVIEW_ANKET.resizeAnket = function() {
// set height for anket container // set height for anket container
$('#dialog .anket-container').css('height', iframeHeight); $('#dialog .anket-container').css('height', iframeHeight);
}; };
CONTENTVIEW_ANKET.ready = function(){ CONTENTVIEW_ANKET.ready = function(){
......
...@@ -78,7 +78,7 @@ CONTENTVIEW_GETDATA.getPageObjectsByPageIndex = function(contentData, nIndexPage ...@@ -78,7 +78,7 @@ CONTENTVIEW_GETDATA.getPageObjectsByPageIndex = function(contentData, nIndexPage
var pageObject = CONTENTVIEW_GETDATA.getMediaType12(currentPageObjects[nIndex]); var pageObject = CONTENTVIEW_GETDATA.getMediaType12(currentPageObjects[nIndex]);
/*add object to page */ /*add object to page */
CONTENTVIEW_GENERAL.pageObjects.push(pageObject); CONTENTVIEW_GENERAL.pageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 13) { /*mediaType = 12*/ } else if (currentPageObjects[nIndex].mediaType == 13) { /*mediaType = 13*/
var pageObject = CONTENTVIEW_GETDATA.getMediaType13(currentPageObjects[nIndex]); var pageObject = CONTENTVIEW_GETDATA.getMediaType13(currentPageObjects[nIndex]);
/*add object to page */ /*add object to page */
CONTENTVIEW_GENERAL.pageObjects.push(pageObject); CONTENTVIEW_GENERAL.pageObjects.push(pageObject);
...@@ -343,6 +343,33 @@ CONTENTVIEW_GETDATA.getMediaType1 = function(iValueObj) { ...@@ -343,6 +343,33 @@ CONTENTVIEW_GETDATA.getMediaType1 = function(iValueObj) {
pageObject["enquete"] = iValueObj.action.enquete; pageObject["enquete"] = iValueObj.action.enquete;
//pageObject["objectId"] = iValueObj.action.objectId; //pageObject["objectId"] = iValueObj.action.objectId;
} }
else if(iValueObj.action.actionType == 14){
pageObject["imageUrl"] = AVWEB.getURL("webResourceDownload") + "&sid=" + CONTENTVIEW.getSessionId() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
pageObject["resourceUrl"] = resourceUrl;
pageObject["showResult"] = iValue.action.showResult;
pageObject["sendResult"] = iValue.action.sendResult;
pageObject["replyLimit"] = iValueObj.action.replyLimit;
pageObject["fullScreen"] = iValueObj.action.fullScreen;
pageObject["saveAs"] = iValueObj.action.saveAs;
pageObject["resourceId"] = iValueObj.action.resourceId;
pageObject["enquete"] = iValueObj.action.enquete;
//pageObject["objectId"] = iValueObj.action.objectId;
}
else if(iValueObj.action.actionType == 15){
pageObject["imageUrl"] = AVWEB.getURL("webResourceDownload") + "&sid=" + CONTENTVIEW.getSessionId() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
pageObject["resourceUrl"] = resourceUrl;
pageObject["questionNo"] = iValueObj.action.questionNo;
pageObject["replyLimit"] = iValueObj.action.replyLimit;
pageObject["fullScreen"] = iValueObj.action.fullScreen;
pageObject["saveAs"] = iValueObj.action.saveAs;
pageObject["resourceId"] = iValueObj.action.resourceId;
pageObject["enquete"] = iValueObj.action.enquete;
//pageObject["objectId"] = iValueObj.action.objectId;
}
//End Function : No.9 - Editor : Long - Date: 08/16/2013 - Summary : //End Function : No.9 - Editor : Long - Date: 08/16/2013 - Summary :
return pageObject; return pageObject;
}; };
...@@ -749,10 +776,7 @@ CONTENTVIEW_GETDATA.getMediaType9 = function(iValueObj) { ...@@ -749,10 +776,7 @@ CONTENTVIEW_GETDATA.getMediaType9 = function(iValueObj) {
}; };
CONTENTVIEW_GETDATA.getMediaType11 = function(iValueObj) { CONTENTVIEW_GETDATA.getMediaType11 = function(iValueObj) {
console.log(iValueObj);
var pageObject = []; var pageObject = [];
//Get object Info //Get object Info
pageObject['mediaType'] = iValueObj.mediaType; pageObject['mediaType'] = iValueObj.mediaType;
pageObject['id'] = "MediaType11_" + iValueObj.mediaInfo.resourceId; pageObject['id'] = "MediaType11_" + iValueObj.mediaInfo.resourceId;
...@@ -815,7 +839,7 @@ CONTENTVIEW_GETDATA.getMediaType12 = function(iValueObj) { ...@@ -815,7 +839,7 @@ CONTENTVIEW_GETDATA.getMediaType12 = function(iValueObj) {
if(iValueObj.action.actionType == 14){ if(iValueObj.action.actionType == 14){
var resourceId = iValueObj.mediaInfo.resourceId; var resourceId = iValueObj.mediaInfo.resourceId;
pageObject["imageUrl"] = 'img/anket.jpg'; pageObject["imageUrl"] = 'img/test.png';
pageObject["replyLimit"] = iValueObj.action.replyLimit; pageObject["replyLimit"] = iValueObj.action.replyLimit;
pageObject["fullScreen"] = iValueObj.action.fullScreen; pageObject["fullScreen"] = iValueObj.action.fullScreen;
...@@ -856,7 +880,7 @@ CONTENTVIEW_GETDATA.getMediaType13 = function(iValueObj) { ...@@ -856,7 +880,7 @@ CONTENTVIEW_GETDATA.getMediaType13 = function(iValueObj) {
if(iValueObj.action.actionType == 15){ if(iValueObj.action.actionType == 15){
var resourceId = iValueObj.mediaInfo.resourceId; var resourceId = iValueObj.mediaInfo.resourceId;
pageObject["imageUrl"] = 'img/anket.jpg'; pageObject["imageUrl"] = 'img/quize.png';
pageObject["replyLimit"] = iValueObj.action.replyLimit; pageObject["replyLimit"] = iValueObj.action.replyLimit;
pageObject["fullScreen"] = iValueObj.action.fullScreen; pageObject["fullScreen"] = iValueObj.action.fullScreen;
...@@ -1402,7 +1426,6 @@ CONTENTVIEW_GETDATA.renderPrevPage = function(){ ...@@ -1402,7 +1426,6 @@ CONTENTVIEW_GETDATA.renderPrevPage = function(){
//Get next page objects by page index //Get next page objects by page index
CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex = function(contentData, nIndexPage) { CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex = function(contentData, nIndexPage) {
CONTENTVIEW_GENERAL.nextPageObjects = []; CONTENTVIEW_GENERAL.nextPageObjects = [];
console.log(contentData);
var currentPageObjects; var currentPageObjects;
for (var nIndex = 0; nIndex < contentData.length; nIndex++) { for (var nIndex = 0; nIndex < contentData.length; nIndex++) {
if (contentData[nIndex].page == nIndexPage) { if (contentData[nIndex].page == nIndexPage) {
......
...@@ -37,7 +37,7 @@ LOGIN.initialScreen = function() { ...@@ -37,7 +37,7 @@ LOGIN.initialScreen = function() {
}; };
//check Save Login Info //check Save Login Info
LOGIN.saveLoginInfo = function() { LOGIN.saveLoginInfo = function(paramLid, paramP, accountPath) {
var lang = I18N.getCurrentLanguage(); var lang = I18N.getCurrentLanguage();
// load language // load language
...@@ -46,10 +46,17 @@ LOGIN.saveLoginInfo = function() { ...@@ -46,10 +46,17 @@ LOGIN.saveLoginInfo = function() {
// Set flag コンテンツデータチェックフラグ = true to sync local with server // Set flag コンテンツデータチェックフラグ = true to sync local with server
ClientData.common_contentDataChkFlg(true); ClientData.common_contentDataChkFlg(true);
var accountPath, loginId, password;
var chkRemember = $('#chkRemember').attr('checked'); var chkRemember = $('#chkRemember').attr('checked');
var accountPath = $('#txtAccPath').val(); if(paramLid != '' && paramP != ''){
var loginId = $('#txtAccId').val(); accountPath = accountPath;
var password = $('#txtPassword').val(); loginId = paramLid;
password = paramP;
} else {
accountPath = $('#txtAccPath').val();
loginId = $('#txtAccId').val();
password = $('#txtPassword').val();
}
var date = new Date(); var date = new Date();
ClientData.userInfo_accountPath(accountPath); ClientData.userInfo_accountPath(accountPath);
ClientData.userInfo_loginId(loginId); ClientData.userInfo_loginId(loginId);
...@@ -148,10 +155,28 @@ LOGIN.checkDialogValidation = function() { ...@@ -148,10 +155,28 @@ LOGIN.checkDialogValidation = function() {
}; };
//Login Process //Login Process
LOGIN.processLogin = function() { LOGIN.processLogin = function(paramLid, paramP) {
var accountPath = $('#txtAccPath').val();
var loginId = $('#txtAccId').val(); var accountPath = "";
var password = $('#txtPassword').val(); var loginId = "";
var password = "";
if(paramLid){
loginId = paramLid;
} else {
loginId = $('#txtAccId').val();
}
if(paramP){
password = paramP;
} else {
password = $('#txtPassword').val();
}
//var accountPath = $('#txtAccPath').val();
// var loginId = $('#txtAccId').val();
// var password = $('#txtPassword').val();
accountPath = "vietdh";
var requireChangePassword = 0; var requireChangePassword = 0;
var skipPwdDate; var skipPwdDate;
...@@ -190,12 +215,16 @@ LOGIN.processLogin = function() { ...@@ -190,12 +215,16 @@ LOGIN.processLogin = function() {
if (data.result == 'success') { if (data.result == 'success') {
// Save retrieved info // Save retrieved info
LOGIN.saveLoginInfo(); LOGIN.saveLoginInfo(paramLid, paramP, accountPath);
// set number new push message to 0 // set number new push message to 0
ClientData.pushInfo_newMsgNumber(0); ClientData.pushInfo_newMsgNumber(0);
$('#main-error-message').css('display', 'none'); $('#main-error-message').css('display', 'none');
if(ClientData.serviceOpt_encryption() == 'Y') {
data.requirePasswordChange = 0;
}
if (data.requirePasswordChange == 0) { if (data.requirePasswordChange == 0) {
ClientData.userInfo_sid(ClientData.userInfo_sid_local()); ClientData.userInfo_sid(ClientData.userInfo_sid_local());
...@@ -240,7 +269,6 @@ LOGIN.processLogin = function() { ...@@ -240,7 +269,6 @@ LOGIN.processLogin = function() {
//ホームへ移動 //ホームへ移動
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Home); AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
} }
} }
else if (numDay > 30) { else if (numDay > 30) {
LOGIN.OpenChangePasswordDialog(); LOGIN.OpenChangePasswordDialog();
...@@ -406,9 +434,9 @@ LOGIN.changeLanguageEn = function(){ ...@@ -406,9 +434,9 @@ LOGIN.changeLanguageEn = function(){
//Login click function //Login click function
LOGIN.loginFunction = function() { LOGIN.loginFunction = function() {
if (LOGIN.checkValidation()) { //if (LOGIN.checkValidation()) {
LOGIN.processLogin(); LOGIN.processLogin();
} // }
}; };
//Change Password function //Change Password function
...@@ -495,6 +523,9 @@ LOGIN.saveServiceUserOption = function(){ ...@@ -495,6 +523,9 @@ LOGIN.saveServiceUserOption = function(){
else if( option.serviceOptionId == 49) { else if( option.serviceOptionId == 49) {
ClientData.serviceOpt_usable_push_message(option.value); ClientData.serviceOpt_usable_push_message(option.value);
} }
else if( option.serviceOptionId == 126) {
ClientData.serviceOpt_encryption(option.value);
}
}); });
}; };
...@@ -931,18 +962,31 @@ LOGIN.ready = function(){ ...@@ -931,18 +962,31 @@ LOGIN.ready = function(){
}, LOGIN.timeWaitSplashScreen); }, LOGIN.timeWaitSplashScreen);
} }
else { else {
//doutor
var paramLid = COMMON.getUrlParam('lid', '');
var paramP = COMMON.getUrlParam('p', '');
$('#normalUser').show(); $('#normalUser').show();
$('#formlogin').hide(); $('#formlogin').hide();
$('#logologin').animate({ "margin-top": 0 }, LOGIN.timeWaitSplashScreen, $('#logologin').animate({ "margin-top": 0 }, LOGIN.timeWaitSplashScreen,
function () { function () {
$('#formlogin').show(); if( paramLid != '' && paramP != '' ){
$('#formlogindoutor').show();
$('#formlogin').hide();
} else {
$('#formlogin').show();
}
$('#menu-language').animate({ opacity: 1 }, LOGIN.timeWaitSplashScreen); $('#menu-language').animate({ opacity: 1 }, LOGIN.timeWaitSplashScreen);
$('#formlogin').animate({ opacity: 1 }, LOGIN.timeWaitSplashScreen); $('#formlogin').animate({ opacity: 1 }, LOGIN.timeWaitSplashScreen);
$('.cnt_footer').animate({ opacity: 1 }, LOGIN.timeWaitSplashScreen); $('.cnt_footer').animate({ opacity: 1 }, LOGIN.timeWaitSplashScreen);
} }
); );
LOGIN.initLoginNormalUser(); if( paramLid != '' && paramP != '' ){
LOGIN.processLogin(paramLid, paramP);
} else {
LOGIN.initLoginNormalUser();
}
} }
}; };
//}); //});
......
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