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
3b0d015a
Commit
3b0d015a
authored
Feb 13, 2015
by
Masaru Abe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
隠しグループ対応
parent
308675b5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
110 additions
and
22 deletions
+110
-22
abvw/js/bookmark.js
+91
-13
abvw/js/header.js
+17
-7
abvw/js/history.js
+1
-1
abvw/js/home.js
+1
-1
No files found.
abvw/js/bookmark.js
View file @
3b0d015a
...
...
@@ -42,7 +42,8 @@ $(document).ready(function () {
BOOKMARK
.
ClearGrid
();
if
(
ClientData
.
BookMarkData
().
length
==
0
)
{
//if (ClientData.BookMarkData().length == 0) {
if
(
BOOKMARK
.
collection_contents
.
length
==
0
){
// Show error
$
(
"#msgShioriNotExists"
).
show
();
$
(
"#dspDelete"
).
hide
();
...
...
@@ -273,7 +274,7 @@ BOOKMARK.dspDelete_Click = function() {
};
// Show detail content
BOOKMARK
.
ShowBookmark
=
function
()
{
BOOKMARK
.
ShowBookmark
=
function
(
showList
)
{
if
(
AVWEB
.
avwHasError
())
{
return
;
}
...
...
@@ -283,17 +284,17 @@ BOOKMARK.ShowBookmark = function() {
var
contentid
=
""
;
var
pageNo
=
0
;
if
(
ClientData
.
BookMarkData
()
.
length
>
0
)
{
if
(
showList
.
length
>
0
)
{
$
(
"#dspDelete"
).
show
();
$
(
"#dspDelete1"
).
show
();
}
//TotalThread = ClientData.BookMarkData().length;
for
(
var
nIndex
=
ClientData
.
BookMarkData
()
.
length
-
1
;
nIndex
>=
0
;
nIndex
--
)
{
for
(
var
nIndex
=
showList
.
length
-
1
;
nIndex
>=
0
;
nIndex
--
)
{
hasMarking
=
false
;
hasMemo
=
false
;
contentid
=
ClientData
.
BookMarkData
()
[
nIndex
].
contentid
;
pageNo
=
ClientData
.
BookMarkData
()
[
nIndex
].
pageNo
;
contentid
=
showList
[
nIndex
].
contentid
;
pageNo
=
showList
[
nIndex
].
pageNo
;
// Check if contentid has marking
for
(
var
nIndex1
=
0
;
nIndex1
<
ClientData
.
MarkingData
().
length
;
nIndex1
++
)
{
...
...
@@ -373,6 +374,7 @@ BOOKMARK.SortTitleName = function(isAsc) {
var
arrSource
=
ClientData
.
BookMarkData
();
var
arrTarget
=
[];
var
arrShowList
=
[];
var
strTemp
=
""
;
var
nTempIndex
=
0
;
var
isStop
=
false
;
...
...
@@ -403,6 +405,15 @@ BOOKMARK.SortTitleName = function(isAsc) {
}
// Add to target array
arrTarget
.
push
(
arrSource
[
nTempIndex
]);
//表示対象なら表示用リストにプッシュ
for
(
var
nIndex2
=
0
;
nIndex2
<
BOOKMARK
.
collection_contents
.
length
;
nIndex2
++
)
{
if
(
BOOKMARK
.
collection_contents
[
nIndex2
].
contentid
==
arrSource
[
nTempIndex
].
contentid
)
{
arrShowList
.
push
(
arrSource
[
nTempIndex
]);
break
;
}
}
// Remove min item from source array
arrSource
.
splice
(
nTempIndex
,
1
);
}
...
...
@@ -412,7 +423,7 @@ BOOKMARK.SortTitleName = function(isAsc) {
}
BOOKMARK
.
ClearGrid
();
ClientData
.
BookMarkData
(
arrTarget
);
BOOKMARK
.
ShowBookmark
();
BOOKMARK
.
ShowBookmark
(
arrShowList
);
};
// Clear all rows of grid
BOOKMARK
.
ClearGrid
=
function
()
{
...
...
@@ -430,6 +441,7 @@ BOOKMARK.SortTitleNameKana = function(isAsc) {
var
arrSource
=
ClientData
.
BookMarkData
();
var
arrTarget
=
[];
var
arrShowList
=
[];
var
strTemp
=
""
;
var
nTempIndex
=
0
;
var
isStop
=
false
;
...
...
@@ -460,6 +472,15 @@ BOOKMARK.SortTitleNameKana = function(isAsc) {
}
// Add to target array
arrTarget
.
push
(
arrSource
[
nTempIndex
]);
//表示対象なら表示用リストにプッシュ
for
(
var
nIndex2
=
0
;
nIndex2
<
BOOKMARK
.
collection_contents
.
length
;
nIndex2
++
)
{
if
(
BOOKMARK
.
collection_contents
[
nIndex2
].
contentid
==
arrSource
[
nTempIndex
].
contentid
)
{
arrShowList
.
push
(
arrSource
[
nTempIndex
]);
break
;
}
}
// Remove min item from source array
arrSource
.
splice
(
nTempIndex
,
1
);
}
...
...
@@ -469,7 +490,7 @@ BOOKMARK.SortTitleNameKana = function(isAsc) {
}
BOOKMARK
.
ClearGrid
();
ClientData
.
BookMarkData
(
arrTarget
);
BOOKMARK
.
ShowBookmark
();
BOOKMARK
.
ShowBookmark
(
arrShowList
);
};
// Sort by publish date
BOOKMARK
.
SortPubDate
=
function
(
isAsc
)
{
...
...
@@ -478,6 +499,7 @@ BOOKMARK.SortPubDate = function(isAsc) {
var
arrSource
=
ClientData
.
BookMarkData
();
var
arrTarget
=
[];
var
arrShowList
=
[];
var
dateTemp
=
undefined
;
var
nTempIndex
=
0
;
var
isStop
=
false
;
...
...
@@ -508,6 +530,15 @@ BOOKMARK.SortPubDate = function(isAsc) {
}
// Add to target array
arrTarget
.
push
(
arrSource
[
nTempIndex
]);
//表示対象なら表示用リストにプッシュ
for
(
var
nIndex2
=
0
;
nIndex2
<
BOOKMARK
.
collection_contents
.
length
;
nIndex2
++
)
{
if
(
BOOKMARK
.
collection_contents
[
nIndex2
].
contentid
==
arrSource
[
nTempIndex
].
contentid
)
{
arrShowList
.
push
(
arrSource
[
nTempIndex
]);
break
;
}
}
// Remove min item from source array
arrSource
.
splice
(
nTempIndex
,
1
);
}
...
...
@@ -517,7 +548,7 @@ BOOKMARK.SortPubDate = function(isAsc) {
}
BOOKMARK
.
ClearGrid
();
ClientData
.
BookMarkData
(
arrTarget
);
BOOKMARK
.
ShowBookmark
();
BOOKMARK
.
ShowBookmark
(
arrShowList
);
};
/*
Update information of specified bookmark
...
...
@@ -647,7 +678,6 @@ BOOKMARK.insertRow = function(contentid, pageThumbnail, pageTitle, pageText, pag
newRow
+=
'<li>'
;
newRow
+=
"<a class='read read_open lang' name='dspRead' value='{
\"
contentid
\"
:
\"
"
+
contentid
+
"
\"
,
\"
pageNo
\"
:
\"
"
+
pageNo
+
"
\"
,
\"
contentType
\"
:
\"
"
+
contentType
+
"
\"
}' lang='txtRead'>"
+
I18N
.
i18nText
(
'txtRead'
)
+
"</a>"
;
//console.log("BOOKMARK.download[contentid]:" + BOOKMARK.download[contentid]);
if
(
BOOKMARK
.
download
[
contentid
]
==
'1'
){
newRow
+=
"<a class='read read_download' name='dspDownload' contentid='"
+
contentid
+
"'>ダウンロード</a>"
;
}
...
...
@@ -865,7 +895,10 @@ BOOKMARK.SyncContent = function() {
// ==================================
else
{
// Add nromal content
BOOKMARK
.
AddContent
(
oneBookMark
.
contentid
,
BOOKMARK
.
IsExistContent
(
oneBookMark
.
contentid
)[
"contentType"
]);
var
result
=
BOOKMARK
.
IsExistContentAuthGroup
(
oneBookMark
.
contentid
);
if
(
result
[
"isExisted"
]
==
true
){
BOOKMARK
.
AddContent
(
oneBookMark
.
contentid
,
result
[
"contentType"
]);
}
}
}
}
...
...
@@ -891,9 +924,10 @@ BOOKMARK.IsExistContent = function(strContentId) {
sid
:
ClientData
.
userInfo_sid
(),
getType
:
'1'
,
contentId
:
strContentId
,
authCode
:
ClientData
.
authCode
()
authCode
:
"0"
};
result
[
"isExisted"
]
=
isExisted
;
AVWEB
.
avwCmsApiSync
(
ClientData
.
userInfo_accountPath
(),
"webGetContent"
,
'GET'
,
params
,
function
(
data
)
{
isExisted
=
true
;
...
...
@@ -902,7 +936,50 @@ BOOKMARK.IsExistContent = function(strContentId) {
result
[
"isExisted"
]
=
isExisted
;
result
[
"contentType"
]
=
contentType
;
//console.log("API BOOKMARK.download:" + strContentId + ":" + data.download);
// save content type
//BOOKMARK.contentTypes[strContentId] = contentType;
//BOOKMARK.contentName[strContentId] = data.contentData.contentName;
//BOOKMARK.download[strContentId] = data.download;
// save alert message level
//LIMIT_ACCESS_CONTENT.messageLevel[strContentId] = { alertMessageLevel: data.contentData.alertMessageLevel, alertMessage: data.contentData.alertMessage };
},
function
(
xmlHttpRequest
,
txtStatus
,
errorThrown
)
{
if
(
xmlHttpRequest
.
status
==
404
)
{
isExisted
=
false
;
}
else
{
// Show system error
isExisted
=
true
;
// Mark this flag to prevent bookmarks from deleting
AVWEB
.
showSystemError
();
}
});
return
result
;
};
/*
Check content whether existed or not
*/
BOOKMARK
.
IsExistContentAuthGroup
=
function
(
strContentId
)
{
var
isExisted
=
false
;
var
contentType
=
''
;
var
result
=
[];
var
params
=
{
sid
:
ClientData
.
userInfo_sid
(),
getType
:
'1'
,
contentId
:
strContentId
,
authCode
:
ClientData
.
authCode
()
};
result
[
"isExisted"
]
=
isExisted
;
AVWEB
.
avwCmsApiSync
(
ClientData
.
userInfo_accountPath
(),
"webGetContent"
,
'GET'
,
params
,
function
(
data
)
{
isExisted
=
true
;
contentType
=
data
.
contentData
.
contentType
;
result
[
"isExisted"
]
=
isExisted
;
result
[
"contentType"
]
=
contentType
;
// save content type
BOOKMARK
.
contentTypes
[
strContentId
]
=
contentType
;
...
...
@@ -926,6 +1003,7 @@ BOOKMARK.IsExistContent = function(strContentId) {
return
result
;
};
/*
----------------------------------------------------------------------------
Setting dialog [ end ]
...
...
abvw/js/header.js
View file @
3b0d015a
...
...
@@ -865,7 +865,10 @@ HEADER.getPushMessageNew = function()
}
}
//$('.notification-pushmessage').hide();
var
params
=
{
"sid"
:
ClientData
.
userInfo_sid
()};
var
params
=
{
"sid"
:
ClientData
.
userInfo_sid
(),
"authCode"
:
ClientData
.
authCode
()
};
AVWEB
.
avwCmsApi
(
ClientData
.
userInfo_accountPath
(),
"webPushMessageNew"
,
...
...
@@ -924,21 +927,28 @@ HEADER.getPushMessageList = function() {
var
from
=
(
HEADER
.
currentPagePushMessage
-
1
)
*
pushPageCount
+
1
;
var
to
=
HEADER
.
currentPagePushMessage
*
pushPageCount
;
var
params
=
{
"sid"
:
ClientData
.
userInfo_sid
(),
"recordFrom"
:
from
,
"recordTo"
:
to
};
AVWEB
.
avwCmsApiSync
(
ClientData
.
userInfo_accountPath
(),
"webPushMessageList"
,
"post"
,
params
,
var
params
=
{
"sid"
:
ClientData
.
userInfo_sid
(),
"recordFrom"
:
from
,
"recordTo"
:
to
,
"authCode"
:
ClientData
.
authCode
()
};
AVWEB
.
avwCmsApiSync
(
ClientData
.
userInfo_accountPath
(),
"webPushMessageList"
,
"post"
,
params
,
function
(
data
)
{
// reset number message
ClientData
.
pushInfo_newMsgNumber
(
0
);
// hide number new message
$
(
'#numbermessage'
).
html
(
''
);
HEADER
.
showListPushMessage
(
data
);
},
function
(
xhr
,
b
,
c
)
{
AVWEB
.
showSystemError
();
});
}
);
};
// get string from date crate pushmessage
...
...
abvw/js/history.js
View file @
3b0d015a
...
...
@@ -1228,7 +1228,7 @@ HISTORY.IsExistContent = function(strContentId) {
sid
:
ClientData
.
userInfo_sid
(),
getType
:
'1'
,
contentId
:
strContentId
,
authCode
:
ClientData
.
authCode
()
authCode
:
"0"
};
AVWEB
.
avwCmsApiSync
(
ClientData
.
userInfo_accountPath
(),
"webGetContent"
,
'GET'
,
params
,
function
(
data
)
{
...
...
abvw/js/home.js
View file @
3b0d015a
...
...
@@ -2338,7 +2338,7 @@ HOME.IsExistContent = function(strContentId) {
sid
:
ClientData
.
userInfo_sid
(),
getType
:
'1'
,
contentId
:
strContentId
,
authCode
:
ClientData
.
authCode
()
authCode
:
"0"
};
AVWEB
.
avwCmsApiSync
(
ClientData
.
userInfo_accountPath
(),
"webGetContent"
,
'GET'
,
params
,
function
(
data
)
{
...
...
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