Commit bcb0622d by Motohisa Nakano

20121211-2

parent d7a9054c
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
<meta http-equiv="Cache-Control" content="no-cache"> <meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="-1"> <meta http-equiv="Expires" content="-1">
<link rel="stylesheet" type="text/css" href="./common/css/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="./common/css/jquery.toastmessage.css" />
<link type="text/css" rel="stylesheet" href="./common/css/screen.css"/> <link type="text/css" rel="stylesheet" href="./common/css/screen.css"/>
<link type="text/css" rel="stylesheet" href="css/common.css" /> <link type="text/css" rel="stylesheet" href="css/common.css" />
<link type="text/css" rel="stylesheet" href="css/list_shiori.css" /> <link type="text/css" rel="stylesheet" href="css/list_shiori.css" />
...@@ -19,9 +22,6 @@ ...@@ -19,9 +22,6 @@
<link type="text/css" rel="stylesheet" href="./common/css/screenLock.css"/> <link type="text/css" rel="stylesheet" href="./common/css/screenLock.css"/>
<link rel="stylesheet" type="text/css" href="./common/css/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="./common/css/jquery.toastmessage.css" />
<script src="./common/js/jquery-1.8.1.min.js"></script> <script src="./common/js/jquery-1.8.1.min.js"></script>
<script src="./common/js/jquery-ui-1.8.23.custom.min.js"></script> <script src="./common/js/jquery-ui-1.8.23.custom.min.js"></script>
<script src="./common/js/jquery.toastmessage.js"></script> <script src="./common/js/jquery.toastmessage.js"></script>
......
...@@ -17,5 +17,15 @@ ...@@ -17,5 +17,15 @@
margin: 8px auto; margin: 8px auto;
} }
#passwd-txt { #passwd-txt {
font-size: 12pt; font-size: 10pt;
width: 180px;
}
.ime-inactive
{
ime-mode: inactive;
}
.ime-disabled
{
ime-mode: disabled;
} }
\ No newline at end of file
...@@ -53,6 +53,26 @@ var Consts = { ...@@ -53,6 +53,26 @@ var Consts = {
ConstLockScreenTime: 60000 ConstLockScreenTime: 60000
} }
/*
Define short keys for content view
*/
var ShortKeys = {
// Move previous: arrow left <-
MovePrevious: 37,
// Move next: arrow right ->
MoveNext: 39,
// Zoom in: ","
ZoomIn: 188,
// Zoom out: "."
ZoomOut: 190,
// Fit: Enter
ZoomFit: 13,
// Show, hide toolbar: "["
ShowHideToolbar: 219,
// Show, hide marking: "]"
ShowHideMarking: 221
};
// ------------------------------------------------- // -------------------------------------------------
// Define all keys for local/session storage [start] // Define all keys for local/session storage [start]
// ------------------------------------------------- // -------------------------------------------------
...@@ -207,10 +227,6 @@ var Keys = { ...@@ -207,10 +227,6 @@ var Keys = {
searchCond_genreId: 'genreId', searchCond_genreId: 'genreId',
// Session :検索条件(searchCond)_グループID:Interger // Session :検索条件(searchCond)_グループID:Interger
searchCond_groupId: 'groupId', searchCond_groupId: 'groupId',
// Local :ユーザ情報(userInfo)_セッションID:String
//userInfo_sid: 'userInfo_sid',
// Local :マーキングツールバー(marking)_ツールデフォルト:Interger(ベン:1, マーカー:2, 消しゴム:3)
marking_defaultDsp: 'defaultDsp',
// Local :ペン書式設定(penOpt)_色:String // Local :ペン書式設定(penOpt)_色:String
penOpt_color: 'penOpt_color', penOpt_color: 'penOpt_color',
// Local :ペン書式設定(penOpt)_サイズ:Interger // Local :ペン書式設定(penOpt)_サイズ:Interger
...@@ -223,14 +239,6 @@ var Keys = { ...@@ -223,14 +239,6 @@ var Keys = {
erase_color: 'erase_color', erase_color: 'erase_color',
// Local :消しゴム書式設定(erase)_サイズ:Interger // Local :消しゴム書式設定(erase)_サイズ:Interger
erase_size: 'erase_size', erase_size: 'erase_size',
// Local :インデックスデータ(index)_目次ID:Interger(Number)
index_ID: 'index_ID',
// Local :インデックスデータ(index)_親の目次ID:Interger(Number)
index_parentID: 'index_parentID',
// Local :インデックスデータ(index)_目次名:String(String)
index_title: 'index_title',
// Local :インデックスデータ(index)_該当ページ:Interger(Number)
index_destPageNumber: 'index_destPageNumber',
// Local :ユーザ情報(userInfo)_ログインID:String // Local :ユーザ情報(userInfo)_ログインID:String
userInfo_loginId: 'loginId', userInfo_loginId: 'loginId',
// Local :ユーザ情報(userInfo)_アカウントパス:String // Local :ユーザ情報(userInfo)_アカウントパス:String
...@@ -241,31 +249,23 @@ var Keys = { ...@@ -241,31 +249,23 @@ var Keys = {
userInfo_lastLoginTime: 'lastLoginTime', userInfo_lastLoginTime: 'lastLoginTime',
// Local :ユーザ情報(userInfo)_パスワードスキップ日時:Datetime // Local :ユーザ情報(userInfo)_パスワードスキップ日時:Datetime
userInfo_pwdSkipDt: 'pwdSkipDt', userInfo_pwdSkipDt: 'pwdSkipDt',
// Local:ユーザオプション(userOpt)_初期表示画面モード(本棚/リスト):Interger(0:本棚, 1:リスト)
userOpt_homeMode: 'homeMode',
// Local :ユーザオプション(userOpt)_動画繰り返しフラグ:Interger(0: 繰り返しなし, 1: 繰り返しあり) // Local :ユーザオプション(userOpt)_動画繰り返しフラグ:Interger(0: 繰り返しなし, 1: 繰り返しあり)
userOpt_videoMode: 'videoMode', userOpt_videoMode: 'videoMode',
// Local :ユーザオプション(userOpt)_音楽繰り返しフラグ:Interger(0: 繰り返しなし, 1: 繰り返しあり) // Local :ユーザオプション(userOpt)_音楽繰り返しフラグ:Interger(0: 繰り返しなし, 1: 繰り返しあり)
userOpt_musicMode: 'musicMode', userOpt_musicMode: 'musicMode',
// Local :ユーザオプション(userOpt)_マーキング表示設定:Interger(0:表示しない, 1:表示する) // Local :ユーザオプション(userOpt)_マーキング表示設定:Interger(0:表示しない, 1:表示する)
userOpt_makingDsp: 'makingDsp', userOpt_makingDsp: 'makingDsp',
// Local :ユーザオプション(userOpt)_アラート表示設定:Interger(0:表示しない, 1:表示する)
userOpt_closeOrRefreshAlert: 'userOpt_closeOrRefreshAlert',
// Local :ユーザオプション(userOpt)_バックアップ確認フラグ:Interger(0:する, 1:しない) // Local :ユーザオプション(userOpt)_バックアップ確認フラグ:Interger(0:する, 1:しない)
userOpt_bkConfirmFlg: 'bkConfirmFlg', userOpt_bkConfirmFlg: 'bkConfirmFlg',
// Local :閲覧履歴(viewlog)_コンテンツID:Interger
viewlog_contentId: 'viewlog_contentId',
// Local :閲覧履歴(viewlog)_閲覧日:Datetime
viewlog_viewDt: 'viewDt',
// Local :閲覧履歴(viewlog)_メタ更新バージョン:Interger
viewlog_metaVersion: 'viewlog_metaVersion',
// Local :閲覧履歴(viewlog)_リソース更新バージョン:Interger
viewlog_resourceVersion: 'viewlog_resourceVersion',
// Local :並び順(sortOpt)_表示モード:Interger(0:本棚, 1:リスト) // Local :並び順(sortOpt)_表示モード:Interger(0:本棚, 1:リスト)
sortOpt_viewMode: 'viewMode', sortOpt_viewMode: 'viewMode',
// Local :並び順(sortOpt)_表示区分:Interger(0:ジャンル, 1:グループ) // Local :並び順(sortOpt)_表示区分:Interger(0:ジャンル, 1:グループ)
sortOpt_viewType: 'viewType', sortOpt_viewType: 'viewType',
// Local :並び順(sortOpt)_ソート基準:Interger(1:コンテンツ検索, 2:タグ検索, 3:全文検索) // Local :並び順(sortOpt)_ソート基準:Interger(1:コンテンツ検索, 2:タグ検索, 3:全文検索)
sortOpt_searchDivision: 'sortOpt_searchDivision', sortOpt_searchDivision: 'sortOpt_searchDivision',
// Local:並び順(sortOpt)_ソート方法:Interger(1:タイトル名, 2:タイトル名(かな), 3:公開順) // Local: 並び順(sortOpt)_ソート方法:Interger(1:タイトル名, 2:タイトル名(かな), 3:公開順)
sortOpt_sortType: 'sortOpt_sortType', sortOpt_sortType: 'sortOpt_sortType',
// Local :しおりデータ(bookmark)_コンテンツID:Interger // Local :しおりデータ(bookmark)_コンテンツID:Interger
bookmark_contentNo: 'bookmark_contentNo', bookmark_contentNo: 'bookmark_contentNo',
...@@ -274,20 +274,7 @@ var Keys = { ...@@ -274,20 +274,7 @@ 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)_位置X座標:Interger
memo_posX: 'posX',
// Local :メモデータ(memo)_位置Y座標:Interger
memo_posY: 'posY',
// Local :メモデータ(memo)_内容(テキスト):String
memo_Text: 'Text',
// Local :マーキングデータ(makingData)_コンテンツID:Interger
makingData_contentNo: 'makingData_contentNo',
// Local :マーキングデータ(makingData)_ページNo:Interger
makingData_pageNo: 'makingData_pageNo',
// Local :マーキングデータ(makingData)_内容(イメージオブジェクト):String
makingData_content: 'content'
/* -------------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------------- */
}; };
...@@ -722,16 +709,6 @@ var ClientData = { ...@@ -722,16 +709,6 @@ var ClientData = {
return operateData(arguments, Keys.common_prePageNo, undefined); return operateData(arguments, Keys.common_prePageNo, undefined);
} }
}, },
// Local :マーキングツールバー(marking)_ツールデフォルト:Interger(ベン:1, マーカー:2, 消しゴム:3)
marking_defaultDsp: function (data) {
if (arguments.length > 0) {
operateData(arguments, Keys.marking_defaultDsp, undefined);
}
else {
return operateData(arguments, Keys.marking_defaultDsp, undefined);
}
},
// Local :ペン書式設定(penOpt)_色:String // Local :ペン書式設定(penOpt)_色:String
penOpt_color: function (data) { penOpt_color: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
...@@ -791,47 +768,6 @@ var ClientData = { ...@@ -791,47 +768,6 @@ var ClientData = {
return operateData(arguments, Keys.erase_size, undefined); return operateData(arguments, Keys.erase_size, undefined);
} }
}, },
// Local :インデックスデータ(index)_目次ID:Interger(Number)
index_ID: function (data) {
if (arguments.length > 0) {
operateData(arguments, Keys.index_ID, undefined);
}
else {
return operateData(arguments, Keys.index_ID, undefined);
}
},
// Local :インデックスデータ(index)_親の目次ID:Interger(Number)
index_parentID: function (data) {
if (arguments.length > 0) {
operateData(arguments, Keys.index_parentID, undefined);
}
else {
return operateData(arguments, Keys.index_parentID, undefined);
}
},
// Local :インデックスデータ(index)_目次名:String(String)
index_title: function (data) {
if (arguments.length > 0) {
operateData(arguments, Keys.index_title, undefined);
}
else {
return operateData(arguments, Keys.index_title, undefined);
}
},
// Local :インデックスデータ(index)_該当ページ:Interger(Number)
index_destPageNumber: function (data) {
if (arguments.length > 0) {
operateData(arguments, Keys.index_destPageNumber, undefined);
}
else {
return operateData(arguments, Keys.index_destPageNumber, undefined);
}
},
// Local :ユーザ情報(userInfo)_最終ログイン日時:Datetime // Local :ユーザ情報(userInfo)_最終ログイン日時:Datetime
userInfo_lastLoginTime: function (data) { userInfo_lastLoginTime: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
...@@ -851,17 +787,6 @@ var ClientData = { ...@@ -851,17 +787,6 @@ var ClientData = {
return operateData(arguments, Keys.userInfo_pwdSkipDt, undefined); return operateData(arguments, Keys.userInfo_pwdSkipDt, undefined);
} }
}, },
// Local: ユーザオプション(userOpt)_初期表示画面モード(本棚/リスト):Interger(0:本棚, 1:リスト)
userOpt_homeMode: function (data) {
if (arguments.length > 0) {
operateData(arguments, Keys.userOpt_homeMode, undefined);
}
else {
return operateData(arguments, Keys.userOpt_homeMode, undefined);
}
},
// Local :ユーザオプション(userOpt)_動画繰り返しフラグ:Interger(0: 繰り返しなし, 1: 繰り返しあり) // Local :ユーザオプション(userOpt)_動画繰り返しフラグ:Interger(0: 繰り返しなし, 1: 繰り返しあり)
userOpt_videoMode: function (data) { userOpt_videoMode: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
...@@ -871,7 +796,6 @@ var ClientData = { ...@@ -871,7 +796,6 @@ var ClientData = {
return operateData(arguments, Keys.userOpt_videoMode, undefined); return operateData(arguments, Keys.userOpt_videoMode, undefined);
} }
}, },
// Local :ユーザオプション(userOpt)_音楽繰り返しフラグ:Interger(0: 繰り返しなし, 1: 繰り返しあり) // Local :ユーザオプション(userOpt)_音楽繰り返しフラグ:Interger(0: 繰り返しなし, 1: 繰り返しあり)
userOpt_musicMode: function (data) { userOpt_musicMode: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
...@@ -891,57 +815,24 @@ var ClientData = { ...@@ -891,57 +815,24 @@ var ClientData = {
return operateData(arguments, Keys.userOpt_makingDsp, undefined); return operateData(arguments, Keys.userOpt_makingDsp, undefined);
} }
}, },
// Local :ユーザオプション(userOpt)_アラート表示設定:Interger(0:表示しない, 1:表示する)
// Local :ユーザオプション(userOpt)_バックアップ確認フラグ:Interger(0:する, 1:しない) userOpt_closeOrRefreshAlert: function (data) {
userOpt_bkConfirmFlg: function (data) {
if (arguments.length > 0) {
operateData(arguments, Keys.userOpt_bkConfirmFlg, undefined);
}
else {
return operateData(arguments, Keys.userOpt_bkConfirmFlg, undefined);
}
},
// Local :閲覧履歴(viewlog)_コンテンツID:Interger
viewlog_contentId: function (data) {
if (arguments.length > 0) {
operateData(arguments, Keys.viewlog_contentId, undefined);
}
else {
return operateData(arguments, Keys.viewlog_contentId, undefined);
}
},
// Local :閲覧履歴(viewlog)_閲覧日:Datetime
viewlog_viewDt: function (data) {
if (arguments.length > 0) {
operateData(arguments, Keys.viewlog_viewDt, undefined);
}
else {
return operateData(arguments, Keys.viewlog_viewDt, undefined);
}
},
// Local :閲覧履歴(viewlog)_メタ更新バージョン:Interger
viewlog_metaVersion: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.viewlog_metaVersion, undefined); operateData(arguments, Keys.userOpt_closeOrRefreshAlert, undefined);
} }
else { else {
return operateData(arguments, Keys.viewlog_metaVersion, undefined); return operateData(arguments, Keys.userOpt_closeOrRefreshAlert, undefined);
} }
}, },
// Local :ユーザオプション(userOpt)_バックアップ確認フラグ:Interger(0:する, 1:しない)
// Local :閲覧履歴(viewlog)_リソース更新バージョン:Interger userOpt_bkConfirmFlg: function (data) {
viewlog_resourceVersion: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.viewlog_resourceVersion, undefined); operateData(arguments, Keys.userOpt_bkConfirmFlg, undefined);
} }
else { else {
return operateData(arguments, Keys.viewlog_resourceVersion, undefined); return operateData(arguments, Keys.userOpt_bkConfirmFlg, undefined);
} }
}, },
// Local :並び順(sortOpt)_表示モード:Interger(0:本棚, 1:リスト) // Local :並び順(sortOpt)_表示モード:Interger(0:本棚, 1:リスト)
sortOpt_viewMode: function (data) { sortOpt_viewMode: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
...@@ -1021,67 +912,6 @@ var ClientData = { ...@@ -1021,67 +912,6 @@ var ClientData = {
return operateData(arguments, Keys.memo_pageNo, undefined); return operateData(arguments, Keys.memo_pageNo, undefined);
} }
}, },
// Local :メモデータ(memo)_位置X座標:Interger
memo_posX: function (data) {
if (arguments.length > 0) {
operateData(arguments, Keys.memo_posX, undefined);
}
else {
return operateData(arguments, Keys.memo_posX, undefined);
}
},
// Local :メモデータ(memo)_位置Y座標:Interger
memo_posY: function (data) {
if (arguments.length > 0) {
operateData(arguments, Keys.memo_posY, undefined);
}
else {
return operateData(arguments, Keys.memo_posY, undefined);
}
},
// Local :メモデータ(memo)_内容(テキスト):String
memo_Text: function (data) {
if (arguments.length > 0) {
operateData(arguments, Keys.memo_Text, undefined);
}
else {
return operateData(arguments, Keys.memo_Text, undefined);
}
},
// Local :マーキングデータ(makingData)_コンテンツID:Interger
makingData_contentNo: function (data) {
if (arguments.length > 0) {
operateData(arguments, Keys.makingData_contentNo, undefined);
}
else {
return operateData(arguments, Keys.makingData_contentNo, undefined);
}
},
// Local :マーキングデータ(makingData)_ページNo:Interger
makingData_pageNo: function (data) {
if (arguments.length > 0) {
operateData(arguments, Keys.makingData_pageNo, undefined);
}
else {
return operateData(arguments, Keys.makingData_pageNo, undefined);
}
},
// Local :マーキングデータ(makingData)_内容(イメージオブジェクト):String
makingData_content: function (data) {
if (arguments.length > 0) {
operateData(arguments, Keys.makingData_content, undefined);
}
else {
return operateData(arguments, Keys.makingData_content, undefined);
}
},
// Session // Session
IsRefresh: function (data) { IsRefresh: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
...@@ -1898,10 +1728,10 @@ function getBase64Image(imgSource) { ...@@ -1898,10 +1728,10 @@ function getBase64Image(imgSource) {
function LockScreen() { function LockScreen() {
if(avwUserSession()) { if(avwUserSession()) {
if (ClientData.serviceOpt_force_login_periodically() == "Y") { if (ClientData.serviceOpt_force_login_periodically() == "Y") {
var message = i18nText("sysInfoScrLock01"); //var message = i18nText("sysInfoScrLock01");
screenLock({ screenLock({
timeout: Consts.ConstLockScreenTime, timeout: Consts.ConstLockScreenTime,
html: '<img src="img/1222.png" alt="Screen Lock" /><br />' + message, html: '<img src="img/1222.png" alt="Screen Lock" /><br />', //+ message,
unlockFunc: unlockFunction, unlockFunc: unlockFunction,
errorMessage: i18nText('msgLoginErrWrong') errorMessage: i18nText('msgLoginErrWrong')
}); });
...@@ -1937,6 +1767,11 @@ $(function () { ...@@ -1937,6 +1767,11 @@ $(function () {
if (ClientData.userOpt_bkConfirmFlg() == null || ClientData.userOpt_bkConfirmFlg() == undefined) { if (ClientData.userOpt_bkConfirmFlg() == null || ClientData.userOpt_bkConfirmFlg() == undefined) {
ClientData.userOpt_bkConfirmFlg(1); ClientData.userOpt_bkConfirmFlg(1);
} }
// タブ・ブラウザ終了・F5時のアラートが表示する
if (ClientData.userOpt_closeOrRefreshAlert() == null || ClientData.userOpt_closeOrRefreshAlert() == undefined) {
ClientData.userOpt_closeOrRefreshAlert(1);
}
} }
}); });
...@@ -2274,3 +2109,51 @@ function isTouchDevice() { ...@@ -2274,3 +2109,51 @@ function isTouchDevice() {
return false; return false;
} }
/*
Get total bytes of jp chars
*/
function getBytes(value) {
var escapedStr = encodeURI(value);
if (escapedStr.indexOf("%") != -1) {
var count = escapedStr.split("%").length - 1
if (count == 0) count++ //perverse case; can't happen with real UTF-8
var tmp = escapedStr.length - (count * 3);
count = (count / 3) * 2 + tmp;
} else {
count = escapedStr.length
}
return count;
}
/*
Truncate by bytes
*/
function truncateByBytes(value, byteCount) {
var strResult = "";
for (var nIndex = 0; nIndex < value.length; nIndex++) {
if (getBytes(strResult + value[nIndex]) <= byteCount) {
strResult += value[nIndex];
}
else {
break;
}
}
return strResult;
}
function ToogleLogoutNortice() {
var isShow = false;
if (ClientData.userOpt_closeOrRefreshAlert() == 1) { // Checked
isShow = true;
}
if (isShow == false) {
window.onbeforeunload = null;
}
else {
avwSetLogoutNortice();
}
}
\ No newline at end of file
...@@ -306,21 +306,21 @@ function AddCategory(targetTreeView, sourceTreeNode, targetTreeNode, callbackFun ...@@ -306,21 +306,21 @@ function AddCategory(targetTreeView, sourceTreeNode, targetTreeNode, callbackFun
if (targetTreeNode != undefined && targetTreeNode != null) { if (targetTreeNode != undefined && targetTreeNode != null) {
if (sourceTreeNode.IsClosed == true) { // Collapse if (sourceTreeNode.IsClosed == true) { // Collapse
if (targetTreeView.IsShowTotal == true) { // Show total count if (targetTreeView.IsShowTotal == true) { // Show total count
branches = $("<li class='closed'><span style='padding-left: 5px;' class='folder' " + scriptCallback + ">" + sourceTreeNode.Text + "</span>&nbsp;(" + sourceTreeNode.ContentCount + ")<ul id='" + sourceTreeNode.Id + "'>" + branches = $("<li class='closed'><" + targetTreeView.CategoryTagName + " style='padding-left: 5px;' class='folder' " + scriptCallback + ">" + sourceTreeNode.Text + "</" + targetTreeView.CategoryTagName + ">&nbsp;(" + sourceTreeNode.ContentCount + ")<ul id='" + sourceTreeNode.Id + "'>" +
"</ul></li>").appendTo("#" + targetTreeNode.Id); "</ul></li>").appendTo("#" + targetTreeNode.Id);
} }
else { else {
branches = $("<li class='closed'><span style='padding-left: 5px;' class='folder' " + scriptCallback + ">" + sourceTreeNode.Text + "</span><ul id='" + sourceTreeNode.Id + "'>" + branches = $("<li class='closed'><" + targetTreeView.CategoryTagName + " style='padding-left: 5px;' class='folder' " + scriptCallback + ">" + sourceTreeNode.Text + "</" + targetTreeView.CategoryTagName + "><ul id='" + sourceTreeNode.Id + "'>" +
"</ul></li>").appendTo("#" + targetTreeNode.Id); "</ul></li>").appendTo("#" + targetTreeNode.Id);
} }
} }
else { else {
if (targetTreeView.IsShowTotal == true) { // Show total count if (targetTreeView.IsShowTotal == true) { // Show total count
branches = $("<li ><span style='padding-left: 5px;' class='folder'" + scriptCallback + ">" + sourceTreeNode.Text + "</span>&nbsp;(" + sourceTreeNode.ContentCount + ")<ul id='" + sourceTreeNode.Id + "'>" + branches = $("<li ><" + targetTreeView.CategoryTagName + " style='padding-left: 5px;' class='folder'" + scriptCallback + ">" + sourceTreeNode.Text + "</" + targetTreeView.CategoryTagName + ">&nbsp;(" + sourceTreeNode.ContentCount + ")<ul id='" + sourceTreeNode.Id + "'>" +
"</ul></li>").appendTo("#" + targetTreeNode.Id); "</ul></li>").appendTo("#" + targetTreeNode.Id);
} }
else { else {
branches = $("<li ><span style='padding-left: 5px;' class='folder'" + scriptCallback + ">" + sourceTreeNode.Text + "</span><ul id='" + sourceTreeNode.Id + "'>" + branches = $("<li ><" + targetTreeView.CategoryTagName + " style='padding-left: 5px;' class='folder'" + scriptCallback + ">" + sourceTreeNode.Text + "</" + targetTreeView.CategoryTagName + "><ul id='" + sourceTreeNode.Id + "'>" +
"</ul></li>").appendTo("#" + targetTreeNode.Id); "</ul></li>").appendTo("#" + targetTreeNode.Id);
} }
} }
...@@ -328,21 +328,21 @@ function AddCategory(targetTreeView, sourceTreeNode, targetTreeNode, callbackFun ...@@ -328,21 +328,21 @@ function AddCategory(targetTreeView, sourceTreeNode, targetTreeNode, callbackFun
else { else {
if (sourceTreeNode.IsClosed == true) { // Collapse if (sourceTreeNode.IsClosed == true) { // Collapse
if (targetTreeView.IsShowTotal == true) { // Show total count if (targetTreeView.IsShowTotal == true) { // Show total count
branches = $("<li class='closed'><span style='padding-left: 5px;' class='folder'" + scriptCallback + ">" + sourceTreeNode.Text + "</span>&nbsp;(" + sourceTreeNode.ContentCount + ")<ul id='" + sourceTreeNode.Id + "'>" + branches = $("<li class='closed'><" + targetTreeView.CategoryTagName + " style='padding-left: 5px;' class='folder'" + scriptCallback + ">" + sourceTreeNode.Text + "</" + targetTreeView.CategoryTagName + ">&nbsp;(" + sourceTreeNode.ContentCount + ")<ul id='" + sourceTreeNode.Id + "'>" +
"</ul></li>").appendTo("#" + targetTreeView.Id); "</ul></li>").appendTo("#" + targetTreeView.Id);
} }
else { else {
branches = $("<li class='closed'><span style='padding-left: 5px;' class='folder'" + scriptCallback + ">" + sourceTreeNode.Text + "</span><ul id='" + sourceTreeNode.Id + "'>" + branches = $("<li class='closed'><" + targetTreeView.CategoryTagName + " style='padding-left: 5px;' class='folder'" + scriptCallback + ">" + sourceTreeNode.Text + "</" + targetTreeView.CategoryTagName + "><ul id='" + sourceTreeNode.Id + "'>" +
"</ul></li>").appendTo("#" + targetTreeView.Id); "</ul></li>").appendTo("#" + targetTreeView.Id);
} }
} }
else { else {
if (targetTreeView.IsShowTotal == true) { // Show total count if (targetTreeView.IsShowTotal == true) { // Show total count
branches = $("<li><span style='padding-left: 5px;' class='folder'" + scriptCallback + ">" + sourceTreeNode.Text + "</span>&nbsp;(" + sourceTreeNode.ContentCount + ")<ul id='" + sourceTreeNode.Id + "'>" + branches = $("<li><" + targetTreeView.CategoryTagName + " style='padding-left: 5px;' class='folder'" + scriptCallback + ">" + sourceTreeNode.Text + "</" + targetTreeView.CategoryTagName + ">&nbsp;(" + sourceTreeNode.ContentCount + ")<ul id='" + sourceTreeNode.Id + "'>" +
"</ul></li>").appendTo("#" + targetTreeView.Id); "</ul></li>").appendTo("#" + targetTreeView.Id);
} }
else { else {
branches = $("<li><span style='padding-left: 5px;' class='folder'" + scriptCallback + ">" + sourceTreeNode.Text + "</span><ul id='" + sourceTreeNode.Id + "'>" + branches = $("<li><" + targetTreeView.CategoryTagName + " style='padding-left: 5px;' class='folder'" + scriptCallback + ">" + sourceTreeNode.Text + "</" + targetTreeView.CategoryTagName + "><ul id='" + sourceTreeNode.Id + "'>" +
"</ul></li>").appendTo("#" + targetTreeView.Id); "</ul></li>").appendTo("#" + targetTreeView.Id);
} }
} }
...@@ -378,27 +378,27 @@ function AddItem(targetTreeView, sourceTreeNodeItem, targetTreeNode, callbackFun ...@@ -378,27 +378,27 @@ function AddItem(targetTreeView, sourceTreeNodeItem, targetTreeNode, callbackFun
if (targetTreeNode != undefined && targetTreeNode != null) { if (targetTreeNode != undefined && targetTreeNode != null) {
// Nodes of root // Nodes of root
if (targetTreeView.IsShowTotal == true) { if (targetTreeView.IsShowTotal == true) {
branches = $("<li><span class='file'" + scriptCallback + ">" + sourceTreeNodeItem.Text + "</span>&nbsp;(" + sourceTreeNodeItem.ContentCount + ")</li>").appendTo("#" + targetTreeNode.Id); branches = $("<li><" + targetTreeView.CategoryTagName + " class='file'" + scriptCallback + ">" + sourceTreeNodeItem.Text + "</" + targetTreeView.CategoryTagName + ">&nbsp;(" + sourceTreeNodeItem.ContentCount + ")</li>").appendTo("#" + targetTreeNode.Id);
} }
else { else {
branches = $("<li><span class='file'" + scriptCallback + ">" + sourceTreeNodeItem.Text + "</span>&nbsp;</li>").appendTo("#" + targetTreeNode.Id); branches = $("<li><" + targetTreeView.CategoryTagName + " class='file'" + scriptCallback + ">" + sourceTreeNodeItem.Text + "</" + targetTreeView.CategoryTagName + ">&nbsp;</li>").appendTo("#" + targetTreeNode.Id);
} }
} }
else { else {
if (sourceTreeNodeItem.Id == "all") { // All nodes if (sourceTreeNodeItem.Id == "all") { // All nodes
if (targetTreeView.IsShowTotal == true) { if (targetTreeView.IsShowTotal == true) {
branches = $("<li><span style='padding-left: 5px;' class='file lang root' lang='txtAll'" + scriptCallback + ">" + sourceTreeNodeItem.Text + "</span>&nbsp;(" + targetTreeView.TotalCount + ")</li>").appendTo("#" + targetTreeView.Id); branches = $("<li><" + targetTreeView.CategoryTagName + " style='padding-left: 5px;' class='file lang root' lang='txtAll'" + scriptCallback + ">" + sourceTreeNodeItem.Text + "</" + targetTreeView.CategoryTagName + ">&nbsp;(" + targetTreeView.TotalCount + ")</li>").appendTo("#" + targetTreeView.Id);
} }
else { else {
branches = $("<li><span style='padding-left: 5px;' class='file lang root' lang='txtAll'" + scriptCallback + ">" + sourceTreeNodeItem.Text + "</span></li>").appendTo("#" + targetTreeView.Id); branches = $("<li><" + targetTreeView.CategoryTagName + " style='padding-left: 5px;' class='file lang root' lang='txtAll'" + scriptCallback + ">" + sourceTreeNodeItem.Text + "</" + targetTreeView.CategoryTagName + "></li>").appendTo("#" + targetTreeView.Id);
} }
} }
else { // Node of root but not be "all node" else { // Node of root but not be "all node"
if (targetTreeView.IsShowTotal == true) { if (targetTreeView.IsShowTotal == true) {
branches = $("<li><span style='padding-left: 5px;' class='file'" + scriptCallback + ">" + sourceTreeNodeItem.Text + "</span>&nbsp;(" + sourceTreeNodeItem.ContentCount + ")</li>").appendTo("#" + targetTreeView.Id); branches = $("<li><" + targetTreeView.CategoryTagName + " style='padding-left: 5px;' class='file'" + scriptCallback + ">" + sourceTreeNodeItem.Text + "</" + targetTreeView.CategoryTagName + ">&nbsp;(" + sourceTreeNodeItem.ContentCount + ")</li>").appendTo("#" + targetTreeView.Id);
} }
else { else {
branches = $("<li><span style='padding-left: 5px;' class='file'" + scriptCallback + ">" + sourceTreeNodeItem.Text + "</span></li>").appendTo("#" + targetTreeView.Id); branches = $("<li><" + targetTreeView.CategoryTagName + " style='padding-left: 5px;' class='file'" + scriptCallback + ">" + sourceTreeNodeItem.Text + "</" + targetTreeView.CategoryTagName + "></li>").appendTo("#" + targetTreeView.Id);
} }
} }
} }
...@@ -456,14 +456,21 @@ function AddChildNodeIndex(tree, parenTreeNode, childDataNode, callbackFunctionN ...@@ -456,14 +456,21 @@ function AddChildNodeIndex(tree, parenTreeNode, childDataNode, callbackFunctionN
// Set unique id // Set unique id
childDataNode.Id += nodeId++; childDataNode.Id += nodeId++;
if (childDataNode.ChildNodes.length > 0) {
// Add category // Add category
AddCategory(tree, childDataNode, parenTreeNode, callbackFunctionName); AddCategory(tree, childDataNode, parenTreeNode, callbackFunctionName);
if (childDataNode.ChildNodes.length > 0) {
for (var nIndex = 0; nIndex < childDataNode.ChildNodes.length; nIndex++) { for (var nIndex = 0; nIndex < childDataNode.ChildNodes.length; nIndex++) {
// Call loop back // Call loop back
AddChildNodeIndex(tree, childDataNode, childDataNode.ChildNodes[nIndex], callbackFunctionName); AddChildNodeIndex(tree, childDataNode, childDataNode.ChildNodes[nIndex], callbackFunctionName);
} }
} }
else {
// Add as item
childDataNode.IsCategory = false;
AddItem(tree, childDataNode, parenTreeNode, callbackFunctionName);
}
} }
else { else {
// Set unique id // Set unique id
...@@ -502,6 +509,7 @@ function TreeView() { ...@@ -502,6 +509,7 @@ function TreeView() {
this.TotalCount = 0; this.TotalCount = 0;
this.IsShowTotal = true; this.IsShowTotal = true;
this.ExpandNodes = []; this.ExpandNodes = [];
this.CategoryTagName = "span"; // Use to expand/ not expand when clicking in
this.Show = function (containerId, nodes, callbackFunctionName) { this.Show = function (containerId, nodes, callbackFunctionName) {
var tree = this; var tree = this;
tree.Id = containerId; tree.Id = containerId;
...@@ -532,6 +540,7 @@ function TreeViewIndex() { ...@@ -532,6 +540,7 @@ function TreeViewIndex() {
this.Nodes = new Array(); this.Nodes = new Array();
this.TotalCount = 0; this.TotalCount = 0;
this.IsShowTotal = true; this.IsShowTotal = true;
this.CategoryTagName = "span";
this.Show = function (containerId, nodes, callbackFunctionName) { this.Show = function (containerId, nodes, callbackFunctionName) {
var tree = this; var tree = this;
tree.Id = containerId; tree.Id = containerId;
......
...@@ -143,9 +143,9 @@ function screenLock(options) { ...@@ -143,9 +143,9 @@ function screenLock(options) {
var tags = '<div id="' + elmId + '" class="screenLock">' + var tags = '<div id="' + elmId + '" class="screenLock">' +
'<div style="display:table; width:100%; height:100%;">' + '<div style="display:table; width:100%; height:100%;">' +
'<div style="display:table-cell; text-align:center; vertical-align:middle;">' + '<div style="display:table-cell; text-align:center; vertical-align:middle;">' +
'<p class="screenLock-content">' + html + '</p>' + '<p class="screenLock-content">' + html + i18nText('sysInfoScrLock01') + '</p>' +
'<div id="pw" style="display:none;">' + '<div id="pw" style="display:none;">' +
'<input id="passwd-txt" placeholder="input password" type="password" value="" />&nbsp;' + '<input id="passwd-txt" placeholder="'+i18nText('sysLockScrPwdInput')+'" type="password" value="" />&nbsp;' +
'<button id="unlock-btn">OK</button>' + '<button id="unlock-btn">OK</button>' +
'<div id="screenLockErrMsg" class="screenLock-error" style="display:none;">' + errorMessage + '</div>' + '<div id="screenLockErrMsg" class="screenLock-error" style="display:none;">' + errorMessage + '</div>' +
'</div>' + '</div>' +
......
...@@ -31,29 +31,32 @@ function refreshSlideShowValue(){ ...@@ -31,29 +31,32 @@ function refreshSlideShowValue(){
//Show Image Preview //Show Image Preview
function showImagePreview(targetId, imgList){ function showImagePreview(targetId, imgList) {
refreshSlideShowValue(); refreshSlideShowValue();
//Check if imageList is not null //Check if imageList is not null
if(imgList != null && imgList != 'undefined' && imgList.length > 0){ if (imgList != null && imgList != 'undefined' && imgList.length > 0) {
slideshowImageCollection = setImageSource(imgList); slideshowImageCollection = setImageSource(imgList);
//Check if targetId is not null //Check if targetId is not null
if(targetId != null && targetId != 'undefined'){ if (targetId != null && targetId != 'undefined') {
if(slideshowImageCollection.length == 1){ if (slideshowImageCollection.length == 1) {
targetId.html(''); targetId.html('');
targetId.append('<div id="slideWrapper">' targetId.append('<div id="slideWrapper">'
+'</div>'); + '</div>');
var mainImg = $('#slideWrapper'); var mainImg = $('#slideWrapper');
var cssObj = {'background-image' : 'url('+slideshowImageCollection[0].thumbnail+')', var cssObj = { 'background-image': 'url(' + slideshowImageCollection[0].thumbnail + ')',
'background-repeat': 'no-repeat', 'background-repeat': 'no-repeat',
'background-size': 'contain', 'background-size': 'contain',
'background-position': 'center', 'background-position': 'center',
'background-color': 'black'}; 'background-color': 'black'
};
mainImg.css(cssObj); mainImg.css(cssObj);
}else{ mainImg.parent().css('padding-top', '0px');
} else {
renderSlideShowBackground(targetId); renderSlideShowBackground(targetId);
renderSelectImage(); renderSelectImage();
renderMainImage(0); renderMainImage(0);
...@@ -61,11 +64,12 @@ function showImagePreview(targetId, imgList){ ...@@ -61,11 +64,12 @@ function showImagePreview(targetId, imgList){
} }
} }
} }
else{ else {
renderSlideShowBackground(targetId); renderSlideShowBackground(targetId);
$('.main-control').css('visibility','hidden'); $('.main-control').css('visibility', 'hidden');
$('.slideshow-control').css('visibility','hidden'); $('.slideshow-control').css('visibility', 'hidden');
} }
optimizeSizeImagePreview();
} }
//Set image source for slide show //Set image source for slide show
...@@ -99,8 +103,37 @@ function renderSlideShowBackground(targetId){ ...@@ -99,8 +103,37 @@ function renderSlideShowBackground(targetId){
+'</div>' +'</div>'
); );
$(window).resize(function () {
optimizeSizeImagePreview();
});
//handleImagePreviewEvent(); //handleImagePreviewEvent();
} }
function optimizeSizeImagePreview() {
var maxW = "798";
var ratio = 1.566;
var maxH = maxW / ratio;
if ($("#dialog").width() < maxW || $("#dialog").height() < maxH) {
if ($("#dialog").width() < maxW) {
$("#dialog").css('width', maxW + 'px');
$("#dialog").css('height', maxH + 'px');
}
if ($("#dialog").height() < maxH) {
$("#dialog").css('height', maxH + 'px');
$("#dialog").css('width', maxW + 'px');
}
}
else {
$("#dialog").css('width', maxW + 'px');
$("#dialog").css('height', maxH + 'px');
}
$("#dialog").center();
}
//render select image //render select image
function renderSelectImage(){ function renderSelectImage(){
...@@ -135,17 +168,41 @@ function handleImagePreviewEvent(){ ...@@ -135,17 +168,41 @@ function handleImagePreviewEvent(){
$('.main-control').css('opacity','0'); $('.main-control').css('opacity','0');
$('#main-control-next').mouseleave(mainControlNextMouseLeaveFunction);
$('#main-control-prev').mouseleave(mainControlPrevMouseLeaveFunction);
if (isTouchDevice() == false) { if (isTouchDevice() == false) {
$('.main-control').mouseenter(mainControlMouseEnterFunction); //$('.main-control').mouseenter(mainControlMouseEnterFunction);
$('#main-control-next').mouseenter(mainControlNextMouseEnterFunction);
$('#main-control-prev').mouseenter(mainControlPrevMouseEnterFunction);
} }
$('.main-control').mouseleave(mainControlMouseLeaveFunction); //$('.main-control').mouseleave(mainControlMouseLeaveFunction);
$('.thumbnail:first').css('box-shadow','0px 7px 7px #555'); $('.thumbnail:first').css('box-shadow','0px 7px 7px #555');
handleDispNextPrevButton(); handleDispNextPrevButton();
} }
function mainControlNextMouseEnterFunction(){
$(this).css('opacity','0.5');
}
function mainControlNextMouseLeaveFunction(){
$(this).css('opacity','0');
}
function mainControlPrevMouseEnterFunction(){
$(this).css('opacity','0.5');
}
function mainControlPrevMouseLeaveFunction(){
$(this).css('opacity','0');
}
//Image Preview next icon function //Image Preview next icon function
function imageSelectNextFunction(){ function imageSelectNextFunction(){
......
...@@ -48,8 +48,8 @@ ...@@ -48,8 +48,8 @@
"dspTitleNm":"Title", "dspTitleNm":"Title",
"dspTitleNmKn":"Title(Kana)", "dspTitleNmKn":"Title(Kana)",
"txtPubDt":"Released Date", "txtPubDt":"Released Date",
"txtRecordNum":"", "txtRecordNum":" ",
"txtRecordTotal":"", "txtRecordTotal":" ",
"dspViewMore":">> Next {0} contents", "dspViewMore":">> Next {0} contents",
"txtGen":"Genre", "txtGen":"Genre",
"txtGr":"Group", "txtGr":"Group",
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
"dspBkCancel":"Logout", "dspBkCancel":"Logout",
"txtSearchResult":"Result", "txtSearchResult":"Result",
"dspHome":"Home", "dspHome":"Home",
"txtLoginUser":"(Ver.20121207-1)User:", "txtLoginUser":"(Ver.20121211-2)User:",
"txtAll":"All", "txtAll":"All",
"txtMkgSize":"Size", "txtMkgSize":"Size",
"txtMkgS":"S", "txtMkgS":"S",
...@@ -112,5 +112,7 @@ ...@@ -112,5 +112,7 @@
"txtMemoEdit":"Edit memo", "txtMemoEdit":"Edit memo",
"txtMemoCopy":"Copy", "txtMemoCopy":"Copy",
"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",
"txtOpt005":"Show alert when press F5.close tab.broswer."
} }
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
"dspBkCancel":"バックアップせずにログアウト", "dspBkCancel":"バックアップせずにログアウト",
"txtSearchResult":"検索結果", "txtSearchResult":"検索結果",
"dspHome":"ホーム", "dspHome":"ホーム",
"txtLoginUser":"(Ver.20121207-1)ログイン中:", "txtLoginUser":"(Ver.20121211-2)ログイン中:",
"txtAll":"すべて", "txtAll":"すべて",
"txtMkgSize":"太さ", "txtMkgSize":"太さ",
"txtMkgS":"小", "txtMkgS":"小",
...@@ -112,5 +112,7 @@ ...@@ -112,5 +112,7 @@
"txtMemoEdit":"編集", "txtMemoEdit":"編集",
"txtMemoCopy":"コピー", "txtMemoCopy":"コピー",
"msgPageImgErr":"コンテンツを表示することができません。コンテンツが削除された可能性があります。ホーム画面に戻り、異なるコンテンツを選択してください。", "msgPageImgErr":"コンテンツを表示することができません。コンテンツが削除された可能性があります。ホーム画面に戻り、異なるコンテンツを選択してください。",
"sysAppTitle":"ABook閲覧ウェブ版" "sysAppTitle":"ABook閲覧ウェブ版",
"sysLockScrPwdInput":"パスワードを入力してください",
"txtOpt005":"タブ・ブラウザ終了・F5時のアラートが表示する"
} }
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
"dspBkCancel":"로그아웃", "dspBkCancel":"로그아웃",
"txtSearchResult":"검색 결과", "txtSearchResult":"검색 결과",
"dspHome":"홈", "dspHome":"홈",
"txtLoginUser":"(Ver.20121207-1)로그인 중:", "txtLoginUser":"(Ver.20121211-2)로그인 중:",
"txtAll":"전체", "txtAll":"전체",
"txtMkgSize":"두께", "txtMkgSize":"두께",
"txtMkgS":"소", "txtMkgS":"소",
...@@ -112,5 +112,7 @@ ...@@ -112,5 +112,7 @@
"txtMemoEdit":"편집", "txtMemoEdit":"편집",
"txtMemoCopy":"복사", "txtMemoCopy":"복사",
"msgPageImgErr":"컨텐츠를 표시할 수 없습니다. 이 컨텐츠는 삭제되었을 가능성이 있습니다.", "msgPageImgErr":"컨텐츠를 표시할 수 없습니다. 이 컨텐츠는 삭제되었을 가능성이 있습니다.",
"sysAppTitle":"ABook : 멀티미디어 컨텐츠 플랫폼" "sysAppTitle":"ABook : 멀티미디어 컨텐츠 플랫폼",
"sysLockScrPwdInput":"입력 암호",
"txtOpt005":"탭 브라우저 종료 · F5 때 경고가 표시"
} }
...@@ -27,9 +27,9 @@ ...@@ -27,9 +27,9 @@
<script src="./common/js/jquery.treeview.js" type="text/javascript"></script> <script src="./common/js/jquery.treeview.js" type="text/javascript"></script>
<script src="./common/js/jquery.treeview.edit.js" type="text/javascript"></script> <script src="./common/js/jquery.treeview.edit.js" type="text/javascript"></script>
<script src="./common/js/screenLock.js"></script> <script src="./common/js/screenLock.js"></script>
<script src="./common/js/common.js"></script>
<script src="./common/js/avweb.js"></script> <script src="./common/js/avweb.js"></script>
<script src="./common/js/i18n.js"></script> <script src="./common/js/i18n.js"></script>
<script src="./common/js/common.js"></script>
<script src="./common/js/htmlparser.js"></script> <script src="./common/js/htmlparser.js"></script>
<script src="./common/js/textObject.js"></script> <script src="./common/js/textObject.js"></script>
<script src="./js/contentview.js"></script> <script src="./js/contentview.js"></script>
...@@ -886,14 +886,22 @@ ...@@ -886,14 +886,22 @@
//change class //change class
$('#imgmemo').removeClass(); $('#imgmemo').removeClass();
if(isTouchDevice() == true){
$('#imgmemo').addClass('memoDisplay_device');
}else{
$('#imgmemo').addClass('memoDisplay'); $('#imgmemo').addClass('memoDisplay');
}
/*handle image add memo */ /*handle image add memo */
ClientData.IsAddingMemo(false); ClientData.IsAddingMemo(false);
//change class //change class
$('#imgaddmemo').removeClass(); $('#imgaddmemo').removeClass();
if(isTouchDevice() == true){
$('#imgaddmemo').addClass('memoAdd_device');
}else{
$('#imgaddmemo').addClass('memoAdd'); $('#imgaddmemo').addClass('memoAdd');
}
}else{ }else{
ClientData.IsDisplayMemo(true); ClientData.IsDisplayMemo(true);
...@@ -1216,18 +1224,37 @@ ...@@ -1216,18 +1224,37 @@
$('#nextpage').unbind('click'); $('#nextpage').unbind('click');
$('#lastpage').unbind('click'); $('#lastpage').unbind('click');
$('#zoomfit').unbind('click'); $('#zoomfit').unbind('click');
$('#zoomin').unbind('click'); $('#zoomin').unbind('click');
$('#zoomin').removeClass(); $('#zoomin').removeClass();
$('#zoomin').addClass('expansion_off'); $('#zoomin').addClass('expansion_off');
$('#zoomout').unbind('click'); $('#zoomout').unbind('click');
$('#zoomout').removeClass(); $('#zoomout').removeClass();
$('#zoomout').addClass('reduction_off'); $('#zoomout').addClass('reduction_off');
$("#slider_page").slider( "option", "disabled", true ); if(avwUserEnvObj.os != "android"){
$("#slider_page").slider("option", "disabled", true );
}
disable('#txtSearch','#txtSlider'); disable('#txtSearch','#txtSlider');
$('#button_next_canvas').css('display','none'); $('#button_next_canvas').css('display','none');
$('#button_pre_canvas').css('display','none'); $('#button_pre_canvas').css('display','none');
if(isTouchDevice() == true){
$('#firstpage').removeClass();
$('#firstpage').addClass('begin');
$('#prevpage').removeClass();
$('#prevpage').addClass('prev');
$('#nextpage').removeClass();
$('#nextpage').addClass('next');
$('#lastpage').removeClass();
$('#lastpage').addClass('last');
$('#zoomfit').removeClass();
$('#zoomfit').addClass('fit');
}
} }
/*enable all control on page */ /*enable all control on page */
...@@ -1257,25 +1284,139 @@ ...@@ -1257,25 +1284,139 @@
$("#slider_page").css('cursor', 'pointer'); $("#slider_page").css('cursor', 'pointer');
$(".ui-slider-handle").css('cursor', 'pointer'); $(".ui-slider-handle").css('cursor', 'pointer');
$("#control_screen").removeClass();
$("#control_screen_2").removeClass();
$('#imgHome').bind('click',imgHome_click); $('#imgHome').bind('click',imgHome_click);
$('#imgHome').removeClass(); $('#imgHome').removeClass();
$('#imgHome').addClass('home');
$('#imgBack').bind('click',imgBack_click); $('#imgBack').bind('click',imgBack_click);
$('#imgBack').removeClass(); $('#imgBack').removeClass();
$('#imgBack').addClass('back');
/*list bookmark */ /*list bookmark */
$('#listbookmark').bind('click',showListBookMark); $('#listbookmark').bind('click',showListBookMark);
$('#listbookmark').removeClass(); $('#listbookmark').removeClass();
$('#imgbookmark').bind('click',bookmarkPage);
$('#imgbookmark').removeClass();
$('#listindex').bind('click',showListPageIndex);
$('#listindex').removeClass();
$('#copytext').bind('click',showCopyText);
$('#copytext').removeClass();
/* image memo */
$('#imgmemo').bind('click',handleMemo);
$('#imgmemo').removeClass();
/* image add memo */
$('#imgaddmemo').bind('click',handleAddMemo);
$('#imgaddmemo').removeClass();
$('#imgmarking').bind('click',imgmarking_click);
$('#imgmarking').removeClass();
if(ClientData.serviceOpt_marking() == 'Y'){
$('#imgmarkingtoolbar').bind('click',handleDrawCanvas);
$('#imgmarkingtoolbar').removeClass();
}
/*$('#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();
$('#zoomfit').bind('click',screenFit);
$('#zoomfit').removeClass();*/
// $('#zoomin').bind('click',zoomIn);
// $('#zoomin').addClass('expansion');
// $("#zoomin").css('cursor', 'pointer');
// $('#zoomout').bind('click',zoomOut);
// $('#zoomout').addClass('reduction');
// $("#zoomout").css('cursor', 'pointer'); checkDisableButtonZoom();
$("#slider_page").slider( "option", "disabled", false );
enable('#txtSearch','#txtSlider');
if(avwUserEnvObj.os != "ipad" && avwUserEnvObj.os != "android"){
$('#button_next_canvas').css('display','block');
$('#button_pre_canvas').css('display','block');
}
if(isTouchDevice() == true){/* set css for device */
$('#imgHome').addClass('home_device');
$('#imgBack').addClass('back_device');
/*$('#firstpage').addClass('begin_device');
$('#prevpage').addClass('prev_device');
$('#nextpage').addClass('next_device');
$('#lastpage').addClass('last_device'); */
$("#control_screen").addClass('toolbar_device');
$("#control_screen_2").addClass('toolbar_device');
var nBookmarkId = isExistBookmark();
if(nBookmarkId == -1){
$('#imgbookmark').addClass('bmAdd_device');
}else{
$('#imgbookmark').addClass('bmAdd_hover');
}
if(isDisplayBookMarkList == true){ if(isDisplayBookMarkList == true){
$('#listbookmark').addClass('bmList_hover'); $('#listbookmark').addClass('bmList_hover');
}else{ }else{
$('#listbookmark').addClass('bmList'); $('#listbookmark').addClass('bmList_device');
} }
$('#imgbookmark').bind('click',bookmarkPage); if(isDisplayCopyText == true){
$('#imgbookmark').removeClass(); $('#copytext').addClass('copy_hover');
}else{
$('#copytext').addClass('copy_device');
}
if(isDisplayListIndex == true){
$('#listindex').addClass('index_hover');
}else{
$('#listindex').addClass('index_device');
}
if(ClientData.IsDisplayMemo() == true){
$('#imgmemo').addClass('memoDisplay_hover');
}else{
$('#imgmemo').addClass('memoDisplay_device');
}
if(ClientData.IsAddingMemo() == true){
$('#imgaddmemo').addClass('memoAdd_hover');
}else{
$('#imgaddmemo').addClass('memoAdd_device');
}
if(ClientData.IsDisplayMarking() == true){
$('#imgmarking').addClass('marking_hover');
}else{
$('#imgmarking').addClass('marking_device');
}
if(ClientData.serviceOpt_marking() == 'Y'){
if(ClientData.IsAddingMarking() == true){
$('#imgmarkingtoolbar').addClass('markingToolbar_hover');
}else{
$('#imgmarkingtoolbar').addClass('markingToolbar_device');
}
}
}else{ /* set css for PC */
$('#imgHome').addClass('home');
$('#imgBack').addClass('back');
/*$('#firstpage').addClass('begin');
$('#prevpage').addClass('prev');
$('#nextpage').addClass('next');
$('#lastpage').addClass('last');*/
$("#control_screen").addClass('toolbar');
$("#control_screen_2").addClass('toolbar');
var nBookmarkId = isExistBookmark(); var nBookmarkId = isExistBookmark();
if(nBookmarkId == -1){ if(nBookmarkId == -1){
$('#imgbookmark').addClass('bmAdd'); $('#imgbookmark').addClass('bmAdd');
...@@ -1283,77 +1424,49 @@ ...@@ -1283,77 +1424,49 @@
$('#imgbookmark').addClass('bmAdd_hover'); $('#imgbookmark').addClass('bmAdd_hover');
} }
$('#listindex').bind('click',showListPageIndex); if(isDisplayBookMarkList == true){
$('#listindex').removeClass(); $('#listbookmark').addClass('bmList_hover');
if(isDisplayListIndex == true){
$('#listindex').addClass('index_hover');
}else{ }else{
$('#listindex').addClass('index'); $('#listbookmark').addClass('bmList');
} }
$('#copytext').bind('click',showCopyText);
$('#copytext').removeClass();
if(isDisplayCopyText == true){ if(isDisplayCopyText == true){
$('#copytext').addClass('copy_hover'); $('#copytext').addClass('copy_hover');
}else{ }else{
$('#copytext').addClass('copy'); $('#copytext').addClass('copy');
} }
if(isDisplayListIndex == true){
$('#listindex').addClass('index_hover');
}else{
$('#listindex').addClass('index');
}
/* image memo */
$('#imgmemo').bind('click',handleMemo);
$('#imgmemo').removeClass();
if(ClientData.IsDisplayMemo() == true){ if(ClientData.IsDisplayMemo() == true){
$('#imgmemo').addClass('memoDisplay_hover'); $('#imgmemo').addClass('memoDisplay_hover');
}else{ }else{
$('#imgmemo').addClass('memoDisplay'); $('#imgmemo').addClass('memoDisplay');
} }
/* image add memo */
$('#imgaddmemo').bind('click',handleAddMemo);
$('#imgaddmemo').removeClass();
if(ClientData.IsAddingMemo() == true){ if(ClientData.IsAddingMemo() == true){
$('#imgaddmemo').addClass('memoAdd_hover'); $('#imgaddmemo').addClass('memoAdd_hover');
}else{ }else{
$('#imgaddmemo').addClass('memoAdd'); $('#imgaddmemo').addClass('memoAdd');
} }
$('#imgmarking').bind('click',imgmarking_click);
$('#imgmarking').removeClass();
if(ClientData.IsDisplayMarking() == true){ if(ClientData.IsDisplayMarking() == true){
$('#imgmarking').addClass('marking_hover'); $('#imgmarking').addClass('marking_hover');
}else{ }else{
$('#imgmarking').addClass('marking'); $('#imgmarking').addClass('marking');
} }
if(ClientData.serviceOpt_marking() == 'Y'){ if(ClientData.serviceOpt_marking() == 'Y'){
$('#imgmarkingtoolbar').bind('click',handleDrawCanvas);
$('#imgmarkingtoolbar').removeClass();
if(ClientData.IsAddingMarking() == true){ if(ClientData.IsAddingMarking() == true){
$('#imgmarkingtoolbar').addClass('markingToolbar_hover'); $('#imgmarkingtoolbar').addClass('markingToolbar_hover');
}else{ }else{
$('#imgmarkingtoolbar').addClass('markingToolbar'); $('#imgmarkingtoolbar').addClass('markingToolbar');
} }
} }
$('#firstpage').bind('click',firstPage_click);
$('#prevpage').bind('click',prevPage_click);
$('#nextpage').bind('click',nextPage_click);
$('#lastpage').bind('click',lastPage_click);
$('#zoomfit').bind('click',screenFit);
// $('#zoomin').bind('click',zoomIn);
// $('#zoomin').addClass('expansion');
// $("#zoomin").css('cursor', 'pointer');
// $('#zoomout').bind('click',zoomOut);
// $('#zoomout').addClass('reduction');
// $("#zoomout").css('cursor', 'pointer'); checkDisableButtonZoom();
$( "#slider_page" ).slider( "option", "disabled", false );
enable('#txtSearch','#txtSlider');
if(avwUserEnvObj.os != "ipad" && avwUserEnvObj.os != "android"){
$('#button_next_canvas').css('display','block');
$('#button_pre_canvas').css('display','block');
} }
checkExistNextPrePage(); checkExistNextPrePage();
} }
...@@ -1390,7 +1503,11 @@ ...@@ -1390,7 +1503,11 @@
//change class //change class
$('#imgbookmark').removeClass(); $('#imgbookmark').removeClass();
if(isTouchDevice() == true){
$('#imgbookmark').addClass('bmAdd_device');
}else{
$('#imgbookmark').addClass('bmAdd'); $('#imgbookmark').addClass('bmAdd');
}
} }
} }
...@@ -1595,14 +1712,30 @@ ...@@ -1595,14 +1712,30 @@
//change class //change class
$('#listbookmark').removeClass(); $('#listbookmark').removeClass();
if(isTouchDevice() == true){
$('#listbookmark').addClass('bmList_device');
}else{
$('#listbookmark').addClass('bmList'); $('#listbookmark').addClass('bmList');
}
}
/* sort list bookmark */
function sortBookmarkList(){
var bmList = [];
bmList = ClientData.BookMarkData();
bmList.sort(function(a, b){
var a1= a.pageNo, b1= b.pageNo;
if(a1== b1) return 0;
return a1> b1? 1: -1;
});
ClientData.BookMarkData(bmList);
} }
/* get list info bookmark */ /* get list info bookmark */
function getBookmarklist(pos){ function getBookmarklist(pos){
var isExistBookMarkInContent = false; var isExistBookMarkInContent = false;
sortBookmarkList();
var bmList = []; var bmList = [];
bmList = ClientData.BookMarkData(); bmList = ClientData.BookMarkData();
...@@ -1721,7 +1854,11 @@ ...@@ -1721,7 +1854,11 @@
//change class //change class
$('#listindex').removeClass(); $('#listindex').removeClass();
if(isTouchDevice() == true){
$('#listindex').addClass('index_device');
}else{
$('#listindex').addClass('index'); $('#listindex').addClass('index');
}
/* unlock dialog overlay */ /* unlock dialog overlay */
$("#overlay").hide(); $("#overlay").hide();
...@@ -1766,7 +1903,13 @@ ...@@ -1766,7 +1903,13 @@
//add parent node //add parent node
var node = new TreeNode(); var node = new TreeNode();
node.IsCategory = true; node.IsCategory = true;
node.Text = htmlEncode(truncate(dataContent[i].title, 20)); //node.Text = htmlEncode(truncateByBytes(dataContent[i].title, 30));
/* check data text */
if(getBytes(dataContent[i].title) > 30){
node.Text = htmlEncode(truncateByBytes(dataContent[i].title,30)) + '...';
}else{
node.Text = htmlEncode(dataContent[i].title);
}
node.id = dataContent[i].ID; node.id = dataContent[i].ID;
node.Value = dataContent[i].destPageNumber; node.Value = dataContent[i].destPageNumber;
AddChidrenNode(node,dataContent) AddChidrenNode(node,dataContent)
...@@ -1782,6 +1925,7 @@ ...@@ -1782,6 +1925,7 @@
}else{ }else{
$('#divListIndex').children().remove(); $('#divListIndex').children().remove();
$('#divListIndex').append('<span style="color:#333333; font-size:12px; cursor:default; text-decoration:none;">' + i18nText('msgNoIndex') + '</span>'); $('#divListIndex').append('<span style="color:#333333; font-size:12px; cursor:default; text-decoration:none;">' + i18nText('msgNoIndex') + '</span>');
// //show dialog index // //show dialog index
// $("#divListIndex").dialog({ // $("#divListIndex").dialog({
// show: "blind", // show: "blind",
...@@ -1823,7 +1967,13 @@ ...@@ -1823,7 +1967,13 @@
//add child node //add child node
var item = new TreeNode(); var item = new TreeNode();
item.IsCategory = false; item.IsCategory = false;
item.Text = htmlEncode(truncate(dataChild[i].title,20)); //item.Text = htmlEncode(truncateByBytes(dataChild[i].title,30));
/* check data text */
if(getBytes(dataChild[i].title) > 30){
item.Text = htmlEncode(truncateByBytes(dataChild[i].title,30)) + '...';
}else{
item.Text = htmlEncode(dataChild[i].title);
}
item.id = dataChild[i].ID; item.id = dataChild[i].ID;
item.Value = dataChild[i].destPageNumber; item.Value = dataChild[i].destPageNumber;
...@@ -1875,7 +2025,11 @@ ...@@ -1875,7 +2025,11 @@
//change class //change class
$('#copytext').removeClass(); $('#copytext').removeClass();
if(isTouchDevice() == true){
$('#copytext').addClass('copy_device');
}else{
$('#copytext').addClass('copy'); $('#copytext').addClass('copy');
}
/* unlock dialog overlay */ /* unlock dialog overlay */
$("#overlay").hide(); $("#overlay").hide();
...@@ -2482,7 +2636,7 @@ ...@@ -2482,7 +2636,7 @@
context_draw.lineCap = 'square'; context_draw.lineCap = 'square';
context_draw.strokeStyle = "#" + makerColor; context_draw.strokeStyle = "#" + makerColor;
context_draw.stroke(); context_draw.stroke();
context_draw.globalCompositeOperation = 'source-over';*/ context_draw.globalCompositeOperation = 'lighter';*/
context_draw.lineCap = "square"; context_draw.lineCap = "square";
context_draw.lineWidth = makerSize ; context_draw.lineWidth = makerSize ;
...@@ -2505,12 +2659,14 @@ ...@@ -2505,12 +2659,14 @@
this.mousemove = function (ev) { this.mousemove = function (ev) {
if(isAddingMarking == true){ if(isAddingMarking == true){
if (tool.started) { if (tool.started && isPressLeftMouse == true) {
/*if(isMoveOutDrawCanvas == true){ if(isMoveOutDrawCanvas == true){
context_draw.moveTo(ev._x, ev._y); context_draw.moveTo(ev._x, ev._y);
sx = ev._x;
sy = ev._y;
isMoveOutDrawCanvas = false; isMoveOutDrawCanvas = false;
}*/ }
if(markingType == 'eraser') { if(markingType == 'eraser') {
//context.clearRect(ev._x, ev._y, ClientData.erase_size(), ClientData.erase_size()); //context.clearRect(ev._x, ev._y, ClientData.erase_size(), ClientData.erase_size());
...@@ -2561,7 +2717,8 @@ ...@@ -2561,7 +2717,8 @@
]; ];
if(sx > ev._x) { if(sx > ev._x) {
if(sy > ev._y) { if(sy > ev._y) {
/*context_draw.globalCompositeOperation = 'destination-out'; /*context_draw.beginPath();
context_draw.globalCompositeOperation = 'destination-out';
context_draw.moveTo(ptStart[1].x, ptStart[1].y); context_draw.moveTo(ptStart[1].x, ptStart[1].y);
context_draw.lineTo(ptStart[2].x, ptStart[2].y); context_draw.lineTo(ptStart[2].x, ptStart[2].y);
context_draw.lineTo(ptStart[3].x, ptStart[3].y); context_draw.lineTo(ptStart[3].x, ptStart[3].y);
...@@ -2572,7 +2729,7 @@ ...@@ -2572,7 +2729,7 @@
context_draw.lineCap = 'butt'; context_draw.lineCap = 'butt';
context_draw.fillStyle = "#" + makerColor; context_draw.fillStyle = "#" + makerColor;
context_draw.fill(); context_draw.fill();
context_draw.globalCompositeOperation = 'source-over'; context_draw.globalCompositeOperation = 'lighter';
context_draw.closePath(); context_draw.closePath();
context_draw.beginPath();*/ context_draw.beginPath();*/
// 左上に描画する場合 // 左上に描画する場合
...@@ -2584,7 +2741,8 @@ ...@@ -2584,7 +2741,8 @@
context_draw.lineTo(ptEnd[1].x, ptEnd[1].y); context_draw.lineTo(ptEnd[1].x, ptEnd[1].y);
context_draw.closePath(); context_draw.closePath();
} else if(sy < ev._y) { } else if(sy < ev._y) {
/*context_draw.globalCompositeOperation = 'destination-out'; /*context_draw.beginPath();
context_draw.globalCompositeOperation = 'destination-out';
context_draw.moveTo(ptStart[0].x, ptStart[0].y); context_draw.moveTo(ptStart[0].x, ptStart[0].y);
context_draw.lineTo(ptStart[1].x, ptStart[1].y); context_draw.lineTo(ptStart[1].x, ptStart[1].y);
context_draw.lineTo(ptStart[2].x, ptStart[2].y); context_draw.lineTo(ptStart[2].x, ptStart[2].y);
...@@ -2595,7 +2753,7 @@ ...@@ -2595,7 +2753,7 @@
context_draw.lineCap = 'butt'; context_draw.lineCap = 'butt';
context_draw.fillStyle = "#" + makerColor; context_draw.fillStyle = "#" + makerColor;
context_draw.fill(); context_draw.fill();
context_draw.globalCompositeOperation = 'source-over'; context_draw.globalCompositeOperation = 'lighter';
context_draw.closePath(); context_draw.closePath();
context_draw.beginPath();*/ context_draw.beginPath();*/
...@@ -2608,7 +2766,8 @@ ...@@ -2608,7 +2766,8 @@
context_draw.lineTo(ptEnd[0].x, ptEnd[0].y); context_draw.lineTo(ptEnd[0].x, ptEnd[0].y);
context_draw.closePath(); context_draw.closePath();
} else { } else {
/*context_draw.globalCompositeOperation = 'destination-out'; /*context_draw.beginPath();
context_draw.globalCompositeOperation = 'destination-out';
context_draw.moveTo(ptStart[1].x, ptStart[1].y); context_draw.moveTo(ptStart[1].x, ptStart[1].y);
context_draw.lineTo(ptStart[2].x, ptStart[2].y); context_draw.lineTo(ptStart[2].x, ptStart[2].y);
context_draw.lineTo(ptEnd[3].x, ptEnd[3].y); context_draw.lineTo(ptEnd[3].x, ptEnd[3].y);
...@@ -2617,7 +2776,7 @@ ...@@ -2617,7 +2776,7 @@
context_draw.lineCap = 'butt'; context_draw.lineCap = 'butt';
context_draw.fillStyle = "#" + makerColor; context_draw.fillStyle = "#" + makerColor;
context_draw.fill(); context_draw.fill();
context_draw.globalCompositeOperation = 'source-over'; context_draw.globalCompositeOperation = 'lighter';
context_draw.closePath(); context_draw.closePath();
context_draw.beginPath();*/ context_draw.beginPath();*/
...@@ -2630,7 +2789,8 @@ ...@@ -2630,7 +2789,8 @@
} }
} else if(sx < ev._x) { } else if(sx < ev._x) {
if(sy > ev._y) { if(sy > ev._y) {
/*context_draw.globalCompositeOperation = 'destination-out'; /*context_draw.beginPath();
context_draw.globalCompositeOperation = 'destination-out';
context_draw.moveTo(ptStart[2].x, ptStart[2].y); context_draw.moveTo(ptStart[2].x, ptStart[2].y);
context_draw.lineTo(ptStart[3].x, ptStart[3].y); context_draw.lineTo(ptStart[3].x, ptStart[3].y);
context_draw.lineTo(ptStart[0].x, ptStart[0].y); context_draw.lineTo(ptStart[0].x, ptStart[0].y);
...@@ -2641,7 +2801,7 @@ ...@@ -2641,7 +2801,7 @@
context_draw.lineCap = 'butt'; context_draw.lineCap = 'butt';
context_draw.fillStyle = "#" + makerColor; context_draw.fillStyle = "#" + makerColor;
context_draw.fill(); context_draw.fill();
context_draw.globalCompositeOperation = 'source-over'; context_draw.globalCompositeOperation = 'lighter';
context_draw.closePath(); context_draw.closePath();
context_draw.beginPath();*/ context_draw.beginPath();*/
...@@ -2654,7 +2814,8 @@ ...@@ -2654,7 +2814,8 @@
context_draw.lineTo(ptEnd[2].x, ptEnd[2].y); context_draw.lineTo(ptEnd[2].x, ptEnd[2].y);
context_draw.closePath(); context_draw.closePath();
} else if(sy < ev._y) { } else if(sy < ev._y) {
/*context_draw.globalCompositeOperation = 'destination-out'; /*context_draw.beginPath();
context_draw.globalCompositeOperation = 'destination-out';
context_draw.moveTo(ptStart[3].x, ptStart[3].y); context_draw.moveTo(ptStart[3].x, ptStart[3].y);
context_draw.lineTo(ptStart[0].x, ptStart[0].y); context_draw.lineTo(ptStart[0].x, ptStart[0].y);
context_draw.lineTo(ptStart[1].x, ptStart[1].y); context_draw.lineTo(ptStart[1].x, ptStart[1].y);
...@@ -2665,7 +2826,7 @@ ...@@ -2665,7 +2826,7 @@
context_draw.lineCap = 'butt'; context_draw.lineCap = 'butt';
context_draw.fillStyle = "#" + makerColor; context_draw.fillStyle = "#" + makerColor;
context_draw.fill(); context_draw.fill();
context_draw.globalCompositeOperation = 'source-over'; context_draw.globalCompositeOperation = 'lighter';
context_draw.closePath(); context_draw.closePath();
context_draw.beginPath();*/ context_draw.beginPath();*/
...@@ -2678,7 +2839,8 @@ ...@@ -2678,7 +2839,8 @@
context_draw.lineTo(ptEnd[3].x, ptEnd[3].y); context_draw.lineTo(ptEnd[3].x, ptEnd[3].y);
context_draw.closePath(); context_draw.closePath();
} else { } else {
/*context_draw.globalCompositeOperation = 'destination-out'; /*context_draw.beginPath();
context_draw.globalCompositeOperation = 'destination-out';
context_draw.moveTo(ptStart[3].x, ptStart[3].y); context_draw.moveTo(ptStart[3].x, ptStart[3].y);
context_draw.lineTo(ptStart[0].x, ptStart[0].y); context_draw.lineTo(ptStart[0].x, ptStart[0].y);
context_draw.lineTo(ptEnd[1].x, ptEnd[1].y); context_draw.lineTo(ptEnd[1].x, ptEnd[1].y);
...@@ -2687,7 +2849,7 @@ ...@@ -2687,7 +2849,7 @@
context_draw.lineCap = 'butt'; context_draw.lineCap = 'butt';
context_draw.fillStyle = "#" + makerColor; context_draw.fillStyle = "#" + makerColor;
context_draw.fill(); context_draw.fill();
context_draw.globalCompositeOperation = 'source-over'; context_draw.globalCompositeOperation = 'lighter';
context_draw.closePath(); context_draw.closePath();
context_draw.beginPath();*/ context_draw.beginPath();*/
...@@ -2700,7 +2862,8 @@ ...@@ -2700,7 +2862,8 @@
} }
} else { } else {
if(sy > ev._y) { if(sy > ev._y) {
/*context_draw.globalCompositeOperation = 'destination-out'; /*context_draw.beginPath();
context_draw.globalCompositeOperation = 'destination-out';
context_draw.moveTo(ptStart[2].x, ptStart[2].y); context_draw.moveTo(ptStart[2].x, ptStart[2].y);
context_draw.lineTo(ptStart[3].x, ptStart[3].y); context_draw.lineTo(ptStart[3].x, ptStart[3].y);
context_draw.lineTo(ptEnd[0].x, ptEnd[0].y); context_draw.lineTo(ptEnd[0].x, ptEnd[0].y);
...@@ -2709,7 +2872,7 @@ ...@@ -2709,7 +2872,7 @@
context_draw.lineCap = 'butt'; context_draw.lineCap = 'butt';
context_draw.fillStyle = "#" + makerColor; context_draw.fillStyle = "#" + makerColor;
context_draw.fill(); context_draw.fill();
context_draw.globalCompositeOperation = 'source-over'; context_draw.globalCompositeOperation = 'lighter';
context_draw.closePath(); context_draw.closePath();
context_draw.beginPath();*/ context_draw.beginPath();*/
...@@ -2720,7 +2883,8 @@ ...@@ -2720,7 +2883,8 @@
context_draw.lineTo(ptEnd[1].x, ptEnd[1].y); context_draw.lineTo(ptEnd[1].x, ptEnd[1].y);
context_draw.closePath(); context_draw.closePath();
} else if(sy < ev._y) { } else if(sy < ev._y) {
/*context_draw.globalCompositeOperation = 'destination-out'; /*context_draw.beginPath();
context_draw.globalCompositeOperation = 'destination-out';
context_draw.moveTo(ptStart[0].x, ptStart[0].y); context_draw.moveTo(ptStart[0].x, ptStart[0].y);
context_draw.lineTo(ptStart[1].x, ptStart[1].y); context_draw.lineTo(ptStart[1].x, ptStart[1].y);
context_draw.lineTo(ptEnd[2].x, ptEnd[2].y); context_draw.lineTo(ptEnd[2].x, ptEnd[2].y);
...@@ -2729,7 +2893,7 @@ ...@@ -2729,7 +2893,7 @@
context_draw.lineCap = 'butt'; context_draw.lineCap = 'butt';
context_draw.fillStyle = "#" + makerColor; context_draw.fillStyle = "#" + makerColor;
context_draw.fill(); context_draw.fill();
context_draw.globalCompositeOperation = 'source-over'; context_draw.globalCompositeOperation = 'lighter';
context_draw.closePath(); context_draw.closePath();
context_draw.beginPath();*/ context_draw.beginPath();*/
...@@ -2740,7 +2904,8 @@ ...@@ -2740,7 +2904,8 @@
context_draw.lineTo(ptEnd[3].x, ptEnd[3].y); context_draw.lineTo(ptEnd[3].x, ptEnd[3].y);
context_draw.closePath(); context_draw.closePath();
} else { } else {
/*context_draw.globalCompositeOperation = 'destination-out'; /*context_draw.beginPath();
context_draw.globalCompositeOperation = 'destination-out';
context_draw.moveTo(ptStart[0].x, ptStart[0].y); context_draw.moveTo(ptStart[0].x, ptStart[0].y);
context_draw.lineTo(ptStart[1].x, ptStart[1].y); context_draw.lineTo(ptStart[1].x, ptStart[1].y);
context_draw.lineTo(ptStart[2].x, ptStart[2].y); context_draw.lineTo(ptStart[2].x, ptStart[2].y);
...@@ -2749,7 +2914,7 @@ ...@@ -2749,7 +2914,7 @@
context_draw.lineCap = 'butt'; context_draw.lineCap = 'butt';
context_draw.fillStyle = "#" + makerColor; context_draw.fillStyle = "#" + makerColor;
context_draw.fill(); context_draw.fill();
context_draw.globalCompositeOperation = 'source-over'; context_draw.globalCompositeOperation = 'lighter';
context_draw.closePath(); context_draw.closePath();
context_draw.beginPath();*/ context_draw.beginPath();*/
...@@ -2798,8 +2963,9 @@ ...@@ -2798,8 +2963,9 @@
if (tool.started) { if (tool.started) {
//tool.mousemove(ev); //tool.mousemove(ev);
tool.started = false; //tool.started = false;
//context_draw.closePath(); //context_draw.closePath();
isMoveOutDrawCanvas = true;
} }
/*if(isPressLeftMouse == true){ /*if(isPressLeftMouse == true){
...@@ -2888,12 +3054,17 @@ ...@@ -2888,12 +3054,17 @@
} }
} }
$(document).mouseup(function(e){
if(e.which == 1) isPressLeftMouse = false
});
/* handle display page from book mark page */ /* handle display page from book mark page */
function handleFromBookMarkPage(){ function handleFromBookMarkPage(){
/* check exist pageno */ /* check exist pageno */
if(ClientData.bookmark_pageNo()){ if(ClientData.bookmark_pageNo()){
changePage(changePageNo(ClientData.bookmark_pageNo())); changePage(changePageNo(ClientData.bookmark_pageNo()));
LocalStorageUtils.remove(Keys.bookmark_pageNo); //LocalStorageUtils.remove(Keys.bookmark_pageNo);
ClientData.bookmark_pageNo(null)
} }
} }
...@@ -2908,8 +3079,10 @@ ...@@ -2908,8 +3079,10 @@
/* check exist pageno */ /* check exist pageno */
if(ClientData.common_prePageNo()){ if(ClientData.common_prePageNo()){
changePage(changePageNo(ClientData.common_prePageNo())); //changePage(changePageNo(ClientData.common_prePageNo()));
LocalStorageUtils.remove(Keys.common_prePageNo); changePageWithoutSlide(changePageNo(ClientData.common_prePageNo()));
//LocalStorageUtils.remove(Keys.common_prePageNo);
ClientData.common_prePageNo(null)
} }
} }
...@@ -2926,7 +3099,8 @@ function oldContent_Back(){ ...@@ -2926,7 +3099,8 @@ function oldContent_Back(){
var oldContent = oldDataBack[oldDataBack.length - 1]; var oldContent = oldDataBack[oldDataBack.length - 1];
/*move to page */ /*move to page */
changePage(oldContent.oldPageIndex); //changePage(oldContent.oldPageIndex);
changePageWithoutSlide(oldContent.oldPageIndex);
/*remove*/ /*remove*/
oldDataBack.splice(oldDataBack.length - 1,1); oldDataBack.splice(oldDataBack.length - 1,1);
...@@ -3063,47 +3237,47 @@ function oldContent_Back(){ ...@@ -3063,47 +3237,47 @@ function oldContent_Back(){
} }
/* handle keydown */ /* handle keydown */
$(document).keydown(function(e){ $(document).keydown(function (e) {
/* set fag true when click ctrl */ /* set fag true when click ctrl */
if(e.ctrlKey){ if (e.ctrlKey) {
ctrlMode = true; ctrlMode = true;
} }
/* set hot key */ /* set hot key */
if(ctrlMode == true){ if (ctrlMode == true) {
if(ClientData.IsAddingMarking() == true || isLoadingObject == true){ if (ClientData.IsAddingMarking() == true || isLoadingObject == true) {
/* do nothing*/ /* do nothing*/
}else{ } else {
switch (e.keyCode) { switch (e.keyCode) {
/* move page */ /* move page */
case 37: /* move prev */ case ShortKeys.MovePrevious: /* move prev */
if(getContent().hasPreviousPage()){ if (getContent().hasPreviousPage()) {
prevPage_click(); prevPage_click();
} }
break; break;
case 39: /* move next */ case ShortKeys.MoveNext: /* move next */
if(getContent().hasNextPage()){ if (getContent().hasNextPage()) {
nextPage_click(); nextPage_click();
} }
break; break;
/* zoom */ /* zoom */
case 188: /* zoomIn */ case ShortKeys.ZoomIn: /* zoomIn */
zoomIn(); zoomIn();
break; break;
case 190: /* zoomOut */ case ShortKeys.ZoomOut: /* zoomOut */
zoomOut(); zoomOut();
break; break;
case 13: /* screenFit*/ case ShortKeys.ZoomFit: /* screenFit*/
screenFit(); screenFit();
break; break;
/* marking && toolbar */ /* marking && toolbar */
case 219: /* handle toolbar */ case ShortKeys.ShowHideToolbar: /* handle toolbar */
handleDisplayToolbar(); handleDisplayToolbar();
break; break;
case 221: /* hide marking */ case ShortKeys.ShowHideMarking: /* hide marking */
imgmarking_click(); imgmarking_click();
break; break;
} }
...@@ -3200,6 +3374,47 @@ function oldContent_Back(){ ...@@ -3200,6 +3374,47 @@ function oldContent_Back(){
} }
} }
function changePageWithoutSlide(pageMove){
disableAllControl();
$('#divImageLoading').css('display','block');
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{contentId: contentID,sid:ClientData.userInfo_sid(),pageNo:pageMove + 1},
function(data){
pageImages = data;
/* get page Objects */
getPageObjectsByPageIndex(pageObjectsData,pageMove);
getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects)
$('#divImageLoading').css('display','none');
isFirstLoad = true;
// screenFit();
getContent().toPage(pageMove);
//changeSlider(pageMove);
/* handle slider bar */
handleSliderBar();
if(dataPageTitle[pageMove]){
if(dataPageTitle[pageMove] != ''){
document.title = contentName + '_' + dataPageTitle[pageMove] + ' | ' + i18nText('sysAppTitle');
}else{
document.title = contentName + ' | ' + i18nText('sysAppTitle');
}
}else{
document.title = contentName + ' | ' + i18nText('sysAppTitle');
}
},
function(xmlHttpRequest, txtStatus, errorThrown) {
showErrorScreen();
});
}
function initPage(){ function initPage(){
//$('body,html').animate({ scrollTop: 0 }, 350); //$('body,html').animate({ scrollTop: 0 }, 350);
...@@ -3216,7 +3431,7 @@ function oldContent_Back(){ ...@@ -3216,7 +3431,7 @@ function oldContent_Back(){
/* check login */ /* check login */
if (!avwCheckLogin(ScreenIds.Login)) return; if (!avwCheckLogin(ScreenIds.Login)) return;
// Set event to prevent leave // Set event to prevent leave
avwSetLogoutNortice(); ToogleLogoutNortice();
// Lock screen // Lock screen
LockScreen(); LockScreen();
...@@ -3300,6 +3515,8 @@ function oldContent_Back(){ ...@@ -3300,6 +3515,8 @@ function oldContent_Back(){
/* window resize event */ /* window resize event */
$(window).resize(function() { $(window).resize(function() {
sizingScreen(); sizingScreen();
/* close dialog popuptext */
closeDialogPopUpText();
}); });
...@@ -3308,8 +3525,15 @@ function oldContent_Back(){ ...@@ -3308,8 +3525,15 @@ function oldContent_Back(){
nAjaxLoad ++; nAjaxLoad ++;
if(nAjaxLoad == 7){ if(nAjaxLoad == 7){
/* handle from bookmark page */
//handleFromBookMarkPage();
/* check move content */ /* check move content */
if(ClientData.common_prePageNo()){ if(ClientData.bookmark_pageNo()){
//changePage(changePageNo(ClientData.bookmark_pageNo()));
changePageWithoutSlide(changePageNo(ClientData.bookmark_pageNo()));
ClientData.bookmark_pageNo(null)
}else if(ClientData.common_prePageNo()){
/* handle from jump content */ /* handle from jump content */
handleFromJumpContent(); handleFromJumpContent();
}else if (ClientData.IsJumpBack() == true){ }else if (ClientData.IsJumpBack() == true){
...@@ -3324,13 +3548,16 @@ function oldContent_Back(){ ...@@ -3324,13 +3548,16 @@ function oldContent_Back(){
/* set pageTitle*/ /* set pageTitle*/
if(dataPageTitle[0]){ if(dataPageTitle[0]){
if(dataPageTitle[0] != ''){ if(dataPageTitle[0] != ''){
document.title = contentName + '_' + dataPageTitle[0]; document.title = contentName + '_' + dataPageTitle[0] + ' | ' + i18nText('sysAppTitle');
}else{ }else{
document.title = contentName; document.title = contentName + ' | ' + i18nText('sysAppTitle');
} }
}else{ }else{
document.title = contentName; document.title = contentName + ' | ' + i18nText('sysAppTitle');
} }
/* handle slider bar */
handleSliderBar();
} }
} }
...@@ -3338,6 +3565,15 @@ function oldContent_Back(){ ...@@ -3338,6 +3565,15 @@ function oldContent_Back(){
$(window).resize(function() { $(window).resize(function() {
resizeScreen(); resizeScreen();
isChangeSizeScreen = false; isChangeSizeScreen = false;
if(isTouchDevice() == true){
if (!$("#divDialogMemo").is(":hidden")) {
$("#divDialogMemo").css('left','30%');
$("#divDialogMemo").css('top','30%');
}
}
/* close dialog popuptext */
closeDialogPopUpText();
}); });
/* check status button */ /* check status button */
...@@ -3351,18 +3587,12 @@ function oldContent_Back(){ ...@@ -3351,18 +3587,12 @@ function oldContent_Back(){
initImageMemo(); initImageMemo();
initImageAddMemo(); initImageAddMemo();
/* handle slider bar */
handleSliderBar();
/* init image had draw */ /* init image had draw */
initDisplayMarking(); initDisplayMarking();
/* check status */ /* check status */
checkStatusImageMarking(); checkStatusImageMarking();
/* handle from bookmark page */
handleFromBookMarkPage();
trackTransforms(context_main); trackTransforms(context_main);
nAjaxLoad = 0; nAjaxLoad = 0;
...@@ -3398,6 +3628,10 @@ function oldContent_Back(){ ...@@ -3398,6 +3628,10 @@ function oldContent_Back(){
<div id="dialog" class="web_dialog"> <div id="dialog" class="web_dialog">
</div> </div>
<div id="divCheckExistMarking" class="check_marking" style="display:none">
<img src="img/list/pic_2.png" />
</div>
<header id ="header_toolbar" class="header"> <header id ="header_toolbar" class="header">
<div class = "wrapper_header"> <div class = "wrapper_header">
......
...@@ -182,7 +182,7 @@ div .ui-slider-range, .ui-widget-header, .ui-slider-range-max { ...@@ -182,7 +182,7 @@ div .ui-slider-range, .ui-widget-header, .ui-slider-range-max {
width:60%; width:60%;
height:80%; height:80%;
left: 20%; left: 20%;
top: 2%; top: 10%;
background-color: black; background-color: black;
/*border: 2px solid #336699;*/ /*border: 2px solid #336699;*/
padding: 0px; padding: 0px;
...@@ -430,7 +430,7 @@ div .ui-slider-range, .ui-widget-header, .ui-slider-range-max { ...@@ -430,7 +430,7 @@ div .ui-slider-range, .ui-widget-header, .ui-slider-range-max {
border-style: solid; border-style: solid;
width: 0; width: 0;
height: 0; height: 0;
border-width: 20px 20px 20px 20px; border-width: 18px 18px 18px 18px;
} }
/* HOVER STYLES */ /* HOVER STYLES */
.pop-up-memo { .pop-up-memo {
...@@ -450,6 +450,13 @@ div .ui-slider-range, .ui-widget-header, .ui-slider-range-max { ...@@ -450,6 +450,13 @@ div .ui-slider-range, .ui-widget-header, .ui-slider-range-max {
text-decoration: underline; text-decoration: underline;
} }
.check_marking{
top:70px;
left:20px;
position:absolute;
background-color: white;
}
/*------------------Control Pen------------------------*/ /*------------------Control Pen------------------------*/
.rayermenu1 .rayermenu1
{ {
......
...@@ -65,7 +65,7 @@ body{ ...@@ -65,7 +65,7 @@ body{
article{ article{
width:898px; width:898px;
height:655px; height:680px;
border:1px solid #cccccc; border:1px solid #cccccc;
padding:0; padding:0;
display:block; display:block;
...@@ -166,7 +166,7 @@ section div#user_info .passchgbtn a:hover:not(:target) { ...@@ -166,7 +166,7 @@ section div#user_info .passchgbtn a:hover:not(:target) {
div#user_option{ div#user_option{
width:inherit; width:inherit;
height:370px; height:395px;
background:url(../img/common/back_dot.gif); background:url(../img/common/back_dot.gif);
-moz-border-radius:6px; -moz-border-radius:6px;
-webkit-border-radius:6px; -webkit-border-radius:6px;
......
...@@ -66,8 +66,8 @@ header{ ...@@ -66,8 +66,8 @@ header{
/*overflow:hidden;*/ /*overflow:hidden;*/
width:100%; width:100%;
position:absolute; position:absolute;
top:0; top:0px;
left: 0; left: 0px;
} }
.wrapper_header{ .wrapper_header{
...@@ -134,6 +134,17 @@ header{ ...@@ -134,6 +134,17 @@ header{
.hdLcolumn a.marking{background-position:-368px 0;} .hdLcolumn a.marking{background-position:-368px 0;}
.hdLcolumn a.markingToolbar{background-position:-414px 0;margin:0 0 0 11px;} .hdLcolumn a.markingToolbar{background-position:-414px 0;margin:0 0 0 11px;}
.hdLcolumn a.home_device{background-position:0 0;}
.hdLcolumn a.back_device{background-position:-46px 0;margin:0 0 0 11px;}
.hdLcolumn a.bmList_device{background-position:-92px 0;}
.hdLcolumn a.bmAdd_device{background-position:-138px 0;margin:0 0 0 11px;}
.hdLcolumn a.index_device{background-position:-184px 0;}
.hdLcolumn a.copy_device{background-position:-230px 0;}
.hdLcolumn a.memoDisplay_device{background-position:-276px 0;}
.hdLcolumn a.memoAdd_device{background-position:-322px 0;margin:0 0 0 11px;}
.hdLcolumn a.marking_device{background-position:-368px 0;}
.hdLcolumn a.markingToolbar_device{background-position:-414px 0;margin:0 0 0 11px;}
/*オンマウス時*/ /*オンマウス時*/
.hdLcolumn a:hover.home{background-position:0 -92px;} .hdLcolumn a:hover.home{background-position:0 -92px;}
.hdLcolumn a:hover.back{background-position:-46px -92px;} .hdLcolumn a:hover.back{background-position:-46px -92px;}
...@@ -213,7 +224,7 @@ header{ ...@@ -213,7 +224,7 @@ header{
width:100%; width:100%;
height:60px; height:60px;
position:fixed; position:fixed;
bottom:0; bottom:0%;
} }
...@@ -228,8 +239,8 @@ header{ ...@@ -228,8 +239,8 @@ header{
width:100%; width:100%;
height:60px; height:60px;
position:absolute; position:absolute;
bottom:0; bottom:0%;
left: 0; left: 0%;
} }
.ftinner{ .ftinner{
...@@ -1054,6 +1065,17 @@ aside.bookmarkBox .last{ ...@@ -1054,6 +1065,17 @@ aside.bookmarkBox .last{
.transition .last {width:56px;background-position:-174px 0;} .transition .last {width:56px;background-position:-174px 0;}
.transition a:hover.last {background-position:-174px -33px;} .transition a:hover.last {background-position:-174px -33px;}
.transition .begin_device {width:59px;background-position:0 -33px;}
.transition .prev_device {width:57px;background-position:-59px -33px;}
.transition .next_device {width:58px;background-position:-116px -33px;}
.transition .last_device {width:56px;background-position:-174px -33px;}
.transition .begin_off {width:59px;background-position:0 0;}
.transition .prev_off {width:57px;background-position:-59px 0;}
.transition .next_off {width:58px;background-position:-116px 0;}
.transition .last_off {width:56px;background-position:-174px 0;}
/*----------------------------*/ /*----------------------------*/
/* 13. sizing setting */ /* 13. sizing setting */
/*----------------------------*/ /*----------------------------*/
...@@ -1087,8 +1109,12 @@ aside.bookmarkBox .last{ ...@@ -1087,8 +1109,12 @@ aside.bookmarkBox .last{
.sizing .reduction {width:56px;background-position:-117px 0;} .sizing .reduction {width:56px;background-position:-117px 0;}
.sizing a:hover.reduction {background-position:-117px -33px;} .sizing a:hover.reduction {background-position:-117px -33px;}
.sizing .expansion_device {width:59px;background-position:0 -33px;}
.sizing .fit_device {width:58px;background-position:-59px -33px;}
.sizing .reduction_device {width:56px;background-position:-117px -33px;}
.sizing .expansion_off {width:59px;background-position:0 0;} .sizing .expansion_off {width:59px;background-position:0 0;}
.sizing .fit_off {width:58px;background-position:-59px 0;}
.sizing .reduction_off {width:56px;background-position:-117px 0;} .sizing .reduction_off {width:56px;background-position:-117px 0;}
/*----------------------------*/ /*----------------------------*/
/* 14. toolbar setting */ /* 14. toolbar setting */
...@@ -1106,6 +1132,17 @@ aside.bookmarkBox .last{ ...@@ -1106,6 +1132,17 @@ aside.bookmarkBox .last{
margin:0 0 0 10px; margin:0 0 0 10px;
} }
.toolbar_device {
background:url(../img/viewer/toolbarbtn.png) 0 -60px no-repeat;
width:60px;
height:0;
padding-top:60px;
display:block;
overflow:hidden;
font-size:0;
margin:0 0 0 10px;
}
.toolbar_off { .toolbar_off {
background:url(../img/viewer/toolbarbtn.png) 0 -120px no-repeat; background:url(../img/viewer/toolbarbtn.png) 0 -120px no-repeat;
width:60px; width:60px;
......
...@@ -141,9 +141,9 @@ ...@@ -141,9 +141,9 @@
<ul> <ul>
<li><span class="lang" lang="txtSort">並べ替え</span><span><b>|</b></span></li> <li><span class="lang" lang="txtSort">並べ替え</span><span><b>|</b></span></li>
<li><a class="active_tops lang" id="control-sort-title" lang="dspTitleNm">タイトル名</a><span id="title-sorttype"> </span><span><b>|</b></span></li> <li><a class="lang" id="control-sort-title" lang="dspTitleNm">タイトル名</a><span id="title-sorttype"> </span><span><b>|</b></span></li>
<li><a id="control-sort-titlekana" class="lang" lang="dspTitleNmKn" >タイトル名(かな)</a><span id="titlekana-sorttype"> </span><span id="separate"><b>|</b></span></li> <li><a id="control-sort-titlekana" class="lang" lang="dspTitleNmKn" >タイトル名(かな)</a><span id="titlekana-sorttype"> </span><span id="separate"><b>|</b></span></li>
<li><a id="control-sort-releasedate" class="lang" lang="txtPubDt" >公開日</a><span id="rDate-sorttype"> </span></li> <li><a id="control-sort-releasedate" class="active_tops lang" lang="txtPubDt" >公開日</a><span id="rDate-sorttype"> </span></li>
</ul> </ul>
<p> <p>
<label id="dispPage" class="pageNumControl" style="visibility: hidden"> </label> <label id="dispPage" class="pageNumControl" style="visibility: hidden"> </label>
......
...@@ -23,13 +23,16 @@ ...@@ -23,13 +23,16 @@
// Init function of page // Init function of page
$(document).ready(function () { $(document).ready(function () {
// Synchronize bookmarks with server
SyncContent();
if (!avwCheckLogin(ScreenIds.Login)) return; if (!avwCheckLogin(ScreenIds.Login)) return;
LockScreen(); LockScreen();
// Synchronize bookmarks with server
SyncContent();
// Collection all detail of pages
bookmark_collectAllPages();
document.title = i18nText('dspShiori') + ' | ' + i18nText('sysAppTitle'); document.title = i18nText('dspShiori') + ' | ' + i18nText('sysAppTitle');
// Set bookmark screen // Set bookmark screen
...@@ -219,13 +222,15 @@ function dspDelete_Click() { ...@@ -219,13 +222,15 @@ function dspDelete_Click() {
lockLayout(); lockLayout();
$("#delete_shiori").show(); $("#delete_shiori").show();
$("#delete_shiori").center(); $("#delete_shiori").center();
//$('#dlgConfirm').dialog('open');
//$(".ui-dialog-titlebar").hide();
} }
} }
// Show detail content // Show detail content
function ShowBookmark() { function ShowBookmark() {
if (avwHasError()) {
return;
}
else {
var hasMemo = false; var hasMemo = false;
var hasMarking = false; var hasMarking = false;
var contentid = ""; var contentid = "";
...@@ -236,7 +241,7 @@ function ShowBookmark() { ...@@ -236,7 +241,7 @@ function ShowBookmark() {
$("#dspDelete1").show(); $("#dspDelete1").show();
} }
//TotalThread = ClientData.BookMarkData().length; //TotalThread = ClientData.BookMarkData().length;
for (var nIndex = ClientData.BookMarkData().length - 1; nIndex >= 0 ; nIndex--) { for (var nIndex = ClientData.BookMarkData().length - 1; nIndex >= 0; nIndex--) {
hasMarking = false; hasMarking = false;
hasMemo = false; hasMemo = false;
...@@ -260,18 +265,42 @@ function ShowBookmark() { ...@@ -260,18 +265,42 @@ function ShowBookmark() {
hasMemo = true; hasMemo = true;
} }
} }
// if (IsErrorPage(contentid, pageNo)) {
// insertRowError(contentid, htmlEncode(ClientData.BookMarkData()[nIndex].contentTitle), pageNo);
// }
// else {
// callApi.execute(contentid, ClientData.userInfo_sid(), pageNo, hasMemo, hasMarking, htmlEncode(ClientData.BookMarkData()[nIndex].contentTitle), nIndex);
// }
callApi.execute(contentid, ClientData.userInfo_sid(), pageNo, hasMemo, hasMarking, htmlEncode(ClientData.BookMarkData()[nIndex].contentTitle), nIndex); var pageDetail;
var contentTitle = "";
var contentTitleKana = "";
// Search current page if collection that get details before
for (var nIndex2 = 0; nIndex2 < collection_contents.length; nIndex2++) {
if (collection_contents[nIndex2].contentid == contentid) {
contentTitle = collection_contents[nIndex2].contentTitle;
contentTitleKana = collection_contents[nIndex2].contentTitleKana;
// Search in pages
for (var nIndex3 = 0; nIndex3 < collection_contents[nIndex2].pages.length; nIndex3++) {
if (pageNo == collection_contents[nIndex2].pages[nIndex3].pageNo) {
pageDetail = collection_contents[nIndex2].pages[nIndex3];
break;
}
}
}
}
if (pageDetail) {
// If bookmark does not exist
if (pageDetail.existed == true) {
// Show normal
UpdateBookmark(contentid, pageDetail.pageNo, contentTitle, contentTitleKana);
insertRow(contentid, "data:image/jpeg;base64," + pageDetail.pageThumbnail, htmlEncode(contentTitle), pageDetail.pageText, pageDetail.pageNo, hasMemo, hasMarking, nIndex);
}
else {
// Not existed -> Show error
insertRowError(contentid, htmlEncode(contentTitle), pageDetail.pageNo);
}
}
} }
$("a[name='dspRead']").unbind('click'); $("a[name='dspRead']").unbind('click');
$("a[name='dspRead']").click(dspRead_Click); $("a[name='dspRead']").click(dspRead_Click);
}
} }
// Hide all sorting symbol // Hide all sorting symbol
function HideSorting() { function HideSorting() {
...@@ -481,52 +510,6 @@ function UpdateBookmark(contentid, pageNo, contentTitle, contentTitleKana) { ...@@ -481,52 +510,6 @@ function UpdateBookmark(contentid, pageNo, contentTitle, contentTitleKana) {
ClientData.BookMarkData(arrBookmarks); ClientData.BookMarkData(arrBookmarks);
} }
// Call API controller
var callApi = {
contentid: "",
pageNo: 0,
execute: function (contentid, sid, pageNo, hasMemo, hasMarking, contentTitle, index) {
this.contentid = contentid;
this.pageNo = pageNo;
avwCmsApiSync(ClientData.userInfo_accountPath(), "webContentPage", "GET", { contentId: contentid, sid: sid, pageNos: pageNo, thumbnailFlg: 1 },
function (data) {
if (data.pages.length == 0) {
// Page does not exist
AddErrorPage(contentid, pageNo);
insertRowError(contentid, htmlEncode(contentTitle), pageNo);
}
else {
// Update local title to be equal to server
UpdateBookmark(contentid, pageNo, data.contentTitle, data.contentTitleKana);
contentTitle = data.contentTitle;
// Insert to grid
insertRow(contentid, "data:image/jpeg;base64," + data.pages[0].pageThumbnail, htmlEncode(contentTitle), data.pages[0].pageText, pageNo, hasMemo, hasMarking, index);
}
/*
// Update local title to be equal to server
UpdateBookmark(contentid, pageNo, data.contentTitle, data.contentTitleKana);
contentTitle = data.contentTitle;
for (var nIndex2 = 0; nIndex2 < data.pages.length; nIndex2++) {
if (pageNo == data.pages[nIndex2].pageNo) {
// Update bookmark
// Insert to grid
insertRow(contentid, "data:image/jpeg;base64," + data.pages[nIndex2].pageThumbnail, htmlEncode(contentTitle), data.pages[nIndex2].pageText, pageNo, hasMemo, hasMarking, index);
//TotalThread--;
break;
}
}
$("a[name='dspRead']").unbind('click');
$("a[name='dspRead']").click(dspRead_Click);
*/
},
null
);
}
}
/* /*
Insert error row Insert error row
...@@ -535,25 +518,6 @@ function insertRowError(contentid, pageTitle, pageNo) { ...@@ -535,25 +518,6 @@ function insertRowError(contentid, pageTitle, pageNo) {
var newRow = ""; var newRow = "";
// newRow += "<tr>";
// newRow += "<td id='check'>";
// newRow += "<input type='checkbox' name='chkDelete' value='{\"contentid\":" + contentid + ", \"pageNo\":" + pageNo + "}'/>";
// newRow += "</td>";
// newRow += "<td colspan='2'>";
// newRow += '<div><label id="Label1">' + pageTitle + '</label></div>';
// newRow += "<label class='lang bookmarl_deleted' lang='msgShioriDeleted'>" + i18nText('msgShioriDeleted') + "</label>";
// newRow += "</td>";
// newRow += "<td>";
// newRow += "</td>";
// newRow += "<td>";
//
// newRow += "</td>";
// newRow += "<td>";
// newRow += "</td>";
// newRow += "</tr>";
// $('#grid').append(newRow);
newRow += "<section>"; newRow += "<section>";
newRow += " <div class='cnt_section'>"; newRow += " <div class='cnt_section'>";
newRow += " <div class='check'>"; newRow += " <div class='check'>";
...@@ -649,53 +613,10 @@ function insertRow(contentid, pageThumbnail, pageTitle, pageText, pageNo, hasMem ...@@ -649,53 +613,10 @@ function insertRow(contentid, pageThumbnail, pageTitle, pageText, pageNo, hasMem
newRow += "</ul>"; newRow += "</ul>";
newRow += "</div>"; newRow += "</div>";
newRow += "</div>"; newRow += "</div>";
//newRow += "<button class='button lang' name='dspRead' value='{\"contentid\":" + contentid + ", \"pageNo\":" + pageNo + "}' lang='dspRead'>読む</button>";
newRow += "</div>"; newRow += "</div>";
newRow += "</section>"; newRow += "</section>";
//var chks = $("input[name='chkDelete']");
$('#pnlTop').after(newRow); $('#pnlTop').after(newRow);
/*
if (chks.length == 0) {
// Add first row
$('#grid').append(newRow);
}
else {
// From second row
for (var nIndex = 0; nIndex < chks.length; nIndex++) {
var row = $(chks[nIndex]).parent().parent();
var data = JSON.parse(chks[nIndex].value);
if (index <= data.index) {
row.before(newRow);
break;
}
else {
// Add to last position
if (nIndex >= chks.length - 1) {
row.after(newRow);
break;
}
else { // Between
var data1 = JSON.parse(chks[nIndex + 1].value);
if (index > data.index && index <= data1.index) {
row.after(newRow);
break;
}
else {
// Nothing
}
}
}
}
}
//$('#grid tr:last').after(newRow);
//$('#grid').append(newRow);
//$('#grid tr:last').eq(index).after(newRow);
*/
} }
...@@ -713,16 +634,6 @@ Setting dialog [start] ...@@ -713,16 +634,6 @@ Setting dialog [start]
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
*/ */
$(function () { $(function () {
// $('#dlgConfirm').dialog({
// autoOpen: false,
// modal: true,
// resizable: false,
// width: 550,
// height: 200,
// minWidth: 550,
// minHeight: 200
// });
$("#dspTitleNm").click(dspTitleNm_Click); $("#dspTitleNm").click(dspTitleNm_Click);
$("#dspTitleNmKn").click(dspTitleNmKn_Click); $("#dspTitleNmKn").click(dspTitleNmKn_Click);
...@@ -737,23 +648,79 @@ $(function () { ...@@ -737,23 +648,79 @@ $(function () {
$("#dspTitleNmKn").show(); $("#dspTitleNmKn").show();
$("#dspTitleNmKn_Seperate").show(); $("#dspTitleNmKn_Seperate").show();
} }
// LockScreen();
}); });
// Contains non-exist pages
var bookmark_errorPages;
// Contains non-exist content // Contains non-exist content
var bookmark_errorContent; var bookmark_errorContent = [];
// Contain contents // Contain contents
var collection_contents; var collection_contents = [];
/*
Get all detail pages of content in bookmark
*/
function bookmark_collectAllPages() {
var arrBookMarks = ClientData.BookMarkData();
for (var nIndex = 0; nIndex < collection_contents.length; nIndex++) {
var contentid = collection_contents[nIndex].contentid;
var pages = [];
// Collect all pages of current content
for (var nIndex1 = 0; nIndex1 < arrBookMarks.length; nIndex1++) {
// Found content
if (arrBookMarks[nIndex1].contentid == contentid) {
pages.push({ pageNo: arrBookMarks[nIndex1].pageNo, pageText: "", pageThumbnail: "", existed: false });
}
}
// Add collected pages to content
collection_contents[nIndex].pages = pages;
// Join pages to request to server
var strPageNos = buildPageNos(collection_contents[nIndex].pages);
// Contain pages // Call api to get all details of pages 1 time
var collection_pages; avwCmsApiSync(ClientData.userInfo_accountPath(), "webContentPage", "GET",
{ contentId: contentid, sid: ClientData.userInfo_sid(), pageNos: strPageNos, thumbnailFlg: 1 },
function (data) {
collection_contents[nIndex].contentTitle = data.contentTitle;
collection_contents[nIndex].contentTitleKana = data.contentTitleKana;
for (var nIndex2 = 0; nIndex2 < collection_contents[nIndex].pages.length; nIndex2++) {
var comparePageNo = collection_contents[nIndex].pages[nIndex2].pageNo;
for (var nIndex3 = 0; nIndex3 < data.pages.length; nIndex3++) {
if (comparePageNo == data.pages[nIndex2].pageNo) {
// Set flag to determine page existed
collection_contents[nIndex].pages[nIndex2].existed = true;
// Store detail of page
collection_contents[nIndex].pages[nIndex2].pageText = data.pages[nIndex2].pageText;
collection_contents[nIndex].pages[nIndex2].pageThumbnail = data.pages[nIndex2].pageThumbnail;
}
}
}
},
null
);
}
}
/*
Build pageNos
*/
function buildPageNos(pages) {
var strResult = "";
for (var nIndex = 0; nIndex < pages.length; nIndex++) {
if (strResult == "") {
strResult = "" + pages[nIndex].pageNo;
}
else {
strResult += "," + pages[nIndex].pageNo;
}
}
return strResult;
}
/* /*
Check a content is error or not Check a content is error or not
...@@ -785,33 +752,7 @@ function IsOKCheckedContent(strContentId) { ...@@ -785,33 +752,7 @@ function IsOKCheckedContent(strContentId) {
return isOK; return isOK;
} }
/* // Add OK checked content
Check a page is error or not (error pages were checked before)
*/
function IsErrorPage(strContentId, strPageNo) {
var isError = false;
for (var nIndex = 0; nIndex < bookmark_errorPages.length; nIndex++) {
if (strContentId == bookmark_errorPages[nIndex].contentid
&& strPageNo == bookmark_errorPages[nIndex].pageNo) {
isError = true;
break;
}
}
return isError;
}
function AddErrorPage(strContentId, strPageNo) {
var isFound = false;
for (var nIndex = 0; nIndex < collection_pages.length; nIndex++) {
if (collection_pages[nIndex].contentid == strContentId && collection_pages[nIndex].pageNo == strPageNo) {
isFound = true;
}
}
if (!isFound) {
var onePair = { contentid: strContentId, pageNo: strPageNo };
bookmark_errorPages.push(onePair);
}
}
function AddContent(strContentId) { function AddContent(strContentId) {
var isFound = false; var isFound = false;
for (var nIndex = 0; nIndex < collection_contents.length; nIndex++) { for (var nIndex = 0; nIndex < collection_contents.length; nIndex++) {
...@@ -822,71 +763,7 @@ function AddContent(strContentId) { ...@@ -822,71 +763,7 @@ function AddContent(strContentId) {
} }
// Add to bufer if it does not exist // Add to bufer if it does not exist
if(!isFound) { if(!isFound) {
collection_contents.push({ contentid: strContentId }); collection_contents.push({ contentid: strContentId, contentTitle: "", contentTitleKana: "", pages: [] });
}
}
function SyncPages() {
for (var nIndex = 0; nIndex < collection_contents.length; nIndex++) {
// Get one content
var oneContent = collection_contents[nIndex];
var params = {
sid: ClientData.userInfo_sid(),
contentId: oneContent.contentid,
thumbnailFlg: 0
}
var webContentPage;
// Get all pages of content
avwCmsApiSync(ClientData.userInfo_accountPath(), "webContentPage", 'GET', params,
function (data) {
// Success
if (data.pages) {
webContentPage = data.pages;
}
}, null);
if (webContentPage) {
if (webContentPage.length > 0) {
var arrBookmarks = ClientData.BookMarkData();
for (var nIndex1 = 0; nIndex1 < arrBookmarks.length; nIndex1++) {
// Get one bookmar entity
var oneBookMark = arrBookmarks[nIndex1];
// Found contentid
if (oneBookMark.contentid == oneContent.contentid) {
var isFoundPage = false;
for (var nIndex2 = 0; nIndex2 < webContentPage.length; nIndex2++) {
if (oneBookMark.pageNo == webContentPage[nIndex2].pageNo) {
// Found pageNo
isFoundPage = true;
break;
}
}
if (!isFoundPage) {
AddErrorPage(oneBookMark.contentid, oneBookMark.pageNo);
}
}
}
}
else { // webContentPage.length = 0
var arrBookmarks = ClientData.BookMarkData();
for (var nIndex1 = 0; nIndex1 < arrBookmarks.length; nIndex1++) {
// Get one bookmar entity
var oneBookMark = arrBookmarks[nIndex1];
if (oneBookMark.contentid == oneContent.contentid) {
AddErrorPage(oneBookMark.contentid, oneBookMark.pageNo);
}
}
}
}
} }
} }
...@@ -924,14 +801,10 @@ Synchronize bookmark with server ...@@ -924,14 +801,10 @@ Synchronize bookmark with server
*/ */
function SyncContent() { function SyncContent() {
// Reset error pages
bookmark_errorPages = [];
// Reset error contents // Reset error contents
bookmark_errorContent = []; bookmark_errorContent = [];
// Reset array of pages // Reset ok checked content
collection_pages = [];
collection_contents = []; collection_contents = [];
// Get bookmarks from local storage // Get bookmarks from local storage
...@@ -947,12 +820,19 @@ function SyncContent() { ...@@ -947,12 +820,19 @@ function SyncContent() {
// If content is ok + checked // If content is ok + checked
if (IsOKCheckedContent(oneBookMark.contentid) == false) { if (IsOKCheckedContent(oneBookMark.contentid) == false) {
if (!IsExistContent(oneBookMark.contentid)) { if (!IsExistContent(oneBookMark.contentid)) {
if (avwHasError()) {
// System error excepting 404
showSystemError();
return;
}
else {
// Add to list of error content // Add to list of error content
bookmark_errorContent.push({ contentid: oneBookMark.contentid }); bookmark_errorContent.push({ contentid: oneBookMark.contentid });
// Remove bookmark // Remove bookmark
arrBookmarks.splice(nIndex, 1); arrBookmarks.splice(nIndex, 1);
ClientData.isChangedBookmark(true); ClientData.isChangedBookmark(true);
} }
}
// ================================== // ==================================
// Check existence of content [ end ] // Check existence of content [ end ]
// ================================== // ==================================
...@@ -970,8 +850,6 @@ function SyncContent() { ...@@ -970,8 +850,6 @@ function SyncContent() {
// Set back to storage // Set back to storage
ClientData.BookMarkData(arrBookmarks); ClientData.BookMarkData(arrBookmarks);
// Call sync pages
//SyncPages();
} }
/* /*
...@@ -992,6 +870,11 @@ function IsExistContent(strContentId) { ...@@ -992,6 +870,11 @@ function IsExistContent(strContentId) {
if (xmlHttpRequest.status == 404) { if (xmlHttpRequest.status == 404) {
isExisted = false; isExisted = false;
} }
else {
// Show system error
isExisted = true; // Mark this flag to prevent bookmarks from deleting
showSystemError();
}
}); });
return isExisted; return isExisted;
} }
......
...@@ -99,7 +99,14 @@ $(document).ready(function(){ ...@@ -99,7 +99,14 @@ $(document).ready(function(){
$('#main-search-body').click(mainSearchBodyClickFunction); $('#main-search-body').click(mainSearchBodyClickFunction);
$('#control-nextrecord').css('visibility','hidden'); $('#control-nextrecord').css('visibility', 'hidden');
$(window).resize(function () {
if ($("#contentDetail").css("display") != "none") {
// Refresh panel of detail to center.
$("#contentDetail").center();
}
});
}); });
...@@ -387,6 +394,7 @@ function canvasClickFunction(e){ ...@@ -387,6 +394,7 @@ function canvasClickFunction(e){
var contentId = $(this).attr('id'); var contentId = $(this).attr('id');
var outputId = contentId.substring(17); var outputId = contentId.substring(17);
var checkflag = false;
// Set content id for screen: content detail // Set content id for screen: content detail
ClientData.contentInfo_contentId(outputId); ClientData.contentInfo_contentId(outputId);
...@@ -945,8 +953,8 @@ function drawEditImage(id){ ...@@ -945,8 +953,8 @@ function drawEditImage(id){
img.onload = function(){ img.onload = function(){
var resizeImg = resizeResourceThumbnail(img, c.width, c.height); var resizeImg = resizeResourceThumbnail(img, c.width, c.height);
ctx.drawImage(img, c.width / 2 - resizeImg[0] / 2, 0, resizeImg[0], resizeImg[1]); ctx.drawImage(img, c.width / 2 - resizeImg[0] / 2, 0, resizeImg[0], resizeImg[1]);
$("#loadingIcon" + contId).fadeOut('slow', function () { $("#loadingIcon" + id).fadeOut('slow', function () {
$('#content-thumbnail' + contId).fadeIn('slow'); $('#content-thumbnail' + id).fadeIn('slow');
}); });
}; };
} }
...@@ -1211,7 +1219,7 @@ function titleClickFunction(e){ ...@@ -1211,7 +1219,7 @@ function titleClickFunction(e){
home_isMove = false; home_isMove = false;
return; return;
} }
var checkflag = false;
var contentid = $(this).attr('contentid'); var contentid = $(this).attr('contentid');
// Get image of selected image // Get image of selected image
var base64String = returnThumbnail(contentid); var base64String = returnThumbnail(contentid);
......
...@@ -697,20 +697,90 @@ function checkExistNextPrePage(){ ...@@ -697,20 +697,90 @@ function checkExistNextPrePage(){
//check next page //check next page
if(getContent().hasNextPage()){ if(getContent().hasNextPage()){
//$('#nextpage').show(); //$('#nextpage').show();
enable('#nextpage'); //enable('#nextpage');
$('#nextpage').unbind('click');
$('#nextpage').bind('click',nextPage_click);
$('#lastpage').unbind('click');
$('#lastpage').bind('click',lastPage_click);
if(isTouchDevice() == true){
$('#nextpage').removeClass();
$('#nextpage').addClass('next_device');
$('#lastpage').removeClass();
$('#lastpage').addClass('last_device');
}else{
$('#nextpage').removeClass();
$('#nextpage').addClass('next');
$('#lastpage').removeClass();
$('#lastpage').addClass('last');
}
}else{ }else{
//$('#nextpage').hide(); //$('#nextpage').hide();
disable('#nextpage'); //disable('#nextpage');
$('#nextpage').unbind('click');
$('#lastpage').unbind('click');
if(isTouchDevice() == true){
$('#nextpage').removeClass();
$('#nextpage').addClass('next_off');
$('#lastpage').removeClass();
$('#lastpage').addClass('last_off');
}else{
$('#nextpage').removeClass();
$('#nextpage').addClass('next_off');
$('#lastpage').removeClass();
$('#lastpage').addClass('last_off');
}
$('#button_next_canvas').css('opacity','0'); $('#button_next_canvas').css('opacity','0');
} }
//check prev page //check prev page
if(getContent().hasPreviousPage()){ if(getContent().hasPreviousPage()){
//$('#prevpage').show(); //$('#prevpage').show();
enable('#prevpage'); //enable('#prevpage');
$('#prevpage').unbind('click');
$('#prevpage').bind('click',prevPage_click);
$('#firstpage').unbind('click');
$('#firstpage').bind('click',firstPage_click);
if(isTouchDevice() == true){
$('#prevpage').removeClass();
$('#prevpage').addClass('prev_device');
$('#firstpage').removeClass();
$('#firstpage').addClass('begin_device');
}else{
$('#prevpage').removeClass();
$('#prevpage').addClass('prev');
$('#firstpage').removeClass();
$('#firstpage').addClass('begin');
}
}else{ }else{
//$('#prevpage').hide(); //$('#prevpage').hide();
disable('#prevpage'); //disable('#prevpage');
$('#prevpage').unbind('click');
$('#firstpage').unbind('click');
if(isTouchDevice() == true){
$('#prevpage').removeClass();
$('#prevpage').addClass('prev_off');
$('#firstpage').removeClass();
$('#firstpage').addClass('begin_off');
}else{
$('#prevpage').removeClass();
$('#prevpage').addClass('prev_off');
$('#firstpage').removeClass();
$('#firstpage').addClass('begin_off');
}
$('#button_pre_canvas').css('opacity','0'); $('#button_pre_canvas').css('opacity','0');
} }
...@@ -795,12 +865,12 @@ Transition.prototype.flipNextPage = function() { ...@@ -795,12 +865,12 @@ Transition.prototype.flipNextPage = function() {
/* change title of page */ /* change title of page */
if(dataPageTitle[getContent().pageIndex]){ if(dataPageTitle[getContent().pageIndex]){
if(dataPageTitle[getContent().pageIndex] != ''){ if(dataPageTitle[getContent().pageIndex] != ''){
document.title = contentName + '_' + dataPageTitle[getContent().pageIndex]; document.title = contentName + '_' + dataPageTitle[getContent().pageIndex] + ' | ' + i18nText('sysAppTitle');
}else{ }else{
document.title = contentName; document.title = contentName + ' | ' + i18nText('sysAppTitle');
} }
}else{ }else{
document.title = contentName; document.title = contentName + ' | ' + i18nText('sysAppTitle');
} }
/* set end log */ /* set end log */
SetEndLog(contentID); SetEndLog(contentID);
...@@ -841,12 +911,12 @@ Transition.prototype.flipPreviousPage = function() { ...@@ -841,12 +911,12 @@ Transition.prototype.flipPreviousPage = function() {
/* change title of page */ /* change title of page */
if(dataPageTitle[getContent().pageIndex]){ if(dataPageTitle[getContent().pageIndex]){
if(dataPageTitle[getContent().pageIndex] != ''){ if(dataPageTitle[getContent().pageIndex] != ''){
document.title = contentName + '_' + dataPageTitle[getContent().pageIndex]; document.title = contentName + '_' + dataPageTitle[getContent().pageIndex] + ' | ' + i18nText('sysAppTitle');
}else{ }else{
document.title = contentName; document.title = contentName + ' | ' + i18nText('sysAppTitle');
} }
}else{ }else{
document.title = contentName; document.title = contentName + ' | ' + i18nText('sysAppTitle');
} }
/* set end log */ /* set end log */
...@@ -889,12 +959,12 @@ Transition.prototype.flipToPage = function(index) { ...@@ -889,12 +959,12 @@ Transition.prototype.flipToPage = function(index) {
/* change title of page */ /* change title of page */
if(dataPageTitle[index]){ if(dataPageTitle[index]){
if(dataPageTitle[index] != ''){ if(dataPageTitle[index] != ''){
document.title = contentName + '_' + dataPageTitle[index]; document.title = contentName + '_' + dataPageTitle[index] + ' | ' + i18nText('sysAppTitle');
}else{ }else{
document.title = contentName; document.title = contentName + ' | ' + i18nText('sysAppTitle');
} }
}else{ }else{
document.title = contentName; document.title = contentName + ' | ' + i18nText('sysAppTitle');
} }
/* set end log */ /* set end log */
SetEndLog(contentID); SetEndLog(contentID);
...@@ -927,12 +997,12 @@ Transition.prototype.flipToPage = function(index) { ...@@ -927,12 +997,12 @@ Transition.prototype.flipToPage = function(index) {
/* change title of page */ /* change title of page */
if(dataPageTitle[index]){ if(dataPageTitle[index]){
if(dataPageTitle[index] != ''){ if(dataPageTitle[index] != ''){
document.title = contentName + '_' + dataPageTitle[index]; document.title = contentName + '_' + dataPageTitle[index] + ' | ' + i18nText('sysAppTitle');
}else{ }else{
document.title = contentName; document.title = contentName + ' | ' + i18nText('sysAppTitle');
} }
}else{ }else{
document.title = contentName; document.title = contentName+ ' | ' + i18nText('sysAppTitle');
} }
/* set end log */ /* set end log */
SetEndLog(contentID); SetEndLog(contentID);
...@@ -1458,7 +1528,9 @@ function disableControlsCopyMemo(){ ...@@ -1458,7 +1528,9 @@ function disableControlsCopyMemo(){
$('#nextpage').unbind('click'); $('#nextpage').unbind('click');
$('#lastpage').unbind('click'); $('#lastpage').unbind('click');
$( "#slider_page" ).slider( "option", "disabled", true ); if(avwUserEnvObj.os != "android"){
$("#slider_page").slider("option", "disabled", true );
}
disable('#txtSearch','#txtSlider'); disable('#txtSearch','#txtSlider');
$('#button_next_canvas').css('display','none'); $('#button_next_canvas').css('display','none');
...@@ -1485,25 +1557,129 @@ function enableControlsCopyMemo(){ ...@@ -1485,25 +1557,129 @@ function enableControlsCopyMemo(){
$("#nextpage").css('cursor', 'pointer'); $("#nextpage").css('cursor', 'pointer');
$("#lastpage").css('cursor', 'pointer'); $("#lastpage").css('cursor', 'pointer');
$("#control_screen").removeClass();
$("#control_screen_2").removeClass();
$('#imgHome').bind('click',imgHome_click); $('#imgHome').bind('click',imgHome_click);
$('#imgHome').removeClass(); $('#imgHome').removeClass();
$('#imgHome').addClass('home');
$('#imgBack').bind('click',imgBack_click); $('#imgBack').bind('click',imgBack_click);
$('#imgBack').removeClass(); $('#imgBack').removeClass();
$('#imgBack').addClass('back');
/*list bookmark */ /*list bookmark */
$('#listbookmark').bind('click',showListBookMark); $('#listbookmark').bind('click',showListBookMark);
$('#listbookmark').removeClass(); $('#listbookmark').removeClass();
$('#imgbookmark').bind('click',bookmarkPage);
$('#imgbookmark').removeClass();
$('#listindex').bind('click',showListPageIndex);
$('#listindex').removeClass();
$('#copytext').bind('click',showCopyText);
$('#copytext').removeClass();
/* image memo */
$('#imgmemo').bind('click',handleMemo);
$('#imgmemo').removeClass();
/* image add memo */
$('#imgaddmemo').bind('click',handleAddMemo);
$('#imgaddmemo').removeClass();
$('#imgmarking').bind('click',imgmarking_click);
$('#imgmarking').removeClass();
if(ClientData.serviceOpt_marking() == 'Y'){
$('#imgmarkingtoolbar').bind('click',handleDrawCanvas);
$('#imgmarkingtoolbar').removeClass();
}
/*$('#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');
$('#button_pre_canvas').css('display','block');
}
if(isTouchDevice() == true){/* set css for device */
$('#imgHome').addClass('home_device');
$('#imgBack').addClass('back_device');
/*$('#firstpage').addClass('begin_device');
$('#prevpage').addClass('prev_device');
$('#nextpage').addClass('next_device');
$('#lastpage').addClass('last_device');*/
$("#control_screen").addClass('toolbar_device');
$("#control_screen_2").addClass('toolbar_device');
var nBookmarkId = isExistBookmark();
if(nBookmarkId == -1){
$('#imgbookmark').addClass('bmAdd_device');
}else{
$('#imgbookmark').addClass('bmAdd_hover');
}
if(isDisplayBookMarkList == true){ if(isDisplayBookMarkList == true){
$('#listbookmark').addClass('bmList_hover'); $('#listbookmark').addClass('bmList_hover');
}else{ }else{
$('#listbookmark').addClass('bmList'); $('#listbookmark').addClass('bmList_device');
} }
$('#imgbookmark').bind('click',bookmarkPage); if(isDisplayCopyText == true){
$('#imgbookmark').removeClass(); $('#copytext').addClass('copy_hover');
}else{
$('#copytext').addClass('copy_device');
}
if(isDisplayListIndex == true){
$('#listindex').addClass('index_hover');
}else{
$('#listindex').addClass('index_device');
}
if(ClientData.IsDisplayMemo() == true){
$('#imgmemo').addClass('memoDisplay_hover');
}else{
$('#imgmemo').addClass('memoDisplay_device');
}
if(ClientData.IsAddingMemo() == true){
$('#imgaddmemo').addClass('memoAdd_hover');
}else{
$('#imgaddmemo').addClass('memoAdd_device');
}
if(ClientData.IsDisplayMarking() == true){
$('#imgmarking').addClass('marking_hover');
}else{
$('#imgmarking').addClass('marking_device');
}
if(ClientData.serviceOpt_marking() == 'Y'){
if(ClientData.IsAddingMarking() == true){
$('#imgmarkingtoolbar').addClass('markingToolbar_hover');
}else{
$('#imgmarkingtoolbar').addClass('markingToolbar_device');
}
}
}else{ /* set css for PC */
$('#imgHome').addClass('home');
$('#imgBack').addClass('back');
/*$('#firstpage').addClass('begin');
$('#prevpage').addClass('prev');
$('#nextpage').addClass('next');
$('#lastpage').addClass('last');*/
$("#control_screen").addClass('toolbar');
$("#control_screen_2").addClass('toolbar');
var nBookmarkId = isExistBookmark(); var nBookmarkId = isExistBookmark();
if(nBookmarkId == -1){ if(nBookmarkId == -1){
$('#imgbookmark').addClass('bmAdd'); $('#imgbookmark').addClass('bmAdd');
...@@ -1511,70 +1687,49 @@ function enableControlsCopyMemo(){ ...@@ -1511,70 +1687,49 @@ function enableControlsCopyMemo(){
$('#imgbookmark').addClass('bmAdd_hover'); $('#imgbookmark').addClass('bmAdd_hover');
} }
$('#listindex').bind('click',showListPageIndex); if(isDisplayBookMarkList == true){
$('#listindex').removeClass(); $('#listbookmark').addClass('bmList_hover');
if(isDisplayListIndex == true){
$('#listindex').addClass('index_hover');
}else{ }else{
$('#listindex').addClass('index'); $('#listbookmark').addClass('bmList');
} }
$('#copytext').bind('click',showCopyText);
$('#copytext').removeClass();
if(isDisplayCopyText == true){ if(isDisplayCopyText == true){
$('#copytext').addClass('copy_hover'); $('#copytext').addClass('copy_hover');
}else{ }else{
$('#copytext').addClass('copy'); $('#copytext').addClass('copy');
} }
/* image memo */ if(isDisplayListIndex == true){
$('#imgmemo').bind('click',handleMemo); $('#listindex').addClass('index_hover');
$('#imgmemo').removeClass(); }else{
$('#listindex').addClass('index');
}
if(ClientData.IsDisplayMemo() == true){ if(ClientData.IsDisplayMemo() == true){
$('#imgmemo').addClass('memoDisplay_hover'); $('#imgmemo').addClass('memoDisplay_hover');
}else{ }else{
$('#imgmemo').addClass('memoDisplay'); $('#imgmemo').addClass('memoDisplay');
} }
/* image add memo */
$('#imgaddmemo').bind('click',handleAddMemo);
$('#imgaddmemo').removeClass();
if(ClientData.IsAddingMemo() == true){ if(ClientData.IsAddingMemo() == true){
$('#imgaddmemo').addClass('memoAdd_hover'); $('#imgaddmemo').addClass('memoAdd_hover');
}else{ }else{
$('#imgaddmemo').addClass('memoAdd'); $('#imgaddmemo').addClass('memoAdd');
} }
$('#imgmarking').bind('click',imgmarking_click);
$('#imgmarking').removeClass();
if(ClientData.IsDisplayMarking() == true){ if(ClientData.IsDisplayMarking() == true){
$('#imgmarking').addClass('marking_hover'); $('#imgmarking').addClass('marking_hover');
}else{ }else{
$('#imgmarking').addClass('marking'); $('#imgmarking').addClass('marking');
} }
if(ClientData.serviceOpt_marking() == 'Y'){ if(ClientData.serviceOpt_marking() == 'Y'){
$('#imgmarkingtoolbar').bind('click',handleDrawCanvas);
$('#imgmarkingtoolbar').removeClass();
if(ClientData.IsAddingMarking() == true){ if(ClientData.IsAddingMarking() == true){
$('#imgmarkingtoolbar').addClass('markingToolbar_hover'); $('#imgmarkingtoolbar').addClass('markingToolbar_hover');
}else{ }else{
$('#imgmarkingtoolbar').addClass('markingToolbar'); $('#imgmarkingtoolbar').addClass('markingToolbar');
} }
} }
$('#firstpage').bind('click',firstPage_click);
$('#prevpage').bind('click',prevPage_click);
$('#nextpage').bind('click',nextPage_click);
$('#lastpage').bind('click',lastPage_click);
$( "#slider_page" ).slider( "option", "disabled", false );
enable('#txtSearch','#txtSlider');
if(avwUserEnvObj.os != "ipad" && avwUserEnvObj.os != "android"){
$('#button_next_canvas').css('display','block');
$('#button_pre_canvas').css('display','block');
} }
checkExistNextPrePage(); checkExistNextPrePage();
} }
...@@ -1766,15 +1921,37 @@ function draw(context) { ...@@ -1766,15 +1921,37 @@ function draw(context) {
/* draw page objects */ /* draw page objects */
getContent().currentPage.drawPage(context); getContent().currentPage.drawPage(context);
/* draw memo */ /* draw memo */
//drawMemoOnScreen(); //drawMemoOnScreen();
context.restore(); context.restore();
initImageCheckMarking();
}; };
/* init image if exist marking in page */
function initImageCheckMarking(){
/* set draw image if exist */
var dataMarking = ClientData.MarkingData();
var isExistMarking = false;
for(var nIndex = 0; nIndex < dataMarking.length; nIndex++){
if(dataMarking[nIndex].contentid == contentID
&& dataMarking[nIndex].pageNo == changePageIndex(getPageIndex())){
isExistMarking = true;
break;
}
}
/* init image display or not */
if(isExistMarking == true){
$('#divCheckExistMarking').show();
}else{
$('#divCheckExistMarking').hide();
}
}
var leftCanvas = 0; var leftCanvas = 0;
var topCanvas = 0; var topCanvas = 0;
...@@ -1832,6 +2009,7 @@ function flip() { ...@@ -1832,6 +2009,7 @@ function flip() {
} }
if(userScale != 1 && width < canvas.width){ if(userScale != 1 && width < canvas.width){
width = width * userScale; width = width * userScale;
if(width > canvas.width){ if(width > canvas.width){
//var size = canvas.width / width; //var size = canvas.width / width;
...@@ -2038,8 +2216,8 @@ var openPopUp = function(mediaType, actionType, id, imageUrl, x, y, w, h, visibl ...@@ -2038,8 +2216,8 @@ var openPopUp = function(mediaType, actionType, id, imageUrl, x, y, w, h, visibl
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() {
isOpenPopUpText = true; isOpenPopUpText = true;
var pt1 = imageToScreen(x, y); var pt1 = imageToScreen(x, y + h/2);
OpenPopupText(pt1.x, pt1.y + h/2, content, $('#dialogPopUp'), $('#arrow')); OpenPopupText(pt1.x, pt1.y, content, $('#dialogPopUp'), $('#arrow'));
} }
}; };
openPopUp.prototype = new PageObject(); openPopUp.prototype = new PageObject();
...@@ -2282,6 +2460,7 @@ function createAudio(audio,type){ ...@@ -2282,6 +2460,7 @@ function createAudio(audio,type){
' </audio>' ' </audio>'
); );
} }
}else{ }else{
if(avwUserEnvObj.browser == 'firefox'){ if(avwUserEnvObj.browser == 'firefox'){
$('#playaudio').html( $('#playaudio').html(
...@@ -2294,15 +2473,19 @@ function createAudio(audio,type){ ...@@ -2294,15 +2473,19 @@ function createAudio(audio,type){
' </audio>' ' </audio>'
); );
} }
} }
}else if(type == "1"){ /* play all page */ }else if(type == "1"){ /* play all page */
TypeAudio1 = type; TypeAudio1 = type;
srcAudioType1 = audio; srcAudioType1 = audio;
if(document.getElementById("play_audio_1") != undefined){ if(document.getElementById("play_audio_1") != undefined){
//document.getElementById("play_audio_1").load(); // document.getElementById("play_audio_1").load();
// document.getElementById("play_audio_1").play();
}else{ }else{
if(ClientData.userOpt_musicMode() == "1"){ if(ClientData.userOpt_musicMode() == "1"){
if(avwUserEnvObj.browser == 'firefox'){ if(avwUserEnvObj.browser == 'firefox'){
...@@ -2311,7 +2494,7 @@ function createAudio(audio,type){ ...@@ -2311,7 +2494,7 @@ function createAudio(audio,type){
); );
}else{ }else{
$('#playaudioallpage').html( $('#playaudioallpage').html(
' <audio id="play_audio_1" loop="loop" autoplay ="autoplay">' + ' <audio id="play_audio_1" loop="loop" autoplay="autoplay" >' +
' <source src="' + audio + '&key=' + (new Date()).toIdString() + '" type="audio/mpeg" />' + ' <source src="' + audio + '&key=' + (new Date()).toIdString() + '" type="audio/mpeg" />' +
' </audio>' ' </audio>'
); );
...@@ -2323,12 +2506,18 @@ function createAudio(audio,type){ ...@@ -2323,12 +2506,18 @@ function createAudio(audio,type){
); );
}else{ }else{
$('#playaudioallpage').html( $('#playaudioallpage').html(
' <audio id="play_audio_1" autoplay ="autoplay">' + ' <audio id="play_audio_1" autoplay = "autoplay" >' +
' <source src="' + audio + '&key=' + (new Date()).toIdString() + '" type="audio/mpeg" />' + ' <source src="' + audio + '&key=' + (new Date()).toIdString() + '" type="audio/mpeg" />' +
' </audio>' ' </audio>'
); );
} }
} }
//playAllAudio();
// if(document.getElementById("play_audio_1") != undefined){
// document.getElementById("play_audio_1").pause();
// document.getElementById("play_audio_1").play();
// }
} }
} }
else if(type == "2"){ /* play on page */ else if(type == "2"){ /* play on page */
...@@ -2527,6 +2716,9 @@ function sizingNotFull(width, height) { ...@@ -2527,6 +2716,9 @@ function sizingNotFull(width, height) {
changeScale(userScale); changeScale(userScale);
flip(); flip();
} }
/* move image check marking*/
$('#divCheckExistMarking').css('top','70px');
}; };
/* Adjust Component size */ /* Adjust Component size */
...@@ -2550,6 +2742,9 @@ function sizingFullSize(width, height) { ...@@ -2550,6 +2742,9 @@ function sizingFullSize(width, height) {
changeScale(userScale); changeScale(userScale);
flip(); flip();
} }
/* move image check marking*/
$('#divCheckExistMarking').css('top','5px');
}; };
/* zoom video */ /* zoom video */
...@@ -2665,8 +2860,6 @@ function trackTransforms(ctx){ ...@@ -2665,8 +2860,6 @@ function trackTransforms(ctx){
function zoomIn() { function zoomIn() {
userScale += scaleDelta; userScale += scaleDelta;
if(userScale > 4){ if(userScale > 4){
userScale = 4; userScale = 4;
} }
...@@ -2680,10 +2873,20 @@ function zoomIn() { ...@@ -2680,10 +2873,20 @@ function zoomIn() {
zoomVideo(); zoomVideo();
} }
checkDisableButtonZoom(); checkDisableButtonZoom();
/* close dialog popuptext */
closeDialogPopUpText();
}; };
/* close dialog pop */
function closeDialogPopUpText(){
if(isOpenPopUpText == true){
isOpenPopUpText = false;
ClosePopupText();
}
}
function checkDisableButtonZoom(){ function checkDisableButtonZoom(){
if(userScale >= 4){ if(userScale >= 4){
$('#zoomin').removeClass(); $('#zoomin').removeClass();
...@@ -2694,7 +2897,11 @@ function checkDisableButtonZoom(){ ...@@ -2694,7 +2897,11 @@ function checkDisableButtonZoom(){
$('#zoomin').bind('click',zoomIn); $('#zoomin').bind('click',zoomIn);
$('#zoomin').removeClass(); $('#zoomin').removeClass();
if(isTouchDevice() == true){
$('#zoomin').addClass('expansion_device');
}else{
$('#zoomin').addClass('expansion'); $('#zoomin').addClass('expansion');
}
$("#zoomin").css('cursor', 'pointer'); $("#zoomin").css('cursor', 'pointer');
} }
...@@ -2707,41 +2914,29 @@ function checkDisableButtonZoom(){ ...@@ -2707,41 +2914,29 @@ function checkDisableButtonZoom(){
$('#zoomout').bind('click',zoomOut); $('#zoomout').bind('click',zoomOut);
$('#zoomout').removeClass(); $('#zoomout').removeClass();
if(isTouchDevice() == true){
$('#zoomout').addClass('reduction_device');
}else{
$('#zoomout').addClass('reduction'); $('#zoomout').addClass('reduction');
}
$("#zoomout").css('cursor', 'pointer'); $("#zoomout").css('cursor', 'pointer');
} }
}
function checkDisableButtonZoom1(){
if(userScale >= 4){
$('#zoomin').unbind('click');
$('#zoomin').removeClass();
$('#zoomin').addClass('expansion_off');
$("#zoomin").css('cursor', 'default');
if(userScale == 1){
$('#zoomfit').removeClass();
$('#zoomfit').addClass('fit_off');
$("#zoomfit").css('cursor', 'default');
}else{ }else{
$('#zoomin').unbind('click'); $('#zoomfit').unbind('click');
$('#zoomin').bind('click',zoomIn); $('#zoomfit').bind('click',screenFit);
$('#zoomin').removeClass(); $('#zoomfit').removeClass();
$('#zoomin').addClass('expansion'); if(isTouchDevice() == true){
$("#zoomin").css('cursor', 'pointer'); $('#zoomfit').addClass('fit_device');
}
if(userScale <= 1){
$('#zoomout').unbind('click');
$('#zoomout').removeClass();
$('#zoomout').addClass('reduction_off');
$("#zoomout").css('cursor', 'default');
}else{ }else{
$('#zoomout').unbind('click'); $('#zoomfit').addClass('fit');
$('#zoomout').bind('click',zoomOut); }
$("#zoomfit").css('cursor', 'pointer');
$('#zoomout').removeClass();
$('#zoomout').addClass('reduction');
$("#zoomout").css('cursor', 'pointer');
} }
} }
...@@ -2760,6 +2955,9 @@ function zoomOut() { ...@@ -2760,6 +2955,9 @@ function zoomOut() {
} }
checkDisableButtonZoom(); checkDisableButtonZoom();
/* close dialog popuptext */
closeDialogPopUpText();
}; };
/* restore screen size */ /* restore screen size */
...@@ -2779,6 +2977,9 @@ function screenFit() { ...@@ -2779,6 +2977,9 @@ function screenFit() {
zoomVideo(); zoomVideo();
checkDisableButtonZoom(); checkDisableButtonZoom();
/* close dialog popuptext */
closeDialogPopUpText();
}; };
...@@ -2801,17 +3002,19 @@ function changeScale(scale) { ...@@ -2801,17 +3002,19 @@ function changeScale(scale) {
width = canvas.width; width = canvas.width;
height = width / aspect; height = width / aspect;
} }
if(height > canvas.height){
height = canvas.height;
width = height / aspect;
}
} else { } else {
width = canvas.width; width = canvas.width;
height = width / aspect; height = width / aspect;
} }
if(height > canvas.height){
var size = canvas.height / height;
height = canvas.height;
width = width * size;
}
if(width < canvas.width){ if(width < canvas.width){
//if(width >= height){ //if(width >= height){
width = width * scale; width = width * scale;
......
...@@ -25,10 +25,11 @@ function ShowEraser(targetDiv) { ...@@ -25,10 +25,11 @@ function ShowEraser(targetDiv) {
//$('#dlgGomu').dialog("open"); //$('#dlgGomu').dialog("open");
//$(".ui-dialog-titlebar").hide(); //$(".ui-dialog-titlebar").hide();
//lockLayout(); //lockLayout();
$('#dlgGomu').fadeIn('medium', function(){ // $('#dlgGomu').fadeIn('medium', function(){
// $('#dlgGomu').draggable();
// });
$('#dlgGomu').show();
$('#dlgGomu').draggable(); $('#dlgGomu').draggable();
});
Eraser_SetDefaultValue(); Eraser_SetDefaultValue();
} }
// Set default value for easer. // Set default value for easer.
...@@ -192,13 +193,31 @@ Event groups [ end ] ...@@ -192,13 +193,31 @@ Event groups [ end ]
*/ */
function touchStart_BtnOk_Gomu(e){
e.preventDefault();
$('#dlgGomu').draggable("destroy");
dlgGomu_dspOK_click();
}
function touchStart_BtnCancel_Gomu(e){
e.preventDefault();
$('#dlgGomu').draggable("destroy");
dlgGomu_dspCancel_click();
}
// Setting dialog // Setting dialog
$(function () { $(function () {
// --------------------------------- // ---------------------------------
// Setup for easer [start] // Setup for easer [start]
// --------------------------------- // ---------------------------------
if(isTouchDevice() == true){
document.getElementById('dlgGomu_dspOK').addEventListener('touchstart',touchStart_BtnOk_Gomu,false);
document.getElementById('dlgGomu_dspCancel').addEventListener('touchstart',touchStart_BtnCancel_Gomu,false);
}
$("#dlgGomu_dspOK").click(dlgGomu_dspOK_click); $("#dlgGomu_dspOK").click(dlgGomu_dspOK_click);
$("#dlgGomu_dspCancel").click(dlgGomu_dspCancel_click); $("#dlgGomu_dspCancel").click(dlgGomu_dspCancel_click);
...@@ -209,12 +228,12 @@ $(function () { ...@@ -209,12 +228,12 @@ $(function () {
$("#dlgGomu_rdo3").click(dlgGomu_rdo3_click); $("#dlgGomu_rdo3").click(dlgGomu_rdo3_click);
$("#dlgGomu_rdo4").click(dlgGomu_rdo4_click); $("#dlgGomu_rdo4").click(dlgGomu_rdo4_click);
$("#dlgGomu_rdo1_text").click(dlgGomu_rdo1_text_click); // $("#dlgGomu_rdo1_text").click(dlgGomu_rdo1_text_click);
$("#dlgGomu_rdo2_text").click(dlgGomu_rdo2_text_click); // $("#dlgGomu_rdo2_text").click(dlgGomu_rdo2_text_click);
$("#dlgGomu_rdo3_text").click(dlgGomu_rdo3_text_click); // $("#dlgGomu_rdo3_text").click(dlgGomu_rdo3_text_click);
$("#dlgGomu_rdo4_text").click(dlgGomu_rdo4_text_click); // $("#dlgGomu_rdo4_text").click(dlgGomu_rdo4_text_click);
$('#dlgGomu_rdo1_text').click() //$('#dlgGomu_rdo1_text').click()
// --------------------------------- // ---------------------------------
// Setup for easer [ end ] // Setup for easer [ end ]
// --------------------------------- // ---------------------------------
......
...@@ -54,13 +54,28 @@ function ShowMaker(targetId){ ...@@ -54,13 +54,28 @@ function ShowMaker(targetId){
}); });
i18nReplaceText(); i18nReplaceText();
maker_targetDiv.fadeIn('medium',function(){ // maker_targetDiv.fadeIn('medium',function(){
//lockLayout(); // //lockLayout();
maker_targetDiv.draggable(); // maker_targetDiv.draggable();
}); // }); maker_targetDiv.show();
maker_targetDiv.draggable({ revert: false});
Maker_handleColorPickerEvent(); Maker_handleColorPickerEvent();
} }
function touchStart_BtnOk_Maker(e){
e.preventDefault();
maker_targetDiv.draggable("destroy");
Maker_dspOK_click();
}
function touchStart_BtnCancel_Maker(e){
e.preventDefault();
maker_targetDiv.draggable("destroy");
Maker_dspCancel_click();
}
function Maker_handleColorPickerEvent(){ function Maker_handleColorPickerEvent(){
//$('.colorpicker').live('mouseenter',Maker_colorPickerMouseEnterFunction); //$('.colorpicker').live('mouseenter',Maker_colorPickerMouseEnterFunction);
...@@ -72,6 +87,8 @@ function Maker_handleColorPickerEvent(){ ...@@ -72,6 +87,8 @@ function Maker_handleColorPickerEvent(){
$('.colorpicker').unbind('mouseleave'); $('.colorpicker').unbind('mouseleave');
$('#makerColorwrapper').unbind('mouseleave'); $('#makerColorwrapper').unbind('mouseleave');
document.getElementById('Maker_btnOk').addEventListener('touchstart',touchStart_BtnOk_Maker,false);
document.getElementById('Maker_btnCancel').addEventListener('touchstart',touchStart_BtnCancel_Maker,false);
} }
else{ else{
//alert('here'); //alert('here');
......
...@@ -140,9 +140,9 @@ function dlgMarking_dspPgClear_click() { ...@@ -140,9 +140,9 @@ function dlgMarking_dspPgClear_click() {
function dlgMarking_imgPen_click() { function dlgMarking_imgPen_click() {
// Choose pen // Choose pen
$("#dlgMarking_imgMaker").removeClass('toolbar_icon_on'); $("#dlgMarking_imgMaker").removeClass();
$("#dlgMarking_imgPen").addClass('toolbar_icon_on'); $("#dlgMarking_imgPen").addClass('toolbar_icon_on');
$("#dlgMarking_imgEraser").removeClass('toolbar_icon_on'); $("#dlgMarking_imgEraser").removeClass();
ClientData.MarkingType("pen"); ClientData.MarkingType("pen");
markingType = "pen"; markingType = "pen";
...@@ -159,8 +159,8 @@ function dlgMarking_imgPenOption_click() { ...@@ -159,8 +159,8 @@ function dlgMarking_imgPenOption_click() {
function dlgMarking_imgMaker_click() { function dlgMarking_imgMaker_click() {
// Choose maker // Choose maker
$("#dlgMarking_imgMaker").addClass('toolbar_icon_on'); $("#dlgMarking_imgMaker").addClass('toolbar_icon_on');
$("#dlgMarking_imgPen").removeClass('toolbar_icon_on'); $("#dlgMarking_imgPen").removeClass();
$("#dlgMarking_imgEraser").removeClass('toolbar_icon_on'); $("#dlgMarking_imgEraser").removeClass();
ClientData.MarkingType("maker"); ClientData.MarkingType("maker");
markingType = "maker"; markingType = "maker";
...@@ -176,8 +176,8 @@ function dlgMarking_imgMakerOption_click() { ...@@ -176,8 +176,8 @@ function dlgMarking_imgMakerOption_click() {
} }
function dlgMarking_imgEraser_click() { function dlgMarking_imgEraser_click() {
// Choose eraser // Choose eraser
$("#dlgMarking_imgMaker").removeClass('toolbar_icon_on'); $("#dlgMarking_imgMaker").removeClass();
$("#dlgMarking_imgPen").removeClass('toolbar_icon_on'); $("#dlgMarking_imgPen").removeClass();
$("#dlgMarking_imgEraser").addClass('toolbar_icon_on'); $("#dlgMarking_imgEraser").addClass('toolbar_icon_on');
ClientData.MarkingType("eraser"); ClientData.MarkingType("eraser");
...@@ -296,10 +296,10 @@ function ShowMarking() { ...@@ -296,10 +296,10 @@ function ShowMarking() {
//$('#dlgMarking').css('height', '300px'); //$('#dlgMarking').css('height', '300px');
//$('#dlgMarking').dialog("open"); //$('#dlgMarking').dialog("open");
$('#dlgMarking').show();
//$('#dlgMarking').fadeIn('fast');
$('#dlgMarking').css('top', '40px'); $('#dlgMarking').css('top', '40px');
$('#dlgMarking').css('left', '10px'); $('#dlgMarking').css('left', '10px');
$('#dlgMarking').show();
//$('#dlgMarking').fadeIn('fast');
// $('#dlgMarking').center(); // $('#dlgMarking').center();
// $('#dlgMarking').top(); // $('#dlgMarking').top();
......
...@@ -123,6 +123,7 @@ function AddMemo(contentId,pageNo,targetId, posX, posY, callback) { ...@@ -123,6 +123,7 @@ function AddMemo(contentId,pageNo,targetId, posX, posY, callback) {
//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});
//targetDiv.parent().removeClass('ui-draggable'); //targetDiv.parent().removeClass('ui-draggable');
$("#overlay").show(); $("#overlay").show();
disableControlsCopyMemo();
targetDiv.css('z-index','1005'); targetDiv.css('z-index','1005');
targetDiv.css('top',targetY); targetDiv.css('top',targetY);
targetDiv.css('left',targetX - ($('#memoWrapper').width() /2 )); targetDiv.css('left',targetX - ($('#memoWrapper').width() /2 ));
...@@ -147,6 +148,7 @@ function EditMemo(index, posXPlus, posYPlus, targetId, callback){ ...@@ -147,6 +148,7 @@ function EditMemo(index, posXPlus, posYPlus, targetId, callback){
//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});
//targetDiv.parent().removeClass('ui-draggable'); //targetDiv.parent().removeClass('ui-draggable');
$("#overlay").show(); $("#overlay").show();
disableControlsCopyMemo();
targetDiv.css('z-index','1005'); targetDiv.css('z-index','1005');
var pt = imageToScreen(targetX, targetY); var pt = imageToScreen(targetX, targetY);
...@@ -173,6 +175,7 @@ function CopyMemo(index,contentId,pageNo,targetId, posX, posY, callback){ ...@@ -173,6 +175,7 @@ function CopyMemo(index,contentId,pageNo,targetId, posX, posY, callback){
//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});
//targetDiv.parent().removeClass('ui-draggable'); //targetDiv.parent().removeClass('ui-draggable');
$("#overlay").show(); $("#overlay").show();
disableControlsCopyMemo();
targetDiv.css('z-index','1005'); targetDiv.css('z-index','1005');
targetDiv.css('top',targetY); targetDiv.css('top',targetY);
targetDiv.css('left',targetX - ($('#memoWrapper').width() /2 )); targetDiv.css('left',targetX - ($('#memoWrapper').width() /2 ));
......
...@@ -189,7 +189,7 @@ function drawMove(coors, context_draw) { ...@@ -189,7 +189,7 @@ function drawMove(coors, context_draw) {
context_draw.lineCap = 'butt'; context_draw.lineCap = 'butt';
context_draw.fillStyle = "#" + makerColor; context_draw.fillStyle = "#" + makerColor;
context_draw.fill(); context_draw.fill();
context_draw.globalCompositeOperation = 'source-over'; context_draw.globalCompositeOperation = 'lighter';
context_draw.closePath(); context_draw.closePath();
context_draw.beginPath();*/ context_draw.beginPath();*/
// 左上に描画する場合 // 左上に描画する場合
...@@ -212,7 +212,7 @@ function drawMove(coors, context_draw) { ...@@ -212,7 +212,7 @@ function drawMove(coors, context_draw) {
context_draw.lineCap = 'butt'; context_draw.lineCap = 'butt';
context_draw.fillStyle = "#" + makerColor; context_draw.fillStyle = "#" + makerColor;
context_draw.fill(); context_draw.fill();
context_draw.globalCompositeOperation = 'source-over'; context_draw.globalCompositeOperation = 'lighter';
context_draw.closePath(); context_draw.closePath();
context_draw.beginPath();*/ context_draw.beginPath();*/
...@@ -234,7 +234,7 @@ function drawMove(coors, context_draw) { ...@@ -234,7 +234,7 @@ function drawMove(coors, context_draw) {
context_draw.lineCap = 'butt'; context_draw.lineCap = 'butt';
context_draw.fillStyle = "#" + makerColor; context_draw.fillStyle = "#" + makerColor;
context_draw.fill(); context_draw.fill();
context_draw.globalCompositeOperation = 'source-over'; context_draw.globalCompositeOperation = 'lighter';
context_draw.closePath(); context_draw.closePath();
context_draw.beginPath();*/ context_draw.beginPath();*/
...@@ -258,7 +258,7 @@ function drawMove(coors, context_draw) { ...@@ -258,7 +258,7 @@ function drawMove(coors, context_draw) {
context_draw.lineCap = 'butt'; context_draw.lineCap = 'butt';
context_draw.fillStyle = "#" + makerColor; context_draw.fillStyle = "#" + makerColor;
context_draw.fill(); context_draw.fill();
context_draw.globalCompositeOperation = 'source-over'; context_draw.globalCompositeOperation = 'lighter';
context_draw.closePath(); context_draw.closePath();
context_draw.beginPath();*/ context_draw.beginPath();*/
...@@ -282,7 +282,7 @@ function drawMove(coors, context_draw) { ...@@ -282,7 +282,7 @@ function drawMove(coors, context_draw) {
context_draw.lineCap = 'butt'; context_draw.lineCap = 'butt';
context_draw.fillStyle = "#" + makerColor; context_draw.fillStyle = "#" + makerColor;
context_draw.fill(); context_draw.fill();
context_draw.globalCompositeOperation = 'source-over'; context_draw.globalCompositeOperation = 'lighter';
context_draw.closePath(); context_draw.closePath();
context_draw.beginPath();*/ context_draw.beginPath();*/
...@@ -304,7 +304,7 @@ function drawMove(coors, context_draw) { ...@@ -304,7 +304,7 @@ function drawMove(coors, context_draw) {
context_draw.lineCap = 'butt'; context_draw.lineCap = 'butt';
context_draw.fillStyle = "#" + makerColor; context_draw.fillStyle = "#" + makerColor;
context_draw.fill(); context_draw.fill();
context_draw.globalCompositeOperation = 'source-over'; context_draw.globalCompositeOperation = 'lighter';
context_draw.closePath(); context_draw.closePath();
context_draw.beginPath();*/ context_draw.beginPath();*/
...@@ -317,7 +317,7 @@ function drawMove(coors, context_draw) { ...@@ -317,7 +317,7 @@ function drawMove(coors, context_draw) {
} }
} else { } else {
if (sy > coors.y) { if (sy > coors.y) {
/*context_draw.globalCompositeOperation = 'destination-out'; /* context_draw.globalCompositeOperation = 'destination-out';
context_draw.moveTo(ptStart[2].x, ptStart[2].y); context_draw.moveTo(ptStart[2].x, ptStart[2].y);
context_draw.lineTo(ptStart[3].x, ptStart[3].y); context_draw.lineTo(ptStart[3].x, ptStart[3].y);
context_draw.lineTo(ptEnd[0].x, ptEnd[0].y); context_draw.lineTo(ptEnd[0].x, ptEnd[0].y);
...@@ -326,7 +326,7 @@ function drawMove(coors, context_draw) { ...@@ -326,7 +326,7 @@ function drawMove(coors, context_draw) {
context_draw.lineCap = 'butt'; context_draw.lineCap = 'butt';
context_draw.fillStyle = "#" + makerColor; context_draw.fillStyle = "#" + makerColor;
context_draw.fill(); context_draw.fill();
context_draw.globalCompositeOperation = 'source-over'; context_draw.globalCompositeOperation = 'lighter';
context_draw.closePath(); context_draw.closePath();
context_draw.beginPath();*/ context_draw.beginPath();*/
...@@ -346,7 +346,7 @@ function drawMove(coors, context_draw) { ...@@ -346,7 +346,7 @@ function drawMove(coors, context_draw) {
context_draw.lineCap = 'butt'; context_draw.lineCap = 'butt';
context_draw.fillStyle = "#" + makerColor; context_draw.fillStyle = "#" + makerColor;
context_draw.fill(); context_draw.fill();
context_draw.globalCompositeOperation = 'source-over'; context_draw.globalCompositeOperation = 'lighter';
context_draw.closePath(); context_draw.closePath();
context_draw.beginPath();*/ context_draw.beginPath();*/
...@@ -366,7 +366,7 @@ function drawMove(coors, context_draw) { ...@@ -366,7 +366,7 @@ function drawMove(coors, context_draw) {
context_draw.lineCap = 'butt'; context_draw.lineCap = 'butt';
context_draw.fillStyle = "#" + makerColor; context_draw.fillStyle = "#" + makerColor;
context_draw.fill(); context_draw.fill();
context_draw.globalCompositeOperation = 'source-over'; context_draw.globalCompositeOperation = 'lighter';
context_draw.closePath(); context_draw.closePath();
context_draw.beginPath();*/ context_draw.beginPath();*/
...@@ -441,7 +441,7 @@ function drawPoint(coors, context_draw) { ...@@ -441,7 +441,7 @@ function drawPoint(coors, context_draw) {
context_draw.lineCap = 'square'; context_draw.lineCap = 'square';
context_draw.strokeStyle = "#" + makerColor; context_draw.strokeStyle = "#" + makerColor;
context_draw.stroke(); context_draw.stroke();
context_draw.globalCompositeOperation = 'source-over';*/ context_draw.globalCompositeOperation = 'lighter';*/
context_draw.lineCap = "square"; context_draw.lineCap = "square";
context_draw.lineWidth = makerSize; context_draw.lineWidth = makerSize;
......
...@@ -25,8 +25,7 @@ var pen_chooseColor; ...@@ -25,8 +25,7 @@ var pen_chooseColor;
function ShowPen(targetId) { function ShowPen(targetId) {
pen_targetDiv = targetId; pen_targetDiv = targetId;
pen_targetDiv.html(''); pen_targetDiv.children().remove();
targetId.append( targetId.append(
'<div id="panel-pen" class="rayermenu1">' '<div id="panel-pen" class="rayermenu1">'
+' <div id="panel-pen-size">' +' <div id="panel-pen-size">'
...@@ -58,13 +57,30 @@ function ShowPen(targetId) { ...@@ -58,13 +57,30 @@ function ShowPen(targetId) {
i18nReplaceText(); i18nReplaceText();
// pen_targetDiv.dialog({ width: 510, height: 390, modal: true }); // pen_targetDiv.dialog({ width: 510, height: 390, modal: true });
pen_targetDiv.fadeIn('medium',function(){ // pen_targetDiv.fadeIn('medium',function(){
//lockLayout(); // //lockLayout();
pen_targetDiv.draggable({ containment: "#containment-wrapper", scroll: false }); // pen_targetDiv.draggable({ containment: "#containment-wrapper", scroll: false });
}); // }); pen_targetDiv.show();
//pen_targetDiv.draggable({ containment: "#Pen_btnOk", scroll: false });
pen_targetDiv.draggable({ revert: false});
Pen_handleColorPickerEvent(); Pen_handleColorPickerEvent();
} }
function touchStart_BtnOk_Pen(e){
e.preventDefault();
pen_targetDiv.draggable("destroy");
Pen_dspOK_click();
}
function touchStart_BtnCancel_Pen(e){
e.preventDefault();
pen_targetDiv.draggable("destroy");
Pen_dspCancel_click();
}
function Pen_handleColorPickerEvent() { function Pen_handleColorPickerEvent() {
...@@ -77,10 +93,11 @@ function Pen_handleColorPickerEvent() { ...@@ -77,10 +93,11 @@ function Pen_handleColorPickerEvent() {
$('.colorpicker').unbind('mouseenter'); $('.colorpicker').unbind('mouseenter');
$('.colorpicker').unbind('mouseleave'); $('.colorpicker').unbind('mouseleave');
$('#penColorwrapper').unbind('mouseleave'); $('#penColorwrapper').unbind('mouseleave');
document.getElementById('Pen_btnOk').addEventListener('touchstart',touchStart_BtnOk_Pen,false);
document.getElementById('Pen_btnCancel').addEventListener('touchstart',touchStart_BtnCancel_Pen,false);
} }
else{ else{
//alert('here');
$('.colorpicker').unbind('mouseenter'); $('.colorpicker').unbind('mouseenter');
$('.colorpicker').unbind('mouseleave'); $('.colorpicker').unbind('mouseleave');
$('#penColorwrapper').unbind('mouseleave'); $('#penColorwrapper').unbind('mouseleave');
...@@ -108,9 +125,9 @@ function Pen_handleColorPickerEvent() { ...@@ -108,9 +125,9 @@ function Pen_handleColorPickerEvent() {
$('.colorpicker').live('click', Pen_colorPickerClickFunction); $('.colorpicker').live('click', Pen_colorPickerClickFunction);
//$('#penColorwrapper').live('mouseleave', Pen_colorWrapperMouseLeaveFunction); //$('#penColorwrapper').live('mouseleave', Pen_colorWrapperMouseLeaveFunction);
$("#avw-sys-modal").click (function () { $("#avw-sys-modal").click (function () {
pen_targetDiv.fadeOut('medium',function(){ // pen_targetDiv.fadeOut('medium',function(){
//unlockLayout(); // //unlockLayout();
}); // }); pen_targetDiv.show();
}); });
} }
...@@ -266,7 +283,6 @@ function Pen_rdo4_click() { ...@@ -266,7 +283,6 @@ function Pen_rdo4_click() {
// Event of button OK // Event of button OK
function Pen_dspOK_click() { function Pen_dspOK_click() {
// Set selected value to local storage // Set selected value to local storage
var typeValue = undefined; var typeValue = undefined;
......
...@@ -88,7 +88,7 @@ function OpenPopupText(posX, posY, content, dialogDiv, arrowDiv) { ...@@ -88,7 +88,7 @@ function OpenPopupText(posX, posY, content, dialogDiv, arrowDiv) {
break; break;
} }
dialogDiv.css("left", left_dialog + "px"); dialogDiv.css("left", left_dialog + "px");
dialogDiv.css("top", top_dialog + "px"); dialogDiv.css("top", (top_dialog + 10) + "px");
} }
/* /*
......
/// <reference path="../common/js/avweb.js" /> /// <reference path="../common/js/avweb.js" />
/// <reference path="../common/js/common.js" /> /// <reference path="../common/js/common.js" />
/// <reference path="../common/js/i18n.js" /> /// <reference path="../common/js/i18n.js" />
/// <reference path="../common/js/jquery-1.8.1.min.js" />
/// <reference path="../common/js/jquery-ui-1.8.23.custom.min.js" />
/// <reference path="../common/js/jquery.toastmessage.js" />
var isHoverOn = false; var isHoverOn = false;
$(document).ready(function () { $(document).ready(function () {
if (!avwCheckLogin(ScreenIds.Login)) return; if (!avwCheckLogin(ScreenIds.Login)) return;
// Set event to prevent leave // Set event to prevent leave
avwSetLogoutNortice(); //avwSetLogoutNortice();
ToogleLogoutNortice();
//Toggle Searchbox //Toggle Searchbox
$('input#searchbox-key').click(toggleSearchPanel); $('input#searchbox-key').click(toggleSearchPanel);
...@@ -273,13 +277,14 @@ function logoutFunction() { ...@@ -273,13 +277,14 @@ function logoutFunction() {
} }
else { else {
if (ClientData.userOpt_logoutMode() == 0) { // Logout with backup if (ClientData.userOpt_logoutMode() == 0) { // Logout with backup
lockLayout();
DoBackup(); DoBackup();
} }
else if (ClientData.userOpt_logoutMode() == 1) { // Logout without backup else if (ClientData.userOpt_logoutMode() == 1) { // Logout without backup
// Do nothing // Do nothing
} }
// Logout // Logout
webLogoutEvent(); //webLogoutEvent();
} }
} }
} }
...@@ -337,6 +342,9 @@ function confirmWithoutBackupFunction(e) { ...@@ -337,6 +342,9 @@ function confirmWithoutBackupFunction(e) {
function confirmWithBackupFunction(e) { function confirmWithBackupFunction(e) {
e.preventDefault(); e.preventDefault();
var remember = $('#chkRememberBackup').attr('checked'); var remember = $('#chkRememberBackup').attr('checked');
unlockLayout();
$('#dlgConfirmBackup1').css('z-index', '99');
lockLayout();
if(remember == 'checked'){ if(remember == 'checked'){
ClientData.userOpt_bkConfirmFlg(0); // Do not show dialog in next time ClientData.userOpt_bkConfirmFlg(0); // Do not show dialog in next time
...@@ -348,7 +356,7 @@ function confirmWithBackupFunction(e) { ...@@ -348,7 +356,7 @@ function confirmWithBackupFunction(e) {
} }
ClientData.userOpt_logoutMode(0); // In next time, if choose: [do not show dialog], will backup and logout ClientData.userOpt_logoutMode(0); // In next time, if choose: [do not show dialog], will backup and logout
webLogoutEvent(); //webLogoutEvent();
} }
//Confirm Back Up Ok //Confirm Back Up Ok
...@@ -369,35 +377,44 @@ function DoBackup() { ...@@ -369,35 +377,44 @@ function DoBackup() {
ClientData.isChangedBookmark(false); ClientData.isChangedBookmark(false);
ClientData.isChangedMarkingData(false); ClientData.isChangedMarkingData(false);
ClientData.isChangedMemo(false); ClientData.isChangedMemo(false);
alert(i18nText('msgBackupSuccess')); //alert(i18nText('msgBackupSuccess'));
// // Show message: msgBackupSuccess // Show message: msgBackupSuccess
// $().toastmessage({ position: 'middle-center' }); $().toastmessage({ position: 'middle-center' });
// $().toastmessage('showToast', { $().toastmessage('showToast', {
// type: 'success', type: 'success',
// sticky: true, sticky: true,
// text: i18nText('msgBackupSuccess') text: i18nText('msgBackupSuccess'),
// }); });
$('.toast-position-middle-center').css('width', '500px');
$('.toast-position-middle-center').css('margin-left', '-250px');
$('.toast-item-close').live('click', webLogoutEvent);
} }
else { else {
alert(i18nText('msgBackupFailed')); //alert(i18nText('msgBackupFailed'));
// // Show error message: msgBackupFailed // Show error message: msgBackupFailed
// $().toastmessage({ position: 'middle-center' }); $().toastmessage({ position: 'middle-center' });
// $().toastmessage('showToast', { $().toastmessage('showToast', {
// type: 'error', type: 'error',
// sticky: true, sticky: true,
// text: i18nText('msgBackupFailed') text: i18nText('msgBackupFailed')
// }); });
$('.toast-position-middle-center').css('width', '500px');
$('.toast-position-middle-center').css('margin-left', '-250px');
$('.toast-item-close').live('click', webLogoutEvent);
} }
}, },
function (a, b, c) { function (a, b, c) {
alert(i18nText('msgBackupFailed')); //alert(i18nText('msgBackupFailed'));
// // Show error message: msgBackupFailed // Show error message: msgBackupFailed
// $().toastmessage({ position: 'middle-center' }); $().toastmessage({ position: 'middle-center' });
// $().toastmessage('showToast', { $().toastmessage('showToast', {
// type: 'error', type: 'error',
// sticky: true, sticky: true,
// text: i18nText('msgBackupFailed') text: i18nText('msgBackupFailed')
// }); });
$('.toast-position-middle-center').css('width', '500px');
$('.toast-position-middle-center').css('margin-left', '-250px');
$('.toast-item-close').live('click', webLogoutEvent);
}); });
} }
\ No newline at end of file
...@@ -38,6 +38,7 @@ var totalPage; ...@@ -38,6 +38,7 @@ var totalPage;
var contentViewData = []; var contentViewData = [];
var noRecordFlg = false; var noRecordFlg = false;
var home_isMove = false; var home_isMove = false;
var history_contentTitleKana = [];
$(document).ready(function(){ $(document).ready(function(){
...@@ -88,6 +89,13 @@ $(document).ready(function(){ ...@@ -88,6 +89,13 @@ $(document).ready(function(){
//$('.button-details').live('touchstart', readSubmenuFunction); //$('.button-details').live('touchstart', readSubmenuFunction);
$('.button-details').live('touchend', readSubmenuFunction); $('.button-details').live('touchend', readSubmenuFunction);
$('.button-details').live('touchmove', function () { home_isMove = true; }); $('.button-details').live('touchmove', function () { home_isMove = true; });
$(window).resize(function () {
if ($("#contentDetail").css("display") != "none") {
// Refresh panel of detail to center.
$("#contentDetail").center();
}
});
}); });
//Call API //Call API
...@@ -1122,6 +1130,20 @@ function syncReadingContent(){ ...@@ -1122,6 +1130,20 @@ function syncReadingContent(){
} }
/* /*
Get content title kana if it existed
*/
function getContentNameKana(strContentId) {
var strContentNameKana = null;
for (var nIndex = 0; nIndex < history_contentTitleKana.length; nIndex++) {
if (history_contentTitleKana[nIndex].contentId == strContentId) {
strContentNameKana = history_contentTitleKana[nIndex].contentNameKana;
break;
}
}
return strContentNameKana;
}
/*
Check content whether existed or not Check content whether existed or not
*/ */
function IsExistContent(strContentId) { function IsExistContent(strContentId) {
...@@ -1134,6 +1156,7 @@ function IsExistContent(strContentId) { ...@@ -1134,6 +1156,7 @@ function IsExistContent(strContentId) {
avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", 'GET', params, avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", 'GET', params,
function (data) { function (data) {
isExisted = true; isExisted = true;
history_contentTitleKana.push({ contentId: strContentId, contentNameKana: data.contentData.contentNameKana });
}, },
function (xmlHttpRequest, txtStatus, errorThrown) { function (xmlHttpRequest, txtStatus, errorThrown) {
if (xmlHttpRequest.status == 404) { if (xmlHttpRequest.status == 404) {
...@@ -1341,13 +1364,22 @@ function formatOriginalPublishDate(date){ ...@@ -1341,13 +1364,22 @@ function formatOriginalPublishDate(date){
return resultDate; return resultDate;
} }
function returnContentTitleKana(id){ function returnContentTitleKana(id) {
var titleKana;
// Get title kana from existed contents
titleKana = getContentNameKana(id);
if (titleKana != null) {
// Skip this case
}
else {
var params = { var params = {
contentId: id, contentId: id,
sid: ClientData.userInfo_sid(), sid: ClientData.userInfo_sid(),
getType: 1 getType: 1
} }
var titleKana;
// Get all pages of content // Get all pages of content
avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", 'GET', params, avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", 'GET', params,
...@@ -1356,6 +1388,7 @@ function returnContentTitleKana(id){ ...@@ -1356,6 +1388,7 @@ function returnContentTitleKana(id){
titleKana = data.contentData.contentNameKana; titleKana = data.contentData.contentNameKana;
}, null); }, null);
}
return titleKana; return titleKana;
} }
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
//----Constant-----------// //----Constant-----------//
var DEFAULT_DISP_NUMBER_RECORD_FROM = 1; var DEFAULT_DISP_NUMBER_RECORD_FROM = 1;
var DEFAULT_DISP_NUMBER_RECORD_TO = 15; var DEFAULT_DISP_NUMBER_RECORD_TO = 15;
var DEFAULT_SORT_TYPE = '1'; var DEFAULT_SORT_TYPE = '3';
var DEFAULT_SORT_ORDER = '1'; var DEFAULT_SORT_ORDER = '2';
var DEFAULT_SEARCH_DIVISION = 0; var DEFAULT_SEARCH_DIVISION = 0;
var DEFAULT_IMG_OPTION_MEMO = 'img/list/pic_1.png'; var DEFAULT_IMG_OPTION_MEMO = 'img/list/pic_1.png';
...@@ -59,9 +59,9 @@ $(document).ready(function () { ...@@ -59,9 +59,9 @@ $(document).ready(function () {
RegisterLog(); RegisterLog();
//Sync Data //Sync Data
if(ClientData.ReadingContentIds() == null || ClientData.ReadingContentIds() == 'undefined' || ClientData.ReadingContentIds().length == 0){ if (ClientData.ReadingContentIds() == null || ClientData.ReadingContentIds() == 'undefined' || ClientData.ReadingContentIds().length == 0) {
ClientData.common_contentDataChkFlg(false); ClientData.common_contentDataChkFlg(false);
}else{ } else {
syncContentData(); syncContentData();
} }
...@@ -134,6 +134,12 @@ $(document).ready(function () { ...@@ -134,6 +134,12 @@ $(document).ready(function () {
$('body').click(bodyHomeClickFunction); $('body').click(bodyHomeClickFunction);
$(window).resize(function () {
if ($("#contentDetail").css("display") != "none") {
// Refresh panel of detail to center.
$("#contentDetail").center();
}
});
}); });
function subMenuHoverFunction(){ function subMenuHoverFunction(){
...@@ -454,6 +460,8 @@ function genreSelectFunction() { ...@@ -454,6 +460,8 @@ function genreSelectFunction() {
$('.folder').css('font-weight', 'normal'); $('.folder').css('font-weight', 'normal');
$('.folder').css('text-decoration', 'none'); $('.folder').css('text-decoration', 'none');
$('#all').css('font-weight', 'bold');
$('#all').css('text-decoration', 'underline');
var recordFrom = 0; var recordFrom = 0;
var recordTo = 0; var recordTo = 0;
...@@ -499,6 +507,9 @@ function groupSelectFunction() { ...@@ -499,6 +507,9 @@ function groupSelectFunction() {
$('.folder').css('font-weight', 'normal'); $('.folder').css('font-weight', 'normal');
$('.folder').css('text-decoration', 'none'); $('.folder').css('text-decoration', 'none');
var firstNode = $('#list_1').find('a')[0];
$('#list_1').find(firstNode).css('text-decoration', 'underline');
$('#list_1').find(firstNode).css('font-weight', 'bold');
var recordFrom = 0; var recordFrom = 0;
var recordTo = 0; var recordTo = 0;
...@@ -564,12 +575,16 @@ function getDataJsonFileGenre(){ ...@@ -564,12 +575,16 @@ function getDataJsonFileGenre(){
} }
}); });
var tree1 = new TreeView(); var tree1 = new TreeView();
tree1.CategoryTagName = "a";
//tree1.TotalCount = totalCount; //tree1.TotalCount = totalCount;
if (genre_totalcontent != -1) { if (genre_totalcontent != -1) {
tree1.TotalCount = genre_totalcontent; tree1.TotalCount = genre_totalcontent;
} }
tree1.Show("list_0", arrData, "AddGenre_Callback"); tree1.Show("list_0", arrData, "AddGenre_Callback");
$("#list_0").treeview(); $("#list_0").treeview();
$('#all').css('font-weight', 'bold');
$('#all').css('text-decoration', 'underline');
}); });
} }
...@@ -701,6 +716,7 @@ function getDataJsonFileGroup(){ ...@@ -701,6 +716,7 @@ function getDataJsonFileGroup(){
} }
}); });
var tree2 = new TreeView(); var tree2 = new TreeView();
tree2.CategoryTagName = "a";
//tree1.TotalCount = totalCount; //tree1.TotalCount = totalCount;
if (group_totalcontent != -1) { if (group_totalcontent != -1) {
tree2.TotalCount = group_totalcontent; tree2.TotalCount = group_totalcontent;
...@@ -708,6 +724,10 @@ function getDataJsonFileGroup(){ ...@@ -708,6 +724,10 @@ function getDataJsonFileGroup(){
tree2.Show("list_1", arrData, "AddGroup_Callback"); tree2.Show("list_1", arrData, "AddGroup_Callback");
$("#list_1").treeview(); $("#list_1").treeview();
var firstNode = $('#list_1').find('a')[0];
$('#list_1').find(firstNode).css('text-decoration', 'underline');
$('#list_1').find(firstNode).css('font-weight', 'bold');
// Expand nodes // Expand nodes
for (var nIndex = 0; nIndex < tree2.ExpandNodes.length; nIndex++) { for (var nIndex = 0; nIndex < tree2.ExpandNodes.length; nIndex++) {
if ($("#" + tree2.ExpandNodes[nIndex]).parent()) { if ($("#" + tree2.ExpandNodes[nIndex]).parent()) {
...@@ -1801,6 +1821,9 @@ function setMetaVersionData(conId){ ...@@ -1801,6 +1821,9 @@ function setMetaVersionData(conId){
//handle display sort direction //handle display sort direction
function handleSortDisp(){ function handleSortDisp(){
$('#control-sort-title').removeClass('active_tops');
$('#control-sort-titlekana').removeClass('active_tops');
$('#control-sort-releasedate').removeClass('active_tops');
var typeSort; var typeSort;
var orderSort; var orderSort;
...@@ -1816,6 +1839,10 @@ function handleSortDisp(){ ...@@ -1816,6 +1839,10 @@ function handleSortDisp(){
orderSort = ClientData.searchCond_sortOrder(); orderSort = ClientData.searchCond_sortOrder();
if(typeSort == 1){ if(typeSort == 1){
$('#control-sort-title').addClass('active_tops');
$('#control-sort-titlekana').removeClass('active_tops');
$('#control-sort-releasedate').removeClass('active_tops');
if(orderSort == Consts.ConstOrderSetting_Asc){ if(orderSort == Consts.ConstOrderSetting_Asc){
$('#title-sorttype').html(''); $('#title-sorttype').html('');
$('#title-sorttype').html('▲'); $('#title-sorttype').html('▲');
...@@ -1832,6 +1859,10 @@ function handleSortDisp(){ ...@@ -1832,6 +1859,10 @@ function handleSortDisp(){
} }
} }
else if(typeSort == 2){ else if(typeSort == 2){
$('#control-sort-title').removeClass('active_tops');
$('#control-sort-titlekana').addClass('active_tops');
$('#control-sort-releasedate').removeClass('active_tops');
if(orderSort == Consts.ConstOrderSetting_Asc){ if(orderSort == Consts.ConstOrderSetting_Asc){
$('#title-sorttype').html(''); $('#title-sorttype').html('');
$('#titlekana-sorttype').html(''); $('#titlekana-sorttype').html('');
...@@ -1848,6 +1879,10 @@ function handleSortDisp(){ ...@@ -1848,6 +1879,10 @@ function handleSortDisp(){
} }
} }
else{ else{
$('#control-sort-title').removeClass('active_tops');
$('#control-sort-titlekana').removeClass('active_tops');
$('#control-sort-releasedate').addClass('active_tops');
if(orderSort == Consts.ConstOrderSetting_Asc){ if(orderSort == Consts.ConstOrderSetting_Asc){
$('#title-sorttype').html(''); $('#title-sorttype').html('');
$('#titlekana-sorttype').html(''); $('#titlekana-sorttype').html('');
......
...@@ -25,6 +25,7 @@ var user_data_backup; ...@@ -25,6 +25,7 @@ var user_data_backup;
var marking; var marking;
var force_login_periodically; var force_login_periodically;
var login_errorMessage = "";
//Load login Info //Load login Info
function loadLoginInfo() { function loadLoginInfo() {
...@@ -92,18 +93,23 @@ function checkValidation() { ...@@ -92,18 +93,23 @@ function checkValidation() {
var msgError = $('#main-error-message'); var msgError = $('#main-error-message');
if (!ValidationUtil.CheckRequiredForText(accountPath)) { if (!ValidationUtil.CheckRequiredForText(accountPath)) {
login_errorMessage = "";
msgError.html(i18nText('msgLoginEmpty')); msgError.html(i18nText('msgLoginEmpty'));
msgError.attr('lang', 'msgLoginEmpty');
msgError.show(); msgError.show();
return false; return false;
} }
else if (!ValidationUtil.CheckRequiredForText(loginId)) { else if (!ValidationUtil.CheckRequiredForText(loginId)) {
login_errorMessage = "";
msgError.html(i18nText('msgLoginEmpty')); msgError.html(i18nText('msgLoginEmpty'));
msgError.attr('lang', 'msgLoginEmpty');
msgError.show(); msgError.show();
return false; return false;
} }
else if (!ValidationUtil.CheckRequiredForText(password)) { else if (!ValidationUtil.CheckRequiredForText(password)) {
login_errorMessage = "";
msgError.html(i18nText('msgLoginEmpty')); msgError.html(i18nText('msgLoginEmpty'));
msgError.attr('lang', 'msgLoginEmpty');
msgError.show(); msgError.show();
return false; return false;
} }
...@@ -120,7 +126,9 @@ function checkDialogValidation(){ ...@@ -120,7 +126,9 @@ function checkDialogValidation(){
var msgError = $('#dialog-error-message'); var msgError = $('#dialog-error-message');
if (!ValidationUtil.CheckRequiredForText(currentPass)) { if (!ValidationUtil.CheckRequiredForText(currentPass)) {
login_errorMessage = "";
msgError.html(i18nText('msgPwdEmpty')); msgError.html(i18nText('msgPwdEmpty'));
msgError.attr('lang', 'msgPwdEmpty');
msgError.show(); msgError.show();
/* show error messages */ /* show error messages */
...@@ -134,7 +142,9 @@ function checkDialogValidation(){ ...@@ -134,7 +142,9 @@ function checkDialogValidation(){
return false; return false;
} }
else if (!ValidationUtil.CheckRequiredForText(newPass)) { else if (!ValidationUtil.CheckRequiredForText(newPass)) {
login_errorMessage = "";
msgError.html(i18nText('msgPwdEmpty')); msgError.html(i18nText('msgPwdEmpty'));
msgError.attr('lang', 'msgPwdEmpty');
msgError.show(); msgError.show();
/* show error messages */ /* show error messages */
//$().toastmessage({ position: 'middle-center' }); //$().toastmessage({ position: 'middle-center' });
...@@ -161,7 +171,9 @@ function checkDialogValidation(){ ...@@ -161,7 +171,9 @@ function checkDialogValidation(){
else else
{ {
if(newPass != confirmPass){ if(newPass != confirmPass){
login_errorMessage = "";
msgError.html(i18nText('msgPwdNotMatch')); msgError.html(i18nText('msgPwdNotMatch'));
msgError.attr('lang', 'msgPwdNotMatch');
msgError.show(); msgError.show();
/* show error messages */ /* show error messages */
// $().toastmessage({ position: 'middle-center' }); // $().toastmessage({ position: 'middle-center' });
...@@ -304,6 +316,7 @@ function processLogin() { ...@@ -304,6 +316,7 @@ function processLogin() {
} }
} }
else { else {
login_errorMessage = data.errorMessage;
$('#main-error-message').html(format(i18nText('msgLoginErrWrong'), data.errorMessage).toString()); $('#main-error-message').html(format(i18nText('msgLoginErrWrong'), data.errorMessage).toString());
$('#main-error-message').show(); $('#main-error-message').show();
...@@ -321,6 +334,7 @@ function processLogin() { ...@@ -321,6 +334,7 @@ function processLogin() {
} }
}, function (xhr, statusText, errorThrown) { }, function (xhr, statusText, errorThrown) {
login_errorMessage = JSON.parse(xhr.responseText).errorMessage;
//$('#main-error-message').html(format(i18nText('msgLoginErrWrong'), formatErrorCode(a.status)).toString()); //$('#main-error-message').html(format(i18nText('msgLoginErrWrong'), formatErrorCode(a.status)).toString());
if(xhr.responseText && xhr.status != 0) { if(xhr.responseText && xhr.status != 0) {
$('#main-error-message').html(format(i18nText('msgLoginErrWrong'), JSON.parse(xhr.responseText).errorMessage).toString()); $('#main-error-message').html(format(i18nText('msgLoginErrWrong'), JSON.parse(xhr.responseText).errorMessage).toString());
...@@ -373,6 +387,9 @@ function changeLanguageJa(){ ...@@ -373,6 +387,9 @@ function changeLanguageJa(){
changeLanguage(Consts.ConstLanguage_Ja); changeLanguage(Consts.ConstLanguage_Ja);
document.title = i18nText('dspLogin') + ' | ' + i18nText('sysAppTitle'); document.title = i18nText('dspLogin') + ' | ' + i18nText('sysAppTitle');
//ClientData.userInfo_language(Consts.ConstLanguage_Ja); //ClientData.userInfo_language(Consts.ConstLanguage_Ja);
if (login_errorMessage != ""){
$('#main-error-message').html(format(i18nText('msgLoginErrWrong'), login_errorMessage).toString());
}
} }
//Change Language Korean //Change Language Korean
...@@ -380,6 +397,9 @@ function changeLanguageKo(){ ...@@ -380,6 +397,9 @@ function changeLanguageKo(){
changeLanguage(Consts.ConstLanguage_Ko); changeLanguage(Consts.ConstLanguage_Ko);
document.title = i18nText('dspLogin') + ' | ' + i18nText('sysAppTitle'); document.title = i18nText('dspLogin') + ' | ' + i18nText('sysAppTitle');
//ClientData.userInfo_language(Consts.ConstLanguage_Ko); //ClientData.userInfo_language(Consts.ConstLanguage_Ko);
if (login_errorMessage != ""){
$('#main-error-message').html(format(i18nText('msgLoginErrWrong'), login_errorMessage).toString());
}
} }
//Change Language English //Change Language English
...@@ -387,6 +407,9 @@ function changeLanguageEn(){ ...@@ -387,6 +407,9 @@ function changeLanguageEn(){
changeLanguage(Consts.ConstLanguage_En); changeLanguage(Consts.ConstLanguage_En);
document.title = i18nText('dspLogin') + ' | ' + i18nText('sysAppTitle'); document.title = i18nText('dspLogin') + ' | ' + i18nText('sysAppTitle');
//ClientData.userInfo_language(Consts.ConstLanguage_En); //ClientData.userInfo_language(Consts.ConstLanguage_En);
if (login_errorMessage != ""){
$('#main-error-message').html(format(i18nText('msgLoginErrWrong'), login_errorMessage).toString());
}
} }
//Login click function //Login click function
......
...@@ -359,6 +359,15 @@ function dspSave_Click(e) { ...@@ -359,6 +359,15 @@ function dspSave_Click(e) {
else { else {
ClientData.userOpt_makingDsp(0); ClientData.userOpt_makingDsp(0);
} }
// Show/not show alert when press F5.close tab.broswer.
if ($("#chkOpt005").attr('checked') == 'checked') {
ClientData.userOpt_closeOrRefreshAlert(1);
ToogleLogoutNortice();
}
else {
ClientData.userOpt_closeOrRefreshAlert(0);
ToogleLogoutNortice();
}
// 毎回ログアウトの時、バックアップするかどうかは必ず確認する // 毎回ログアウトの時、バックアップするかどうかは必ず確認する
if ($("#chkOptBkCfm").attr('checked') == 'checked') { if ($("#chkOptBkCfm").attr('checked') == 'checked') {
ClientData.userOpt_bkConfirmFlg(1); ClientData.userOpt_bkConfirmFlg(1);
...@@ -430,6 +439,8 @@ function dspOptReset_Click(e) { ...@@ -430,6 +439,8 @@ function dspOptReset_Click(e) {
$("#chkOpt002").attr('checked', 'checked'); $("#chkOpt002").attr('checked', 'checked');
// マーキング(コンテンツを開いた時に表示する) // マーキング(コンテンツを開いた時に表示する)
$("#chkOpt003").attr('checked', 'checked'); $("#chkOpt003").attr('checked', 'checked');
// Show alert when press F5.close tab.broswer
$("#chkOpt005").attr('checked', 'checked');
// 毎回ログアウトの時、バックアップするかどうかは必ず確認する // 毎回ログアウトの時、バックアップするかどうかは必ず確認する
$("#chkOptBkCfm").attr('checked', 'checked'); $("#chkOptBkCfm").attr('checked', 'checked');
} }
...@@ -737,7 +748,13 @@ function InitScreen() { ...@@ -737,7 +748,13 @@ function InitScreen() {
$("#chkOpt003").attr('checked', 'checked'); $("#chkOpt003").attr('checked', 'checked');
} }
// Show alert when press F5.close tab.broswer
if (ClientData.userOpt_closeOrRefreshAlert() == 0) {
$("#chkOpt005").removeAttr('checked');
}
else {
$("#chkOpt005").attr('checked', 'checked');
}
// 毎回ログアウトの時、バックアップするかどうかは必ず確認する // 毎回ログアウトの時、バックアップするかどうかは必ず確認する
if (ClientData.userOpt_bkConfirmFlg() == 0) { if (ClientData.userOpt_bkConfirmFlg() == 0) {
$("#chkOptBkCfm").removeAttr('checked'); $("#chkOptBkCfm").removeAttr('checked');
......
...@@ -104,6 +104,7 @@ ...@@ -104,6 +104,7 @@
</li> </li>
<li><label><input type=checkbox name="repeat" value="repeat" class="chkbx" id="chkOpt002" checked="checked" /><label for="chk1" id="txtOpt002" lang="txtOpt002" class="lang">動画、音楽繰り返し</label></label></li> <li><label><input type=checkbox name="repeat" value="repeat" class="chkbx" id="chkOpt002" checked="checked" /><label for="chk1" id="txtOpt002" lang="txtOpt002" class="lang">動画、音楽繰り返し</label></label></li>
<li><label><input type=checkbox name="marking" value="marking" class="chkbx" id="chkOpt003" checked="checked" /><label id="lblOpt003" for="chkOpt003" lang="txtOpt003" class="lang">マーキング(コンテンツを開いた時に表示する)</label></label><span class="notice lang" lang="txtOpt004" >※コンテンツを開いた時に表示する</span></li> <li><label><input type=checkbox name="marking" value="marking" class="chkbx" id="chkOpt003" checked="checked" /><label id="lblOpt003" for="chkOpt003" lang="txtOpt003" class="lang">マーキング(コンテンツを開いた時に表示する)</label></label><span class="notice lang" lang="txtOpt004" >※コンテンツを開いた時に表示する</span></li>
<li><label><input type=checkbox name="confirmClose" value="confirmClose" class="chkbx" id="chkOpt005" checked="checked" /><label for="chk1" id="txtOpt005" lang="txtOpt005" class="lang">タブ・ブラウザ終了・F5時のアラートが表示する</label></label></li>
</ul> </ul>
<h3 id="txtBkResCap" lang="txtBkResCap" class="lang">サーバにバックアップ/リストア</h3> <h3 id="txtBkResCap" lang="txtBkResCap" class="lang">サーバにバックアップ/リストア</h3>
<p class="logout_backup"><label><input type=checkbox name="backup" value="backup" id="chkOptBkCfm" checked="checked"><label id="txtOptBkCfm" for="chkOptBkCfm" lang="txtOptBkCfm" class="lang">毎回ログアウトの時、バックアップするかどうかは必ず確認する</label></label></p> <p class="logout_backup"><label><input type=checkbox name="backup" value="backup" id="chkOptBkCfm" checked="checked"><label id="txtOptBkCfm" for="chkOptBkCfm" lang="txtOptBkCfm" class="lang">毎回ログアウトの時、バックアップするかどうかは必ず確認する</label></label></p>
......
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