Commit 7ca6b4aa by Vo Duc Thang

リリース

・3D、HTMLオブジェクト
・アノニマスログイン
・コンテンツコンテナ(Noneタイプ)
parent 489ea73a
......@@ -47,7 +47,7 @@
<a class="logo" href="javascript:void(0);" onclick="avwScreenMove(ScreenIds.Home)"> </a>
<div class="menu_language">
<ul>
<li><label class="lang" lang="txtLoginUser">こんにちは</label><label id="login-username"> </label></li>
<li id="li-login-username" style="display:none;"><label class="lang" lang="txtLoginUser">こんにちは</label><label id="login-username"> </label></li>
<li class="pushmessage hide" id="liPushMessage"><label class="lang" lang="txtPushAlert">新着 : </label><label id="numbermessage"></label><span></span>
<div id="list-push-message">
......
......@@ -64,7 +64,7 @@ var ContentTypeKeys = {
Type_Video : 'movie',
Type_Music : 'music',
Type_Others : 'other',
Type_NoFile : 'no',
Type_NoFile : 'none',
Type_Html: 'html',
Type_Enquete : 'enquete'
};
......
......@@ -64,7 +64,7 @@
"dspBkCancel":"Logout",
"txtSearchResult":"Result",
"dspHome":"Home",
"txtLoginUser":"(Ver.20130827)User:",
"txtLoginUser":"(Ver.20130828)User:",
"txtAll":"All",
"txtMkgSize":"Size",
"txtMkgS":"S",
......
......@@ -64,7 +64,7 @@
"dspBkCancel":"バックアップせずにログアウト",
"txtSearchResult":"検索結果",
"dspHome":"ホーム",
"txtLoginUser":"(Ver.20130827)ログイン中:",
"txtLoginUser":"(Ver.20130828)ログイン中:",
"txtAll":"すべて",
"txtMkgSize":"太さ",
"txtMkgS":"小",
......
......@@ -64,7 +64,7 @@
"dspBkCancel":"로그아웃",
"txtSearchResult":"검색 결과",
"dspHome":"홈",
"txtLoginUser":"(Ver.20130827)로그인 중:",
"txtLoginUser":"(Ver.20130828)로그인 중:",
"txtAll":"전체",
"txtMkgSize":"두께",
"txtMkgS":"소",
......
......@@ -48,7 +48,7 @@
<a class="logo" href="javascript:void(0);" onclick="avwScreenMove(ScreenIds.Home)"> </a>
<div class="menu_language">
<ul>
<li><label class="lang" lang="txtLoginUser">こんにちは</label><label id="login-username"> </label></li>
<li id="li-login-username" style="display:none;"><label class="lang" lang="txtLoginUser">こんにちは</label><label id="login-username"> </label></li>
<li class="pushmessage hide" id="liPushMessage"><label class="lang" lang="txtPushAlert">新着 : </label><label id="numbermessage"></label><span></span>
<div id="list-push-message">
......
......@@ -51,6 +51,7 @@
<script src="./js/contentview_Paint.js"></script>
<script src="./js/contentview_Anket.js"></script>
<script src="./js/contentview_3d.js"></script>
<script src="./js/contentview_ContentTypeNone.js"></script>
<script src="common/js/zoomDetector.js" type="text/javascript"></script>
<link type="text/css" rel="stylesheet" href="css/reset.css" />
......
......@@ -42,14 +42,14 @@
line-height:60px;
margin:0;
padding:0;
background-color:#fff;
/*background-color:#fff;*/
}
.anket-dialog .anket-commands input[type='button']
{
border-radius:10px;
padding:0 10px;
border:solid 1px #333;
background-color:#eee;
background-color:#ccc;
cursor:pointer;
margin-right:5px;
width:100px;
......
......@@ -47,7 +47,7 @@
<a class="logo" href="javascript:void(0);" onclick="avwScreenMove(ScreenIds.Home)"> </a>
<div class="menu_language">
<ul>
<li><label class="lang" lang="txtLoginUser">こんにちは</label><label id="login-username"> </label></li>
<li id="li-login-username" style="display:none;"><label class="lang" lang="txtLoginUser">こんにちは</label><label id="login-username"> </label></li>
<li class="pushmessage hide" id="liPushMessage"><label class="lang" lang="txtPushAlert">新着 : </label><label id="numbermessage"></label><span></span>
<div id="list-push-message">
......
......@@ -58,7 +58,7 @@
<a class="logo" href="javascript:void(0);" onclick="avwScreenMove(ScreenIds.Home)"> </a>
<div class="menu_language">
<ul>
<li><label class="lang" lang="txtLoginUser">こんにちは</label><label id="login-username"> </label></li>
<li id="li-login-username" style="display:none;"><label class="lang" lang="txtLoginUser">こんにちは</label><label id="login-username"> </label></li>
<li class="pushmessage hide" id="liPushMessage"><label class="lang" lang="txtPushAlert">新着 : </label><label id="numbermessage"></label><span></span>
<div id="list-push-message">
......
......@@ -308,7 +308,7 @@ function handleAPIWebContentPage(dataJson, pos) {
//Start Function : No.4 - Editor : Long - Date : 08/20/2013
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(contentType == ContentTypeKeys.Type_PDF){
for (var nIndex = 0; nIndex < bmList.length; nIndex++) {
nIndexBookMark = -1;
var contentPage = dataJson.pages;
......@@ -353,7 +353,8 @@ function handleAPIWebContentPage(dataJson, pos) {
imgTemp.src = formatStringBase64(dataStored[nStored].pageThumbnail);
} else { /* data not loaded*/
}
else { /* data not loaded*/
$('#divListBookmark').append(
' <li id="' + changePageNo(bmList[nIndex].pageNo) + '">' +
' <img id="img_bookmark_' + bmList[nIndex].pageNo + '" class="imgbox" src="img/view_loading.gif" />' +
......@@ -388,7 +389,8 @@ function handleAPIWebContentPage(dataJson, pos) {
}
} else { /* page deleted */
}
else { /* page deleted */
$('#divListBookmark').append(
' <li id="' + changePageNo(bmList[nIndex].pageNo) + '">' +
' <span class="mdltext">' +
......@@ -405,7 +407,7 @@ function handleAPIWebContentPage(dataJson, pos) {
}
}
}
else if(contentType == ContentTypeKeys.Type_Image){
else if(contentType == ContentTypeKeys.Type_Image ){
for (var nIndex = 0; nIndex < bmList.length; nIndex++) {
nIndexBookMark = -1;
......@@ -475,10 +477,83 @@ function handleAPIWebContentPage(dataJson, pos) {
}
}
}
else if(contentType == ContentTypeKeys.Type_NoFile ){
for (var nIndex = 0; nIndex < bmList.length; nIndex++) {
nIndexBookMark = -1;
var contentPage = dataJson.pages;
for (var nIndexJson = 0; nIndexJson < contentPage.length; nIndexJson++) {
if (contentPage[nIndexJson].pageNo == bmList[nIndex].pageNo) {
nIndexBookMark = nIndexJson;
break;
}
}
if (nIndexBookMark != -1) { /* page exist */
$('#divListBookmark').append(
' <li id="' + 1 + '">' +
' <img id="img_bookmark_' + bmList[nIndex].pageNo + '" class="imgbox" src="img/view_loading.gif" />' +
' <span class="mdltext">' +
i18nText('txtPage') + (changePageNo(bmList[nIndex].pageNo) + 1) + '<br /> ' +
truncate(htmlEncode(contentPage[nIndexBookMark].pageText), 20) +
' </span>' +
' </li>'
);
//Resize Image
var imgTemp = new Image();
var imageContent = new Image();
var imageUrl = pageImages;
imgTemp.onload = function () {
if (imgTemp.width > imgTemp.height) {
$("img.imgbox").attr('height', '');
$("img.imgbox").removeAttr('height');
$("img.imgbox").attr('width', '43');
}
else {
$("img.imgbox").attr('width', '');
$("img.imgbox").removeAttr('width');
$("img.imgbox").attr('height', '43');
}
imageContent.onload = function(){
$("img.imgbox").attr('src', imageUrl);
};
imageContent.src = imageUrl;
};
imgTemp.src = "img/view_loading.gif";
lstPageNoBookMark.push(bmList[nIndex].pageNo);
} else { /* page deleted */
$('#divListBookmark').append(
' <li id="' + 0 + '">' +
' <span class="mdltext">' +
' <span>' + i18nText('txtPage') + bmList[nIndex].pageNo + '</span> <br /> ' +
' </span>' +
' </li>' +
' <li>' +
' <span class="mdltext">' +
' <span style="color:red">' + i18nText('msgShioriDeleted') + '</span>' +
' </span>' +
' </li>'
);
}
}
}
//End Function : No.4 - Editor : Long - Date : 08/20/2013
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){
if(contentType == ContentTypeKeys.Type_PDF){
if (lstPageNoBookMark.length > 0) {
isSendingData = true;
loadDataBookmark(lstPageNoBookMark);
......@@ -3091,7 +3166,15 @@ function setDefaultEvent() {
document.getElementById('main').removeEventListener('click', function(){}, false);
document.getElementById('main').addEventListener('touchstart', onTouchstart, false);
document.getElementById('main').addEventListener('touchmove', onTouchmove, false);
document.getElementById('main').addEventListener('touchend', onTouchend, false);
document.getElementById('main').addEventListener('touchend', onTouchend, false);
document.getElementById('canvasWrapper').addEventListener('touchstart', function(event){event.preventDefault();}, false);
document.getElementById('canvasWrapper').addEventListener('touchmove', function(event){event.preventDefault();}, false);
document.getElementById('canvasWrapper').addEventListener('touchend', function(event){event.preventDefault();}, false);
//document.getElementById('wrapper').addEventListener('touchstart', function(event){event.preventDefault();}, false);
//document.getElementById('wrapper').addEventListener('touchmove', function(event){event.preventDefault();}, false);
//document.getElementById('wrapper').addEventListener('touchend', function(event){event.preventDefault();}, false);
}
$('#main').mouseout(function (event) {
......@@ -3225,12 +3308,16 @@ function enableControlsCopyMemo() {
$('#imgbookmark').bind('click', bookmarkPage);
$('#imgbookmark').removeClass();
$('#listindex').bind('click', showListPageIndex);
$('#listindex').removeClass();
$('#copytext').bind('click', showCopyText);
$('#copytext').removeClass();
//Start Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary :
if(contentType == ContentTypeKeys.Type_PDF){
$('#listindex').bind('click', showListPageIndex);
$('#listindex').removeClass();
$('#copytext').bind('click', showCopyText);
$('#copytext').removeClass();
}
//Start Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary :
/* image memo */
$('#imgmemo').bind('click', handleMemo);
$('#imgmemo').removeClass();
......@@ -3246,17 +3333,16 @@ function enableControlsCopyMemo() {
$('#imgmarkingtoolbar').bind('click', handleDrawCanvas);
$('#imgmarkingtoolbar').removeClass();
}
if(contentType == ContentTypeKeys.Type_PDF){
$("#slider_page").slider("option", "disabled", false);
enable('#txtSearch', '#txtSlider');
}
else if(contentType == ContentTypeKeys.Type_NoFile){
$("#slider_page").slider("option", "disabled", false);
enable('#txtSlider');
}
/*$('#firstpage').bind('click',firstPage_click);
$('#firstpage').removeClass();
$('#prevpage').bind('click',prevPage_click);
$('#prevpage').removeClass();
$('#nextpage').bind('click',nextPage_click);
$('#nextpage').removeClass();
$('#lastpage').bind('click',lastPage_click);
$('#lastpage').removeClass();*/
$("#slider_page").slider("option", "disabled", false);
enable('#txtSearch', '#txtSlider');
if (avwUserEnvObj.os != "ipad" && avwUserEnvObj.os != "android") {
$('#button_next_canvas').css('display', 'block');
......@@ -4450,11 +4536,14 @@ function changeScaleDrawCanvas(scale) {
//Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
function is3DObject(pageContent){
var result = false;
if(pageContent.actionType == 9 && pageContent.mediaType == 8){
result = true;
if(pageContent == null || pageContent == undefined){
result = false;
}
else{
if(pageContent.actionType == 9 && pageContent.mediaType == 8){
result = true;
}
}
return result;
};
//End Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
\ No newline at end of file
......@@ -2,7 +2,7 @@
function showAnket(url, fullscreen) {
var $container = $('#dialog');
url = url + "?sid=" + ClientData.userInfo_sid();
//url = url + "?sid=" + ClientData.userInfo_sid();
$container.html('');
$container.addClass('anket-dialog');
......@@ -57,7 +57,7 @@ function showAnket(url, fullscreen) {
{
opacity = 0.7;
}
$('#dialog').css('opacity', opacity);
$('#dialog,#dialog iframe,#dialog .anket-commands,#dialog .anket-commands input').css('opacity', opacity);
}
);
// resize anket
......
......@@ -144,7 +144,20 @@ function getDataJsonFile() {
obj["contentDataSub"] = data.contentDataSub;
}
}
}
}
//Get Data Of page to draw page
if(contentType == ContentTypeKeys.Type_NoFile){
var pageDataInfo = [];
pageDataInfo["height"] = JsonFile.content.height;
pageDataInfo["width"] = JsonFile.content.width;
pageDataInfo["alpha"] = JsonFile.content.backgroundAlpha;
pageDataInfo["color"] = JsonFile.content.backgroundColor;
pageImages = returnImageString(pageDataInfo);
}
//End : Function : No.12 - Editor : Long - Date: 08/27/2013 - Summary : Get Page Object for content type none
getPageObjectsByPageIndex(pageObjectsData, 0);
......
function getJsonContentInfoTyeNone() {
webGetContentData();
getSearchDataFromJson();
getJsonDataPageTitle();
getJsonDataType4();
getJsonDataType5();
getDataJsonFile();
webGetPageImageContentSize();
};
//Return a string base 64 image has drawn with specify data
function returnImageString(data){
if(data){
var height = data.height;
var width = data.width;
var color = data.color;
var alpha = data.alpha;
}
var imageUrl = '';
var typeNoneCanvas = document.createElement('canvas');
var typeNoneContext = typeNoneCanvas.getContext('2d');
typeNoneCanvas.height = height;
typeNoneCanvas.width = width;
typeNoneContext.clearRect(0, 0, width, height)
typeNoneContext.fillStyle= color;
typeNoneContext.globalAlpha = alpha;
typeNoneContext.fillRect(0,0,width,height);
imageUrl = typeNoneCanvas.toDataURL();
return imageUrl;
};
......@@ -519,6 +519,7 @@ var htmlLinkButton = function (mediaType, actionType, id, imageUrl, x, y, w, h,
stopAllAudio();
if (resourceUrl != "") {
showHtml(resourceUrl);
showDialog(true);
}
......
......@@ -1106,28 +1106,39 @@ function renderNextPage(){
var pageNo = parseInt(changePageIndex(getPageIndex())) + 1;
//Get next page background image
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo },
function (data) {
nextPageImage = data;
nextContent.setPageImages(totalPage, nextPageImage)
.setPageObjects(nextPageObjects)
.nextPage();
},
function (xmlHttpRequest, txtStatus, errorThrown) {
showErrorScreen();
});
if(contentType == ContentTypeKeys.Type_PDF){
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo },
function (data) {
nextPageImage = data;
nextContent.setPageImages(totalPage, nextPageImage)
.setPageObjects(nextPageObjects)
.nextPage();
},
function (xmlHttpRequest, txtStatus, errorThrown) {
showErrorScreen();
});
}
//Start Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary : Render next page content image the same with the current one
else if(contentType == ContentTypeKeys.Type_NoFile){
nextContent.setPageImages(totalPage, pageImages)
.setPageObjects(nextPageObjects)
.nextPage();
}
//End Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary : Render next page content image the same with the current one
};
//Render prev Page Content
function renderPrevPage(){
//Get next page Number
//Get prev page Number
var pageNo = parseInt(changePageIndex(getPageIndex())) - 1;
//Get next page background image
//Get prev page background image
if(contentType == ContentTypeKeys.Type_PDF){
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo },
function (data) {
......@@ -1141,6 +1152,14 @@ function renderPrevPage(){
function (xmlHttpRequest, txtStatus, errorThrown) {
showErrorScreen();
});
}
//Start Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary : Render next page content image the same with the current one
else if(contentType == ContentTypeKeys.Type_NoFile){
prevContent.setPageImages(totalPage, pageImages)
.setPageObjects(prevPageObjects)
.previousPage();
}
//End Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary : Render next page content image the same with the current one
};
//Get next page objects by page index
......
......@@ -114,9 +114,7 @@ function initDisplayToolbarDevice() {
function initPage() {
//$('body,html').animate({ scrollTop: 0 }, 350);
//animateType = animateTypeKeys.Type_FadeIn;
$('#divImageLoading').css('display', 'block');
......@@ -142,6 +140,15 @@ function initPage() {
if(contentType == ContentTypeKeys.Type_Image){
getContentInfoTypeImage();
}
else if(contentType == ContentTypeKeys.Type_NoFile){
//Start Function: No.4 - Editor : Long - Date: 08/20/2013
getPageTransitionConfig();
//End Function : No.4 - Editor : Long - Date : 08/20/2013
//Start Function: No.12 - Editor : Long - Date: 08/28/2013
getJsonContentInfoTyeNone();
//Start Function: No.12 - Editor : Long - Date: 08/28/2013
}
else{
getJsonContentInfo();
......@@ -275,10 +282,14 @@ function initPage() {
//Start Function: No.12 - Editor : Long - Summary : Render next page
//Get next
getNextPageObjectsByPageIndex(pageObjectsData, getPageIndex() + 1);
//Render next page
renderNextPage();
if(totalPage > 1){
getNextPageObjectsByPageIndex(pageObjectsData, getPageIndex() + 1);
//Render next page
renderNextPage();
}
//End Function: No.12 - Editor : Long - Summary : Render next page
......@@ -376,7 +387,6 @@ function initPage() {
});
};
function initPageMediaAndHtmlType(){
//$('#divImageLoading').css('display', 'block');
......@@ -421,7 +431,6 @@ function initPageMediaAndHtmlType(){
disable('#txtSearch', '#txtSlider');
};
//Start: Function: No.4 - Editor : Long - Date : 08/09/2013 - Summary : Create next and previous canvas
/* Initialize PageViewer Component */
function initializeViewerComponent(viewId) {
......
......@@ -62,9 +62,15 @@ $(document).ready(function () {
//Hide search panel until click on text field
$('div#header-searchbox').css('display', 'none');
//Display user name
$('#login-username').text(ClientData.userInfo_userName());
if (isAnonymousLogin()) {
$('#li-login-username').hide();
}
else {
//li-login-username
$('#li-login-username').show();
//Display user name
$('#login-username').text(ClientData.userInfo_userName());
}
$('#dlgConfirmBackup-backup').click(confirmWithBackupFunction);
......
......@@ -56,7 +56,7 @@
<a class="logo" href="javascript:void(0);" onclick="avwScreenMove(ScreenIds.Home)"> </a>
<div class="menu_language">
<ul>
<li><label class="lang" lang="txtLoginUser">こんにちは</label><label id="login-username"> </label></li>
<li id="li-login-username" style="display:none;"><label class="lang" lang="txtLoginUser">こんにちは</label><label id="login-username"> </label></li>
<li class="pushmessage hide" id="liPushMessage"><label class="lang" lang="txtPushAlert">新着 : </label><label id="numbermessage"></label><span></span>
<div id="list-push-message">
......
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