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
a500c463
Commit
a500c463
authored
Feb 05, 2015
by
Masaru Abe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ダウンロード対応
parent
23d466c4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
32 deletions
+74
-32
abvw/home.html
+4
-2
abvw/js/header.js
+19
-15
abvw/js/home.js
+51
-15
No files found.
abvw/home.html
View file @
a500c463
...
...
@@ -232,8 +232,10 @@
</article>
<section
id=
"dlgSubMenu"
>
<p
class=
"dop_info"
>
<a
href=
"#"
class=
"lang"
lang=
"txtRead"
id=
"dialog-read"
>
読む
</a><br
/>
<a
href=
"#"
class=
"lang"
lang=
"txtDetailPage"
id=
"dialog-detail"
>
詳細画面へ
</a></p>
<a
href=
"#"
class=
"lang"
lang=
"txtRead"
id=
"dialog-read"
>
読む
</a><br
/>
<a
href=
"#"
class=
"lang"
lang=
"txtDetailPage"
id=
"dialog-detail"
>
詳細画面へ
</a><br
/>
<a
href=
"#"
id=
"dialog-download"
style=
"display: none"
>
ダウンロード
</a>
</p>
</section>
<div
id=
"dlgOverlay"
>
</div>
</div>
...
...
abvw/js/header.js
View file @
a500c463
...
...
@@ -1077,21 +1077,25 @@ HEADER.downloadResourceById = function(contentId){
getType
:
'2'
};
AVWEB
.
avwCmsApiSync
(
ClientData
.
userInfo_accountPath
(),
"webGetContent"
,
"get"
,
params
,
function
(
data
)
{
//Get resourceurl
var
resourceUrl
=
HEADER
.
getResourceByIdFromAPI
(
data
.
contentData
.
content
.
resourceId
);
// open url to download file
if
(
HEADER
.
isSafariNotOnIpad
())
{
window
.
onbeforeunload
=
null
;
window
.
open
(
resourceUrl
,
"_self"
);
// open url to download file on safari not for ipad
var
toogleTime
=
setTimeout
(
function
()
{
COMMON
.
ToogleLogoutNortice
()
},
200
);
}
else
{
window
.
open
(
resourceUrl
);
//open url to download file on orther browser
}
},
function
(
xhr
,
b
,
c
)
{
});
function
(
data
)
{
//Get resourceurl
if
(
data
.
contentData
.
content
){
var
resourceUrl
=
HEADER
.
getResourceByIdFromAPI
(
data
.
contentData
.
content
.
resourceId
);
// open url to download file
if
(
HEADER
.
isSafariNotOnIpad
())
{
window
.
onbeforeunload
=
null
;
window
.
open
(
resourceUrl
,
"_self"
);
// open url to download file on safari not for ipad
var
toogleTime
=
setTimeout
(
function
()
{
COMMON
.
ToogleLogoutNortice
()
},
200
);
}
else
{
window
.
open
(
resourceUrl
);
//open url to download file on orther browser
}
}
else
{
alert
(
"ダウンロード出来ません。"
);
}
},
function
(
xhr
,
b
,
c
)
{
}
);
};
//Download resource
...
...
abvw/js/home.js
View file @
a500c463
...
...
@@ -245,6 +245,9 @@ $(document).ready(function () {
$
(
'#authGroupBox'
).
hide
();
}
//Button details on dialog click event
$
(
'#dialog-download'
).
click
(
HOME
.
downloadSubmenuFunction
);
});
//グループ認証ここかか
...
...
@@ -700,7 +703,10 @@ HOME.openSubMenuDialogFunction = function(e) {
var
array
=
[
e
.
clientX
,
e
.
clientY
];
var
contentid
=
$
(
this
).
attr
(
'contentid'
);
var
download
=
$
(
this
).
attr
(
'download'
);
alert
(
"download:"
+
download
);
if
(
!
HOME
.
isShowBookShelf
)
{
// Get image of selected image
var
base64String
=
HOME
.
returnThumbnail
(
contentid
);
...
...
@@ -755,26 +761,33 @@ HOME.openSubMenuDialogFunction = function(e) {
DETAIL
.
openContentDetail
();
}
else
if
(
HOME
.
isShowBookShelf
)
{
$
(
'#dialog-read'
).
attr
(
'contentid'
,
contentid
);
$
(
'#dialog-detail'
).
attr
(
'contentid'
,
contentid
);
//$("#dlgSubMenu").dialog({position: array, width: 130, height: 90});
$
(
"#dlgSubMenu"
).
show
();
HOME
.
allowTimerCloseSubMenu
=
false
;
$
(
"#dlgSubMenu"
).
position
({
my
:
"left bottom"
,
at
:
"left-10 top"
,
of
:
this
,
collision
:
"fit"
});
//
}
//
else if (HOME.isShowBookShelf) {
//
$('#dialog-read').attr('contentid', contentid);
//
$('#dialog-detail').attr('contentid', contentid);
//
//$("#dlgSubMenu").dialog({position: array, width: 130, height: 90});
//
$("#dlgSubMenu").show();
//
HOME.allowTimerCloseSubMenu = false;
//
$("#dlgSubMenu").position({ my: "left bottom",
//
at: "left-10 top",
//
of: this,
//
collision: "fit"
//
});
}
else
{
$
(
'#dialog-read'
).
attr
(
'contentid'
,
contentid
);
$
(
'#dialog-detail'
).
attr
(
'contentid'
,
contentid
);
//$("#dlgSubMenu").dialog({position: array, width: 130, height: 90});
$
(
'#dialog-download'
).
attr
(
'contentid'
,
contentid
);
if
(
download
==
"1"
){
$
(
'#dialog-download'
).
show
();
}
else
{
$
(
'#dialog-download'
).
hide
();
}
$
(
"#dlgSubMenu"
).
show
();
HOME
.
allowTimerCloseSubMenu
=
false
;
$
(
"#dlgSubMenu"
).
position
({
my
:
"left bottom"
,
$
(
"#dlgSubMenu"
).
position
({
my
:
"left bottom"
,
at
:
"left-10 top"
,
of
:
this
,
collision
:
"fit"
...
...
@@ -1720,7 +1733,7 @@ HOME.renderContent = function(id, text, division, type, order, from, to, cateid,
+
' </div>'
+
' <img id="loadingIcon'
+
post
.
contentId
+
'" src="./img/data_loading.gif" height="25px" width="25px" style="padding: 86px; "/>'
+
' </div>'
+
' <a id="title'
+
post
.
contentId
+
'" class="dialog name lang" lang="lblTitle" contentid="'
+
post
.
contentId
+
'">'
+
' <a id="title'
+
post
.
contentId
+
'" class="dialog name lang" lang="lblTitle" contentid="'
+
post
.
contentId
+
'"
download="'
+
post
.
download
+
'"
>'
+
' <img src="'
+
HEADER
.
getIconTypeContent
(
post
.
contentType
)
+
'" width="20" height="20">'
+
COMMON
.
truncate
(
COMMON
.
htmlEncode
(
post
.
contentTitle
),
20
)
+
' </a>'
...
...
@@ -2724,4 +2737,27 @@ HOME.showContentView = function(){
};
//Dialog Read Button CLick
HOME
.
downloadSubmenuFunction
=
function
(
e
)
{
if
(
e
)
{
e
.
preventDefault
();
}
HOME
.
allowTimerCloseSubMenu
=
false
;
if
(
HOME
.
home_isMove
==
true
)
{
HOME
.
home_isMove
=
false
;
return
;
}
// hide dialog sub menu
$
(
'#dlgSubMenu'
).
hide
();
var
contentId
=
$
(
this
).
attr
(
'contentid'
);
//Download content
HEADER
.
downloadResourceById
(
contentId
);
};
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