Commit 489ea73a by Vo Duc Thang

リリース:

・No.14アンケート試験(パラメータ未対応)
・No.12コンテンツコンテナー(画像、ファイルなしを除く)
・No.20 タブレット対応
parent 3b637887
......@@ -64,7 +64,7 @@
"dspBkCancel":"Logout",
"txtSearchResult":"Result",
"dspHome":"Home",
"txtLoginUser":"(Ver.20130826)User:",
"txtLoginUser":"(Ver.20130827)User:",
"txtAll":"All",
"txtMkgSize":"Size",
"txtMkgS":"S",
......
......@@ -64,7 +64,7 @@
"dspBkCancel":"バックアップせずにログアウト",
"txtSearchResult":"検索結果",
"dspHome":"ホーム",
"txtLoginUser":"(Ver.20130826)ログイン中:",
"txtLoginUser":"(Ver.20130827)ログイン中:",
"txtAll":"すべて",
"txtMkgSize":"太さ",
"txtMkgS":"小",
......
......@@ -64,7 +64,7 @@
"dspBkCancel":"로그아웃",
"txtSearchResult":"검색 결과",
"dspHome":"홈",
"txtLoginUser":"(Ver.20130826)로그인 중:",
"txtLoginUser":"(Ver.20130827)로그인 중:",
"txtAll":"전체",
"txtMkgSize":"두께",
"txtMkgS":"소",
......
......@@ -71,9 +71,8 @@
</head>
<body id="viewer">
<div id="wrapper" style="overflow: hidden">
<div id="wrapper">
<!--Viewer component is added here -->
<div id="overlay" class="web_dialog_overlay"> </div>
<div id="dialog" class="web_dialog">
......@@ -213,7 +212,7 @@
<a id="btn_copy_memo" class="lang" lang = "txtMemoCopy"> </a>
</div>
<div id="divImageLoading" style="width:70px; height:70px; background-color:#ccc; border-radius: 10px; opacity: 0.7">
<div id="divImageLoading" style="width:70px; height:70px; background-color:#ccc; border-radius: 10px; opacity: 0.7; z-index: 2">
<img src="img/view_loading.gif" style="padding-left: 3px; padding-top: 3px" width="64px" height="64px">
</div>
<!-- ================================================================================== -->
......
......@@ -26,33 +26,37 @@
}
.anket-dialog .anket-container
{
height:85%;
/*overflow:auto;*/
/*height:85%;
overflow:auto;*/
}
.anket-dialog .anket-container iframe
{
-webkit-overflow-scrolling: touch !important;
overflow: scroll !important;
}
.anket-dialog p
.anket-dialog .anket-commands
{
text-align:center;
border-top:solid 1px #333;
height:40px;
height:60px;
line-height:60px;
margin:0;
padding:10px 0;
padding:0;
background-color:#fff;
}
.anket-dialog p input[type='button']
.anket-dialog .anket-commands input[type='button']
{
border-radius:10px;
padding:5px 10px;
padding:0 10px;
border:solid 1px #333;
background-color:#eee;
cursor:pointer;
margin-right:5px;
width:100px;
height:30px;
line-height:30px;
}
.anket-dialog p input[type='button']:hover
.anket-dialog .anket-commands input[type='button']:hover
{
background-color:#fff;
}
\ No newline at end of file
......@@ -108,7 +108,7 @@
<p class="message"><label lang="txtLogoutBkMsg" class="lang">ログアウトする前にバックアップしますか?</label></p>
<p class="message-options">
<label class="option_backup">
<label lang="txtBkSelect" class="lang" class="lang">バックアップするデータを選択してください。</label><br />
<label lang="txtBkSelect" class="lang">バックアップするデータを選択してください。</label><br />
<input type="checkbox" id="chkBkAllMarking" class="chkbx" checked="checked" /><label for="chkBkAllMarking" lang="txtBkMarking" class="lang">マーキング</label>
<input type="checkbox" id="chkBkAllMemo" class="chkbx" checked="checked" /><label for="chkBkAllMemo" lang="txtBkMemo" class="lang">メモ</label>
<input type="checkbox" id="chkBkAllShiori" class="chkbx" checked="checked" /><label for="chkBkAllShiori" lang="txtBkShiori" class="lang">しおり</label>
......@@ -145,7 +145,7 @@
<div class="tabUnit">
<ul class="switchingTab">
<li class="colleft" ><a href="#list_0" class="current lang" lang="txtGen" id="lnkbtnGenre">ジャンル</a></li>
<li class="colright" ><a href="#list_1" class="lang" lang="txtGr" id="lnkbtnGroup">グループ</a></li>
<li class="colright" style="display:none;"><a href="#list_1" class="lang" lang="txtGr" id="lnkbtnGroup">グループ</a></li>
</ul>
<div class="tabUnit-list" id="list_0" style="display: block;">
......
......@@ -212,7 +212,11 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
abapi('webContentList', params, 'POST', function (data) {
$.each(data.contentList, function (i, post) {
var outputDate = formatDeliveryDate(post.contentDeliveryDate);
var outputDate ="";
if(post.contentDeliveryDate!=null&&post.contentDeliveryDate!=undefined&&post.contentDeliveryDate!='undefined')
{
outputDate=formatDeliveryDate(post.contentDeliveryDate);
}
$('#content-grid').append(
'<section>'
......
......@@ -308,7 +308,7 @@ function handleAPIWebContentPage(dataJson, pos) {
//Start Function : No.4 - Editor : Long - Date : 08/20/2013
if(contentType == ContentTypeKeys.Type_PDF){
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
for (var nIndex = 0; nIndex < bmList.length; nIndex++) {
nIndexBookMark = -1;
var contentPage = dataJson.pages;
......@@ -478,7 +478,7 @@ function handleAPIWebContentPage(dataJson, pos) {
//End Function : No.4 - Editor : Long - Date : 08/20/2013
if(contentType == ContentTypeKeys.Type_PDF){
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if (lstPageNoBookMark.length > 0) {
isSendingData = true;
loadDataBookmark(lstPageNoBookMark);
......@@ -1847,6 +1847,9 @@ function resizeScreen() {
imgMarker.src = imgMarkerTemp;
}
// resize anket
resizeAnket();
};
function changePageWithoutSlide(pageMove) {
......@@ -2445,7 +2448,8 @@ ContentPage.prototype.addPageObjects = function (pageObjects) {
obj.questionNo,
obj.replyLimit,
obj.fullScreen,
obj.saveAs
obj.saveAs,
obj.objectId
);
}
//End Function : No.9 - Editor : Long - Summary :
......@@ -2605,7 +2609,8 @@ ContentPage.prototype.addPageObjects = function (pageObjects) {
obj.questionNo,
obj.replyLimit,
obj.fullScreen,
obj.saveAs
obj.saveAs,
obj.objectId
);
}
break;
......@@ -2685,7 +2690,7 @@ ContentPage.prototype.drawPage = function (context, opt) {
flip(opt);
//Start Function: No.12
if(contentType == ContentTypeKeys.Type_PDF){
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
/* draw linkList */
drawGetWebContent4(context, opt);
}
......@@ -2704,10 +2709,16 @@ ContentPage.prototype.drawPage = function (context, opt) {
drawMarkingOnScreen(opt);
/*set status is loading page */
if(contentType == ContentTypeKeys.Type_PDF){
if(opt != 0 && opt != null){
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(totalPage > 1){
if(opt != 0 && opt != null){
isLoadingObject = false;
}
}
else{
isLoadingObject = false;
}
}
}
else{
isLoadingObject = false;
......@@ -2719,8 +2730,13 @@ ContentPage.prototype.drawPage = function (context, opt) {
enableButtonMarking();
} else {
//Start Function : No.4 - Summary : make sure next or prev page is loaded
if(contentType == ContentTypeKeys.Type_PDF){
if(opt != 0 && opt != null){
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(totalPage > 1){
if(opt != 0 && opt != null){
enableAllControl();
}
}
else{
enableAllControl();
}
}
......@@ -2731,10 +2747,15 @@ ContentPage.prototype.drawPage = function (context, opt) {
}
/*finish loading */
//Start Function : No.4 - Summary : make sure next or prev page is loaded
if(contentType == ContentTypeKeys.Type_PDF){
if(opt != 0 && opt != null){
$('#divImageLoading').css('display', 'none');
}
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(totalPage > 1){
if(opt != 0 && opt != null){
$('#divImageLoading').css('display', 'none');
}
}
else{
$('#divImageLoading').css('display', 'none');
}
}
else{
$('#divImageLoading').css('display', 'none');
......@@ -2750,10 +2771,15 @@ ContentPage.prototype.drawPage = function (context, opt) {
drawMarkingOnScreen(opt);
/*set status is loading page */
if(contentType == ContentTypeKeys.Type_PDF){
if(opt != 0 && opt != null){
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(totalPage > 1){
if(opt != 0 && opt != null){
isLoadingObject = false;
}
}
else{
isLoadingObject = false;
}
}
}
else{
isLoadingObject = false;
......@@ -2764,10 +2790,15 @@ ContentPage.prototype.drawPage = function (context, opt) {
enableButtonMarking()
} else {
//Start Function : No.4 - Summary : make sure next or prev page is loaded
if(contentType == ContentTypeKeys.Type_PDF){
if(opt != 0 && opt != null){
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(totalPage > 1){
if(opt != 0 && opt != null){
enableAllControl();
}
}
else{
enableAllControl();
}
}
}
else{
enableAllControl();
......@@ -2778,10 +2809,15 @@ ContentPage.prototype.drawPage = function (context, opt) {
/*finish loading */
//Start Function : No.4 - Summary : make sure next or prev page is loaded
if(contentType == ContentTypeKeys.Type_PDF){
if(opt != 0 && opt != null){
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(totalPage > 1){
if(opt != 0 && opt != null){
$('#divImageLoading').css('display', 'none');
}
}
else{
$('#divImageLoading').css('display', 'none');
}
}
}
else{
$('#divImageLoading').css('display', 'none');
......@@ -2999,7 +3035,7 @@ function removeObject() {
//Start Function : No.12 - Editor :Long - Date: 08/12/2013 - Summary : prevent close dialog if content is not pdf
if(contentType == ContentTypeKeys.Type_PDF){
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
hideDialog();
}
//End Function : No.12 - Editor :Long - Date: 08/12/2013 - Summary : prevent close dialog if content is not pdf
......
......@@ -2,7 +2,7 @@
var _3dMoveFlag = false;
var _3dAction = '';
var _curr3dObject;
var _3dTimeToDetect = 1000;
var _3dActionType = {
'TouchStart_MouseDown' : 0,
'TouchMove_MouseMove' : 1,
......

// show dialog anket content
function showAnket(url, fullscreen) {
var $container = $('#dialog');
url = url + "?sid=" + ClientData.userInfo_sid();
$container.html('');
$container.addClass('anket-dialog');
var width = '100%';
if (fullscreen) {
$container.attr('style', 'width:100%; left:0% !important;');
var canvas = document.getElementById('main');
var width = fullscreen == true ? canvas.width : 340;
if (fullscreen == true) {
$container.attr('style', 'width:' + width + 'px; left:10px;right:auto;');
}
else {
$container.attr('style', 'width:340px; right:0% !important;left:auto;');
width = '340';
$container.attr('style', 'width:' + width + 'px; right:10px;left:auto;'); // !important
}
$container.draggable({ handle: "h1" });
$container.html(
'<h1>'+i18nText('txtEnqueteTitle')
+ '<img src="img/viewer/x.png" style="margin:3px 3px 0px 21px" id="btnClose" class="align_right" ></img>'
+ '</h1>'
+ '<div class="anket-container"><iframe width="' + width + '" height="100%" frameborder="0" scrolling="auto" src="' + url + '">'// style="position: absolute; width: 100%; height: 480px; "
+ '<div class="anket-container"><iframe width="'+width+'" height="100%" frameborder="0" scrolling="auto" src="' + url + '">'
+ '</iframe></div>'
+ '<p><input type="button" value="'+i18nText('txtTransparent')+'" id="btnFullOpacity"/> <input type="button" value="'+i18nText('txtSemiTransparent')+'" id="btnApartOpacity"/> <input type="button" value="'+i18nText('txtNoTransparent')+'" id="btnNoOpacity"/></p>'
+ '<div class="anket-commands"><input type="button" value="' + i18nText('txtTransparent') + '" id="btnFullOpacity"/> <input type="button" value="' + i18nText('txtSemiTransparent') + '" id="btnApartOpacity"/> <input type="button" value="' + i18nText('txtNoTransparent') + '" id="btnNoOpacity"/></div><div style="clear:both;"></div>'
);
$('#dialog h1 img').click(function(){
$container.removeAttr('style');
......@@ -30,11 +33,20 @@ function showAnket(url, fullscreen) {
});
var avwUserEnvObj = new UserEnvironment();
// set overflow for container iframe
if (avwUserEnvObj.isIpad()) {
$('#dialog .anket-container').css('overflow', 'auto');
if (fullscreen == true) {
$container.attr('style', 'width:' + width + 'px; left:10px;right:auto;'); // !important on ipad can't move dialog
}
else {
$container.attr('style', 'width:' + width + 'px; right:20px;left:auto;');
}
}
$('#dialog p input').click(
// click on button change transparent
$('#dialog .anket-commands input').click(
function () {
var opacity = 1;
......@@ -48,5 +60,28 @@ function showAnket(url, fullscreen) {
$('#dialog').css('opacity', opacity);
}
);
// resize anket
resizeAnket();
};
// resize dialog anket
function resizeAnket() {
// get canvas main
var canvas = document.getElementById('main');
var height = canvas.height;
var top = $('#header_toolbar').height() + 4; // get top position for dialog 4 for space
// set top dialog
$('#dialog').height(height).css('top', top);
var iframeHeight = height - $('#dialog h1').height() - $('#dialog .anket-commands').height() - 8; // 8 for 2xspace
// set height for iframe
$('#dialog iframe').attr('height', iframeHeight);
};
\ No newline at end of file
// set height for anket container
$('#dialog .anket-container').css('height', iframeHeight);
};
\ No newline at end of file
......@@ -110,6 +110,15 @@ function getDataJsonFile() {
if (JsonFile.vertical) {
if (JsonFile.vertical.pages) {
pageObjectsData = JsonFile.vertical.pages;
//Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
if(data.contentDataSub != null && data.contentDataSub.length > 0){
for(var i = 0; i < pageObjectsData.length; i++){
var obj = pageObjectsData[i];
obj["contentDataSub"] = data.contentDataSub;
}
}
//End Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
}
}
else if (JsonFile.horizontal) {
......@@ -125,6 +134,18 @@ function getDataJsonFile() {
//End Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
}
}
//Start : Function : No.12 - Editor : Long - Date: 08/27/2013 - Summary : Get Page Object for content type none
else{
pageObjectsData = JsonFile.content.pages;
if(data.contentDataSub != null && data.contentDataSub.length > 0){
for(var i = 0; i < pageObjectsData.length; i++){
var obj = pageObjectsData[i];
obj["contentDataSub"] = data.contentDataSub;
}
}
}
//End : Function : No.12 - Editor : Long - Date: 08/27/2013 - Summary : Get Page Object for content type none
getPageObjectsByPageIndex(pageObjectsData, 0);
},
......
......@@ -920,10 +920,13 @@ function mouseDown_CanvasMain(event) {
_clickFirstPos = {x:event.screenX, y: event.screenY};
_clickLastPos = {x:event.screenX, y: event.screenY};
_moveNum = 0;
$('#mainPre').css("display",'block');
$('#mainNext').css("display",'block');
_moveNum = 0;
if(animateType == animateTypeKeys.Type_Slide){
$('#mainPre').css("display",'block');
$('#mainNext').css("display",'block');
}
//End Function : No.20
//Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
......@@ -938,10 +941,15 @@ function mouseDown_CanvasMain(event) {
else{
moveFlag = false;
if(is3DObject(hitPageObj)){
_3dAnimate = true;
_3dAction = _3dActionType.TouchStart_MouseDown;
_curr3dObject = hitPageObj;
hitPageObj.action(imagePt);
moveFlag = true;
clearTimeout(this.downTimer);
this.downTimer = setTimeout(function() {
_3dAnimate = true;
_3dAction = _3dActionType.TouchStart_MouseDown;
_curr3dObject = hitPageObj;
hitPageObj.action(imagePt);
moveFlag = false;
}, _3dTimeToDetect);
}
else{
_3dAnimate = false;
......@@ -977,9 +985,9 @@ function mouseUp_CanvasMain(event) {
$('#main').css('cursor', 'default');
// navigate page
if(_moveNum == 2){
$('#nextpage').click();
nextPage_click();
}else if (_moveNum == -2){
$('#prevpage').click();
prevPage_click();
}else {
correctCanvasPosition();
}
......@@ -1165,12 +1173,14 @@ function onTouchstart(evt){
if (hitPageObj) {
if(is3DObject(hitPageObj)){
_3dAction = _3dActionType.TouchStart_MouseDown;
_curr3dObject = hitPageObj;
hitPageObj.action(imagePt);
_3dAnimate = true;
if(is3DObject(hitPageObj)){
clearTimeout(this.downTimer);
this.downTimer = setTimeout(function() {
_3dAction = _3dActionType.TouchStart_MouseDown;
_curr3dObject = hitPageObj;
hitPageObj.action(imagePt);
_3dAnimate = true;
}, _3dTimeToDetect);
}
else{
_3dAnimate = false;
......@@ -1228,8 +1238,12 @@ function onTouchstart(evt){
_touchPageY = evt.touches[0].pageY;
//set touch to move page flag
if(touch2 == null && userScale == 1){
$('#mainPre').css("display",'block');
$('#mainNext').css("display",'block');
if(animateType == animateTypeKeys.Type_Slide){
$('#mainPre').css("display",'block');
$('#mainNext').css("display",'block');
}
_isPageNaviTouch = true;
_moveNum = 0;
......@@ -1245,14 +1259,17 @@ function onTouchstart(evt){
if (hitPageObj) {
if(is3DObject(hitPageObj)){
var arr3DInfo = [];
_3dAction = _3dActionType.TouchStart_MouseDown;
_curr3dObject = hitPageObj;
hitPageObj.action(imagePt);
_3dAnimate = true;
_isClick = false;
if(is3DObject(hitPageObj)){
clearTimeout(this.downTimer);
this.downTimer = setTimeout(function() {
var arr3DInfo = [];
_3dAction = _3dActionType.TouchStart_MouseDown;
_curr3dObject = hitPageObj;
hitPageObj.action(imagePt);
_3dAnimate = true;
_isClick = false;
}, _3dTimeToDetect);
}
else{
......@@ -1396,8 +1413,10 @@ function onTouchmove(evt){
_bufferPoints.push(touch1); // add to buffer to use for another action if occur. ex: zoom page
//console.log("move page case");
$('#mainPre').css("display",'block');
$('#mainNext').css("display",'block');
if(animateType == animateTypeKeys.Type_Slide){
$('#mainPre').css("display",'block');
$('#mainNext').css("display",'block');
}
touchStartedTime = new Date();
......@@ -1554,11 +1573,7 @@ function onTouchend(evt){
}
var bContinue = true;
if (avwUserEnvObj.os == "ipad" || avwUserEnvObj.os == "android") {
evt.preventDefault();
}
if(isLoadingObject){
bContinue = false;
}
......
......@@ -297,7 +297,7 @@ function enableAllControl() {
$("#control_screen_2").css('cursor', 'pointer');
//Start Function: No.12
if (contentType == ContentTypeKeys.Type_PDF) {
if (contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile) {
$("#slider_page").css('cursor', 'pointer');
$(".ui-slider-handle").css('cursor', 'pointer');
}
......@@ -352,9 +352,15 @@ function enableAllControl() {
checkDisableButtonZoom();
//Start Function: No.12
if (contentType == ContentTypeKeys.Type_PDF) {
if (contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile) {
$("#slider_page").slider("option", "disabled", false);
enable('#txtSearch', '#txtSlider');
if(contentType == ContentTypeKeys.Type_PDF){
enable('#txtSearch', '#txtSlider');
}
else if(contentType == ContentTypeKeys.Type_NoFile){
enable('#txtSlider');
}
}
......
......@@ -344,6 +344,7 @@ function getMediaType1(iValueObj) {
pageObject["replyLimit"] = iValueObj.action.replyLimit;
pageObject["fullScreen"] = iValueObj.action.fullScreen;
pageObject["saveAs"] = iValueObj.action.saveAs;
pageObject["objectId"] = iValueObj.action.objectId;
}
//End Function : No.9 - Editor : Long - Date: 08/16/2013 - Summary :
return pageObject;
......@@ -708,6 +709,7 @@ function getMediaType11(iValueObj) {
pageObject["replyLimit"] = iValueObj.action.replyLimit;
pageObject["fullScreen"] = iValueObj.action.fullScreen;
pageObject["saveAs"] = iValueObj.action.saveAs;
pageObject["objectId"] = iValueObj.action.objectId;
}
return pageObject;
......@@ -1363,11 +1365,10 @@ function correctCanvasPosition(){
$('#mainPre').css("display", 'none');
}
else if(animateType == animateTypeKeys.Type_FadeIn){
//$('#main').css("z-index",'2');
$('#mainNext').css("z-index",'0');
$('#mainPre').css("z-index",'0');
//$('#mainNext').css("opacity",'0');
//$('#mainPre').css("opacity",'0');
$('#mainPre').css("z-index",'0');
$('#mainNext').css("display", 'none');
$('#mainPre').css("display", 'none');
}
};
......
......@@ -457,6 +457,15 @@ function initializeViewerComponent(viewId) {
}
);
//Start : Function : No.20 - Editor : Le Long - Date: 27/08/2013 - Summary : For performing on ipad. On Android 4.1.x do not use overflow : hidden in parent canvas
//to avoid draw duplicate canvas bug.
if(avwUserEnvObj.os == 'ipad'){
$('#wrapper').css('overflow', 'hidden');
}
//End: Function : No.20 - Editor : Le Long - Date: 27/08/2013 - Summary : For performing on ipad. On Android 4.1.x do not use overflow : hidden in parent canvas
//to avoid draw duplicate canvas bug.
$('#main').css(
{
......@@ -506,7 +515,7 @@ function initializeViewerComponent(viewId) {
'box-shadow': '3px 3px 14px #333',
'background-color': 'rgba(153, 153, 153, 0.7)',
'border-radius': '4px',
'opacity': '0'
'display': 'none'
}
);
$('#mainPre').css(
......@@ -518,7 +527,7 @@ function initializeViewerComponent(viewId) {
'box-shadow': '3px 3px 14px #333',
'background-color': 'rgba(153, 153, 153, 0.7)',
'border-radius': '4px',
'opacity': '0'
'display': 'none'
}
);
}
......
......@@ -194,6 +194,14 @@ $(document).ready(function () {
} else {
checkForceChangePassword();
}
// hide tab group with user anonymous
if(isAnonymousLogin())
{
$('.switchingTab .colright').hide();
}
else $('.switchingTab .colright').show();
});
var allowTimerCloseSubMenu = true;
var timer_subMenu;
......
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