Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
e8b5d82e
Unverified
Commit
e8b5d82e
authored
5 years ago
by
Feanil Patel
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Fix static urls in pdf_viewer.html to correctly display PDF viewer for textbooks"
parent
147bd60b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
common/djangoapps/pipeline_mako/templates/static_content.html
+4
-1
4 additions, 1 deletion
...on/djangoapps/pipeline_mako/templates/static_content.html
lms/templates/pdf_viewer.html
+11
-11
11 additions, 11 deletions
lms/templates/pdf_viewer.html
with
15 additions
and
12 deletions
common/djangoapps/pipeline_mako/templates/static_content.html
+
4
−
1
View file @
e8b5d82e
...
...
@@ -31,7 +31,10 @@ logger = logging.getLogger(__name__)
%
></
%
def>
<
%
def
name=
'url(file, raw=False)'
><
%
url =
staticfiles_storage.url(file)
try:
url =
staticfiles_storage.url(file)
except:
url =
file
##
HTML-escaping
must
be
handled
by
caller
%
>
${url | n, decode.utf8}${"?raw" if raw else ""}
</
%
def>
...
...
This diff is collapsed.
Click to expand it.
lms/templates/pdf_viewer.html
+
11
−
11
View file @
e8b5d82e
...
...
@@ -32,23 +32,23 @@ http://sourceforge.net/adobe/cmap/wiki/License/
<meta
name=
"path_prefix"
content=
"${EDX_ROOT_URL}"
>
<title>
${current_chapter['title'] if current_chapter else ''}
</title>
<link
rel=
"stylesheet"
href=
"${static.url('css/vendor/pdfjs/viewer.css')}"
/>
<link
rel=
"stylesheet"
href=
"${static.url('
/static/
css/vendor/pdfjs/viewer.css')}"
/>
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/pdfjs/compatibility.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('
/static/
js/vendor/pdfjs/compatibility.js')}"
></script>
<!-- This snippet is used in production (included from viewer.html) -->
<link
rel=
"resource"
type=
"application/l10n"
href=
"${static.url('js/vendor/pdfjs/locale/locale.properties')}"
/>
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/pdfjs/l10n.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/pdfjs/pdf.js')}"
></script>
<link
rel=
"resource"
type=
"application/l10n"
href=
"${static.url('
/static/
js/vendor/pdfjs/locale/locale.properties')}"
/>
<script
type=
"text/javascript"
src=
"${static.url('
/static/
js/vendor/pdfjs/l10n.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('
/static/
js/vendor/pdfjs/pdf.js')}"
></script>
<script
type=
"text/javascript"
>
PDFJS
.
imageResourcesPath
=
"
${static.url('css/vendor/pdfjs/images/') | n, js_escaped_string}
"
;
PDFJS
.
workerSrc
=
"
${static.url('js/vendor/pdfjs/pdf.worker.js') | n, js_escaped_string}
"
;
PDFJS
.
cMapUrl
=
"
${static.url('css/vendor/pdfjs/cmaps/') | n, js_escaped_string}
"
;
PDFJS
.
imageResourcesPath
=
"
${static.url('
/static/
css/vendor/pdfjs/images/') | n, js_escaped_string}
"
;
PDFJS
.
workerSrc
=
"
${static.url('
/static/
js/vendor/pdfjs/pdf.worker.js') | n, js_escaped_string}
"
;
PDFJS
.
cMapUrl
=
"
${static.url('
/static/
css/vendor/pdfjs/cmaps/') | n, js_escaped_string}
"
;
PDF_URL
=
'
${current_url | n, js_escaped_string}
'
;
</script>
<script
${
static.url
('
js
/
vendor
/
pdfjs
/
debugger.js
')}
></script>
<script
${
static.url
('
/
static
/
js
/
vendor
/
pdfjs
/
debugger.js
')}
></script>
<
%
static:js
group=
'main_vendor'
/>
<
%
static:js
group=
'application'
/>
...
...
@@ -417,7 +417,7 @@ http://sourceforge.net/adobe/cmap/wiki/License/
</div>
</div>
</div>
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/pdfjs/viewer.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/pdf-analytics.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('
/static/
js/vendor/pdfjs/viewer.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('
/static/
js/pdf-analytics.js')}"
></script>
</body>
</html>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment