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
6d47e7ef
Commit
6d47e7ef
authored
Dec 16, 2014
by
Masaru Abe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ログ出力コメント化
parent
bf3812af
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
45 deletions
+44
-45
abvw/js/contentview.js
+4
-4
abvw/js/contentview_Events.js
+7
-8
abvw/js/contentview_FileSystem.js
+22
-22
abvw/js/contentview_GetData.js
+4
-4
abvw/js/contentview_InitObjects.js
+7
-7
No files found.
abvw/js/contentview.js
View file @
6d47e7ef
...
...
@@ -1144,7 +1144,7 @@ function changePage(page_index) {
function
(
file
){
var
reader
=
new
FileReader
();
reader
.
onloadend
=
function
(
e
)
{
AVWEB
.
avwLog
(
"read FileSystem"
);
//
AVWEB.avwLog("read FileSystem");
pageImages
=
e
.
target
.
result
;
/* get page Objects */
...
...
@@ -1161,7 +1161,7 @@ function changePage(page_index) {
);
},
function
(
err
){
// 失敗時のコールバック関数
AVWEB
.
avwLog
(
"NotRead FileSystem"
);
//
AVWEB.avwLog("NotRead FileSystem");
avwGrabContentPageImage
(
ClientData
.
userInfo_accountPath
(),
{
contentId
:
contentID
,
sid
:
ClientData
.
userInfo_sid
(),
pageNo
:
page_index
+
1
},
...
...
@@ -2156,7 +2156,7 @@ function changePageWithoutSlide(pageMove) {
function
(
file
){
var
reader
=
new
FileReader
();
reader
.
onloadend
=
function
(
e
)
{
AVWEB
.
avwLog
(
"read FileSystem"
);
//
AVWEB.avwLog("read FileSystem");
pageImages
=
e
.
target
.
result
;
/* get page Objects */
...
...
@@ -2199,7 +2199,7 @@ function changePageWithoutSlide(pageMove) {
);
},
function
(
err
){
// 失敗時のコールバック関数
AVWEB
.
avwLog
(
"NotRead FileSystem"
);
//
AVWEB.avwLog("NotRead FileSystem");
avwGrabContentPageImage
(
ClientData
.
userInfo_accountPath
(),
{
contentId
:
contentID
,
sid
:
ClientData
.
userInfo_sid
(),
pageNo
:
pageMove
+
1
},
...
...
abvw/js/contentview_Events.js
View file @
6d47e7ef
...
...
@@ -408,7 +408,7 @@ function firstPage_click() {
function
(
file
){
var
reader
=
new
FileReader
();
reader
.
onloadend
=
function
(
e
)
{
AVWEB
.
avwLog
(
"read FileSystem"
);
//
AVWEB.avwLog("read FileSystem");
pageImages
=
e
.
target
.
result
;
/* get page Objects */
...
...
@@ -429,7 +429,7 @@ function firstPage_click() {
);
},
function
(
err
){
// 失敗時のコールバック関数
AVWEB
.
avwLog
(
"NotRead FileSystem"
);
//
AVWEB.avwLog("NotRead FileSystem");
avwGrabContentPageImage
(
ClientData
.
userInfo_accountPath
(),
{
contentId
:
contentID
,
sid
:
ClientData
.
userInfo_sid
(),
pageNo
:
1
},
...
...
@@ -537,7 +537,7 @@ function lastPage_click() {
function
(
file
){
var
reader
=
new
FileReader
();
reader
.
onloadend
=
function
(
e
)
{
AVWEB
.
avwLog
(
"read FileSystem"
);
//
AVWEB.avwLog("read FileSystem");
pageImages
=
e
.
target
.
result
;
/* get page Objects */
...
...
@@ -556,7 +556,7 @@ function lastPage_click() {
);
},
function
(
err
){
// 失敗時のコールバック関数
AVWEB
.
avwLog
(
"NotRead FileSystem"
);
//
AVWEB.avwLog("NotRead FileSystem");
avwGrabContentPageImage
(
ClientData
.
userInfo_accountPath
(),
{
contentId
:
contentID
,
sid
:
ClientData
.
userInfo_sid
(),
pageNo
:
totalPage
},
...
...
@@ -1494,7 +1494,7 @@ function resetNaviAction(){
function
onTouchstart
(
evt
){
AVWEB
.
avwLog
(
"onTouchstart _isClick:"
+
_isClick
);
//
AVWEB.avwLog("onTouchstart _isClick:" + _isClick);
//evt.preventDefault();
if
(
ClientData
.
IsAddingMarking
()
==
true
){
...
...
@@ -1729,7 +1729,7 @@ var isPreventClick = false;
function
onTouchmove
(
evt
){
AVWEB
.
avwLog
(
"onTouchmove isClick:"
+
_isClick
);
//
AVWEB.avwLog("onTouchmove isClick:" + _isClick);
//evt.preventDefault();
if
(
ClientData
.
IsAddingMarking
()
==
true
){
...
...
@@ -2012,8 +2012,7 @@ function onTouchmove(evt){
function
onTouchend
(
evt
){
AVWEB
.
avwLog
(
"onTouchend isClick:"
+
_isClick
);
//AVWEB.avwLog("onTouchend isClick:" + _isClick);
//evt.preventDefault();
if
(
ClientData
.
IsAddingMarking
()
==
true
){
...
...
abvw/js/contentview_FileSystem.js
View file @
6d47e7ef
...
...
@@ -71,10 +71,10 @@ CONTENTVIEW_FILESYSTEM.savePageFile = function(contentId, fileName, data) {
fileEntry
.
createWriter
(
function
(
fileWriter
)
{
fileWriter
.
onwriteend
=
function
(
e
)
{
AVWEB
.
avwLog
(
'書き込み完了'
);
//
AVWEB.avwLog('書き込み完了');
};
fileWriter
.
onerror
=
function
(
e
)
{
AVWEB
.
avwLog
(
'書き込みエラー: '
+
e
.
toString
());
//
AVWEB.avwLog('書き込みエラー: ' + e.toString());
};
var
blobData
=
new
Blob
([
data
],
{
type
:
"text/plain"
});
fileWriter
.
write
(
blobData
);
...
...
@@ -103,7 +103,7 @@ CONTENTVIEW_FILESYSTEM.deleteContentDir = function(contentId) {
function
(
dirEntry
)
{
dirEntry
.
removeRecursively
(
function
()
{
AVWEB
.
avwLog
(
'Directory removed. id='
+
contentId
);
//
AVWEB.avwLog('Directory removed. id=' + contentId);
},
CONTENTVIEW_FILESYSTEM
.
errorHandler
);
...
...
@@ -136,15 +136,15 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) {
function
(
file
){
var
reader
=
new
FileReader
();
reader
.
onloadend
=
function
(
e
)
{
AVWEB
.
avwLog
(
"read Json.txt"
);
//
AVWEB.avwLog("read Json.txt");
//JSONに戻す
var
jsonObjOld
=
JSON
.
parse
(
e
.
target
.
result
);
//配信日時比較
AVWEB
.
avwLog
(
"OLD:"
+
jsonObjOld
.
contentData
.
lastDeliveryDate
);
AVWEB
.
avwLog
(
"NEW:"
+
data
.
contentData
.
lastDeliveryDate
);
//
AVWEB.avwLog("OLD:" + jsonObjOld.contentData.lastDeliveryDate);
//
AVWEB.avwLog("NEW:" + data.contentData.lastDeliveryDate);
if
(
jsonObjOld
.
contentData
.
lastDeliveryDate
!=
data
.
contentData
.
lastDeliveryDate
){
AVWEB
.
avwLog
(
"Update Content."
);
//
AVWEB.avwLog("Update Content.");
//ディレクトリ消し
CONTENTVIEW_FILESYSTEM
.
fs
.
root
.
getDirectory
(
...
...
@@ -153,7 +153,7 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) {
function
(
dirEntry
)
{
dirEntry
.
removeRecursively
(
function
()
{
AVWEB
.
avwLog
(
'Directory removed. id='
+
contentId
);
//
AVWEB.avwLog('Directory removed. id=' + contentId);
//再度書き込み
CONTENTVIEW_FILESYSTEM
.
fs
.
root
.
getDirectory
(
...
...
@@ -168,7 +168,7 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) {
fileEntry
.
createWriter
(
function
(
fileWriter
)
{
fileWriter
.
onwriteend
=
function
(
e
)
{
AVWEB
.
avwLog
(
'JSON書き込み完了'
);
//
AVWEB.avwLog('JSON書き込み完了');
//おまじない ajaxカウントをインクリする必要有り
nAjaxLoad
++
;
...
...
@@ -179,7 +179,7 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) {
};
fileWriter
.
onerror
=
function
(
e
)
{
AVWEB
.
avwLog
(
'JSON書き込みエラー: '
+
e
.
toString
());
//
AVWEB.avwLog('JSON書き込みエラー: ' + e.toString());
};
var
blobData
=
new
Blob
([
window
.
JSON
.
stringify
(
data
)],
{
type
:
"text/plain"
});
fileWriter
.
write
(
blobData
);
...
...
@@ -217,7 +217,7 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) {
);
},
function
(
err
){
// 失敗時のコールバック関数
AVWEB
.
avwLog
(
"NotRead json.txt"
);
//
AVWEB.avwLog("NotRead json.txt");
//書き込む パス作成
//var path = "/abook/" + contentId + "/" + fileName;
...
...
@@ -233,7 +233,7 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) {
fileEntry
.
createWriter
(
function
(
fileWriter
)
{
fileWriter
.
onwriteend
=
function
(
e
)
{
AVWEB
.
avwLog
(
'JSON書き込み完了'
);
//
AVWEB.avwLog('JSON書き込み完了');
//おまじない ajaxカウントをインクリする必要有り
nAjaxLoad
++
;
...
...
@@ -244,7 +244,7 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) {
};
fileWriter
.
onerror
=
function
(
e
)
{
AVWEB
.
avwLog
(
'JSON書き込みエラー: '
+
e
.
toString
());
//
AVWEB.avwLog('JSON書き込みエラー: ' + e.toString());
};
var
blobData
=
new
Blob
([
window
.
JSON
.
stringify
(
data
)],
{
type
:
"text/plain"
});
fileWriter
.
write
(
blobData
);
...
...
@@ -266,7 +266,7 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) {
CONTENTVIEW_FILESYSTEM
.
showVideoObjectCache
=
function
(
x
,
y
,
width
,
height
,
src
,
isFullscreen
,
contentId
,
resourceId
){
AVWEB
.
avwLog
(
'CONTENTVIEW_FILESYSTEM.showVideoObjectCache'
);
//
AVWEB.avwLog('CONTENTVIEW_FILESYSTEM.showVideoObjectCache');
if
(
!
CONTENTVIEW_FILESYSTEM
.
fs
)
{
//AVWEB.avwLog('CONTENTVIEW_FILESYSTEM.fs is null. id=' + contentId);
...
...
@@ -280,7 +280,7 @@ CONTENTVIEW_FILESYSTEM.showVideoObjectCache = function(x, y, width, height, src,
function
(
fileEntry
){
fileEntry
.
file
(
function
(
file
){
AVWEB
.
avwLog
(
"read cache"
);
//
AVWEB.avwLog("read cache");
var
url
=
window
.
URL
||
window
.
webkitURL
;
var
resSrc
=
url
.
createObjectURL
(
file
);
showVideoObject
(
x
,
y
,
width
,
height
,
resSrc
,
isFullscreen
,
false
);
...
...
@@ -288,7 +288,7 @@ CONTENTVIEW_FILESYSTEM.showVideoObjectCache = function(x, y, width, height, src,
);
},
function
(
err
){
// 失敗時のコールバック関数
AVWEB
.
avwLog
(
"NotRead FileSystem"
);
//
AVWEB.avwLog("NotRead FileSystem");
//キャッシュ化
var
xhr
=
new
XMLHttpRequest
();
...
...
@@ -299,7 +299,7 @@ CONTENTVIEW_FILESYSTEM.showVideoObjectCache = function(x, y, width, height, src,
$
(
'#divImageLoading'
).
css
(
'display'
,
'none'
);
//this.response is what you're looking for
AVWEB
.
avwLog
(
this
.
response
,
typeof
this
.
response
);
//
AVWEB.avwLog(this.response, typeof this.response);
CONTENTVIEW_FILESYSTEM
.
fs
.
root
.
getFile
(
'/abook/'
+
fileName
,
...
...
@@ -308,10 +308,10 @@ CONTENTVIEW_FILESYSTEM.showVideoObjectCache = function(x, y, width, height, src,
fileEntry
.
createWriter
(
function
(
fileWriter
)
{
fileWriter
.
onwriteend
=
function
(
e
)
{
AVWEB
.
avwLog
(
'RES書き込み完了'
);
//
AVWEB.avwLog('RES書き込み完了');
};
fileWriter
.
onerror
=
function
(
e
)
{
AVWEB
.
avwLog
(
'RES書き込みエラー: '
+
e
.
toString
());
//
AVWEB.avwLog('RES書き込みエラー: ' + e.toString());
};
var
blobData
=
new
Blob
([
xhr
.
response
],
{
type
:
"application/octet-stream"
});
...
...
@@ -326,7 +326,7 @@ CONTENTVIEW_FILESYSTEM.showVideoObjectCache = function(x, y, width, height, src,
}
else
{
if
(
this
.
readyState
==
2
){
AVWEB
.
avwLog
(
"onreadystatechange:"
+
this
.
readyState
+
" "
+
this
.
status
);
//
AVWEB.avwLog("onreadystatechange:" + this.readyState + " " + this.status);
$
(
'#divImageLoading'
).
css
(
'display'
,
'block'
);
CONTENTVIEW_FILESYSTEM
.
isXhrBusy
=
true
;
}
...
...
@@ -338,7 +338,7 @@ CONTENTVIEW_FILESYSTEM.showVideoObjectCache = function(x, y, width, height, src,
xhr
.
responseType
=
'blob'
;
xhr
.
send
();
}
else
{
AVWEB
.
avwLog
(
"xhr is busy."
);
//
AVWEB.avwLog("xhr is busy.");
}
//タグは書き出し
...
...
@@ -373,7 +373,7 @@ CONTENTVIEW_FILESYSTEM.errorHandler = function(e) {
break
;
};
//CONTENTVIEW_FILESYSTEM.fs = null;
AVWEB
.
avwLog
(
'FileSystemAPI Error: '
+
msg
);
//
AVWEB.avwLog('FileSystemAPI Error: ' + msg);
alert
(
'FileSystemAPI Error: '
+
msg
);
};
abvw/js/contentview_GetData.js
View file @
6d47e7ef
...
...
@@ -1300,7 +1300,7 @@ function renderNextPage(){
function
(
file
){
var
reader
=
new
FileReader
();
reader
.
onloadend
=
function
(
e
)
{
AVWEB
.
avwLog
(
"read FileSystem"
);
//
AVWEB.avwLog("read FileSystem");
nextPageImage
=
e
.
target
.
result
;
nextContent
.
setPageImages
(
totalPage
,
nextPageImage
)
...
...
@@ -1313,7 +1313,7 @@ function renderNextPage(){
);
},
function
(
err
){
// 失敗時のコールバック関数
AVWEB
.
avwLog
(
"NotRead FileSystem"
);
//
AVWEB.avwLog("NotRead FileSystem");
avwGrabContentPageImage
(
ClientData
.
userInfo_accountPath
(),
{
contentId
:
contentID
,
sid
:
ClientData
.
userInfo_sid
(),
pageNo
:
pageNo
},
...
...
@@ -1379,7 +1379,7 @@ function renderPrevPage(){
function
(
file
){
var
reader
=
new
FileReader
();
reader
.
onloadend
=
function
(
e
)
{
AVWEB
.
avwLog
(
"read FileSystem"
);
//
AVWEB.avwLog("read FileSystem");
prevPageImage
=
e
.
target
.
result
;
prevContent
.
setPageImages
(
totalPage
,
prevPageImage
)
...
...
@@ -1392,7 +1392,7 @@ function renderPrevPage(){
);
},
function
(
err
){
// 失敗時のコールバック関数
AVWEB
.
avwLog
(
"NotRead FileSystem"
);
//
AVWEB.avwLog("NotRead FileSystem");
avwGrabContentPageImage
(
ClientData
.
userInfo_accountPath
(),
{
contentId
:
contentID
,
sid
:
ClientData
.
userInfo_sid
(),
pageNo
:
pageNo
},
function
(
data
)
{
...
...
abvw/js/contentview_InitObjects.js
View file @
6d47e7ef
...
...
@@ -645,7 +645,7 @@ function initPageMediaAndHtmlType(){
function
(
file
){
var
url
=
window
.
URL
||
window
.
webkitURL
;
var
resSrc
=
url
.
createObjectURL
(
file
);
AVWEB
.
avwLog
(
"read cache: createObjectURL "
+
resSrc
);
//
AVWEB.avwLog("read cache: createObjectURL " + resSrc);
displayOverlayForSpecifyContentType
(
resSrc
);
...
...
@@ -653,7 +653,7 @@ function initPageMediaAndHtmlType(){
);
},
function
(
err
){
// 失敗時のコールバック関数
AVWEB
.
avwLog
(
"NotRead FileSystem"
);
//
AVWEB.avwLog("NotRead FileSystem");
//キャッシュ化
var
xhr
=
new
XMLHttpRequest
();
...
...
@@ -664,7 +664,7 @@ function initPageMediaAndHtmlType(){
$
(
'#divImageLoading'
).
css
(
'display'
,
'none'
);
//this.response is what you're looking for
AVWEB
.
avwLog
(
this
.
response
,
typeof
this
.
response
);
//
AVWEB.avwLog(this.response, typeof this.response);
CONTENTVIEW_FILESYSTEM
.
fs
.
root
.
getFile
(
'/abook/'
+
fileName
,
{
create
:
true
},
...
...
@@ -672,10 +672,10 @@ function initPageMediaAndHtmlType(){
fileEntry
.
createWriter
(
function
(
fileWriter
)
{
fileWriter
.
onwriteend
=
function
(
e
)
{
AVWEB
.
avwLog
(
'RES書き込み完了'
);
//
AVWEB.avwLog('RES書き込み完了');
};
fileWriter
.
onerror
=
function
(
e
)
{
AVWEB
.
avwLog
(
'RES書き込みエラー: '
+
e
.
toString
());
//
AVWEB.avwLog('RES書き込みエラー: ' + e.toString());
};
var
blobData
=
new
Blob
([
xhr
.
response
],
{
type
:
"application/octet-stream"
});
...
...
@@ -689,7 +689,7 @@ function initPageMediaAndHtmlType(){
}
else
{
if
(
this
.
readyState
==
2
){
AVWEB
.
avwLog
(
"onreadystatechange:"
+
this
.
readyState
+
" "
+
this
.
status
);
//
AVWEB.avwLog("onreadystatechange:" + this.readyState + " " + this.status);
CONTENTVIEW_FILESYSTEM
.
isXhrBusy
=
true
;
$
(
'#divImageLoading'
).
css
(
'z-index'
,
'99999'
);
$
(
'#divImageLoading'
).
css
(
'display'
,
'block'
);
...
...
@@ -704,7 +704,7 @@ function initPageMediaAndHtmlType(){
xhr
.
responseType
=
'blob'
;
xhr
.
send
();
}
else
{
AVWEB
.
avwLog
(
"xhr is busy."
);
//
AVWEB.avwLog("xhr is busy.");
}
//タグは書き出し
...
...
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