Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
douban-api-proxy
Commits
994bc8b0
Commit
994bc8b0
authored
Mar 15, 2021
by
Ozzie Isaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed dropdown button on single file listen/read (Fix #1840)
parent
24516050
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
main.js
cps/static/js/main.js
+1
-1
detail.html
cps/templates/detail.html
+9
-1
No files found.
cps/static/js/main.js
View file @
994bc8b0
...
...
@@ -87,7 +87,7 @@ $(".container-fluid").bind('drop', function (e) {
var
files
=
e
.
originalEvent
.
dataTransfer
.
files
;
var
test
=
$
(
"#btn-upload"
)[
0
].
accept
;
$
(
this
).
css
(
'background'
,
''
);
const
dt
=
new
DataTransfer
()
const
dt
=
new
DataTransfer
()
;
jQuery
.
each
(
files
,
function
(
index
,
item
)
{
if
(
test
.
indexOf
(
item
.
name
.
substr
(
item
.
name
.
lastIndexOf
(
'.'
)))
!==
-
1
)
{
dt
.
items
.
add
(
item
);
...
...
cps/templates/detail.html
View file @
994bc8b0
...
...
@@ -55,6 +55,7 @@
{% endif %}
{% if reader_list and g.user.role_viewer() %}
<div
class=
"btn-group"
role=
"group"
>
{% if reader_list|length > 1 %}
<button
id=
"read-in-browser"
type=
"button"
class=
"btn btn-primary dropdown-toggle"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
>
<span
class=
"glyphicon glyphicon-eye-open"
></span>
{{_('Read in Browser')}}
<span
class=
"caret"
></span>
...
...
@@ -64,15 +65,19 @@
<li><a
target=
"_blank"
href=
"{{ url_for('web.read_book', book_id=entry.id, book_format=format) }}"
>
{{format}}
</a></li>
{%endfor%}
</ul>
{% else %}
<a
target=
"_blank"
href=
"{{url_for('web.read_book', book_id=entry.id, book_format=reader_list[0])}}"
id=
"readbtn"
class=
"btn btn-primary"
role=
"button"
><span
class=
"glyphicon glyphicon-eye-open"
></span>
{{_('Read in Browser')}} - {{reader_list[0]}}
</a>
{% endif %}
</div>
{% endif %}
{% if audioentries|length > 0 and g.user.role_viewer() %}
<div
class=
"btn-group"
role=
"group"
>
{% if audioentries|length > 1 %}
<button
id=
"listen-in-browser"
type=
"button"
class=
"btn btn-primary dropdown-toggle"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
>
<span
class=
"glyphicon glyphicon-music"
></span>
{{_('Listen in Browser')}}
<span
class=
"caret"
></span>
</button>
<ul
class=
"dropdown-menu"
aria-labelledby=
"
read
-in-browser"
>
<ul
class=
"dropdown-menu"
aria-labelledby=
"
listen
-in-browser"
>
{% for format in reader_list %}
<li><a
target=
"_blank"
href=
"{{ url_for('web.read_book', book_id=entry.id, book_format=format) }}"
>
{{format}}
</a></li>
{%endfor%}
...
...
@@ -85,6 +90,9 @@
{% endif %}
{% endfor %}
</ul>
{% else %}
<a
target=
"_blank"
href=
"{{url_for('web.read_book', book_id=entry.id, book_format=audioentries[0])}}"
id=
"listenbtn"
class=
"btn btn-primary"
role=
"button"
><span
class=
"glyphicon glyphicon-music"
></span>
{{_('Listen in Browser')}} - {{audioentries[0]}}
</a>
{% endif %}
</div>
{% endif %}
</div>
...
...
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