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
0f78c21c
Commit
0f78c21c
authored
Mar 13, 2015
by
Masaru Abe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
バックアップ対応
parent
38bf701c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
260 additions
and
40 deletions
+260
-40
abvw/common/js/common.js
+61
-1
abvw/common/json/lang/lang-ja.json
+2
-1
abvw/inc_backup.html
+1
-0
abvw/js/bookmark.js
+3
-3
abvw/js/contentsearch.js
+5
-1
abvw/js/header.js
+0
-0
abvw/js/history.js
+83
-22
abvw/js/home.js
+0
-0
abvw/js/settings.js
+81
-9
abvw/settings.html
+24
-3
No files found.
abvw/common/js/common.js
View file @
0f78c21c
...
...
@@ -162,6 +162,8 @@ COMMON.Keys = {
// Local
MemoData
:
'MemoData'
,
// Local
ContentStatusData
:
'ContentStatusData'
,
// Local
ResourceVersion
:
'ResourceVersion'
,
// Local
MetaVersion
:
'MetaVersion'
,
...
...
@@ -178,6 +180,8 @@ COMMON.Keys = {
isChangedMarkingData
:
'isChangedMarkingData'
,
// Local: isChangedBookmark: boolean (true: changed, false: not change)
isChangedBookmark
:
'isChangedBookmark'
,
// Local: isChangedContentStatus: boolean (true: changed, false: not change)
isChangedContentStatus
:
'isChangedContentStatus'
,
// Session:パスワード要変更(requirePasswordChange):String (0:不要, 1:初回, 2:定期変更)
requirePasswordChange
:
'requirePasswordChange'
,
...
...
@@ -346,6 +350,8 @@ COMMON.Keys = {
userOpt_bkMemoFlag
:
'userOpt_bkMemoFlag'
,
// Local :ユーザオプション(userOpt)_バックアップデフォルト_しおり:Interger
userOpt_bkShioriFlag
:
'userOpt_bkShioriFlag'
,
// Local :ユーザオプション(userOpt)_バックアップデフォルト_コンテンツ状態:Interger
userOpt_bkContentStatusFlag
:
'userOpt_bkContentStatusFlag'
,
// Local :ユーザオプション(userOpt)_ビューのアニメーション種類:Interger
userOpt_pageTransition
:
'userOpt_pageTransition'
,
// Local :ユーザオプション(userOpt)_アニメーション時間:Float
...
...
@@ -404,6 +410,13 @@ function MarkingEntity() {
this
.
markingid
=
""
;
this
.
registerDate
=
new
Date
();
};
//Entity for ContentStatus
function
ContentStatusEntity
()
{
this
.
contentId
=
""
;
this
.
status
=
0
;
};
// Entity for log
function
LogEntity
()
{
this
.
contentid
=
""
;
...
...
@@ -548,6 +561,24 @@ COMMON.getDataBookmark = function(jsonString) {
ClientData
.
BookMarkData
(
arrBookmark
);
};
COMMON
.
getDataContentStatus
=
function
(
jsonString
)
{
var
data
=
jsonString
.
data
;
var
arr
=
ClientData
.
ContentStatusData
();
arr
.
clear
();
ClientData
.
ContentStatusData
(
arr
);
var
arrContentStatus
=
[];
for
(
var
nIndex1
=
0
;
nIndex1
<
data
.
length
;
nIndex1
++
)
{
var
obj
=
new
ContentStatusEntity
();
obj
.
contentId
=
data
[
nIndex1
].
contentId
;
obj
.
status
=
data
[
nIndex1
].
status
;
// Add object to client
arrContentStatus
.
push
(
obj
);
}
ClientData
.
ContentStatusData
(
arrContentStatus
);
};
/*
Get data from localstorage and sessionstorage synchronization
If has any param (args.length > 0) -> setter
...
...
@@ -700,7 +731,15 @@ var ClientData = {
return
COMMON
.
operateData
(
arguments
,
COMMON
.
Keys
.
MarkingData
,
[]);
}
},
// Local: ContentStatus collection
ContentStatusData
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
COMMON
.
operateData
(
arguments
,
COMMON
.
Keys
.
ContentStatusData
,
[]);
}
else
{
return
COMMON
.
operateData
(
arguments
,
COMMON
.
Keys
.
ContentStatusData
,
[]);
}
},
// Local: content log collection
ContentLogData
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
...
...
@@ -830,6 +869,16 @@ var ClientData = {
}
},
// Local: isChangedContentStatus: boolean (true: changed, false: not change)
isChangedContentStatus
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
COMMON
.
operateData
(
arguments
,
COMMON
.
Keys
.
isChangedContentStatus
,
undefined
);
}
else
{
return
COMMON
.
operateData
(
arguments
,
COMMON
.
Keys
.
isChangedContentStatus
,
undefined
);
}
},
// Local :共通(common)_コンテンツID:Integer
common_preContentId
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
...
...
@@ -1071,6 +1120,17 @@ var ClientData = {
}
},
// Local :ユーザオプション(userOpt)_バックアップデフォルト_コンテンツ状態:Interger
userOpt_bkContentStatusFlag
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
COMMON
.
operateData
(
arguments
,
COMMON
.
Keys
.
userOpt_bkContentStatuFlag
,
undefined
);
}
else
{
return
COMMON
.
operateData
(
arguments
,
COMMON
.
Keys
.
userOpt_bkContentStatuFlag
,
undefined
);
}
},
// Local :ユーザオプション(userOpt)_ビューのアニメーション種類:Interger
userOpt_pageTransition
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
...
...
abvw/common/json/lang/lang-ja.json
View file @
0f78c21c
...
...
@@ -156,5 +156,6 @@
"txtUrlValidDate"
:
"URL有効期間"
,
"txtMaxDownloadCount"
:
"最大DL回数"
,
"msgShareUrlPassword"
:
"パスワードを設定する場合、以下に入力して下さい。"
,
"msgStreamingOpenError"
:
"ストリーミングでは閲覧出来ないコンテンツです。"
"msgStreamingOpenError"
:
"ストリーミングでは閲覧出来ないコンテンツです。"
,
"txtBkContentStatus"
:
"コンテンツ状態"
}
abvw/inc_backup.html
View file @
0f78c21c
...
...
@@ -10,6 +10,7 @@
<input
type=
"checkbox"
name=
"chkBkAllMarking"
id=
"chkBkAllMarking"
class=
"chkbx"
checked=
"checked"
/><label
for=
"chkBkAllMarking"
lang=
"txtBkMarking"
class=
"lang"
>
<!--マーキング-->
</label>
<input
type=
"checkbox"
name=
"chkBkAllMemo"
id=
"chkBkAllMemo"
class=
"chkbx"
checked=
"checked"
/><label
for=
"chkBkAllMemo"
lang=
"txtBkMemo"
class=
"lang"
>
<!--メモ-->
</label>
<input
type=
"checkbox"
name=
"chkBkAllShiori"
id=
"chkBkAllShiori"
class=
"chkbx"
checked=
"checked"
/><label
for=
"chkBkAllShiori"
lang=
"txtBkShiori"
class=
"lang"
>
<!--しおり-->
</label>
<input
type=
"checkbox"
name=
"chkBkAllContentStatus"
id=
"chkBkAllContentStatus"
class=
"chkbx"
checked=
"checked"
/><label
for=
"chkBkAllContentStatus"
lang=
"txtBkContentStatus"
class=
"lang"
>
<!--コンテンツ状態-->
</label>
</p>
<!--</label>-->
</p>
...
...
abvw/js/bookmark.js
View file @
0f78c21c
...
...
@@ -976,10 +976,10 @@ BOOKMARK.IsExistContent = function(strContentId) {
result
[
"contentType"
]
=
contentType
;
// save content type
//
BOOKMARK.contentTypes[strContentId] = contentType;
//
BOOKMARK.contentName[strContentId] = data.contentData.contentName;
BOOKMARK
.
contentTypes
[
strContentId
]
=
contentType
;
BOOKMARK
.
contentName
[
strContentId
]
=
data
.
contentData
.
contentName
;
// save alert message level
//
LIMIT_ACCESS_CONTENT.messageLevel[strContentId] = { alertMessageLevel: data.contentData.alertMessageLevel, alertMessage: data.contentData.alertMessage };
LIMIT_ACCESS_CONTENT
.
messageLevel
[
strContentId
]
=
{
alertMessageLevel
:
data
.
contentData
.
alertMessageLevel
,
alertMessage
:
data
.
contentData
.
alertMessage
};
},
function
(
xmlHttpRequest
,
txtStatus
,
errorThrown
)
{
...
...
abvw/js/contentsearch.js
View file @
0f78c21c
...
...
@@ -1096,7 +1096,11 @@ CONTENTSEARCH.drawEditImage = function(id) {
ctx
.
drawImage
(
img
,
(
c
.
width
/
2
)
-
(
resizeImg
[
0
]
/
2
)
+
4
,
c
.
height
-
resizeImg
[
1
]
+
4
,
resizeImg
[
0
],
resizeImg
[
1
]);
$
(
"#loadingIcon"
+
id
).
fadeOut
(
'slow'
,
function
()
{
$
(
'#content-thumbnail'
+
id
).
fadeIn
(
'slow'
);
});
});
//バックアップデータのステータス更新
HEADER
.
setContentStatus
(
id
,
0
);
};
img
.
src
=
imgSrc
;
...
...
abvw/js/header.js
View file @
0f78c21c
This diff is collapsed.
Click to expand it.
abvw/js/history.js
View file @
0f78c21c
...
...
@@ -761,15 +761,33 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){
var
contentType
=
HISTORY
.
returnContentType
(
contId
);
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Declare variable handle contentType and Thumbnail of content.
//コンテンツ状態バックアップ対応
var
bkContentStatus
=
HEADER
.
getContentStatus
(
contId
);
var
contentStatus
=
null
;
if
(
bkContentStatus
==
0
){
contentStatus
=
0
;
//READ
}
else
if
(
bkContentStatus
==
1
||
bkContentStatus
==
2
||
bkContentStatus
==
3
){
contentStatus
=
1
;
//NEW
}
else
if
(
bkContentStatus
==
5
){
contentStatus
=
2
;
//UPDATE
}
if
(
readArr
==
null
||
readArr
<=
0
||
readArr
==
'undefined'
){
imgThumb
.
onload
=
function
(){
var
resizeImg
=
HISTORY
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
ctx
.
drawImage
(
imgThumb
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
,
resizeImg
[
0
],
resizeImg
[
1
]);
imgIconNew
.
onload
=
function
(){
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
if
(
contentStatus
==
null
||
contentStatus
==
1
){
imgIconNew
.
onload
=
function
(){
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
HISTORY
.
showContentThumbnail
(
contId
);
};
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
}
else
{
HISTORY
.
showContentThumbnail
(
contId
);
}
;
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
}
};
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
...
...
@@ -794,7 +812,22 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){
imgThumb
.
onload
=
function
(){
var
resizeImg
=
HISTORY
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
ctx
.
drawImage
(
imgThumb
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
,
resizeImg
[
0
],
resizeImg
[
1
]);
HISTORY
.
showContentThumbnail
(
contId
);
if
(
contentStatus
==
1
){
imgIconNew
.
onload
=
function
(){
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
HISTORY
.
showContentThumbnail
(
contId
);
};
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
}
else
if
(
contentStatus
==
2
){
imgIconEdit
.
onload
=
function
(){
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
HISTORY
.
showContentThumbnail
(
contId
);
};
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
}
else
{
HISTORY
.
showContentThumbnail
(
contId
);
}
};
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
...
...
@@ -813,14 +846,20 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){
break
;
}
else
{
imgThumb
.
onload
=
function
(){
imgThumb
.
onload
=
function
(){
var
resizeImg
=
HISTORY
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
ctx
.
drawImage
(
imgThumb
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
,
resizeImg
[
0
],
resizeImg
[
1
]);
HISTORY
.
showContentThumbnail
(
contId
);
imgIconNew
.
onload
=
function
(){
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
};
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
if
(
contentStatus
==
null
||
contentStatus
==
1
){
HISTORY
.
showContentThumbnail
(
contId
);
imgIconNew
.
onload
=
function
(){
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
};
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
}
else
{
HISTORY
.
showContentThumbnail
(
contId
);
}
};
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
...
...
@@ -850,11 +889,20 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){
imgThumb
.
onload
=
function
(){
var
resizeImg
=
HISTORY
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
ctx
.
drawImage
(
imgThumb
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
,
resizeImg
[
0
],
resizeImg
[
1
]);
HISTORY
.
showContentThumbnail
(
contId
);
imgIconEdit
.
onload
=
function
(){
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
};
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
if
(
contentStatus
==
1
){
HISTORY
.
showContentThumbnail
(
contId
);
imgIconNew
.
onload
=
function
(){
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
};
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
}
else
{
HISTORY
.
showContentThumbnail
(
contId
);
imgIconEdit
.
onload
=
function
(){
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
};
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
}
};
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
...
...
@@ -884,11 +932,20 @@ HISTORY.checkUserHasReadContent = function(contId, resourceVer, metaVer){
imgThumb
.
onload
=
function
(){
var
resizeImg
=
HISTORY
.
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
ctx
.
drawImage
(
imgThumb
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
,
resizeImg
[
0
],
resizeImg
[
1
]);
HISTORY
.
showContentThumbnail
(
contId
);
imgIconEdit
.
onload
=
function
(){
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
};
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
if
(
contentStatus
==
1
){
HISTORY
.
showContentThumbnail
(
contId
);
imgIconNew
.
onload
=
function
(){
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
};
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
}
else
{
HISTORY
.
showContentThumbnail
(
contId
);
imgIconEdit
.
onload
=
function
(){
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
};
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
}
};
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
...
...
@@ -940,7 +997,11 @@ HISTORY.drawEditImage = function(id) {
ctx
.
drawImage
(
img
,
(
c
.
width
/
2
)
-
(
resizeImg
[
0
]
/
2
)
+
4
,
c
.
height
-
resizeImg
[
1
]
+
4
,
resizeImg
[
0
],
resizeImg
[
1
]);
$
(
"#loadingIcon"
+
id
).
fadeOut
(
'slow'
,
function
()
{
$
(
'#content-thumbnail'
+
id
).
fadeIn
(
'slow'
);
});
});
//バックアップデータのステータス更新
HEADER
.
setContentStatus
(
id
,
0
);
};
img
.
src
=
imgSrc
;
...
...
abvw/js/home.js
View file @
0f78c21c
This diff is collapsed.
Click to expand it.
abvw/js/settings.js
View file @
0f78c21c
...
...
@@ -40,7 +40,8 @@ $(document).ready(function () {
// Check to hide/show backup button
if
(
ClientData
.
isChangedBookmark
()
==
true
||
ClientData
.
isChangedMarkingData
()
==
true
||
ClientData
.
isChangedMemo
()
==
true
)
{
||
ClientData
.
isChangedMemo
()
==
true
||
ClientData
.
isChangedContentStatus
()
==
true
)
{
$
(
"#dspOptBk"
).
show
();
// check disabled button backup
...
...
@@ -75,8 +76,9 @@ $(document).ready(function () {
var
isExistMarking
=
SETTINGS
.
IsExistBackupFile
(
'Marking.json'
,
2
);
var
isExistContentMemo
=
SETTINGS
.
IsExistBackupFile
(
'ContentMemo.json'
,
1
);
var
isExistBookmark
=
SETTINGS
.
IsExistBackupFile
(
'Bookmark.json'
,
4
);
var
isExistContentStatus
=
SETTINGS
.
IsExistBackupFile
(
'ContentStatus.json'
,
8
);
if
(
isExistMarking
||
isExistContentMemo
||
isExistBookmark
)
{
if
(
isExistMarking
||
isExistContentMemo
||
isExistBookmark
||
isExistContentStatus
)
{
$
(
"#dspOptRes"
).
css
(
'visibility'
,
''
);
if
(
!
isExistMarking
)
{
...
...
@@ -100,6 +102,13 @@ $(document).ready(function () {
$
(
'#chkopResShiori'
).
removeAttr
(
'disabled'
);
}
if
(
!
isExistContentStatus
)
{
$
(
'#chkopResContentStatus'
).
attr
(
'disabled'
,
'disabled'
).
removeAttr
(
'checked'
);
}
else
{
$
(
'#chkopResContentStatus'
).
removeAttr
(
'disabled'
);
}
// check disabled button restore
HEADER
.
checkDisabledButton
(
'#dlgConfirmRestore .option_backup input'
,
'#dspOptRes_OK'
);
...
...
@@ -267,15 +276,16 @@ SETTINGS.dspOptBk_OK_Click = function(e) {
var
isBackupMarking
=
$
(
'#chkopBkMarking'
).
attr
(
'checked'
)
==
'checked'
;
var
isBackupMemo
=
$
(
'#chkopBkMemo'
).
attr
(
'checked'
)
==
'checked'
;
var
isBackupBookmark
=
$
(
'#chkopBkShiori'
).
attr
(
'checked'
)
==
'checked'
;
var
isBackupContentStatus
=
$
(
'#chkopBkContentStatus'
).
attr
(
'checked'
)
==
'checked'
;
if
(
!
isBackupMarking
&&
!
isBackupMemo
&&
!
isBackupBookmark
)
if
(
!
isBackupMarking
&&
!
isBackupMemo
&&
!
isBackupBookmark
&&
!
isBackupContentStatus
)
{
SETTINGS
.
closeBackup
();
return
;
}
// call backup file at header
HEADER
.
DoBackup
(
isBackupMarking
,
isBackupMemo
,
isBackupBookmark
,
false
,
HEADER
.
DoBackup
(
isBackupMarking
,
isBackupMemo
,
isBackupBookmark
,
isBackupContentStatus
,
false
,
function
()
{
// Check to hide/show backup button
...
...
@@ -291,7 +301,10 @@ SETTINGS.dspOptBk_OK_Click = function(e) {
if
(
isBackupBookmark
&&
!
ClientData
.
isChangedBookmark
())
{
$
(
'#chkopResShiori'
).
removeAttr
(
'disabled'
);
}
if
(
isBackupContentStatus
&&
!
ClientData
.
isChangedContentStatus
())
{
$
(
'#chkopResContentStatus'
).
removeAttr
(
'disabled'
);
}
SETTINGS
.
closeBackup
();
});
...
...
@@ -299,7 +312,7 @@ SETTINGS.dspOptBk_OK_Click = function(e) {
// set status button backup and checkbox option
SETTINGS
.
setStatusButtonBackup
=
function
()
{
if
(
ClientData
.
isChangedBookmark
()
==
true
||
ClientData
.
isChangedMarkingData
()
==
true
||
ClientData
.
isChangedMemo
()
==
true
)
{
if
(
ClientData
.
isChangedBookmark
()
==
true
||
ClientData
.
isChangedMarkingData
()
==
true
||
ClientData
.
isChangedMemo
()
==
true
||
ClientData
.
isChangedContentStatus
()
==
true
)
{
if
(
ClientData
.
isChangedBookmark
()
!=
true
)
{
$
(
'#chkopBkShiori'
).
attr
(
'disabled'
,
'disabled'
).
removeAttr
(
'checked'
);
...
...
@@ -310,6 +323,10 @@ SETTINGS.setStatusButtonBackup = function() {
if
(
ClientData
.
isChangedMemo
()
!=
true
)
{
$
(
'#chkopBkMemo'
).
attr
(
'disabled'
,
'disabled'
).
removeAttr
(
'checked'
);
}
if
(
ClientData
.
isChangedContentStatus
()
!=
true
)
{
$
(
'#chkopBkContentStatus'
).
attr
(
'disabled'
,
'disabled'
).
removeAttr
(
'checked'
);
}
$
(
"#dspOptBk"
).
show
();
}
else
{
...
...
@@ -341,9 +358,10 @@ SETTINGS.dspOptRes_OK_Click = function(e) {
var
isRestoreMarking
=
$
(
'#chkopResMarking'
).
attr
(
'checked'
)
==
'checked'
;
var
isRestoreMemo
=
$
(
'#chkopResMemo'
).
attr
(
'checked'
)
==
'checked'
;
var
isRestoreBookmark
=
$
(
'#chkopResShiori'
).
attr
(
'checked'
)
==
'checked'
;
if
(
!
isRestoreMarking
&&
!
isRestoreMemo
&&
!
isRestoreBookmark
)
{
var
isRestoreContentStatus
=
$
(
'#chkopResContentStatus'
).
attr
(
'checked'
)
==
'checked'
;
if
(
!
isRestoreMarking
&&
!
isRestoreMemo
&&
!
isRestoreBookmark
&&
!
isRestoreContentStatus
)
{
SETTINGS
.
closeRestore
();
return
;
return
;
}
$
().
toastmessage
({
position
:
'middle-center'
});
...
...
@@ -391,6 +409,20 @@ SETTINGS.dspOptRes_OK_Click = function(e) {
}
}
if
(
isRestoreContentStatus
)
{
// restore ContentStatus data
var
res
=
SETTINGS
.
restoreContentStatus
();
if
(
!
res
)
{
$
(
'#divResultMessage'
).
append
(
"<div class='toast-item-image-error toast-item-message'>"
+
I18N
.
i18nText
(
'txtBkContentStatus'
)
+
" "
+
I18N
.
i18nText
(
'msgRestoreFailed'
)
+
"</div>"
);
}
else
{
$
(
'#divResultMessage'
).
append
(
"<div class='toast-item-image-success toast-item-message'>"
+
I18N
.
i18nText
(
'txtBkContentStatus'
)
+
" "
+
I18N
.
i18nText
(
'msgRestoreSuccess'
)
+
"</div>"
);
}
}
// set status button backup
//SETTINGS.setStatusButtonBackup();
...
...
@@ -471,6 +503,28 @@ SETTINGS.restoreMarkingData = function()
return
result
;
};
/*
* Call api to restore ContentStatus data
*/
SETTINGS
.
restoreContentStatus
=
function
()
{
var
result
=
false
;
AVWEB
.
avwCmsApiSync
(
ClientData
.
userInfo_accountPath
(),
"getBackupFile"
,
"post"
,
{
sid
:
ClientData
.
userInfo_sid
(),
filename
:
"ContentStatus.json"
},
// deviceType: '4',
function
(
data
)
{
if
(
data
)
{
COMMON
.
getDataContentStatus
(
data
);
ClientData
.
isChangedContentStatus
(
false
);
result
=
true
;
}
}
,
function
(
xhr
,
b
,
c
)
{
}
);
return
result
;
};
// Cancel for restore
SETTINGS
.
dspOptRes_Cancel_Click
=
function
(
e
)
{
...
...
@@ -553,6 +607,13 @@ SETTINGS.dspSave_Click = function(e) {
ClientData
.
userOpt_bkShioriFlag
(
0
);
}
if
(
$
(
"#chkBkContentStatus"
).
attr
(
'checked'
)
==
'checked'
)
{
ClientData
.
userOpt_bkContentStatusFlag
(
1
);
}
else
{
ClientData
.
userOpt_bkContentStatusFlag
(
0
);
}
// save config page transition No.4
ClientData
.
userOpt_pageTransition
(
$
(
'#cboAnimation'
).
val
());
...
...
@@ -680,13 +741,18 @@ SETTINGS.dspOptBk_Click = function(e) {
else
{
$
(
"#chkopBkMemo"
).
attr
(
'checked'
,
'checked'
);
}
if
(
ClientData
.
userOpt_bkShioriFlag
()
==
0
)
{
$
(
"#chkopBkShiori"
).
removeAttr
(
'checked'
);
}
else
{
$
(
"#chkopBkShiori"
).
attr
(
'checked'
,
'checked'
);
}
if
(
ClientData
.
userOpt_bkContentStatusFlag
()
==
0
)
{
$
(
"#chkopBkContentStatus"
).
removeAttr
(
'checked'
);
}
else
{
$
(
"#chkopBkContentStatus"
).
attr
(
'checked'
,
'checked'
);
}
// check content is changed
...
...
@@ -710,6 +776,12 @@ SETTINGS.dspOptBk_Click = function(e) {
else
{
$
(
'#chkopBkMarking'
).
removeAttr
(
'disabled'
);
}
if
(
!
ClientData
.
isChangedContentStatus
())
{
$
(
'#chkopBkContentStatus'
).
attr
(
'disabled'
,
'disabled'
).
removeAttr
(
'checked'
);
}
else
{
$
(
'#chkopBkContentStatus'
).
removeAttr
(
'disabled'
);
}
HEADER
.
setDisabledButton
(
'#dlgConfirmBackup .option_backup input'
,
'#dspOptBk_OK'
);
...
...
abvw/settings.html
View file @
0f78c21c
...
...
@@ -158,6 +158,7 @@
<input
type=
"checkbox"
id=
"chkBkMarking"
class=
"chkbx"
checked=
"checked"
/><label
id=
"txtBkMarking"
for=
"chkBkMarking"
lang=
"txtBkMarking"
class=
"lang"
>
<!--マーキング-->
</label>
<input
type=
"checkbox"
id=
"chkBkMemo"
class=
"chkbx"
checked=
"checked"
/><label
id=
"txtBkMemo"
for=
"chkBkMemo"
lang=
"txtBkMemo"
class=
"lang"
>
<!--メモ-->
</label>
<input
type=
"checkbox"
id=
"chkBkShiori"
class=
"chkbx"
checked=
"checked"
/><label
id=
"txtBkShiori"
for=
"chkBkShiori"
lang=
"txtBkShiori"
class=
"lang"
>
<!--しおり-->
</label>
<input
type=
"checkbox"
id=
"chkBkContentStatus"
class=
"chkbx"
checked=
"checked"
/><label
id=
"txtBkContentStatus"
for=
"chkBkContentStatus"
lang=
"txtBkContentStatus"
class=
"lang"
>
<!--コンテンツ状態-->
</label>
</label>
</p>
<p
class=
"backupbtn"
><a
class=
"backup lang"
lang=
"dspOptBk"
id=
"dspOptBk"
href=
"#"
style=
"display:none;"
>
<!--バックアップ-->
</a><a
href=
"#"
id=
"dspOptRes"
lang=
"dspOptRes"
class=
"lang"
style=
"visibility:hidden;"
>
<!--リストア-->
</a></p>
...
...
@@ -193,6 +194,25 @@
<div
id=
"inc_backup"
></div>
<section
class=
"sectionbackup"
id=
"dlgConfirmBackup"
>
<h1><label
class=
"title lang"
lang=
"txtBackupTitle"
>
バックアップ確認
</label></h1>
<!--<p class="message"><label id="txtBkMsg" lang="txtBkMsg" class="lang">サーバにバックアップしますか?</label></p>-->
<p
class=
"message"
>
<label
lang=
"txtBkSelectData"
class=
"lang"
>
バックアップするデータを選択してください。
</label>
</p>
<p
class=
"message-options"
>
<!--<label class="option_backup">-->
<p
class=
"option_backup"
style=
"font-size: 13px;margin-left:50px"
>
<input
type=
"checkbox"
name=
"chkopBkMarking"
id=
"chkopBkMarking"
class=
"chkopbx"
checked=
"checked"
/><label
for=
"chkopBkMarking"
lang=
"txtBkMarking"
class=
"lang"
>
マーキング
</label>
<input
type=
"checkbox"
name=
"chkopBkMemo"
id=
"chkopBkMemo"
class=
"chkopbx"
checked=
"checked"
/><label
for=
"chkopBkMemo"
lang=
"txtBkMemo"
class=
"lang"
>
メモ
</label>
<input
type=
"checkbox"
name=
"chkopBkShiori"
id=
"chkopBkShiori"
class=
"chkopbx"
checked=
"checked"
/><label
for=
"chkopBkShiori"
lang=
"txtBkShiori"
class=
"lang"
>
しおり
</label>
<input
type=
"checkbox"
name=
"chkopBkContentStatus"
id=
"chkopBkContentStatus"
class=
"chkopbx"
checked=
"checked"
/><label
for=
"chkopBkContentStatus"
lang=
"txtBkContentStatus"
class=
"lang"
>
コンテンツ状態
</label>
</P>
<!--</label>-->
</p>
<p
class=
"backupbtn"
><a
class=
"ok lang"
href=
"#"
id=
"dspOptBk_OK"
lang=
"dspOK"
>
OK
</a><a
class=
"cancel lang"
href=
"#"
lang=
"dspCancel"
id=
"dspOptBk_Cancel"
>
キャンセル
</a></p>
</section>
<section
class=
"sectionrestore"
id=
"dlgConfirmRestore"
>
<h1
class=
"title lang"
lang=
"txtRestoreTitle"
>
<!--リストア確認-->
</h1>
<p
class=
"message"
>
...
...
@@ -202,9 +222,10 @@
<p
class=
"message-options"
>
<!--<label class="option_backup">-->
<p
class=
"option_backup"
style=
"font-size: 13px;margin-left:50px"
>
<input
type=
"checkbox"
name=
"chkopBkMarking"
id=
"chkopBkMarking"
class=
"chkopbx"
checked=
"checked"
/><label
for=
"chkopBkMarking"
lang=
"txtBkMarking"
class=
"lang"
>
マーキング
</label>
<input
type=
"checkbox"
name=
"chkopBkMemo"
id=
"chkopBkMemo"
class=
"chkopbx"
checked=
"checked"
/><label
for=
"chkopBkMemo"
lang=
"txtBkMemo"
class=
"lang"
>
メモ
</label>
<input
type=
"checkbox"
name=
"chkopBkShiori"
id=
"chkopBkShiori"
class=
"chkopbx"
checked=
"checked"
/><label
for=
"chkopBkShiori"
lang=
"txtBkShiori"
class=
"lang"
>
しおり
</label>
<input
type=
"checkbox"
name=
"chkopResMarking"
id=
"chkopResMarking"
class=
"chkopbx"
checked=
"checked"
/><label
for=
"chkopResMarking"
lang=
"txtBkMarking"
class=
"lang"
>
マーキング
</label>
<input
type=
"checkbox"
name=
"chkopResMemo"
id=
"chkopResMemo"
class=
"chkopbx"
checked=
"checked"
/><label
for=
"chkopResMemo"
lang=
"txtBkMemo"
class=
"lang"
>
メモ
</label>
<input
type=
"checkbox"
name=
"chkopResShiori"
id=
"chkopResShiori"
class=
"chkopbx"
checked=
"checked"
/><label
for=
"chkopResShiori"
lang=
"txtBkShiori"
class=
"lang"
>
しおり
</label>
<input
type=
"checkbox"
name=
"chkopResContentStatus"
id=
"chkopResContentStatus"
class=
"chkopbx"
checked=
"checked"
/><label
for=
"chkopResContentStatus"
lang=
"txtBkContentStatus"
class=
"lang"
>
コンテンツ状態
</label>
</P>
<!--</label>-->
</p>
...
...
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