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
......@@ -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