Commit fcb38d18 by Motohisa Nakano

20121212

parent 36ae37cf
...@@ -3,6 +3,7 @@ DirectoryIndex login.html index.html ...@@ -3,6 +3,7 @@ DirectoryIndex login.html index.html
# mimetype # mimetype
AddType image/svg+xml .svg AddType image/svg+xml .svg
AddType video/mp4 .mov
# favicon # favicon
AddType image/x-icon .ico AddType image/x-icon .ico
......
...@@ -274,7 +274,9 @@ var Keys = { ...@@ -274,7 +274,9 @@ var Keys = {
// Local :メモデータ(memo)_コンテンツID:Interger // Local :メモデータ(memo)_コンテンツID:Interger
memo_contentNo: 'memo_contentNo', memo_contentNo: 'memo_contentNo',
// Local :メモデータ(memo)_ページNo:Interger // 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) { ...@@ -433,7 +435,17 @@ function restoreData(jsonString) {
return data; 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) { function operateData(args, strKey, returnDefaultData) {
if (args.length > 0) { if (args.length > 0) {
...@@ -442,19 +454,28 @@ function operateData(args, strKey, returnDefaultData) { ...@@ -442,19 +454,28 @@ function operateData(args, strKey, returnDefaultData) {
SessionStorageUtils.set(strKey, JSON.stringify(data)); SessionStorageUtils.set(strKey, JSON.stringify(data));
} else { } else {
if (SessionStorageUtils.get(strKey) != 'undefined' if (SessionStorageUtils.get(strKey) != 'undefined'
&& SessionStorageUtils.get(strKey) != undefined && SessionStorageUtils.get(strKey) != undefined
&& SessionStorageUtils.get(strKey) != '' && SessionStorageUtils.get(strKey) != ''
&& SessionStorageUtils.get(strKey) != null && SessionStorageUtils.get(strKey) != null
&& SessionStorageUtils.get(strKey) != 'null') { && SessionStorageUtils.get(strKey) != 'null') {
return JSON.parse(SessionStorageUtils.get(strKey)); if (LocalStorageUtils.existKey(strKey) == true) {
return JSON.parse(SessionStorageUtils.get(strKey));
}
else {
return returnDefaultData;
}
} }
else { 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))); SessionStorageUtils.set(strKey, JSON.stringify(LocalStorageUtils.get(strKey)));
if (SessionStorageUtils.get(strKey) != 'undefined' if (SessionStorageUtils.get(strKey) != 'undefined'
&& SessionStorageUtils.get(strKey) != undefined && SessionStorageUtils.get(strKey) != undefined
&& SessionStorageUtils.get(strKey) != '' && SessionStorageUtils.get(strKey) != ''
&& SessionStorageUtils.get(strKey) != null && SessionStorageUtils.get(strKey) != null
&& SessionStorageUtils.get(strKey) != 'null') { && SessionStorageUtils.get(strKey) != 'null') {
return JSON.parse(SessionStorageUtils.get(strKey)); return JSON.parse(SessionStorageUtils.get(strKey));
} }
return returnDefaultData; return returnDefaultData;
...@@ -495,7 +516,7 @@ var ClientData = { ...@@ -495,7 +516,7 @@ var ClientData = {
return avwUserSetting().get(Keys.userInfo_rememberLogin); return avwUserSetting().get(Keys.userInfo_rememberLogin);
} }
}, },
// Local // Local
JumpQueue: function (data) { JumpQueue: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
...@@ -634,7 +655,7 @@ var ClientData = { ...@@ -634,7 +655,7 @@ var ClientData = {
return operateData(arguments, Keys.IsDisplayMemo, undefined); return operateData(arguments, Keys.IsDisplayMemo, undefined);
} }
}, },
// Local // Local
MarkingType: function (data) { MarkingType: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
...@@ -913,6 +934,21 @@ var ClientData = { ...@@ -913,6 +934,21 @@ var ClientData = {
} }
}, },
// Session // 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) { IsRefresh: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
SessionStorageUtils.set(Keys.IsRefresh, JSON.stringify(data)); SessionStorageUtils.set(Keys.IsRefresh, JSON.stringify(data));
...@@ -1352,7 +1388,7 @@ var LocalStorageUtils = { ...@@ -1352,7 +1388,7 @@ var LocalStorageUtils = {
if (uniqueId != "") { if (uniqueId != "") {
uniqueId += "."; uniqueId += ".";
} }
return uniqueId; return uniqueId;
}, },
get: function (strKey) { get: function (strKey) {
...@@ -1367,6 +1403,7 @@ var LocalStorageUtils = { ...@@ -1367,6 +1403,7 @@ var LocalStorageUtils = {
remove: function (strKey) { remove: function (strKey) {
var key = this.getUniqueId() + strKey; var key = this.getUniqueId() + strKey;
avwUserSetting().remove(key); avwUserSetting().remove(key);
SessionStorageUtils.remove(strKey);
}, },
clear: function () { clear: function () {
var localStorageKeys = avwUserSetting().keys(); var localStorageKeys = avwUserSetting().keys();
...@@ -1377,6 +1414,20 @@ var LocalStorageUtils = { ...@@ -1377,6 +1414,20 @@ var LocalStorageUtils = {
avwUserSetting().remove(strKey); 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; ...@@ -4,17 +4,30 @@ var zoom_timer;
var zoom_continue = false; var zoom_continue = false;
var zoom_callbackFunction; var zoom_callbackFunction;
var zoom_miliSeconds = 1000; // Default is 1 second var zoom_miliSeconds = 1000; // Default is 1 second
var zoom_oldW = -1;
var zoom_oldH = -1;
function calculateZoomLevel() { function calculateZoomLevel() {
if (zoom_timer) { if (zoom_timer) {
clearTimeout(zoom_timer); clearTimeout(zoom_timer);
zoom_timer = null; zoom_timer = null;
} }
zoom_ratio = document.documentElement.clientWidth / window.innerWidth; zoom_ratio = document.documentElement.clientWidth / window.innerWidth;
if (zoom_ratioPre != zoom_ratio) { 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) { 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_ratioPre = zoom_ratio;
zoom_oldW = window.innerWidth;
zoom_oldH = window.innerHeight;
} }
if (zoom_continue == true) { if (zoom_continue == true) {
zoom_timer = setTimeout("calculateZoomLevel();", zoom_miliSeconds); zoom_timer = setTimeout("calculateZoomLevel();", zoom_miliSeconds);
...@@ -23,13 +36,13 @@ function calculateZoomLevel() { ...@@ -23,13 +36,13 @@ function calculateZoomLevel() {
function stopDetectZoom() { function stopDetectZoom() {
zoom_continue = false; zoom_continue = false;
} }
function startDetectZoom(miliSeconds, callbackFunction) { function startDetectZoom(params) {
zoom_continue = true; zoom_continue = true;
if (callbackFunction) { if (params.callbackFunction) {
zoom_callbackFunction = callbackFunction; zoom_callbackFunction = params.callbackFunction;
} }
if (miliSeconds) { if (params.time) {
zoom_miliSeconds = miliSeconds; zoom_miliSeconds = params.time;
} }
zoom_timer = setTimeout("calculateZoomLevel();", zoom_miliSeconds); zoom_timer = setTimeout("calculateZoomLevel();", zoom_miliSeconds);
} }
\ No newline at end of file
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
"dspBkCancel":"Logout", "dspBkCancel":"Logout",
"txtSearchResult":"Result", "txtSearchResult":"Result",
"dspHome":"Home", "dspHome":"Home",
"txtLoginUser":"(Ver.20121212-1)User:", "txtLoginUser":"(Ver.20121212-2)User:",
"txtAll":"All", "txtAll":"All",
"txtMkgSize":"Size", "txtMkgSize":"Size",
"txtMkgS":"S", "txtMkgS":"S",
...@@ -114,5 +114,10 @@ ...@@ -114,5 +114,10 @@
"msgPageImgErr":"Unable to show contents. Maybe it was deleted at server. Back home and choose another content.", "msgPageImgErr":"Unable to show contents. Maybe it was deleted at server. Back home and choose another content.",
"sysAppTitle":"ABook Viewer for Web", "sysAppTitle":"ABook Viewer for Web",
"sysLockScrPwdInput":"Input password", "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 @@ ...@@ -64,7 +64,7 @@
"dspBkCancel":"バックアップせずにログアウト", "dspBkCancel":"バックアップせずにログアウト",
"txtSearchResult":"検索結果", "txtSearchResult":"検索結果",
"dspHome":"ホーム", "dspHome":"ホーム",
"txtLoginUser":"(Ver.20121212-1)ログイン中:", "txtLoginUser":"(Ver.20121212-2)ログイン中:",
"txtAll":"すべて", "txtAll":"すべて",
"txtMkgSize":"太さ", "txtMkgSize":"太さ",
"txtMkgS":"小", "txtMkgS":"小",
...@@ -114,5 +114,10 @@ ...@@ -114,5 +114,10 @@
"msgPageImgErr":"コンテンツを表示することができません。コンテンツが削除された可能性があります。ホーム画面に戻り、異なるコンテンツを選択してください。", "msgPageImgErr":"コンテンツを表示することができません。コンテンツが削除された可能性があります。ホーム画面に戻り、異なるコンテンツを選択してください。",
"sysAppTitle":"ABook閲覧ウェブ版", "sysAppTitle":"ABook閲覧ウェブ版",
"sysLockScrPwdInput":"パスワードを入力してください", "sysLockScrPwdInput":"パスワードを入力してください",
"txtOpt005":"タブ・ブラウザ終了・F5時のアラートが表示する" "txtOpt005":"タブ・ブラウザ終了・F5時のアラートが表示する",
"txtMemoMenu":"メモ編集",
"txtMemoNew":"新規",
"txtMemoPaste":"貼り付け",
"txtMemoClear":"クリア",
"txtMemo":"メモ"
} }
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
"dspBkCancel":"로그아웃", "dspBkCancel":"로그아웃",
"txtSearchResult":"검색 결과", "txtSearchResult":"검색 결과",
"dspHome":"홈", "dspHome":"홈",
"txtLoginUser":"(Ver.20121212-1)로그인 중:", "txtLoginUser":"(Ver.20121212-2)로그인 중:",
"txtAll":"전체", "txtAll":"전체",
"txtMkgSize":"두께", "txtMkgSize":"두께",
"txtMkgS":"소", "txtMkgS":"소",
...@@ -114,5 +114,10 @@ ...@@ -114,5 +114,10 @@
"msgPageImgErr":"컨텐츠를 표시할 수 없습니다. 이 컨텐츠는 삭제되었을 가능성이 있습니다.", "msgPageImgErr":"컨텐츠를 표시할 수 없습니다. 이 컨텐츠는 삭제되었을 가능성이 있습니다.",
"sysAppTitle":"ABook : 멀티미디어 컨텐츠 플랫폼", "sysAppTitle":"ABook : 멀티미디어 컨텐츠 플랫폼",
"sysLockScrPwdInput":"입력 암호", "sysLockScrPwdInput":"입력 암호",
"txtOpt005":"탭 브라우저 종료 · F5 때 경고가 표시" "txtOpt005":"탭 브라우저 종료 · F5 때 경고가 표시",
"txtMemoMenu":"참고 편집",
"txtMemoNew":"신규",
"txtMemoPaste":"붙여 넣기",
"txtMemoClear":"클리어",
"txtMemo":"메모"
} }
...@@ -94,6 +94,9 @@ ...@@ -94,6 +94,9 @@
var isOpenPopUpMemo = true; var isOpenPopUpMemo = true;
var objEditMemo; var objEditMemo;
var isCopyMemo = false; var isCopyMemo = false;
var isExistCopyMemo = false;
var posXPopupMemo = 0;
var posYPopupMemo = 0;
var contentName = ''; var contentName = '';
var nCountObjectLoad = 0; var nCountObjectLoad = 0;
var nAjaxLoad = 0; var nAjaxLoad = 0;
...@@ -1088,13 +1091,12 @@ ...@@ -1088,13 +1091,12 @@
$('#imgmarking').addClass('marking_off'); $('#imgmarking').addClass('marking_off');
} }
}else{ }else{
/* fit page */
screenFit();
ClientData.IsAddingMarking(true); ClientData.IsAddingMarking(true);
ClientData.IsDisplayMarking(true); ClientData.IsDisplayMarking(true);
ClientData.IsHideToolbar(false); ClientData.IsHideToolbar(false);
/* fit page */
screenFit();
/* show marking */ /* show marking */
ShowMarking(); ShowMarking();
...@@ -3520,6 +3522,26 @@ function oldContent_Back(){ ...@@ -3520,6 +3522,26 @@ function oldContent_Back(){
closeDialogPopUpText(); 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(){ $(document).ajaxComplete(function(){
/*Init Page */ /*Init Page */
...@@ -3565,13 +3587,10 @@ function oldContent_Back(){ ...@@ -3565,13 +3587,10 @@ function oldContent_Back(){
/* window resize event */ /* window resize event */
$(window).resize(function() { $(window).resize(function() {
resizeScreen(); resizeScreen();
isChangeSizeScreen = false; isChangeSizeScreen = false;
if(isTouchDevice() == true){
if (!$("#divDialogMemo").is(":hidden")) { /* change position dialog */
$("#divDialogMemo").css('left','30%'); changePosDialog()
$("#divDialogMemo").css('top','30%');
}
}
/* close dialog popuptext */ /* close dialog popuptext */
closeDialogPopUpText(); closeDialogPopUpText();
...@@ -3728,6 +3747,20 @@ function oldContent_Back(){ ...@@ -3728,6 +3747,20 @@ function oldContent_Back(){
</header> </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"> <div id="button_pre_canvas" class="gBackbtn">
......
...@@ -224,7 +224,7 @@ header{ ...@@ -224,7 +224,7 @@ header{
width:100%; width:100%;
height:60px; height:60px;
position:fixed; position:fixed;
bottom:0%; bottom: 0px;
} }
...@@ -239,8 +239,8 @@ header{ ...@@ -239,8 +239,8 @@ header{
width:100%; width:100%;
height:60px; height:60px;
position:absolute; position:absolute;
bottom:0%; bottom: 0px;
left: 0%; left: 0px;
} }
.ftinner{ .ftinner{
...@@ -768,7 +768,7 @@ aside.indexBox { ...@@ -768,7 +768,7 @@ aside.indexBox {
-webkit-box-shadow: 0px 0px 3px 1px #666; -webkit-box-shadow: 0px 0px 3px 1px #666;
-moz-box-shadow: 0px 0px 3px 1px #666; -moz-box-shadow: 0px 0px 3px 1px #666;
box-shadow: 0px 0px 3px 1px #666; box-shadow: 0px 0px 3px 1px #666;
position:absolute; position:fixed;
left:700px; left:700px;
} }
aside.indexBox .indexBoxHd { aside.indexBox .indexBoxHd {
...@@ -850,7 +850,7 @@ aside.bookmarkBox { ...@@ -850,7 +850,7 @@ aside.bookmarkBox {
-webkit-box-shadow: 0px 0px 3px 1px #666; -webkit-box-shadow: 0px 0px 3px 1px #666;
-moz-box-shadow: 0px 0px 3px 1px #666; -moz-box-shadow: 0px 0px 3px 1px #666;
box-shadow: 0px 0px 3px 1px #666; box-shadow: 0px 0px 3px 1px #666;
position:absolute; position:fixed;
top:280px; top:280px;
left:450px; 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
...@@ -13,15 +13,15 @@ function createMemoDialog(){ ...@@ -13,15 +13,15 @@ function createMemoDialog(){
targetDiv.html(''); targetDiv.html('');
targetDiv.append( targetDiv.append(
'<aside id="memoWrapper" class="MemoIndexBox">' '<aside id="memoWrapper" class="MemoIndexBox">'
+' <h1 class="indexBoxHd">Memo' + ' <h1 class="indexBoxHd">' + i18nText('txtMemo')
+' <a class="delete"></a>' +' <a class="delete"></a>'
+' </h1>' +' </h1>'
+' <div id="memoArea" class="indexBoxBody_on">' +' <div id="memoArea" class="indexBoxBody_on">'
+' <textarea id="txaMemoContent" style="resize: none; height: 302px; width: 452px; margin-bottom: 10px"></textarea>' +' <textarea id="txaMemoContent" style="resize: none; height: 302px; width: 452px; margin-bottom: 10px"></textarea>'
+' <div style="width: 450px;">' +' <div style="width: 450px;">'
+' <a id="Memo_btnCancel" 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="">削除</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="">保存</a>' + ' <a id="Memo_btnSave" style="float:right" class="lang cancelbtn" lang="dspSave">' + i18nText('dspSave') + '</a>'
+' </div>' +' </div>'
+' </div>' +' </div>'
+'</aside>'); +'</aside>');
...@@ -171,7 +171,8 @@ function CopyMemo(index,contentId,pageNo,targetId, posX, posY, callback){ ...@@ -171,7 +171,8 @@ function CopyMemo(index,contentId,pageNo,targetId, posX, posY, callback){
memoCallbackFunc = callback; memoCallbackFunc = callback;
createMemoDialog(); createMemoDialog();
getMemoForEdit(); //getMemoForEdit();
$('#txaMemoContent').val(index);
saveMode = 'Copy'; saveMode = 'Copy';
$('#Memo_btnDel').css('display','none'); $('#Memo_btnDel').css('display','none');
//targetDiv.dialog({width: 466, height: 390, modal: true, position: [targetX, targetY], resizable: false}); //targetDiv.dialog({width: 466, height: 390, modal: true, position: [targetX, targetY], resizable: false});
......
...@@ -43,6 +43,7 @@ var totalPage; ...@@ -43,6 +43,7 @@ var totalPage;
var existContent = []; var existContent = [];
var isSubMenuHoverOn = false; var isSubMenuHoverOn = false;
var home_isMove = false; var home_isMove = false;
var isShowBookShelf = null;
//========================================================== //==========================================================
$(document).ready(function () { $(document).ready(function () {
...@@ -165,18 +166,20 @@ function handleTreeViewDisp(){ ...@@ -165,18 +166,20 @@ function handleTreeViewDisp(){
//Change Display BookShelf Function //Change Display BookShelf Function
function changeDispBookShelfFunction(){ function changeDispBookShelfFunction(){
if(ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_List){ if(ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_List || isShowBookShelf == false){
ClientData.sortOpt_viewMode(Consts.ConstDisplayMode_BookShelf); //ClientData.sortOpt_viewMode(Consts.ConstDisplayMode_BookShelf);
isShowBookShelf = true;
var recordFrom = 0; var recordFrom = 0;
var recordTo = 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; recordFrom = DEFAULT_DISP_NUMBER_RECORD_FROM;
recordTo = ClientData.searchCond_recordTo(); recordTo = ClientData.searchCond_recordTo();
} }
//refresh sort order //refresh sort order
refreshSortTypeOrder(); refreshSortTypeOrder();
var id = ClientData.userInfo_sid(); var id = ClientData.userInfo_sid();
var searchText = ClientData.searchCond_searchText(); var searchText = ClientData.searchCond_searchText();
...@@ -204,14 +207,15 @@ function changeDispBookShelfFunction(){ ...@@ -204,14 +207,15 @@ function changeDispBookShelfFunction(){
//Change Display List Function //Change Display List Function
function changeDispListFunction(){ function changeDispListFunction(){
if(ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_BookShelf || ClientData.sortOpt_viewMode() == null || ClientData.sortOpt_viewMode() == 'undefined'){ if(ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_BookShelf || ClientData.sortOpt_viewMode() == null || ClientData.sortOpt_viewMode() == 'undefined' || isShowBookShelf == true){
ClientData.sortOpt_viewMode(Consts.ConstDisplayMode_List); //ClientData.sortOpt_viewMode(Consts.ConstDisplayMode_List);
isShowBookShelf = false;
var recordFrom = 0; var recordFrom = 0;
var recordTo = 0; var recordTo = 0;
//Check VIewmode //Check VIewmode
if(ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_List){ // if(ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_List){ if (!isShowBookShelf) {
recordFrom = DEFAULT_DISP_NUMBER_RECORD_FROM; recordFrom = DEFAULT_DISP_NUMBER_RECORD_FROM;
recordTo = ClientData.searchCond_recordTo(); recordTo = ClientData.searchCond_recordTo();
} }
...@@ -1350,8 +1354,84 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid) ...@@ -1350,8 +1354,84 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
$.each(data.contentList, function (i, post) { $.each(data.contentList, function (i, post) {
var outputDate = formatDeliveryDate(post.contentDeliveryDate); var outputDate = formatDeliveryDate(post.contentDeliveryDate);
if (ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_BookShelf) { if (isShowBookShelf == null){
if (ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_BookShelf) {
$('#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 (ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_List) {
$('#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();
}
}else{
// if (ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_BookShelf) { if (isShowBookShelf) {
$('#content-grid').append( $('#content-grid').append(
'<section class="sectionhomebookshelf" id="bookshelf' + post.contentId + '">' '<section class="sectionhomebookshelf" id="bookshelf' + post.contentId + '">'
+ ' <div class="cnt_section_bookshelf">' + ' <div class="cnt_section_bookshelf">'
...@@ -1373,7 +1453,7 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid) ...@@ -1373,7 +1453,7 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
getNextRecordNumForBookShelf(); getNextRecordNumForBookShelf();
} }
else if (ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_List) { // else if (ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_List) { else if (!isShowBookShelf) {
$('#content-grid').append( $('#content-grid').append(
'<section class="sectionhomelist">' '<section class="sectionhomelist">'
+ ' <div class="cnt_section_list">' + ' <div class="cnt_section_list">'
...@@ -1423,6 +1503,7 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid) ...@@ -1423,6 +1503,7 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
// getNextRecordNumForBookShelf(); // getNextRecordNumForBookShelf();
} }
}
//assign thumbnail to array //assign thumbnail to array
arrayTemp.push({ contentId: post.contentId, thumbnail: formatStringBase64(post.contentThumbnail) }); 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