Commit 489ea73a by Vo Duc Thang

リリース:

・No.14アンケート試験(パラメータ未対応)
・No.12コンテンツコンテナー(画像、ファイルなしを除く)
・No.20 タブレット対応
parent 3b637887
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
"dspBkCancel":"Logout", "dspBkCancel":"Logout",
"txtSearchResult":"Result", "txtSearchResult":"Result",
"dspHome":"Home", "dspHome":"Home",
"txtLoginUser":"(Ver.20130826)User:", "txtLoginUser":"(Ver.20130827)User:",
"txtAll":"All", "txtAll":"All",
"txtMkgSize":"Size", "txtMkgSize":"Size",
"txtMkgS":"S", "txtMkgS":"S",
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
"dspBkCancel":"バックアップせずにログアウト", "dspBkCancel":"バックアップせずにログアウト",
"txtSearchResult":"検索結果", "txtSearchResult":"検索結果",
"dspHome":"ホーム", "dspHome":"ホーム",
"txtLoginUser":"(Ver.20130826)ログイン中:", "txtLoginUser":"(Ver.20130827)ログイン中:",
"txtAll":"すべて", "txtAll":"すべて",
"txtMkgSize":"太さ", "txtMkgSize":"太さ",
"txtMkgS":"小", "txtMkgS":"小",
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
"dspBkCancel":"로그아웃", "dspBkCancel":"로그아웃",
"txtSearchResult":"검색 결과", "txtSearchResult":"검색 결과",
"dspHome":"홈", "dspHome":"홈",
"txtLoginUser":"(Ver.20130826)로그인 중:", "txtLoginUser":"(Ver.20130827)로그인 중:",
"txtAll":"전체", "txtAll":"전체",
"txtMkgSize":"두께", "txtMkgSize":"두께",
"txtMkgS":"소", "txtMkgS":"소",
......
...@@ -71,9 +71,8 @@ ...@@ -71,9 +71,8 @@
</head> </head>
<body id="viewer"> <body id="viewer">
<div id="wrapper" style="overflow: hidden"> <div id="wrapper">
<!--Viewer component is added here --> <!--Viewer component is added here -->
<div id="overlay" class="web_dialog_overlay"> </div> <div id="overlay" class="web_dialog_overlay"> </div>
<div id="dialog" class="web_dialog"> <div id="dialog" class="web_dialog">
...@@ -213,7 +212,7 @@ ...@@ -213,7 +212,7 @@
<a id="btn_copy_memo" class="lang" lang = "txtMemoCopy"> </a> <a id="btn_copy_memo" class="lang" lang = "txtMemoCopy"> </a>
</div> </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"> <img src="img/view_loading.gif" style="padding-left: 3px; padding-top: 3px" width="64px" height="64px">
</div> </div>
<!-- ================================================================================== --> <!-- ================================================================================== -->
......
...@@ -26,33 +26,37 @@ ...@@ -26,33 +26,37 @@
} }
.anket-dialog .anket-container .anket-dialog .anket-container
{ {
height:85%; /*height:85%;
/*overflow:auto;*/ overflow:auto;*/
} }
.anket-dialog .anket-container iframe .anket-dialog .anket-container iframe
{ {
-webkit-overflow-scrolling: touch !important; -webkit-overflow-scrolling: touch !important;
overflow: scroll !important; overflow: scroll !important;
} }
.anket-dialog p .anket-dialog .anket-commands
{ {
text-align:center; text-align:center;
border-top:solid 1px #333; border-top:solid 1px #333;
height:40px; height:60px;
line-height:60px;
margin:0; 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; border-radius:10px;
padding:5px 10px; padding:0 10px;
border:solid 1px #333; border:solid 1px #333;
background-color:#eee; background-color:#eee;
cursor:pointer; cursor:pointer;
margin-right:5px; margin-right:5px;
width:100px; 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; background-color:#fff;
} }
\ No newline at end of file
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
<p class="message"><label lang="txtLogoutBkMsg" class="lang">ログアウトする前にバックアップしますか?</label></p> <p class="message"><label lang="txtLogoutBkMsg" class="lang">ログアウトする前にバックアップしますか?</label></p>
<p class="message-options"> <p class="message-options">
<label class="option_backup"> <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="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="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> <input type="checkbox" id="chkBkAllShiori" class="chkbx" checked="checked" /><label for="chkBkAllShiori" lang="txtBkShiori" class="lang">しおり</label>
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
<div class="tabUnit"> <div class="tabUnit">
<ul class="switchingTab"> <ul class="switchingTab">
<li class="colleft" ><a href="#list_0" class="current lang" lang="txtGen" id="lnkbtnGenre">ジャンル</a></li> <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> </ul>
<div class="tabUnit-list" id="list_0" style="display: block;"> <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) ...@@ -212,7 +212,11 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
abapi('webContentList', params, 'POST', function (data) { abapi('webContentList', params, 'POST', function (data) {
$.each(data.contentList, function (i, post) { $.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( $('#content-grid').append(
'<section>' '<section>'
......
...@@ -308,7 +308,7 @@ function handleAPIWebContentPage(dataJson, pos) { ...@@ -308,7 +308,7 @@ function handleAPIWebContentPage(dataJson, pos) {
//Start Function : No.4 - Editor : Long - Date : 08/20/2013 //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++) { for (var nIndex = 0; nIndex < bmList.length; nIndex++) {
nIndexBookMark = -1; nIndexBookMark = -1;
var contentPage = dataJson.pages; var contentPage = dataJson.pages;
...@@ -478,7 +478,7 @@ function handleAPIWebContentPage(dataJson, pos) { ...@@ -478,7 +478,7 @@ function handleAPIWebContentPage(dataJson, pos) {
//End Function : No.4 - Editor : Long - Date : 08/20/2013 //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) { if (lstPageNoBookMark.length > 0) {
isSendingData = true; isSendingData = true;
loadDataBookmark(lstPageNoBookMark); loadDataBookmark(lstPageNoBookMark);
...@@ -1847,6 +1847,9 @@ function resizeScreen() { ...@@ -1847,6 +1847,9 @@ function resizeScreen() {
imgMarker.src = imgMarkerTemp; imgMarker.src = imgMarkerTemp;
} }
// resize anket
resizeAnket();
}; };
function changePageWithoutSlide(pageMove) { function changePageWithoutSlide(pageMove) {
...@@ -2445,7 +2448,8 @@ ContentPage.prototype.addPageObjects = function (pageObjects) { ...@@ -2445,7 +2448,8 @@ ContentPage.prototype.addPageObjects = function (pageObjects) {
obj.questionNo, obj.questionNo,
obj.replyLimit, obj.replyLimit,
obj.fullScreen, obj.fullScreen,
obj.saveAs obj.saveAs,
obj.objectId
); );
} }
//End Function : No.9 - Editor : Long - Summary : //End Function : No.9 - Editor : Long - Summary :
...@@ -2605,7 +2609,8 @@ ContentPage.prototype.addPageObjects = function (pageObjects) { ...@@ -2605,7 +2609,8 @@ ContentPage.prototype.addPageObjects = function (pageObjects) {
obj.questionNo, obj.questionNo,
obj.replyLimit, obj.replyLimit,
obj.fullScreen, obj.fullScreen,
obj.saveAs obj.saveAs,
obj.objectId
); );
} }
break; break;
...@@ -2685,7 +2690,7 @@ ContentPage.prototype.drawPage = function (context, opt) { ...@@ -2685,7 +2690,7 @@ ContentPage.prototype.drawPage = function (context, opt) {
flip(opt); flip(opt);
//Start Function: No.12 //Start Function: No.12
if(contentType == ContentTypeKeys.Type_PDF){ if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
/* draw linkList */ /* draw linkList */
drawGetWebContent4(context, opt); drawGetWebContent4(context, opt);
} }
...@@ -2704,10 +2709,16 @@ ContentPage.prototype.drawPage = function (context, opt) { ...@@ -2704,10 +2709,16 @@ ContentPage.prototype.drawPage = function (context, opt) {
drawMarkingOnScreen(opt); drawMarkingOnScreen(opt);
/*set status is loading page */ /*set status is loading page */
if(contentType == ContentTypeKeys.Type_PDF){ if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(opt != 0 && opt != null){ if(totalPage > 1){
if(opt != 0 && opt != null){
isLoadingObject = false;
}
}
else{
isLoadingObject = false; isLoadingObject = false;
} }
} }
else{ else{
isLoadingObject = false; isLoadingObject = false;
...@@ -2719,8 +2730,13 @@ ContentPage.prototype.drawPage = function (context, opt) { ...@@ -2719,8 +2730,13 @@ ContentPage.prototype.drawPage = function (context, opt) {
enableButtonMarking(); enableButtonMarking();
} else { } else {
//Start Function : No.4 - Summary : make sure next or prev page is loaded //Start Function : No.4 - Summary : make sure next or prev page is loaded
if(contentType == ContentTypeKeys.Type_PDF){ if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(opt != 0 && opt != null){ if(totalPage > 1){
if(opt != 0 && opt != null){
enableAllControl();
}
}
else{
enableAllControl(); enableAllControl();
} }
} }
...@@ -2731,10 +2747,15 @@ ContentPage.prototype.drawPage = function (context, opt) { ...@@ -2731,10 +2747,15 @@ ContentPage.prototype.drawPage = function (context, opt) {
} }
/*finish loading */ /*finish loading */
//Start Function : No.4 - Summary : make sure next or prev page is loaded //Start Function : No.4 - Summary : make sure next or prev page is loaded
if(contentType == ContentTypeKeys.Type_PDF){ if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(opt != 0 && opt != null){ if(totalPage > 1){
$('#divImageLoading').css('display', 'none'); if(opt != 0 && opt != null){
} $('#divImageLoading').css('display', 'none');
}
}
else{
$('#divImageLoading').css('display', 'none');
}
} }
else{ else{
$('#divImageLoading').css('display', 'none'); $('#divImageLoading').css('display', 'none');
...@@ -2750,10 +2771,15 @@ ContentPage.prototype.drawPage = function (context, opt) { ...@@ -2750,10 +2771,15 @@ ContentPage.prototype.drawPage = function (context, opt) {
drawMarkingOnScreen(opt); drawMarkingOnScreen(opt);
/*set status is loading page */ /*set status is loading page */
if(contentType == ContentTypeKeys.Type_PDF){ if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(opt != 0 && opt != null){ if(totalPage > 1){
if(opt != 0 && opt != null){
isLoadingObject = false;
}
}
else{
isLoadingObject = false; isLoadingObject = false;
} }
} }
else{ else{
isLoadingObject = false; isLoadingObject = false;
...@@ -2764,10 +2790,15 @@ ContentPage.prototype.drawPage = function (context, opt) { ...@@ -2764,10 +2790,15 @@ ContentPage.prototype.drawPage = function (context, opt) {
enableButtonMarking() enableButtonMarking()
} else { } else {
//Start Function : No.4 - Summary : make sure next or prev page is loaded //Start Function : No.4 - Summary : make sure next or prev page is loaded
if(contentType == ContentTypeKeys.Type_PDF){ if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(opt != 0 && opt != null){ if(totalPage > 1){
if(opt != 0 && opt != null){
enableAllControl();
}
}
else{
enableAllControl(); enableAllControl();
} }
} }
else{ else{
enableAllControl(); enableAllControl();
...@@ -2778,10 +2809,15 @@ ContentPage.prototype.drawPage = function (context, opt) { ...@@ -2778,10 +2809,15 @@ ContentPage.prototype.drawPage = function (context, opt) {
/*finish loading */ /*finish loading */
//Start Function : No.4 - Summary : make sure next or prev page is loaded //Start Function : No.4 - Summary : make sure next or prev page is loaded
if(contentType == ContentTypeKeys.Type_PDF){ if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(opt != 0 && opt != null){ if(totalPage > 1){
if(opt != 0 && opt != null){
$('#divImageLoading').css('display', 'none');
}
}
else{
$('#divImageLoading').css('display', 'none'); $('#divImageLoading').css('display', 'none');
} }
} }
else{ else{
$('#divImageLoading').css('display', 'none'); $('#divImageLoading').css('display', 'none');
...@@ -2999,7 +3035,7 @@ function removeObject() { ...@@ -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 //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(); hideDialog();
} }
//End Function : No.12 - Editor :Long - Date: 08/12/2013 - Summary : prevent close dialog if content is not pdf //End Function : No.12 - Editor :Long - Date: 08/12/2013 - Summary : prevent close dialog if content is not pdf
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
var _3dMoveFlag = false; var _3dMoveFlag = false;
var _3dAction = ''; var _3dAction = '';
var _curr3dObject; var _curr3dObject;
var _3dTimeToDetect = 1000;
var _3dActionType = { var _3dActionType = {
'TouchStart_MouseDown' : 0, 'TouchStart_MouseDown' : 0,
'TouchMove_MouseMove' : 1, 'TouchMove_MouseMove' : 1,
......
 // show dialog anket content
function showAnket(url, fullscreen) { function showAnket(url, fullscreen) {
var $container = $('#dialog'); var $container = $('#dialog');
url = url + "?sid=" + ClientData.userInfo_sid(); url = url + "?sid=" + ClientData.userInfo_sid();
$container.html(''); $container.html('');
$container.addClass('anket-dialog'); $container.addClass('anket-dialog');
var width = '100%';
if (fullscreen) { var canvas = document.getElementById('main');
$container.attr('style', 'width:100%; left:0% !important;');
var width = fullscreen == true ? canvas.width : 340;
if (fullscreen == true) {
$container.attr('style', 'width:' + width + 'px; left:10px;right:auto;');
} }
else { else {
$container.attr('style', 'width:340px; right:0% !important;left:auto;'); $container.attr('style', 'width:' + width + 'px; right:10px;left:auto;'); // !important
width = '340';
} }
$container.draggable({ handle: "h1" }); $container.draggable({ handle: "h1" });
$container.html( $container.html(
'<h1>'+i18nText('txtEnqueteTitle') '<h1>'+i18nText('txtEnqueteTitle')
+ '<img src="img/viewer/x.png" style="margin:3px 3px 0px 21px" id="btnClose" class="align_right" ></img>' + '<img src="img/viewer/x.png" style="margin:3px 3px 0px 21px" id="btnClose" class="align_right" ></img>'
+ '</h1>' + '</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>' + '</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(){ $('#dialog h1 img').click(function(){
$container.removeAttr('style'); $container.removeAttr('style');
...@@ -30,11 +33,20 @@ function showAnket(url, fullscreen) { ...@@ -30,11 +33,20 @@ function showAnket(url, fullscreen) {
}); });
var avwUserEnvObj = new UserEnvironment(); var avwUserEnvObj = new UserEnvironment();
// set overflow for container iframe
if (avwUserEnvObj.isIpad()) { if (avwUserEnvObj.isIpad()) {
$('#dialog .anket-container').css('overflow', 'auto'); $('#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 () { function () {
var opacity = 1; var opacity = 1;
...@@ -48,5 +60,28 @@ function showAnket(url, fullscreen) { ...@@ -48,5 +60,28 @@ function showAnket(url, fullscreen) {
$('#dialog').css('opacity', opacity); $('#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);
}; // set height for anket container
\ No newline at end of file $('#dialog .anket-container').css('height', iframeHeight);
};
\ No newline at end of file
...@@ -110,6 +110,15 @@ function getDataJsonFile() { ...@@ -110,6 +110,15 @@ function getDataJsonFile() {
if (JsonFile.vertical) { if (JsonFile.vertical) {
if (JsonFile.vertical.pages) { if (JsonFile.vertical.pages) {
pageObjectsData = 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) { else if (JsonFile.horizontal) {
...@@ -125,6 +134,18 @@ function getDataJsonFile() { ...@@ -125,6 +134,18 @@ function getDataJsonFile() {
//End Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary : //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); getPageObjectsByPageIndex(pageObjectsData, 0);
}, },
......
...@@ -276,10 +276,15 @@ PageObject.prototype.drawPageObject = function (context, opt) { ...@@ -276,10 +276,15 @@ PageObject.prototype.drawPageObject = function (context, opt) {
/*set status is loading page */ /*set status is loading page */
//Start Function : No.4 - Summary : make sure all page is loaded //Start Function : No.4 - Summary : make sure all page is loaded
if(contentType == ContentTypeKeys.Type_PDF){ if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(opt != 0 && opt != null){ if(totalPage > 1){
if(opt != 0 && opt != null){
isLoadingObject = false;
}
}
else{
isLoadingObject = false; isLoadingObject = false;
} }
} }
else{ else{
isLoadingObject = false; isLoadingObject = false;
...@@ -290,10 +295,15 @@ PageObject.prototype.drawPageObject = function (context, opt) { ...@@ -290,10 +295,15 @@ PageObject.prototype.drawPageObject = function (context, opt) {
if (ClientData.IsAddingMarking() == true) { if (ClientData.IsAddingMarking() == true) {
disableAllControl(); disableAllControl();
//Start Function : No.4 - Summary : make sure all page is loaded //Start Function : No.4 - Summary : make sure all page is loaded
if(contentType == ContentTypeKeys.Type_PDF){ if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(opt != 0 && opt != null){ if(totalPage > 1){
if(opt != 0 && opt != null){
enableButtonMarking();
}
}
else{
enableButtonMarking(); enableButtonMarking();
} }
} }
else{ else{
enableButtonMarking(); enableButtonMarking();
...@@ -301,10 +311,15 @@ PageObject.prototype.drawPageObject = function (context, opt) { ...@@ -301,10 +311,15 @@ PageObject.prototype.drawPageObject = function (context, opt) {
//End Function : No.4 - Summary : make sure all page is loaded //End Function : No.4 - Summary : make sure all page is loaded
} else { } else {
//Start Function : No.4 - Summary : make sure all page is loaded //Start Function : No.4 - Summary : make sure all page is loaded
if(contentType == ContentTypeKeys.Type_PDF){ if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(opt != 0 && opt != null){ if(totalPage > 1){
if(opt != 0 && opt != null){
enableAllControl();
}
}
else{
enableAllControl(); enableAllControl();
} }
} }
else{ else{
enableAllControl(); enableAllControl();
...@@ -314,10 +329,15 @@ PageObject.prototype.drawPageObject = function (context, opt) { ...@@ -314,10 +329,15 @@ PageObject.prototype.drawPageObject = function (context, opt) {
/*finish loading */ /*finish loading */
//Start Function : No.4 - Summary : make sure all page is loaded //Start Function : No.4 - Summary : make sure all page is loaded
if(contentType == ContentTypeKeys.Type_PDF){ if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(opt != 0 && opt != null){ if(totalPage > 1){
$('#divImageLoading').css('display', 'none'); if(opt != 0 && opt != null){
} $('#divImageLoading').css('display', 'none');
}
}
else{
$('#divImageLoading').css('display', 'none');
}
} }
else{ else{
$('#divImageLoading').css('display', 'none'); $('#divImageLoading').css('display', 'none');
...@@ -341,10 +361,15 @@ PageObject.prototype.drawPageObject = function (context, opt) { ...@@ -341,10 +361,15 @@ PageObject.prototype.drawPageObject = function (context, opt) {
if (ClientData.IsAddingMarking() == true) { if (ClientData.IsAddingMarking() == true) {
disableAllControl(); disableAllControl();
//Start Function : No.4 - Summary : make sure all page is loaded //Start Function : No.4 - Summary : make sure all page is loaded
if(contentType == ContentTypeKeys.Type_PDF){ if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(opt != 0 && opt != null){ if(totalPage > 1){
enableButtonMarking(); if(opt != 0 && opt != null){
} enableButtonMarking();
}
}
else{
enableButtonMarking();
}
} }
else{ else{
enableButtonMarking(); enableButtonMarking();
...@@ -352,10 +377,15 @@ PageObject.prototype.drawPageObject = function (context, opt) { ...@@ -352,10 +377,15 @@ PageObject.prototype.drawPageObject = function (context, opt) {
//End Function : No.4 - Summary : make sure all page is loaded //End Function : No.4 - Summary : make sure all page is loaded
} else { } else {
//Start Function : No.4 - Summary : make sure all page is loaded //Start Function : No.4 - Summary : make sure all page is loaded
if(contentType == ContentTypeKeys.Type_PDF){ if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(opt != 0 && opt != null){ if(totalPage > 1){
enableAllControl(); if(opt != 0 && opt != null){
} enableAllControl();
}
}
else{
enableAllControl();
}
} }
else{ else{
enableAllControl(); enableAllControl();
...@@ -365,10 +395,15 @@ PageObject.prototype.drawPageObject = function (context, opt) { ...@@ -365,10 +395,15 @@ PageObject.prototype.drawPageObject = function (context, opt) {
/*finish loading */ /*finish loading */
//Start Function : No.4 - Summary : make sure all page is loaded //Start Function : No.4 - Summary : make sure all page is loaded
if(contentType == ContentTypeKeys.Type_PDF){ if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(opt != 0 && opt != null){ if(totalPage > 1){
$('#divImageLoading').css('display', 'none'); if(opt != 0 && opt != null){
} $('#divImageLoading').css('display', 'none');
}
}
else{
$('#divImageLoading').css('display', 'none');
}
} }
else{ else{
$('#divImageLoading').css('display', 'none'); $('#divImageLoading').css('display', 'none');
...@@ -509,15 +544,21 @@ function showHtml(url){ ...@@ -509,15 +544,21 @@ function showHtml(url){
hideDialog(); hideDialog();
}); });
} }
var anket = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible, resourceUrl, questionNo, replyLimit, fullscreen, saveAs) { var anket = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible, resourceUrl, questionNo, replyLimit, fullscreen, saveAs, objectId) {
this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, null, null); this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, null, null);
this.action = function () { this.action = function () {
/*stop audio on page */ /*stop audio on page */
stopAllAudio(); stopAllAudio();
if (resourceUrl != "") { if (resourceUrl != "") {
showAnket(resourceUrl, fullscreen); resourceUrl = resourceUrl + "?abObjectId=" + objectId + "&sid=" + ClientData.userInfo_sid();
var isFullScreen = false;
if(parseInt(fullscreen) == 1){
isFullScreen = true;
}
showAnket(resourceUrl, isFullScreen);
showDialog(true); showDialog(true);
} }
}; };
...@@ -826,7 +867,7 @@ Transition.prototype.flipNextPage = function () { ...@@ -826,7 +867,7 @@ Transition.prototype.flipNextPage = function () {
removeObject(); removeObject();
if(animateType == animateTypeKeys.Type_FadeIn){ if(animateType == animateTypeKeys.Type_FadeIn){
$('#mainNext').css('left', marginX + 'px'); $('#mainNext').css('left', marginX + 'px');
$('#mainNext').css('opacity', '1'); $('#mainNext').css('display', 'block');
$('#main').css('z-index', '1'); $('#main').css('z-index', '1');
} }
else{ else{
...@@ -898,9 +939,8 @@ Transition.prototype.flipNextPage = function () { ...@@ -898,9 +939,8 @@ Transition.prototype.flipNextPage = function () {
}); });
} }
else if(animateType == animateTypeKeys.Type_FadeIn){ else if(animateType == animateTypeKeys.Type_FadeIn){
$('#main').stop(true).animate( $('#main').stop(true).fadeOut(
{ 'opacity': 0 }, {
{
duration: animatePeriod, duration: animatePeriod,
complete: function () { complete: function () {
...@@ -969,7 +1009,7 @@ Transition.prototype.flipPreviousPage = function () { ...@@ -969,7 +1009,7 @@ Transition.prototype.flipPreviousPage = function () {
removeObject(); removeObject();
if(animateType == animateTypeKeys.Type_FadeIn){ if(animateType == animateTypeKeys.Type_FadeIn){
$('#mainPre').css('left', marginX + 'px'); $('#mainPre').css('left', marginX + 'px');
$('#mainPre').css('opacity', '1'); $('#mainPre').css('display', 'block');
$('#main').css('z-index', '1'); $('#main').css('z-index', '1');
} }
else{ else{
...@@ -1037,8 +1077,7 @@ Transition.prototype.flipPreviousPage = function () { ...@@ -1037,8 +1077,7 @@ Transition.prototype.flipPreviousPage = function () {
}); });
} }
else{ else{
$('#main').stop(true).animate( $('#main').stop(true).fadeOut(
{ opacity: '0' },
{ {
duration: animatePeriod, duration: animatePeriod,
complete: function () { complete: function () {
...@@ -1234,7 +1273,7 @@ function createPage(pageNumber, pageImage, pageObjects, onCompleteFunc) { ...@@ -1234,7 +1273,7 @@ function createPage(pageNumber, pageImage, pageObjects, onCompleteFunc) {
var page = new ContentPage(pageNumber, pageImage); var page = new ContentPage(pageNumber, pageImage);
/* add page Object */ /* add page Object */
//Start Function: No.12 //Start Function: No.12
if (contentType == ContentTypeKeys.Type_PDF) { if (contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile) {
page.addPageObjects(pageObjects); page.addPageObjects(pageObjects);
} }
//End Function: No.12 //End Function: No.12
......
...@@ -920,10 +920,13 @@ function mouseDown_CanvasMain(event) { ...@@ -920,10 +920,13 @@ function mouseDown_CanvasMain(event) {
_clickFirstPos = {x:event.screenX, y: event.screenY}; _clickFirstPos = {x:event.screenX, y: event.screenY};
_clickLastPos = {x:event.screenX, y: event.screenY}; _clickLastPos = {x:event.screenX, y: event.screenY};
_moveNum = 0; _moveNum = 0;
$('#mainPre').css("display",'block');
$('#mainNext').css("display",'block');
if(animateType == animateTypeKeys.Type_Slide){
$('#mainPre').css("display",'block');
$('#mainNext').css("display",'block');
}
//End Function : No.20 //End Function : No.20
//Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary : //Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
...@@ -938,10 +941,15 @@ function mouseDown_CanvasMain(event) { ...@@ -938,10 +941,15 @@ function mouseDown_CanvasMain(event) {
else{ else{
moveFlag = false; moveFlag = false;
if(is3DObject(hitPageObj)){ if(is3DObject(hitPageObj)){
_3dAnimate = true; moveFlag = true;
_3dAction = _3dActionType.TouchStart_MouseDown; clearTimeout(this.downTimer);
_curr3dObject = hitPageObj; this.downTimer = setTimeout(function() {
hitPageObj.action(imagePt); _3dAnimate = true;
_3dAction = _3dActionType.TouchStart_MouseDown;
_curr3dObject = hitPageObj;
hitPageObj.action(imagePt);
moveFlag = false;
}, _3dTimeToDetect);
} }
else{ else{
_3dAnimate = false; _3dAnimate = false;
...@@ -977,9 +985,9 @@ function mouseUp_CanvasMain(event) { ...@@ -977,9 +985,9 @@ function mouseUp_CanvasMain(event) {
$('#main').css('cursor', 'default'); $('#main').css('cursor', 'default');
// navigate page // navigate page
if(_moveNum == 2){ if(_moveNum == 2){
$('#nextpage').click(); nextPage_click();
}else if (_moveNum == -2){ }else if (_moveNum == -2){
$('#prevpage').click(); prevPage_click();
}else { }else {
correctCanvasPosition(); correctCanvasPosition();
} }
...@@ -1165,12 +1173,14 @@ function onTouchstart(evt){ ...@@ -1165,12 +1173,14 @@ function onTouchstart(evt){
if (hitPageObj) { if (hitPageObj) {
if(is3DObject(hitPageObj)){ if(is3DObject(hitPageObj)){
clearTimeout(this.downTimer);
_3dAction = _3dActionType.TouchStart_MouseDown; this.downTimer = setTimeout(function() {
_curr3dObject = hitPageObj; _3dAction = _3dActionType.TouchStart_MouseDown;
hitPageObj.action(imagePt); _curr3dObject = hitPageObj;
_3dAnimate = true; hitPageObj.action(imagePt);
_3dAnimate = true;
}, _3dTimeToDetect);
} }
else{ else{
_3dAnimate = false; _3dAnimate = false;
...@@ -1228,8 +1238,12 @@ function onTouchstart(evt){ ...@@ -1228,8 +1238,12 @@ function onTouchstart(evt){
_touchPageY = evt.touches[0].pageY; _touchPageY = evt.touches[0].pageY;
//set touch to move page flag //set touch to move page flag
if(touch2 == null && userScale == 1){ 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; _isPageNaviTouch = true;
_moveNum = 0; _moveNum = 0;
...@@ -1245,14 +1259,17 @@ function onTouchstart(evt){ ...@@ -1245,14 +1259,17 @@ function onTouchstart(evt){
if (hitPageObj) { if (hitPageObj) {
if(is3DObject(hitPageObj)){ if(is3DObject(hitPageObj)){
var arr3DInfo = []; clearTimeout(this.downTimer);
this.downTimer = setTimeout(function() {
_3dAction = _3dActionType.TouchStart_MouseDown; var arr3DInfo = [];
_curr3dObject = hitPageObj;
hitPageObj.action(imagePt); _3dAction = _3dActionType.TouchStart_MouseDown;
_3dAnimate = true; _curr3dObject = hitPageObj;
_isClick = false; hitPageObj.action(imagePt);
_3dAnimate = true;
_isClick = false;
}, _3dTimeToDetect);
} }
else{ else{
...@@ -1396,8 +1413,10 @@ function onTouchmove(evt){ ...@@ -1396,8 +1413,10 @@ function onTouchmove(evt){
_bufferPoints.push(touch1); // add to buffer to use for another action if occur. ex: zoom page _bufferPoints.push(touch1); // add to buffer to use for another action if occur. ex: zoom page
//console.log("move page case"); //console.log("move page case");
$('#mainPre').css("display",'block'); if(animateType == animateTypeKeys.Type_Slide){
$('#mainNext').css("display",'block'); $('#mainPre').css("display",'block');
$('#mainNext').css("display",'block');
}
touchStartedTime = new Date(); touchStartedTime = new Date();
...@@ -1554,11 +1573,7 @@ function onTouchend(evt){ ...@@ -1554,11 +1573,7 @@ function onTouchend(evt){
} }
var bContinue = true; var bContinue = true;
if (avwUserEnvObj.os == "ipad" || avwUserEnvObj.os == "android") {
evt.preventDefault();
}
if(isLoadingObject){ if(isLoadingObject){
bContinue = false; bContinue = false;
} }
......
...@@ -297,7 +297,7 @@ function enableAllControl() { ...@@ -297,7 +297,7 @@ function enableAllControl() {
$("#control_screen_2").css('cursor', 'pointer'); $("#control_screen_2").css('cursor', 'pointer');
//Start Function: No.12 //Start Function: No.12
if (contentType == ContentTypeKeys.Type_PDF) { if (contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile) {
$("#slider_page").css('cursor', 'pointer'); $("#slider_page").css('cursor', 'pointer');
$(".ui-slider-handle").css('cursor', 'pointer'); $(".ui-slider-handle").css('cursor', 'pointer');
} }
...@@ -352,9 +352,15 @@ function enableAllControl() { ...@@ -352,9 +352,15 @@ function enableAllControl() {
checkDisableButtonZoom(); checkDisableButtonZoom();
//Start Function: No.12 //Start Function: No.12
if (contentType == ContentTypeKeys.Type_PDF) { if (contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile) {
$("#slider_page").slider("option", "disabled", false); $("#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) { ...@@ -344,6 +344,7 @@ function getMediaType1(iValueObj) {
pageObject["replyLimit"] = iValueObj.action.replyLimit; pageObject["replyLimit"] = iValueObj.action.replyLimit;
pageObject["fullScreen"] = iValueObj.action.fullScreen; pageObject["fullScreen"] = iValueObj.action.fullScreen;
pageObject["saveAs"] = iValueObj.action.saveAs; pageObject["saveAs"] = iValueObj.action.saveAs;
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;
...@@ -708,6 +709,7 @@ function getMediaType11(iValueObj) { ...@@ -708,6 +709,7 @@ function getMediaType11(iValueObj) {
pageObject["replyLimit"] = iValueObj.action.replyLimit; pageObject["replyLimit"] = iValueObj.action.replyLimit;
pageObject["fullScreen"] = iValueObj.action.fullScreen; pageObject["fullScreen"] = iValueObj.action.fullScreen;
pageObject["saveAs"] = iValueObj.action.saveAs; pageObject["saveAs"] = iValueObj.action.saveAs;
pageObject["objectId"] = iValueObj.action.objectId;
} }
return pageObject; return pageObject;
...@@ -1363,11 +1365,10 @@ function correctCanvasPosition(){ ...@@ -1363,11 +1365,10 @@ function correctCanvasPosition(){
$('#mainPre').css("display", 'none'); $('#mainPre').css("display", 'none');
} }
else if(animateType == animateTypeKeys.Type_FadeIn){ else if(animateType == animateTypeKeys.Type_FadeIn){
//$('#main').css("z-index",'2');
$('#mainNext').css("z-index",'0'); $('#mainNext').css("z-index",'0');
$('#mainPre').css("z-index",'0'); $('#mainPre').css("z-index",'0');
//$('#mainNext').css("opacity",'0'); $('#mainNext').css("display", 'none');
//$('#mainPre').css("opacity",'0'); $('#mainPre').css("display", 'none');
} }
}; };
......
...@@ -457,6 +457,15 @@ function initializeViewerComponent(viewId) { ...@@ -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( $('#main').css(
{ {
...@@ -506,7 +515,7 @@ function initializeViewerComponent(viewId) { ...@@ -506,7 +515,7 @@ function initializeViewerComponent(viewId) {
'box-shadow': '3px 3px 14px #333', 'box-shadow': '3px 3px 14px #333',
'background-color': 'rgba(153, 153, 153, 0.7)', 'background-color': 'rgba(153, 153, 153, 0.7)',
'border-radius': '4px', 'border-radius': '4px',
'opacity': '0' 'display': 'none'
} }
); );
$('#mainPre').css( $('#mainPre').css(
...@@ -518,7 +527,7 @@ function initializeViewerComponent(viewId) { ...@@ -518,7 +527,7 @@ function initializeViewerComponent(viewId) {
'box-shadow': '3px 3px 14px #333', 'box-shadow': '3px 3px 14px #333',
'background-color': 'rgba(153, 153, 153, 0.7)', 'background-color': 'rgba(153, 153, 153, 0.7)',
'border-radius': '4px', 'border-radius': '4px',
'opacity': '0' 'display': 'none'
} }
); );
} }
......
...@@ -194,6 +194,14 @@ $(document).ready(function () { ...@@ -194,6 +194,14 @@ $(document).ready(function () {
} else { } else {
checkForceChangePassword(); checkForceChangePassword();
} }
// hide tab group with user anonymous
if(isAnonymousLogin())
{
$('.switchingTab .colright').hide();
}
else $('.switchingTab .colright').show();
}); });
var allowTimerCloseSubMenu = true; var allowTimerCloseSubMenu = true;
var timer_subMenu; 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