Commit a3dd3edf by vietdo

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

parent 9c387afc
......@@ -2827,7 +2827,7 @@ CONTENTVIEW.ContentPage.prototype.addPageObjects = function (pageObjects) {
//End Function : No.9 - Editor : Long - Summary :
else if(obj.actionType == 15){
pageObj = new CONTENTVIEW_CREATEOBJECT.exam(
pageObj = new CONTENTVIEW_CREATEOBJECT.quiz(
obj.mediaType,
obj.actionType,
obj.id,
......
......@@ -78,7 +78,7 @@ CONTENTVIEW_GETDATA.getPageObjectsByPageIndex = function(contentData, nIndexPage
var pageObject = CONTENTVIEW_GETDATA.getMediaType12(currentPageObjects[nIndex]);
/*add object to page */
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]);
/*add object to page */
CONTENTVIEW_GENERAL.pageObjects.push(pageObject);
......@@ -343,6 +343,33 @@ CONTENTVIEW_GETDATA.getMediaType1 = function(iValueObj) {
pageObject["enquete"] = iValueObj.action.enquete;
//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 :
return pageObject;
};
......@@ -749,10 +776,7 @@ CONTENTVIEW_GETDATA.getMediaType9 = function(iValueObj) {
};
CONTENTVIEW_GETDATA.getMediaType11 = function(iValueObj) {
console.log(iValueObj);
var pageObject = [];
//Get object Info
pageObject['mediaType'] = iValueObj.mediaType;
pageObject['id'] = "MediaType11_" + iValueObj.mediaInfo.resourceId;
......@@ -815,7 +839,7 @@ CONTENTVIEW_GETDATA.getMediaType12 = function(iValueObj) {
if(iValueObj.action.actionType == 14){
var resourceId = iValueObj.mediaInfo.resourceId;
pageObject["imageUrl"] = 'img/anket.jpg';
pageObject["imageUrl"] = 'img/test.png';
pageObject["replyLimit"] = iValueObj.action.replyLimit;
pageObject["fullScreen"] = iValueObj.action.fullScreen;
......@@ -856,7 +880,7 @@ CONTENTVIEW_GETDATA.getMediaType13 = function(iValueObj) {
if(iValueObj.action.actionType == 15){
var resourceId = iValueObj.mediaInfo.resourceId;
pageObject["imageUrl"] = 'img/anket.jpg';
pageObject["imageUrl"] = 'img/quize.png';
pageObject["replyLimit"] = iValueObj.action.replyLimit;
pageObject["fullScreen"] = iValueObj.action.fullScreen;
......@@ -1402,7 +1426,6 @@ CONTENTVIEW_GETDATA.renderPrevPage = function(){
//Get next page objects by page index
CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex = function(contentData, nIndexPage) {
CONTENTVIEW_GENERAL.nextPageObjects = [];
console.log(contentData);
var currentPageObjects;
for (var nIndex = 0; nIndex < contentData.length; nIndex++) {
if (contentData[nIndex].page == nIndexPage) {
......
......@@ -37,7 +37,7 @@ LOGIN.initialScreen = function() {
};
//check Save Login Info
LOGIN.saveLoginInfo = function() {
LOGIN.saveLoginInfo = function(paramLid, paramP, accountPath) {
var lang = I18N.getCurrentLanguage();
// load language
......@@ -46,10 +46,17 @@ LOGIN.saveLoginInfo = function() {
// Set flag コンテンツデータチェックフラグ = true to sync local with server
ClientData.common_contentDataChkFlg(true);
var accountPath, loginId, password;
var chkRemember = $('#chkRemember').attr('checked');
var accountPath = $('#txtAccPath').val();
var loginId = $('#txtAccId').val();
var password = $('#txtPassword').val();
if(paramLid != '' && paramP != ''){
accountPath = accountPath;
loginId = paramLid;
password = paramP;
} else {
accountPath = $('#txtAccPath').val();
loginId = $('#txtAccId').val();
password = $('#txtPassword').val();
}
var date = new Date();
ClientData.userInfo_accountPath(accountPath);
ClientData.userInfo_loginId(loginId);
......@@ -148,10 +155,28 @@ LOGIN.checkDialogValidation = function() {
};
//Login Process
LOGIN.processLogin = function() {
var accountPath = $('#txtAccPath').val();
var loginId = $('#txtAccId').val();
var password = $('#txtPassword').val();
LOGIN.processLogin = function(paramLid, paramP) {
var accountPath = "";
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 skipPwdDate;
......@@ -190,12 +215,16 @@ LOGIN.processLogin = function() {
if (data.result == 'success') {
// Save retrieved info
LOGIN.saveLoginInfo();
LOGIN.saveLoginInfo(paramLid, paramP, accountPath);
// set number new push message to 0
ClientData.pushInfo_newMsgNumber(0);
$('#main-error-message').css('display', 'none');
if(ClientData.serviceOpt_encryption() == 'Y') {
data.requirePasswordChange = 0;
}
if (data.requirePasswordChange == 0) {
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
......@@ -240,7 +269,6 @@ LOGIN.processLogin = function() {
//ホームへ移動
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
}
}
else if (numDay > 30) {
LOGIN.OpenChangePasswordDialog();
......@@ -406,9 +434,9 @@ LOGIN.changeLanguageEn = function(){
//Login click function
LOGIN.loginFunction = function() {
if (LOGIN.checkValidation()) {
//if (LOGIN.checkValidation()) {
LOGIN.processLogin();
}
// }
};
//Change Password function
......@@ -495,6 +523,9 @@ LOGIN.saveServiceUserOption = function(){
else if( option.serviceOptionId == 49) {
ClientData.serviceOpt_usable_push_message(option.value);
}
else if( option.serviceOptionId == 126) {
ClientData.serviceOpt_encryption(option.value);
}
});
};
......@@ -931,19 +962,32 @@ LOGIN.ready = function(){
}, LOGIN.timeWaitSplashScreen);
}
else {
//doutor
var paramLid = COMMON.getUrlParam('lid', '');
var paramP = COMMON.getUrlParam('p', '');
$('#normalUser').show();
$('#formlogin').hide();
$('#logologin').animate({ "margin-top": 0 }, LOGIN.timeWaitSplashScreen,
function () {
if( paramLid != '' && paramP != '' ){
$('#formlogindoutor').show();
$('#formlogin').hide();
} else {
$('#formlogin').show();
}
$('#menu-language').animate({ opacity: 1 }, LOGIN.timeWaitSplashScreen);
$('#formlogin').animate({ opacity: 1 }, LOGIN.timeWaitSplashScreen);
$('.cnt_footer').animate({ opacity: 1 }, LOGIN.timeWaitSplashScreen);
}
);
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