Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_web
check
Commits
5224d11b
Commit
5224d11b
authored
Dec 14, 2012
by
Motohisa Nakano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
20121214
parent
f2a72203
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
573 additions
and
408 deletions
+573
-408
abvw/common/css/jquery.treeview.css
+5
-1
abvw/common/js/common.js
+40
-21
abvw/common/js/zoomDetector.js
+2
-1
abvw/common/json/lang/lang-en.json
+1
-1
abvw/common/json/lang/lang-ja.json
+1
-1
abvw/common/json/lang/lang-ko.json
+1
-1
abvw/contentview.html
+328
-265
abvw/css/contentview.css
+2
-2
abvw/css/viewer.css
+2
-0
abvw/js/SCRCDL0100.js
+3
-0
abvw/js/bookmark.js
+0
-1
abvw/js/contentsearch.js
+3
-0
abvw/js/contentview.js
+7
-5
abvw/js/contentview_Memo.js
+5
-2
abvw/js/contentview_PopupText.js
+2
-2
abvw/js/history.js
+21
-9
abvw/js/home.js
+106
-60
abvw/js/login.js
+12
-7
abvw/js/settings.js
+32
-29
No files found.
abvw/common/css/jquery.treeview.css
View file @
5224d11b
...
...
@@ -3,7 +3,11 @@
margin
:
0
;
list-style
:
none
;
}
.treeview
{
white-space
:
nowrap
;
overflow-x
:
auto
;
}
.treeview
ul
{
background-color
:
white
;
margin-top
:
4px
;
...
...
abvw/common/js/common.js
View file @
5224d11b
...
...
@@ -88,6 +88,8 @@ var ScreenIds = {
};
var
Keys
=
{
zoom_ratioPre
:
'zoom_ratioPre'
,
IsRefresh
:
'IsRefresh'
,
// Local
BookmarkScreen
:
'BookmarkScreen'
,
...
...
@@ -267,8 +269,6 @@ var Keys = {
sortOpt_searchDivision
:
'sortOpt_searchDivision'
,
// Local: 並び順(sortOpt)_ソート方法:Interger(1:タイトル名, 2:タイトル名(かな), 3:公開順)
sortOpt_sortType
:
'sortOpt_sortType'
,
// Local :しおりデータ(bookmark)_コンテンツID:Interger
bookmark_contentNo
:
'bookmark_contentNo'
,
// Local :しおりデータ(bookmark)_ページNo:Interger
bookmark_pageNo
:
'bookmark_pageNo'
,
// Local :メモデータ(memo)_コンテンツID:Interger
...
...
@@ -483,7 +483,20 @@ function operateData(args, strKey, returnDefaultData) {
}
}
var
ClientData
=
{
zoom_ratioPre
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
SessionStorageUtils
.
set
(
Keys
.
zoom_ratioPre
,
JSON
.
stringify
(
data
));
}
else
{
if
(
SessionStorageUtils
.
get
(
Keys
.
zoom_ratioPre
)
!=
'undefined'
&&
SessionStorageUtils
.
get
(
Keys
.
zoom_ratioPre
)
!=
undefined
&&
SessionStorageUtils
.
get
(
Keys
.
zoom_ratioPre
)
!=
''
&&
SessionStorageUtils
.
get
(
Keys
.
zoom_ratioPre
)
!=
null
&&
SessionStorageUtils
.
get
(
Keys
.
zoom_ratioPre
)
!=
'null'
)
{
return
JSON
.
parse
(
SessionStorageUtils
.
get
(
Keys
.
zoom_ratioPre
));
}
return
1
;
}
},
// Local :ユーザ情報(userInfo)_アカウントパス:String
userInfo_accountPath
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
...
...
@@ -893,17 +906,6 @@ var ClientData = {
return
operateData
(
arguments
,
Keys
.
sortOpt_sortType
,
undefined
);
}
},
// Local :しおりデータ(bookmark)_コンテンツID:Interger
bookmark_contentNo
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
bookmark_contentNo
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
bookmark_contentNo
,
undefined
);
}
},
// Local :しおりデータ(bookmark)_ページNo:Interger
bookmark_pageNo
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
...
...
@@ -1851,15 +1853,25 @@ function unlockFunction(inputPass) {
}
},
function
(
xhr
,
statusText
,
errorThrown
)
{
errorCode
=
JSON
.
parse
(
xhr
.
responseText
);
if
(
xhr
.
responseText
&&
xhr
.
status
!=
0
)
{
errorCode
=
JSON
.
parse
(
xhr
.
responseText
);
}
else
{
// System error
showSystemError
();
}
});
// Check error
if
(
avwHasError
())
{
return
;
}
if
(
result
==
true
)
{
if
(
window
.
onUnlock
)
{
if
(
window
.
onUnlock
)
{
onUnlock
();
}
}
return
{
'result'
:
result
,
'errorCode'
:
errorCode
};
return
{
'result'
:
result
,
'errorCode'
:
errorCode
};
}
...
...
@@ -1945,12 +1957,19 @@ function RegisterLog() {
}
avwCmsApiSync
(
ClientData
.
userInfo_accountPath
(),
"contentReadingLog"
,
'get'
,
params
,
null
,
function
(
a
,
b
,
c
)
{
isError
=
true
;
function
(
xhr
,
b
,
c
)
{
if
(
xhr
.
status
!=
0
)
{
isError
=
true
;
}
else
{
showSystemError
();
}
});
};
// Clear logs in local
if
(
avwHasError
())
{
return
;
}
// Clear logs in local
if
(
!
isError
)
{
ClientData
.
ContentLogData
([]);
}
...
...
abvw/common/js/zoomDetector.js
View file @
5224d11b
...
...
@@ -7,7 +7,7 @@ var zoom_miliSeconds = 1000; // Default is 1 second
var
zoom_oldW
=
-
1
;
var
zoom_oldH
=
-
1
;
function
calculateZoomLevel
()
{
zoom_ratioPre
=
ClientData
.
zoom_ratioPre
();
if
(
zoom_timer
)
{
clearTimeout
(
zoom_timer
);
zoom_timer
=
null
;
...
...
@@ -25,6 +25,7 @@ function calculateZoomLevel() {
zoom_callbackFunction
(
zoom_ratioPre
,
zoom_ratio
,
zoom_oldW
,
zoom_oldH
,
window
.
innerWidth
,
window
.
innerHeight
);
}
zoom_ratioPre
=
zoom_ratio
;
ClientData
.
zoom_ratioPre
(
zoom_ratioPre
);
zoom_oldW
=
window
.
innerWidth
;
zoom_oldH
=
window
.
innerHeight
;
}
...
...
abvw/common/json/lang/lang-en.json
View file @
5224d11b
...
...
@@ -64,7 +64,7 @@
"dspBkCancel"
:
"Logout"
,
"txtSearchResult"
:
"Result"
,
"dspHome"
:
"Home"
,
"txtLoginUser"
:
"(Ver.2012121
3
-1)User:"
,
"txtLoginUser"
:
"(Ver.2012121
4
-1)User:"
,
"txtAll"
:
"All"
,
"txtMkgSize"
:
"Size"
,
"txtMkgS"
:
"S"
,
...
...
abvw/common/json/lang/lang-ja.json
View file @
5224d11b
...
...
@@ -64,7 +64,7 @@
"dspBkCancel"
:
"バックアップせずにログアウト"
,
"txtSearchResult"
:
"検索結果"
,
"dspHome"
:
"ホーム"
,
"txtLoginUser"
:
"(Ver.2012121
3
-1)ログイン中:"
,
"txtLoginUser"
:
"(Ver.2012121
4
-1)ログイン中:"
,
"txtAll"
:
"すべて"
,
"txtMkgSize"
:
"太さ"
,
"txtMkgS"
:
"小"
,
...
...
abvw/common/json/lang/lang-ko.json
View file @
5224d11b
...
...
@@ -64,7 +64,7 @@
"dspBkCancel"
:
"로그아웃"
,
"txtSearchResult"
:
"검색 결과"
,
"dspHome"
:
"홈"
,
"txtLoginUser"
:
"(Ver.2012121
3
-1)로그인 중:"
,
"txtLoginUser"
:
"(Ver.2012121
4
-1)로그인 중:"
,
"txtAll"
:
"전체"
,
"txtMkgSize"
:
"두께"
,
"txtMkgS"
:
"소"
,
...
...
abvw/contentview.html
View file @
5224d11b
...
...
@@ -141,7 +141,7 @@
var
isPressLeftMouse
=
false
;
var
isMoveOutDrawCanvas
=
false
;
var
typeSelectMemo
=
0
;
var
arrThumbnailsLoaded
=
[];
/* get Json stored content info */
function
getJsonContentInfo
(){
avwGrabContentPageImage
(
ClientData
.
userInfo_accountPath
(),
...
...
@@ -170,8 +170,7 @@
widthContentImage
=
data
.
width
;
heightContentImage
=
data
.
height
;
},
function
(
xmlHttpRequest
,
txtStatus
,
errorThrown
)
{
});
null
);
}
...
...
@@ -183,8 +182,7 @@
function
(
data
)
{
totalPage
=
data
.
contentData
.
allPageNum
;
},
function
(
xmlHttpRequest
,
txtStatus
,
errorThrown
)
{
});
null
);
}
/* get Json stored page title */
...
...
@@ -217,8 +215,7 @@
function
(
data
){
dataJsonType4
=
data
.
contentData
.
linkData
;
},
function
(
xmlHttpRequest
,
txtStatus
,
errorThrown
)
{
});
null
);
}
/* get Json webGetContent5 */
...
...
@@ -230,8 +227,7 @@
function
(
data
){
dataJsonType5
=
data
.
contentData
.
outlineData
;
},
function
(
xmlHttpRequest
,
txtStatus
,
errorThrown
)
{
});
null
);
}
/* get url */
...
...
@@ -1570,145 +1566,196 @@
}
/*get API WebContentPage */
function
handleAPIWebContentPage
(
dataJson
){
function
handleAPIWebContentPage
(
dataJson
,
pos
){
var
bmList
=
[];
bmList
=
ClientData
.
BookMarkData
();
$
(
'#divListBookmark'
).
children
().
remove
();
/* create data on dialog */
//$('#divListBookmark').append('
<
table
id
=
"tblBookmarkList"
class
=
"tblbookmarklist"
>
');
for(var nIndex = 0; nIndex < bmList.length; nIndex ++){
if(bmList[nIndex].contentid == contentID){
//get image and title from json
var sImage = '';
var sTitle = '';
var isExistPage = false;
if(dataJson.pages.length > 0){
var contentPage = dataJson.pages;
for(var nIndexJson = 0; nIndexJson < contentPage.length; nIndexJson++){
if(contentPage[nIndexJson].pageNo == bmList[nIndex].pageNo){
sImage = formatStringBase64(contentPage[nIndexJson].pageThumbnail);
sTitle = htmlEncode(contentPage[nIndexJson].pageText);
isExistPage = true;
break;
}
var sPageNo = '';
for(var nIndex = 0; nIndex < bmList.length; nIndex ++){
if(bmList[nIndex].contentid == contentID){
if (checkDataLoaded(bmList[nIndex].pageNo) == false){ /* check if data not loaded */
if(dataJson.pages.length > 0){
var contentPage = dataJson.pages;
for(var nIndexJson = 0; nIndexJson < contentPage.length; nIndexJson++){
if(contentPage[nIndexJson].pageNo == bmList[nIndex].pageNo){
sPageNo += contentPage[nIndexJson].pageNo + '
,
';
break;
}
}
}
}
if(isExistPage == true){ /* exist page */
$('
#
divListBookmark
').append(
'
<
li
id
=
"'+changePageNo(bmList[nIndex].pageNo)+'"
>
' +
'
<
img
class
=
"imgbox"
src
=
"' +sImage+ '"
/>
' +
'
<
span
class
=
"mdltext"
>
' +
i18nText('
txtPage
') + (changePageNo(bmList[nIndex].pageNo) + 1) + '
<
br
/>
' +
truncate(sTitle,20) +
'
<
/span>'
+
' </li>'
);
//Resize Image
var
imgTemp
=
new
Image
();
imgTemp
.
onload
=
function
(){
if
(
imgTemp
.
width
>
imgTemp
.
height
)
{
$
(
"img.imgbox"
).
attr
(
'height'
,
''
);
$
(
"img.imgbox"
).
removeAttr
(
'height'
);
$
(
"img.imgbox"
).
attr
(
'width'
,
'43'
);
}
else
{
$
(
"img.imgbox"
).
attr
(
'width'
,
''
);
$
(
"img.imgbox"
).
removeAttr
(
'width'
);
$
(
"img.imgbox"
).
attr
(
'height'
,
'43'
);
}
};
imgTemp
.
src
=
sImage
;
/*if(nIndex ==0){
$('#tblBookmarkList').append(
' <tr id="'+changePageNo(bmList[nIndex].pageNo)+'">' +
' <td>' +
' <img src="' +sImage+ '" width="75px" height="50px" />' +
' </td>' +
' <td>' +
' <span>' + i18nText('txtPage') + (changePageNo(bmList[nIndex].pageNo) + 1) + '</span> <br /> ' +
' <span>' +sTitle+ '</span>' +
' </td>' +
' </tr>'
);
}
else{
$('#tblBookmarkList').append(
' <tr>' +
' <td colspan="2"> <hr /> </td>' +
' </tr>' +
' <tr id="'+changePageNo(bmList[nIndex].pageNo)+'">' +
' <td>' +
' <img src="' +sImage+ '" width="75px" height="50px" />' +
' </td>' +
' <td>' +
' <span>' + i18nText('txtPage') + (changePageNo(bmList[nIndex].pageNo) + 1) + '</span> <br /> ' +
' <span>' +sTitle+ '</span>' +
' </td>' +
' </tr>'
);
}*/
}
else
{
/* not exist page */
$
(
'#divListBookmark'
).
append
(
' <li id="'
+
changePageNo
(
bmList
[
nIndex
].
pageNo
)
+
'">'
+
' <span class="mdltext">'
+
' <span>'
+
i18nText
(
'txtPage'
)
+
bmList
[
nIndex
].
pageNo
+
'</span> <br /> '
+
' </span>'
+
' </li>'
+
' <li>'
+
' <span class="mdltext">'
+
' <span style="color:red">'
+
i18nText
(
'msgShioriDeleted'
)
+
'</span>'
+
' </span>'
+
' </li>'
);
/*if(nIndex ==0){
$('#tblBookmarkList').append(
' <tr id="'+changePageNo(bmList[nIndex].pageNo)+'">' +
' <td colspan="2">' +
' <span>' + i18nText('txtPage') + bmList[nIndex].pageNo + '</span> <br /> ' +
' </td>' +
' </tr>' +
' <tr>' +
' <td colspan="2">' +
' <span style="color:red">' +i18nText('msgShioriDeleted')+ '</span>' +
' </td>' +
' </tr>'
);
}
else{
$('#tblBookmarkList').append(
' <tr>' +
' <td colspan="2"> <hr /> </td>' +
' </tr>' +
' <tr id="'+changePageNo(bmList[nIndex].pageNo)+'">' +
' <td colspan="2">' +
' <span>' + i18nText('txtPage') + bmList[nIndex].pageNo + '</span> <br /> ' +
' </td>' +
' </tr>' +
' <tr>' +
' <td colspan="2">' +
' <span style="color:red">' +i18nText('msgShioriDeleted')+ '</span>' +
' </td>' +
' </tr>'
);
}*/
}
}
}
if(sPageNo != ''){
sPageNo = sPageNo.substring(0,sPageNo.length - 1);
$('
#
bookmarkBoxHdBM
').children().remove();
$('
#
bookmarkBoxHdBM
').html('
<
a
id
=
"bookmarkClosing"
class
=
"delete"
>
<
/a>'
)
;
$
(
"#bookmarkClosing"
).
click
(
closeBookmarkBox
);
$
(
'#bookmarkBoxHdBM'
).
append
(
i18nText
(
'txtShioriCtnLs'
));
$
(
'#boxBookMark'
).
css
(
'z-index'
,
'101'
);
$
(
'#boxBookMark'
).
css
(
'display'
,
'block'
);
$
(
'#boxBookMark'
).
draggable
({
handle
:
"h1"
});
$
(
"#boxBookMark"
).
offset
({
left
:
pos
[
0
],
top
:
pos
[
1
]});
$
(
"#divListBookmark"
).
show
();
$
(
"#divListBookmark"
).
offset
({
left
:
pos
[
0
],
top
:(
pos
[
1
]
+
$
(
'#bookmarkBoxHdBM'
).
height
())});
$
(
'#divListBookmark'
).
children
().
remove
();
/* create loading on dialog */
$
(
'#divListBookmark'
).
children
().
remove
();
$
(
'#divListBookmark'
).
append
(
'<img src="img/view_loading.gif" style="padding-left: 65px; padding-top: 45px" width="64px" height="64px">'
);
avwCmsApi
(
ClientData
.
userInfo_accountPath
(),
"webContentPage"
,
"GET"
,
{
sid
:
ClientData
.
userInfo_sid
(),
contentId
:
contentID
,
pageNos
:
sPageNo
,
thumbnailFlg
:
1
},
function
(
data
){
$
(
'#divListBookmark'
).
children
().
remove
();
getDataLoaded
(
data
.
pages
);
loadDataToDialogBookmark
(
bmList
,
dataJson
);
},
null
);
}
else
{
$
(
'#bookmarkBoxHdBM'
).
children
().
remove
();
$
(
'#bookmarkBoxHdBM'
).
html
(
'<a id="bookmarkClosing" class="delete" > </a>'
);
$
(
"#bookmarkClosing"
).
click
(
closeBookmarkBox
);
$
(
'#bookmarkBoxHdBM'
).
append
(
i18nText
(
'txtShioriCtnLs'
));
$
(
'#boxBookMark'
).
css
(
'z-index'
,
'101'
);
$
(
'#boxBookMark'
).
css
(
'display'
,
'block'
);
$
(
'#boxBookMark'
).
draggable
({
handle
:
"h1"
});
$
(
"#boxBookMark"
).
offset
({
left
:
pos
[
0
],
top
:
pos
[
1
]});
$
(
"#divListBookmark"
).
show
();
$
(
"#divListBookmark"
).
offset
({
left
:
pos
[
0
],
top
:(
pos
[
1
]
+
$
(
'#bookmarkBoxHdBM'
).
height
())});
$
(
'#divListBookmark'
).
children
().
remove
();
loadDataToDialogBookmark
(
bmList
,
dataJson
);
}
// $('#divListBookmark').append('
<
/table>'
)
;
}
function
loadDataToDialogBookmark
(
bmList
,
dataJson
){
for
(
var
nIndex
=
0
;
nIndex
<
bmList
.
length
;
nIndex
++
){
if
(
bmList
[
nIndex
].
contentid
==
contentID
){
//get image and title from json
var
sImage
=
''
;
var
sTitle
=
''
;
var
isExistPage
=
false
;
if
(
dataJson
.
pages
.
length
>
0
){
var
contentPage
=
arrThumbnailsLoaded
;
for
(
var
nIndexJson
=
0
;
nIndexJson
<
contentPage
.
length
;
nIndexJson
++
){
if
(
contentPage
[
nIndexJson
].
pageNo
==
bmList
[
nIndex
].
pageNo
){
sImage
=
formatStringBase64
(
contentPage
[
nIndexJson
].
pageThumbnail
);
sTitle
=
htmlEncode
(
contentPage
[
nIndexJson
].
pageText
);
isExistPage
=
true
;
break
;
}
}
}
if
(
isExistPage
==
true
){
/* exist page */
$
(
'#divListBookmark'
).
append
(
' <li id="'
+
changePageNo
(
bmList
[
nIndex
].
pageNo
)
+
'">'
+
' <img class="imgbox" src="'
+
sImage
+
'"/>'
+
' <span class="mdltext">'
+
i18nText
(
'txtPage'
)
+
(
changePageNo
(
bmList
[
nIndex
].
pageNo
)
+
1
)
+
'<br /> '
+
truncate
(
sTitle
,
20
)
+
' </span>'
+
' </li>'
);
//Resize Image
var
imgTemp
=
new
Image
();
imgTemp
.
onload
=
function
(){
if
(
imgTemp
.
width
>
imgTemp
.
height
)
{
$
(
"img.imgbox"
).
attr
(
'height'
,
''
);
$
(
"img.imgbox"
).
removeAttr
(
'height'
);
$
(
"img.imgbox"
).
attr
(
'width'
,
'43'
);
}
else
{
$
(
"img.imgbox"
).
attr
(
'width'
,
''
);
$
(
"img.imgbox"
).
removeAttr
(
'width'
);
$
(
"img.imgbox"
).
attr
(
'height'
,
'43'
);
}
};
imgTemp
.
src
=
sImage
;
}
else
{
/* not exist page */
$
(
'#divListBookmark'
).
append
(
' <li id="'
+
changePageNo
(
bmList
[
nIndex
].
pageNo
)
+
'">'
+
' <span class="mdltext">'
+
' <span>'
+
i18nText
(
'txtPage'
)
+
bmList
[
nIndex
].
pageNo
+
'</span> <br /> '
+
' </span>'
+
' </li>'
+
' <li>'
+
' <span class="mdltext">'
+
' <span style="color:red">'
+
i18nText
(
'msgShioriDeleted'
)
+
'</span>'
+
' </span>'
+
' </li>'
);
}
}
}
}
/* check data has load */
function
checkDataLoaded
(
nPageNo
){
var
isExist
=
false
;
for
(
var
n
=
0
;
n
<
arrThumbnailsLoaded
.
length
;
n
++
){
if
(
arrThumbnailsLoaded
[
n
].
pageNo
==
nPageNo
){
isExist
=
true
;
break
;
}
}
return
isExist
;
}
/* get data load*/
function
getDataLoaded
(
data
){
var
isExist
=
false
;
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
){
isExist
=
false
;
for
(
var
n
=
0
;
n
<
arrThumbnailsLoaded
.
length
;
n
++
){
if
(
data
[
i
].
pageNo
==
arrThumbnailsLoaded
[
n
].
pageNo
){
isExist
=
true
;
break
;
}
}
/* insert if not exist */
if
(
isExist
==
false
){
arrThumbnailsLoaded
.
push
(
data
[
i
]);
}
}
/* sort data */
arrThumbnailsLoaded
.
sort
(
function
(
a
,
b
){
var
a1
=
a
.
pageNo
,
b1
=
b
.
pageNo
;
if
(
a1
==
b1
)
return
0
;
return
a1
>
b1
?
1
:
-
1
;
});
}
/* event for list bookmark: changePageNo */
function
clickBookmark
()
{
changePage
(
$
(
this
).
attr
(
'id'
));
...
...
@@ -1806,23 +1853,8 @@
// resizable:false,
// title: i18nText('txtShioriCtnLs'),
// position: pos});
//title start
$
(
'#bookmarkBoxHdBM'
).
children
().
remove
();
$
(
'#bookmarkBoxHdBM'
).
html
(
'<a id="bookmarkClosing" class="delete" > </a>'
);
$
(
"#bookmarkClosing"
).
click
(
closeBookmarkBox
);
$
(
'#bookmarkBoxHdBM'
).
append
(
i18nText
(
'txtShioriCtnLs'
));
//title end
// lockLayout();
$
(
'#boxBookMark'
).
css
(
'z-index'
,
'101'
);
$
(
'#boxBookMark'
).
css
(
'display'
,
'block'
);
$
(
'#boxBookMark'
).
draggable
({
handle
:
"h1"
});
$
(
"#boxBookMark"
).
offset
({
left
:
pos
[
0
],
top
:
pos
[
1
]});
$
(
"#divListBookmark"
).
show
();
$
(
"#divListBookmark"
).
offset
({
left
:
pos
[
0
],
top
:(
pos
[
1
]
+
$
(
'#bookmarkBoxHdBM'
).
height
())});
handleAPIWebContentPage
(
dataWebContentPage
)
handleAPIWebContentPage
(
dataWebContentPage
,
pos
)
}
}
...
...
@@ -2195,15 +2227,13 @@
avwCmsApi
(
ClientData
.
userInfo_accountPath
(),
"webContentPage"
,
"GET"
,
{
sid
:
ClientData
.
userInfo_sid
(),
contentId
:
contentID
,
thumbnailFlg
:
1
},
{
sid
:
ClientData
.
userInfo_sid
(),
contentId
:
contentID
,
thumbnailFlg
:
0
},
function
(
data
){
contentName
=
data
.
contentTitle
;
dataWebContentPage
=
data
;
},
function
(
xmlHttpRequest
,
txtStatus
,
errorThrown
)
{
});
null
);
}
...
...
@@ -2215,6 +2245,7 @@
/* display dialog overlay */
//$("#overlay").show();
return
false
;
}
});
}
...
...
@@ -2257,27 +2288,57 @@
{
var
contentPage
=
dataWebContentPage
.
pages
;
var
myRegExp
=
new
RegExp
(
$
(
'#txtSearch'
).
val
());
var
searchResult
=
[];
var
sPageNo
=
''
;
var
isExistData
=
false
;
//search content
for
(
var
nIndex
=
0
;
nIndex
<
contentPage
.
length
;
nIndex
++
){
if
(
myRegExp
.
test
(
contentPage
[
nIndex
].
pageText
)){
searchResult
.
push
(
contentPage
[
nIndex
]);
if
(
checkDataLoaded
(
contentPage
[
nIndex
].
pageNo
)
==
false
){
/* check if data not loaded */
//searchResult.push(contentPage[nIndex]);
sPageNo
+=
contentPage
[
nIndex
].
pageNo
+
','
;
}
else
{
isExistData
=
true
;
}
}
}
if
(
searchResult
.
length
>
0
){
//display dialog
// $("#divSearchResult").dialog({
// show: "blind",
// modal: true,
// width: WIDTH_DIALOG_BOOKMARK,
// height:HEIGHT_DIALOG_BOOKMARK,
// resizable:false,
// title: i18nText('txtSearchResult'),
// position: pos});
if
(
sPageNo
!=
''
){
sPageNo
=
sPageNo
.
substring
(
0
,
sPageNo
.
length
-
1
);
//title start
$
(
'#bookmarkBoxHdSearching'
).
children
().
remove
();
$
(
'#bookmarkBoxHdSearching'
).
html
(
'<a id="searchingResultClosing" class="delete" > </a>'
);
$
(
"#searchingResultClosing"
).
click
(
closeSearchingBox
);
$
(
'#bookmarkBoxHdSearching'
).
append
(
i18nText
(
'txtSearchResult'
));
//title end
//title start
//lockLayout();
$
(
'#boxSearching'
).
css
(
'z-index'
,
'101'
);
$
(
'#boxSearching'
).
css
(
'display'
,
'block'
);
$
(
'#boxSearching'
).
draggable
({
handle
:
"h1"
});
$
(
"#boxSearching"
).
offset
({
left
:
pos
[
0
],
top
:
pos
[
1
]});
$
(
"#divSearchResult"
).
show
();
$
(
"#divSearchResult"
).
offset
({
left
:
pos
[
0
],
top
:(
pos
[
1
]
+
$
(
'#bookmarkBoxHdSearching'
).
height
()
-
2
)});
/* create loading on dialog */
$
(
'#divSearchResult'
).
children
().
remove
();
$
(
'#divSearchResult'
).
append
(
'<img src="img/view_loading.gif" style="padding-left: 65px; padding-top: 45px" width="64px" height="64px">'
);
avwCmsApi
(
ClientData
.
userInfo_accountPath
(),
"webContentPage"
,
"GET"
,
{
sid
:
ClientData
.
userInfo_sid
(),
contentId
:
contentID
,
pageNos
:
sPageNo
,
thumbnailFlg
:
1
},
function
(
data
){
getDataLoaded
(
data
.
pages
);
loadDataToDialogSearch
(
arrThumbnailsLoaded
);
},
null
);
}
else
if
(
isExistData
==
true
){
//title start
$
(
'#bookmarkBoxHdSearching'
).
children
().
remove
();
$
(
'#bookmarkBoxHdSearching'
).
html
(
'<a id="searchingResultClosing" class="delete" > </a>'
);
$
(
"#searchingResultClosing"
).
click
(
closeSearchingBox
);
...
...
@@ -2291,78 +2352,8 @@
$
(
"#boxSearching"
).
offset
({
left
:
pos
[
0
],
top
:
pos
[
1
]});
$
(
"#divSearchResult"
).
show
();
$
(
"#divSearchResult"
).
offset
({
left
:
pos
[
0
],
top
:(
pos
[
1
]
+
$
(
'#bookmarkBoxHdSearching'
).
height
()
-
2
)});
/* create data on dialog */
$
(
'#divSearchResult'
).
children
().
remove
();
// $('#divSearchResult').append('
<
table
id
=
"tblSearchResult"
>
');
for(var nIndex = 0; nIndex < searchResult.length; nIndex ++){
$('
#
divSearchResult
').append(
'
<
li
id
=
"'+changePageNo(searchResult[nIndex].pageNo)+'"
>
' +
'
<
img
class
=
"imgbox"
src
=
"' +formatStringBase64(searchResult[nIndex].pageThumbnail)+ '"
/>
' +
'
<
span
class
=
"mdltext"
>
' +
i18nText('
txtPage
') + (changePageNo(searchResult[nIndex].pageNo) + 1) + '
<
br
/>
' +
htmlEncode(truncate(searchResult[nIndex].pageText,20)) +
'
<
/span>'
+
' </li>'
);
//Resize Image
var
imgTemp
=
new
Image
();
imgTemp
.
onload
=
function
(){
if
(
imgTemp
.
width
>
imgTemp
.
height
)
{
$
(
"img.imgbox"
).
attr
(
'height'
,
''
);
$
(
"img.imgbox"
).
removeAttr
(
'height'
);
$
(
"img.imgbox"
).
attr
(
'width'
,
'43'
);
}
else
{
$
(
"img.imgbox"
).
attr
(
'width'
,
''
);
$
(
"img.imgbox"
).
removeAttr
(
'width'
);
$
(
"img.imgbox"
).
attr
(
'height'
,
'43'
);
}
};
imgTemp
.
src
=
formatStringBase64
(
searchResult
[
nIndex
].
pageThumbnail
);
// if(nIndex ==0){
// $('#divSearchResult').append(
// '
<
tr
id
=
"'+changePageNo(searchResult[nIndex].pageNo)+'"
>
' +
// '
<
td
>
' +
// '
<
img
src
=
"' +formatStringBase64(searchResult[nIndex].pageThumbnail)+ '"
width
=
"75px"
height
=
"50px"
/>
' +
// '
<
/td>'
+
// '
<
td
>
' +
// '
<
span
>
' + i18nText('
txtPage
') + (changePageNo(searchResult[nIndex].pageNo) + 1) + '
<
/span> <br /
>
' +
// '
<
span
>
' +searchResult[nIndex].pageText+ '
<
/span>'
+
// '
<
/td>'
+
// '
<
/tr>'
// );
// }
// else{
// $('#divSearchResult').append(
// '
<
tr
>
' +
// '
<
td
colspan
=
"2"
>
<
hr
/>
<
/td>'
+
// '
<
/tr>' +
// '
<
tr
id
=
"'+changePageNo(searchResult[nIndex].pageNo)+'"
>
' +
// '
<
td
>
' +
// '
<
img
src
=
"' +formatStringBase64(searchResult[nIndex].pageThumbnail)+ '"
width
=
"75px"
height
=
"50px"
/>
' +
// '
<
/td>'
+
// '
<
td
>
' +
// '
<
span
>
' + i18nText('
txtPage
') + (changePageNo(searchResult[nIndex].pageNo) + 1) + '
<
/span> <br /
>
' +
// '
<
span
>
' +searchResult[nIndex].pageText+ '
<
/span>'
+
// '
<
/td>'
+
// '
<
/tr>'
// );
// }
}
// $('#divSearchResult').append('
<
/table>'
)
;
loadDataToDialogSearch
(
arrThumbnailsLoaded
)
}
else
{
$
(
'#divSearchResult'
).
children
().
remove
();
$
(
'#divSearchResult'
).
append
(
'<span class="last">'
+
i18nText
(
'txtNoSearchResult'
)
+
'</span>'
);
...
...
@@ -2390,12 +2381,67 @@
$
(
'#boxSearching'
).
draggable
({
handle
:
"h1"
});
$
(
"#boxSearching"
).
offset
({
left
:
pos
[
0
],
top
:
pos
[
1
]});
$
(
"#divSearchResult"
).
show
();
$
(
"#divSearchResult"
).
offset
({
left
:
pos
[
0
],
top
:(
pos
[
1
]
+
$
(
'#bookmarkBoxHdSearching'
).
height
()
-
2
)});
}
$
(
"#divSearchResult"
).
offset
({
left
:
pos
[
0
],
top
:(
pos
[
1
]
+
$
(
'#bookmarkBoxHdSearching'
).
height
()
-
2
)});
}
}
}
/* load data to dialog search */
function
loadDataToDialogSearch
(
searchResultTemp
){
var
contentPage
=
dataWebContentPage
.
pages
;
var
myRegExp
=
new
RegExp
(
$
(
'#txtSearch'
).
val
());
var
searchResult
=
[];
//search content
for
(
var
nIndex
=
0
;
nIndex
<
contentPage
.
length
;
nIndex
++
){
if
(
myRegExp
.
test
(
contentPage
[
nIndex
].
pageText
)){
//var n = jQuery.inArray(contentPage[nIndex].pageNo,searchResultTemp);
for
(
var
n
=
0
;
n
<
searchResultTemp
.
length
;
n
++
){
if
(
searchResultTemp
[
n
].
pageNo
==
contentPage
[
nIndex
].
pageNo
){
searchResult
.
push
(
searchResultTemp
[
n
]);
break
;
}
}
}
}
/* create data on dialog */
$
(
'#divSearchResult'
).
children
().
remove
();
for
(
var
nIndex
=
0
;
nIndex
<
searchResult
.
length
;
nIndex
++
){
$
(
'#divSearchResult'
).
append
(
' <li id="'
+
changePageNo
(
searchResult
[
nIndex
].
pageNo
)
+
'">'
+
' <img class="imgbox" src="'
+
formatStringBase64
(
searchResult
[
nIndex
].
pageThumbnail
)
+
'"/>'
+
' <span class="mdltext">'
+
i18nText
(
'txtPage'
)
+
(
changePageNo
(
searchResult
[
nIndex
].
pageNo
)
+
1
)
+
'<br /> '
+
htmlEncode
(
truncate
(
searchResult
[
nIndex
].
pageText
,
20
))
+
' </span>'
+
' </li>'
);
//Resize Image
var
imgTemp
=
new
Image
();
imgTemp
.
onload
=
function
(){
if
(
imgTemp
.
width
>
imgTemp
.
height
)
{
$
(
"img.imgbox"
).
attr
(
'height'
,
''
);
$
(
"img.imgbox"
).
removeAttr
(
'height'
);
$
(
"img.imgbox"
).
attr
(
'width'
,
'43'
);
}
else
{
$
(
"img.imgbox"
).
attr
(
'width'
,
''
);
$
(
"img.imgbox"
).
removeAttr
(
'width'
);
$
(
"img.imgbox"
).
attr
(
'height'
,
'43'
);
}
};
imgTemp
.
src
=
formatStringBase64
(
searchResult
[
nIndex
].
pageThumbnail
);
}
}
/* event for list search results */
function
clickSearchDetail
()
{
// Hide dialog
...
...
@@ -3117,15 +3163,16 @@
/* tablet [end]*/
}
function
ev_canvas
(
ev
)
{
if
(
ev
.
offsetX
||
ev
.
offsetX
==
0
)
{
// Opera
ev
.
_x
=
ev
.
offsetX
;
ev
.
_y
=
ev
.
offsetY
;
}
else
if
(
ev
.
layerX
||
ev
.
layerX
==
0
)
{
// Firefox
ev
.
_x
=
ev
.
layerX
;
ev
.
_y
=
ev
.
layerY
;
}
function
ev_canvas
(
ev
)
{
if
(
ev
.
offsetX
||
ev
.
offsetX
==
0
)
{
// Opera
ev
.
_x
=
ev
.
offsetX
;
ev
.
_y
=
ev
.
offsetY
;
}
else
if
(
ev
.
layerX
||
ev
.
layerX
==
0
)
{
// Firefox
ev
.
_x
=
ev
.
layerX
;
ev
.
_y
=
ev
.
layerY
;
}
// Call the event handler of the tool.
var
func
=
tool
[
ev
.
type
];
...
...
@@ -3151,6 +3198,7 @@
/* handle display page from actiontype=10 mediaType =1 :jump to content */
function
handleFromJumpContent
(){
/* handle play BGM of content jump */
getPageObjectsByPageIndex
(
pageObjectsData
,
0
);
for
(
var
nIndex
=
0
;
nIndex
<
pageObjects
.
length
;
nIndex
++
){
if
(
pageObjects
[
nIndex
].
mediaType
==
'3'
&&
pageObjects
[
nIndex
].
playType
==
'1'
){
createAudio
(
pageObjects
[
nIndex
].
audioFile
,
pageObjects
[
nIndex
].
playType
);
...
...
@@ -3169,6 +3217,7 @@
/* handle button back */
function
oldContent_Back
(){
/* handle play BGM of content jump */
getPageObjectsByPageIndex
(
pageObjectsData
,
0
);
for
(
var
nIndex
=
0
;
nIndex
<
pageObjects
.
length
;
nIndex
++
){
if
(
pageObjects
[
nIndex
].
mediaType
==
'3'
&&
pageObjects
[
nIndex
].
playType
==
'1'
){
createAudio
(
pageObjects
[
nIndex
].
audioFile
,
pageObjects
[
nIndex
].
playType
);
...
...
@@ -3242,7 +3291,9 @@ function oldContent_Back(){
img
.
src
=
imgMarkerTemp
;
}
}
}
closeDialogPopUpText
();
}
/* resizing canvas draw */
...
...
@@ -3423,16 +3474,18 @@ function oldContent_Back(){
function
onUnlock
(){
removeObject
();
getPageObjectsByPageIndex
(
pageObjectsData
,
getPageIndex
());
getContent
().
setPageImages
(
totalPage
,
pageImages
).
setPageObjects
(
pageObjects
).
setUpPage
(
getPageIndex
);
/* handle play BGM of content jump */
getPageObjectsByPageIndex
(
pageObjectsData
,
0
);
/* handle play BGM of content jump */
for
(
var
nIndex
=
0
;
nIndex
<
pageObjects
.
length
;
nIndex
++
){
if
(
pageObjects
[
nIndex
].
mediaType
==
'3'
&&
pageObjects
[
nIndex
].
playType
==
'1'
){
if
(
pageObjects
[
nIndex
].
mediaType
==
'3'
&&
pageObjects
[
nIndex
].
playType
==
'1'
){
createAudio
(
pageObjects
[
nIndex
].
audioFile
,
pageObjects
[
nIndex
].
playType
);
}
}
}
getPageObjectsByPageIndex
(
pageObjectsData
,
getPageIndex
());
getContent
().
setPageImages
(
totalPage
,
pageImages
).
setPageObjects
(
pageObjects
).
setUpPage
(
getPageIndex
);
}
function
StartTimerUpdateLog
()
{
...
...
@@ -3544,6 +3597,12 @@ function oldContent_Back(){
$
(
'#dlgMarking'
).
center
();
}
function
closeDialogResize
(){
closeDialogPopUpText
();
$
(
'#pop_up_memo'
).
hide
();
}
function
initPage
(){
//$('body,html').animate({ scrollTop: 0 }, 350);
...
...
@@ -3637,6 +3696,10 @@ function oldContent_Back(){
sizingScreen
();
/* move image check marking*/
$
(
'#divCheckExistMarking'
).
css
(
'top'
,
'70px'
);
$
(
'#divCheckExistMarking'
).
hide
();
/* disable controls */
isLoadingObject
=
true
;
disableAllControl
();
...
...
@@ -3645,7 +3708,7 @@ function oldContent_Back(){
$
(
window
).
resize
(
function
()
{
sizingScreen
();
/* close dialog popuptext */
closeDialog
PopUpText
();
closeDialog
Resize
();
});
$
(
document
).
ajaxComplete
(
function
(){
...
...
@@ -3698,7 +3761,7 @@ function oldContent_Back(){
changePosDialog
()
/* close dialog popuptext */
closeDialog
PopUpText
();
closeDialog
Resize
();
});
/* check status button */
...
...
@@ -3877,7 +3940,7 @@ function oldContent_Back(){
</div>
<div
id=
"divDialogMemo"
>
</div>
<div
id=
"divDialogMemo"
style=
"width:466px;height:389px;display:none;"
>
</div>
<div
id=
"dialogPopUp"
class=
"popuptext_web_dialog"
>
</div>
<div
id=
"arrow"
class=
"popuptext_arrow"
>
</div>
...
...
abvw/css/contentview.css
View file @
5224d11b
...
...
@@ -418,7 +418,7 @@ div .ui-slider-range, .ui-widget-header, .ui-slider-range-max {
z-index
:
102
;
font-family
:
Verdana
;
font-size
:
10pt
;
border-radius
:
1
5
px
;
border-radius
:
1
0
px
;
}
.popuptext_arrow
{
...
...
@@ -430,7 +430,7 @@ div .ui-slider-range, .ui-widget-header, .ui-slider-range-max {
border-style
:
solid
;
width
:
0
;
height
:
0
;
border-width
:
1
8px
18px
18px
18
px
;
border-width
:
1
2px
12px
12px
12
px
;
}
/* HOVER STYLES */
.pop-up-memo
{
...
...
abvw/css/viewer.css
View file @
5224d11b
...
...
@@ -74,6 +74,8 @@ header{
max-width
:
none
;
min-width
:
1000px
;
height
:
60px
;
position
:
absolute
;
width
:
100%
;
}
/*ヘッダー左カラム*/
...
...
abvw/js/SCRCDL0100.js
View file @
5224d11b
...
...
@@ -74,6 +74,9 @@ function openContentDetail() {
$
(
"#sectionContentDetail"
).
show
();
$
(
"#contentDetail"
).
show
();
$
(
"#contentDetail"
).
center
();
if
(
$
(
"#contentDetail"
).
height
()
>
$
(
window
).
height
()){
$
(
"#contentDetail"
).
css
(
'top'
,
'0'
);
}
// Get contentid, thumbnail from list screen
displayData
.
contentID
=
ClientData
.
contentInfo_contentId
();
...
...
abvw/js/bookmark.js
View file @
5224d11b
...
...
@@ -156,7 +156,6 @@ function dspRead_Click() {
var
jsondata
=
$
(
this
).
attr
(
"value"
);
var
data
=
JSON
.
parse
(
jsondata
);
ClientData
.
contentInfo_contentId
(
data
.
contentid
);
ClientData
.
bookmark_contentNo
(
data
.
contentid
);
ClientData
.
bookmark_pageNo
(
data
.
pageNo
);
ClientData
.
IsRefresh
(
false
);
...
...
abvw/js/contentsearch.js
View file @
5224d11b
...
...
@@ -105,6 +105,9 @@ $(document).ready(function(){
if
(
$
(
"#contentDetail"
).
css
(
"display"
)
!=
"none"
)
{
// Refresh panel of detail to center.
$
(
"#contentDetail"
).
center
();
if
(
$
(
"#contentDetail"
).
height
()
>
$
(
window
).
height
()){
$
(
"#contentDetail"
).
css
(
'top'
,
'0'
);
}
}
});
});
...
...
abvw/js/contentview.js
View file @
5224d11b
...
...
@@ -1220,7 +1220,7 @@ function onClick_CanvasMain(event){
}
/* click memo edit */
if
(
ClientData
.
IsDisplayMemo
()
==
true
){
if
(
ClientData
.
IsDisplayMemo
()
==
true
){
getAllMemoOfPage
();
/* check exist object memo in mouse position */
for
(
var
nIndex
=
0
;
nIndex
<
memoObjects
.
length
;
nIndex
++
){
...
...
@@ -1257,7 +1257,7 @@ function onClick_CanvasMain(event){
/* click pageObject */
if
(
isClickMemo
==
false
){
isClickLinkList
=
false
;
var
isClickLinkList
=
false
;
/* check exist object in mouse position */
var
hitPageObj
=
getContent
().
currentPage
.
hitTest
(
imagePt
.
x
,
imagePt
.
y
);
...
...
@@ -2039,7 +2039,7 @@ function initImageCheckMarking(){
/* init image display or not */
if
(
ClientData
.
IsAddingMarking
()
==
true
){
$
(
'#divCheckExistMarking'
).
hide
();
}
else
{
}
else
{
if
(
isExistMarking
==
true
){
$
(
'#divCheckExistMarking'
).
show
();
}
else
{
...
...
@@ -2326,6 +2326,8 @@ var openPopUp = function(mediaType, actionType, id, imageUrl, x, y, w, h, visibl
if
(
userScale
>
1
){
OpenPopupText
(
posXPopupMemo
,
posYPopupMemo
,
content
,
$
(
'#dialogPopUp'
),
$
(
'#arrow'
));
}
else
if
(
$
(
"#header_toolbar"
).
is
(
":hidden"
)){
OpenPopupText
(
pt1
.
x
,
pt1
.
y
-
65
,
content
,
$
(
'#dialogPopUp'
),
$
(
'#arrow'
));
}
else
{
OpenPopupText
(
pt1
.
x
,
pt1
.
y
,
content
,
$
(
'#dialogPopUp'
),
$
(
'#arrow'
));
}
...
...
@@ -3070,7 +3072,7 @@ function zoomOut() {
checkDisableButtonZoom
();
/* close dialog popuptext */
closeDialog
PopUpText
();
closeDialog
Resize
();
};
/* restore screen size */
...
...
@@ -3092,7 +3094,7 @@ function screenFit() {
checkDisableButtonZoom
();
/* close dialog popuptext */
closeDialog
PopUpText
();
closeDialog
Resize
();
};
...
...
abvw/js/contentview_Memo.js
View file @
5224d11b
...
...
@@ -9,7 +9,7 @@ var conid;
var
pageid
;
function
createMemoDialog
(){
targetDiv
.
show
();
targetDiv
.
html
(
''
);
targetDiv
.
append
(
'<aside id="memoWrapper" class="MemoIndexBox">'
...
...
@@ -80,6 +80,7 @@ function MemoDelFunction(){
}
$
(
"#overlay"
).
hide
();
targetDiv
.
children
().
remove
();
targetDiv
.
hide
();
$
(
"#pop_up_memo"
).
hide
();
...
...
@@ -92,8 +93,9 @@ function MemoDelFunction(){
function
MemoCancelFunction
(){
//targetDiv.dialog('close');
$
(
"#overlay"
).
hide
();
$
(
"#overlay"
).
hide
();
targetDiv
.
children
().
remove
();
targetDiv
.
hide
();
isCopyMemo
=
false
;
$
(
"#pop_up_memo"
).
hide
();
...
...
@@ -225,6 +227,7 @@ function buttonSaveFunction(){
//targetDiv.dialog('close');
$
(
"#overlay"
).
hide
();
targetDiv
.
children
().
remove
();
targetDiv
.
hide
();
isCopyMemo
=
false
;
$
(
"#pop_up_memo"
).
hide
();
...
...
abvw/js/contentview_PopupText.js
View file @
5224d11b
...
...
@@ -20,8 +20,8 @@ function OpenPopupText(posX, posY, content, dialogDiv, arrowDiv) {
dialogDiv
.
fadeIn
(
300
);
arrowDiv
.
fadeIn
(
300
);
arrowDiv
.
css
(
"left"
,
(
posX
-
20
)
+
"px"
);
arrowDiv
.
css
(
"top"
,
(
posY
-
20
)
+
"px"
);
arrowDiv
.
css
(
"left"
,
(
posX
-
14
)
+
"px"
);
arrowDiv
.
css
(
"top"
,
(
posY
-
14
)
+
"px"
);
dialogDiv
.
html
(
content
)
...
...
abvw/js/history.js
View file @
5224d11b
...
...
@@ -94,6 +94,9 @@ $(document).ready(function(){
if
(
$
(
"#contentDetail"
).
css
(
"display"
)
!=
"none"
)
{
// Refresh panel of detail to center.
$
(
"#contentDetail"
).
center
();
if
(
$
(
"#contentDetail"
).
height
()
>
$
(
window
).
height
()){
$
(
"#contentDetail"
).
css
(
'top'
,
'0'
);
}
}
});
});
...
...
@@ -1113,15 +1116,19 @@ function syncReadingContent(){
var
readArr
=
ClientData
.
ReadingContentIds
();
var
metaArr
=
ClientData
.
MetaVersion
();
var
resourceArr
=
ClientData
.
ResourceVersion
();
for
(
var
i
=
readArr
.
length
-
1
;
i
>=
0
;
i
--
){
var
readContent
=
readArr
[
i
];
if
(
!
IsExistContent
(
readContent
.
contentid
)){
readArr
.
splice
(
i
,
1
);
metaArr
.
splice
(
i
,
1
);
resourceArr
.
splice
(
i
,
1
);
}
for
(
var
i
=
readArr
.
length
-
1
;
i
>=
0
;
i
--
)
{
var
readContent
=
readArr
[
i
];
if
(
!
IsExistContent
(
readContent
.
contentid
))
{
readArr
.
splice
(
i
,
1
);
metaArr
.
splice
(
i
,
1
);
resourceArr
.
splice
(
i
,
1
);
}
// Do not process next
if
(
avwHasError
())
{
return
;
}
}
ClientData
.
ReadingContentIds
(
readArr
);
...
...
@@ -1162,6 +1169,11 @@ function IsExistContent(strContentId) {
if
(
xmlHttpRequest
.
status
==
404
)
{
isExisted
=
false
;
}
else
{
// Show system error
isExisted
=
true
;
// Mark this flag to prevent bookmarks from deleting
showSystemError
();
}
});
return
isExisted
;
}
...
...
abvw/js/home.js
View file @
5224d11b
...
...
@@ -28,7 +28,7 @@ var DEFAULT_IMG_OPTION_MEMO = 'img/list/pic_1.png';
var
DEFAULT_IMG_OPTION_MARKING
=
'img/list/pic_2.png'
;
var
DEFAULT_IMG_CONTENT_EDIT
=
'img/list/updatebook.png'
;
var
DEFAULT_IMG_CONTENT_NEW
=
'img/list/newbook.png'
;
var
home_realTotalRecord
=
0
;
var
iNumberOfNextRecord
=
15
;
var
arrayTemp
=
[];
...
...
@@ -44,6 +44,7 @@ var existContent = [];
var
isSubMenuHoverOn
=
false
;
var
home_isMove
=
false
;
var
isShowBookShelf
=
null
;
var
showNextRecordClickNumber
=
1
;
//==========================================================
$
(
document
).
ready
(
function
()
{
...
...
@@ -53,6 +54,7 @@ $(document).ready(function () {
document
.
title
=
i18nText
(
'dspHome'
)
+
' | '
+
i18nText
(
'sysAppTitle'
);
// Set bookmark screen
ClientData
.
BookmarkScreen
(
ScreenIds
.
Home
);
...
...
@@ -65,16 +67,19 @@ $(document).ready(function () {
}
else
{
syncContentData
();
}
//Get default view mode for rendergrid view
setDefaultViewMode
();
//Toggle TreeView Disp
handleTreeViewDisp
();
//Format text display more record
formatDisplayMoreRecord
();
//Render Grid
renderGridView
();
//Render Genre
getDataJsonFileGenre
();
getDataJsonFileGroup
();
...
...
@@ -139,6 +144,9 @@ $(document).ready(function () {
if
(
$
(
"#contentDetail"
).
css
(
"display"
)
!=
"none"
)
{
// Refresh panel of detail to center.
$
(
"#contentDetail"
).
center
();
if
(
$
(
"#contentDetail"
).
height
()
>
$
(
window
).
height
()){
$
(
"#contentDetail"
).
css
(
'top'
,
'0'
);
}
}
});
});
...
...
@@ -166,16 +174,17 @@ function handleTreeViewDisp(){
//Change Display BookShelf Function
function
changeDispBookShelfFunction
(){
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_List
||
isShowBookShelf
==
false
){
if
(
isShowBookShelf
==
false
){
//ClientData.sortOpt_viewMode(Consts.ConstDisplayMode_BookShelf);
isShowBookShelf
=
true
;
var
recordFrom
=
0
;
var
recordTo
=
0
;
// if(ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_BookShelf){ if(isShowBookShelf) {
// if(ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_BookShelf){ if(isShowBookShelf) {
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
recordTo
=
ClientData
.
searchCond_recordTo
()
;
recordTo
=
returnNumberDispRecordForBookShelf
()
*
showNextRecordClickNumber
;
}
//refresh sort order
refreshSortTypeOrder
();
...
...
@@ -207,8 +216,9 @@ function changeDispBookShelfFunction(){
//Change Display List Function
function
changeDispListFunction
(){
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_BookShelf
||
ClientData
.
sortOpt_viewMode
()
==
null
||
ClientData
.
sortOpt_viewMode
()
==
'undefined'
||
isShowBookShelf
==
true
){
if
(
isShowBookShelf
==
true
){
//ClientData.sortOpt_viewMode(Consts.ConstDisplayMode_List);
isShowBookShelf
=
false
;
var
recordFrom
=
0
;
var
recordTo
=
0
;
...
...
@@ -217,7 +227,7 @@ function changeDispListFunction(){
//Check VIewmode
// if(ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_List){ if (!isShowBookShelf) {
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
recordTo
=
ClientData
.
searchCond_recordTo
()
;
recordTo
=
returnNumberDispRecordForList
()
*
showNextRecordClickNumber
;
}
//refresh sort order
...
...
@@ -369,7 +379,7 @@ function canvasClickFunction(e) {
avwScreenMove
(
ScreenIds
.
ContentView
);
}
}
else
{
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_List
){
if
(
!
isShowBookShelf
){
//Store Content id that user has read
if
(
ClientData
.
ReadingContentIds
().
length
>
0
){
...
...
@@ -555,7 +565,7 @@ function openSubMenuDialogFunction(e){
}
}
else
{
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_List
){
if
(
!
isShowBookShelf
){
// Get image of selected image
var
base64String
=
returnThumbnail
(
contentid
);
ClientData
.
contentInfo_contentThumbnail
(
base64String
);
...
...
@@ -605,7 +615,7 @@ function openSubMenuDialogFunction(e){
openContentDetail
();
}
else
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_
BookShelf
){
else
if
(
isShow
BookShelf
){
$
(
'#dialog-read'
).
attr
(
'contentid'
,
contentid
);
$
(
'#dialog-detail'
).
attr
(
'contentid'
,
contentid
);
//$("#dlgSubMenu").dialog({position: array, width: 130, height: 90});
...
...
@@ -643,11 +653,11 @@ function genreSelectFunction() {
var
recordFrom
=
0
;
var
recordTo
=
0
;
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_
BookShelf
){
if
(
isShow
BookShelf
){
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
recordTo
=
returnNumberDispRecordForBookShelf
();
}
else
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_List
){
else
if
(
!
isShowBookShelf
){
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
recordTo
=
returnNumberDispRecordForList
();
}
...
...
@@ -672,6 +682,8 @@ function genreSelectFunction() {
//refresh gridview
refreshGrid
();
resetShowNextRecordCount
();
handleSortDisp
();
renderContent
(
id
,
searchText
,
searchDivision
,
sortType
,
sortOrder
,
recordFrom
,
recordTo
,
genreId
,
groupId
);
...
...
@@ -691,11 +703,11 @@ function groupSelectFunction() {
var
recordFrom
=
0
;
var
recordTo
=
0
;
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_
BookShelf
){
if
(
isShow
BookShelf
){
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
recordTo
=
returnNumberDispRecordForBookShelf
();
}
else
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_List
){
else
if
(
!
isShowBookShelf
){
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
recordTo
=
returnNumberDispRecordForList
();
}
...
...
@@ -720,6 +732,8 @@ function groupSelectFunction() {
//refresh gridview
refreshGrid
();
resetShowNextRecordCount
();
handleSortDisp
();
renderContent
(
id
,
searchText
,
searchDivision
,
sortType
,
sortOrder
,
recordFrom
,
recordTo
,
genreId
,
groupId
);
...
...
@@ -831,11 +845,11 @@ function AddGenre_Callback(selectedNode) {
lCateId
=
node
.
Value
;
$
(
'#content-grid'
).
html
(
''
);
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_
BookShelf
){
if
(
isShow
BookShelf
){
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
recordTo
=
returnNumberDispRecordForBookShelf
();
}
else
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_List
){
else
if
(
!
isShowBookShelf
){
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
recordTo
=
returnNumberDispRecordForList
();
}
...
...
@@ -859,6 +873,8 @@ function AddGenre_Callback(selectedNode) {
//refresh gridview
refreshGrid
();
resetShowNextRecordCount
();
handleSortDisp
();
renderContent
(
id
,
searchText
,
searchDivision
,
sortType
,
sortOrder
,
recordFrom
,
recordTo
,
genreId
,
groupId
);
...
...
@@ -993,11 +1009,11 @@ function AddGroup_Callback(selectedNode) {
lGrpId
=
node
.
Value
;
$
(
'#content-grid'
).
html
(
''
);
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_
BookShelf
){
if
(
isShow
BookShelf
){
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
recordTo
=
returnNumberDispRecordForBookShelf
();
}
else
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_List
){
else
if
(
!
isShowBookShelf
){
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
recordTo
=
returnNumberDispRecordForList
();
}
...
...
@@ -1021,6 +1037,8 @@ function AddGroup_Callback(selectedNode) {
//refreshGrid
refreshGrid
();
resetShowNextRecordCount
();
handleSortDisp
();
renderContent
(
id
,
searchText
,
searchDivision
,
sortType
,
sortOrder
,
recordFrom
,
recordTo
,
genreId
,
groupId
);
...
...
@@ -1197,6 +1215,9 @@ function showNextRecordFunction(){
$
(
'#control-nextrecord'
).
hide
();
//Count number of click
showNextRecordClickNumber
=
showNextRecordClickNumber
+
1
;
var
fromPage
=
ClientData
.
searchCond_recordFrom
();
var
toPage
=
ClientData
.
searchCond_recordTo
();
var
sortType
=
ClientData
.
searchCond_sortType
();
...
...
@@ -1213,10 +1234,10 @@ function showNextRecordFunction(){
}
if
(
toPage
==
null
||
toPage
==
'undefined'
){
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_
BookShelf
){
if
(
isShow
BookShelf
){
toPage
=
returnNumberDispRecordForBookShelf
();
}
else
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_List
){
else
if
(
!
isShowBookShelf
){
toPage
=
returnNumberDispRecordForList
();
}
else
{
...
...
@@ -1300,10 +1321,10 @@ function sortByTitleFunction(){
if
(
recordTo
==
null
||
recordTo
==
'undefined'
){
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_
BookShelf
){
if
(
isShow
BookShelf
){
recordTo
=
returnNumberDispRecordForBookShelf
();
}
else
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_
BookShelf
){
else
if
(
!
isShow
BookShelf
){
recordTo
=
returnNumberDispRecordForList
();
}
else
{
...
...
@@ -1376,10 +1397,10 @@ function sortByTitleKanaFunction(){
if
(
recordTo
==
null
||
recordTo
==
'undefined'
){
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_
BookShelf
){
if
(
isShow
BookShelf
){
recordTo
=
returnNumberDispRecordForBookShelf
();
}
else
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_
BookShelf
){
else
if
(
!
isShow
BookShelf
){
recordTo
=
returnNumberDispRecordForList
();
}
else
{
...
...
@@ -1452,10 +1473,10 @@ function sortByReleaseDateFunction(){
if
(
recordTo
==
null
||
recordTo
==
'undefined'
){
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_
BookShelf
){
if
(
isShow
BookShelf
){
recordTo
=
returnNumberDispRecordForBookShelf
();
}
else
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_
BookShelf
){
else
if
(
!
isShow
BookShelf
){
recordTo
=
returnNumberDispRecordForList
();
}
else
{
...
...
@@ -1525,6 +1546,7 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
abapi
(
'webContentList'
,
params
,
'POST'
,
function
(
data
)
{
var
countCnt
=
0
;
$
.
each
(
data
.
contentList
,
function
(
i
,
post
)
{
var
outputDate
=
formatDeliveryDate
(
post
.
contentDeliveryDate
);
...
...
@@ -1544,12 +1566,10 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+
' <a id="title'
+
post
.
contentId
+
'" class="dialog name lang" lang="lblTitle" contentid="'
+
post
.
contentId
+
'">'
+
truncate
(
htmlEncode
(
post
.
contentTitle
),
20
)
+
'</a>'
+
'</section>'
);
if
(
i
==
(
eval
(
countCnt
)
+
2
))
{
$
(
'#bookshelf'
+
post
.
contentId
).
addClass
(
'no_m_right'
);
countCnt
=
i
+
1
;
}
if
((
home_realTotalRecord
+
i
+
1
)
%
3
==
0
){
$
(
'#bookshelf'
+
post
.
contentId
).
addClass
(
'no_m_right'
);
}
getNextRecordNumForBookShelf
();
}
// else if (ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_List) {
...
...
@@ -1620,11 +1640,10 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+
'</section>'
);
if
(
i
==
(
eval
(
countCnt
)
+
2
))
{
$
(
'#bookshelf'
+
post
.
contentId
).
addClass
(
'no_m_right'
);
countCnt
=
i
+
1
;
}
if
((
home_realTotalRecord
+
i
+
1
)
%
3
==
0
){
$
(
'#bookshelf'
+
post
.
contentId
).
addClass
(
'no_m_right'
);
}
getNextRecordNumForBookShelf
();
}
// else if (ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_List) { else if (!isShowBookShelf) {
...
...
@@ -1657,7 +1676,7 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
getNextRecordNumForList
();
}
else
{
alert
(
'ok'
);
//
alert('ok');
// $('#content-grid').append(
// '<section class="sectionhomebookshelf">'
// + ' <div class="cnt_section_bookshelf">'
...
...
@@ -1700,6 +1719,7 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
}
});
home_realTotalRecord
+=
data
.
contentList
.
length
;
// Save total record for tree:genere/group
if
(
cateid
==
''
&&
grpid
==
''
)
{
...
...
@@ -1749,10 +1769,10 @@ function renderGridView(){
ClientData
.
searchCond_recordFrom
(
fromPage
);
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_
BookShelf
){
if
(
isShow
BookShelf
){
toPage
=
returnNumberDispRecordForBookShelf
();
}
else
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_List
){
else
if
(
!
isShowBookShelf
){
toPage
=
returnNumberDispRecordForList
();
}
else
{
...
...
@@ -1781,6 +1801,8 @@ function renderGridView(){
//Refresh GridView
refreshGrid
();
resetShowNextRecordCount
();
//Render Gridview
renderContent
(
sid
,
searchText
,
searchDivision
,
sortType
,
sortOrder
,
fromPage
,
toPage
,
genreId
,
groupId
);
}
...
...
@@ -1798,7 +1820,7 @@ function returnThumbnail(contentid){
//Check if Content Has marking or memo
function
checkContentMarkingMemoOption
(
contentId
){
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_List
){
if
(
!
isShowBookShelf
){
//Check if contentid has marking
if
(
ClientData
.
MarkingData
().
length
==
0
){
$
(
'#imgBookMark'
+
contentId
).
css
(
'visibility'
,
'hidden'
);
...
...
@@ -2230,15 +2252,15 @@ function formatDisplayMoreRecord(){
//changeLanguage(ClientData.userInfo_language());
i18nReplaceText
();
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_
BookShelf
){
if
(
isShow
BookShelf
){
$
(
'#control-nextrecord'
).
html
(
format
(
i18nText
(
'dspViewMore'
),
returnNumberDispRecordForBookShelf
()).
toString
());
}
else
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_List
){
else
if
(
!
isShowBookShelf
){
$
(
'#control-nextrecord'
).
html
(
format
(
i18nText
(
'dspViewMore'
),
returnNumberDispRecordForList
()));
}
else
{
else
{
$
(
'#control-nextrecord'
).
html
(
format
(
i18nText
(
'dspViewMore'
),
returnNumberDispRecordForBookShelf
()));
}
}
}
/*
...
...
@@ -2259,6 +2281,11 @@ function IsExistContent(strContentId) {
if
(
xmlHttpRequest
.
status
==
404
)
{
isExisted
=
false
;
}
else
{
// Show system error
isExisted
=
true
;
// Mark this flag to prevent bookmarks from deleting
showSystemError
();
}
});
return
isExisted
;
}
...
...
@@ -2267,17 +2294,21 @@ function syncReadingContent(){
var
readArr
=
ClientData
.
ReadingContentIds
();
var
metaArr
=
ClientData
.
MetaVersion
();
var
resourceArr
=
ClientData
.
ResourceVersion
();
for
(
var
i
=
readArr
.
length
-
1
;
i
>=
0
;
i
--
){
var
readContent
=
readArr
[
i
];
if
(
!
IsExistContent
(
readContent
.
contentid
)){
errorContent
.
push
({
contentid
:
readContent
.
contentid
});
readArr
.
splice
(
i
,
1
);
metaArr
.
splice
(
i
,
1
);
resourceArr
.
splice
(
i
,
1
);
}
for
(
var
i
=
readArr
.
length
-
1
;
i
>=
0
;
i
--
)
{
var
readContent
=
readArr
[
i
];
if
(
!
IsExistContent
(
readContent
.
contentid
))
{
errorContent
.
push
({
contentid
:
readContent
.
contentid
});
readArr
.
splice
(
i
,
1
);
metaArr
.
splice
(
i
,
1
);
resourceArr
.
splice
(
i
,
1
);
}
// Do not process next
if
(
avwHasError
())
{
return
;
}
}
ClientData
.
ReadingContentIds
(
readArr
);
...
...
@@ -2561,4 +2592,20 @@ function resizeResourceThumbnail(mg, width, height) {
var
result
=
[
newWidth
,
newHeight
];
return
result
;
}
\ No newline at end of file
}
function
resetShowNextRecordCount
(){
showNextRecordClickNumber
=
1
;
}
function
setDefaultViewMode
(){
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_BookShelf
){
isShowBookShelf
=
true
;
}
else
if
(
ClientData
.
sortOpt_viewMode
()
==
Consts
.
ConstDisplayMode_List
){
isShowBookShelf
=
false
;
}
else
{
isShowBookShelf
=
true
;
}
}
...
...
abvw/js/login.js
View file @
5224d11b
...
...
@@ -329,9 +329,9 @@ function processLogin() {
}
},
function
(
xhr
,
statusText
,
errorThrown
)
{
login_errorMessage
=
JSON
.
parse
(
xhr
.
responseText
).
errorMessage
;
//$('#main-error-message').html(format(i18nText('msgLoginErrWrong'), formatErrorCode(a.status)).toString())
;
if
(
xhr
.
responseText
&&
xhr
.
status
!=
0
)
{
if
(
xhr
.
responseText
&&
xhr
.
status
!=
0
)
{
login_errorMessage
=
JSON
.
parse
(
xhr
.
responseText
).
errorMessage
;
$
(
'#main-error-message'
).
html
(
format
(
i18nText
(
'msgLoginErrWrong'
),
JSON
.
parse
(
xhr
.
responseText
).
errorMessage
).
toString
());
}
else
{
$
(
'#main-error-message'
).
html
(
format
(
i18nText
(
'msgLoginErrWrong'
),
'E001'
));
...
...
@@ -370,10 +370,15 @@ function changePasswordProcess(){
$
(
'#dialog-error-message'
).
show
();
}
},
function
(
a
,
b
,
c
)
{
//$('#dialog-error-message').html(i18nText('msgPwdOldWrong'));
$
(
'#dialog-error-message'
).
html
(
JSON
.
parse
(
a
.
responseText
).
errorMessage
);
$
(
'#dialog-error-message'
).
show
();
function
(
xhr
,
b
,
c
)
{
if
(
xhr
.
responseText
&&
xhr
.
status
!=
0
)
{
$
(
'#dialog-error-message'
).
html
(
JSON
.
parse
(
xhr
.
responseText
).
errorMessage
);
$
(
'#dialog-error-message'
).
show
();
}
else
{
// Show systemerror
showSystemError
();
}
});
}
...
...
abvw/js/settings.js
View file @
5224d11b
...
...
@@ -103,8 +103,13 @@ function IsExistBackupFile() {
isExisted
=
true
;
}
},
function
(
a
,
b
,
c
)
{
isExisted
=
false
;
function
(
xhr
,
b
,
c
)
{
if
(
xhr
.
status
!=
0
)
{
isExisted
=
false
;
}
else
{
showSystemError
();
}
});
return
isExisted
;
}
...
...
@@ -235,12 +240,6 @@ function dspOptBk_OK_Click(e) {
text
:
i18nText
(
'msgBackupFailed'
)
});
});
// avwCmsApi(ClientData.userInfo_accountPath(), "uploadBackupFile", "post",
// { sid: ClientData.userInfo_sid(), "webBackupData.json": JSON.stringify(buildBackupData()), deviceType: "4" },
// avwCmsApi_uploadBackupFile_success,
// null
// );
closeBackup
();
}
...
...
@@ -288,14 +287,19 @@ function dspOptRes_OK_Click(e) {
avwCmsApi
(
ClientData
.
userInfo_accountPath
(),
"getBackupFile"
,
"post"
,
{
sid
:
ClientData
.
userInfo_sid
(),
deviceType
:
'4'
,
filename
:
"webBackupData.json"
},
avwCmsApi_getBackupFile_success
,
function
(
a
,
b
,
c
)
{
// Show error message
$
().
toastmessage
({
position
:
'middle-center'
});
$
().
toastmessage
(
'showToast'
,
{
type
:
'error'
,
sticky
:
true
,
text
:
i18nText
(
'msgRestoreFailed'
)
});
function
(
xhr
,
b
,
c
)
{
if
(
xhr
.
status
!=
0
)
{
// Show error message
$
().
toastmessage
({
position
:
'middle-center'
});
$
().
toastmessage
(
'showToast'
,
{
type
:
'error'
,
sticky
:
true
,
text
:
i18nText
(
'msgRestoreFailed'
)
});
}
else
{
showSystemError
();
}
}
);
...
...
@@ -595,19 +599,18 @@ function avwCmsApi_passwordChange_success(data) {
}
}
}
function
avwCmsApi_passwordChange_fail
(
a
,
b
,
c
)
{
/* show error messages */
var
msgError
=
$
(
'#dialog-error-message'
);
//$().toastmessage({ position: 'middle-center' });
//$().toastmessage('showToast', {
// type: 'error',
// sticky: true,
// text: i18nText('msgPwdChangeNG')
//});
//msgError.html(i18nText('msgPwdChangeNG'));
msgError
.
html
(
JSON
.
parse
(
a
.
responseText
).
errorMessage
);
msgError
.
show
();
function
avwCmsApi_passwordChange_fail
(
xhr
,
b
,
c
)
{
if
(
xhr
.
responseText
&&
xhr
.
status
!=
0
)
{
/* show error messages */
var
msgError
=
$
(
'#dialog-error-message'
);
//msgError.html(i18nText('msgPwdChangeNG'));
msgError
.
html
(
JSON
.
parse
(
xhr
.
responseText
).
errorMessage
);
msgError
.
show
();
}
else
{
showSystemError
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment