Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
0b2291d2
Commit
0b2291d2
authored
Oct 01, 2014
by
Usman Khalid
Committed by
Zia Fazal
Apr 06, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable http range requests in pdf.js.
A bug in pdf.js or Chrome is causing pdf books to not load. TNL-488
parent
4cbafd56
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
lms/djangoapps/staticbook/views.py
+1
-1
lms/templates/static_pdfbook.html
+1
-1
No files found.
lms/djangoapps/staticbook/views.py
View file @
0b2291d2
...
@@ -106,7 +106,7 @@ def pdf_index(request, course_id, book_index, chapter=None, page=None):
...
@@ -106,7 +106,7 @@ def pdf_index(request, course_id, book_index, chapter=None, page=None):
viewer_params
+=
current_chapter
[
'url'
]
viewer_params
+=
current_chapter
[
'url'
]
current_url
=
current_chapter
[
'url'
]
current_url
=
current_chapter
[
'url'
]
viewer_params
+=
'#zoom=page-fit'
viewer_params
+=
'#zoom=page-fit
&disableRange=true
'
if
page
is
not
None
:
if
page
is
not
None
:
viewer_params
+=
'&page={}'
.
format
(
page
)
viewer_params
+=
'&page={}'
.
format
(
page
)
...
...
lms/templates/static_pdfbook.html
View file @
0b2291d2
...
@@ -18,7 +18,7 @@ $(function(){
...
@@ -18,7 +18,7 @@ $(function(){
e
.
preventDefault
();
e
.
preventDefault
();
var
url
=
$
(
this
).
attr
(
'rel'
);
var
url
=
$
(
this
).
attr
(
'rel'
);
$
(
'#viewer-frame'
).
attr
({
$
(
'#viewer-frame'
).
attr
({
'src'
:
'${request.path}?viewer=true&file='
+
url
+
'#zoom=page-fit'
,
'src'
:
'${request.path}?viewer=true&file='
+
url
+
'#zoom=page-fit
&disableRange=true
'
,
'title'
:
$
(
this
).
text
()
'title'
:
$
(
this
).
text
()
});
});
$
(
'#viewer-frame'
).
focus
();
$
(
'#viewer-frame'
).
focus
();
...
...
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