Commit fcb38d18 by Motohisa Nakano

20121212

parent 36ae37cf
......@@ -3,6 +3,7 @@ DirectoryIndex login.html index.html
# mimetype
AddType image/svg+xml .svg
AddType video/mp4 .mov
# favicon
AddType image/x-icon .ico
......
......@@ -274,7 +274,9 @@ var Keys = {
// Local :メモデータ(memo)_コンテンツID:Interger
memo_contentNo: 'memo_contentNo',
// Local :メモデータ(memo)_ページNo:Interger
memo_pageNo: 'memo_pageNo'
memo_pageNo: 'memo_pageNo',
// Local :メモ(memo)_CopyText:String
memo_copyText: 'memo_copyText'
/* -------------------------------------------------------------------------------- */
};
......@@ -433,7 +435,17 @@ function restoreData(jsonString) {
return data;
}
/*
Get data from localstorage and sessionstorage synchronization
If has any param (args.length > 0) -> setter
If has not param (args.length = 0) -> getter
. Get from session:
+ if it existed and key existed in localstorage -> return result
+ else:
* set value from local to sessionstorage -> return value of sessionstorage if value is not empty,
otherwise, return default result.
*/
function operateData(args, strKey, returnDefaultData) {
if (args.length > 0) {
......@@ -446,9 +458,18 @@ function operateData(args, strKey, returnDefaultData) {
&& SessionStorageUtils.get(strKey) != ''
&& SessionStorageUtils.get(strKey) != null
&& SessionStorageUtils.get(strKey) != 'null') {
if (LocalStorageUtils.existKey(strKey) == true) {
return JSON.parse(SessionStorageUtils.get(strKey));
}
else {
return returnDefaultData;
}
}
else {
// if (LocalStorageUtils.existKey(strKey) == true) {
// SessionStorageUtils.set(strKey, JSON.stringify(LocalStorageUtils.get(strKey)));
// return JSON.parse(SessionStorageUtils.get(strKey));
// }
SessionStorageUtils.set(strKey, JSON.stringify(LocalStorageUtils.get(strKey)));
if (SessionStorageUtils.get(strKey) != 'undefined'
&& SessionStorageUtils.get(strKey) != undefined
......@@ -913,6 +934,21 @@ var ClientData = {
}
},
// Session
memo_copyText: function (data) {
if (arguments.length > 0) {
SessionStorageUtils.set(Keys.memo_copyText, JSON.stringify(data));
} else {
if (SessionStorageUtils.get(Keys.memo_copyText) != 'undefined'
&& SessionStorageUtils.get(Keys.memo_copyText) != undefined
&& SessionStorageUtils.get(Keys.memo_copyText) != ''
&& SessionStorageUtils.get(Keys.memo_copyText) != null
&& SessionStorageUtils.get(Keys.memo_copyText) != 'null') {
return JSON.parse(SessionStorageUtils.get(Keys.memo_copyText));
}
return null;
}
},
// Session
IsRefresh: function (data) {
if (arguments.length > 0) {
SessionStorageUtils.set(Keys.IsRefresh, JSON.stringify(data));
......@@ -1367,6 +1403,7 @@ var LocalStorageUtils = {
remove: function (strKey) {
var key = this.getUniqueId() + strKey;
avwUserSetting().remove(key);
SessionStorageUtils.remove(strKey);
},
clear: function () {
var localStorageKeys = avwUserSetting().keys();
......@@ -1377,6 +1414,20 @@ var LocalStorageUtils = {
avwUserSetting().remove(strKey);
}
}
},
existKey: function (strKey) {
var keys = avwUserSetting().keys();
var findKey = this.getUniqueId() + strKey;
var isExisted = false;
if (keys != null && keys != undefined) {
for (var nIndex = 0; nIndex < keys.length; nIndex++) {
if (keys[nIndex] == findKey) {
isExisted = true;
break;
}
}
}
return isExisted;
}
}
......
......@@ -4,17 +4,30 @@ var zoom_timer;
var zoom_continue = false;
var zoom_callbackFunction;
var zoom_miliSeconds = 1000; // Default is 1 second
var zoom_oldW = -1;
var zoom_oldH = -1;
function calculateZoomLevel() {
if (zoom_timer) {
clearTimeout(zoom_timer);
zoom_timer = null;
}
zoom_ratio = document.documentElement.clientWidth / window.innerWidth;
if (zoom_ratioPre != zoom_ratio) {
if (zoom_oldW == -1) {
zoom_oldW = document.documentElement.clientWidth;
}
if (zoom_oldH == -1) {
zoom_oldH = document.documentElement.clientWidth;
}
if (zoom_callbackFunction) {
zoom_callbackFunction(zoom_ratioPre, zoom_ratio);
zoom_callbackFunction(zoom_ratioPre, zoom_ratio, zoom_oldW, zoom_oldH, window.innerWidth, window.innerHeight);
}
alert(zoom_oldW);
zoom_ratioPre = zoom_ratio;
zoom_oldW = window.innerWidth;
zoom_oldH = window.innerHeight;
}
if (zoom_continue == true) {
zoom_timer = setTimeout("calculateZoomLevel();", zoom_miliSeconds);
......@@ -23,13 +36,13 @@ function calculateZoomLevel() {
function stopDetectZoom() {
zoom_continue = false;
}
function startDetectZoom(miliSeconds, callbackFunction) {
function startDetectZoom(params) {
zoom_continue = true;
if (callbackFunction) {
zoom_callbackFunction = callbackFunction;
if (params.callbackFunction) {
zoom_callbackFunction = params.callbackFunction;
}
if (miliSeconds) {
zoom_miliSeconds = miliSeconds;
if (params.time) {
zoom_miliSeconds = params.time;
}
zoom_timer = setTimeout("calculateZoomLevel();", zoom_miliSeconds);
}
\ No newline at end of file
......@@ -64,7 +64,7 @@
"dspBkCancel":"Logout",
"txtSearchResult":"Result",
"dspHome":"Home",
"txtLoginUser":"(Ver.20121212-1)User:",
"txtLoginUser":"(Ver.20121212-2)User:",
"txtAll":"All",
"txtMkgSize":"Size",
"txtMkgS":"S",
......@@ -114,5 +114,10 @@
"msgPageImgErr":"Unable to show contents. Maybe it was deleted at server. Back home and choose another content.",
"sysAppTitle":"ABook Viewer for Web",
"sysLockScrPwdInput":"Input password",
"txtOpt005":"Show alert when press F5.close tab.broswer."
"txtOpt005":"Show alert when press F5.close tab.broswer.",
"txtMemoMenu":"Edit memo",
"txtMemoNew":"New",
"txtMemoPaste":"Paste",
"txtMemoClear":"Clear",
"txtMemo":"Memo"
}
......@@ -64,7 +64,7 @@
"dspBkCancel":"バックアップせずにログアウト",
"txtSearchResult":"検索結果",
"dspHome":"ホーム",
"txtLoginUser":"(Ver.20121212-1)ログイン中:",
"txtLoginUser":"(Ver.20121212-2)ログイン中:",
"txtAll":"すべて",
"txtMkgSize":"太さ",
"txtMkgS":"小",
......@@ -114,5 +114,10 @@
"msgPageImgErr":"コンテンツを表示することができません。コンテンツが削除された可能性があります。ホーム画面に戻り、異なるコンテンツを選択してください。",
"sysAppTitle":"ABook閲覧ウェブ版",
"sysLockScrPwdInput":"パスワードを入力してください",
"txtOpt005":"タブ・ブラウザ終了・F5時のアラートが表示する"
"txtOpt005":"タブ・ブラウザ終了・F5時のアラートが表示する",
"txtMemoMenu":"メモ編集",
"txtMemoNew":"新規",
"txtMemoPaste":"貼り付け",
"txtMemoClear":"クリア",
"txtMemo":"メモ"
}
......@@ -64,7 +64,7 @@
"dspBkCancel":"로그아웃",
"txtSearchResult":"검색 결과",
"dspHome":"홈",
"txtLoginUser":"(Ver.20121212-1)로그인 중:",
"txtLoginUser":"(Ver.20121212-2)로그인 중:",
"txtAll":"전체",
"txtMkgSize":"두께",
"txtMkgS":"소",
......@@ -114,5 +114,10 @@
"msgPageImgErr":"컨텐츠를 표시할 수 없습니다. 이 컨텐츠는 삭제되었을 가능성이 있습니다.",
"sysAppTitle":"ABook : 멀티미디어 컨텐츠 플랫폼",
"sysLockScrPwdInput":"입력 암호",
"txtOpt005":"탭 브라우저 종료 · F5 때 경고가 표시"
"txtOpt005":"탭 브라우저 종료 · F5 때 경고가 표시",
"txtMemoMenu":"참고 편집",
"txtMemoNew":"신규",
"txtMemoPaste":"붙여 넣기",
"txtMemoClear":"클리어",
"txtMemo":"메모"
}
......@@ -94,6 +94,9 @@
var isOpenPopUpMemo = true;
var objEditMemo;
var isCopyMemo = false;
var isExistCopyMemo = false;
var posXPopupMemo = 0;
var posYPopupMemo = 0;
var contentName = '';
var nCountObjectLoad = 0;
var nAjaxLoad = 0;
......@@ -1088,14 +1091,13 @@
$('#imgmarking').addClass('marking_off');
}
}else{
/* fit page */
screenFit();
ClientData.IsAddingMarking(true);
ClientData.IsDisplayMarking(true);
ClientData.IsHideToolbar(false);
/* fit page */
screenFit();
/* show marking */
ShowMarking();
......@@ -3520,6 +3522,26 @@ function oldContent_Back(){
closeDialogPopUpText();
});
/* set position model when resize*/
function changePosDialog(){
$("#divDialogMemo").css('left','30%');
$("#divDialogMemo").css('top','30%');
$("#boxBookMark").css('left','40%');
$("#boxBookMark").css('top','40%');
$("#boxIndex").css('left','30%');
$("#boxIndex").css('top','30%');
$("#boxCopyText").css('left','30%');
$("#boxCopyText").css('top','30%');
$("#boxSearching").css('left','40%');
$("#boxSearching").css('top','40%');
$("#boxAddMemo").css('left','40%');
$("#boxAddMemo").css('top','40%');
}
$(document).ajaxComplete(function(){
/*Init Page */
......@@ -3566,12 +3588,9 @@ function oldContent_Back(){
$(window).resize(function() {
resizeScreen();
isChangeSizeScreen = false;
if(isTouchDevice() == true){
if (!$("#divDialogMemo").is(":hidden")) {
$("#divDialogMemo").css('left','30%');
$("#divDialogMemo").css('top','30%');
}
}
/* change position dialog */
changePosDialog()
/* close dialog popuptext */
closeDialogPopUpText();
......@@ -3728,6 +3747,20 @@ function oldContent_Back(){
</header>
<aside id="boxAddMemo" class="bookmarkBox" style="display: none;height:175px">
<h1 id="bookmarkBoxHdMemo" class="bookmarkBoxHd">
<a id="memoClosing" class="delete" > </a>
<label class="lang" lang = "txtMemoMenu" ></label>
</h1>
<ul id="divAddMemo" class="bookmarkBoxBody_on" style="height:151px">
<br />
<a id="liAddMemo" lang = "txtMemoNew" class="lang cancelbtn" style="margin-left:35px" > </a> <br />
<a id="liCopyMemo" lang = "txtMemoPaste" class="lang cancelbtn" style="margin-left:35px" > </a> <br />
<a id="liDeleteMemo" lang = "txtMemoClear" class="lang cancelbtn" style="margin-left:35px" > </a>
<br />
</ul>
</aside>
<div id="button_pre_canvas" class="gBackbtn">
......
......@@ -224,7 +224,7 @@ header{
width:100%;
height:60px;
position:fixed;
bottom:0%;
bottom: 0px;
}
......@@ -239,8 +239,8 @@ header{
width:100%;
height:60px;
position:absolute;
bottom:0%;
left: 0%;
bottom: 0px;
left: 0px;
}
.ftinner{
......@@ -768,7 +768,7 @@ aside.indexBox {
-webkit-box-shadow: 0px 0px 3px 1px #666;
-moz-box-shadow: 0px 0px 3px 1px #666;
box-shadow: 0px 0px 3px 1px #666;
position:absolute;
position:fixed;
left:700px;
}
aside.indexBox .indexBoxHd {
......@@ -850,7 +850,7 @@ aside.bookmarkBox {
-webkit-box-shadow: 0px 0px 3px 1px #666;
-moz-box-shadow: 0px 0px 3px 1px #666;
box-shadow: 0px 0px 3px 1px #666;
position:absolute;
position:fixed;
top:280px;
left:450px;
}
......

2.16 KB | W: | H:

2.76 KB | W: | H:

abvw/img/viewer/1.png
abvw/img/viewer/1.png
abvw/img/viewer/1.png
abvw/img/viewer/1.png
  • 2-up
  • Swipe
  • Onion skin

3.24 KB | W: | H:

6.95 KB | W: | H:

abvw/img/viewer/2.png
abvw/img/viewer/2.png
abvw/img/viewer/2.png
abvw/img/viewer/2.png
  • 2-up
  • Swipe
  • Onion skin

2.33 KB | W: | H:

2.36 KB | W: | H:

abvw/img/viewer/3.png
abvw/img/viewer/3.png
abvw/img/viewer/3.png
abvw/img/viewer/3.png
  • 2-up
  • Swipe
  • Onion skin

3.28 KB | W: | H:

3.27 KB | W: | H:

abvw/img/viewer/4.png
abvw/img/viewer/4.png
abvw/img/viewer/4.png
abvw/img/viewer/4.png
  • 2-up
  • Swipe
  • Onion skin

1.57 KB | W: | H:

1.51 KB | W: | H:

abvw/img/viewer/5.png
abvw/img/viewer/5.png
abvw/img/viewer/5.png
abvw/img/viewer/5.png
  • 2-up
  • Swipe
  • Onion skin

2.78 KB | W: | H:

2.78 KB | W: | H:

abvw/img/viewer/6.png
abvw/img/viewer/6.png
abvw/img/viewer/6.png
abvw/img/viewer/6.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -1129,11 +1129,12 @@ function onClick_CanvasMain(event){
//change coordinates
var imagePt = screenToImage(event.pageX, event.pageY);
var canvasWidth = $('#offscreen').width();
posXPopupMemo = event.pageX;
posYPopupMemo = event.pageY;
if((event.pageX - marginX) >= destRect.left && (event.pageX - marginX) <= destRect.right){
if(isCopyMemo == true){
CopyMemo(objEditMemo.id,contentID,changePageIndex(getPageIndex()),$('#divDialogMemo'),event.pageX,event.pageY,function(){
CopyMemo(objEditMemo.text,contentID,changePageIndex(getPageIndex()),$('#divDialogMemo'),event.pageX,event.pageY,function(){
//set flag change memo
ClientData.isChangedMemo(true);
......@@ -1144,6 +1145,8 @@ function onClick_CanvasMain(event){
}else{
/* click add memo */
if(ClientData.IsAddingMemo() == true){
if(!ClientData.memo_copyText()){
AddMemo(contentID,changePageIndex(getPageIndex()),$('#divDialogMemo'),event.pageX,event.pageY,function(){
//set flag change memo
ClientData.isChangedMemo(true);
......@@ -1157,6 +1160,14 @@ function onClick_CanvasMain(event){
$('#imgaddmemo').removeClass();
$('#imgaddmemo').addClass('memoAdd');
});
}else{
$("#overlay").show();
$('#boxAddMemo').css('z-index' , '101'); $('#boxAddMemo').css('display' , 'block');
$('#boxAddMemo').draggable({ handle: "h1" });
$("#boxAddMemo").offset({left:event.pageX,top:event.pageY});
$("#divAddMemo").show();
$("#divAddMemo").offset({left:event.pageX,top:(event.pageY + $('#bookmarkBoxHdMemo').height() - 2)});
}
}else{
......@@ -1174,6 +1185,7 @@ function onClick_CanvasMain(event){
/* click memo edit */
if (ClientData.IsDisplayMemo() == true){
getAllMemoOfPage();
/* check exist object memo in mouse position */
for(var nIndex = 0; nIndex < memoObjects.length; nIndex++){
var hitPageObjMemo = memoObjects[nIndex];
......@@ -1246,7 +1258,7 @@ function onClick_CanvasMain(event){
}
}
}else{
if(ClientData.IsAddingMarking() == false){
if(ClientData.IsAddingMarking() == false && isCopyMemo == false){
var cwMain = $('#main').width();
if(event.pageX > 0 && event.pageX < 300){
prevPage_click();
......@@ -1426,6 +1438,7 @@ function mouseUp_CanvasMain(event){
/* View Component setDefaultEvent */
function setDefaultEvent() {
document.getElementById('main').addEventListener('click',onClick_CanvasMain,false);
document.getElementById('divCheckExistMarking').addEventListener('click',onClick_CanvasMain,false);
if(isTouchDevice() == true){
document.getElementById('main').addEventListener('touchstart',mouseDown_CanvasMain,false);
document.getElementById('main').addEventListener('touchmove',mouseMove_canvasMain,false);
......@@ -1435,6 +1448,10 @@ function setDefaultEvent() {
document.getElementById('main').addEventListener('mousemove',mouseMove_canvasMain,false);
document.getElementById('main').addEventListener('mouseup',mouseUp_CanvasMain,false);
document.getElementById('divCheckExistMarking').addEventListener('mousedown',mouseDown_CanvasMain,false);
document.getElementById('divCheckExistMarking').addEventListener('mousemove',mouseMove_canvasMain,false);
document.getElementById('divCheckExistMarking').addEventListener('mouseup',mouseUp_CanvasMain,false);
$('#main').mouseout(function(event) {
if(moveFlag) {
moveFlag = false;
......@@ -1827,9 +1844,9 @@ function drawMemoOnScreen(){
if(memoData[nIndex].posX > widthEachPage - 50){
memoData[nIndex].posX = widthEachPage - 50;
}
memoObject = new memo(
nIndex,
memoData[nIndex].Text,
memoData[nIndex].posX,
memoData[nIndex].posY,
50,
......@@ -1844,6 +1861,43 @@ function drawMemoOnScreen(){
}
}
/* get all memo on page */
function getAllMemoOfPage(){
if(ClientData.IsDisplayMemo() == true){
memoObjects = [];
/*get data memo */
var memoData = ClientData.MemoData();
for(var nIndex = 0; nIndex < memoData.length; nIndex++){
if(memoData[nIndex].contentid == contentID
&& memoData[nIndex].pageNo == changePageIndex(getPageIndex())){
/* create object of memo */
var memoObject = null;
if(memoData[nIndex].posY > heightEachPage - 50){
memoData[nIndex].posY = heightEachPage - 50;
}
if(memoData[nIndex].posX > widthEachPage - 50){
memoData[nIndex].posX = widthEachPage - 50;
}
memoObject = new memo(
nIndex,
memoData[nIndex].Text,
memoData[nIndex].posX,
memoData[nIndex].posY,
50,
50,
"img/memo.png"
)
memoObjects.push(memoObject);
}
}
}
}
/* draw webGetContent4 */
function drawGetWebContent4(context){
webGetContentType4Objects = [];
......@@ -1947,11 +2001,15 @@ function initImageCheckMarking(){
}
/* init image display or not */
if(ClientData.IsAddingMarking() == true){
$('#divCheckExistMarking').hide();
}else{
if(isExistMarking == true){
$('#divCheckExistMarking').show();
}else{
$('#divCheckExistMarking').hide();
}
}
}
......@@ -2225,8 +2283,13 @@ var openPopUp = function(mediaType, actionType, id, imageUrl, x, y, w, h, visibl
this.action = function() {
isOpenPopUpText = true;
var pt1 = imageToScreen(x, y + h/2);
if(userScale > 1){
OpenPopupText(posXPopupMemo, posYPopupMemo, content, $('#dialogPopUp'), $('#arrow'));
}else{
OpenPopupText(pt1.x, pt1.y, content, $('#dialogPopUp'), $('#arrow'));
}
}
};
openPopUp.prototype = new PageObject();
......@@ -2497,6 +2560,7 @@ function createAudio(audio,type){
}else{
if(ClientData.userOpt_musicMode() == "1"){
if(avwUserEnvObj.browser == 'firefox'){
$('#playaudioallpage').html(
' <embed id="play_audio_1" src="' + audio + '&key=' + (new Date()).toIdString() + '" autostart="true" loop="true" hidden="true"> </embed>'
);
......@@ -2727,6 +2791,7 @@ function sizingNotFull(width, height) {
/* move image check marking*/
$('#divCheckExistMarking').css('top','70px');
$('#divCheckExistMarking').show();
};
/* Adjust Component size */
......@@ -2753,6 +2818,11 @@ function sizingFullSize(width, height) {
/* move image check marking*/
$('#divCheckExistMarking').css('top','5px');
if(ClientData.IsAddingMarking() == true){
$('#divCheckExistMarking').hide();
}else{
$('#divCheckExistMarking').show();
}
};
/* zoom video */
......@@ -3000,9 +3070,9 @@ function changeScale(scale) {
var sw = offScreen.width, sh = offScreen.height;
var width = offscreen.width;
var height = offscreen.height;
var aspect = offscreen.width / offscreen.height;
var width = offScreen.width;
var height = offScreen.height;
var aspect = offScreen.width / offScreen.height;
if(canvas.width > canvas.height) {
height = canvas.height;
width = height * aspect;
......@@ -3096,12 +3166,13 @@ function encode(data) {
var memoObjects =[];
/* constructor */
var MemoObject = function(id,x,y,width,heigth,imageUrl,action) {
var MemoObject = function(id,text,x,y,width,heigth,imageUrl,action) {
};
/* setup each properties */
MemoObject.prototype.setup = function(id,x,y,w,h,imageUrl) {
MemoObject.prototype.setup = function(id,text,x,y,w,h,imageUrl) {
this.text = text;
this.id = id;
this.x = x;
this.y = y;
......@@ -3137,8 +3208,8 @@ MemoObject.prototype.drawMemo = function(context) {
};
/* create memo object */
var memo = function(id,x, y, w, h,imageUrl) {
this.setup(id,x, y, w, h,imageUrl);
var memo = function(id,text,x, y, w, h,imageUrl) {
this.setup(id,text,x, y, w, h,imageUrl);
this.action = function() {
EditMemo(id, 0, 0, $('#divDialogMemo'), function() {
/*set flag change memo */
......@@ -3157,6 +3228,7 @@ function showEditMemo(){
/*click copyMemo() */
function copyMemo(){
isCopyMemo = true;
ClientData.memo_copyText(objEditMemo.text);
disableControlsCopyMemo();
$("#pop_up_memo").hide();
}
......@@ -3269,11 +3341,76 @@ function imgHome_click(e) {
avwScreenMove(ScreenIds.Home);
}
function closePopUpCopyMemo(){
$('#boxAddMemo').hide();
//ClientData.memo_copyText(null);
ClientData.IsAddingMemo(false);
/* unlock dialog overlay */
$("#overlay").hide();
//change class
$('#imgaddmemo').removeClass();
$('#imgaddmemo').addClass('memoAdd');
}
function click_liAddMemo(event){
AddMemo(contentID,changePageIndex(getPageIndex()),$('#divDialogMemo'),posXPopupMemo,posYPopupMemo,function(){
//set flag change memo
ClientData.isChangedMemo(true);
ClientData.IsAddingMemo(false);
/* refresh draw memo */
drawMemoOnScreen();
//change image
$('#imgaddmemo').removeClass();
$('#imgaddmemo').addClass('memoAdd');
});
$('#boxAddMemo').hide();
//ClientData.memo_copyText(null);
ClientData.IsAddingMemo(false);
}
function click_liCopyMemo(){
CopyMemo(ClientData.memo_copyText(),contentID,changePageIndex(getPageIndex()),$('#divDialogMemo'),posXPopupMemo,posYPopupMemo,function(){
//set flag change memo
ClientData.isChangedMemo(true);
/* refresh draw memo */
drawMemoOnScreen();
});
$('#boxAddMemo').hide();
//ClientData.memo_copyText(null);
ClientData.IsAddingMemo(false);
}
function click_liDeleteMemo(){
$('#boxAddMemo').hide();
ClientData.memo_copyText(null);
ClientData.IsAddingMemo(false);
/* unlock dialog overlay */
$("#overlay").hide();
//change class
$('#imgaddmemo').removeClass();
$('#imgaddmemo').addClass('memoAdd');
}
$(function () {
$("#imgBack").click(imgBack_click);
$("#imgHome").click(imgHome_click);
$("#btn_show_memo").click(showEditMemo);
$("#btn_copy_memo").click(copyMemo);
$('#memoClosing').click(closePopUpCopyMemo);
$('#liAddMemo').click(click_liAddMemo);
$('#liCopyMemo').click(click_liCopyMemo);
$('#liDeleteMemo').click(click_liDeleteMemo);
if (avwUserEnvObj.os == 'ipad') {
......
......@@ -13,15 +13,15 @@ function createMemoDialog(){
targetDiv.html('');
targetDiv.append(
'<aside id="memoWrapper" class="MemoIndexBox">'
+' <h1 class="indexBoxHd">Memo'
+ ' <h1 class="indexBoxHd">' + i18nText('txtMemo')
+' <a class="delete"></a>'
+' </h1>'
+' <div id="memoArea" class="indexBoxBody_on">'
+' <textarea id="txaMemoContent" style="resize: none; height: 302px; width: 452px; margin-bottom: 10px"></textarea>'
+' <div style="width: 450px;">'
+' <a id="Memo_btnCancel" style="float:right" class="lang cancelbtn" lang="">キャンセル</a>'
+' <a id="Memo_btnDel" style="float:right" class="lang cancelbtn" lang="">削除</a>'
+' <a id="Memo_btnSave" style="float:right" class="lang cancelbtn" lang="">保存</a>'
+ ' <a id="Memo_btnCancel" style="float:right" class="lang cancelbtn" lang="dspCancel">' + i18nText('dspCancel') + '</a>'
+ ' <a id="Memo_btnDel" style="float:right" class="lang cancelbtn" lang="dspDelete">' + i18nText('dspDelete') + '</a>'
+ ' <a id="Memo_btnSave" style="float:right" class="lang cancelbtn" lang="dspSave">' + i18nText('dspSave') + '</a>'
+' </div>'
+' </div>'
+'</aside>');
......@@ -171,7 +171,8 @@ function CopyMemo(index,contentId,pageNo,targetId, posX, posY, callback){
memoCallbackFunc = callback;
createMemoDialog();
getMemoForEdit();
//getMemoForEdit();
$('#txaMemoContent').val(index);
saveMode = 'Copy';
$('#Memo_btnDel').css('display','none');
//targetDiv.dialog({width: 466, height: 390, modal: true, position: [targetX, targetY], resizable: false});
......
......@@ -43,6 +43,7 @@ var totalPage;
var existContent = [];
var isSubMenuHoverOn = false;
var home_isMove = false;
var isShowBookShelf = null;
//==========================================================
$(document).ready(function () {
......@@ -165,19 +166,21 @@ function handleTreeViewDisp(){
//Change Display BookShelf Function
function changeDispBookShelfFunction(){
if(ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_List){
ClientData.sortOpt_viewMode(Consts.ConstDisplayMode_BookShelf);
if(ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_List || isShowBookShelf == false){
//ClientData.sortOpt_viewMode(Consts.ConstDisplayMode_BookShelf);
isShowBookShelf = true;
var recordFrom = 0;
var recordTo = 0;
if(ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_BookShelf){
// if(ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_BookShelf){ if(isShowBookShelf) {
recordFrom = DEFAULT_DISP_NUMBER_RECORD_FROM;
recordTo = ClientData.searchCond_recordTo();
}
//refresh sort order
refreshSortTypeOrder();
var id = ClientData.userInfo_sid();
var searchText = ClientData.searchCond_searchText();
var searchDivision = ClientData.searchCond_searchDivision();
......@@ -204,14 +207,15 @@ function changeDispBookShelfFunction(){
//Change Display List Function
function changeDispListFunction(){
if(ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_BookShelf || ClientData.sortOpt_viewMode() == null || ClientData.sortOpt_viewMode() == 'undefined'){
ClientData.sortOpt_viewMode(Consts.ConstDisplayMode_List);
if(ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_BookShelf || ClientData.sortOpt_viewMode() == null || ClientData.sortOpt_viewMode() == 'undefined' || isShowBookShelf == true){
//ClientData.sortOpt_viewMode(Consts.ConstDisplayMode_List);
isShowBookShelf = false;
var recordFrom = 0;
var recordTo = 0;
//Check VIewmode
if(ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_List){
// if(ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_List){ if (!isShowBookShelf) {
recordFrom = DEFAULT_DISP_NUMBER_RECORD_FROM;
recordTo = ClientData.searchCond_recordTo();
}
......@@ -1351,6 +1355,7 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
var outputDate = formatDeliveryDate(post.contentDeliveryDate);
if (isShowBookShelf == null){
if (ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_BookShelf) {
$('#content-grid').append(
'<section class="sectionhomebookshelf" id="bookshelf' + post.contentId + '">'
......@@ -1373,6 +1378,7 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
getNextRecordNumForBookShelf();
}
// else if (ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_List) {
else if (ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_List) {
$('#content-grid').append(
'<section class="sectionhomelist">'
......@@ -1423,6 +1429,81 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
// getNextRecordNumForBookShelf();
}
}else{
// if (ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_BookShelf) { if (isShowBookShelf) {
$('#content-grid').append(
'<section class="sectionhomebookshelf" id="bookshelf' + post.contentId + '">'
+ ' <div class="cnt_section_bookshelf">'
+ ' <div class="img">'
+ ' <canvas height="170px" width="170px" id="content-thumbnail' + post.contentId + '" contentid="' + post.contentId + '" style="display:none;">'
+ ' </canvas>'
+ ' </div>'
+ ' <img id="loadingIcon' + post.contentId + '" src="./img/data_loading.gif" height="25px" width="25px" style="padding: 86px; "/>'
+ ' </div>'
+ ' <a id="title' + post.contentId + '" class="dialog name lang" lang="lblTitle" contentid="' + post.contentId + '">' + truncate(htmlEncode(post.contentTitle), 20) + '</a>'
+ '</section>'
);
if (i == (eval(countCnt) + 2)) {
$('#bookshelf' + post.contentId).addClass('no_m_right');
countCnt = i + 1;
}
getNextRecordNumForBookShelf();
}
// else if (ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_List) { else if (!isShowBookShelf) {
$('#content-grid').append(
'<section class="sectionhomelist">'
+ ' <div class="cnt_section_list">'
+ ' <a class="img">'
+ ' <canvas height="105px" width="150px" id="content-thumbnail' + post.contentId + '" contentid="' + post.contentId + '" style="display:none;">'
+ ' </canvas>'
+ ' <img id="loadingIcon' + post.contentId + '" src="./img/data_loading.gif" height="25px" width="25px" style="padding: 46px; "/>'
+ ' </a>'
+ ' <div class="text">'
+ ' <a id="title' + post.contentId + '" class="name dialog" contentid="' + post.contentId + '">' + truncate(htmlEncode(post.contentTitle), 20) + '</a>'
+ ' <div class="info">'
+ ' <ul class="date">'
+ ' <li><span class="lang" lang="txtPubDt"> </span> : ' + outputDate + '</li>'
+ ' <li><span class="lang" lang="txtViewDt"> </span>:<span id="lblVdate' + post.contentId + '"> </span></li>'
+ ' </ul>'
+ ' <ul class="pic">'
+ ' <li><img src="' + DEFAULT_IMG_OPTION_MEMO + '" id="imgMemo' + post.contentId + '" class="sticker" /></li>'
+ ' <li><img src="' + DEFAULT_IMG_OPTION_MARKING + '" id="imgBookMark' + post.contentId + '" class="pen" /></li>'
+ ' <li><a class="read lang button-details" contentid="' + post.contentId + '" lang="txtRead">読む</a></li>'
+ ' </ul>'
+ ' </div>'
+ ' </div>'
+ ' </div>'
+ '</section>'
);
getNextRecordNumForList();
}
else {
alert('ok');
// $('#content-grid').append(
// '<section class="sectionhomebookshelf">'
// + ' <div class="cnt_section_bookshelf">'
// + ' <div class="img">'
// + ' <canvas height="170px" width="170px" id="content-thumbnail' + post.contentId + '" contentid="' + post.contentId + '">'
// + ' </canvas>'
// + ' </div>'
// + ' </div>'
// + ' <a id="title' + post.contentId + '" class="dialog name lang" lang="lblTitle" contentid="' + post.contentId + '">' + truncate(htmlEncode(post.contentTitle), 20) + '</a>'
// + '</section>'
// );
// if (i == (eval(countCnt) + 2)) {
// $('#bookshelf' + post.contentId).addClass('no_m_right');
// countCnt = i;
// }
// getNextRecordNumForBookShelf();
}
}
//assign thumbnail to array
arrayTemp.push({ contentId: post.contentId, thumbnail: formatStringBase64(post.contentThumbnail) });
......
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