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
44899bb0
Commit
44899bb0
authored
Feb 12, 2015
by
Masaru Abe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
テスト対応
parent
1377ba9a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
66 deletions
+65
-66
abvw/js/contentview.js
+19
-12
abvw/js/contentview_FileSystem.js
+44
-52
abvw/js/history.js
+2
-2
No files found.
abvw/js/contentview.js
View file @
44899bb0
...
@@ -5506,12 +5506,7 @@ CONTENTVIEW.screenMove = function(){
...
@@ -5506,12 +5506,7 @@ CONTENTVIEW.screenMove = function(){
CONTENTVIEW
.
screenBack
=
function
(){
CONTENTVIEW
.
screenBack
=
function
(){
//後始末
//後始末
$
(
'#dialog'
).
hide
();
CONTENTVIEW
.
initScreen
();
$
(
'#dialog'
).
empty
();
$
(
'#dialog'
).
removeClass
();
$
(
'#dialog'
).
removeAttr
(
'style'
);
$
(
'#dialog'
).
addClass
(
'web_dialog'
);
$
(
'#divCacheLoading'
).
hide
();
$
(
"#viewer"
).
hide
();
$
(
"#viewer"
).
hide
();
if
(
$
(
'#bookshelf'
).
length
||
$
(
'#list'
).
length
){
if
(
$
(
'#bookshelf'
).
length
||
$
(
'#list'
).
length
){
...
@@ -5548,6 +5543,23 @@ CONTENTVIEW.screenBack = function(){
...
@@ -5548,6 +5543,23 @@ CONTENTVIEW.screenBack = function(){
};
};
CONTENTVIEW
.
initScreen
=
function
(){
//画面初期化
if
(
$
(
'#canvasWrapper'
).
length
)
{
$
(
'#canvasWrapper'
).
empty
();
}
if
(
$
(
'#dialog'
).
length
)
{
$
(
'#dialog'
).
hide
();
$
(
'#dialog'
).
empty
();
$
(
'#dialog'
).
removeClass
();
$
(
'#dialog'
).
removeAttr
(
'style'
);
$
(
'#dialog'
).
addClass
(
'web_dialog'
);
}
$
(
'#divCacheLoading'
).
hide
();
};
$
(
function
()
{
$
(
function
()
{
//CONTENTVIEW.ready();
//CONTENTVIEW.ready();
});
});
...
@@ -5625,12 +5637,7 @@ CONTENTVIEW.ready = function(){
...
@@ -5625,12 +5637,7 @@ CONTENTVIEW.ready = function(){
}
}
//画面初期化
//画面初期化
$
(
'#dialog'
).
hide
();
CONTENTVIEW
.
initScreen
();
$
(
'#dialog'
).
empty
();
$
(
'#dialog'
).
removeClass
();
$
(
'#dialog'
).
removeAttr
(
'style'
);
$
(
'#dialog'
).
addClass
(
'web_dialog'
);
$
(
'#divCacheLoading'
).
hide
();
/* check login */
/* check login */
if
(
!
AVWEB
.
avwCheckLogin
(
COMMON
.
ScreenIds
.
Login
))
return
;
if
(
!
AVWEB
.
avwCheckLogin
(
COMMON
.
ScreenIds
.
Login
))
return
;
...
...
abvw/js/contentview_FileSystem.js
View file @
44899bb0
...
@@ -358,69 +358,61 @@ CONTENTVIEW_FILESYSTEM.createMovieCache = function(resourceUrl, fileName) {
...
@@ -358,69 +358,61 @@ CONTENTVIEW_FILESYSTEM.createMovieCache = function(resourceUrl, fileName) {
return
;
return
;
}
}
//既にビジーなら戻る
if
(
CONTENTVIEW_FILESYSTEM
.
isXhrBusy
){
return
;
}
//キャッシュ化
//キャッシュ化
var
downloadSize
=
null
;
var
downloadSize
=
null
;
var
xhr
=
new
XMLHttpRequest
();
var
xhr
=
new
XMLHttpRequest
();
xhr
.
onreadystatechange
=
function
(){
xhr
.
onreadystatechange
=
function
(){
if
(
this
.
readyState
==
2
){
if
(
this
.
readyState
==
4
){
downloadSize
=
xhr
.
getResponseHeader
(
'Content-Length'
);
console
.
log
(
"Content-Length:"
+
downloadSize
);
console
.
log
(
"limit:"
+
AVWEB
.
avwSysSetting
().
movieCacheLimitMB
);
//制限値チェック
if
(
downloadSize
){
if
(
downloadSize
>
AVWEB
.
avwSysSetting
().
movieCacheLimitMB
*
COMMON
.
MB_BYTE
){
console
.
log
(
"abort"
);
xhr
.
abort
();
}
}
}
if
(
this
.
readyState
==
4
&&
this
.
status
==
200
){
CONTENTVIEW_FILESYSTEM
.
isXhrBusy
=
false
;
CONTENTVIEW_FILESYSTEM
.
isXhrBusy
=
false
;
$
(
'#divCacheLoading'
).
css
(
'display'
,
'none'
);
$
(
'#divCacheLoading'
).
css
(
'display'
,
'none'
);
//this.response is what you're looking for
if
(
this
.
status
==
200
){
//AVWEB.avwLog(this.response, typeof this.response);
//this.response is what you're looking for
CONTENTVIEW_FILESYSTEM
.
fs
.
root
.
getFile
(
//AVWEB.avwLog(this.response, typeof this.response);
fileName
,
CONTENTVIEW_FILESYSTEM
.
fs
.
root
.
getFile
(
{
create
:
true
},
fileName
,
function
(
fileEntry
){
{
create
:
true
},
f
ileEntry
.
createWriter
(
f
unction
(
fileEntry
){
function
(
fileWriter
)
{
fileEntry
.
createWriter
(
f
ileWriter
.
onwriteend
=
function
(
e
)
{
f
unction
(
fileWriter
)
{
AVWEB
.
avwLog
(
'RES書き込み完了 size='
+
fileWriter
.
length
);
fileWriter
.
onwriteend
=
function
(
e
)
{
if
(
downloadSize
){
AVWEB
.
avwLog
(
'RES書き込み完了 size='
+
fileWriter
.
length
);
if
(
downloadSize
>
AVWEB
.
avwSysSetting
().
movieCacheLimitMB
*
COMMON
.
MB_BYTE
){
if
(
downloadSize
){
CONTENTVIEW_FILESYSTEM
.
deleteMovieCache
(
fileName
);
if
(
downloadSize
>
AVWEB
.
avwSysSetting
().
movieCacheLimitMB
*
COMMON
.
MB_BYTE
){
}
else
if
(
downloadSize
!=
fileWriter
.
length
){
CONTENTVIEW_FILESYSTEM
.
deleteMovieCache
(
fileName
);
CONTENTVIEW_FILESYSTEM
.
deleteMovieCache
(
fileName
);
}
else
if
(
downloadSize
!=
fileWriter
.
length
){
}
CONTENTVIEW_FILESYSTEM
.
deleteMovieCache
(
fileName
);
}
}
};
}
fileWriter
.
onerror
=
function
(
e
)
{
};
//AVWEB.avwLog('RES書き込みエラー: ' + e.toString());
fileWriter
.
onerror
=
function
(
e
)
{
}
;
//AVWEB.avwLog('RES書き込みエラー: ' + e.toString())
;
};
var
blobData
=
new
Blob
([
xhr
.
response
],
{
type
:
"application/octet-stream"
});
fileWriter
.
write
(
blobData
);
var
blobData
=
new
Blob
([
xhr
.
response
],
{
type
:
"application/octet-stream"
}
);
fileWriter
.
write
(
blobData
);
}
);
}
},
);
CONTENTVIEW_FILESYSTEM
.
errorHandler
},
);
CONTENTVIEW_FILESYSTEM
.
errorHandler
);
}
else
{
}
if
(
this
.
readyState
==
2
){
}
else
if
(
this
.
readyState
==
2
){
//
AVWEB.avwLog("onreadystatechange:" + this.readyState + " " + this.status);
AVWEB
.
avwLog
(
"onreadystatechange:"
+
this
.
readyState
+
" "
+
this
.
status
);
downloadSize
=
xhr
.
getResponseHeader
(
'Content-Length'
);
downloadSize
=
xhr
.
getResponseHeader
(
'Content-Length'
);
console
.
l
og
(
"Content-Length:"
+
downloadSize
);
AVWEB
.
avwL
og
(
"Content-Length:"
+
downloadSize
);
console
.
log
(
"
limit:"
+
AVWEB
.
avwSysSetting
().
movieCacheLimitMB
);
AVWEB
.
avwLog
(
"Cache
limit:"
+
AVWEB
.
avwSysSetting
().
movieCacheLimitMB
);
//制限値チェック
//制限値チェック
if
(
downloadSize
&&
downloadSize
>
AVWEB
.
avwSysSetting
().
movieCacheLimitMB
*
COMMON
.
MB_BYTE
){
if
(
downloadSize
&&
downloadSize
>
AVWEB
.
avwSysSetting
().
movieCacheLimitMB
*
COMMON
.
MB_BYTE
){
console
.
log
(
"
abort"
);
AVWEB
.
avwLog
(
"CacheLimit
abort"
);
xhr
.
abort
();
xhr
.
abort
();
}
else
{
}
else
{
CONTENTVIEW_FILESYSTEM
.
isXhrBusy
=
true
;
CONTENTVIEW_FILESYSTEM
.
isXhrBusy
=
true
;
...
@@ -433,7 +425,7 @@ CONTENTVIEW_FILESYSTEM.createMovieCache = function(resourceUrl, fileName) {
...
@@ -433,7 +425,7 @@ CONTENTVIEW_FILESYSTEM.createMovieCache = function(resourceUrl, fileName) {
}
}
};
};
xhr
.
onabort
=
function
(
e
){
xhr
.
onabort
=
function
(
e
){
console
.
l
og
(
"XHR 通信中止"
);
AVWEB
.
avwL
og
(
"XHR 通信中止"
);
CONTENTVIEW_FILESYSTEM
.
isXhrBusy
=
false
;
CONTENTVIEW_FILESYSTEM
.
isXhrBusy
=
false
;
$
(
'#divCacheLoading'
).
css
(
'display'
,
'none'
);
$
(
'#divCacheLoading'
).
css
(
'display'
,
'none'
);
};
};
...
...
abvw/js/history.js
View file @
44899bb0
...
@@ -1128,7 +1128,7 @@ HISTORY.formatDate = function(originDate){
...
@@ -1128,7 +1128,7 @@ HISTORY.formatDate = function(originDate){
HISTORY
.
sortByViewDateDesc
=
function
(){
HISTORY
.
sortByViewDateDesc
=
function
(){
console
.
log
(
"HISTORY.sortByViewDateDesc"
);
//
console.log("HISTORY.sortByViewDateDesc");
var
sortArr
=
HISTORY
.
contentViewData
;
var
sortArr
=
HISTORY
.
contentViewData
;
...
@@ -1374,7 +1374,7 @@ HISTORY.sortByTitleKanaDesc = function(){
...
@@ -1374,7 +1374,7 @@ HISTORY.sortByTitleKanaDesc = function(){
HISTORY
.
renderContentAfterSort
=
function
(
contentSortArr
){
HISTORY
.
renderContentAfterSort
=
function
(
contentSortArr
){
console
.
log
(
"HISTORY.renderContentAfterSort"
);
//
console.log("HISTORY.renderContentAfterSort");
HISTORY
.
refreshGrid
();
HISTORY
.
refreshGrid
();
//var htmlTemp = "";
//var htmlTemp = "";
...
...
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