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,
......
......@@ -21,7 +21,7 @@ CONTENTVIEW_ANKET.showAnket = function(url, fullscreen, objectId) {
else {
$container.attr('style', 'width:' + width + 'px; right:10px;left:auto;'); // !important
}
$container.draggable({ handle: "h1" });
$container.html(
'<h1>'+I18N.i18nText('txtEnqueteTitle')
......@@ -31,19 +31,19 @@ CONTENTVIEW_ANKET.showAnket = function(url, fullscreen, objectId) {
+ '</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>'
);
$("#btnClose").on({
'click touchend': function(ev){
//時間記録
var dateEnd = new Date();
var actionTime = dateEnd.subtractBySeconds(dateStart);
//alert("actionTime:" + actionTime);
COMMON.SetObjectLogActionTime( CONTENTVIEW_GENERAL.contentID, objectId, actionTime );
$container.removeAttr('style');
CONTENTVIEW_GENERAL.hideDialog();
return false;
},
'touchstart touchmove': function(){
......@@ -62,7 +62,7 @@ CONTENTVIEW_ANKET.showAnket = function(url, fullscreen, objectId) {
$('#dialog .anket-container').css('overflow', 'scroll');
//$('#dialog .anket-container').css('-webkit-overflow-scrolling', 'touch');
//$('#dialog .anket-container').css('position', 'relative');
if (fullscreen == true) {
$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) {
// click on button change transparent
$('#dialog .anket-commands input').click(
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) {
//set transparent
......@@ -104,7 +104,7 @@ CONTENTVIEW_ANKET.showAnket = function(url, fullscreen, objectId) {
// resize dialog anket
CONTENTVIEW_ANKET.resizeAnket = function() {
// get canvas main
var canvas = document.getElementById('main');
var height = canvas.height;
......@@ -121,7 +121,7 @@ CONTENTVIEW_ANKET.resizeAnket = function() {
// set height for anket container
$('#dialog .anket-container').css('height', iframeHeight);
};
CONTENTVIEW_ANKET.ready = function(){
......
......@@ -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,18 +962,31 @@ 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 () {
$('#formlogin').show();
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);
}
);
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